_id
stringlengths
2
7
title
stringlengths
1
88
partition
stringclasses
3 values
text
stringlengths
75
19.8k
language
stringclasses
1 value
meta_information
dict
q19800
Ospf.set_router_id
train
def set_router_id(self, value=None, default=False, disable=False): """Controls the router id property for the OSPF Proccess Args: value (str): The router-id value default (bool): Controls the use of the default keyword disable (bool): Controls the use of ...
python
{ "resource": "" }
q19801
Ospf.add_network
train
def add_network(self, network, netmask, area=0): """Adds a network to be advertised by OSPF Args: network (str): The network to be advertised in dotted decimal notation netmask (str): The netmask to configure area (str): ...
python
{ "resource": "" }
q19802
Ospf.add_redistribution
train
def add_redistribution(self, protocol, route_map_name=None): """Adds a protocol redistribution to OSPF Args: protocol (str): protocol to redistribute route_map_name (str): route-map to be used to filter the protocols Retu...
python
{ "resource": "" }
q19803
Ospf.remove_redistribution
train
def remove_redistribution(self, protocol): """Removes a protocol redistribution to OSPF Args: protocol (str): protocol to redistribute route_map_name (str): route-map to be used to filter the protocols Returns: ...
python
{ "resource": "" }
q19804
StaticRoute.getall
train
def getall(self): """Return all ip routes configured on the switch as a resource dict Returns: dict: An dict object of static route entries in the form:: { ip_dest: { next_hop: { next_hop_ip: { distance...
python
{ "resource": "" }
q19805
StaticRoute.create
train
def create(self, ip_dest, next_hop, **kwargs): """Create a static route Args: ip_dest (string): The ip address of the destination in the form of A.B.C.D/E next_hop (string): The next hop interface or ip address **kwargs['next_hop_ip'] (string): The ne...
python
{ "resource": "" }
q19806
StaticRoute.delete
train
def delete(self, ip_dest, next_hop, **kwargs): """Delete a static route Args: ip_dest (string): The ip address of the destination in the form of A.B.C.D/E next_hop (string): The next hop interface or ip address **kwargs['next_hop_ip'] (string): The ne...
python
{ "resource": "" }
q19807
StaticRoute.set_tag
train
def set_tag(self, ip_dest, next_hop, **kwargs): """Set the tag value for the specified route Args: ip_dest (string): The ip address of the destination in the form of A.B.C.D/E next_hop (string): The next hop interface or ip address **kwargs['next_hop_...
python
{ "resource": "" }
q19808
StaticRoute.set_route_name
train
def set_route_name(self, ip_dest, next_hop, **kwargs): """Set the route_name value for the specified route Args: ip_dest (string): The ip address of the destination in the form of A.B.C.D/E next_hop (string): The next hop interface or ip address **kwa...
python
{ "resource": "" }
q19809
StaticRoute._build_commands
train
def _build_commands(self, ip_dest, next_hop, **kwargs): """Build the EOS command string for ip route interactions. Args: ip_dest (string): The ip address of the destination in the form of A.B.C.D/E next_hop (string): The next hop interface or ip address ...
python
{ "resource": "" }
q19810
StaticRoute._set_route
train
def _set_route(self, ip_dest, next_hop, **kwargs): """Configure a static route Args: ip_dest (string): The ip address of the destination in the form of A.B.C.D/E next_hop (string): The next hop interface or ip address **kwargs['next_hop_ip'] (string):...
python
{ "resource": "" }
q19811
Vlans.get
train
def get(self, value): """Returns the VLAN configuration as a resource dict. Args: vid (string): The vlan identifier to retrieve from the running configuration. Valid values are in the range of 1 to 4095 Returns: A Python dict object cont...
python
{ "resource": "" }
q19812
Vlans._parse_name
train
def _parse_name(self, config): """ _parse_name scans the provided configuration block and extracts the vlan name. The config block is expected to always return the vlan name. The return dict is intended to be merged into the response dict. Args: config (str): The v...
python
{ "resource": "" }
q19813
Vlans._parse_state
train
def _parse_state(self, config): """ _parse_state scans the provided configuration block and extracts the vlan state value. The config block is expected to always return the vlan state config. The return dict is inteded to be merged into the response dict. Args: con...
python
{ "resource": "" }
q19814
Vlans._parse_trunk_groups
train
def _parse_trunk_groups(self, config): """ _parse_trunk_groups scans the provided configuration block and extracts all the vlan trunk groups. If no trunk groups are configured an empty List is returned as the vlaue. The return dict is intended to be merged into the response dict. ...
python
{ "resource": "" }
q19815
Vlans.getall
train
def getall(self): """Returns a dict object of all Vlans in the running-config Returns: A dict object of Vlan attributes """ vlans_re = re.compile(r'(?<=^vlan\s)(\d+)', re.M) response = dict() for vid in vlans_re.findall(self.config): response[vi...
python
{ "resource": "" }
q19816
Vlans.create
train
def create(self, vid): """ Creates a new VLAN resource Args: vid (str): The VLAN ID to create Returns: True if create was successful otherwise False """ command = 'vlan %s' % vid return self.configure(command) if isvlan(vid) else False
python
{ "resource": "" }
q19817
Vlans.delete
train
def delete(self, vid): """ Deletes a VLAN from the running configuration Args: vid (str): The VLAN ID to delete Returns: True if the operation was successful otherwise False """ command = 'no vlan %s' % vid return self.configure(command) if isvla...
python
{ "resource": "" }
q19818
Vlans.default
train
def default(self, vid): """ 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 """ command = 'default vlan...
python
{ "resource": "" }
q19819
Vlans.configure_vlan
train
def configure_vlan(self, vid, commands): """ Configures the specified Vlan using commands Args: vid (str): The VLAN ID to configure commands: The list of commands to configure Returns: True if the commands completed successfully """ commands ...
python
{ "resource": "" }
q19820
Vlans.set_name
train
def set_name(self, vid, name=None, default=False, disable=False): """ Configures the VLAN name EosVersion: 4.13.7M Args: vid (str): The VLAN ID to Configures name (str): The value to configure the vlan name default (bool): Defaults the VLAN ID na...
python
{ "resource": "" }
q19821
Vlans.set_state
train
def set_state(self, vid, value=None, default=False, disable=False): """ Configures the VLAN state EosVersion: 4.13.7M Args: vid (str): The VLAN ID to configure value (str): The value to set the vlan state to default (bool): Configures the vlan st...
python
{ "resource": "" }
q19822
Vlans.set_trunk_groups
train
def set_trunk_groups(self, vid, value=None, default=False, disable=False): """ Configures the list of trunk groups support on a vlan This method handles configuring the vlan trunk group value to default if the default flag is set to True. If the default flag is set to False, then this ...
python
{ "resource": "" }
q19823
EapiConnection.authentication
train
def authentication(self, username, password): """Configures the user authentication for eAPI This method configures the username and password combination to use for authenticating to eAPI. Args: username (str): The username to use to authenticate the eAPI co...
python
{ "resource": "" }
q19824
EapiConnection.request
train
def request(self, commands, encoding=None, reqid=None, **kwargs): """Generates an eAPI request object This method will take a list of EOS commands and generate a valid eAPI request object form them. The eAPI request object is then JSON encoding and returned to the caller. eAPI...
python
{ "resource": "" }
q19825
EapiConnection.send
train
def send(self, data): """Sends the eAPI request to the destination node This method is responsible for sending an eAPI request to the destination node and returning a response based on the eAPI response object. eAPI responds to request messages with either a success message or ...
python
{ "resource": "" }
q19826
EapiConnection._parse_error_message
train
def _parse_error_message(self, message): """Parses the eAPI failure response message This method accepts an eAPI failure message and parses the necesary parts in order to generate a CommandError. Args: message (str): The error message to parse Returns: ...
python
{ "resource": "" }
q19827
EapiConnection.execute
train
def execute(self, commands, encoding='json', **kwargs): """Executes the list of commands on the destination node This method takes a list of commands and sends them to the destination node, returning the results. The execute method handles putting the destination node in enable mode an...
python
{ "resource": "" }
q19828
Varp.get
train
def get(self): """Returns the current VARP configuration The Varp resource returns the following: * mac_address (str): The virtual-router mac address * interfaces (dict): A list of the interfaces that have a virtual-router address configured. ...
python
{ "resource": "" }
q19829
Varp.set_mac_address
train
def set_mac_address(self, mac_address=None, default=False, disable=False): """ Sets the virtual-router mac address This method will set the switch virtual-router mac address. If a virtual-router mac address already exists it will be overwritten. Args: mac_address (string): ...
python
{ "resource": "" }
q19830
BaseEntity.get_block
train
def get_block(self, parent, config='running_config'): """ Scans the config and returns a block of code Args: parent (str): The parent string to search the config for and return the block config (str): A text config string to be searched. Default i...
python
{ "resource": "" }
q19831
BaseEntity.configure
train
def configure(self, commands): """Sends the commands list to the node in config mode This method performs configuration the node using the array of commands specified. This method wraps the configuration commands in a try/except block and stores any exceptions in the error pro...
python
{ "resource": "" }
q19832
BaseEntity.command_builder
train
def command_builder(self, string, value=None, default=None, disable=None): """Builds a command with keywords Notes: Negating a command string by overriding 'value' with None or an assigned value that evalutates to false has been deprecated. Please use 'disabl...
python
{ "resource": "" }
q19833
BaseEntity.configure_interface
train
def configure_interface(self, name, commands): """Configures the specified interface with the commands Args: name (str): The interface name to configure commands: The commands to configure in the interface Returns: True if the commands completed successfully...
python
{ "resource": "" }
q19834
Ntp.get
train
def get(self): """Returns the current NTP configuration The Ntp resource returns the following: * source_interface (str): The interface port that specifies NTP server * servers (list): A list of the NTP servers that have been ...
python
{ "resource": "" }
q19835
Ntp.delete
train
def delete(self): """Delete the NTP source entry from the node. Returns: True if the operation succeeds, otherwise False. """ cmd = self.command_builder('ntp source', disable=True) return self.configure(cmd)
python
{ "resource": "" }
q19836
Ntp.default
train
def default(self): """Default the NTP source entry from the node. Returns: True if the operation succeeds, otherwise False. """ cmd = self.command_builder('ntp source', default=True) return self.configure(cmd)
python
{ "resource": "" }
q19837
Ntp.set_source_interface
train
def set_source_interface(self, name): """Assign the NTP source on the node Args: name (string): The interface port that specifies the NTP source. Returns: True if the operation succeeds, otherwise False. """ cmd = self.command_builder('ntp source', value...
python
{ "resource": "" }
q19838
Ntp.add_server
train
def add_server(self, name, prefer=False): """Add or update an NTP server entry to the node config Args: name (string): The IP address or FQDN of the NTP server. prefer (bool): Sets the NTP server entry as preferred if True. Returns: True if the operation suc...
python
{ "resource": "" }
q19839
Ntp.remove_server
train
def remove_server(self, name): """Remove an NTP server entry from the node config Args: name (string): The IP address or FQDN of the NTP server. Returns: True if the operation succeeds, otherwise False. """ cmd = self.command_builder('no ntp server', val...
python
{ "resource": "" }
q19840
Ntp.remove_all_servers
train
def remove_all_servers(self): """Remove all NTP server entries from the node config Returns: True if the operation succeeds, otherwise False. """ # 'no ntp' removes all server entries. # For command_builder, disable command 'ntp' gives the desired command cmd...
python
{ "resource": "" }
q19841
System.get
train
def get(self): """Returns the system configuration abstraction The System resource returns the following: * hostname (str): The hostname value Returns: dict: Represents the node's system configuration """ resource = dict() resource.update(self._...
python
{ "resource": "" }
q19842
System._parse_hostname
train
def _parse_hostname(self): """Parses the global config and returns the hostname value Returns: dict: The configured value for hostname. The returned dict object is intended to be merged into the resource dict """ value = 'localhost' match = re.search...
python
{ "resource": "" }
q19843
System._parse_banners
train
def _parse_banners(self): """Parses the global config and returns the value for both motd and login banners. Returns: dict: The configure value for modtd and login banners. If the banner is not set it will return a value of None for that key. T...
python
{ "resource": "" }
q19844
System.set_hostname
train
def set_hostname(self, value=None, default=False, disable=False): """Configures the global system hostname setting EosVersion: 4.13.7M Args: value (str): The hostname value default (bool): Controls use of the default keyword disable (bool): Contr...
python
{ "resource": "" }
q19845
System.set_iprouting
train
def set_iprouting(self, value=None, default=False, disable=False): """Configures the state of global ip routing EosVersion: 4.13.7M Args: value(bool): True if ip routing should be enabled or False if ip routing should be disabled default (boo...
python
{ "resource": "" }
q19846
System.set_banner
train
def set_banner(self, banner_type, value=None, default=False, disable=False): """Configures system banners Args: banner_type(str): banner to be changed (likely login or motd) value(str): value to set for the banner default (bool): Controls the use o...
python
{ "resource": "" }
q19847
Ipinterfaces.get
train
def get(self, name): """Returns the specific IP interface properties The Ipinterface resource returns the following: * name (str): The name of the interface * address (str): The IP address of the interface in the form of A.B.C.D/E * mtu (int): The co...
python
{ "resource": "" }
q19848
Ipinterfaces._parse_address
train
def _parse_address(self, config): """Parses the config block and returns the ip address value The provided configuration block is scaned and the configured value for the IP address is returned as a dict object. If the IP address value is not configured, then None is returned for the va...
python
{ "resource": "" }
q19849
Ipinterfaces._parse_mtu
train
def _parse_mtu(self, config): """Parses the config block and returns the configured IP MTU value The provided configuration block is scanned and the configured value for the IP MTU is returned as a dict object. The IP MTU value is expected to always be present in the provided config bl...
python
{ "resource": "" }
q19850
Ipinterfaces.set_address
train
def set_address(self, name, value=None, default=False, disable=False): """ Configures the interface IP address Args: name (string): The interface identifier to apply the interface config to value (string): The IP address and mask to set the interface to. ...
python
{ "resource": "" }
q19851
Ipinterfaces.set_mtu
train
def set_mtu(self, name, value=None, default=False, disable=False): """ Configures the interface IP MTU Args: name (string): The interface identifier to apply the interface config to value (integer): The MTU value to set the interface to. Accepted ...
python
{ "resource": "" }
q19852
Stp.get
train
def get(self): """Returns the spanning-tree configuration as a dict object The dictionary object represents the entire spanning-tree configuration derived from the nodes running config. This includes both globally configuration attributes as well as interfaces and instances. S...
python
{ "resource": "" }
q19853
Stp.set_mode
train
def set_mode(self, value=None, default=False, disable=False): """Configures the global spanning-tree mode Note: This configuration parameter is not defaultable Args: value (string): The value to configure the global spanning-tree mode of operation. Vali...
python
{ "resource": "" }
q19854
StpInterfaces.get
train
def get(self, name): """Returns the specified interfaces STP configuration resource The STP interface resource contains the following * name (str): The interface name * portfast (bool): The spanning-tree portfast admin state * bpduguard (bool): The spanning-tree bpd...
python
{ "resource": "" }
q19855
StpInterfaces.set_bpduguard
train
def set_bpduguard(self, name, value=False, default=False, disable=False): """Configures the bpduguard value for the specified interface Args: name (string): The interface identifier to configure. The name must be the full interface name (eg Ethernet1, not Et1) ...
python
{ "resource": "" }
q19856
process_modules
train
def process_modules(modules): '''Accepts dictionary of 'client' and 'api' modules and creates the corresponding files. ''' for mod in modules['client']: directory = '%s/client_modules' % HERE if not exists(directory): makedirs(directory) write_module_file(mod, directo...
python
{ "resource": "" }
q19857
create_index
train
def create_index(modules): '''This takes a dict of modules and created the RST index file.''' for key in modules.keys(): file_path = join(HERE, '%s_modules/_list_of_modules.rst' % key) list_file = open(file_path, 'w') # Write the generic header list_file.write('%s\n' % AUTOGEN) ...
python
{ "resource": "" }
q19858
write_module_file
train
def write_module_file(name, path, package): '''Creates an RST file for the module name passed in. It places it in the path defined ''' file_path = join(path, '%s.rst' % name) mod_file = open(file_path, 'w') mod_file.write('%s\n' % AUTOGEN) mod_file.write('%s\n' % name.title()) mod_file....
python
{ "resource": "" }
q19859
import_module
train
def import_module(name): """ Imports a module into the current runtime environment This function emulates the Python import system that allows for importing full path modules. It will break down the module and import each part (or skip if it is already loaded in cache). Args: name (str): ...
python
{ "resource": "" }
q19860
load_module
train
def load_module(name): """ Attempts to load a module into the current environment This function will load a module specified by name. The module name is first checked to see if it is already loaded and will return the module if it is. If the module hasn't been previously loaded it will attempt t...
python
{ "resource": "" }
q19861
debug
train
def debug(text): """Log a message to syslog and stderr Args: text (str): The string object to print """ frame = inspect.currentframe().f_back module = frame.f_globals['__name__'] func = frame.f_code.co_name msg = "%s.%s: %s" % (module, func, text) _LOGGER.debug(msg)
python
{ "resource": "" }
q19862
make_iterable
train
def make_iterable(value): """Converts the supplied value to a list object This function will inspect the supplied value and return an iterable in the form of a list. Args: value (object): An valid Python object Returns: An iterable object of type list """ if sys.version_in...
python
{ "resource": "" }
q19863
expand_range
train
def expand_range(arg, value_delimiter=',', range_delimiter='-'): """ Expands a delimited string of ranged integers into a list of strings :param arg: The string range to expand :param value_delimiter: The delimiter that separates values :param range_delimiter: The delimiter that signifies a range o...
python
{ "resource": "" }
q19864
collapse_range
train
def collapse_range(arg, value_delimiter=',', range_delimiter='-'): """ Collapses a list of values into a range set :param arg: The list of values to collapse :param value_delimiter: The delimiter that separates values :param range_delimiter: The delimiter that separates a value range :return: ...
python
{ "resource": "" }
q19865
Switchports.get
train
def get(self, name): """Returns a dictionary object that represents a switchport The Switchport resource returns the following: * name (str): The name of the interface * mode (str): The switchport mode value * access_vlan (str): The switchport access vlan value ...
python
{ "resource": "" }
q19866
Switchports._parse_mode
train
def _parse_mode(self, config): """Scans the specified config and parses the switchport mode value Args: config (str): The interface configuration block to scan Returns: dict: A Python dict object with the value of switchport mode. The dict returned is in...
python
{ "resource": "" }
q19867
Switchports._parse_trunk_groups
train
def _parse_trunk_groups(self, config): """Scans the specified config and parses the trunk group values Args: config (str): The interface configuraiton blcok Returns: A dict object with the trunk group values that can be merged into the resource dict ...
python
{ "resource": "" }
q19868
Switchports._parse_trunk_native_vlan
train
def _parse_trunk_native_vlan(self, config): """Scans the specified config and parse the trunk native vlan value Args: config (str): The interface configuration block to scan Returns: dict: A Python dict object with the value of switchport trunk native vl...
python
{ "resource": "" }
q19869
Switchports._parse_trunk_allowed_vlans
train
def _parse_trunk_allowed_vlans(self, config): """Scans the specified config and parse the trunk allowed vlans value Args: config (str): The interface configuration block to scan Returns: dict: A Python dict object with the value of switchport trunk allow...
python
{ "resource": "" }
q19870
Switchports.getall
train
def getall(self): """Returns a dict object to all Switchports This method will return all of the configured switchports as a dictionary object keyed by the interface identifier. Returns: A Python dictionary object that represents all configured switchports i...
python
{ "resource": "" }
q19871
Switchports.set_mode
train
def set_mode(self, name, value=None, default=False, disable=False): """Configures the switchport mode Args: name (string): The interface identifier to create the logical layer 2 switchport for. The name must be the full interface name and not an abbreviated ...
python
{ "resource": "" }
q19872
Switchports.set_trunk_groups
train
def set_trunk_groups(self, intf, value=None, default=False, disable=False): """Configures the switchport trunk group value Args: intf (str): The interface identifier to configure. value (str): The set of values to configure the trunk group default (bool): Configures ...
python
{ "resource": "" }
q19873
Switchports.add_trunk_group
train
def add_trunk_group(self, intf, value): """Adds the specified trunk group to the interface Args: intf (str): The interface name to apply the trunk group to value (str): The trunk group value to apply to the interface Returns: True if the operation as success...
python
{ "resource": "" }
q19874
Switchports.remove_trunk_group
train
def remove_trunk_group(self, intf, value): """Removes a specified trunk group to the interface Args: intf (str): The interface name to remove the trunk group from value (str): The trunk group value Returns: True if the operation as successfully applied other...
python
{ "resource": "" }
q19875
BaseInterface._parse_description
train
def _parse_description(self, config): """Scans the specified config block and returns the description value Args: config (str): The interface config block to scan Returns: dict: Returns a dict object with the description value retrieved from the config b...
python
{ "resource": "" }
q19876
BaseInterface.set_encapsulation
train
def set_encapsulation(self, name, vid, default=False, disable=False): """Configures the subinterface encapsulation value Args: name (string): The interface identifier. It must be a full interface name (ie Ethernet, not Et) vid (int): The vlan id number ...
python
{ "resource": "" }
q19877
BaseInterface.set_description
train
def set_description(self, name, value=None, default=False, disable=False): """Configures the interface description EosVersion: 4.13.7M Args: name (string): The interface identifier. It must be a full interface name (ie Ethernet, not Et) valu...
python
{ "resource": "" }
q19878
BaseInterface.set_shutdown
train
def set_shutdown(self, name, default=False, disable=True): """Configures the interface shutdown state Default configuration for set_shutdown is disable=True, meaning 'no shutdown'. Setting both default and disable to False will effectively enable shutdown on the interface. Args...
python
{ "resource": "" }
q19879
EthernetInterface._parse_flowcontrol_send
train
def _parse_flowcontrol_send(self, config): """Scans the config block and returns the flowcontrol send value Args: config (str): The interface config block to scan Returns: dict: Returns a dict object with the flowcontrol send value retrieved from the con...
python
{ "resource": "" }
q19880
EthernetInterface._parse_flowcontrol_receive
train
def _parse_flowcontrol_receive(self, config): """Scans the config block and returns the flowcontrol receive value Args: config (str): The interface config block to scan Returns: dict: Returns a dict object with the flowcontrol receive value retrieved fro...
python
{ "resource": "" }
q19881
EthernetInterface.set_flowcontrol_send
train
def set_flowcontrol_send(self, name, value=None, default=False, disable=False): """Configures the interface flowcontrol send value Args: name (string): The interface identifier. It must be a full interface name (ie Ethernet, not Et) ...
python
{ "resource": "" }
q19882
EthernetInterface.set_flowcontrol_receive
train
def set_flowcontrol_receive(self, name, value=None, default=False, disable=False): """Configures the interface flowcontrol receive value Args: name (string): The interface identifier. It must be a full interface name (ie Ethernet, not Et) ...
python
{ "resource": "" }
q19883
EthernetInterface.set_flowcontrol
train
def set_flowcontrol(self, name, direction, value=None, default=False, disable=False): """Configures the interface flowcontrol value Args: name (string): The interface identifier. It must be a full interface name (ie Ethernet, not Et) dir...
python
{ "resource": "" }
q19884
EthernetInterface.set_sflow
train
def set_sflow(self, name, value=None, default=False, disable=False): """Configures the sFlow state on the interface Args: name (string): The interface identifier. It must be a full interface name (ie Ethernet, not Et) value (boolean): True if sFlow should be en...
python
{ "resource": "" }
q19885
EthernetInterface.set_vrf
train
def set_vrf(self, name, vrf, default=False, disable=False): """Applies a VRF to the interface Note: VRF being applied to interface must already exist in switch config. Ethernet port must be in routed mode. This functionality can also be handled in the VRF api. ...
python
{ "resource": "" }
q19886
PortchannelInterface.get_lacp_mode
train
def get_lacp_mode(self, name): """Returns the LACP mode for the specified Port-Channel interface Args: name(str): The Port-Channel interface name to return the LACP mode for from the configuration Returns: The configured LACP mode for the interface. Val...
python
{ "resource": "" }
q19887
PortchannelInterface.get_members
train
def get_members(self, name): """Returns the member interfaces for the specified Port-Channel Args: name(str): The Port-channel interface name to return the member interfaces for Returns: A list of physical interface names that belong to the specified ...
python
{ "resource": "" }
q19888
PortchannelInterface.set_members
train
def set_members(self, name, members, mode=None): """Configures the array of member interfaces for the Port-Channel Args: name(str): The Port-Channel interface name to configure the member interfaces members(list): The list of Ethernet interfaces that should be ...
python
{ "resource": "" }
q19889
PortchannelInterface.set_lacp_mode
train
def set_lacp_mode(self, name, mode): """Configures the LACP mode of the member interfaces Args: name(str): The Port-Channel interface name to configure the LACP mode mode(str): The LACP mode to configure the member interfaces to. Valid values are...
python
{ "resource": "" }
q19890
PortchannelInterface.set_lacp_fallback
train
def set_lacp_fallback(self, name, mode=None): """Configures the Port-Channel lacp_fallback Args: name(str): The Port-Channel interface name mode(str): The Port-Channel LACP fallback setting Valid values are 'disabled', 'static', 'individual': * ...
python
{ "resource": "" }
q19891
PortchannelInterface.set_lacp_timeout
train
def set_lacp_timeout(self, name, value=None): """Configures the Port-Channel LACP fallback timeout The fallback timeout configures the period an interface in fallback mode remains in LACP mode without receiving a PDU. Args: name(str): The Port-Channel interface name ...
python
{ "resource": "" }
q19892
VxlanInterface._parse_source_interface
train
def _parse_source_interface(self, config): """ Parses the conf block and returns the vxlan source-interface value Parses the provided configuration block and returns the value of vxlan source-interface. If the value is not configured, this method will return DEFAULT_SRC_INTF instead. ...
python
{ "resource": "" }
q19893
VxlanInterface.add_vtep
train
def add_vtep(self, name, vtep, vlan=None): """Adds a new VTEP endpoint to the global or local flood list EosVersion: 4.13.7M Args: name (str): The name of the interface to configure vtep (str): The IP address of the remote VTEP endpoint to add vl...
python
{ "resource": "" }
q19894
VxlanInterface.remove_vtep
train
def remove_vtep(self, name, vtep, vlan=None): """Removes a VTEP endpoint from the global or local flood list EosVersion: 4.13.7M Args: name (str): The name of the interface to configure vtep (str): The IP address of the remote VTEP endpoint to add ...
python
{ "resource": "" }
q19895
VxlanInterface.update_vlan
train
def update_vlan(self, name, vid, vni): """Adds a new vlan to vni mapping for the interface EosVersion: 4.13.7M Args: vlan (str, int): The vlan id to map to the vni vni (str, int): The vni value to use Returns: True if the command complet...
python
{ "resource": "" }
q19896
Users.getall
train
def getall(self): """Returns all local users configuration as a resource dict Returns: dict: A dict of usernames with a nested resource dict object """ users = self.users_re.findall(self.config, re.M) resources = dict() for user in users: resource...
python
{ "resource": "" }
q19897
Users._parse_username
train
def _parse_username(self, config): """Scans the config block and returns the username as a dict Args: config (str): The config block to parse Returns: dict: A resource dict that is intended to be merged into the user resource """ (usernam...
python
{ "resource": "" }
q19898
Users.create
train
def create(self, name, nopassword=None, secret=None, encryption=None): """Creates a new user on the local system. Creating users requires either a secret (password) or the nopassword keyword to be specified. Args: name (str): The name of the user to craete nopa...
python
{ "resource": "" }
q19899
Users.create_with_secret
train
def create_with_secret(self, name, secret, encryption): """Creates a new user on the local node Args: name (str): The name of the user to craete secret (str): The secret (password) to assign to this user encryption (str): Specifies how the secret is encoded. Valid...
python
{ "resource": "" }