id
int32
0
252k
repo
stringlengths
7
55
path
stringlengths
4
127
func_name
stringlengths
1
88
original_string
stringlengths
75
19.8k
language
stringclasses
1 value
code
stringlengths
75
19.8k
code_tokens
list
docstring
stringlengths
3
17.3k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
87
242
54,600
lepture/terminal
terminal/color.py
colorize
def colorize(text, color, background=False): """ Colorize text with hex code. :param text: the text you want to paint :param color: a hex color or rgb color :param background: decide to colorize background :: colorize('hello', 'ff0000') colorize('hello', '#ff0000') col...
python
def colorize(text, color, background=False): """ Colorize text with hex code. :param text: the text you want to paint :param color: a hex color or rgb color :param background: decide to colorize background :: colorize('hello', 'ff0000') colorize('hello', '#ff0000') col...
[ "def", "colorize", "(", "text", ",", "color", ",", "background", "=", "False", ")", ":", "if", "color", "in", "_styles", ":", "c", "=", "Color", "(", "text", ")", "c", ".", "styles", "=", "[", "_styles", ".", "index", "(", "color", ")", "+", "1",...
Colorize text with hex code. :param text: the text you want to paint :param color: a hex color or rgb color :param background: decide to colorize background :: colorize('hello', 'ff0000') colorize('hello', '#ff0000') colorize('hello', (255, 0, 0))
[ "Colorize", "text", "with", "hex", "code", "." ]
5226d1cac53077f12624aa51f64de7b5b05d9cb8
https://github.com/lepture/terminal/blob/5226d1cac53077f12624aa51f64de7b5b05d9cb8/terminal/color.py#L224-L250
54,601
viniciuschiele/flask-io
flask_io/tracing.py
Tracer.match
def match(self, rule): """ Checks if the given rule matches with any filter added. :param rule: The Flask rule to be matched. :return: True if there is a filter that matches. """ if len(self.filters) == 0: return True for filter in self.filters: ...
python
def match(self, rule): """ Checks if the given rule matches with any filter added. :param rule: The Flask rule to be matched. :return: True if there is a filter that matches. """ if len(self.filters) == 0: return True for filter in self.filters: ...
[ "def", "match", "(", "self", ",", "rule", ")", ":", "if", "len", "(", "self", ".", "filters", ")", "==", "0", ":", "return", "True", "for", "filter", "in", "self", ".", "filters", ":", "if", "filter", ".", "match", "(", "rule", ")", ":", "return"...
Checks if the given rule matches with any filter added. :param rule: The Flask rule to be matched. :return: True if there is a filter that matches.
[ "Checks", "if", "the", "given", "rule", "matches", "with", "any", "filter", "added", "." ]
4e559419b3d8e6859f83fa16557b00542d5f3aa7
https://github.com/viniciuschiele/flask-io/blob/4e559419b3d8e6859f83fa16557b00542d5f3aa7/flask_io/tracing.py#L41-L54
54,602
viniciuschiele/flask-io
flask_io/tracing.py
Tracer.trace
def trace(self, request, response, error, latency): """ Collects the data from the given parameters and emit it. :param request: The Flask request. :param response: The Flask response. :param error: The error occurred if any. :param latency: The time elapsed to process t...
python
def trace(self, request, response, error, latency): """ Collects the data from the given parameters and emit it. :param request: The Flask request. :param response: The Flask response. :param error: The error occurred if any. :param latency: The time elapsed to process t...
[ "def", "trace", "(", "self", ",", "request", ",", "response", ",", "error", ",", "latency", ")", ":", "data", "=", "self", ".", "__collect_trace_data", "(", "request", ",", "response", ",", "error", ",", "latency", ")", "self", ".", "inspector", "(", "...
Collects the data from the given parameters and emit it. :param request: The Flask request. :param response: The Flask response. :param error: The error occurred if any. :param latency: The time elapsed to process the request.
[ "Collects", "the", "data", "from", "the", "given", "parameters", "and", "emit", "it", "." ]
4e559419b3d8e6859f83fa16557b00542d5f3aa7
https://github.com/viniciuschiele/flask-io/blob/4e559419b3d8e6859f83fa16557b00542d5f3aa7/flask_io/tracing.py#L56-L69
54,603
viniciuschiele/flask-io
flask_io/tracing.py
Tracer.__default_emit_trace
def __default_emit_trace(self, data): """ Writes the given tracing data to Python Logging. :param data: The tracing data to be written. """ message = format_trace_data(data) self.io.logger.info(message)
python
def __default_emit_trace(self, data): """ Writes the given tracing data to Python Logging. :param data: The tracing data to be written. """ message = format_trace_data(data) self.io.logger.info(message)
[ "def", "__default_emit_trace", "(", "self", ",", "data", ")", ":", "message", "=", "format_trace_data", "(", "data", ")", "self", ".", "io", ".", "logger", ".", "info", "(", "message", ")" ]
Writes the given tracing data to Python Logging. :param data: The tracing data to be written.
[ "Writes", "the", "given", "tracing", "data", "to", "Python", "Logging", "." ]
4e559419b3d8e6859f83fa16557b00542d5f3aa7
https://github.com/viniciuschiele/flask-io/blob/4e559419b3d8e6859f83fa16557b00542d5f3aa7/flask_io/tracing.py#L99-L106
54,604
viniciuschiele/flask-io
flask_io/tracing.py
TraceFilter.match
def match(self, rule): """ Checks if the given rule matches with the filter. :param rule: The Flask rule to be matched. :return: True if the filter matches. """ if self.methods: for method in self.methods: if method in rule.methods: ...
python
def match(self, rule): """ Checks if the given rule matches with the filter. :param rule: The Flask rule to be matched. :return: True if the filter matches. """ if self.methods: for method in self.methods: if method in rule.methods: ...
[ "def", "match", "(", "self", ",", "rule", ")", ":", "if", "self", ".", "methods", ":", "for", "method", "in", "self", ".", "methods", ":", "if", "method", "in", "rule", ".", "methods", ":", "return", "True", "if", "self", ".", "endpoints", ":", "fo...
Checks if the given rule matches with the filter. :param rule: The Flask rule to be matched. :return: True if the filter matches.
[ "Checks", "if", "the", "given", "rule", "matches", "with", "the", "filter", "." ]
4e559419b3d8e6859f83fa16557b00542d5f3aa7
https://github.com/viniciuschiele/flask-io/blob/4e559419b3d8e6859f83fa16557b00542d5f3aa7/flask_io/tracing.py#L125-L142
54,605
brocade/pynos
pynos/versions/base/snmp.py
SNMP.add_snmp_community
def add_snmp_community(self, **kwargs): """ Add SNMP Community to NOS device. Args: community (str): Community string to be added to device. callback (function): A function executed upon completion of the method. The only parameter passed to `callback` w...
python
def add_snmp_community(self, **kwargs): """ Add SNMP Community to NOS device. Args: community (str): Community string to be added to device. callback (function): A function executed upon completion of the method. The only parameter passed to `callback` w...
[ "def", "add_snmp_community", "(", "self", ",", "*", "*", "kwargs", ")", ":", "community", "=", "kwargs", ".", "pop", "(", "'community'", ")", "callback", "=", "kwargs", ".", "pop", "(", "'callback'", ",", "self", ".", "_callback", ")", "config", "=", "...
Add SNMP Community to NOS device. Args: community (str): Community string to be added to device. callback (function): A function executed upon completion of the method. The only parameter passed to `callback` will be the ``ElementTree`` `config`. ...
[ "Add", "SNMP", "Community", "to", "NOS", "device", "." ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/base/snmp.py#L38-L65
54,606
brocade/pynos
pynos/versions/base/snmp.py
SNMP.add_snmp_host
def add_snmp_host(self, **kwargs): """ Add SNMP host to NOS device. Args: host_info (tuple(str, str)): Tuple of host IP and port. community (str): Community string to be added to device. callback (function): A function executed upon completion of the ...
python
def add_snmp_host(self, **kwargs): """ Add SNMP host to NOS device. Args: host_info (tuple(str, str)): Tuple of host IP and port. community (str): Community string to be added to device. callback (function): A function executed upon completion of the ...
[ "def", "add_snmp_host", "(", "self", ",", "*", "*", "kwargs", ")", ":", "host_info", "=", "kwargs", ".", "pop", "(", "'host_info'", ")", "community", "=", "kwargs", ".", "pop", "(", "'community'", ")", "callback", "=", "kwargs", ".", "pop", "(", "'call...
Add SNMP host to NOS device. Args: host_info (tuple(str, str)): Tuple of host IP and port. community (str): Community string to be added to device. callback (function): A function executed upon completion of the method. The only parameter passed to `callback...
[ "Add", "SNMP", "host", "to", "NOS", "device", "." ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/base/snmp.py#L96-L128
54,607
rsenk330/pylibsass
pylibsass/sass.py
compile_str
def compile_str(contents): """Compiles a SASS string :param str contents: The SASS contents to compile :returns: The compiled CSS """ ctx = SASS_CLIB.sass_new_context() ctx.contents.source_string = c_char_p(contents) SASS_CLIB.compile(ctx) if ctx.contents.error_status: print(...
python
def compile_str(contents): """Compiles a SASS string :param str contents: The SASS contents to compile :returns: The compiled CSS """ ctx = SASS_CLIB.sass_new_context() ctx.contents.source_string = c_char_p(contents) SASS_CLIB.compile(ctx) if ctx.contents.error_status: print(...
[ "def", "compile_str", "(", "contents", ")", ":", "ctx", "=", "SASS_CLIB", ".", "sass_new_context", "(", ")", "ctx", ".", "contents", ".", "source_string", "=", "c_char_p", "(", "contents", ")", "SASS_CLIB", ".", "compile", "(", "ctx", ")", "if", "ctx", "...
Compiles a SASS string :param str contents: The SASS contents to compile :returns: The compiled CSS
[ "Compiles", "a", "SASS", "string" ]
f029490db8e4c2178c9564efeeace95bbf8cceff
https://github.com/rsenk330/pylibsass/blob/f029490db8e4c2178c9564efeeace95bbf8cceff/pylibsass/sass.py#L143-L158
54,608
rsenk330/pylibsass
pylibsass/sass.py
LibSass._load
def _load(self): """Loads the libsass library if it isn't already loaded.""" if self.clib is None: root_path = os.path.normpath(os.path.join(os.path.dirname(os.path.realpath(__file__ )), '..')) path1 = os.path.join(root_path, 'sass.so') path2 = os.path.join(root_path,...
python
def _load(self): """Loads the libsass library if it isn't already loaded.""" if self.clib is None: root_path = os.path.normpath(os.path.join(os.path.dirname(os.path.realpath(__file__ )), '..')) path1 = os.path.join(root_path, 'sass.so') path2 = os.path.join(root_path,...
[ "def", "_load", "(", "self", ")", ":", "if", "self", ".", "clib", "is", "None", ":", "root_path", "=", "os", ".", "path", ".", "normpath", "(", "os", ".", "path", ".", "join", "(", "os", ".", "path", ".", "dirname", "(", "os", ".", "path", ".",...
Loads the libsass library if it isn't already loaded.
[ "Loads", "the", "libsass", "library", "if", "it", "isn", "t", "already", "loaded", "." ]
f029490db8e4c2178c9564efeeace95bbf8cceff
https://github.com/rsenk330/pylibsass/blob/f029490db8e4c2178c9564efeeace95bbf8cceff/pylibsass/sass.py#L50-L75
54,609
brocade/pynos
pynos/versions/ver_7/ver_7_1_0/hw_vtep.py
hwvtep.hwvtep_set_overlaygw_type
def hwvtep_set_overlaygw_type(self, **kwargs): """ Set gateway type Args: name (str): gateway-name type (str): gateway-type callback (function): A function executed upon completion of the method. Returns: Return value of ...
python
def hwvtep_set_overlaygw_type(self, **kwargs): """ Set gateway type Args: name (str): gateway-name type (str): gateway-type callback (function): A function executed upon completion of the method. Returns: Return value of ...
[ "def", "hwvtep_set_overlaygw_type", "(", "self", ",", "*", "*", "kwargs", ")", ":", "name", "=", "kwargs", ".", "pop", "(", "'name'", ")", "type", "=", "kwargs", ".", "pop", "(", "'type'", ")", "ip_args", "=", "dict", "(", "name", "=", "name", ",", ...
Set gateway type Args: name (str): gateway-name type (str): gateway-type callback (function): A function executed upon completion of the method. Returns: Return value of `callback`. Raises: None
[ "Set", "gateway", "type" ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/ver_7/ver_7_1_0/hw_vtep.py#L64-L88
54,610
brocade/pynos
pynos/versions/ver_7/ver_7_1_0/hw_vtep.py
hwvtep.hwvtep_add_rbridgeid
def hwvtep_add_rbridgeid(self, **kwargs): """ Add a range of rbridge-ids Args: name (str): gateway-name vlan (str): rbridge-ids range callback (function): A function executed upon completion of the method. Returns: Return...
python
def hwvtep_add_rbridgeid(self, **kwargs): """ Add a range of rbridge-ids Args: name (str): gateway-name vlan (str): rbridge-ids range callback (function): A function executed upon completion of the method. Returns: Return...
[ "def", "hwvtep_add_rbridgeid", "(", "self", ",", "*", "*", "kwargs", ")", ":", "name", "=", "kwargs", ".", "pop", "(", "'name'", ")", "id", "=", "kwargs", ".", "pop", "(", "'rb_range'", ")", "ip_args", "=", "dict", "(", "name", "=", "name", ",", "r...
Add a range of rbridge-ids Args: name (str): gateway-name vlan (str): rbridge-ids range callback (function): A function executed upon completion of the method. Returns: Return value of `callback`. Raises: None
[ "Add", "a", "range", "of", "rbridge", "-", "ids" ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/ver_7/ver_7_1_0/hw_vtep.py#L90-L114
54,611
brocade/pynos
pynos/versions/ver_7/ver_7_1_0/hw_vtep.py
hwvtep.hwvtep_add_loopback_interface
def hwvtep_add_loopback_interface(self, **kwargs): """ Add loopback interface to the overlay-gateway Args: name (str): gateway-name int_id (int): loopback inteface id callback (function): A function executed upon completion of the method. ...
python
def hwvtep_add_loopback_interface(self, **kwargs): """ Add loopback interface to the overlay-gateway Args: name (str): gateway-name int_id (int): loopback inteface id callback (function): A function executed upon completion of the method. ...
[ "def", "hwvtep_add_loopback_interface", "(", "self", ",", "*", "*", "kwargs", ")", ":", "name", "=", "kwargs", ".", "pop", "(", "'name'", ")", "id", "=", "kwargs", ".", "pop", "(", "'int_id'", ")", "ip_args", "=", "dict", "(", "name", "=", "name", ",...
Add loopback interface to the overlay-gateway Args: name (str): gateway-name int_id (int): loopback inteface id callback (function): A function executed upon completion of the method. Returns: Return value of `callback`. Raises:...
[ "Add", "loopback", "interface", "to", "the", "overlay", "-", "gateway" ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/ver_7/ver_7_1_0/hw_vtep.py#L116-L140
54,612
brocade/pynos
pynos/versions/ver_7/ver_7_1_0/hw_vtep.py
hwvtep.hwvtep_activate_hwvtep
def hwvtep_activate_hwvtep(self, **kwargs): """ Activate the hwvtep Args: name (str): overlay_gateway name callback (function): A function executed upon completion of the method. Returns: Return value of `callback`. Raises: ...
python
def hwvtep_activate_hwvtep(self, **kwargs): """ Activate the hwvtep Args: name (str): overlay_gateway name callback (function): A function executed upon completion of the method. Returns: Return value of `callback`. Raises: ...
[ "def", "hwvtep_activate_hwvtep", "(", "self", ",", "*", "*", "kwargs", ")", ":", "name", "=", "kwargs", ".", "pop", "(", "'name'", ")", "name_args", "=", "dict", "(", "name", "=", "name", ")", "method_name", "=", "'overlay_gateway_activate'", "method_class",...
Activate the hwvtep Args: name (str): overlay_gateway name callback (function): A function executed upon completion of the method. Returns: Return value of `callback`. Raises: None
[ "Activate", "the", "hwvtep" ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/ver_7/ver_7_1_0/hw_vtep.py#L176-L198
54,613
brocade/pynos
pynos/versions/ver_7/ver_7_1_0/hw_vtep.py
hwvtep.hwvtep_attach_vlan_vid
def hwvtep_attach_vlan_vid(self, **kwargs): """ Identifies exported VLANs in VXLAN gateway configurations. Args: name (str): overlay_gateway name vlan(str): vlan_id range callback (function): A function executed upon completion of the method...
python
def hwvtep_attach_vlan_vid(self, **kwargs): """ Identifies exported VLANs in VXLAN gateway configurations. Args: name (str): overlay_gateway name vlan(str): vlan_id range callback (function): A function executed upon completion of the method...
[ "def", "hwvtep_attach_vlan_vid", "(", "self", ",", "*", "*", "kwargs", ")", ":", "name", "=", "kwargs", ".", "pop", "(", "'name'", ")", "mac", "=", "kwargs", ".", "pop", "(", "'mac'", ")", "vlan", "=", "kwargs", ".", "pop", "(", "'vlan'", ")", "nam...
Identifies exported VLANs in VXLAN gateway configurations. Args: name (str): overlay_gateway name vlan(str): vlan_id range callback (function): A function executed upon completion of the method. Returns: Return value of `callback`. ...
[ "Identifies", "exported", "VLANs", "in", "VXLAN", "gateway", "configurations", "." ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/ver_7/ver_7_1_0/hw_vtep.py#L200-L225
54,614
lepture/terminal
terminal/log.py
Logger.message
def message(self, level, *args): """ Format the message of the logger. You can rewrite this method to format your own message:: class MyLogger(Logger): def message(self, level, *args): msg = ' '.join(args) if level == 'error...
python
def message(self, level, *args): """ Format the message of the logger. You can rewrite this method to format your own message:: class MyLogger(Logger): def message(self, level, *args): msg = ' '.join(args) if level == 'error...
[ "def", "message", "(", "self", ",", "level", ",", "*", "args", ")", ":", "msg", "=", "' '", ".", "join", "(", "(", "str", "(", "o", ")", "for", "o", "in", "args", ")", ")", "if", "level", "not", "in", "(", "'start'", ",", "'end'", ",", "'debu...
Format the message of the logger. You can rewrite this method to format your own message:: class MyLogger(Logger): def message(self, level, *args): msg = ' '.join(args) if level == 'error': return terminal.red(msg) ...
[ "Format", "the", "message", "of", "the", "logger", "." ]
5226d1cac53077f12624aa51f64de7b5b05d9cb8
https://github.com/lepture/terminal/blob/5226d1cac53077f12624aa51f64de7b5b05d9cb8/terminal/log.py#L66-L85
54,615
lepture/terminal
terminal/log.py
Logger.verbose
def verbose(self): """ Make it the verbose log. A verbose log can be only shown when user want to see more logs. It works as:: log.verbose.warn('this is a verbose warn') log.verbose.info('this is a verbose info') """ log = copy.copy(self) ...
python
def verbose(self): """ Make it the verbose log. A verbose log can be only shown when user want to see more logs. It works as:: log.verbose.warn('this is a verbose warn') log.verbose.info('this is a verbose info') """ log = copy.copy(self) ...
[ "def", "verbose", "(", "self", ")", ":", "log", "=", "copy", ".", "copy", "(", "self", ")", "log", ".", "_is_verbose", "=", "True", "return", "log" ]
Make it the verbose log. A verbose log can be only shown when user want to see more logs. It works as:: log.verbose.warn('this is a verbose warn') log.verbose.info('this is a verbose info')
[ "Make", "it", "the", "verbose", "log", "." ]
5226d1cac53077f12624aa51f64de7b5b05d9cb8
https://github.com/lepture/terminal/blob/5226d1cac53077f12624aa51f64de7b5b05d9cb8/terminal/log.py#L100-L113
54,616
lepture/terminal
terminal/log.py
Logger.start
def start(self, *args): """ Start a nested log. """ if self._is_verbose: # verbose log has no start method return self self.writeln('start', *args) self._indent += 1 return self
python
def start(self, *args): """ Start a nested log. """ if self._is_verbose: # verbose log has no start method return self self.writeln('start', *args) self._indent += 1 return self
[ "def", "start", "(", "self", ",", "*", "args", ")", ":", "if", "self", ".", "_is_verbose", ":", "# verbose log has no start method", "return", "self", "self", ".", "writeln", "(", "'start'", ",", "*", "args", ")", "self", ".", "_indent", "+=", "1", "retu...
Start a nested log.
[ "Start", "a", "nested", "log", "." ]
5226d1cac53077f12624aa51f64de7b5b05d9cb8
https://github.com/lepture/terminal/blob/5226d1cac53077f12624aa51f64de7b5b05d9cb8/terminal/log.py#L115-L126
54,617
lepture/terminal
terminal/log.py
Logger.end
def end(self, *args): """ End a nested log. """ if self._is_verbose: # verbose log has no end method return self if not args: self._indent -= 1 return self self.writeln('end', *args) self._indent -= 1 retur...
python
def end(self, *args): """ End a nested log. """ if self._is_verbose: # verbose log has no end method return self if not args: self._indent -= 1 return self self.writeln('end', *args) self._indent -= 1 retur...
[ "def", "end", "(", "self", ",", "*", "args", ")", ":", "if", "self", ".", "_is_verbose", ":", "# verbose log has no end method", "return", "self", "if", "not", "args", ":", "self", ".", "_indent", "-=", "1", "return", "self", "self", ".", "writeln", "(",...
End a nested log.
[ "End", "a", "nested", "log", "." ]
5226d1cac53077f12624aa51f64de7b5b05d9cb8
https://github.com/lepture/terminal/blob/5226d1cac53077f12624aa51f64de7b5b05d9cb8/terminal/log.py#L128-L142
54,618
Min-ops/cruddy
cruddy/lambdaclient.py
LambdaClient.call_operation
def call_operation(self, operation, **kwargs): """ A generic method to call any operation supported by the Lambda handler """ data = {'operation': operation} data.update(kwargs) return self.invoke(data)
python
def call_operation(self, operation, **kwargs): """ A generic method to call any operation supported by the Lambda handler """ data = {'operation': operation} data.update(kwargs) return self.invoke(data)
[ "def", "call_operation", "(", "self", ",", "operation", ",", "*", "*", "kwargs", ")", ":", "data", "=", "{", "'operation'", ":", "operation", "}", "data", ".", "update", "(", "kwargs", ")", "return", "self", ".", "invoke", "(", "data", ")" ]
A generic method to call any operation supported by the Lambda handler
[ "A", "generic", "method", "to", "call", "any", "operation", "supported", "by", "the", "Lambda", "handler" ]
b9ba3dda1757e1075bc1c62a6f43473eea27de41
https://github.com/Min-ops/cruddy/blob/b9ba3dda1757e1075bc1c62a6f43473eea27de41/cruddy/lambdaclient.py#L62-L68
54,619
kratsg/ironman
ironman/server.py
UDP.datagramReceived
def datagramReceived(self, datagram, address): """ After receiving a datagram, generate the deferreds and add myself to it. """ def write(result): print "Writing %r" % result self.transport.write(result, address) d = self.d() #d.addCallbacks(write...
python
def datagramReceived(self, datagram, address): """ After receiving a datagram, generate the deferreds and add myself to it. """ def write(result): print "Writing %r" % result self.transport.write(result, address) d = self.d() #d.addCallbacks(write...
[ "def", "datagramReceived", "(", "self", ",", "datagram", ",", "address", ")", ":", "def", "write", "(", "result", ")", ":", "print", "\"Writing %r\"", "%", "result", "self", ".", "transport", ".", "write", "(", "result", ",", "address", ")", "d", "=", ...
After receiving a datagram, generate the deferreds and add myself to it.
[ "After", "receiving", "a", "datagram", "generate", "the", "deferreds", "and", "add", "myself", "to", "it", "." ]
7d67b79970870e7e5520181d2afa3f423e46eb3a
https://github.com/kratsg/ironman/blob/7d67b79970870e7e5520181d2afa3f423e46eb3a/ironman/server.py#L9-L20
54,620
kratsg/ironman
ironman/server.py
TCP.dataReceived
def dataReceived(self, data): """ After receiving the data, generate the deferreds and add myself to it. """ def write(result): print "Writing %r" % result self.transport.write(result) d = self.d() d.addCallback(write) # errors are silently ignore...
python
def dataReceived(self, data): """ After receiving the data, generate the deferreds and add myself to it. """ def write(result): print "Writing %r" % result self.transport.write(result) d = self.d() d.addCallback(write) # errors are silently ignore...
[ "def", "dataReceived", "(", "self", ",", "data", ")", ":", "def", "write", "(", "result", ")", ":", "print", "\"Writing %r\"", "%", "result", "self", ".", "transport", ".", "write", "(", "result", ")", "d", "=", "self", ".", "d", "(", ")", "d", "."...
After receiving the data, generate the deferreds and add myself to it.
[ "After", "receiving", "the", "data", "generate", "the", "deferreds", "and", "add", "myself", "to", "it", "." ]
7d67b79970870e7e5520181d2afa3f423e46eb3a
https://github.com/kratsg/ironman/blob/7d67b79970870e7e5520181d2afa3f423e46eb3a/ironman/server.py#L26-L35
54,621
brocade/pynos
pynos/versions/ver_7/ver_7_0_0/interface.py
Interface.ip_unnumbered
def ip_unnumbered(self, **kwargs): """Configure an unnumbered interface. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet etc). name (str): Name of interface id. (For interface: 1/0/5, 1/0/10 etc). delete...
python
def ip_unnumbered(self, **kwargs): """Configure an unnumbered interface. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet etc). name (str): Name of interface id. (For interface: 1/0/5, 1/0/10 etc). delete...
[ "def", "ip_unnumbered", "(", "self", ",", "*", "*", "kwargs", ")", ":", "kwargs", "[", "'ip_donor_interface_name'", "]", "=", "kwargs", ".", "pop", "(", "'donor_name'", ")", "kwargs", "[", "'ip_donor_interface_type'", "]", "=", "kwargs", ".", "pop", "(", "...
Configure an unnumbered interface. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet etc). name (str): Name of interface id. (For interface: 1/0/5, 1/0/10 etc). delete (bool): True is the IP address is added and F...
[ "Configure", "an", "unnumbered", "interface", "." ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/ver_7/ver_7_0_0/interface.py#L45-L118
54,622
brocade/pynos
pynos/versions/ver_7/ver_7_0_0/interface.py
Interface._ip_unnumbered_name
def _ip_unnumbered_name(self, **kwargs): """Return the `ip unnumbered` donor name XML. You should not use this method. You probably want `Interface.ip_unnumbered`. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet etc). ...
python
def _ip_unnumbered_name(self, **kwargs): """Return the `ip unnumbered` donor name XML. You should not use this method. You probably want `Interface.ip_unnumbered`. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet etc). ...
[ "def", "_ip_unnumbered_name", "(", "self", ",", "*", "*", "kwargs", ")", ":", "method_name", "=", "'interface_%s_ip_ip_config_unnumbered_ip_donor_'", "'interface_name'", "%", "kwargs", "[", "'int_type'", "]", "ip_unnumbered_name", "=", "getattr", "(", "self", ".", "...
Return the `ip unnumbered` donor name XML. You should not use this method. You probably want `Interface.ip_unnumbered`. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet etc). delete (bool): Remove the configuration if ``True...
[ "Return", "the", "ip", "unnumbered", "donor", "name", "XML", "." ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/ver_7/ver_7_0_0/interface.py#L120-L146
54,623
brocade/pynos
pynos/versions/ver_7/ver_7_0_0/interface.py
Interface._ip_unnumbered_type
def _ip_unnumbered_type(self, **kwargs): """Return the `ip unnumbered` donor type XML. You should not use this method. You probably want `Interface.ip_unnumbered`. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet etc). ...
python
def _ip_unnumbered_type(self, **kwargs): """Return the `ip unnumbered` donor type XML. You should not use this method. You probably want `Interface.ip_unnumbered`. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet etc). ...
[ "def", "_ip_unnumbered_type", "(", "self", ",", "*", "*", "kwargs", ")", ":", "method_name", "=", "'interface_%s_ip_ip_config_unnumbered_ip_donor_'", "'interface_type'", "%", "kwargs", "[", "'int_type'", "]", "ip_unnumbered_type", "=", "getattr", "(", "self", ".", "...
Return the `ip unnumbered` donor type XML. You should not use this method. You probably want `Interface.ip_unnumbered`. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet etc). delete (bool): Remove the configuration if ``True...
[ "Return", "the", "ip", "unnumbered", "donor", "type", "XML", "." ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/ver_7/ver_7_0_0/interface.py#L148-L173
54,624
brocade/pynos
pynos/versions/ver_7/ver_7_0_0/interface.py
Interface._get_ip_unnumbered
def _get_ip_unnumbered(self, unnumbered_type, unnumbered_name): """Get and merge the `ip unnumbered` config from an interface. You should not use this method. You probably want `Interface.ip_unnumbered`. Args: unnumbered_type: XML document with the XML to get the donor type...
python
def _get_ip_unnumbered(self, unnumbered_type, unnumbered_name): """Get and merge the `ip unnumbered` config from an interface. You should not use this method. You probably want `Interface.ip_unnumbered`. Args: unnumbered_type: XML document with the XML to get the donor type...
[ "def", "_get_ip_unnumbered", "(", "self", ",", "unnumbered_type", ",", "unnumbered_name", ")", ":", "unnumbered_type", "=", "self", ".", "_callback", "(", "unnumbered_type", ",", "handler", "=", "'get_config'", ")", "unnumbered_name", "=", "self", ".", "_callback"...
Get and merge the `ip unnumbered` config from an interface. You should not use this method. You probably want `Interface.ip_unnumbered`. Args: unnumbered_type: XML document with the XML to get the donor type. unnumbered_name: XML document with the XML to get the donor n...
[ "Get", "and", "merge", "the", "ip", "unnumbered", "config", "from", "an", "interface", "." ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/ver_7/ver_7_0_0/interface.py#L175-L195
54,625
brocade/pynos
pynos/versions/ver_7/ver_7_0_0/interface.py
Interface.anycast_mac
def anycast_mac(self, **kwargs): """Configure an anycast MAC address. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet etc). mac (str): MAC address to configure (example: '0011.2233.4455'). delete (bool)...
python
def anycast_mac(self, **kwargs): """Configure an anycast MAC address. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet etc). mac (str): MAC address to configure (example: '0011.2233.4455'). delete (bool)...
[ "def", "anycast_mac", "(", "self", ",", "*", "*", "kwargs", ")", ":", "callback", "=", "kwargs", ".", "pop", "(", "'callback'", ",", "self", ".", "_callback", ")", "anycast_mac", "=", "getattr", "(", "self", ".", "_rbridge", ",", "'rbridge_id_ip_static_ag_...
Configure an anycast MAC address. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet etc). mac (str): MAC address to configure (example: '0011.2233.4455'). delete (bool): True is the IP address is added and False ...
[ "Configure", "an", "anycast", "MAC", "address", "." ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/ver_7/ver_7_0_0/interface.py#L197-L255
54,626
brocade/pynos
pynos/versions/ver_7/ver_7_0_0/interface.py
Interface.bfd
def bfd(self, **kwargs): """Configure BFD for Interface. Args: name (str): name of the interface to configure (230/0/1 etc) int_type (str): interface type (gigabitethernet etc) tx (str): BFD transmit interval in milliseconds (300, 500, etc) rx (str): BFD ...
python
def bfd(self, **kwargs): """Configure BFD for Interface. Args: name (str): name of the interface to configure (230/0/1 etc) int_type (str): interface type (gigabitethernet etc) tx (str): BFD transmit interval in milliseconds (300, 500, etc) rx (str): BFD ...
[ "def", "bfd", "(", "self", ",", "*", "*", "kwargs", ")", ":", "int_type", "=", "str", "(", "kwargs", ".", "pop", "(", "'int_type'", ")", ".", "lower", "(", ")", ")", "kwargs", "[", "'name'", "]", "=", "str", "(", "kwargs", ".", "pop", "(", "'na...
Configure BFD for Interface. Args: name (str): name of the interface to configure (230/0/1 etc) int_type (str): interface type (gigabitethernet etc) tx (str): BFD transmit interval in milliseconds (300, 500, etc) rx (str): BFD receive interval in milliseconds (30...
[ "Configure", "BFD", "for", "Interface", "." ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/ver_7/ver_7_0_0/interface.py#L257-L316
54,627
brocade/pynos
pynos/versions/ver_7/ver_7_0_0/interface.py
Interface.conversational_arp
def conversational_arp(self, **kwargs): """Enable conversational arp learning on VDX switches Args: rbridge_id (str): rbridge-id for device. get (bool): Get config instead of editing config. (True, False) delete (bool): True, delete the conversation arp learning. ...
python
def conversational_arp(self, **kwargs): """Enable conversational arp learning on VDX switches Args: rbridge_id (str): rbridge-id for device. get (bool): Get config instead of editing config. (True, False) delete (bool): True, delete the conversation arp learning. ...
[ "def", "conversational_arp", "(", "self", ",", "*", "*", "kwargs", ")", ":", "rbridge_id", "=", "kwargs", ".", "pop", "(", "'rbridge_id'", ",", "'1'", ")", "callback", "=", "kwargs", ".", "pop", "(", "'callback'", ",", "self", ".", "_callback", ")", "a...
Enable conversational arp learning on VDX switches Args: rbridge_id (str): rbridge-id for device. get (bool): Get config instead of editing config. (True, False) delete (bool): True, delete the conversation arp learning. (True, False) ca...
[ "Enable", "conversational", "arp", "learning", "on", "VDX", "switches" ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/ver_7/ver_7_0_0/interface.py#L752-L797
54,628
brocade/pynos
pynos/versions/ver_7/ver_7_0_0/interface.py
Interface.ip_anycast_gateway
def ip_anycast_gateway(self, **kwargs): """ Add anycast gateway under interface ve. Args: int_type: L3 interface type on which the anycast ip needs to be configured. name:L3 interface name on which the anycast ip needs to be configured. ...
python
def ip_anycast_gateway(self, **kwargs): """ Add anycast gateway under interface ve. Args: int_type: L3 interface type on which the anycast ip needs to be configured. name:L3 interface name on which the anycast ip needs to be configured. ...
[ "def", "ip_anycast_gateway", "(", "self", ",", "*", "*", "kwargs", ")", ":", "int_type", "=", "kwargs", ".", "pop", "(", "'int_type'", ")", ".", "lower", "(", ")", "name", "=", "kwargs", ".", "pop", "(", "'name'", ")", "anycast_ip", "=", "kwargs", "....
Add anycast gateway under interface ve. Args: int_type: L3 interface type on which the anycast ip needs to be configured. name:L3 interface name on which the anycast ip needs to be configured. anycast_ip: Anycast ip which the L3 interface ...
[ "Add", "anycast", "gateway", "under", "interface", "ve", "." ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/ver_7/ver_7_0_0/interface.py#L799-L914
54,629
brocade/pynos
pynos/versions/ver_7/ver_7_0_0/interface.py
Interface.arp_suppression
def arp_suppression(self, **kwargs): """ Enable Arp Suppression on a Vlan. Args: name:Vlan name on which the Arp suppression needs to be enabled. enable (bool): If arp suppression should be enabled or disabled.Default:``True``. get (bool) : Ge...
python
def arp_suppression(self, **kwargs): """ Enable Arp Suppression on a Vlan. Args: name:Vlan name on which the Arp suppression needs to be enabled. enable (bool): If arp suppression should be enabled or disabled.Default:``True``. get (bool) : Ge...
[ "def", "arp_suppression", "(", "self", ",", "*", "*", "kwargs", ")", ":", "name", "=", "kwargs", ".", "pop", "(", "'name'", ")", "enable", "=", "kwargs", ".", "pop", "(", "'enable'", ",", "True", ")", "get", "=", "kwargs", ".", "pop", "(", "'get'",...
Enable Arp Suppression on a Vlan. Args: name:Vlan name on which the Arp suppression needs to be enabled. enable (bool): If arp suppression should be enabled or disabled.Default:``True``. get (bool) : Get config instead of editing config. (True, False) ...
[ "Enable", "Arp", "Suppression", "on", "a", "Vlan", "." ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/ver_7/ver_7_0_0/interface.py#L916-L969
54,630
brocade/pynos
pynos/versions/ver_7/ver_7_0_0/interface.py
Interface.evpn_instance_mac_timer_max_count
def evpn_instance_mac_timer_max_count(self, **kwargs): """ Add "Duplicate MAC max count" under evpn instance. Args: evpn_instance_name: Instance name for evpn max_count: Duplicate MAC max count. enable (bool): If target community needs to be enabled ...
python
def evpn_instance_mac_timer_max_count(self, **kwargs): """ Add "Duplicate MAC max count" under evpn instance. Args: evpn_instance_name: Instance name for evpn max_count: Duplicate MAC max count. enable (bool): If target community needs to be enabled ...
[ "def", "evpn_instance_mac_timer_max_count", "(", "self", ",", "*", "*", "kwargs", ")", ":", "evpn_instance_name", "=", "kwargs", ".", "pop", "(", "'evpn_instance_name'", ",", "''", ")", "max_count", "=", "kwargs", ".", "pop", "(", "'max_count'", ",", "'5'", ...
Add "Duplicate MAC max count" under evpn instance. Args: evpn_instance_name: Instance name for evpn max_count: Duplicate MAC max count. enable (bool): If target community needs to be enabled or disabled.Default:``True``. get (bool) : Get config in...
[ "Add", "Duplicate", "MAC", "max", "count", "under", "evpn", "instance", "." ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/ver_7/ver_7_0_0/interface.py#L1174-L1244
54,631
brocade/pynos
pynos/versions/ver_7/ver_7_0_0/interface.py
Interface.evpn_instance_rd_auto
def evpn_instance_rd_auto(self, **kwargs): """ Add RD auto under EVPN instance. Args: rbridge_id: Rbrdige id . instance_name: EVPN instance name. Returns: True if command completes successfully or False if not. Raises: None ...
python
def evpn_instance_rd_auto(self, **kwargs): """ Add RD auto under EVPN instance. Args: rbridge_id: Rbrdige id . instance_name: EVPN instance name. Returns: True if command completes successfully or False if not. Raises: None ...
[ "def", "evpn_instance_rd_auto", "(", "self", ",", "*", "*", "kwargs", ")", ":", "config", "=", "ET", ".", "Element", "(", "\"config\"", ")", "rbridge_id", "=", "ET", ".", "SubElement", "(", "config", ",", "\"rbridge-id\"", ",", "xmlns", "=", "\"urn:brocade...
Add RD auto under EVPN instance. Args: rbridge_id: Rbrdige id . instance_name: EVPN instance name. Returns: True if command completes successfully or False if not. Raises: None Examples: >>> import pynos.device >>...
[ "Add", "RD", "auto", "under", "EVPN", "instance", "." ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/ver_7/ver_7_0_0/interface.py#L1246-L1286
54,632
brocade/pynos
pynos/versions/ver_7/ver_7_1_0/nsx.py
Nsx.set_nsxcontroller_ip
def set_nsxcontroller_ip(self, **kwargs): """ Set nsx-controller IP Args: IP (str): IPV4 address. callback (function): A function executed upon completion of the method. Returns: Return value of `callback`. Raises: ...
python
def set_nsxcontroller_ip(self, **kwargs): """ Set nsx-controller IP Args: IP (str): IPV4 address. callback (function): A function executed upon completion of the method. Returns: Return value of `callback`. Raises: ...
[ "def", "set_nsxcontroller_ip", "(", "self", ",", "*", "*", "kwargs", ")", ":", "name", "=", "kwargs", ".", "pop", "(", "'name'", ")", "ip_addr", "=", "str", "(", "(", "kwargs", ".", "pop", "(", "'ip_addr'", ",", "None", ")", ")", ")", "nsxipaddress",...
Set nsx-controller IP Args: IP (str): IPV4 address. callback (function): A function executed upon completion of the method. Returns: Return value of `callback`. Raises: None
[ "Set", "nsx", "-", "controller", "IP" ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/ver_7/ver_7_1_0/nsx.py#L69-L96
54,633
brocade/pynos
pynos/versions/ver_7/ver_7_1_0/nsx.py
Nsx.activate_nsxcontroller
def activate_nsxcontroller(self, **kwargs): """ Activate NSX Controller Args: name (str): nsxcontroller name callback (function): A function executed upon completion of the method. Returns: Return value of `callback`. Raises:...
python
def activate_nsxcontroller(self, **kwargs): """ Activate NSX Controller Args: name (str): nsxcontroller name callback (function): A function executed upon completion of the method. Returns: Return value of `callback`. Raises:...
[ "def", "activate_nsxcontroller", "(", "self", ",", "*", "*", "kwargs", ")", ":", "name", "=", "kwargs", ".", "pop", "(", "'name'", ")", "name_args", "=", "dict", "(", "name", "=", "name", ")", "method_name", "=", "'nsx_controller_activate'", "method_class", ...
Activate NSX Controller Args: name (str): nsxcontroller name callback (function): A function executed upon completion of the method. Returns: Return value of `callback`. Raises: None
[ "Activate", "NSX", "Controller" ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/ver_7/ver_7_1_0/nsx.py#L98-L120
54,634
brocade/pynos
pynos/versions/ver_7/ver_7_1_0/nsx.py
Nsx.set_nsxcontroller_port
def set_nsxcontroller_port(self, **kwargs): """ Set Nsx Controller pot on the switch Args: port (int): 1 to 65535. callback (function): A function executed upon completion of the method. Returns: Return value of `callback`. R...
python
def set_nsxcontroller_port(self, **kwargs): """ Set Nsx Controller pot on the switch Args: port (int): 1 to 65535. callback (function): A function executed upon completion of the method. Returns: Return value of `callback`. R...
[ "def", "set_nsxcontroller_port", "(", "self", ",", "*", "*", "kwargs", ")", ":", "name", "=", "kwargs", ".", "pop", "(", "'name'", ")", "port", "=", "str", "(", "kwargs", ".", "pop", "(", "'port'", ")", ")", "port_args", "=", "dict", "(", "name", "...
Set Nsx Controller pot on the switch Args: port (int): 1 to 65535. callback (function): A function executed upon completion of the method. Returns: Return value of `callback`. Raises: None
[ "Set", "Nsx", "Controller", "pot", "on", "the", "switch" ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/ver_7/ver_7_1_0/nsx.py#L122-L145
54,635
inveniosoftware/invenio-celery
invenio_celery/ext.py
celery_module_imports
def celery_module_imports(sender, signal=None, **kwargs): """Load shared celery tasks.""" app = getattr(sender, 'flask_app', None) if app: app.extensions['invenio-celery'].load_entry_points()
python
def celery_module_imports(sender, signal=None, **kwargs): """Load shared celery tasks.""" app = getattr(sender, 'flask_app', None) if app: app.extensions['invenio-celery'].load_entry_points()
[ "def", "celery_module_imports", "(", "sender", ",", "signal", "=", "None", ",", "*", "*", "kwargs", ")", ":", "app", "=", "getattr", "(", "sender", ",", "'flask_app'", ",", "None", ")", "if", "app", ":", "app", ".", "extensions", "[", "'invenio-celery'",...
Load shared celery tasks.
[ "Load", "shared", "celery", "tasks", "." ]
4d075d5dbdb7ee849abdb0c8d7e7a49cb7973474
https://github.com/inveniosoftware/invenio-celery/blob/4d075d5dbdb7ee849abdb0c8d7e7a49cb7973474/invenio_celery/ext.py#L106-L110
54,636
inveniosoftware/invenio-celery
invenio_celery/ext.py
InvenioCelery.load_entry_points
def load_entry_points(self): """Load tasks from entry points.""" if self.entry_point_group: task_packages = {} for item in pkg_resources.iter_entry_points( group=self.entry_point_group): # Celery 4.2 requires autodiscover to be called with ...
python
def load_entry_points(self): """Load tasks from entry points.""" if self.entry_point_group: task_packages = {} for item in pkg_resources.iter_entry_points( group=self.entry_point_group): # Celery 4.2 requires autodiscover to be called with ...
[ "def", "load_entry_points", "(", "self", ")", ":", "if", "self", ".", "entry_point_group", ":", "task_packages", "=", "{", "}", "for", "item", "in", "pkg_resources", ".", "iter_entry_points", "(", "group", "=", "self", ".", "entry_point_group", ")", ":", "# ...
Load tasks from entry points.
[ "Load", "tasks", "from", "entry", "points", "." ]
4d075d5dbdb7ee849abdb0c8d7e7a49cb7973474
https://github.com/inveniosoftware/invenio-celery/blob/4d075d5dbdb7ee849abdb0c8d7e7a49cb7973474/invenio_celery/ext.py#L41-L70
54,637
inveniosoftware/invenio-celery
invenio_celery/ext.py
InvenioCelery.get_queues
def get_queues(self): """Return a list of current active Celery queues.""" res = self.celery.control.inspect().active_queues() or dict() return [result.get('name') for host in res.values() for result in host]
python
def get_queues(self): """Return a list of current active Celery queues.""" res = self.celery.control.inspect().active_queues() or dict() return [result.get('name') for host in res.values() for result in host]
[ "def", "get_queues", "(", "self", ")", ":", "res", "=", "self", ".", "celery", ".", "control", ".", "inspect", "(", ")", ".", "active_queues", "(", ")", "or", "dict", "(", ")", "return", "[", "result", ".", "get", "(", "'name'", ")", "for", "host",...
Return a list of current active Celery queues.
[ "Return", "a", "list", "of", "current", "active", "Celery", "queues", "." ]
4d075d5dbdb7ee849abdb0c8d7e7a49cb7973474
https://github.com/inveniosoftware/invenio-celery/blob/4d075d5dbdb7ee849abdb0c8d7e7a49cb7973474/invenio_celery/ext.py#L78-L81
54,638
inveniosoftware/invenio-celery
invenio_celery/ext.py
InvenioCelery.get_active_tasks
def get_active_tasks(self): """Return a list of UUIDs of active tasks.""" current_tasks = self.celery.control.inspect().active() or dict() return [ task.get('id') for host in current_tasks.values() for task in host]
python
def get_active_tasks(self): """Return a list of UUIDs of active tasks.""" current_tasks = self.celery.control.inspect().active() or dict() return [ task.get('id') for host in current_tasks.values() for task in host]
[ "def", "get_active_tasks", "(", "self", ")", ":", "current_tasks", "=", "self", ".", "celery", ".", "control", ".", "inspect", "(", ")", ".", "active", "(", ")", "or", "dict", "(", ")", "return", "[", "task", ".", "get", "(", "'id'", ")", "for", "h...
Return a list of UUIDs of active tasks.
[ "Return", "a", "list", "of", "UUIDs", "of", "active", "tasks", "." ]
4d075d5dbdb7ee849abdb0c8d7e7a49cb7973474
https://github.com/inveniosoftware/invenio-celery/blob/4d075d5dbdb7ee849abdb0c8d7e7a49cb7973474/invenio_celery/ext.py#L91-L95
54,639
inveniosoftware/invenio-celery
invenio_celery/ext.py
InvenioCelery.suspend_queues
def suspend_queues(self, active_queues, sleep_time=10.0): """Suspend Celery queues and wait for running tasks to complete.""" for queue in active_queues: self.disable_queue(queue) while self.get_active_tasks(): time.sleep(sleep_time)
python
def suspend_queues(self, active_queues, sleep_time=10.0): """Suspend Celery queues and wait for running tasks to complete.""" for queue in active_queues: self.disable_queue(queue) while self.get_active_tasks(): time.sleep(sleep_time)
[ "def", "suspend_queues", "(", "self", ",", "active_queues", ",", "sleep_time", "=", "10.0", ")", ":", "for", "queue", "in", "active_queues", ":", "self", ".", "disable_queue", "(", "queue", ")", "while", "self", ".", "get_active_tasks", "(", ")", ":", "tim...
Suspend Celery queues and wait for running tasks to complete.
[ "Suspend", "Celery", "queues", "and", "wait", "for", "running", "tasks", "to", "complete", "." ]
4d075d5dbdb7ee849abdb0c8d7e7a49cb7973474
https://github.com/inveniosoftware/invenio-celery/blob/4d075d5dbdb7ee849abdb0c8d7e7a49cb7973474/invenio_celery/ext.py#L97-L102
54,640
475Cumulus/TBone
tbone/data/fields/phone_number.py
PhoneNumberField.add_to_class
def add_to_class(self, cls, name): ''' Overrides the base class to add a PhoheNumberDescriptor rather than the standard FieldDescriptor ''' self.model_class = cls setattr(cls, name, PhoneNumberDescriptor(self)) self._bound = True
python
def add_to_class(self, cls, name): ''' Overrides the base class to add a PhoheNumberDescriptor rather than the standard FieldDescriptor ''' self.model_class = cls setattr(cls, name, PhoneNumberDescriptor(self)) self._bound = True
[ "def", "add_to_class", "(", "self", ",", "cls", ",", "name", ")", ":", "self", ".", "model_class", "=", "cls", "setattr", "(", "cls", ",", "name", ",", "PhoneNumberDescriptor", "(", "self", ")", ")", "self", ".", "_bound", "=", "True" ]
Overrides the base class to add a PhoheNumberDescriptor rather than the standard FieldDescriptor
[ "Overrides", "the", "base", "class", "to", "add", "a", "PhoheNumberDescriptor", "rather", "than", "the", "standard", "FieldDescriptor" ]
5a6672d8bbac449a0ab9e99560609f671fe84d4d
https://github.com/475Cumulus/TBone/blob/5a6672d8bbac449a0ab9e99560609f671fe84d4d/tbone/data/fields/phone_number.py#L127-L133
54,641
COUR4G3/flask-gssapi
flask_gssapi.py
GSSAPI.init_app
def init_app(self, app): """ Initialises the Negotiate extension for the given application. """ if not hasattr(app, 'extensions'): app.extensions = {} service_name = app.config.get('GSSAPI_SERVICE_NAME', 'HTTP') hostname = app.config.get('GSSAPI_HOSTNAME', so...
python
def init_app(self, app): """ Initialises the Negotiate extension for the given application. """ if not hasattr(app, 'extensions'): app.extensions = {} service_name = app.config.get('GSSAPI_SERVICE_NAME', 'HTTP') hostname = app.config.get('GSSAPI_HOSTNAME', so...
[ "def", "init_app", "(", "self", ",", "app", ")", ":", "if", "not", "hasattr", "(", "app", ",", "'extensions'", ")", ":", "app", ".", "extensions", "=", "{", "}", "service_name", "=", "app", ".", "config", ".", "get", "(", "'GSSAPI_SERVICE_NAME'", ",", ...
Initialises the Negotiate extension for the given application.
[ "Initialises", "the", "Negotiate", "extension", "for", "the", "given", "application", "." ]
d3842e14cdf9bf6818d7a154845e951a8e9c058d
https://github.com/COUR4G3/flask-gssapi/blob/d3842e14cdf9bf6818d7a154845e951a8e9c058d/flask_gssapi.py#L28-L42
54,642
COUR4G3/flask-gssapi
flask_gssapi.py
GSSAPI.authenticate
def authenticate(self): """Attempts to authenticate the user if a token was provided.""" if request.headers.get('Authorization', '').startswith('Negotiate '): in_token = base64.b64decode(request.headers['Authorization'][10:]) try: creds = current_app.extensions['...
python
def authenticate(self): """Attempts to authenticate the user if a token was provided.""" if request.headers.get('Authorization', '').startswith('Negotiate '): in_token = base64.b64decode(request.headers['Authorization'][10:]) try: creds = current_app.extensions['...
[ "def", "authenticate", "(", "self", ")", ":", "if", "request", ".", "headers", ".", "get", "(", "'Authorization'", ",", "''", ")", ".", "startswith", "(", "'Negotiate '", ")", ":", "in_token", "=", "base64", ".", "b64decode", "(", "request", ".", "header...
Attempts to authenticate the user if a token was provided.
[ "Attempts", "to", "authenticate", "the", "user", "if", "a", "token", "was", "provided", "." ]
d3842e14cdf9bf6818d7a154845e951a8e9c058d
https://github.com/COUR4G3/flask-gssapi/blob/d3842e14cdf9bf6818d7a154845e951a8e9c058d/flask_gssapi.py#L44-L62
54,643
lepture/terminal
terminal/command.py
Option.parse
def parse(self, name, description): """ Parse option name. :param name: option's name :param description: option's description Parsing acceptable names: * -f: shortname * --force: longname * -f, --force: shortname and longname * ...
python
def parse(self, name, description): """ Parse option name. :param name: option's name :param description: option's description Parsing acceptable names: * -f: shortname * --force: longname * -f, --force: shortname and longname * ...
[ "def", "parse", "(", "self", ",", "name", ",", "description", ")", ":", "name", "=", "name", ".", "strip", "(", ")", "if", "'<'", "in", "name", ":", "self", ".", "required", "=", "True", "self", ".", "boolean", "=", "False", "name", "=", "name", ...
Parse option name. :param name: option's name :param description: option's description Parsing acceptable names: * -f: shortname * --force: longname * -f, --force: shortname and longname * -o <output>: shortname and a required value ...
[ "Parse", "option", "name", "." ]
5226d1cac53077f12624aa51f64de7b5b05d9cb8
https://github.com/lepture/terminal/blob/5226d1cac53077f12624aa51f64de7b5b05d9cb8/terminal/command.py#L40-L127
54,644
lepture/terminal
terminal/command.py
Option.to_python
def to_python(self, value=None): """ Transform the option value to python data. """ if value is None: return self.default if self.resolve: return self.resolve(value) return value
python
def to_python(self, value=None): """ Transform the option value to python data. """ if value is None: return self.default if self.resolve: return self.resolve(value) return value
[ "def", "to_python", "(", "self", ",", "value", "=", "None", ")", ":", "if", "value", "is", "None", ":", "return", "self", ".", "default", "if", "self", ".", "resolve", ":", "return", "self", ".", "resolve", "(", "value", ")", "return", "value" ]
Transform the option value to python data.
[ "Transform", "the", "option", "value", "to", "python", "data", "." ]
5226d1cac53077f12624aa51f64de7b5b05d9cb8
https://github.com/lepture/terminal/blob/5226d1cac53077f12624aa51f64de7b5b05d9cb8/terminal/command.py#L129-L139
54,645
lepture/terminal
terminal/command.py
Command.get
def get(self, key): """ Get parsed result. After :func:`parse` the argv, we can get the parsed results:: # command.option('-f', 'description of -f') command.get('-f') command.get('verbose') # we can also get ``verbose``: command.verbose ...
python
def get(self, key): """ Get parsed result. After :func:`parse` the argv, we can get the parsed results:: # command.option('-f', 'description of -f') command.get('-f') command.get('verbose') # we can also get ``verbose``: command.verbose ...
[ "def", "get", "(", "self", ",", "key", ")", ":", "value", "=", "self", ".", "_results", ".", "get", "(", "key", ")", "if", "value", "is", "not", "None", ":", "return", "value", "# get from option default value", "option", "=", "list", "(", "filter", "(...
Get parsed result. After :func:`parse` the argv, we can get the parsed results:: # command.option('-f', 'description of -f') command.get('-f') command.get('verbose') # we can also get ``verbose``: command.verbose
[ "Get", "parsed", "result", "." ]
5226d1cac53077f12624aa51f64de7b5b05d9cb8
https://github.com/lepture/terminal/blob/5226d1cac53077f12624aa51f64de7b5b05d9cb8/terminal/command.py#L253-L276
54,646
lepture/terminal
terminal/command.py
Command.option
def option(self, name, description=None, action=None, resolve=None): """ Add or get option. Here are some examples:: command.option('-v, --verbose', 'show more log') command.option('--tag <tag>', 'tag of the package') command.option('-s, --source <source>', ...
python
def option(self, name, description=None, action=None, resolve=None): """ Add or get option. Here are some examples:: command.option('-v, --verbose', 'show more log') command.option('--tag <tag>', 'tag of the package') command.option('-s, --source <source>', ...
[ "def", "option", "(", "self", ",", "name", ",", "description", "=", "None", ",", "action", "=", "None", ",", "resolve", "=", "None", ")", ":", "if", "isinstance", "(", "name", ",", "Option", ")", ":", "option", "=", "name", "else", ":", "name", "="...
Add or get option. Here are some examples:: command.option('-v, --verbose', 'show more log') command.option('--tag <tag>', 'tag of the package') command.option('-s, --source <source>', 'the source repo') :param name: arguments of the option :param descripti...
[ "Add", "or", "get", "option", "." ]
5226d1cac53077f12624aa51f64de7b5b05d9cb8
https://github.com/lepture/terminal/blob/5226d1cac53077f12624aa51f64de7b5b05d9cb8/terminal/command.py#L278-L305
54,647
lepture/terminal
terminal/command.py
Command.parse_options
def parse_options(self, arg): """ Parse options with the argv :param arg: one arg from argv """ if not arg.startswith('-'): return False value = None if '=' in arg: arg, value = arg.split('=') for option in self._option_list: ...
python
def parse_options(self, arg): """ Parse options with the argv :param arg: one arg from argv """ if not arg.startswith('-'): return False value = None if '=' in arg: arg, value = arg.split('=') for option in self._option_list: ...
[ "def", "parse_options", "(", "self", ",", "arg", ")", ":", "if", "not", "arg", ".", "startswith", "(", "'-'", ")", ":", "return", "False", "value", "=", "None", "if", "'='", "in", "arg", ":", "arg", ",", "value", "=", "arg", ".", "split", "(", "'...
Parse options with the argv :param arg: one arg from argv
[ "Parse", "options", "with", "the", "argv" ]
5226d1cac53077f12624aa51f64de7b5b05d9cb8
https://github.com/lepture/terminal/blob/5226d1cac53077f12624aa51f64de7b5b05d9cb8/terminal/command.py#L330-L377
54,648
lepture/terminal
terminal/command.py
Command.parse
def parse(self, argv=None): """ Parse argv of terminal :param argv: default is sys.argv """ if not argv: argv = sys.argv elif isinstance(argv, str): argv = argv.split() self._argv = argv[1:] if not self._argv: self.va...
python
def parse(self, argv=None): """ Parse argv of terminal :param argv: default is sys.argv """ if not argv: argv = sys.argv elif isinstance(argv, str): argv = argv.split() self._argv = argv[1:] if not self._argv: self.va...
[ "def", "parse", "(", "self", ",", "argv", "=", "None", ")", ":", "if", "not", "argv", ":", "argv", "=", "sys", ".", "argv", "elif", "isinstance", "(", "argv", ",", "str", ")", ":", "argv", "=", "argv", ".", "split", "(", ")", "self", ".", "_arg...
Parse argv of terminal :param argv: default is sys.argv
[ "Parse", "argv", "of", "terminal" ]
5226d1cac53077f12624aa51f64de7b5b05d9cb8
https://github.com/lepture/terminal/blob/5226d1cac53077f12624aa51f64de7b5b05d9cb8/terminal/command.py#L484-L534
54,649
lepture/terminal
terminal/command.py
Command.print_version
def print_version(self): """ Print the program version. """ if not self._version: return self if not self._title: print(' %s %s' % (self._name, self._version)) return self print(' %s (%s %s)' % (self._title, self._name, self._versi...
python
def print_version(self): """ Print the program version. """ if not self._version: return self if not self._title: print(' %s %s' % (self._name, self._version)) return self print(' %s (%s %s)' % (self._title, self._name, self._versi...
[ "def", "print_version", "(", "self", ")", ":", "if", "not", "self", ".", "_version", ":", "return", "self", "if", "not", "self", ".", "_title", ":", "print", "(", "' %s %s'", "%", "(", "self", ".", "_name", ",", "self", ".", "_version", ")", ")", ...
Print the program version.
[ "Print", "the", "program", "version", "." ]
5226d1cac53077f12624aa51f64de7b5b05d9cb8
https://github.com/lepture/terminal/blob/5226d1cac53077f12624aa51f64de7b5b05d9cb8/terminal/command.py#L536-L549
54,650
lepture/terminal
terminal/command.py
Command.print_help
def print_help(self): """ Print the help menu. """ print('\n %s %s' % (self._title or self._name, self._version or '')) if self._usage: print('\n %s' % self._usage) else: cmd = self._name if hasattr(self, '_parent') and isinstance(s...
python
def print_help(self): """ Print the help menu. """ print('\n %s %s' % (self._title or self._name, self._version or '')) if self._usage: print('\n %s' % self._usage) else: cmd = self._name if hasattr(self, '_parent') and isinstance(s...
[ "def", "print_help", "(", "self", ")", ":", "print", "(", "'\\n %s %s'", "%", "(", "self", ".", "_title", "or", "self", ".", "_name", ",", "self", ".", "_version", "or", "''", ")", ")", "if", "self", ".", "_usage", ":", "print", "(", "'\\n %s'", ...
Print the help menu.
[ "Print", "the", "help", "menu", "." ]
5226d1cac53077f12624aa51f64de7b5b05d9cb8
https://github.com/lepture/terminal/blob/5226d1cac53077f12624aa51f64de7b5b05d9cb8/terminal/command.py#L572-L616
54,651
brocade/pynos
pynos/versions/base/system.py
System.router_id
def router_id(self, **kwargs): """Configures device's Router ID. Args: router_id (str): Router ID for the device. rbridge_id (str): The rbridge ID of the device on which BGP will be configured in a VCS fabric. callback (function): A function executed ...
python
def router_id(self, **kwargs): """Configures device's Router ID. Args: router_id (str): Router ID for the device. rbridge_id (str): The rbridge ID of the device on which BGP will be configured in a VCS fabric. callback (function): A function executed ...
[ "def", "router_id", "(", "self", ",", "*", "*", "kwargs", ")", ":", "router_id", "=", "kwargs", ".", "pop", "(", "'router_id'", ")", "rbridge_id", "=", "kwargs", ".", "pop", "(", "'rbridge_id'", ",", "'1'", ")", "callback", "=", "kwargs", ".", "pop", ...
Configures device's Router ID. Args: router_id (str): Router ID for the device. rbridge_id (str): The rbridge ID of the device on which BGP will be configured in a VCS fabric. callback (function): A function executed upon completion of the met...
[ "Configures", "device", "s", "Router", "ID", "." ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/base/system.py#L91-L124
54,652
brocade/pynos
pynos/versions/base/system.py
System.rbridge_id
def rbridge_id(self, **kwargs): """Configures device's rbridge ID. Setting this property will need a switch reboot Args: rbridge_id (str): The rbridge ID of the device on which BGP will be configured in a VCS fabric. get (bool): Get config instead of edit...
python
def rbridge_id(self, **kwargs): """Configures device's rbridge ID. Setting this property will need a switch reboot Args: rbridge_id (str): The rbridge ID of the device on which BGP will be configured in a VCS fabric. get (bool): Get config instead of edit...
[ "def", "rbridge_id", "(", "self", ",", "*", "*", "kwargs", ")", ":", "is_get_config", "=", "kwargs", ".", "pop", "(", "'get'", ",", "False", ")", "if", "not", "is_get_config", ":", "rbridge_id", "=", "kwargs", ".", "pop", "(", "'rbridge_id'", ")", "els...
Configures device's rbridge ID. Setting this property will need a switch reboot Args: rbridge_id (str): The rbridge ID of the device on which BGP will be configured in a VCS fabric. get (bool): Get config instead of editing config. (True, False) callb...
[ "Configures", "device", "s", "rbridge", "ID", ".", "Setting", "this", "property", "will", "need", "a", "switch", "reboot" ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/base/system.py#L126-L167
54,653
kratsg/ironman
ironman/hardware.py
HardwareManager.add
def add(self, new_hw_map): """ Add the HW map only if it doesn't exist for a given key, and no address collisions """ new_route = new_hw_map.route if new_route in self.raw_maps: raise KeyError("HW Map already exists: {0:s}".format(new_hw_map.route)) commo...
python
def add(self, new_hw_map): """ Add the HW map only if it doesn't exist for a given key, and no address collisions """ new_route = new_hw_map.route if new_route in self.raw_maps: raise KeyError("HW Map already exists: {0:s}".format(new_hw_map.route)) commo...
[ "def", "add", "(", "self", ",", "new_hw_map", ")", ":", "new_route", "=", "new_hw_map", ".", "route", "if", "new_route", "in", "self", ".", "raw_maps", ":", "raise", "KeyError", "(", "\"HW Map already exists: {0:s}\"", ".", "format", "(", "new_hw_map", ".", ...
Add the HW map only if it doesn't exist for a given key, and no address collisions
[ "Add", "the", "HW", "map", "only", "if", "it", "doesn", "t", "exist", "for", "a", "given", "key", "and", "no", "address", "collisions" ]
7d67b79970870e7e5520181d2afa3f423e46eb3a
https://github.com/kratsg/ironman/blob/7d67b79970870e7e5520181d2afa3f423e46eb3a/ironman/hardware.py#L28-L41
54,654
kratsg/ironman
ironman/hardware.py
HardwareManager.subtract
def subtract(self, route): """ Remove the route entirely. """ for address in self.raw_maps.pop(route, NullHardwareMap()).iterkeys(): self.pop(address, NullHardwareNode())
python
def subtract(self, route): """ Remove the route entirely. """ for address in self.raw_maps.pop(route, NullHardwareMap()).iterkeys(): self.pop(address, NullHardwareNode())
[ "def", "subtract", "(", "self", ",", "route", ")", ":", "for", "address", "in", "self", ".", "raw_maps", ".", "pop", "(", "route", ",", "NullHardwareMap", "(", ")", ")", ".", "iterkeys", "(", ")", ":", "self", ".", "pop", "(", "address", ",", "Null...
Remove the route entirely.
[ "Remove", "the", "route", "entirely", "." ]
7d67b79970870e7e5520181d2afa3f423e46eb3a
https://github.com/kratsg/ironman/blob/7d67b79970870e7e5520181d2afa3f423e46eb3a/ironman/hardware.py#L43-L48
54,655
rsenk330/pylibsass
pylibsass/api.py
watch
def watch(source_path, dest_path): """Watches for filesystem changes and compiles SCSS to CSS This is an async function. :param str source_path: The source directory to watch. All .scss files are monitored. :param str dest_path: The destination directory where the resulting...
python
def watch(source_path, dest_path): """Watches for filesystem changes and compiles SCSS to CSS This is an async function. :param str source_path: The source directory to watch. All .scss files are monitored. :param str dest_path: The destination directory where the resulting...
[ "def", "watch", "(", "source_path", ",", "dest_path", ")", ":", "# Setup Watchdog", "handler", "=", "FileSystemEvents", "(", "source_path", ",", "dest_path", ")", "# Always run initial compile", "handler", ".", "compile_scss", "(", ")", "observer", "=", "Observer", ...
Watches for filesystem changes and compiles SCSS to CSS This is an async function. :param str source_path: The source directory to watch. All .scss files are monitored. :param str dest_path: The destination directory where the resulting CSS files shoul...
[ "Watches", "for", "filesystem", "changes", "and", "compiles", "SCSS", "to", "CSS" ]
f029490db8e4c2178c9564efeeace95bbf8cceff
https://github.com/rsenk330/pylibsass/blob/f029490db8e4c2178c9564efeeace95bbf8cceff/pylibsass/api.py#L5-L25
54,656
bennylope/django-simple-auth
simple_auth/views.py
simple_password
def simple_password(request): """ Checks a password """ if request.method == "POST": form = PasswordForm(data=request.POST) if form.is_valid(): # TODO: set session with better param request.session["simple_auth"] = True return redirect(form.cleaned_dat...
python
def simple_password(request): """ Checks a password """ if request.method == "POST": form = PasswordForm(data=request.POST) if form.is_valid(): # TODO: set session with better param request.session["simple_auth"] = True return redirect(form.cleaned_dat...
[ "def", "simple_password", "(", "request", ")", ":", "if", "request", ".", "method", "==", "\"POST\"", ":", "form", "=", "PasswordForm", "(", "data", "=", "request", ".", "POST", ")", "if", "form", ".", "is_valid", "(", ")", ":", "# TODO: set session with b...
Checks a password
[ "Checks", "a", "password" ]
4b2acbc4bb4d0a958895235ca36b9c371853bc6e
https://github.com/bennylope/django-simple-auth/blob/4b2acbc4bb4d0a958895235ca36b9c371853bc6e/simple_auth/views.py#L6-L19
54,657
brocade/pynos
pynos/versions/base/interface.py
Interface.add_vlan_int
def add_vlan_int(self, vlan_id): """ Add VLAN Interface. VLAN interfaces are required for VLANs even when not wanting to use the interface for any L3 features. Args: vlan_id: ID for the VLAN interface being created. Value of 2-4096. Returns: True if comm...
python
def add_vlan_int(self, vlan_id): """ Add VLAN Interface. VLAN interfaces are required for VLANs even when not wanting to use the interface for any L3 features. Args: vlan_id: ID for the VLAN interface being created. Value of 2-4096. Returns: True if comm...
[ "def", "add_vlan_int", "(", "self", ",", "vlan_id", ")", ":", "config", "=", "ET", ".", "Element", "(", "'config'", ")", "vlinterface", "=", "ET", ".", "SubElement", "(", "config", ",", "'interface-vlan'", ",", "xmlns", "=", "(", "\"urn:brocade.com:mgmt:\"",...
Add VLAN Interface. VLAN interfaces are required for VLANs even when not wanting to use the interface for any L3 features. Args: vlan_id: ID for the VLAN interface being created. Value of 2-4096. Returns: True if command completes successfully or False if not. ...
[ "Add", "VLAN", "Interface", ".", "VLAN", "interfaces", "are", "required", "for", "VLANs", "even", "when", "not", "wanting", "to", "use", "the", "interface", "for", "any", "L3", "features", "." ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/base/interface.py#L67-L95
54,658
brocade/pynos
pynos/versions/base/interface.py
Interface.disable_switchport
def disable_switchport(self, inter_type, inter): """ Change an interface's operation to L3. Args: inter_type: The type of interface you want to configure. Ex. tengigabitethernet, gigabitethernet, fortygigabitethernet. inter: The ID for the interface you w...
python
def disable_switchport(self, inter_type, inter): """ Change an interface's operation to L3. Args: inter_type: The type of interface you want to configure. Ex. tengigabitethernet, gigabitethernet, fortygigabitethernet. inter: The ID for the interface you w...
[ "def", "disable_switchport", "(", "self", ",", "inter_type", ",", "inter", ")", ":", "config", "=", "ET", ".", "Element", "(", "'config'", ")", "interface", "=", "ET", ".", "SubElement", "(", "config", ",", "'interface'", ",", "xmlns", "=", "(", "\"urn:b...
Change an interface's operation to L3. Args: inter_type: The type of interface you want to configure. Ex. tengigabitethernet, gigabitethernet, fortygigabitethernet. inter: The ID for the interface you want to configure. Ex. 1/0/1 Returns: True if com...
[ "Change", "an", "interface", "s", "operation", "to", "L3", "." ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/base/interface.py#L158-L187
54,659
brocade/pynos
pynos/versions/base/interface.py
Interface.access_vlan
def access_vlan(self, inter_type, inter, vlan_id): """ Add a L2 Interface to a specific VLAN. Args: inter_type: The type of interface you want to configure. Ex. tengigabitethernet, gigabitethernet, fortygigabitethernet. inter: The ID for the interface you...
python
def access_vlan(self, inter_type, inter, vlan_id): """ Add a L2 Interface to a specific VLAN. Args: inter_type: The type of interface you want to configure. Ex. tengigabitethernet, gigabitethernet, fortygigabitethernet. inter: The ID for the interface you...
[ "def", "access_vlan", "(", "self", ",", "inter_type", ",", "inter", ",", "vlan_id", ")", ":", "config", "=", "ET", ".", "Element", "(", "'config'", ")", "interface", "=", "ET", ".", "SubElement", "(", "config", ",", "'interface'", ",", "xmlns", "=", "(...
Add a L2 Interface to a specific VLAN. Args: inter_type: The type of interface you want to configure. Ex. tengigabitethernet, gigabitethernet, fortygigabitethernet. inter: The ID for the interface you want to configure. Ex. 1/0/1 vlan_id: ID for the VLAN inte...
[ "Add", "a", "L2", "Interface", "to", "a", "specific", "VLAN", "." ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/base/interface.py#L189-L222
54,660
brocade/pynos
pynos/versions/base/interface.py
Interface.set_ip
def set_ip(self, inter_type, inter, ip_addr): """ Set IP address of a L3 interface. Args: inter_type: The type of interface you want to configure. Ex. tengigabitethernet, gigabitethernet, fortygigabitethernet. inter: The ID for the interface you want to c...
python
def set_ip(self, inter_type, inter, ip_addr): """ Set IP address of a L3 interface. Args: inter_type: The type of interface you want to configure. Ex. tengigabitethernet, gigabitethernet, fortygigabitethernet. inter: The ID for the interface you want to c...
[ "def", "set_ip", "(", "self", ",", "inter_type", ",", "inter", ",", "ip_addr", ")", ":", "config", "=", "ET", ".", "Element", "(", "'config'", ")", "interface", "=", "ET", ".", "SubElement", "(", "config", ",", "'interface'", ",", "xmlns", "=", "(", ...
Set IP address of a L3 interface. Args: inter_type: The type of interface you want to configure. Ex. tengigabitethernet, gigabitethernet, fortygigabitethernet. inter: The ID for the interface you want to configure. Ex. 1/0/1 ip_addr: IP Address in <prefix>/<b...
[ "Set", "IP", "address", "of", "a", "L3", "interface", "." ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/base/interface.py#L260-L297
54,661
brocade/pynos
pynos/versions/base/interface.py
Interface.remove_port_channel
def remove_port_channel(self, **kwargs): """ Remove a port channel interface. Args: port_int (str): port-channel number (1, 2, 3, etc). callback (function): A function executed upon completion of the method. The only parameter passed to `callback` will ...
python
def remove_port_channel(self, **kwargs): """ Remove a port channel interface. Args: port_int (str): port-channel number (1, 2, 3, etc). callback (function): A function executed upon completion of the method. The only parameter passed to `callback` will ...
[ "def", "remove_port_channel", "(", "self", ",", "*", "*", "kwargs", ")", ":", "port_int", "=", "kwargs", ".", "pop", "(", "'port_int'", ")", "callback", "=", "kwargs", ".", "pop", "(", "'callback'", ",", "self", ".", "_callback", ")", "if", "re", ".", ...
Remove a port channel interface. Args: port_int (str): port-channel number (1, 2, 3, etc). callback (function): A function executed upon completion of the method. The only parameter passed to `callback` will be the ``ElementTree`` `config`. Re...
[ "Remove", "a", "port", "channel", "interface", "." ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/base/interface.py#L299-L344
54,662
brocade/pynos
pynos/versions/base/interface.py
Interface.ip_address
def ip_address(self, **kwargs): """ Set IP Address on an Interface. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet etc). name (str): Name of interface id. (For interface: 1/0/5, 1/0/10 etc). ip_...
python
def ip_address(self, **kwargs): """ Set IP Address on an Interface. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet etc). name (str): Name of interface id. (For interface: 1/0/5, 1/0/10 etc). ip_...
[ "def", "ip_address", "(", "self", ",", "*", "*", "kwargs", ")", ":", "int_type", "=", "str", "(", "kwargs", ".", "pop", "(", "'int_type'", ")", ".", "lower", "(", ")", ")", "name", "=", "str", "(", "kwargs", ".", "pop", "(", "'name'", ")", ")", ...
Set IP Address on an Interface. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet etc). name (str): Name of interface id. (For interface: 1/0/5, 1/0/10 etc). ip_addr (str): IPv4/IPv6 Virtual IP Address.. ...
[ "Set", "IP", "Address", "on", "an", "Interface", "." ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/base/interface.py#L346-L469
54,663
brocade/pynos
pynos/versions/base/interface.py
Interface.get_ip_addresses
def get_ip_addresses(self, **kwargs): """ Get IP Addresses already set on an Interface. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet etc). name (str): Name of interface id. (For interface: 1/0/5, 1/0/10 e...
python
def get_ip_addresses(self, **kwargs): """ Get IP Addresses already set on an Interface. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet etc). name (str): Name of interface id. (For interface: 1/0/5, 1/0/10 e...
[ "def", "get_ip_addresses", "(", "self", ",", "*", "*", "kwargs", ")", ":", "int_type", "=", "str", "(", "kwargs", ".", "pop", "(", "'int_type'", ")", ".", "lower", "(", ")", ")", "name", "=", "str", "(", "kwargs", ".", "pop", "(", "'name'", ")", ...
Get IP Addresses already set on an Interface. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet etc). name (str): Name of interface id. (For interface: 1/0/5, 1/0/10 etc). version (int): 4 or 6 to represent IPv4 o...
[ "Get", "IP", "Addresses", "already", "set", "on", "an", "Interface", "." ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/base/interface.py#L471-L560
54,664
brocade/pynos
pynos/versions/base/interface.py
Interface.description
def description(self, **kwargs): """Set interface description. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet, etc) name (str): Name of interface. (1/0/5, 1/0/10, etc) desc (str): The description of the interface. ...
python
def description(self, **kwargs): """Set interface description. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet, etc) name (str): Name of interface. (1/0/5, 1/0/10, etc) desc (str): The description of the interface. ...
[ "def", "description", "(", "self", ",", "*", "*", "kwargs", ")", ":", "int_type", "=", "str", "(", "kwargs", ".", "pop", "(", "'int_type'", ")", ".", "lower", "(", ")", ")", "name", "=", "str", "(", "kwargs", ".", "pop", "(", "'name'", ")", ")", ...
Set interface description. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet, etc) name (str): Name of interface. (1/0/5, 1/0/10, etc) desc (str): The description of the interface. callback (function): A function execut...
[ "Set", "interface", "description", "." ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/base/interface.py#L602-L673
54,665
brocade/pynos
pynos/versions/base/interface.py
Interface.vlan_pvlan_association_add
def vlan_pvlan_association_add(self, **kwargs): """Add a secondary PVLAN to a primary PVLAN. Args: name (str): VLAN number (1-4094). sec_vlan (str): The secondary PVLAN. callback (function): A function executed upon completion of the method. The only...
python
def vlan_pvlan_association_add(self, **kwargs): """Add a secondary PVLAN to a primary PVLAN. Args: name (str): VLAN number (1-4094). sec_vlan (str): The secondary PVLAN. callback (function): A function executed upon completion of the method. The only...
[ "def", "vlan_pvlan_association_add", "(", "self", ",", "*", "*", "kwargs", ")", ":", "name", "=", "kwargs", ".", "pop", "(", "'name'", ")", "sec_vlan", "=", "kwargs", ".", "pop", "(", "'sec_vlan'", ")", "callback", "=", "kwargs", ".", "pop", "(", "'cal...
Add a secondary PVLAN to a primary PVLAN. Args: name (str): VLAN number (1-4094). sec_vlan (str): The secondary PVLAN. callback (function): A function executed upon completion of the method. The only parameter passed to `callback` will be the ...
[ "Add", "a", "secondary", "PVLAN", "to", "a", "primary", "PVLAN", "." ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/base/interface.py#L726-L778
54,666
brocade/pynos
pynos/versions/base/interface.py
Interface.pvlan_host_association
def pvlan_host_association(self, **kwargs): """Set interface PVLAN association. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet, etc) name (str): Name of interface. (1/0/5, 1/0/10, etc) pri_vlan (str): The primary PVLAN. ...
python
def pvlan_host_association(self, **kwargs): """Set interface PVLAN association. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet, etc) name (str): Name of interface. (1/0/5, 1/0/10, etc) pri_vlan (str): The primary PVLAN. ...
[ "def", "pvlan_host_association", "(", "self", ",", "*", "*", "kwargs", ")", ":", "int_type", "=", "kwargs", ".", "pop", "(", "'int_type'", ")", ".", "lower", "(", ")", "name", "=", "kwargs", ".", "pop", "(", "'name'", ")", "pri_vlan", "=", "kwargs", ...
Set interface PVLAN association. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet, etc) name (str): Name of interface. (1/0/5, 1/0/10, etc) pri_vlan (str): The primary PVLAN. sec_vlan (str): The secondary PVLAN. ...
[ "Set", "interface", "PVLAN", "association", "." ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/base/interface.py#L780-L863
54,667
brocade/pynos
pynos/versions/base/interface.py
Interface.tag_native_vlan
def tag_native_vlan(self, **kwargs): """Set tagging of native VLAN on trunk. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet, etc) name (str): Name of interface. (1/0/5, 1/0/10, etc) mode (str): Trunk port mode (trunk, tr...
python
def tag_native_vlan(self, **kwargs): """Set tagging of native VLAN on trunk. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet, etc) name (str): Name of interface. (1/0/5, 1/0/10, etc) mode (str): Trunk port mode (trunk, tr...
[ "def", "tag_native_vlan", "(", "self", ",", "*", "*", "kwargs", ")", ":", "int_type", "=", "kwargs", ".", "pop", "(", "'int_type'", ")", ".", "lower", "(", ")", "name", "=", "kwargs", ".", "pop", "(", "'name'", ")", "enabled", "=", "kwargs", ".", "...
Set tagging of native VLAN on trunk. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet, etc) name (str): Name of interface. (1/0/5, 1/0/10, etc) mode (str): Trunk port mode (trunk, trunk-no-default-native). enabled (boo...
[ "Set", "tagging", "of", "native", "VLAN", "on", "trunk", "." ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/base/interface.py#L1283-L1355
54,668
brocade/pynos
pynos/versions/base/interface.py
Interface.switchport_pvlan_mapping
def switchport_pvlan_mapping(self, **kwargs): """Switchport private VLAN mapping. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet, etc) name (str): Name of interface. (1/0/5, 1/0/10, etc) pri_vlan (str): The primary PVLAN...
python
def switchport_pvlan_mapping(self, **kwargs): """Switchport private VLAN mapping. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet, etc) name (str): Name of interface. (1/0/5, 1/0/10, etc) pri_vlan (str): The primary PVLAN...
[ "def", "switchport_pvlan_mapping", "(", "self", ",", "*", "*", "kwargs", ")", ":", "int_type", "=", "kwargs", ".", "pop", "(", "'int_type'", ")", ".", "lower", "(", ")", "name", "=", "kwargs", ".", "pop", "(", "'name'", ")", "pri_vlan", "=", "kwargs", ...
Switchport private VLAN mapping. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet, etc) name (str): Name of interface. (1/0/5, 1/0/10, etc) pri_vlan (str): The primary PVLAN. sec_vlan (str): The secondary PVLAN. ...
[ "Switchport", "private", "VLAN", "mapping", "." ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/base/interface.py#L1357-L1436
54,669
brocade/pynos
pynos/versions/base/interface.py
Interface.mtu
def mtu(self, **kwargs): """Set interface mtu. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet, etc) name (str): Name of interface. (1/0/5, 1/0/10, etc) mtu (str): Value between 1522 and 9216 callback (functio...
python
def mtu(self, **kwargs): """Set interface mtu. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet, etc) name (str): Name of interface. (1/0/5, 1/0/10, etc) mtu (str): Value between 1522 and 9216 callback (functio...
[ "def", "mtu", "(", "self", ",", "*", "*", "kwargs", ")", ":", "int_type", "=", "kwargs", ".", "pop", "(", "'int_type'", ")", ".", "lower", "(", ")", "name", "=", "kwargs", ".", "pop", "(", "'name'", ")", "mtu", "=", "kwargs", ".", "pop", "(", "...
Set interface mtu. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet, etc) name (str): Name of interface. (1/0/5, 1/0/10, etc) mtu (str): Value between 1522 and 9216 callback (function): A function executed upon complet...
[ "Set", "interface", "mtu", "." ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/base/interface.py#L1438-L1501
54,670
brocade/pynos
pynos/versions/base/interface.py
Interface.fabric_isl
def fabric_isl(self, **kwargs): """Set fabric ISL state. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet, etc) name (str): Name of interface. (1/0/5, 1/0/10, etc) enabled (bool): Is fabric ISL state enabled? (True, False)...
python
def fabric_isl(self, **kwargs): """Set fabric ISL state. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet, etc) name (str): Name of interface. (1/0/5, 1/0/10, etc) enabled (bool): Is fabric ISL state enabled? (True, False)...
[ "def", "fabric_isl", "(", "self", ",", "*", "*", "kwargs", ")", ":", "int_type", "=", "str", "(", "kwargs", ".", "pop", "(", "'int_type'", ")", ".", "lower", "(", ")", ")", "name", "=", "str", "(", "kwargs", ".", "pop", "(", "'name'", ")", ")", ...
Set fabric ISL state. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet, etc) name (str): Name of interface. (1/0/5, 1/0/10, etc) enabled (bool): Is fabric ISL state enabled? (True, False) get (bool): Get config instead...
[ "Set", "fabric", "ISL", "state", "." ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/base/interface.py#L1568-L1640
54,671
brocade/pynos
pynos/versions/base/interface.py
Interface.v6_nd_suppress_ra
def v6_nd_suppress_ra(self, **kwargs): """Disable IPv6 Router Advertisements Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet, etc) name (str): Name of interface. (1/0/5, 1/0/10, etc) rbridge_id (str): rbridge-id for devic...
python
def v6_nd_suppress_ra(self, **kwargs): """Disable IPv6 Router Advertisements Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet, etc) name (str): Name of interface. (1/0/5, 1/0/10, etc) rbridge_id (str): rbridge-id for devic...
[ "def", "v6_nd_suppress_ra", "(", "self", ",", "*", "*", "kwargs", ")", ":", "int_type", "=", "str", "(", "kwargs", ".", "pop", "(", "'int_type'", ")", ".", "lower", "(", ")", ")", "name", "=", "str", "(", "kwargs", ".", "pop", "(", "'name'", ")", ...
Disable IPv6 Router Advertisements Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet, etc) name (str): Name of interface. (1/0/5, 1/0/10, etc) rbridge_id (str): rbridge-id for device. Only required when type is `ve`...
[ "Disable", "IPv6", "Router", "Advertisements" ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/base/interface.py#L1713-L1787
54,672
brocade/pynos
pynos/versions/base/interface.py
Interface.vrrp_priority
def vrrp_priority(self, **kwargs): """Set VRRP priority. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet, etc). name (str): Name of interface. (1/0/5, 1/0/10, etc). vrid (str): VRRPv3 ID. priority (str): VRRP ...
python
def vrrp_priority(self, **kwargs): """Set VRRP priority. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet, etc). name (str): Name of interface. (1/0/5, 1/0/10, etc). vrid (str): VRRPv3 ID. priority (str): VRRP ...
[ "def", "vrrp_priority", "(", "self", ",", "*", "*", "kwargs", ")", ":", "int_type", "=", "kwargs", ".", "pop", "(", "'int_type'", ")", ".", "lower", "(", ")", "name", "=", "kwargs", ".", "pop", "(", "'name'", ")", "vrid", "=", "kwargs", ".", "pop",...
Set VRRP priority. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet, etc). name (str): Name of interface. (1/0/5, 1/0/10, etc). vrid (str): VRRPv3 ID. priority (str): VRRP Priority. ip_version (str): Versio...
[ "Set", "VRRP", "priority", "." ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/base/interface.py#L1923-L2044
54,673
brocade/pynos
pynos/versions/base/interface.py
Interface.port_channel_minimum_links
def port_channel_minimum_links(self, **kwargs): """Set minimum number of links in a port channel. Args: name (str): Port-channel number. (1, 5, etc) minimum_links (str): Minimum number of links in channel group. callback (function): A function executed upon completio...
python
def port_channel_minimum_links(self, **kwargs): """Set minimum number of links in a port channel. Args: name (str): Port-channel number. (1, 5, etc) minimum_links (str): Minimum number of links in channel group. callback (function): A function executed upon completio...
[ "def", "port_channel_minimum_links", "(", "self", ",", "*", "*", "kwargs", ")", ":", "name", "=", "str", "(", "kwargs", ".", "pop", "(", "'name'", ")", ")", "minimum_links", "=", "str", "(", "kwargs", ".", "pop", "(", "'minimum_links'", ")", ")", "call...
Set minimum number of links in a port channel. Args: name (str): Port-channel number. (1, 5, etc) minimum_links (str): Minimum number of links in channel group. callback (function): A function executed upon completion of the method. The only parameter passed...
[ "Set", "minimum", "number", "of", "links", "in", "a", "port", "channel", "." ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/base/interface.py#L2139-L2184
54,674
brocade/pynos
pynos/versions/base/interface.py
Interface.channel_group
def channel_group(self, **kwargs): """set channel group mode. args: int_type (str): type of interface. (gigabitethernet, tengigabitethernet, etc) name (str): name of interface. (1/0/5, 1/0/10, etc) port_int (str): port-channel number (1, 2, 3, etc). ...
python
def channel_group(self, **kwargs): """set channel group mode. args: int_type (str): type of interface. (gigabitethernet, tengigabitethernet, etc) name (str): name of interface. (1/0/5, 1/0/10, etc) port_int (str): port-channel number (1, 2, 3, etc). ...
[ "def", "channel_group", "(", "self", ",", "*", "*", "kwargs", ")", ":", "int_type", "=", "kwargs", ".", "pop", "(", "'int_type'", ")", ".", "lower", "(", ")", "name", "=", "kwargs", ".", "pop", "(", "'name'", ")", "channel_type", "=", "kwargs", ".", ...
set channel group mode. args: int_type (str): type of interface. (gigabitethernet, tengigabitethernet, etc) name (str): name of interface. (1/0/5, 1/0/10, etc) port_int (str): port-channel number (1, 2, 3, etc). channel_type (str): tiype of port-c...
[ "set", "channel", "group", "mode", "." ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/base/interface.py#L2186-L2273
54,675
brocade/pynos
pynos/versions/base/interface.py
Interface.port_channel_vlag_ignore_split
def port_channel_vlag_ignore_split(self, **kwargs): """Ignore VLAG Split. Args: name (str): Port-channel number. (1, 5, etc) enabled (bool): Is ignore split enabled? (True, False) callback (function): A function executed upon completion of the method....
python
def port_channel_vlag_ignore_split(self, **kwargs): """Ignore VLAG Split. Args: name (str): Port-channel number. (1, 5, etc) enabled (bool): Is ignore split enabled? (True, False) callback (function): A function executed upon completion of the method....
[ "def", "port_channel_vlag_ignore_split", "(", "self", ",", "*", "*", "kwargs", ")", ":", "name", "=", "str", "(", "kwargs", ".", "pop", "(", "'name'", ")", ")", "enabled", "=", "bool", "(", "kwargs", ".", "pop", "(", "'enabled'", ",", "True", ")", ")...
Ignore VLAG Split. Args: name (str): Port-channel number. (1, 5, etc) enabled (bool): Is ignore split enabled? (True, False) callback (function): A function executed upon completion of the method. The only parameter passed to `callback` will be the ...
[ "Ignore", "VLAG", "Split", "." ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/base/interface.py#L2275-L2324
54,676
brocade/pynos
pynos/versions/base/interface.py
Interface.transport_service
def transport_service(self, **kwargs): """Configure VLAN Transport Service. Args: vlan (str): The VLAN ID. service_id (str): The transport-service ID. callback (function): A function executed upon completion of the method. The only parameter passed t...
python
def transport_service(self, **kwargs): """Configure VLAN Transport Service. Args: vlan (str): The VLAN ID. service_id (str): The transport-service ID. callback (function): A function executed upon completion of the method. The only parameter passed t...
[ "def", "transport_service", "(", "self", ",", "*", "*", "kwargs", ")", ":", "vlan", "=", "kwargs", ".", "pop", "(", "'vlan'", ")", "service_id", "=", "kwargs", ".", "pop", "(", "'service_id'", ")", "callback", "=", "kwargs", ".", "pop", "(", "'callback...
Configure VLAN Transport Service. Args: vlan (str): The VLAN ID. service_id (str): The transport-service ID. callback (function): A function executed upon completion of the method. The only parameter passed to `callback` will be the ``Element...
[ "Configure", "VLAN", "Transport", "Service", "." ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/base/interface.py#L2388-L2438
54,677
brocade/pynos
pynos/versions/base/interface.py
Interface.lacp_timeout
def lacp_timeout(self, **kwargs): """Set lacp timeout. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet, etc) timeout (str): Timeout length. (short, long) name (str): Name of interface. (1/0/5, 1/0/10, etc) c...
python
def lacp_timeout(self, **kwargs): """Set lacp timeout. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet, etc) timeout (str): Timeout length. (short, long) name (str): Name of interface. (1/0/5, 1/0/10, etc) c...
[ "def", "lacp_timeout", "(", "self", ",", "*", "*", "kwargs", ")", ":", "int_type", "=", "kwargs", ".", "pop", "(", "'int_type'", ")", ".", "lower", "(", ")", "name", "=", "kwargs", ".", "pop", "(", "'name'", ")", "timeout", "=", "kwargs", ".", "pop...
Set lacp timeout. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet, etc) timeout (str): Timeout length. (short, long) name (str): Name of interface. (1/0/5, 1/0/10, etc) callback (function): A function executed upon ...
[ "Set", "lacp", "timeout", "." ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/base/interface.py#L2440-L2506
54,678
brocade/pynos
pynos/versions/base/interface.py
Interface.switchport
def switchport(self, **kwargs): """Set interface switchport status. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet, etc) name (str): Name of interface. (1/0/5, 1/0/10, etc) enabled (bool): Is the interface enabled? (True...
python
def switchport(self, **kwargs): """Set interface switchport status. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet, etc) name (str): Name of interface. (1/0/5, 1/0/10, etc) enabled (bool): Is the interface enabled? (True...
[ "def", "switchport", "(", "self", ",", "*", "*", "kwargs", ")", ":", "int_type", "=", "kwargs", ".", "pop", "(", "'int_type'", ")", ".", "lower", "(", ")", "name", "=", "kwargs", ".", "pop", "(", "'name'", ")", "enabled", "=", "kwargs", ".", "pop",...
Set interface switchport status. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet, etc) name (str): Name of interface. (1/0/5, 1/0/10, etc) enabled (bool): Is the interface enabled? (True, False) get (bool): Get config...
[ "Set", "interface", "switchport", "status", "." ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/base/interface.py#L2508-L2569
54,679
brocade/pynos
pynos/versions/base/interface.py
Interface.acc_vlan
def acc_vlan(self, **kwargs): """Set access VLAN on a port. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet, etc) name (str): Name of interface. (1/0/5, 1/0/10, etc) vlan (str): VLAN ID to set as the access VLAN. ...
python
def acc_vlan(self, **kwargs): """Set access VLAN on a port. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet, etc) name (str): Name of interface. (1/0/5, 1/0/10, etc) vlan (str): VLAN ID to set as the access VLAN. ...
[ "def", "acc_vlan", "(", "self", ",", "*", "*", "kwargs", ")", ":", "int_type", "=", "kwargs", ".", "pop", "(", "'int_type'", ")", "name", "=", "kwargs", ".", "pop", "(", "'name'", ")", "vlan", "=", "kwargs", ".", "pop", "(", "'vlan'", ")", "callbac...
Set access VLAN on a port. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet, etc) name (str): Name of interface. (1/0/5, 1/0/10, etc) vlan (str): VLAN ID to set as the access VLAN. callback (function): A function execu...
[ "Set", "access", "VLAN", "on", "a", "port", "." ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/base/interface.py#L2571-L2629
54,680
brocade/pynos
pynos/versions/base/interface.py
Interface.get_interface_detail_request
def get_interface_detail_request(last_interface_name, last_interface_type): """ Creates a new Netconf request based on the last received interface name and type when the hasMore flag is true """ request_interface = ET.Element( 'get-interf...
python
def get_interface_detail_request(last_interface_name, last_interface_type): """ Creates a new Netconf request based on the last received interface name and type when the hasMore flag is true """ request_interface = ET.Element( 'get-interf...
[ "def", "get_interface_detail_request", "(", "last_interface_name", ",", "last_interface_type", ")", ":", "request_interface", "=", "ET", ".", "Element", "(", "'get-interface-detail'", ",", "xmlns", "=", "\"urn:brocade.com:mgmt:brocade-interface-ext\"", ")", "if", "last_inte...
Creates a new Netconf request based on the last received interface name and type when the hasMore flag is true
[ "Creates", "a", "new", "Netconf", "request", "based", "on", "the", "last", "received", "interface", "name", "and", "type", "when", "the", "hasMore", "flag", "is", "true" ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/base/interface.py#L2708-L2727
54,681
brocade/pynos
pynos/versions/base/interface.py
Interface.get_vlan_brief_request
def get_vlan_brief_request(last_vlan_id): """ Creates a new Netconf request based on the last received vlan id when the hasMore flag is true """ request_interface = ET.Element( 'get-vlan-brief', xmlns="urn:brocade.com:mgmt:brocade-interface-ext" ) ...
python
def get_vlan_brief_request(last_vlan_id): """ Creates a new Netconf request based on the last received vlan id when the hasMore flag is true """ request_interface = ET.Element( 'get-vlan-brief', xmlns="urn:brocade.com:mgmt:brocade-interface-ext" ) ...
[ "def", "get_vlan_brief_request", "(", "last_vlan_id", ")", ":", "request_interface", "=", "ET", ".", "Element", "(", "'get-vlan-brief'", ",", "xmlns", "=", "\"urn:brocade.com:mgmt:brocade-interface-ext\"", ")", "if", "last_vlan_id", "!=", "''", ":", "last_received_int_e...
Creates a new Netconf request based on the last received vlan id when the hasMore flag is true
[ "Creates", "a", "new", "Netconf", "request", "based", "on", "the", "last", "received", "vlan", "id", "when", "the", "hasMore", "flag", "is", "true" ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/base/interface.py#L2874-L2887
54,682
brocade/pynos
pynos/versions/base/interface.py
Interface.get_port_chann_detail_request
def get_port_chann_detail_request(last_aggregator_id): """ Creates a new Netconf request based on the last received aggregator id when the hasMore flag is true """ port_channel_ns = 'urn:brocade.com:mgmt:brocade-lag' request_port_channel = ET.Element('get-port-channel-detail', ...
python
def get_port_chann_detail_request(last_aggregator_id): """ Creates a new Netconf request based on the last received aggregator id when the hasMore flag is true """ port_channel_ns = 'urn:brocade.com:mgmt:brocade-lag' request_port_channel = ET.Element('get-port-channel-detail', ...
[ "def", "get_port_chann_detail_request", "(", "last_aggregator_id", ")", ":", "port_channel_ns", "=", "'urn:brocade.com:mgmt:brocade-lag'", "request_port_channel", "=", "ET", ".", "Element", "(", "'get-port-channel-detail'", ",", "xmlns", "=", "port_channel_ns", ")", "if", ...
Creates a new Netconf request based on the last received aggregator id when the hasMore flag is true
[ "Creates", "a", "new", "Netconf", "request", "based", "on", "the", "last", "received", "aggregator", "id", "when", "the", "hasMore", "flag", "is", "true" ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/base/interface.py#L3008-L3021
54,683
brocade/pynos
pynos/versions/base/interface.py
Interface.vrrpe_spf_basic
def vrrpe_spf_basic(self, **kwargs): """Set vrrpe short path forwarding to default. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet, etc). name (str): Name of interface. (1/0/5, 1/0/10, etc). enable (bool): If vrrpe short...
python
def vrrpe_spf_basic(self, **kwargs): """Set vrrpe short path forwarding to default. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet, etc). name (str): Name of interface. (1/0/5, 1/0/10, etc). enable (bool): If vrrpe short...
[ "def", "vrrpe_spf_basic", "(", "self", ",", "*", "*", "kwargs", ")", ":", "int_type", "=", "kwargs", ".", "pop", "(", "'int_type'", ")", ".", "lower", "(", ")", "name", "=", "kwargs", ".", "pop", "(", "'name'", ")", "vrid", "=", "kwargs", ".", "pop...
Set vrrpe short path forwarding to default. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet, etc). name (str): Name of interface. (1/0/5, 1/0/10, etc). enable (bool): If vrrpe short path fowarding should be enabled ...
[ "Set", "vrrpe", "short", "path", "forwarding", "to", "default", "." ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/base/interface.py#L3026-L3105
54,684
brocade/pynos
pynos/versions/base/interface.py
Interface.vrrpe_vip
def vrrpe_vip(self, **kwargs): """Set vrrpe VIP. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet, ve, etc). name (str): Name of interface. (1/0/5, 1/0/10, VE name etc). vrid (str): vrrpev3 ID. get (bool): Get ...
python
def vrrpe_vip(self, **kwargs): """Set vrrpe VIP. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet, ve, etc). name (str): Name of interface. (1/0/5, 1/0/10, VE name etc). vrid (str): vrrpev3 ID. get (bool): Get ...
[ "def", "vrrpe_vip", "(", "self", ",", "*", "*", "kwargs", ")", ":", "int_type", "=", "kwargs", ".", "pop", "(", "'int_type'", ")", ".", "lower", "(", ")", "name", "=", "kwargs", ".", "pop", "(", "'name'", ",", ")", "vip", "=", "kwargs", ".", "pop...
Set vrrpe VIP. Args: int_type (str): Type of interface. (gigabitethernet, tengigabitethernet, ve, etc). name (str): Name of interface. (1/0/5, 1/0/10, VE name etc). vrid (str): vrrpev3 ID. get (bool): Get config instead of editing config. (True, F...
[ "Set", "vrrpe", "VIP", "." ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/base/interface.py#L3107-L3226
54,685
brocade/pynos
pynos/versions/base/interface.py
Interface._get_intf_rb_id
def _get_intf_rb_id(rbridge_id): """ Creates a new Netconf request based on the rbridge_id specifed """ intf_rb_id = ET.Element( 'get-ip-interface', xmlns="urn:brocade.com:mgmt:brocade-interface-ext" ) if rbridge_id is not None: rbridge_el = E...
python
def _get_intf_rb_id(rbridge_id): """ Creates a new Netconf request based on the rbridge_id specifed """ intf_rb_id = ET.Element( 'get-ip-interface', xmlns="urn:brocade.com:mgmt:brocade-interface-ext" ) if rbridge_id is not None: rbridge_el = E...
[ "def", "_get_intf_rb_id", "(", "rbridge_id", ")", ":", "intf_rb_id", "=", "ET", ".", "Element", "(", "'get-ip-interface'", ",", "xmlns", "=", "\"urn:brocade.com:mgmt:brocade-interface-ext\"", ")", "if", "rbridge_id", "is", "not", "None", ":", "rbridge_el", "=", "E...
Creates a new Netconf request based on the rbridge_id specifed
[ "Creates", "a", "new", "Netconf", "request", "based", "on", "the", "rbridge_id", "specifed" ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/base/interface.py#L3370-L3382
54,686
brocade/pynos
pynos/versions/base/interface.py
Interface.conversational_mac
def conversational_mac(self, **kwargs): """Enable conversational mac learning on vdx switches Args: get (bool): Get config instead of editing config. (True, False) delete (bool): True, delete the mac-learning. (True, False) callback (function): A function executed up...
python
def conversational_mac(self, **kwargs): """Enable conversational mac learning on vdx switches Args: get (bool): Get config instead of editing config. (True, False) delete (bool): True, delete the mac-learning. (True, False) callback (function): A function executed up...
[ "def", "conversational_mac", "(", "self", ",", "*", "*", "kwargs", ")", ":", "callback", "=", "kwargs", ".", "pop", "(", "'callback'", ",", "self", ".", "_callback", ")", "mac_learning", "=", "getattr", "(", "self", ".", "_mac_address_table", ",", "'mac_ad...
Enable conversational mac learning on vdx switches Args: get (bool): Get config instead of editing config. (True, False) delete (bool): True, delete the mac-learning. (True, False) callback (function): A function executed upon completion of the method. The o...
[ "Enable", "conversational", "mac", "learning", "on", "vdx", "switches" ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/base/interface.py#L3384-L3422
54,687
brocade/pynos
pynos/versions/base/interface.py
Interface.overlay_gateway_name
def overlay_gateway_name(self, **kwargs): """Configure Name of Overlay Gateway on vdx switches Args: gw_name: Name of Overlay Gateway get (bool): Get config instead of editing config. (True, False) delete (bool): True, delete the overlay gateway config. ...
python
def overlay_gateway_name(self, **kwargs): """Configure Name of Overlay Gateway on vdx switches Args: gw_name: Name of Overlay Gateway get (bool): Get config instead of editing config. (True, False) delete (bool): True, delete the overlay gateway config. ...
[ "def", "overlay_gateway_name", "(", "self", ",", "*", "*", "kwargs", ")", ":", "callback", "=", "kwargs", ".", "pop", "(", "'callback'", ",", "self", ".", "_callback", ")", "get_config", "=", "kwargs", ".", "pop", "(", "'get'", ",", "False", ")", "if",...
Configure Name of Overlay Gateway on vdx switches Args: gw_name: Name of Overlay Gateway get (bool): Get config instead of editing config. (True, False) delete (bool): True, delete the overlay gateway config. (True, False) callback (fun...
[ "Configure", "Name", "of", "Overlay", "Gateway", "on", "vdx", "switches" ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/base/interface.py#L3605-L3654
54,688
brocade/pynos
pynos/versions/base/interface.py
Interface.overlay_gateway_activate
def overlay_gateway_activate(self, **kwargs): """Activates the Overlay Gateway Instance on VDX switches Args: gw_name: Name of Overlay Gateway get (bool): Get config instead of editing config. (True, False) delete (bool): True, delete the activate config. (True, Fals...
python
def overlay_gateway_activate(self, **kwargs): """Activates the Overlay Gateway Instance on VDX switches Args: gw_name: Name of Overlay Gateway get (bool): Get config instead of editing config. (True, False) delete (bool): True, delete the activate config. (True, Fals...
[ "def", "overlay_gateway_activate", "(", "self", ",", "*", "*", "kwargs", ")", ":", "callback", "=", "kwargs", ".", "pop", "(", "'callback'", ",", "self", ".", "_callback", ")", "get_config", "=", "kwargs", ".", "pop", "(", "'get'", ",", "False", ")", "...
Activates the Overlay Gateway Instance on VDX switches Args: gw_name: Name of Overlay Gateway get (bool): Get config instead of editing config. (True, False) delete (bool): True, delete the activate config. (True, False) callback (function): A function executed u...
[ "Activates", "the", "Overlay", "Gateway", "Instance", "on", "VDX", "switches" ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/base/interface.py#L3656-L3708
54,689
brocade/pynos
pynos/versions/base/interface.py
Interface.overlay_gateway_type
def overlay_gateway_type(self, **kwargs): """Configure Overlay Gateway Type on vdx switches Args: gw_name: Name of Overlay Gateway gw_type: Type of Overlay Gateway(hardware-vtep/ layer2-extension/nsx) get (bool): Get config instead of editing con...
python
def overlay_gateway_type(self, **kwargs): """Configure Overlay Gateway Type on vdx switches Args: gw_name: Name of Overlay Gateway gw_type: Type of Overlay Gateway(hardware-vtep/ layer2-extension/nsx) get (bool): Get config instead of editing con...
[ "def", "overlay_gateway_type", "(", "self", ",", "*", "*", "kwargs", ")", ":", "callback", "=", "kwargs", ".", "pop", "(", "'callback'", ",", "self", ".", "_callback", ")", "get_config", "=", "kwargs", ".", "pop", "(", "'get'", ",", "False", ")", "if",...
Configure Overlay Gateway Type on vdx switches Args: gw_name: Name of Overlay Gateway gw_type: Type of Overlay Gateway(hardware-vtep/ layer2-extension/nsx) get (bool): Get config instead of editing config. (True, False) delete (bool): True, d...
[ "Configure", "Overlay", "Gateway", "Type", "on", "vdx", "switches" ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/base/interface.py#L3710-L3760
54,690
brocade/pynos
pynos/versions/base/interface.py
Interface.overlay_gateway_loopback_id
def overlay_gateway_loopback_id(self, **kwargs): """Configure Overlay Gateway ip interface loopback Args: gw_name: Name of Overlay Gateway <WORD:1-32> loopback_id: Loopback interface Id <NUMBER: 1-255> get (bool): Get config instead of editing config. (True, False)...
python
def overlay_gateway_loopback_id(self, **kwargs): """Configure Overlay Gateway ip interface loopback Args: gw_name: Name of Overlay Gateway <WORD:1-32> loopback_id: Loopback interface Id <NUMBER: 1-255> get (bool): Get config instead of editing config. (True, False)...
[ "def", "overlay_gateway_loopback_id", "(", "self", ",", "*", "*", "kwargs", ")", ":", "callback", "=", "kwargs", ".", "pop", "(", "'callback'", ",", "self", ".", "_callback", ")", "get_config", "=", "kwargs", ".", "pop", "(", "'get'", ",", "False", ")", ...
Configure Overlay Gateway ip interface loopback Args: gw_name: Name of Overlay Gateway <WORD:1-32> loopback_id: Loopback interface Id <NUMBER: 1-255> get (bool): Get config instead of editing config. (True, False) delete (bool): True, delete the overlay gateway...
[ "Configure", "Overlay", "Gateway", "ip", "interface", "loopback" ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/base/interface.py#L3762-L3822
54,691
brocade/pynos
pynos/versions/base/interface.py
Interface.overlay_gateway_attach_rbridge_id
def overlay_gateway_attach_rbridge_id(self, **kwargs): """Configure Overlay Gateway attach rbridge id Args: gw_name: Name of Overlay Gateway <WORD:1-32> rbridge_id: Single or range of rbridge id to be added/removed get (bool): Get config instead of editing config. ...
python
def overlay_gateway_attach_rbridge_id(self, **kwargs): """Configure Overlay Gateway attach rbridge id Args: gw_name: Name of Overlay Gateway <WORD:1-32> rbridge_id: Single or range of rbridge id to be added/removed get (bool): Get config instead of editing config. ...
[ "def", "overlay_gateway_attach_rbridge_id", "(", "self", ",", "*", "*", "kwargs", ")", ":", "callback", "=", "kwargs", ".", "pop", "(", "'callback'", ",", "self", ".", "_callback", ")", "get_config", "=", "kwargs", ".", "pop", "(", "'get'", ",", "False", ...
Configure Overlay Gateway attach rbridge id Args: gw_name: Name of Overlay Gateway <WORD:1-32> rbridge_id: Single or range of rbridge id to be added/removed get (bool): Get config instead of editing config. (True, False) delete (bool): True, delete the attached...
[ "Configure", "Overlay", "Gateway", "attach", "rbridge", "id" ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/base/interface.py#L3880-L3945
54,692
brocade/pynos
pynos/versions/base/interface.py
Interface.ipv6_link_local
def ipv6_link_local(self, **kwargs): """Configure ipv6 link local address on interfaces on vdx switches Args: int_type: Interface type on which the ipv6 link local needs to be configured. name: 'Ve' or 'loopback' interface name. rbridge_id (str): rbridge...
python
def ipv6_link_local(self, **kwargs): """Configure ipv6 link local address on interfaces on vdx switches Args: int_type: Interface type on which the ipv6 link local needs to be configured. name: 'Ve' or 'loopback' interface name. rbridge_id (str): rbridge...
[ "def", "ipv6_link_local", "(", "self", ",", "*", "*", "kwargs", ")", ":", "int_type", "=", "kwargs", ".", "pop", "(", "'int_type'", ")", ".", "lower", "(", ")", "ve_name", "=", "kwargs", ".", "pop", "(", "'name'", ")", "rbridge_id", "=", "kwargs", "....
Configure ipv6 link local address on interfaces on vdx switches Args: int_type: Interface type on which the ipv6 link local needs to be configured. name: 'Ve' or 'loopback' interface name. rbridge_id (str): rbridge-id for device. get (bool): Get conf...
[ "Configure", "ipv6", "link", "local", "address", "on", "interfaces", "on", "vdx", "switches" ]
bd8a34e98f322de3fc06750827d8bbc3a0c00380
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/base/interface.py#L3947-L4003
54,693
475Cumulus/TBone
tbone/resources/mongo.py
MongoResource.post_list
async def post_list(cls, sender, db, instances): ''' Hook to capture the results of a list query. Useful when wanting to know when certain documents have come up in a query. Implement in resource subclasses to provide domain-specific behavior ''' serialized_objects = awai...
python
async def post_list(cls, sender, db, instances): ''' Hook to capture the results of a list query. Useful when wanting to know when certain documents have come up in a query. Implement in resource subclasses to provide domain-specific behavior ''' serialized_objects = awai...
[ "async", "def", "post_list", "(", "cls", ",", "sender", ",", "db", ",", "instances", ")", ":", "serialized_objects", "=", "await", "asyncio", ".", "gather", "(", "*", "[", "obj", ".", "serialize", "(", ")", "for", "obj", "in", "instances", "]", ")", ...
Hook to capture the results of a list query. Useful when wanting to know when certain documents have come up in a query. Implement in resource subclasses to provide domain-specific behavior
[ "Hook", "to", "capture", "the", "results", "of", "a", "list", "query", ".", "Useful", "when", "wanting", "to", "know", "when", "certain", "documents", "have", "come", "up", "in", "a", "query", ".", "Implement", "in", "resource", "subclasses", "to", "provid...
5a6672d8bbac449a0ab9e99560609f671fe84d4d
https://github.com/475Cumulus/TBone/blob/5a6672d8bbac449a0ab9e99560609f671fe84d4d/tbone/resources/mongo.py#L65-L72
54,694
475Cumulus/TBone
tbone/resources/mongo.py
MongoResource.list
async def list(self, *args, **kwargs): ''' Corresponds to GET request without a resource identifier, fetching documents from the database ''' limit = int(kwargs.pop('limit', self.limit)) limit = 1000 if limit == 0 else limit # lets not go crazy here offset = int(kwargs.p...
python
async def list(self, *args, **kwargs): ''' Corresponds to GET request without a resource identifier, fetching documents from the database ''' limit = int(kwargs.pop('limit', self.limit)) limit = 1000 if limit == 0 else limit # lets not go crazy here offset = int(kwargs.p...
[ "async", "def", "list", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "limit", "=", "int", "(", "kwargs", ".", "pop", "(", "'limit'", ",", "self", ".", "limit", ")", ")", "limit", "=", "1000", "if", "limit", "==", "0", "else...
Corresponds to GET request without a resource identifier, fetching documents from the database
[ "Corresponds", "to", "GET", "request", "without", "a", "resource", "identifier", "fetching", "documents", "from", "the", "database" ]
5a6672d8bbac449a0ab9e99560609f671fe84d4d
https://github.com/475Cumulus/TBone/blob/5a6672d8bbac449a0ab9e99560609f671fe84d4d/tbone/resources/mongo.py#L76-L121
54,695
475Cumulus/TBone
tbone/resources/mongo.py
MongoResource.detail
async def detail(self, **kwargs): ''' Corresponds to GET request with a resource unique identifier, fetching a single document from the database ''' try: pk = self.pk_type(kwargs.get('pk')) obj = await self._meta.object_class.find_one(self.db, {self.pk: pk}) ...
python
async def detail(self, **kwargs): ''' Corresponds to GET request with a resource unique identifier, fetching a single document from the database ''' try: pk = self.pk_type(kwargs.get('pk')) obj = await self._meta.object_class.find_one(self.db, {self.pk: pk}) ...
[ "async", "def", "detail", "(", "self", ",", "*", "*", "kwargs", ")", ":", "try", ":", "pk", "=", "self", ".", "pk_type", "(", "kwargs", ".", "get", "(", "'pk'", ")", ")", "obj", "=", "await", "self", ".", "_meta", ".", "object_class", ".", "find_...
Corresponds to GET request with a resource unique identifier, fetching a single document from the database
[ "Corresponds", "to", "GET", "request", "with", "a", "resource", "unique", "identifier", "fetching", "a", "single", "document", "from", "the", "database" ]
5a6672d8bbac449a0ab9e99560609f671fe84d4d
https://github.com/475Cumulus/TBone/blob/5a6672d8bbac449a0ab9e99560609f671fe84d4d/tbone/resources/mongo.py#L123-L134
54,696
475Cumulus/TBone
tbone/resources/mongo.py
MongoResource.create
async def create(self, **kwargs): ''' Corresponds to POST request without a resource identifier, inserting a document into the database ''' try: # create model obj = self._meta.object_class() # deserialize data from request body self.data.u...
python
async def create(self, **kwargs): ''' Corresponds to POST request without a resource identifier, inserting a document into the database ''' try: # create model obj = self._meta.object_class() # deserialize data from request body self.data.u...
[ "async", "def", "create", "(", "self", ",", "*", "*", "kwargs", ")", ":", "try", ":", "# create model", "obj", "=", "self", ".", "_meta", ".", "object_class", "(", ")", "# deserialize data from request body", "self", ".", "data", ".", "update", "(", "kwarg...
Corresponds to POST request without a resource identifier, inserting a document into the database
[ "Corresponds", "to", "POST", "request", "without", "a", "resource", "identifier", "inserting", "a", "document", "into", "the", "database" ]
5a6672d8bbac449a0ab9e99560609f671fe84d4d
https://github.com/475Cumulus/TBone/blob/5a6672d8bbac449a0ab9e99560609f671fe84d4d/tbone/resources/mongo.py#L136-L152
54,697
475Cumulus/TBone
tbone/resources/mongo.py
MongoResource.modify
async def modify(self, **kwargs): ''' Corresponds to PATCH request with a resource identifier, modifying a single document in the database ''' try: pk = self.pk_type(kwargs['pk']) # modify is a class method on MongoCollectionMixin result = await self._...
python
async def modify(self, **kwargs): ''' Corresponds to PATCH request with a resource identifier, modifying a single document in the database ''' try: pk = self.pk_type(kwargs['pk']) # modify is a class method on MongoCollectionMixin result = await self._...
[ "async", "def", "modify", "(", "self", ",", "*", "*", "kwargs", ")", ":", "try", ":", "pk", "=", "self", ".", "pk_type", "(", "kwargs", "[", "'pk'", "]", ")", "# modify is a class method on MongoCollectionMixin", "result", "=", "await", "self", ".", "_meta...
Corresponds to PATCH request with a resource identifier, modifying a single document in the database
[ "Corresponds", "to", "PATCH", "request", "with", "a", "resource", "identifier", "modifying", "a", "single", "document", "in", "the", "database" ]
5a6672d8bbac449a0ab9e99560609f671fe84d4d
https://github.com/475Cumulus/TBone/blob/5a6672d8bbac449a0ab9e99560609f671fe84d4d/tbone/resources/mongo.py#L154-L167
54,698
475Cumulus/TBone
tbone/resources/mongo.py
MongoResource.update
async def update(self, **kwargs): ''' Corresponds to PUT request with a resource identifier, updating a single document in the database ''' try: self.data[self.pk] = self.pk_type(kwargs['pk']) updated_obj = await self._meta.object_class().update(self.db, data=self...
python
async def update(self, **kwargs): ''' Corresponds to PUT request with a resource identifier, updating a single document in the database ''' try: self.data[self.pk] = self.pk_type(kwargs['pk']) updated_obj = await self._meta.object_class().update(self.db, data=self...
[ "async", "def", "update", "(", "self", ",", "*", "*", "kwargs", ")", ":", "try", ":", "self", ".", "data", "[", "self", ".", "pk", "]", "=", "self", ".", "pk_type", "(", "kwargs", "[", "'pk'", "]", ")", "updated_obj", "=", "await", "self", ".", ...
Corresponds to PUT request with a resource identifier, updating a single document in the database
[ "Corresponds", "to", "PUT", "request", "with", "a", "resource", "identifier", "updating", "a", "single", "document", "in", "the", "database" ]
5a6672d8bbac449a0ab9e99560609f671fe84d4d
https://github.com/475Cumulus/TBone/blob/5a6672d8bbac449a0ab9e99560609f671fe84d4d/tbone/resources/mongo.py#L169-L181
54,699
475Cumulus/TBone
tbone/resources/mongo.py
MongoResource.delete
async def delete(self, *args, **kwargs): ''' Corresponds to DELETE request with a resource identifier, deleting a single document from the database ''' pk = self.pk_type(kwargs['pk']) result = await self._meta.object_class.delete_entries(db=self.db, query={self.pk: pk}) i...
python
async def delete(self, *args, **kwargs): ''' Corresponds to DELETE request with a resource identifier, deleting a single document from the database ''' pk = self.pk_type(kwargs['pk']) result = await self._meta.object_class.delete_entries(db=self.db, query={self.pk: pk}) i...
[ "async", "def", "delete", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "pk", "=", "self", ".", "pk_type", "(", "kwargs", "[", "'pk'", "]", ")", "result", "=", "await", "self", ".", "_meta", ".", "object_class", ".", "delete_ent...
Corresponds to DELETE request with a resource identifier, deleting a single document from the database
[ "Corresponds", "to", "DELETE", "request", "with", "a", "resource", "identifier", "deleting", "a", "single", "document", "from", "the", "database" ]
5a6672d8bbac449a0ab9e99560609f671fe84d4d
https://github.com/475Cumulus/TBone/blob/5a6672d8bbac449a0ab9e99560609f671fe84d4d/tbone/resources/mongo.py#L183-L193