Defaults the VLAN configuration

        .. code-block:: none

            default vlan <vlanid>

        Args:
            vid (str): The VLAN ID to default

        Returns:
            True if the operation was successful otherwise False
501203
def default(self, vid):
        
        command = 'default vlan %s' % vid
        return self.configure(command) if isvlan(vid) else False
1278757
def default(self, block, name):
        
        return self._kvs.default(self._key(block, name))
1156574
def default_interface(ifconfig=None, route_output=None):
    
    global Parser
    return Parser(ifconfig=ifconfig)._default_interface(route_output=route_output)
389117
def _python_shell_default(python_shell, __pub_jid):
    '''
    
    '''
    try:
        # Default to python_shell=True when run directly from remote execution
        # system. Cross-module calls won't have a jid.
        if __pub_jid and python_shell is None:
            return True
        elif __opts__.get('cmd_safe', True) is False and python_shell is None:
            # Override-switch for python_shell
            return True
    except NameError:
        pass
    return python_shell
1095525
def _get_default_router(self, routers, router_name=None):
        """"""
        if router_name is None:
            for router in routers:
                if router['id'] is not None:
                    return router['id']
        else:
            for router in routers:
                if router['hostname'] == router_name:
                    return router['id']

        raise SoftLayer.SoftLayerError("Could not find valid default router")
107278
def getH264V4l2(verbose=False):
    
    import glob
    from subprocess import Popen, PIPE
    
    cams=[]

    for device in glob.glob("/sys/class/video4linux/*"):
        devname=device.split("/")[-1]
        devfile=os.path.join("/dev",devname)
        
        lis=("v4l2-ctl --list-formats -d "+devfile).split()

        p = Popen(lis, stdout=PIPE, stderr=PIPE)
        # p.communicate()
        # print(dir(p))
        # print(p.returncode)
        # print(p.stderr.read().decode("utf-8"))
        st = p.stdout.read().decode("utf-8")
        # print(st)
        
        if (st.lower().find("h264")>-1):
            namefile=os.path.join(device, "name")
            # print(namefile)
            f=open(namefile, "r"); name=f.read(); f.close()
            fullname = name.strip() + " ("+devname+")"
            cams.append((devfile, fullname))

    if (verbose):
        for cam in cams:
            print(cam)
        
    return cams
119116
def load_config():
    ''''''
    cfg_path = '/usr/local/etc/freelan'
    cfg_file = 'freelan.cfg'

    if not os.path.isdir(cfg_path):
        print("Can not find default freelan config directory.")
        return

    cfg_file_path = os.path.join(cfg_path,cfg_file)

    if not os.path.isfile( cfg_file_path ):
        print("Can not find default freelan config file.")
        return

    return _load_config(cfg_file_path)
551756
def pvlan_mapping
      range = config_get('interface', 'pvlan_mapping', name: @name)
      return default_pvlan_mapping if range.nil?
      range.empty? ? range : [range.delete(' ')]
    end
1362157
def create_networks(self, ids, id_vlan):
        

        network_map = dict()
        network_map['ids'] = ids
        network_map['id_vlan'] = id_vlan

        code, xml = self.submit(
            {'network': network_map}, 'PUT', 'network/create/')

        return self.response(code, xml)
692048
private static boolean setVTMode() {
        long console = GetStdHandle(STD_OUTPUT_HANDLE);
        int[] mode = new int[1];
        if (Kernel32.GetConsoleMode(console, mode) == 0) {
            // No need to go further, not supported.
            return false;
        }
        if (Kernel32.SetConsoleMode(console, mode[0] | VIRTUAL_TERMINAL_PROCESSING) == 0) {
            // No need to go further, not supported.
            return false;
        }

        return true;
    }
787562
async def get_default_min_hwe_kernel(cls) -> typing.Optional[str]:
        
        data = await cls.get_config("default_min_hwe_kernel")
        return None if data is None or data == "" else data
271207
def update(self, vlans):
        

        data = {'vlans': vlans}
        vlans_ids = [str(vlan.get('id')) for vlan in vlans]

        return super(ApiVlan, self).put('api/v3/vlan/%s/' %
                                        ';'.join(vlans_ids), data)
434477
def config_default(option, default=None, type=None, section=cli.name):
    
    def f(option=option, default=default, type=type, section=section):
        config = read_config()
        if type is None and default is not None:
            # detect type from default.
            type = builtins.type(default)
        get_option = option_getter(type)
        try:
            return get_option(config, section, option)
        except (NoOptionError, NoSectionError):
            return default
    return f
1218059
def _is_default(path, dest, name):
    '''
    
    '''
    subvol_id = __salt__['btrfs.subvolume_show'](path)[name]['subvolume id']
    def_id = __salt__['btrfs.subvolume_get_default'](dest)['id']
    return subvol_id == def_id
142705
def add_vlan_to_interface(self, interface, vlan_id):
        
        subif = '%s.%s' % (interface, vlan_id)
        vlan_id = '%s' % vlan_id
        cmd = ['ip', 'link', 'add', 'link', interface, 'name',
               subif, 'type', 'vlan', 'id', vlan_id]
        stdcode, stdout = agent_utils.execute(cmd, root=True)
        if stdcode == 0:
            return agent_utils.make_response(code=stdcode)
        # execute failed.
        message = stdout.pop(0)
        return agent_utils.make_response(code=stdcode, message=message)
516401
def get_dev_vlans(devId):
    

    # checks to see if the imc credentials are already available
    if auth is None or url is None:
        set_imc_creds()
    global r
    get_dev_vlans_url = "/imcrs/vlan?devId=" + str(devId) + "&start=0&size=5000&total=false"
    f_url = url + get_dev_vlans_url
    payload = None
    # creates the URL using the payload variable as the contents
    r = requests.get(f_url, auth=auth, headers=headers)
    # r.status_code
    if r.status_code == 200:
        dev_details = (json.loads(r.text))['vlan']
        return dev_details
    elif r.status_code == 409:
        return [{'vlan': 'None'}]
    else:
        print("get_dev_vlans: An Error has occured")
539088
def get_default(self, node):
        
        if node.inst.properties.get("onwrite", None) == rdltypes.OnWriteType.woclr:
            return True
        else:
            return self.default