repo
stringlengths
7
54
path
stringlengths
4
223
func_name
stringlengths
1
134
original_string
stringlengths
75
104k
language
stringclasses
1 value
code
stringlengths
75
104k
code_tokens
listlengths
20
28.4k
docstring
stringlengths
1
46.3k
docstring_tokens
listlengths
1
1.66k
sha
stringlengths
40
40
url
stringlengths
87
315
partition
stringclasses
1 value
summary
stringlengths
4
350
obf_code
stringlengths
7.85k
764k
saltstack/salt
salt/modules/debian_ip.py
__ipv4_netmask
def __ipv4_netmask(value): '''validate an IPv4 dotted quad or integer CIDR netmask''' valid, errmsg = False, 'dotted quad or integer CIDR (0->32)' valid, value, _ = __int(value) if not (valid and 0 <= value <= 32): valid = salt.utils.validate.net.netmask(value) return (valid, value, errmsg)
python
def __ipv4_netmask(value): '''validate an IPv4 dotted quad or integer CIDR netmask''' valid, errmsg = False, 'dotted quad or integer CIDR (0->32)' valid, value, _ = __int(value) if not (valid and 0 <= value <= 32): valid = salt.utils.validate.net.netmask(value) return (valid, value, errmsg)
[ "def", "__ipv4_netmask", "(", "value", ")", ":", "valid", ",", "errmsg", "=", "False", ",", "'dotted quad or integer CIDR (0->32)'", "valid", ",", "value", ",", "_", "=", "__int", "(", "value", ")", "if", "not", "(", "valid", "and", "0", "<=", "value", "...
validate an IPv4 dotted quad or integer CIDR netmask
[ "validate", "an", "IPv4", "dotted", "quad", "or", "integer", "CIDR", "netmask" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/debian_ip.py#L337-L343
train
validate an IPv4 dotted quad or integer CIDR netmask
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/debian_ip.py
__ipv6_netmask
def __ipv6_netmask(value): '''validate an IPv6 integer netmask''' valid, errmsg = False, 'IPv6 netmask (0->128)' valid, value, _ = __int(value) valid = (valid and 0 <= value <= 128) return (valid, value, errmsg)
python
def __ipv6_netmask(value): '''validate an IPv6 integer netmask''' valid, errmsg = False, 'IPv6 netmask (0->128)' valid, value, _ = __int(value) valid = (valid and 0 <= value <= 128) return (valid, value, errmsg)
[ "def", "__ipv6_netmask", "(", "value", ")", ":", "valid", ",", "errmsg", "=", "False", ",", "'IPv6 netmask (0->128)'", "valid", ",", "value", ",", "_", "=", "__int", "(", "value", ")", "valid", "=", "(", "valid", "and", "0", "<=", "value", "<=", "128",...
validate an IPv6 integer netmask
[ "validate", "an", "IPv6", "integer", "netmask" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/debian_ip.py#L346-L351
train
validate an IPv6 netmask
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/debian_ip.py
__within2
def __within2(value, within=None, errmsg=None, dtype=None): '''validate that a value is in ``within`` and optionally a ``dtype``''' valid, _value = False, value if dtype: try: _value = dtype(value) # TODO: this is a bit loose when dtype is a class valid = _value in within ...
python
def __within2(value, within=None, errmsg=None, dtype=None): '''validate that a value is in ``within`` and optionally a ``dtype``''' valid, _value = False, value if dtype: try: _value = dtype(value) # TODO: this is a bit loose when dtype is a class valid = _value in within ...
[ "def", "__within2", "(", "value", ",", "within", "=", "None", ",", "errmsg", "=", "None", ",", "dtype", "=", "None", ")", ":", "valid", ",", "_value", "=", "False", ",", "value", "if", "dtype", ":", "try", ":", "_value", "=", "dtype", "(", "value",...
validate that a value is in ``within`` and optionally a ``dtype``
[ "validate", "that", "a", "value", "is", "in", "within", "and", "optionally", "a", "dtype" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/debian_ip.py#L354-L373
train
validate that a value is within a given set of items
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/debian_ip.py
__space_delimited_list
def __space_delimited_list(value): '''validate that a value contains one or more space-delimited values''' if isinstance(value, six.string_types): value = value.strip().split() if hasattr(value, '__iter__') and value != []: return (True, value, 'space-delimited string') else: re...
python
def __space_delimited_list(value): '''validate that a value contains one or more space-delimited values''' if isinstance(value, six.string_types): value = value.strip().split() if hasattr(value, '__iter__') and value != []: return (True, value, 'space-delimited string') else: re...
[ "def", "__space_delimited_list", "(", "value", ")", ":", "if", "isinstance", "(", "value", ",", "six", ".", "string_types", ")", ":", "value", "=", "value", ".", "strip", "(", ")", ".", "split", "(", ")", "if", "hasattr", "(", "value", ",", "'__iter__'...
validate that a value contains one or more space-delimited values
[ "validate", "that", "a", "value", "contains", "one", "or", "more", "space", "-", "delimited", "values" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/debian_ip.py#L381-L389
train
validate that a value contains one or more space - delimited values
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/debian_ip.py
_validate_interface_option
def _validate_interface_option(attr, value, addrfam='inet'): '''lookup the validation function for a [addrfam][attr] and return the results :param attr: attribute name :param value: raw setting value :param addrfam: address family (inet, inet6, ''' valid, _value, errmsg = False, value, 'Unk...
python
def _validate_interface_option(attr, value, addrfam='inet'): '''lookup the validation function for a [addrfam][attr] and return the results :param attr: attribute name :param value: raw setting value :param addrfam: address family (inet, inet6, ''' valid, _value, errmsg = False, value, 'Unk...
[ "def", "_validate_interface_option", "(", "attr", ",", "value", ",", "addrfam", "=", "'inet'", ")", ":", "valid", ",", "_value", ",", "errmsg", "=", "False", ",", "value", ",", "'Unknown validator'", "attrmaps", "=", "ATTRMAPS", ".", "get", "(", "addrfam", ...
lookup the validation function for a [addrfam][attr] and return the results :param attr: attribute name :param value: raw setting value :param addrfam: address family (inet, inet6,
[ "lookup", "the", "validation", "function", "for", "a", "[", "addrfam", "]", "[", "attr", "]", "and", "return", "the", "results" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/debian_ip.py#L523-L538
train
lookup the validation function for a [ addrfam][attr and return the results
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/debian_ip.py
_parse_interfaces
def _parse_interfaces(interface_files=None): ''' Parse /etc/network/interfaces and return current configured interfaces ''' if interface_files is None: interface_files = [] # Add this later. if os.path.exists(_DEB_NETWORK_DIR): interface_files += ['{0}/{1}'.format(_DE...
python
def _parse_interfaces(interface_files=None): ''' Parse /etc/network/interfaces and return current configured interfaces ''' if interface_files is None: interface_files = [] # Add this later. if os.path.exists(_DEB_NETWORK_DIR): interface_files += ['{0}/{1}'.format(_DE...
[ "def", "_parse_interfaces", "(", "interface_files", "=", "None", ")", ":", "if", "interface_files", "is", "None", ":", "interface_files", "=", "[", "]", "# Add this later.", "if", "os", ".", "path", ".", "exists", "(", "_DEB_NETWORK_DIR", ")", ":", "interface_...
Parse /etc/network/interfaces and return current configured interfaces
[ "Parse", "/", "etc", "/", "network", "/", "interfaces", "and", "return", "current", "configured", "interfaces" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/debian_ip.py#L548-L692
train
Parse the interfaces file and return the current configured interfaces
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/debian_ip.py
_parse_ethtool_opts
def _parse_ethtool_opts(opts, iface): ''' Filters given options and outputs valid settings for ETHTOOLS_OPTS If an option has a value that is not expected, this function will log what the Interface, Setting and what it was expecting. ''' config = {} if 'autoneg' in opts: if opts...
python
def _parse_ethtool_opts(opts, iface): ''' Filters given options and outputs valid settings for ETHTOOLS_OPTS If an option has a value that is not expected, this function will log what the Interface, Setting and what it was expecting. ''' config = {} if 'autoneg' in opts: if opts...
[ "def", "_parse_ethtool_opts", "(", "opts", ",", "iface", ")", ":", "config", "=", "{", "}", "if", "'autoneg'", "in", "opts", ":", "if", "opts", "[", "'autoneg'", "]", "in", "_CONFIG_TRUE", ":", "config", ".", "update", "(", "{", "'autoneg'", ":", "'on'...
Filters given options and outputs valid settings for ETHTOOLS_OPTS If an option has a value that is not expected, this function will log what the Interface, Setting and what it was expecting.
[ "Filters", "given", "options", "and", "outputs", "valid", "settings", "for", "ETHTOOLS_OPTS", "If", "an", "option", "has", "a", "value", "that", "is", "not", "expected", "this", "function", "will", "log", "what", "the", "Interface", "Setting", "and", "what", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/debian_ip.py#L695-L736
train
Filters given options and outputs valid settings for ETHTOOLS_OPTS
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/debian_ip.py
_parse_ethtool_pppoe_opts
def _parse_ethtool_pppoe_opts(opts, iface): ''' Filters given options and outputs valid settings for ETHTOOLS_PPPOE_OPTS If an option has a value that is not expected, this function will log what the Interface, Setting and what it was expecting. ''' config = {} for opt in _DEB_CONFIG_PP...
python
def _parse_ethtool_pppoe_opts(opts, iface): ''' Filters given options and outputs valid settings for ETHTOOLS_PPPOE_OPTS If an option has a value that is not expected, this function will log what the Interface, Setting and what it was expecting. ''' config = {} for opt in _DEB_CONFIG_PP...
[ "def", "_parse_ethtool_pppoe_opts", "(", "opts", ",", "iface", ")", ":", "config", "=", "{", "}", "for", "opt", "in", "_DEB_CONFIG_PPPOE_OPTS", ":", "if", "opt", "in", "opts", ":", "config", "[", "opt", "]", "=", "opts", "[", "opt", "]", "if", "'provid...
Filters given options and outputs valid settings for ETHTOOLS_PPPOE_OPTS If an option has a value that is not expected, this function will log what the Interface, Setting and what it was expecting.
[ "Filters", "given", "options", "and", "outputs", "valid", "settings", "for", "ETHTOOLS_PPPOE_OPTS", "If", "an", "option", "has", "a", "value", "that", "is", "not", "expected", "this", "function", "will", "log", "what", "the", "Interface", "Setting", "and", "wh...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/debian_ip.py#L739-L765
train
Filters given options and outputs valid settings for ETHTOOLS_PPPOE_OPTS
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/debian_ip.py
_parse_settings_bond
def _parse_settings_bond(opts, iface): ''' Filters given options and outputs valid settings for requested operation. If an option has a value that is not expected, this function will log what the Interface, Setting and what it was expecting. ''' bond_def = { # 803.ad aggregation sel...
python
def _parse_settings_bond(opts, iface): ''' Filters given options and outputs valid settings for requested operation. If an option has a value that is not expected, this function will log what the Interface, Setting and what it was expecting. ''' bond_def = { # 803.ad aggregation sel...
[ "def", "_parse_settings_bond", "(", "opts", ",", "iface", ")", ":", "bond_def", "=", "{", "# 803.ad aggregation selection logic", "# 0 for stable (default)", "# 1 for bandwidth", "# 2 for count", "'ad_select'", ":", "'0'", ",", "# Max number of transmit queues (default = 16)", ...
Filters given options and outputs valid settings for requested operation. If an option has a value that is not expected, this function will log what the Interface, Setting and what it was expecting.
[ "Filters", "given", "options", "and", "outputs", "valid", "settings", "for", "requested", "operation", ".", "If", "an", "option", "has", "a", "value", "that", "is", "not", "expected", "this", "function", "will", "log", "what", "the", "Interface", "Setting", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/debian_ip.py#L768-L835
train
Filters given options and outputs valid settings for requested operation.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/debian_ip.py
_parse_settings_bond_2
def _parse_settings_bond_2(opts, iface, bond_def): ''' Filters given options and outputs valid settings for bond2. If an option has a value that is not expected, this function will log what the Interface, Setting and what it was expecting. ''' bond = {'mode': '2'} valid = ['list of ips...
python
def _parse_settings_bond_2(opts, iface, bond_def): ''' Filters given options and outputs valid settings for bond2. If an option has a value that is not expected, this function will log what the Interface, Setting and what it was expecting. ''' bond = {'mode': '2'} valid = ['list of ips...
[ "def", "_parse_settings_bond_2", "(", "opts", ",", "iface", ",", "bond_def", ")", ":", "bond", "=", "{", "'mode'", ":", "'2'", "}", "valid", "=", "[", "'list of ips (up to 16)'", "]", "if", "'arp_ip_target'", "in", "opts", ":", "if", "isinstance", "(", "op...
Filters given options and outputs valid settings for bond2. If an option has a value that is not expected, this function will log what the Interface, Setting and what it was expecting.
[ "Filters", "given", "options", "and", "outputs", "valid", "settings", "for", "bond2", ".", "If", "an", "option", "has", "a", "value", "that", "is", "not", "expected", "this", "function", "will", "log", "what", "the", "Interface", "Setting", "and", "what", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/debian_ip.py#L918-L962
train
Filters given options and outputs valid settings for bond2.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/debian_ip.py
_parse_bridge_opts
def _parse_bridge_opts(opts, iface): ''' Filters given options and outputs valid settings for BRIDGING_OPTS If an option has a value that is not expected, this function will log the Interface, Setting and what was expected. ''' config = {} if 'ports' in opts: if isinstance(opts['por...
python
def _parse_bridge_opts(opts, iface): ''' Filters given options and outputs valid settings for BRIDGING_OPTS If an option has a value that is not expected, this function will log the Interface, Setting and what was expected. ''' config = {} if 'ports' in opts: if isinstance(opts['por...
[ "def", "_parse_bridge_opts", "(", "opts", ",", "iface", ")", ":", "config", "=", "{", "}", "if", "'ports'", "in", "opts", ":", "if", "isinstance", "(", "opts", "[", "'ports'", "]", ",", "list", ")", ":", "opts", "[", "'ports'", "]", "=", "' '", "."...
Filters given options and outputs valid settings for BRIDGING_OPTS If an option has a value that is not expected, this function will log the Interface, Setting and what was expected.
[ "Filters", "given", "options", "and", "outputs", "valid", "settings", "for", "BRIDGING_OPTS", "If", "an", "option", "has", "a", "value", "that", "is", "not", "expected", "this", "function", "will", "log", "the", "Interface", "Setting", "and", "what", "was", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/debian_ip.py#L1130-L1198
train
Parses the options and outputs valid settings for BRIDGING_OPTS
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/debian_ip.py
_parse_settings_eth
def _parse_settings_eth(opts, iface_type, enabled, iface): ''' Filters given options and outputs valid settings for a network interface. ''' adapters = salt.utils.odict.OrderedDict() adapters[iface] = salt.utils.odict.OrderedDict() adapters[iface]['type'] = iface_type adapters[iface]['...
python
def _parse_settings_eth(opts, iface_type, enabled, iface): ''' Filters given options and outputs valid settings for a network interface. ''' adapters = salt.utils.odict.OrderedDict() adapters[iface] = salt.utils.odict.OrderedDict() adapters[iface]['type'] = iface_type adapters[iface]['...
[ "def", "_parse_settings_eth", "(", "opts", ",", "iface_type", ",", "enabled", ",", "iface", ")", ":", "adapters", "=", "salt", ".", "utils", ".", "odict", ".", "OrderedDict", "(", ")", "adapters", "[", "iface", "]", "=", "salt", ".", "utils", ".", "odi...
Filters given options and outputs valid settings for a network interface.
[ "Filters", "given", "options", "and", "outputs", "valid", "settings", "for", "a", "network", "interface", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/debian_ip.py#L1201-L1312
train
Filters given options and outputs valid settings for a specific network interface.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/debian_ip.py
_parse_settings_source
def _parse_settings_source(opts, iface_type, enabled, iface): ''' Filters given options and outputs valid settings for a network interface. ''' adapters = salt.utils.odict.OrderedDict() adapters[iface] = salt.utils.odict.OrderedDict() adapters[iface]['type'] = iface_type adapters[iface...
python
def _parse_settings_source(opts, iface_type, enabled, iface): ''' Filters given options and outputs valid settings for a network interface. ''' adapters = salt.utils.odict.OrderedDict() adapters[iface] = salt.utils.odict.OrderedDict() adapters[iface]['type'] = iface_type adapters[iface...
[ "def", "_parse_settings_source", "(", "opts", ",", "iface_type", ",", "enabled", ",", "iface", ")", ":", "adapters", "=", "salt", ".", "utils", ".", "odict", ".", "OrderedDict", "(", ")", "adapters", "[", "iface", "]", "=", "salt", ".", "utils", ".", "...
Filters given options and outputs valid settings for a network interface.
[ "Filters", "given", "options", "and", "outputs", "valid", "settings", "for", "a", "network", "interface", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/debian_ip.py#L1315-L1329
train
Parses the source option of a network interface and returns a dictionary of valid settings for that network interface.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/debian_ip.py
_parse_network_settings
def _parse_network_settings(opts, current): ''' Filters given options and outputs valid settings for the global network settings file. ''' # Normalize keys opts = dict((k.lower(), v) for (k, v) in six.iteritems(opts)) current = dict((k.lower(), v) for (k, v) in six.iteritems(current)) re...
python
def _parse_network_settings(opts, current): ''' Filters given options and outputs valid settings for the global network settings file. ''' # Normalize keys opts = dict((k.lower(), v) for (k, v) in six.iteritems(opts)) current = dict((k.lower(), v) for (k, v) in six.iteritems(current)) re...
[ "def", "_parse_network_settings", "(", "opts", ",", "current", ")", ":", "# Normalize keys", "opts", "=", "dict", "(", "(", "k", ".", "lower", "(", ")", ",", "v", ")", "for", "(", "k", ",", "v", ")", "in", "six", ".", "iteritems", "(", "opts", ")",...
Filters given options and outputs valid settings for the global network settings file.
[ "Filters", "given", "options", "and", "outputs", "valid", "settings", "for", "the", "global", "network", "settings", "file", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/debian_ip.py#L1332-L1375
train
Filters given options and outputs valid settings for the global network settings file.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/debian_ip.py
_parse_routes
def _parse_routes(iface, opts): ''' Filters given options and outputs valid settings for the route settings file. ''' # Normalize keys opts = dict((k.lower(), v) for (k, v) in six.iteritems(opts)) result = {} if 'routes' not in opts: _raise_error_routes(iface, 'routes', 'List of ...
python
def _parse_routes(iface, opts): ''' Filters given options and outputs valid settings for the route settings file. ''' # Normalize keys opts = dict((k.lower(), v) for (k, v) in six.iteritems(opts)) result = {} if 'routes' not in opts: _raise_error_routes(iface, 'routes', 'List of ...
[ "def", "_parse_routes", "(", "iface", ",", "opts", ")", ":", "# Normalize keys", "opts", "=", "dict", "(", "(", "k", ".", "lower", "(", ")", ",", "v", ")", "for", "(", "k", ",", "v", ")", "in", "six", ".", "iteritems", "(", "opts", ")", ")", "r...
Filters given options and outputs valid settings for the route settings file.
[ "Filters", "given", "options", "and", "outputs", "valid", "settings", "for", "the", "route", "settings", "file", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/debian_ip.py#L1378-L1392
train
Filters given options and outputs valid settings for the route settings file.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/debian_ip.py
_write_file
def _write_file(iface, data, folder, pattern): ''' Writes a file to disk ''' filename = os.path.join(folder, pattern.format(iface)) if not os.path.exists(folder): msg = '{0} cannot be written. {1} does not exist' msg = msg.format(filename, folder) log.error(msg) raise...
python
def _write_file(iface, data, folder, pattern): ''' Writes a file to disk ''' filename = os.path.join(folder, pattern.format(iface)) if not os.path.exists(folder): msg = '{0} cannot be written. {1} does not exist' msg = msg.format(filename, folder) log.error(msg) raise...
[ "def", "_write_file", "(", "iface", ",", "data", ",", "folder", ",", "pattern", ")", ":", "filename", "=", "os", ".", "path", ".", "join", "(", "folder", ",", "pattern", ".", "format", "(", "iface", ")", ")", "if", "not", "os", ".", "path", ".", ...
Writes a file to disk
[ "Writes", "a", "file", "to", "disk" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/debian_ip.py#L1395-L1407
train
Writes a file to disk
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/debian_ip.py
_write_file_network
def _write_file_network(data, filename, create=False): ''' Writes a file to disk If file does not exist, only create if create argument is True ''' if not os.path.exists(filename) and not create: msg = '{0} cannot be written. {0} does not exist\ and create is set to False...
python
def _write_file_network(data, filename, create=False): ''' Writes a file to disk If file does not exist, only create if create argument is True ''' if not os.path.exists(filename) and not create: msg = '{0} cannot be written. {0} does not exist\ and create is set to False...
[ "def", "_write_file_network", "(", "data", ",", "filename", ",", "create", "=", "False", ")", ":", "if", "not", "os", ".", "path", ".", "exists", "(", "filename", ")", "and", "not", "create", ":", "msg", "=", "'{0} cannot be written. {0} does not exist\\\n ...
Writes a file to disk If file does not exist, only create if create argument is True
[ "Writes", "a", "file", "to", "disk", "If", "file", "does", "not", "exist", "only", "create", "if", "create", "argument", "is", "True" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/debian_ip.py#L1437-L1450
train
Writes a file to disk
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/debian_ip.py
_read_temp
def _read_temp(data): ''' Return what would be written to disk ''' tout = StringIO() tout.write(data) tout.seek(0) output = tout.readlines() tout.close() return output
python
def _read_temp(data): ''' Return what would be written to disk ''' tout = StringIO() tout.write(data) tout.seek(0) output = tout.readlines() tout.close() return output
[ "def", "_read_temp", "(", "data", ")", ":", "tout", "=", "StringIO", "(", ")", "tout", ".", "write", "(", "data", ")", "tout", ".", "seek", "(", "0", ")", "output", "=", "tout", ".", "readlines", "(", ")", "tout", ".", "close", "(", ")", "return"...
Return what would be written to disk
[ "Return", "what", "would", "be", "written", "to", "disk" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/debian_ip.py#L1453-L1463
train
Read a temp file and return what would be written to disk
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/debian_ip.py
_read_temp_ifaces
def _read_temp_ifaces(iface, data): ''' Return what would be written to disk for interfaces ''' try: template = JINJA.get_template('debian_eth.jinja') except jinja2.exceptions.TemplateNotFound: log.error('Could not load template debian_eth.jinja') return '' ifcfg = templ...
python
def _read_temp_ifaces(iface, data): ''' Return what would be written to disk for interfaces ''' try: template = JINJA.get_template('debian_eth.jinja') except jinja2.exceptions.TemplateNotFound: log.error('Could not load template debian_eth.jinja') return '' ifcfg = templ...
[ "def", "_read_temp_ifaces", "(", "iface", ",", "data", ")", ":", "try", ":", "template", "=", "JINJA", ".", "get_template", "(", "'debian_eth.jinja'", ")", "except", "jinja2", ".", "exceptions", ".", "TemplateNotFound", ":", "log", ".", "error", "(", "'Could...
Return what would be written to disk for interfaces
[ "Return", "what", "would", "be", "written", "to", "disk", "for", "interfaces" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/debian_ip.py#L1466-L1478
train
Return what would be written to disk for interfaces
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/debian_ip.py
_write_file_ifaces
def _write_file_ifaces(iface, data, **settings): ''' Writes a file to disk ''' try: eth_template = JINJA.get_template('debian_eth.jinja') source_template = JINJA.get_template('debian_source.jinja') except jinja2.exceptions.TemplateNotFound: log.error('Could not load template ...
python
def _write_file_ifaces(iface, data, **settings): ''' Writes a file to disk ''' try: eth_template = JINJA.get_template('debian_eth.jinja') source_template = JINJA.get_template('debian_source.jinja') except jinja2.exceptions.TemplateNotFound: log.error('Could not load template ...
[ "def", "_write_file_ifaces", "(", "iface", ",", "data", ",", "*", "*", "settings", ")", ":", "try", ":", "eth_template", "=", "JINJA", ".", "get_template", "(", "'debian_eth.jinja'", ")", "source_template", "=", "JINJA", ".", "get_template", "(", "'debian_sour...
Writes a file to disk
[ "Writes", "a", "file", "to", "disk" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/debian_ip.py#L1481-L1532
train
Writes a file to disk
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/debian_ip.py
_write_file_ppp_ifaces
def _write_file_ppp_ifaces(iface, data): ''' Writes a file to disk ''' try: template = JINJA.get_template('debian_ppp_eth.jinja') except jinja2.exceptions.TemplateNotFound: log.error('Could not load template debian_ppp_eth.jinja') return '' adapters = _parse_interfaces()...
python
def _write_file_ppp_ifaces(iface, data): ''' Writes a file to disk ''' try: template = JINJA.get_template('debian_ppp_eth.jinja') except jinja2.exceptions.TemplateNotFound: log.error('Could not load template debian_ppp_eth.jinja') return '' adapters = _parse_interfaces()...
[ "def", "_write_file_ppp_ifaces", "(", "iface", ",", "data", ")", ":", "try", ":", "template", "=", "JINJA", ".", "get_template", "(", "'debian_ppp_eth.jinja'", ")", "except", "jinja2", ".", "exceptions", ".", "TemplateNotFound", ":", "log", ".", "error", "(", ...
Writes a file to disk
[ "Writes", "a", "file", "to", "disk" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/debian_ip.py#L1535-L1562
train
Writes a file to disk
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/debian_ip.py
build_bond
def build_bond(iface, **settings): ''' Create a bond script in /etc/modprobe.d with the passed settings and load the bonding kernel module. CLI Example: .. code-block:: bash salt '*' ip.build_bond bond0 mode=balance-alb ''' deb_major = __grains__['osrelease'][:1] opts = _pars...
python
def build_bond(iface, **settings): ''' Create a bond script in /etc/modprobe.d with the passed settings and load the bonding kernel module. CLI Example: .. code-block:: bash salt '*' ip.build_bond bond0 mode=balance-alb ''' deb_major = __grains__['osrelease'][:1] opts = _pars...
[ "def", "build_bond", "(", "iface", ",", "*", "*", "settings", ")", ":", "deb_major", "=", "__grains__", "[", "'osrelease'", "]", "[", ":", "1", "]", "opts", "=", "_parse_settings_bond", "(", "settings", ",", "iface", ")", "try", ":", "template", "=", "...
Create a bond script in /etc/modprobe.d with the passed settings and load the bonding kernel module. CLI Example: .. code-block:: bash salt '*' ip.build_bond bond0 mode=balance-alb
[ "Create", "a", "bond", "script", "in", "/", "etc", "/", "modprobe", ".", "d", "with", "the", "passed", "settings", "and", "load", "the", "bonding", "kernel", "module", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/debian_ip.py#L1565-L1604
train
Build a bond for the given interface.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/debian_ip.py
build_interface
def build_interface(iface, iface_type, enabled, **settings): ''' Build an interface script for a network interface. CLI Example: .. code-block:: bash salt '*' ip.build_interface eth0 eth <settings> ''' iface_type = iface_type.lower() if iface_type not in _IFACE_TYPES: _r...
python
def build_interface(iface, iface_type, enabled, **settings): ''' Build an interface script for a network interface. CLI Example: .. code-block:: bash salt '*' ip.build_interface eth0 eth <settings> ''' iface_type = iface_type.lower() if iface_type not in _IFACE_TYPES: _r...
[ "def", "build_interface", "(", "iface", ",", "iface_type", ",", "enabled", ",", "*", "*", "settings", ")", ":", "iface_type", "=", "iface_type", ".", "lower", "(", ")", "if", "iface_type", "not", "in", "_IFACE_TYPES", ":", "_raise_error_iface", "(", "iface",...
Build an interface script for a network interface. CLI Example: .. code-block:: bash salt '*' ip.build_interface eth0 eth <settings>
[ "Build", "an", "interface", "script", "for", "a", "network", "interface", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/debian_ip.py#L1607-L1670
train
Build an interface script for a network interface.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/debian_ip.py
build_routes
def build_routes(iface, **settings): ''' Add route scripts for a network interface using up commands. CLI Example: .. code-block:: bash salt '*' ip.build_routes eth0 <settings> ''' opts = _parse_routes(iface, settings) try: template = JINJA.get_template('route_eth.jinja')...
python
def build_routes(iface, **settings): ''' Add route scripts for a network interface using up commands. CLI Example: .. code-block:: bash salt '*' ip.build_routes eth0 <settings> ''' opts = _parse_routes(iface, settings) try: template = JINJA.get_template('route_eth.jinja')...
[ "def", "build_routes", "(", "iface", ",", "*", "*", "settings", ")", ":", "opts", "=", "_parse_routes", "(", "iface", ",", "settings", ")", "try", ":", "template", "=", "JINJA", ".", "get_template", "(", "'route_eth.jinja'", ")", "except", "jinja2", ".", ...
Add route scripts for a network interface using up commands. CLI Example: .. code-block:: bash salt '*' ip.build_routes eth0 <settings>
[ "Add", "route", "scripts", "for", "a", "network", "interface", "using", "up", "commands", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/debian_ip.py#L1673-L1714
train
Build the routes script for a network interface using up commands.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/debian_ip.py
get_bond
def get_bond(iface): ''' Return the content of a bond script CLI Example: .. code-block:: bash salt '*' ip.get_bond bond0 ''' path = os.path.join(_DEB_NETWORK_CONF_FILES, '{0}.conf'.format(iface)) return _read_file(path)
python
def get_bond(iface): ''' Return the content of a bond script CLI Example: .. code-block:: bash salt '*' ip.get_bond bond0 ''' path = os.path.join(_DEB_NETWORK_CONF_FILES, '{0}.conf'.format(iface)) return _read_file(path)
[ "def", "get_bond", "(", "iface", ")", ":", "path", "=", "os", ".", "path", ".", "join", "(", "_DEB_NETWORK_CONF_FILES", ",", "'{0}.conf'", ".", "format", "(", "iface", ")", ")", "return", "_read_file", "(", "path", ")" ]
Return the content of a bond script CLI Example: .. code-block:: bash salt '*' ip.get_bond bond0
[ "Return", "the", "content", "of", "a", "bond", "script" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/debian_ip.py#L1734-L1745
train
Get the content of a bond script CLI Example : bash salt '*' ip. get_bond bond0
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/debian_ip.py
get_interface
def get_interface(iface): ''' Return the contents of an interface script CLI Example: .. code-block:: bash salt '*' ip.get_interface eth0 ''' adapters = _parse_interfaces() if iface in adapters: try: if iface == 'source': template = JINJA.get_t...
python
def get_interface(iface): ''' Return the contents of an interface script CLI Example: .. code-block:: bash salt '*' ip.get_interface eth0 ''' adapters = _parse_interfaces() if iface in adapters: try: if iface == 'source': template = JINJA.get_t...
[ "def", "get_interface", "(", "iface", ")", ":", "adapters", "=", "_parse_interfaces", "(", ")", "if", "iface", "in", "adapters", ":", "try", ":", "if", "iface", "==", "'source'", ":", "template", "=", "JINJA", ".", "get_template", "(", "'debian_source.jinja'...
Return the contents of an interface script CLI Example: .. code-block:: bash salt '*' ip.get_interface eth0
[ "Return", "the", "contents", "of", "an", "interface", "script" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/debian_ip.py#L1748-L1775
train
Returns the contents of an interface script CLI Example : bash salt '*' ip. get_interface eth0
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/debian_ip.py
get_network_settings
def get_network_settings(): ''' Return the contents of the global network script. CLI Example: .. code-block:: bash salt '*' ip.get_network_settings ''' skip_etc_default_networking = ( __grains__['osfullname'] == 'Ubuntu' and int(__grains__['osrelease'].split('.')[0]) ...
python
def get_network_settings(): ''' Return the contents of the global network script. CLI Example: .. code-block:: bash salt '*' ip.get_network_settings ''' skip_etc_default_networking = ( __grains__['osfullname'] == 'Ubuntu' and int(__grains__['osrelease'].split('.')[0]) ...
[ "def", "get_network_settings", "(", ")", ":", "skip_etc_default_networking", "=", "(", "__grains__", "[", "'osfullname'", "]", "==", "'Ubuntu'", "and", "int", "(", "__grains__", "[", "'osrelease'", "]", ".", "split", "(", "'.'", ")", "[", "0", "]", ")", ">...
Return the contents of the global network script. CLI Example: .. code-block:: bash salt '*' ip.get_network_settings
[ "Return", "the", "contents", "of", "the", "global", "network", "script", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/debian_ip.py#L1795-L1837
train
Return the contents of the global network script.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/debian_ip.py
get_routes
def get_routes(iface): ''' Return the routes for the interface CLI Example: .. code-block:: bash salt '*' ip.get_routes eth0 ''' filename = os.path.join(_DEB_NETWORK_UP_DIR, 'route-{0}'.format(iface)) results = _read_file(filename) filename = os.path.join(_DEB_NETWORK_DOWN_D...
python
def get_routes(iface): ''' Return the routes for the interface CLI Example: .. code-block:: bash salt '*' ip.get_routes eth0 ''' filename = os.path.join(_DEB_NETWORK_UP_DIR, 'route-{0}'.format(iface)) results = _read_file(filename) filename = os.path.join(_DEB_NETWORK_DOWN_D...
[ "def", "get_routes", "(", "iface", ")", ":", "filename", "=", "os", ".", "path", ".", "join", "(", "_DEB_NETWORK_UP_DIR", ",", "'route-{0}'", ".", "format", "(", "iface", ")", ")", "results", "=", "_read_file", "(", "filename", ")", "filename", "=", "os"...
Return the routes for the interface CLI Example: .. code-block:: bash salt '*' ip.get_routes eth0
[ "Return", "the", "routes", "for", "the", "interface" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/debian_ip.py#L1840-L1857
train
Get the routes for the interface CLI Example : bash salt '*' ip. get_routes eth0
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/debian_ip.py
apply_network_settings
def apply_network_settings(**settings): ''' Apply global network configuration. CLI Example: .. code-block:: bash salt '*' ip.apply_network_settings ''' if 'require_reboot' not in settings: settings['require_reboot'] = False if 'apply_hostname' not in settings: se...
python
def apply_network_settings(**settings): ''' Apply global network configuration. CLI Example: .. code-block:: bash salt '*' ip.apply_network_settings ''' if 'require_reboot' not in settings: settings['require_reboot'] = False if 'apply_hostname' not in settings: se...
[ "def", "apply_network_settings", "(", "*", "*", "settings", ")", ":", "if", "'require_reboot'", "not", "in", "settings", ":", "settings", "[", "'require_reboot'", "]", "=", "False", "if", "'apply_hostname'", "not", "in", "settings", ":", "settings", "[", "'app...
Apply global network configuration. CLI Example: .. code-block:: bash salt '*' ip.apply_network_settings
[ "Apply", "global", "network", "configuration", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/debian_ip.py#L1860-L1899
train
Apply global network configuration.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/debian_ip.py
build_network_settings
def build_network_settings(**settings): ''' Build the global network script. CLI Example: .. code-block:: bash salt '*' ip.build_network_settings <settings> ''' changes = [] # Read current configuration and store default values current_network_settings = _parse_current_networ...
python
def build_network_settings(**settings): ''' Build the global network script. CLI Example: .. code-block:: bash salt '*' ip.build_network_settings <settings> ''' changes = [] # Read current configuration and store default values current_network_settings = _parse_current_networ...
[ "def", "build_network_settings", "(", "*", "*", "settings", ")", ":", "changes", "=", "[", "]", "# Read current configuration and store default values", "current_network_settings", "=", "_parse_current_network_settings", "(", ")", "# Build settings", "opts", "=", "_parse_ne...
Build the global network script. CLI Example: .. code-block:: bash salt '*' ip.build_network_settings <settings>
[ "Build", "the", "global", "network", "script", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/debian_ip.py#L1902-L2024
train
Build the global network script.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/environ.py
setval
def setval(key, val, false_unsets=False, permanent=False): ''' Set a single salt process environment variable. Returns True on success. key The environment key to set. Must be a string. val The value to set. Must be a string or False. Refer to the 'false_unsets' parameter f...
python
def setval(key, val, false_unsets=False, permanent=False): ''' Set a single salt process environment variable. Returns True on success. key The environment key to set. Must be a string. val The value to set. Must be a string or False. Refer to the 'false_unsets' parameter f...
[ "def", "setval", "(", "key", ",", "val", ",", "false_unsets", "=", "False", ",", "permanent", "=", "False", ")", ":", "is_windows", "=", "salt", ".", "utils", ".", "platform", ".", "is_windows", "(", ")", "if", "is_windows", ":", "permanent_hive", "=", ...
Set a single salt process environment variable. Returns True on success. key The environment key to set. Must be a string. val The value to set. Must be a string or False. Refer to the 'false_unsets' parameter for behavior when set to False. false_unsets If val is Fals...
[ "Set", "a", "single", "salt", "process", "environment", "variable", ".", "Returns", "True", "on", "success", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/environ.py#L27-L105
train
Sets a single salt process environment variable. Returns True on success Returns False on failure
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/environ.py
setenv
def setenv(environ, false_unsets=False, clear_all=False, update_minion=False, permanent=False): ''' Set multiple salt process environment variables from a dict. Returns a dict. environ Must be a dict. The top-level keys of the dict are the names of the environment variables to set. Each...
python
def setenv(environ, false_unsets=False, clear_all=False, update_minion=False, permanent=False): ''' Set multiple salt process environment variables from a dict. Returns a dict. environ Must be a dict. The top-level keys of the dict are the names of the environment variables to set. Each...
[ "def", "setenv", "(", "environ", ",", "false_unsets", "=", "False", ",", "clear_all", "=", "False", ",", "update_minion", "=", "False", ",", "permanent", "=", "False", ")", ":", "ret", "=", "{", "}", "if", "not", "isinstance", "(", "environ", ",", "dic...
Set multiple salt process environment variables from a dict. Returns a dict. environ Must be a dict. The top-level keys of the dict are the names of the environment variables to set. Each key's value must be a string or False. Refer to the 'false_unsets' parameter for behavior w...
[ "Set", "multiple", "salt", "process", "environment", "variables", "from", "a", "dict", ".", "Returns", "a", "dict", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/environ.py#L108-L186
train
Set multiple salt process environment variables from a dict.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/environ.py
get
def get(key, default=''): ''' Get a single salt process environment variable. key String used as the key for environment lookup. default If the key is not found in the environment, return this value. Default: '' CLI Example: .. code-block:: bash salt '*' env...
python
def get(key, default=''): ''' Get a single salt process environment variable. key String used as the key for environment lookup. default If the key is not found in the environment, return this value. Default: '' CLI Example: .. code-block:: bash salt '*' env...
[ "def", "get", "(", "key", ",", "default", "=", "''", ")", ":", "if", "not", "isinstance", "(", "key", ",", "six", ".", "string_types", ")", ":", "log", ".", "debug", "(", "'%s: \\'key\\' argument is not a string type: \\'%s\\''", ",", "__name__", ",", "key",...
Get a single salt process environment variable. key String used as the key for environment lookup. default If the key is not found in the environment, return this value. Default: '' CLI Example: .. code-block:: bash salt '*' environ.get foo salt '*' environ....
[ "Get", "a", "single", "salt", "process", "environment", "variable", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/environ.py#L189-L211
train
Get a single salt process environment variable.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/environ.py
has_value
def has_value(key, value=None): ''' Determine whether the key exists in the current salt process environment dictionary. Optionally compare the current value of the environment against the supplied value string. key Must be a string. Used as key for environment lookup. value: O...
python
def has_value(key, value=None): ''' Determine whether the key exists in the current salt process environment dictionary. Optionally compare the current value of the environment against the supplied value string. key Must be a string. Used as key for environment lookup. value: O...
[ "def", "has_value", "(", "key", ",", "value", "=", "None", ")", ":", "if", "not", "isinstance", "(", "key", ",", "six", ".", "string_types", ")", ":", "log", ".", "debug", "(", "'%s: \\'key\\' argument is not a string type: \\'%s\\''", ",", "__name__", ",", ...
Determine whether the key exists in the current salt process environment dictionary. Optionally compare the current value of the environment against the supplied value string. key Must be a string. Used as key for environment lookup. value: Optional. If key exists in the environment, c...
[ "Determine", "whether", "the", "key", "exists", "in", "the", "current", "salt", "process", "environment", "dictionary", ".", "Optionally", "compare", "the", "current", "value", "of", "the", "environment", "against", "the", "supplied", "value", "string", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/environ.py#L214-L245
train
Determines whether the specified key exists in the salt process environment dictionary. Optionally compare the current value of the environment dictionary against the supplied value string.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/environ.py
item
def item(keys, default=''): ''' Get one or more salt process environment variables. Returns a dict. keys Either a string or a list of strings that will be used as the keys for environment lookup. default If the key is not found in the environment, return this value. ...
python
def item(keys, default=''): ''' Get one or more salt process environment variables. Returns a dict. keys Either a string or a list of strings that will be used as the keys for environment lookup. default If the key is not found in the environment, return this value. ...
[ "def", "item", "(", "keys", ",", "default", "=", "''", ")", ":", "ret", "=", "{", "}", "key_list", "=", "[", "]", "if", "isinstance", "(", "keys", ",", "six", ".", "string_types", ")", ":", "key_list", ".", "append", "(", "keys", ")", "elif", "is...
Get one or more salt process environment variables. Returns a dict. keys Either a string or a list of strings that will be used as the keys for environment lookup. default If the key is not found in the environment, return this value. Default: '' CLI Example: .. c...
[ "Get", "one", "or", "more", "salt", "process", "environment", "variables", ".", "Returns", "a", "dict", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/environ.py#L248-L281
train
Returns a dict. The keys argument can be a string or a list of strings that will be used as the AttributeNames key for environment lookup.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/pillar/svn_pillar.py
_extract_key_val
def _extract_key_val(kv, delimiter='='): '''Extract key and value from key=val string. Example: >>> _extract_key_val('foo=bar') ('foo', 'bar') ''' pieces = kv.split(delimiter) key = pieces[0] val = delimiter.join(pieces[1:]) return key, val
python
def _extract_key_val(kv, delimiter='='): '''Extract key and value from key=val string. Example: >>> _extract_key_val('foo=bar') ('foo', 'bar') ''' pieces = kv.split(delimiter) key = pieces[0] val = delimiter.join(pieces[1:]) return key, val
[ "def", "_extract_key_val", "(", "kv", ",", "delimiter", "=", "'='", ")", ":", "pieces", "=", "kv", ".", "split", "(", "delimiter", ")", "key", "=", "pieces", "[", "0", "]", "val", "=", "delimiter", ".", "join", "(", "pieces", "[", "1", ":", "]", ...
Extract key and value from key=val string. Example: >>> _extract_key_val('foo=bar') ('foo', 'bar')
[ "Extract", "key", "and", "value", "from", "key", "=", "val", "string", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/svn_pillar.py#L148-L158
train
Extract key and value from key = val string.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/pillar/svn_pillar.py
ext_pillar
def ext_pillar(minion_id, pillar, # pylint: disable=W0613 repo_string): ''' Execute a command and read the output as YAML ''' # split the branch, repo name and optional extra (key=val) parameters. options = repo_string.strip().split() branch = options[0] repo_l...
python
def ext_pillar(minion_id, pillar, # pylint: disable=W0613 repo_string): ''' Execute a command and read the output as YAML ''' # split the branch, repo name and optional extra (key=val) parameters. options = repo_string.strip().split() branch = options[0] repo_l...
[ "def", "ext_pillar", "(", "minion_id", ",", "pillar", ",", "# pylint: disable=W0613", "repo_string", ")", ":", "# split the branch, repo name and optional extra (key=val) parameters.", "options", "=", "repo_string", ".", "strip", "(", ")", ".", "split", "(", ")", "branc...
Execute a command and read the output as YAML
[ "Execute", "a", "command", "and", "read", "the", "output", "as", "YAML" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/svn_pillar.py#L161-L201
train
Execute a command and read the output as YAML
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/pillar/svn_pillar.py
SvnPillar.pillar_dir
def pillar_dir(self): ''' Returns the directory of the pillars (repo cache + branch + root) ''' repo_dir = self.repo_dir root = self.root branch = self.branch if branch == 'trunk' or branch == 'base': working_dir = os.path.join(repo_dir, 'trunk', root)...
python
def pillar_dir(self): ''' Returns the directory of the pillars (repo cache + branch + root) ''' repo_dir = self.repo_dir root = self.root branch = self.branch if branch == 'trunk' or branch == 'base': working_dir = os.path.join(repo_dir, 'trunk', root)...
[ "def", "pillar_dir", "(", "self", ")", ":", "repo_dir", "=", "self", ".", "repo_dir", "root", "=", "self", ".", "root", "branch", "=", "self", ".", "branch", "if", "branch", "==", "'trunk'", "or", "branch", "==", "'base'", ":", "working_dir", "=", "os"...
Returns the directory of the pillars (repo cache + branch + root)
[ "Returns", "the", "directory", "of", "the", "pillars", "(", "repo", "cache", "+", "branch", "+", "root", ")" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/svn_pillar.py#L125-L145
train
Returns the directory of the pillar files for the current cache entry.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/pillar/virtkey.py
ext_pillar
def ext_pillar(hyper_id, pillar, name, key): ''' Accept the key for the VM on the hyper, if authorized. ''' vk = salt.utils.virt.VirtKey(hyper_id, name, __opts__) ok = vk.accept(key) pillar['virtkey'] = {name: ok} return {}
python
def ext_pillar(hyper_id, pillar, name, key): ''' Accept the key for the VM on the hyper, if authorized. ''' vk = salt.utils.virt.VirtKey(hyper_id, name, __opts__) ok = vk.accept(key) pillar['virtkey'] = {name: ok} return {}
[ "def", "ext_pillar", "(", "hyper_id", ",", "pillar", ",", "name", ",", "key", ")", ":", "vk", "=", "salt", ".", "utils", ".", "virt", ".", "VirtKey", "(", "hyper_id", ",", "name", ",", "__opts__", ")", "ok", "=", "vk", ".", "accept", "(", "key", ...
Accept the key for the VM on the hyper, if authorized.
[ "Accept", "the", "key", "for", "the", "VM", "on", "the", "hyper", "if", "authorized", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/virtkey.py#L21-L28
train
Update the pillar with the key for the VM on the hyper if authorized.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/lvm.py
pv_present
def pv_present(name, **kwargs): ''' Set a Physical Device to be used as an LVM Physical Volume name The device name to initialize. kwargs Any supported options to pvcreate. See :mod:`linux_lvm <salt.modules.linux_lvm>` for more details. ''' ret = {'changes': {}, ...
python
def pv_present(name, **kwargs): ''' Set a Physical Device to be used as an LVM Physical Volume name The device name to initialize. kwargs Any supported options to pvcreate. See :mod:`linux_lvm <salt.modules.linux_lvm>` for more details. ''' ret = {'changes': {}, ...
[ "def", "pv_present", "(", "name", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'changes'", ":", "{", "}", ",", "'comment'", ":", "''", ",", "'name'", ":", "name", ",", "'result'", ":", "True", "}", "if", "__salt__", "[", "'lvm.pvdisplay'", ...
Set a Physical Device to be used as an LVM Physical Volume name The device name to initialize. kwargs Any supported options to pvcreate. See :mod:`linux_lvm <salt.modules.linux_lvm>` for more details.
[ "Set", "a", "Physical", "Device", "to", "be", "used", "as", "an", "LVM", "Physical", "Volume" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/lvm.py#L43-L74
train
Ensure that a Physical Device is present in the LVM Physical Volume table.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/lvm.py
pv_absent
def pv_absent(name): ''' Ensure that a Physical Device is not being used by lvm name The device name to initialize. ''' ret = {'changes': {}, 'comment': '', 'name': name, 'result': True} if not __salt__['lvm.pvdisplay'](name, quiet=True): ret['c...
python
def pv_absent(name): ''' Ensure that a Physical Device is not being used by lvm name The device name to initialize. ''' ret = {'changes': {}, 'comment': '', 'name': name, 'result': True} if not __salt__['lvm.pvdisplay'](name, quiet=True): ret['c...
[ "def", "pv_absent", "(", "name", ")", ":", "ret", "=", "{", "'changes'", ":", "{", "}", ",", "'comment'", ":", "''", ",", "'name'", ":", "name", ",", "'result'", ":", "True", "}", "if", "not", "__salt__", "[", "'lvm.pvdisplay'", "]", "(", "name", "...
Ensure that a Physical Device is not being used by lvm name The device name to initialize.
[ "Ensure", "that", "a", "Physical", "Device", "is", "not", "being", "used", "by", "lvm" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/lvm.py#L77-L104
train
Ensure that a Physical Device is not being used by lvm ridge
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/lvm.py
vg_present
def vg_present(name, devices=None, **kwargs): ''' Create an LVM Volume Group name The Volume Group name to create devices A list of devices that will be added to the Volume Group kwargs Any supported options to vgcreate. See :mod:`linux_lvm <salt.modules.linux_lvm>...
python
def vg_present(name, devices=None, **kwargs): ''' Create an LVM Volume Group name The Volume Group name to create devices A list of devices that will be added to the Volume Group kwargs Any supported options to vgcreate. See :mod:`linux_lvm <salt.modules.linux_lvm>...
[ "def", "vg_present", "(", "name", ",", "devices", "=", "None", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'changes'", ":", "{", "}", ",", "'comment'", ":", "''", ",", "'name'", ":", "name", ",", "'result'", ":", "True", "}", "if", "isin...
Create an LVM Volume Group name The Volume Group name to create devices A list of devices that will be added to the Volume Group kwargs Any supported options to vgcreate. See :mod:`linux_lvm <salt.modules.linux_lvm>` for more details.
[ "Create", "an", "LVM", "Volume", "Group" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/lvm.py#L107-L173
train
Ensure a new LVM Volume Group is present on the specified devices.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/lvm.py
lv_present
def lv_present(name, vgname=None, size=None, extents=None, snapshot=None, pv='', thinvolume=False, thinpool=False, force=False, **kwargs): ''' Create a new Logical Volume n...
python
def lv_present(name, vgname=None, size=None, extents=None, snapshot=None, pv='', thinvolume=False, thinpool=False, force=False, **kwargs): ''' Create a new Logical Volume n...
[ "def", "lv_present", "(", "name", ",", "vgname", "=", "None", ",", "size", "=", "None", ",", "extents", "=", "None", ",", "snapshot", "=", "None", ",", "pv", "=", "''", ",", "thinvolume", "=", "False", ",", "thinpool", "=", "False", ",", "force", "...
Create a new Logical Volume name The name of the Logical Volume vgname The name of the Volume Group on which the Logical Volume resides size The initial size of the Logical Volume extents The number of logical extents to allocate snapshot The name of the ...
[ "Create", "a", "new", "Logical", "Volume" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/lvm.py#L206-L295
train
Ensure that a Logical Volume is present on the specified Logical Volume Group.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/lvm.py
lv_absent
def lv_absent(name, vgname=None): ''' Remove a given existing Logical Volume from a named existing volume group name The Logical Volume to remove vgname The name of the Volume Group on which the Logical Volume resides ''' ret = {'changes': {}, 'comment': '', ...
python
def lv_absent(name, vgname=None): ''' Remove a given existing Logical Volume from a named existing volume group name The Logical Volume to remove vgname The name of the Volume Group on which the Logical Volume resides ''' ret = {'changes': {}, 'comment': '', ...
[ "def", "lv_absent", "(", "name", ",", "vgname", "=", "None", ")", ":", "ret", "=", "{", "'changes'", ":", "{", "}", ",", "'comment'", ":", "''", ",", "'name'", ":", "name", ",", "'result'", ":", "True", "}", "lvpath", "=", "'/dev/{0}/{1}'", ".", "f...
Remove a given existing Logical Volume from a named existing volume group name The Logical Volume to remove vgname The name of the Volume Group on which the Logical Volume resides
[ "Remove", "a", "given", "existing", "Logical", "Volume", "from", "a", "named", "existing", "volume", "group" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/lvm.py#L298-L329
train
Ensure a given Logical Volume is absent from a named existing volume group.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/sdb/consul.py
get_conn
def get_conn(profile): ''' Return a client object for accessing consul ''' params = {} for key in ('host', 'port', 'token', 'scheme', 'consistency', 'dc', 'verify'): if key in profile: params[key] = profile[key] if HAS_CONSUL: return consul.Consul(**params) else:...
python
def get_conn(profile): ''' Return a client object for accessing consul ''' params = {} for key in ('host', 'port', 'token', 'scheme', 'consistency', 'dc', 'verify'): if key in profile: params[key] = profile[key] if HAS_CONSUL: return consul.Consul(**params) else:...
[ "def", "get_conn", "(", "profile", ")", ":", "params", "=", "{", "}", "for", "key", "in", "(", "'host'", ",", "'port'", ",", "'token'", ",", "'scheme'", ",", "'consistency'", ",", "'dc'", ",", "'verify'", ")", ":", "if", "key", "in", "profile", ":", ...
Return a client object for accessing consul
[ "Return", "a", "client", "object", "for", "accessing", "consul" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/sdb/consul.py#L66-L81
train
Return a client object for accessing consul
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/returners/kafka_return.py
_delivery_report
def _delivery_report(err, msg): ''' Called once for each message produced to indicate delivery result. Triggered by poll() or flush(). ''' if err is not None: log.error('Message delivery failed: %s', err) else: log.debug('Message delivered to %s [%s]', msg.topic(), msg.partition())
python
def _delivery_report(err, msg): ''' Called once for each message produced to indicate delivery result. Triggered by poll() or flush(). ''' if err is not None: log.error('Message delivery failed: %s', err) else: log.debug('Message delivered to %s [%s]', msg.topic(), msg.partition())
[ "def", "_delivery_report", "(", "err", ",", "msg", ")", ":", "if", "err", "is", "not", "None", ":", "log", ".", "error", "(", "'Message delivery failed: %s'", ",", "err", ")", "else", ":", "log", ".", "debug", "(", "'Message delivered to %s [%s]'", ",", "m...
Called once for each message produced to indicate delivery result. Triggered by poll() or flush().
[ "Called", "once", "for", "each", "message", "produced", "to", "indicate", "delivery", "result", ".", "Triggered", "by", "poll", "()", "or", "flush", "()", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/kafka_return.py#L61-L67
train
Called once for each message produced to indicate delivery result.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/returners/kafka_return.py
returner
def returner(ret): ''' Return information to a Kafka server ''' if __salt__['config.option']('returner.kafka.topic'): topic = __salt__['config.option']('returner.kafka.topic') conn = _get_conn() producer = Producer({'bootstrap.servers': conn}) producer.poll(0) pr...
python
def returner(ret): ''' Return information to a Kafka server ''' if __salt__['config.option']('returner.kafka.topic'): topic = __salt__['config.option']('returner.kafka.topic') conn = _get_conn() producer = Producer({'bootstrap.servers': conn}) producer.poll(0) pr...
[ "def", "returner", "(", "ret", ")", ":", "if", "__salt__", "[", "'config.option'", "]", "(", "'returner.kafka.topic'", ")", ":", "topic", "=", "__salt__", "[", "'config.option'", "]", "(", "'returner.kafka.topic'", ")", "conn", "=", "_get_conn", "(", ")", "p...
Return information to a Kafka server
[ "Return", "information", "to", "a", "Kafka", "server" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/kafka_return.py#L70-L84
train
Return information to a Kafka server
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/composer.py
installed
def installed(name, composer=None, php=None, user=None, prefer_source=None, prefer_dist=None, no_scripts=None, no_plugins=None, optimize=None, no_dev=None, quiet=False, ...
python
def installed(name, composer=None, php=None, user=None, prefer_source=None, prefer_dist=None, no_scripts=None, no_plugins=None, optimize=None, no_dev=None, quiet=False, ...
[ "def", "installed", "(", "name", ",", "composer", "=", "None", ",", "php", "=", "None", ",", "user", "=", "None", ",", "prefer_source", "=", "None", ",", "prefer_dist", "=", "None", ",", "no_scripts", "=", "None", ",", "no_plugins", "=", "None", ",", ...
Verify that the correct versions of composer dependencies are present. name Directory location of the ``composer.json`` file. composer Location of the ``composer.phar`` file. If not set composer will just execute ``composer`` as if it is installed globally. (i.e. ``/path/to/com...
[ "Verify", "that", "the", "correct", "versions", "of", "composer", "dependencies", "are", "present", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/composer.py#L53-L182
train
Return a new version of the given composer. json file.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/composer.py
update
def update(name, composer=None, php=None, user=None, prefer_source=None, prefer_dist=None, no_scripts=None, no_plugins=None, optimize=None, no_dev=None, quiet=False, composer_home='/root', ...
python
def update(name, composer=None, php=None, user=None, prefer_source=None, prefer_dist=None, no_scripts=None, no_plugins=None, optimize=None, no_dev=None, quiet=False, composer_home='/root', ...
[ "def", "update", "(", "name", ",", "composer", "=", "None", ",", "php", "=", "None", ",", "user", "=", "None", ",", "prefer_source", "=", "None", ",", "prefer_dist", "=", "None", ",", "no_scripts", "=", "None", ",", "no_plugins", "=", "None", ",", "o...
Composer update the directory to ensure we have the latest versions of all project dependencies. name Directory location of the ``composer.json`` file. composer Location of the ``composer.phar`` file. If not set composer will just execute ``composer`` as if it is installed globally...
[ "Composer", "update", "the", "directory", "to", "ensure", "we", "have", "the", "latest", "versions", "of", "all", "project", "dependencies", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/composer.py#L185-L301
train
Update the composer. json file with the latest versions of all project dependencies.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/boto_elasticache.py
exists
def exists(name, region=None, key=None, keyid=None, profile=None): ''' Check to see if a cache cluster exists. CLI example:: salt myminion boto_elasticache.exists myelasticache ''' conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile) try: conn.describe_cache_...
python
def exists(name, region=None, key=None, keyid=None, profile=None): ''' Check to see if a cache cluster exists. CLI example:: salt myminion boto_elasticache.exists myelasticache ''' conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile) try: conn.describe_cache_...
[ "def", "exists", "(", "name", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "=", "key", ",", "keyid", "="...
Check to see if a cache cluster exists. CLI example:: salt myminion boto_elasticache.exists myelasticache
[ "Check", "to", "see", "if", "a", "cache", "cluster", "exists", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_elasticache.py#L87-L102
train
Check to see if a cache cluster exists.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/boto_elasticache.py
group_exists
def group_exists(name, region=None, key=None, keyid=None, profile=None): ''' Check to see if a replication group exists. CLI example:: salt myminion boto_elasticache.group_exists myelasticache ''' conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile) try: conn...
python
def group_exists(name, region=None, key=None, keyid=None, profile=None): ''' Check to see if a replication group exists. CLI example:: salt myminion boto_elasticache.group_exists myelasticache ''' conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile) try: conn...
[ "def", "group_exists", "(", "name", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "=", "key", ",", "keyid",...
Check to see if a replication group exists. CLI example:: salt myminion boto_elasticache.group_exists myelasticache
[ "Check", "to", "see", "if", "a", "replication", "group", "exists", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_elasticache.py#L105-L120
train
Check to see if a replication group exists.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/boto_elasticache.py
create_replication_group
def create_replication_group(name, primary_cluster_id, replication_group_description, wait=None, region=None, key=None, keyid=None, profile=None): ''' Create replication group. CLI example:: salt myminion boto_elasticache.create_replication...
python
def create_replication_group(name, primary_cluster_id, replication_group_description, wait=None, region=None, key=None, keyid=None, profile=None): ''' Create replication group. CLI example:: salt myminion boto_elasticache.create_replication...
[ "def", "create_replication_group", "(", "name", ",", "primary_cluster_id", ",", "replication_group_description", ",", "wait", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", ...
Create replication group. CLI example:: salt myminion boto_elasticache.create_replication_group myelasticache myprimarycluster description
[ "Create", "replication", "group", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_elasticache.py#L123-L154
train
Create replication group.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/boto_elasticache.py
describe_replication_group
def describe_replication_group(name, region=None, key=None, keyid=None, profile=None, parameter=None): ''' Get replication group information. CLI example:: salt myminion boto_elasticache.describe_replication_group mygroup ''' conn = _get_conn(region=region, k...
python
def describe_replication_group(name, region=None, key=None, keyid=None, profile=None, parameter=None): ''' Get replication group information. CLI example:: salt myminion boto_elasticache.describe_replication_group mygroup ''' conn = _get_conn(region=region, k...
[ "def", "describe_replication_group", "(", "name", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ",", "parameter", "=", "None", ")", ":", "conn", "=", "_get_conn", "(", "region", "=", "regio...
Get replication group information. CLI example:: salt myminion boto_elasticache.describe_replication_group mygroup
[ "Get", "replication", "group", "information", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_elasticache.py#L181-L241
train
Get information about a replication group.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/boto_elasticache.py
get_config
def get_config(name, region=None, key=None, keyid=None, profile=None): ''' Get the configuration for a cache cluster. CLI example:: salt myminion boto_elasticache.get_config myelasticache ''' conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile) if not conn: r...
python
def get_config(name, region=None, key=None, keyid=None, profile=None): ''' Get the configuration for a cache cluster. CLI example:: salt myminion boto_elasticache.get_config myelasticache ''' conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile) if not conn: r...
[ "def", "get_config", "(", "name", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "=", "key", ",", "keyid", ...
Get the configuration for a cache cluster. CLI example:: salt myminion boto_elasticache.get_config myelasticache
[ "Get", "the", "configuration", "for", "a", "cache", "cluster", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_elasticache.py#L244-L307
train
Get the configuration for a cache cluster.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/boto_elasticache.py
get_node_host
def get_node_host(name, region=None, key=None, keyid=None, profile=None): ''' Get hostname from cache node CLI example:: salt myminion boto_elasticache.get_node_host myelasticache ''' conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile) if not conn: return No...
python
def get_node_host(name, region=None, key=None, keyid=None, profile=None): ''' Get hostname from cache node CLI example:: salt myminion boto_elasticache.get_node_host myelasticache ''' conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile) if not conn: return No...
[ "def", "get_node_host", "(", "name", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "=", "key", ",", "keyid"...
Get hostname from cache node CLI example:: salt myminion boto_elasticache.get_node_host myelasticache
[ "Get", "hostname", "from", "cache", "node" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_elasticache.py#L310-L333
train
Get hostname from cache node CLI example :: TTLS Get hostname from cache node TTLS
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/boto_elasticache.py
get_group_host
def get_group_host(name, region=None, key=None, keyid=None, profile=None): ''' Get hostname from replication cache group CLI example:: salt myminion boto_elasticache.get_group_host myelasticachegroup ''' conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile) if not con...
python
def get_group_host(name, region=None, key=None, keyid=None, profile=None): ''' Get hostname from replication cache group CLI example:: salt myminion boto_elasticache.get_group_host myelasticachegroup ''' conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile) if not con...
[ "def", "get_group_host", "(", "name", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "=", "key", ",", "keyid...
Get hostname from replication cache group CLI example:: salt myminion boto_elasticache.get_group_host myelasticachegroup
[ "Get", "hostname", "from", "replication", "cache", "group" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_elasticache.py#L336-L359
train
Get hostname from replication cache group CLI example :: boto_elasticache. get_group_host salt myminion boto_elasticache. get_group_host myelasticachegroup
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/boto_elasticache.py
get_all_cache_subnet_groups
def get_all_cache_subnet_groups(name=None, region=None, key=None, keyid=None, profile=None): ''' Return a list of all cache subnet groups with details CLI example:: salt myminion boto_elasticache.get_all_subnet_groups region=us-east-1 ''' conn = _get_conn(re...
python
def get_all_cache_subnet_groups(name=None, region=None, key=None, keyid=None, profile=None): ''' Return a list of all cache subnet groups with details CLI example:: salt myminion boto_elasticache.get_all_subnet_groups region=us-east-1 ''' conn = _get_conn(re...
[ "def", "get_all_cache_subnet_groups", "(", "name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", ...
Return a list of all cache subnet groups with details CLI example:: salt myminion boto_elasticache.get_all_subnet_groups region=us-east-1
[ "Return", "a", "list", "of", "all", "cache", "subnet", "groups", "with", "details" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_elasticache.py#L362-L387
train
Get all cache subnet groups with details
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/boto_elasticache.py
list_cache_subnet_groups
def list_cache_subnet_groups(name=None, region=None, key=None, keyid=None, profile=None): ''' Return a list of all cache subnet group names CLI example:: salt myminion boto_elasticache.list_subnet_groups region=us-east-1 ''' return [g['CacheSubnetGroupName'] fo...
python
def list_cache_subnet_groups(name=None, region=None, key=None, keyid=None, profile=None): ''' Return a list of all cache subnet group names CLI example:: salt myminion boto_elasticache.list_subnet_groups region=us-east-1 ''' return [g['CacheSubnetGroupName'] fo...
[ "def", "list_cache_subnet_groups", "(", "name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "return", "[", "g", "[", "'CacheSubnetGroupName'", "]", "for", "g", "in"...
Return a list of all cache subnet group names CLI example:: salt myminion boto_elasticache.list_subnet_groups region=us-east-1
[ "Return", "a", "list", "of", "all", "cache", "subnet", "group", "names" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_elasticache.py#L390-L400
train
Return a list of all cache subnet groups in the specified region
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/boto_elasticache.py
subnet_group_exists
def subnet_group_exists(name, tags=None, region=None, key=None, keyid=None, profile=None): ''' Check to see if an ElastiCache subnet group exists. CLI example:: salt myminion boto_elasticache.subnet_group_exists my-param-group \ region=us-east-1 ''' conn = _get_conn(region=...
python
def subnet_group_exists(name, tags=None, region=None, key=None, keyid=None, profile=None): ''' Check to see if an ElastiCache subnet group exists. CLI example:: salt myminion boto_elasticache.subnet_group_exists my-param-group \ region=us-east-1 ''' conn = _get_conn(region=...
[ "def", "subnet_group_exists", "(", "name", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", ...
Check to see if an ElastiCache subnet group exists. CLI example:: salt myminion boto_elasticache.subnet_group_exists my-param-group \ region=us-east-1
[ "Check", "to", "see", "if", "an", "ElastiCache", "subnet", "group", "exists", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_elasticache.py#L403-L424
train
Check to see if an ElastiCache subnet group exists.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/boto_elasticache.py
create_subnet_group
def create_subnet_group(name, description, subnet_ids=None, subnet_names=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Create an ElastiCache subnet group CLI example to create an ElastiCache subnet group:: salt myminion boto_elasticache.create_subne...
python
def create_subnet_group(name, description, subnet_ids=None, subnet_names=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Create an ElastiCache subnet group CLI example to create an ElastiCache subnet group:: salt myminion boto_elasticache.create_subne...
[ "def", "create_subnet_group", "(", "name", ",", "description", ",", "subnet_ids", "=", "None", ",", "subnet_names", "=", "None", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "...
Create an ElastiCache subnet group CLI example to create an ElastiCache subnet group:: salt myminion boto_elasticache.create_subnet_group my-subnet-group \ "group description" subnet_ids='[subnet-12345678, subnet-87654321]' \ region=us-east-1
[ "Create", "an", "ElastiCache", "subnet", "group" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_elasticache.py#L427-L468
train
Create an ElastiCache subnet group
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/boto_elasticache.py
get_cache_subnet_group
def get_cache_subnet_group(name, region=None, key=None, keyid=None, profile=None): ''' Get information about a cache subnet group. CLI example:: salt myminion boto_elasticache.get_cache_subnet_group mycache_subnet_group ''' conn = _get_conn(region=region, key=key...
python
def get_cache_subnet_group(name, region=None, key=None, keyid=None, profile=None): ''' Get information about a cache subnet group. CLI example:: salt myminion boto_elasticache.get_cache_subnet_group mycache_subnet_group ''' conn = _get_conn(region=region, key=key...
[ "def", "get_cache_subnet_group", "(", "name", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "=", "key", ",", ...
Get information about a cache subnet group. CLI example:: salt myminion boto_elasticache.get_cache_subnet_group mycache_subnet_group
[ "Get", "information", "about", "a", "cache", "subnet", "group", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_elasticache.py#L471-L513
train
Get information about a cache subnet group.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/boto_elasticache.py
delete_subnet_group
def delete_subnet_group(name, region=None, key=None, keyid=None, profile=None): ''' Delete an ElastiCache subnet group. CLI example:: salt myminion boto_elasticache.delete_subnet_group my-subnet-group \ region=us-east-1 ''' conn = _get_conn(region=region, key=key, keyid=key...
python
def delete_subnet_group(name, region=None, key=None, keyid=None, profile=None): ''' Delete an ElastiCache subnet group. CLI example:: salt myminion boto_elasticache.delete_subnet_group my-subnet-group \ region=us-east-1 ''' conn = _get_conn(region=region, key=key, keyid=key...
[ "def", "delete_subnet_group", "(", "name", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "=", "key", ",", "...
Delete an ElastiCache subnet group. CLI example:: salt myminion boto_elasticache.delete_subnet_group my-subnet-group \ region=us-east-1
[ "Delete", "an", "ElastiCache", "subnet", "group", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_elasticache.py#L516-L537
train
Delete an ElastiCache subnet group.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/boto_elasticache.py
create
def create(name, num_cache_nodes=None, engine=None, cache_node_type=None, replication_group_id=None, engine_version=None, cache_parameter_group_name=None, cache_subnet_group_name=None, cache_security_group_names=None, security_group_ids=None, snapshot_arns=None, preferred_ava...
python
def create(name, num_cache_nodes=None, engine=None, cache_node_type=None, replication_group_id=None, engine_version=None, cache_parameter_group_name=None, cache_subnet_group_name=None, cache_security_group_names=None, security_group_ids=None, snapshot_arns=None, preferred_ava...
[ "def", "create", "(", "name", ",", "num_cache_nodes", "=", "None", ",", "engine", "=", "None", ",", "cache_node_type", "=", "None", ",", "replication_group_id", "=", "None", ",", "engine_version", "=", "None", ",", "cache_parameter_group_name", "=", "None", ",...
Create a cache cluster. CLI example:: salt myminion boto_elasticache.create myelasticache 1 redis cache.t1.micro cache_security_group_names='["myelasticachesg"]'
[ "Create", "a", "cache", "cluster", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_elasticache.py#L540-L581
train
Create a new cache cluster.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/boto_elasticache.py
delete
def delete(name, wait=False, region=None, key=None, keyid=None, profile=None): ''' Delete a cache cluster. CLI example:: salt myminion boto_elasticache.delete myelasticache ''' conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile) try: conn.delete_cache_cluste...
python
def delete(name, wait=False, region=None, key=None, keyid=None, profile=None): ''' Delete a cache cluster. CLI example:: salt myminion boto_elasticache.delete myelasticache ''' conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile) try: conn.delete_cache_cluste...
[ "def", "delete", "(", "name", ",", "wait", "=", "False", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "=...
Delete a cache cluster. CLI example:: salt myminion boto_elasticache.delete myelasticache
[ "Delete", "a", "cache", "cluster", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_elasticache.py#L584-L612
train
Delete a cache cluster.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/boto_elasticache.py
create_cache_security_group
def create_cache_security_group(name, description, region=None, key=None, keyid=None, profile=None): ''' Create a cache security group. CLI example:: salt myminion boto_elasticache.create_cache_security_group myelasticachesg 'My Cache Security Group' ''' con...
python
def create_cache_security_group(name, description, region=None, key=None, keyid=None, profile=None): ''' Create a cache security group. CLI example:: salt myminion boto_elasticache.create_cache_security_group myelasticachesg 'My Cache Security Group' ''' con...
[ "def", "create_cache_security_group", "(", "name", ",", "description", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "...
Create a cache security group. CLI example:: salt myminion boto_elasticache.create_cache_security_group myelasticachesg 'My Cache Security Group'
[ "Create", "a", "cache", "security", "group", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_elasticache.py#L615-L633
train
Create a cache security group.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/boto_elasticache.py
delete_cache_security_group
def delete_cache_security_group(name, region=None, key=None, keyid=None, profile=None): ''' Delete a cache security group. CLI example:: salt myminion boto_elasticache.delete_cache_security_group myelasticachesg 'My Cache Security Group' ''' conn = _get_conn...
python
def delete_cache_security_group(name, region=None, key=None, keyid=None, profile=None): ''' Delete a cache security group. CLI example:: salt myminion boto_elasticache.delete_cache_security_group myelasticachesg 'My Cache Security Group' ''' conn = _get_conn...
[ "def", "delete_cache_security_group", "(", "name", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "=", "key", ...
Delete a cache security group. CLI example:: salt myminion boto_elasticache.delete_cache_security_group myelasticachesg 'My Cache Security Group'
[ "Delete", "a", "cache", "security", "group", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_elasticache.py#L636-L654
train
Delete a cache security group.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/boto_elasticache.py
authorize_cache_security_group_ingress
def authorize_cache_security_group_ingress(name, ec2_security_group_name, ec2_security_group_owner_id, region=None, key=None, keyid=None, profile=None): ''' Authorize network ingress ...
python
def authorize_cache_security_group_ingress(name, ec2_security_group_name, ec2_security_group_owner_id, region=None, key=None, keyid=None, profile=None): ''' Authorize network ingress ...
[ "def", "authorize_cache_security_group_ingress", "(", "name", ",", "ec2_security_group_name", ",", "ec2_security_group_owner_id", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", ...
Authorize network ingress from an ec2 security group to a cache security group. CLI example:: salt myminion boto_elasticache.authorize_cache_security_group_ingress myelasticachesg myec2sg 879879
[ "Authorize", "network", "ingress", "from", "an", "ec2", "security", "group", "to", "a", "cache", "security", "group", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_elasticache.py#L657-L689
train
Authorize network ingress from an ec2 security group to a cache security group.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/output/__init__.py
try_printout
def try_printout(data, out, opts, **kwargs): ''' Safely get the string to print out, try the configured outputter, then fall back to nested and then to raw ''' try: printout = get_printout(out, opts)(data, **kwargs) if printout is not None: return printout.rstrip() ex...
python
def try_printout(data, out, opts, **kwargs): ''' Safely get the string to print out, try the configured outputter, then fall back to nested and then to raw ''' try: printout = get_printout(out, opts)(data, **kwargs) if printout is not None: return printout.rstrip() ex...
[ "def", "try_printout", "(", "data", ",", "out", ",", "opts", ",", "*", "*", "kwargs", ")", ":", "try", ":", "printout", "=", "get_printout", "(", "out", ",", "opts", ")", "(", "data", ",", "*", "*", "kwargs", ")", "if", "printout", "is", "not", "...
Safely get the string to print out, try the configured outputter, then fall back to nested and then to raw
[ "Safely", "get", "the", "string", "to", "print", "out", "try", "the", "configured", "outputter", "then", "fall", "back", "to", "nested", "and", "then", "to", "raw" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/output/__init__.py#L37-L56
train
Try to print out the string to the outputter then try nested and then raw
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/output/__init__.py
get_progress
def get_progress(opts, out, progress): ''' Get the progress bar from the given outputter ''' return salt.loader.raw_mod(opts, out, 'rawmodule', mod='output')['{0}.progress_iter'.format(out)](progress)
python
def get_progress(opts, out, progress): ''' Get the progress bar from the given outputter ''' return salt.loader.raw_mod(opts, out, 'rawmodule', mod='output')['{0}.progress_iter'.format(out)](progress)
[ "def", "get_progress", "(", "opts", ",", "out", ",", "progress", ")", ":", "return", "salt", ".", "loader", ".", "raw_mod", "(", "opts", ",", "out", ",", "'rawmodule'", ",", "mod", "=", "'output'", ")", "[", "'{0}.progress_iter'", ".", "format", "(", "...
Get the progress bar from the given outputter
[ "Get", "the", "progress", "bar", "from", "the", "given", "outputter" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/output/__init__.py#L59-L66
train
Get the progress bar from the given outputter
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/output/__init__.py
update_progress
def update_progress(opts, progress, progress_iter, out): ''' Update the progress iterator for the given outputter ''' # Look up the outputter try: progress_outputter = salt.loader.outputters(opts)[out] except KeyError: # Outputter is not loaded log.warning('Progress outputter no...
python
def update_progress(opts, progress, progress_iter, out): ''' Update the progress iterator for the given outputter ''' # Look up the outputter try: progress_outputter = salt.loader.outputters(opts)[out] except KeyError: # Outputter is not loaded log.warning('Progress outputter no...
[ "def", "update_progress", "(", "opts", ",", "progress", ",", "progress_iter", ",", "out", ")", ":", "# Look up the outputter", "try", ":", "progress_outputter", "=", "salt", ".", "loader", ".", "outputters", "(", "opts", ")", "[", "out", "]", "except", "KeyE...
Update the progress iterator for the given outputter
[ "Update", "the", "progress", "iterator", "for", "the", "given", "outputter" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/output/__init__.py#L69-L79
train
Update the progress iterator for the given outputter
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/output/__init__.py
display_output
def display_output(data, out=None, opts=None, **kwargs): ''' Print the passed data using the desired output ''' if opts is None: opts = {} display_data = try_printout(data, out, opts, **kwargs) output_filename = opts.get('output_file', None) log.trace('data = %s', data) try: ...
python
def display_output(data, out=None, opts=None, **kwargs): ''' Print the passed data using the desired output ''' if opts is None: opts = {} display_data = try_printout(data, out, opts, **kwargs) output_filename = opts.get('output_file', None) log.trace('data = %s', data) try: ...
[ "def", "display_output", "(", "data", ",", "out", "=", "None", ",", "opts", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "opts", "is", "None", ":", "opts", "=", "{", "}", "display_data", "=", "try_printout", "(", "data", ",", "out", ",", ...
Print the passed data using the desired output
[ "Print", "the", "passed", "data", "using", "the", "desired", "output" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/output/__init__.py#L90-L132
train
Print the passed data using the desired output articles
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/output/__init__.py
get_printout
def get_printout(out, opts=None, **kwargs): ''' Return a printer function ''' if opts is None: opts = {} if 'output' in opts and opts['output'] != 'highstate': # new --out option, but don't choke when using --out=highstate at CLI # See Issue #29796 for more information. ...
python
def get_printout(out, opts=None, **kwargs): ''' Return a printer function ''' if opts is None: opts = {} if 'output' in opts and opts['output'] != 'highstate': # new --out option, but don't choke when using --out=highstate at CLI # See Issue #29796 for more information. ...
[ "def", "get_printout", "(", "out", ",", "opts", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "opts", "is", "None", ":", "opts", "=", "{", "}", "if", "'output'", "in", "opts", "and", "opts", "[", "'output'", "]", "!=", "'highstate'", ":", ...
Return a printer function
[ "Return", "a", "printer", "function" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/output/__init__.py#L135-L198
train
Return a printer function based on the options passed in.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/output/__init__.py
out_format
def out_format(data, out, opts=None, **kwargs): ''' Return the formatted outputter string for the passed data ''' return try_printout(data, out, opts, **kwargs)
python
def out_format(data, out, opts=None, **kwargs): ''' Return the formatted outputter string for the passed data ''' return try_printout(data, out, opts, **kwargs)
[ "def", "out_format", "(", "data", ",", "out", ",", "opts", "=", "None", ",", "*", "*", "kwargs", ")", ":", "return", "try_printout", "(", "data", ",", "out", ",", "opts", ",", "*", "*", "kwargs", ")" ]
Return the formatted outputter string for the passed data
[ "Return", "the", "formatted", "outputter", "string", "for", "the", "passed", "data" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/output/__init__.py#L201-L205
train
Format the data to a formatted outputter string.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/output/__init__.py
string_format
def string_format(data, out, opts=None, **kwargs): ''' Return the formatted outputter string, removing the ANSI escape sequences. ''' raw_output = try_printout(data, out, opts, **kwargs) ansi_escape = re.compile(r'\x1b[^m]*m') return ansi_escape.sub('', raw_output)
python
def string_format(data, out, opts=None, **kwargs): ''' Return the formatted outputter string, removing the ANSI escape sequences. ''' raw_output = try_printout(data, out, opts, **kwargs) ansi_escape = re.compile(r'\x1b[^m]*m') return ansi_escape.sub('', raw_output)
[ "def", "string_format", "(", "data", ",", "out", ",", "opts", "=", "None", ",", "*", "*", "kwargs", ")", ":", "raw_output", "=", "try_printout", "(", "data", ",", "out", ",", "opts", ",", "*", "*", "kwargs", ")", "ansi_escape", "=", "re", ".", "com...
Return the formatted outputter string, removing the ANSI escape sequences.
[ "Return", "the", "formatted", "outputter", "string", "removing", "the", "ANSI", "escape", "sequences", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/output/__init__.py#L208-L214
train
Return the formatted outputter string removing the ANSI escape sequences.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/output/__init__.py
html_format
def html_format(data, out, opts=None, **kwargs): ''' Return the formatted string as HTML. ''' ansi_escaped_string = string_format(data, out, opts, **kwargs) return ansi_escaped_string.replace(' ', '&nbsp;').replace('\n', '<br />')
python
def html_format(data, out, opts=None, **kwargs): ''' Return the formatted string as HTML. ''' ansi_escaped_string = string_format(data, out, opts, **kwargs) return ansi_escaped_string.replace(' ', '&nbsp;').replace('\n', '<br />')
[ "def", "html_format", "(", "data", ",", "out", ",", "opts", "=", "None", ",", "*", "*", "kwargs", ")", ":", "ansi_escaped_string", "=", "string_format", "(", "data", ",", "out", ",", "opts", ",", "*", "*", "kwargs", ")", "return", "ansi_escaped_string", ...
Return the formatted string as HTML.
[ "Return", "the", "formatted", "string", "as", "HTML", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/output/__init__.py#L217-L222
train
Return the formatted string as HTML.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/output/__init__.py
strip_esc_sequence
def strip_esc_sequence(txt): ''' Replace ESC (ASCII 27/Oct 33) to prevent unsafe strings from writing their own terminal manipulation commands ''' if isinstance(txt, six.string_types): try: return txt.replace('\033', '?') except UnicodeDecodeError: return txt....
python
def strip_esc_sequence(txt): ''' Replace ESC (ASCII 27/Oct 33) to prevent unsafe strings from writing their own terminal manipulation commands ''' if isinstance(txt, six.string_types): try: return txt.replace('\033', '?') except UnicodeDecodeError: return txt....
[ "def", "strip_esc_sequence", "(", "txt", ")", ":", "if", "isinstance", "(", "txt", ",", "six", ".", "string_types", ")", ":", "try", ":", "return", "txt", ".", "replace", "(", "'\\033'", ",", "'?'", ")", "except", "UnicodeDecodeError", ":", "return", "tx...
Replace ESC (ASCII 27/Oct 33) to prevent unsafe strings from writing their own terminal manipulation commands
[ "Replace", "ESC", "(", "ASCII", "27", "/", "Oct", "33", ")", "to", "prevent", "unsafe", "strings", "from", "writing", "their", "own", "terminal", "manipulation", "commands" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/output/__init__.py#L225-L236
train
Strip ESC characters from a string.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/dns.py
_tree
def _tree(domain, tld=False): ''' Split out a domain in its parents Leverages tldextract to take the TLDs from publicsuffix.org or makes a valiant approximation of that :param domain: dc2.ams2.example.com :param tld: Include TLD in list :return: [ 'dc2.ams2.example.com', 'ams2.example.com'...
python
def _tree(domain, tld=False): ''' Split out a domain in its parents Leverages tldextract to take the TLDs from publicsuffix.org or makes a valiant approximation of that :param domain: dc2.ams2.example.com :param tld: Include TLD in list :return: [ 'dc2.ams2.example.com', 'ams2.example.com'...
[ "def", "_tree", "(", "domain", ",", "tld", "=", "False", ")", ":", "domain", "=", "domain", ".", "rstrip", "(", "'.'", ")", "assert", "'.'", "in", "domain", ",", "'Provide a decent domain'", "if", "not", "tld", ":", "if", "HAS_TLDEXTRACT", ":", "tld", ...
Split out a domain in its parents Leverages tldextract to take the TLDs from publicsuffix.org or makes a valiant approximation of that :param domain: dc2.ams2.example.com :param tld: Include TLD in list :return: [ 'dc2.ams2.example.com', 'ams2.example.com', 'example.com']
[ "Split", "out", "a", "domain", "in", "its", "parents" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/dns.py#L134-L166
train
Split out a domain in its parents and return a list of all possible TLDs.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/dns.py
_data2rec
def _data2rec(schema, rec_data): ''' schema = OrderedDict({ 'prio': int, 'weight': int, 'port': to_port, 'name': str, }) rec_data = '10 20 25 myawesome.nl' res = {'prio': 10, 'weight': 20, 'port': 25 'name': 'myawesome.nl'} ''' try: rec_fields = rec_d...
python
def _data2rec(schema, rec_data): ''' schema = OrderedDict({ 'prio': int, 'weight': int, 'port': to_port, 'name': str, }) rec_data = '10 20 25 myawesome.nl' res = {'prio': 10, 'weight': 20, 'port': 25 'name': 'myawesome.nl'} ''' try: rec_fields = rec_d...
[ "def", "_data2rec", "(", "schema", ",", "rec_data", ")", ":", "try", ":", "rec_fields", "=", "rec_data", ".", "split", "(", "' '", ")", "# spaces in digest fields are allowed", "assert", "len", "(", "rec_fields", ")", ">=", "len", "(", "schema", ")", "if", ...
schema = OrderedDict({ 'prio': int, 'weight': int, 'port': to_port, 'name': str, }) rec_data = '10 20 25 myawesome.nl' res = {'prio': 10, 'weight': 20, 'port': 25 'name': 'myawesome.nl'}
[ "schema", "=", "OrderedDict", "(", "{", "prio", ":", "int", "weight", ":", "int", "port", ":", "to_port", "name", ":", "str", "}", ")", "rec_data", "=", "10", "20", "25", "myawesome", ".", "nl" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/dns.py#L195-L228
train
Convert data to a single record.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/dns.py
_lookup_dig
def _lookup_dig(name, rdtype, timeout=None, servers=None, secure=None): ''' Use dig to lookup addresses :param name: Name of record to search :param rdtype: DNS record type :param timeout: server response timeout :param servers: [] of servers to use :return: [] of records or False if error ...
python
def _lookup_dig(name, rdtype, timeout=None, servers=None, secure=None): ''' Use dig to lookup addresses :param name: Name of record to search :param rdtype: DNS record type :param timeout: server response timeout :param servers: [] of servers to use :return: [] of records or False if error ...
[ "def", "_lookup_dig", "(", "name", ",", "rdtype", ",", "timeout", "=", "None", ",", "servers", "=", "None", ",", "secure", "=", "None", ")", ":", "cmd", "=", "'dig {0} -t {1} '", ".", "format", "(", "DIG_OPTIONS", ",", "rdtype", ")", "if", "servers", "...
Use dig to lookup addresses :param name: Name of record to search :param rdtype: DNS record type :param timeout: server response timeout :param servers: [] of servers to use :return: [] of records or False if error
[ "Use", "dig", "to", "lookup", "addresses", ":", "param", "name", ":", "Name", "of", "record", "to", "search", ":", "param", "rdtype", ":", "DNS", "record", "type", ":", "param", "timeout", ":", "server", "response", "timeout", ":", "param", "servers", ":...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/dns.py#L271-L319
train
Helper function to search for DNS records in a node.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/dns.py
_lookup_drill
def _lookup_drill(name, rdtype, timeout=None, servers=None, secure=None): ''' Use drill to lookup addresses :param name: Name of record to search :param rdtype: DNS record type :param timeout: command return timeout :param servers: [] of servers to use :return: [] of records or False if erro...
python
def _lookup_drill(name, rdtype, timeout=None, servers=None, secure=None): ''' Use drill to lookup addresses :param name: Name of record to search :param rdtype: DNS record type :param timeout: command return timeout :param servers: [] of servers to use :return: [] of records or False if erro...
[ "def", "_lookup_drill", "(", "name", ",", "rdtype", ",", "timeout", "=", "None", ",", "servers", "=", "None", ",", "secure", "=", "None", ")", ":", "cmd", "=", "'drill '", "if", "secure", ":", "cmd", "+=", "'-D -o ad '", "cmd", "+=", "'{0} {1} '", ".",...
Use drill to lookup addresses :param name: Name of record to search :param rdtype: DNS record type :param timeout: command return timeout :param servers: [] of servers to use :return: [] of records or False if error
[ "Use", "drill", "to", "lookup", "addresses", ":", "param", "name", ":", "Name", "of", "record", "to", "search", ":", "param", "rdtype", ":", "DNS", "record", "type", ":", "param", "timeout", ":", "command", "return", "timeout", ":", "param", "servers", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/dns.py#L322-L375
train
Helper function to search for DNS records in a base record set
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/dns.py
_lookup_gai
def _lookup_gai(name, rdtype, timeout=None): ''' Use Python's socket interface to lookup addresses :param name: Name of record to search :param rdtype: A or AAAA :param timeout: ignored :return: [] of addresses or False if error ''' try: sock_t = { 'A': socket.AF_I...
python
def _lookup_gai(name, rdtype, timeout=None): ''' Use Python's socket interface to lookup addresses :param name: Name of record to search :param rdtype: A or AAAA :param timeout: ignored :return: [] of addresses or False if error ''' try: sock_t = { 'A': socket.AF_I...
[ "def", "_lookup_gai", "(", "name", ",", "rdtype", ",", "timeout", "=", "None", ")", ":", "try", ":", "sock_t", "=", "{", "'A'", ":", "socket", ".", "AF_INET", ",", "'AAAA'", ":", "socket", ".", "AF_INET6", "}", "[", "rdtype", "]", "except", "KeyError...
Use Python's socket interface to lookup addresses :param name: Name of record to search :param rdtype: A or AAAA :param timeout: ignored :return: [] of addresses or False if error
[ "Use", "Python", "s", "socket", "interface", "to", "lookup", "addresses", ":", "param", "name", ":", "Name", "of", "record", "to", "search", ":", "param", "rdtype", ":", "A", "or", "AAAA", ":", "param", "timeout", ":", "ignored", ":", "return", ":", "[...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/dns.py#L378-L401
train
Returns a list of addresses for a given DNS record type.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/dns.py
_lookup_host
def _lookup_host(name, rdtype, timeout=None, server=None): ''' Use host to lookup addresses :param name: Name of record to search :param server: Server to query :param rdtype: DNS record type :param timeout: server response wait :return: [] of records or False if error ''' cmd = 'hos...
python
def _lookup_host(name, rdtype, timeout=None, server=None): ''' Use host to lookup addresses :param name: Name of record to search :param server: Server to query :param rdtype: DNS record type :param timeout: server response wait :return: [] of records or False if error ''' cmd = 'hos...
[ "def", "_lookup_host", "(", "name", ",", "rdtype", ",", "timeout", "=", "None", ",", "server", "=", "None", ")", ":", "cmd", "=", "'host -t {0} '", ".", "format", "(", "rdtype", ")", "if", "timeout", ":", "cmd", "+=", "'-W {0} '", ".", "format", "(", ...
Use host to lookup addresses :param name: Name of record to search :param server: Server to query :param rdtype: DNS record type :param timeout: server response wait :return: [] of records or False if error
[ "Use", "host", "to", "lookup", "addresses", ":", "param", "name", ":", "Name", "of", "record", "to", "search", ":", "param", "server", ":", "Server", "to", "query", ":", "param", "rdtype", ":", "DNS", "record", "type", ":", "param", "timeout", ":", "se...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/dns.py#L404-L443
train
Helper function to search for DNS records in a host
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/dns.py
_lookup_dnspython
def _lookup_dnspython(name, rdtype, timeout=None, servers=None, secure=None): ''' Use dnspython to lookup addresses :param name: Name of record to search :param rdtype: DNS record type :param timeout: query timeout :param server: [] of server(s) to try in order :return: [] of records or Fals...
python
def _lookup_dnspython(name, rdtype, timeout=None, servers=None, secure=None): ''' Use dnspython to lookup addresses :param name: Name of record to search :param rdtype: DNS record type :param timeout: query timeout :param server: [] of server(s) to try in order :return: [] of records or Fals...
[ "def", "_lookup_dnspython", "(", "name", ",", "rdtype", ",", "timeout", "=", "None", ",", "servers", "=", "None", ",", "secure", "=", "None", ")", ":", "resolver", "=", "dns", ".", "resolver", ".", "Resolver", "(", ")", "if", "timeout", "is", "not", ...
Use dnspython to lookup addresses :param name: Name of record to search :param rdtype: DNS record type :param timeout: query timeout :param server: [] of server(s) to try in order :return: [] of records or False if error
[ "Use", "dnspython", "to", "lookup", "addresses", ":", "param", "name", ":", "Name", "of", "record", "to", "search", ":", "param", "rdtype", ":", "DNS", "record", "type", ":", "param", "timeout", ":", "query", "timeout", ":", "param", "server", ":", "[]",...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/dns.py#L446-L474
train
Search for a DNS record in a sequence of DNS records.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/dns.py
_lookup_nslookup
def _lookup_nslookup(name, rdtype, timeout=None, server=None): ''' Use nslookup to lookup addresses :param name: Name of record to search :param rdtype: DNS record type :param timeout: server response timeout :param server: server to query :return: [] of records or False if error ''' ...
python
def _lookup_nslookup(name, rdtype, timeout=None, server=None): ''' Use nslookup to lookup addresses :param name: Name of record to search :param rdtype: DNS record type :param timeout: server response timeout :param server: server to query :return: [] of records or False if error ''' ...
[ "def", "_lookup_nslookup", "(", "name", ",", "rdtype", ",", "timeout", "=", "None", ",", "server", "=", "None", ")", ":", "cmd", "=", "'nslookup -query={0} {1}'", ".", "format", "(", "rdtype", ",", "name", ")", "if", "timeout", "is", "not", "None", ":", ...
Use nslookup to lookup addresses :param name: Name of record to search :param rdtype: DNS record type :param timeout: server response timeout :param server: server to query :return: [] of records or False if error
[ "Use", "nslookup", "to", "lookup", "addresses", ":", "param", "name", ":", "Name", "of", "record", "to", "search", ":", "param", "rdtype", ":", "DNS", "record", "type", ":", "param", "timeout", ":", "server", "response", "timeout", ":", "param", "server", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/dns.py#L477-L543
train
Helper function to lookup DNS record addresses in a node.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/dns.py
lookup
def lookup( name, rdtype, method=None, servers=None, timeout=None, walk=False, walk_tld=False, secure=None ): ''' Lookup DNS records and return their data :param name: name to lookup :param rdtype: DNS record type :param method: gai (getaddrinfo()), dnspython, dig, d...
python
def lookup( name, rdtype, method=None, servers=None, timeout=None, walk=False, walk_tld=False, secure=None ): ''' Lookup DNS records and return their data :param name: name to lookup :param rdtype: DNS record type :param method: gai (getaddrinfo()), dnspython, dig, d...
[ "def", "lookup", "(", "name", ",", "rdtype", ",", "method", "=", "None", ",", "servers", "=", "None", ",", "timeout", "=", "None", ",", "walk", "=", "False", ",", "walk_tld", "=", "False", ",", "secure", "=", "None", ")", ":", "# opts = __opts__.get('d...
Lookup DNS records and return their data :param name: name to lookup :param rdtype: DNS record type :param method: gai (getaddrinfo()), dnspython, dig, drill, host, nslookup or auto (default) :param servers: (list of) server(s) to try in-order :param timeout: query timeout or a valiant approximatio...
[ "Lookup", "DNS", "records", "and", "return", "their", "data" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/dns.py#L546-L654
train
Lookup DNS records and return their data.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/dns.py
query
def query( name, rdtype, method=None, servers=None, timeout=None, walk=False, walk_tld=False, secure=None ): ''' Query DNS for information. Where `lookup()` returns record data, `query()` tries to interpret the data and return it's results :param name: name to lookup ...
python
def query( name, rdtype, method=None, servers=None, timeout=None, walk=False, walk_tld=False, secure=None ): ''' Query DNS for information. Where `lookup()` returns record data, `query()` tries to interpret the data and return it's results :param name: name to lookup ...
[ "def", "query", "(", "name", ",", "rdtype", ",", "method", "=", "None", ",", "servers", "=", "None", ",", "timeout", "=", "None", ",", "walk", "=", "False", ",", "walk_tld", "=", "False", ",", "secure", "=", "None", ")", ":", "rdtype", "=", "rdtype...
Query DNS for information. Where `lookup()` returns record data, `query()` tries to interpret the data and return it's results :param name: name to lookup :param rdtype: DNS record type :param method: gai (getaddrinfo()), pydns, dig, drill, host, nslookup or auto (default) :param servers: (list of)...
[ "Query", "DNS", "for", "information", ".", "Where", "lookup", "()", "returns", "record", "data", "query", "()", "tries", "to", "interpret", "the", "data", "and", "return", "it", "s", "results" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/dns.py#L657-L723
train
Query DNS for information.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/dns.py
host
def host(name, ip4=True, ip6=True, **kwargs): ''' Return a list of addresses for name ip6: Return IPv6 addresses ip4: Return IPv4 addresses the rest is passed on to lookup() ''' res = {} if ip6: ip6 = lookup(name, 'AAAA', **kwargs) if ip6: re...
python
def host(name, ip4=True, ip6=True, **kwargs): ''' Return a list of addresses for name ip6: Return IPv6 addresses ip4: Return IPv4 addresses the rest is passed on to lookup() ''' res = {} if ip6: ip6 = lookup(name, 'AAAA', **kwargs) if ip6: re...
[ "def", "host", "(", "name", ",", "ip4", "=", "True", ",", "ip6", "=", "True", ",", "*", "*", "kwargs", ")", ":", "res", "=", "{", "}", "if", "ip6", ":", "ip6", "=", "lookup", "(", "name", ",", "'AAAA'", ",", "*", "*", "kwargs", ")", "if", "...
Return a list of addresses for name ip6: Return IPv6 addresses ip4: Return IPv4 addresses the rest is passed on to lookup()
[ "Return", "a", "list", "of", "addresses", "for", "name" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/dns.py#L726-L747
train
Returns a list of addresses for a given name.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/dns.py
caa_rec
def caa_rec(rdatas): ''' Validate and parse DNS record data for a CAA record :param rdata: DNS record data :return: dict w/fields ''' rschema = OrderedDict(( ('flags', lambda flag: ['critical'] if int(flag) > 0 else []), ('tag', RFC.CAA_TAGS), ('value', lambda val: val.st...
python
def caa_rec(rdatas): ''' Validate and parse DNS record data for a CAA record :param rdata: DNS record data :return: dict w/fields ''' rschema = OrderedDict(( ('flags', lambda flag: ['critical'] if int(flag) > 0 else []), ('tag', RFC.CAA_TAGS), ('value', lambda val: val.st...
[ "def", "caa_rec", "(", "rdatas", ")", ":", "rschema", "=", "OrderedDict", "(", "(", "(", "'flags'", ",", "lambda", "flag", ":", "[", "'critical'", "]", "if", "int", "(", "flag", ")", ">", "0", "else", "[", "]", ")", ",", "(", "'tag'", ",", "RFC",...
Validate and parse DNS record data for a CAA record :param rdata: DNS record data :return: dict w/fields
[ "Validate", "and", "parse", "DNS", "record", "data", "for", "a", "CAA", "record", ":", "param", "rdata", ":", "DNS", "record", "data", ":", "return", ":", "dict", "w", "/", "fields" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/dns.py#L774-L799
train
Validate and parse DNS record data for a CAA record.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/dns.py
ptr_name
def ptr_name(rdata): ''' Return PTR name of given IP :param rdata: IP address :return: PTR record name ''' try: return ipaddress.ip_address(rdata).reverse_pointer except ValueError: log.error( 'Unable to generate PTR record; %s is not a valid IP address', ...
python
def ptr_name(rdata): ''' Return PTR name of given IP :param rdata: IP address :return: PTR record name ''' try: return ipaddress.ip_address(rdata).reverse_pointer except ValueError: log.error( 'Unable to generate PTR record; %s is not a valid IP address', ...
[ "def", "ptr_name", "(", "rdata", ")", ":", "try", ":", "return", "ipaddress", ".", "ip_address", "(", "rdata", ")", ".", "reverse_pointer", "except", "ValueError", ":", "log", ".", "error", "(", "'Unable to generate PTR record; %s is not a valid IP address'", ",", ...
Return PTR name of given IP :param rdata: IP address :return: PTR record name
[ "Return", "PTR", "name", "of", "given", "IP", ":", "param", "rdata", ":", "IP", "address", ":", "return", ":", "PTR", "record", "name" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/dns.py#L825-L838
train
Returns PTR record name of given IP address
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/dns.py
soa_rec
def soa_rec(rdata): ''' Validate and parse DNS record data for SOA record(s) :param rdata: DNS record data :return: dict w/fields ''' rschema = OrderedDict(( ('mname', str), ('rname', str), ('serial', int), ('refresh', int), ('retry', int), ('expir...
python
def soa_rec(rdata): ''' Validate and parse DNS record data for SOA record(s) :param rdata: DNS record data :return: dict w/fields ''' rschema = OrderedDict(( ('mname', str), ('rname', str), ('serial', int), ('refresh', int), ('retry', int), ('expir...
[ "def", "soa_rec", "(", "rdata", ")", ":", "rschema", "=", "OrderedDict", "(", "(", "(", "'mname'", ",", "str", ")", ",", "(", "'rname'", ",", "str", ")", ",", "(", "'serial'", ",", "int", ")", ",", "(", "'refresh'", ",", "int", ")", ",", "(", "...
Validate and parse DNS record data for SOA record(s) :param rdata: DNS record data :return: dict w/fields
[ "Validate", "and", "parse", "DNS", "record", "data", "for", "SOA", "record", "(", "s", ")", ":", "param", "rdata", ":", "DNS", "record", "data", ":", "return", ":", "dict", "w", "/", "fields" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/dns.py#L841-L856
train
Validate and parse DNS record data for SOA record
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/dns.py
spf_rec
def spf_rec(rdata): ''' Validate and parse DNS record data for SPF record(s) :param rdata: DNS record data :return: dict w/fields ''' spf_fields = rdata.split(' ') if not spf_fields.pop(0).startswith('v=spf'): raise ValueError('Not an SPF record') res = OrderedDict() mods = ...
python
def spf_rec(rdata): ''' Validate and parse DNS record data for SPF record(s) :param rdata: DNS record data :return: dict w/fields ''' spf_fields = rdata.split(' ') if not spf_fields.pop(0).startswith('v=spf'): raise ValueError('Not an SPF record') res = OrderedDict() mods = ...
[ "def", "spf_rec", "(", "rdata", ")", ":", "spf_fields", "=", "rdata", ".", "split", "(", "' '", ")", "if", "not", "spf_fields", ".", "pop", "(", "0", ")", ".", "startswith", "(", "'v=spf'", ")", ":", "raise", "ValueError", "(", "'Not an SPF record'", "...
Validate and parse DNS record data for SPF record(s) :param rdata: DNS record data :return: dict w/fields
[ "Validate", "and", "parse", "DNS", "record", "data", "for", "SPF", "record", "(", "s", ")", ":", "param", "rdata", ":", "DNS", "record", "data", ":", "return", ":", "dict", "w", "/", "fields" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/dns.py#L859-L911
train
Validate and parse DNS record data for SPF record.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/dns.py
srv_data
def srv_data(target, port, prio=10, weight=10): ''' Generate SRV record data :param target: :param port: :param prio: :param weight: :return: ''' return _rec2data(prio, weight, port, target)
python
def srv_data(target, port, prio=10, weight=10): ''' Generate SRV record data :param target: :param port: :param prio: :param weight: :return: ''' return _rec2data(prio, weight, port, target)
[ "def", "srv_data", "(", "target", ",", "port", ",", "prio", "=", "10", ",", "weight", "=", "10", ")", ":", "return", "_rec2data", "(", "prio", ",", "weight", ",", "port", ",", "target", ")" ]
Generate SRV record data :param target: :param port: :param prio: :param weight: :return:
[ "Generate", "SRV", "record", "data", ":", "param", "target", ":", ":", "param", "port", ":", ":", "param", "prio", ":", ":", "param", "weight", ":", ":", "return", ":" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/dns.py#L914-L923
train
Generate SRV record data
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/dns.py
srv_name
def srv_name(svc, proto='tcp', domain=None): ''' Generate SRV record name :param svc: ldap, 389 etc :param proto: tcp, udp, sctp etc. :param domain: name to append :return: ''' proto = RFC.validate(proto, RFC.SRV_PROTO) if isinstance(svc, int) or svc.isdigit(): svc = _to_port...
python
def srv_name(svc, proto='tcp', domain=None): ''' Generate SRV record name :param svc: ldap, 389 etc :param proto: tcp, udp, sctp etc. :param domain: name to append :return: ''' proto = RFC.validate(proto, RFC.SRV_PROTO) if isinstance(svc, int) or svc.isdigit(): svc = _to_port...
[ "def", "srv_name", "(", "svc", ",", "proto", "=", "'tcp'", ",", "domain", "=", "None", ")", ":", "proto", "=", "RFC", ".", "validate", "(", "proto", ",", "RFC", ".", "SRV_PROTO", ")", "if", "isinstance", "(", "svc", ",", "int", ")", "or", "svc", ...
Generate SRV record name :param svc: ldap, 389 etc :param proto: tcp, udp, sctp etc. :param domain: name to append :return:
[ "Generate", "SRV", "record", "name", ":", "param", "svc", ":", "ldap", "389", "etc", ":", "param", "proto", ":", "tcp", "udp", "sctp", "etc", ".", ":", "param", "domain", ":", "name", "to", "append", ":", "return", ":" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/dns.py#L926-L940
train
Generate SRV record name.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/dns.py
srv_rec
def srv_rec(rdatas): ''' Validate and parse DNS record data for SRV record(s) :param rdata: DNS record data :return: dict w/fields ''' rschema = OrderedDict(( ('prio', int), ('weight', int), ('port', _to_port), ('name', str), )) return _data2rec_group(rsch...
python
def srv_rec(rdatas): ''' Validate and parse DNS record data for SRV record(s) :param rdata: DNS record data :return: dict w/fields ''' rschema = OrderedDict(( ('prio', int), ('weight', int), ('port', _to_port), ('name', str), )) return _data2rec_group(rsch...
[ "def", "srv_rec", "(", "rdatas", ")", ":", "rschema", "=", "OrderedDict", "(", "(", "(", "'prio'", ",", "int", ")", ",", "(", "'weight'", ",", "int", ")", ",", "(", "'port'", ",", "_to_port", ")", ",", "(", "'name'", ",", "str", ")", ",", ")", ...
Validate and parse DNS record data for SRV record(s) :param rdata: DNS record data :return: dict w/fields
[ "Validate", "and", "parse", "DNS", "record", "data", "for", "SRV", "record", "(", "s", ")", ":", "param", "rdata", ":", "DNS", "record", "data", ":", "return", ":", "dict", "w", "/", "fields" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/dns.py#L943-L955
train
Validate and parse DNS record data for SRV record.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/dns.py
sshfp_data
def sshfp_data(key_t, hash_t, pub): ''' Generate an SSHFP record :param key_t: rsa/dsa/ecdsa/ed25519 :param hash_t: sha1/sha256 :param pub: the SSH public key ''' key_t = RFC.validate(key_t, RFC.SSHFP_ALGO, 'in') hash_t = RFC.validate(hash_t, RFC.SSHFP_HASH) hasher = hashlib.new(has...
python
def sshfp_data(key_t, hash_t, pub): ''' Generate an SSHFP record :param key_t: rsa/dsa/ecdsa/ed25519 :param hash_t: sha1/sha256 :param pub: the SSH public key ''' key_t = RFC.validate(key_t, RFC.SSHFP_ALGO, 'in') hash_t = RFC.validate(hash_t, RFC.SSHFP_HASH) hasher = hashlib.new(has...
[ "def", "sshfp_data", "(", "key_t", ",", "hash_t", ",", "pub", ")", ":", "key_t", "=", "RFC", ".", "validate", "(", "key_t", ",", "RFC", ".", "SSHFP_ALGO", ",", "'in'", ")", "hash_t", "=", "RFC", ".", "validate", "(", "hash_t", ",", "RFC", ".", "SSH...
Generate an SSHFP record :param key_t: rsa/dsa/ecdsa/ed25519 :param hash_t: sha1/sha256 :param pub: the SSH public key
[ "Generate", "an", "SSHFP", "record", ":", "param", "key_t", ":", "rsa", "/", "dsa", "/", "ecdsa", "/", "ed25519", ":", "param", "hash_t", ":", "sha1", "/", "sha256", ":", "param", "pub", ":", "the", "SSH", "public", "key" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/dns.py#L958-L974
train
Generate an SSHFP record
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/dns.py
sshfp_rec
def sshfp_rec(rdata): ''' Validate and parse DNS record data for TLSA record(s) :param rdata: DNS record data :return: dict w/fields ''' rschema = OrderedDict(( ('algorithm', RFC.SSHFP_ALGO), ('fp_hash', RFC.SSHFP_HASH), ('fingerprint', lambda val: val.lower()) # resolve...
python
def sshfp_rec(rdata): ''' Validate and parse DNS record data for TLSA record(s) :param rdata: DNS record data :return: dict w/fields ''' rschema = OrderedDict(( ('algorithm', RFC.SSHFP_ALGO), ('fp_hash', RFC.SSHFP_HASH), ('fingerprint', lambda val: val.lower()) # resolve...
[ "def", "sshfp_rec", "(", "rdata", ")", ":", "rschema", "=", "OrderedDict", "(", "(", "(", "'algorithm'", ",", "RFC", ".", "SSHFP_ALGO", ")", ",", "(", "'fp_hash'", ",", "RFC", ".", "SSHFP_HASH", ")", ",", "(", "'fingerprint'", ",", "lambda", "val", ":"...
Validate and parse DNS record data for TLSA record(s) :param rdata: DNS record data :return: dict w/fields
[ "Validate", "and", "parse", "DNS", "record", "data", "for", "TLSA", "record", "(", "s", ")", ":", "param", "rdata", ":", "DNS", "record", "data", ":", "return", ":", "dict", "w", "/", "fields" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/dns.py#L977-L989
train
Validate and parse DNS record data for TLSA record
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/dns.py
tlsa_data
def tlsa_data(pub, usage, selector, matching): ''' Generate a TLSA rec :param pub: Pub key in PEM format :param usage: :param selector: :param matching: :return: TLSA data portion ''' usage = RFC.validate(usage, RFC.TLSA_USAGE) selector = RFC.validate(selector, RFC.TLSA_SELECT) ...
python
def tlsa_data(pub, usage, selector, matching): ''' Generate a TLSA rec :param pub: Pub key in PEM format :param usage: :param selector: :param matching: :return: TLSA data portion ''' usage = RFC.validate(usage, RFC.TLSA_USAGE) selector = RFC.validate(selector, RFC.TLSA_SELECT) ...
[ "def", "tlsa_data", "(", "pub", ",", "usage", ",", "selector", ",", "matching", ")", ":", "usage", "=", "RFC", ".", "validate", "(", "usage", ",", "RFC", ".", "TLSA_USAGE", ")", "selector", "=", "RFC", ".", "validate", "(", "selector", ",", "RFC", "....
Generate a TLSA rec :param pub: Pub key in PEM format :param usage: :param selector: :param matching: :return: TLSA data portion
[ "Generate", "a", "TLSA", "rec", ":", "param", "pub", ":", "Pub", "key", "in", "PEM", "format", ":", "param", "usage", ":", ":", "param", "selector", ":", ":", "param", "matching", ":", ":", "return", ":", "TLSA", "data", "portion" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/dns.py#L992-L1015
train
Generate a TLSA record from a Pub key in PEM format.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/dns.py
tlsa_rec
def tlsa_rec(rdata): ''' Validate and parse DNS record data for TLSA record(s) :param rdata: DNS record data :return: dict w/fields ''' rschema = OrderedDict(( ('usage', RFC.TLSA_USAGE), ('selector', RFC.TLSA_SELECT), ('matching', RFC.TLSA_MATCHING), ('pub', str) ...
python
def tlsa_rec(rdata): ''' Validate and parse DNS record data for TLSA record(s) :param rdata: DNS record data :return: dict w/fields ''' rschema = OrderedDict(( ('usage', RFC.TLSA_USAGE), ('selector', RFC.TLSA_SELECT), ('matching', RFC.TLSA_MATCHING), ('pub', str) ...
[ "def", "tlsa_rec", "(", "rdata", ")", ":", "rschema", "=", "OrderedDict", "(", "(", "(", "'usage'", ",", "RFC", ".", "TLSA_USAGE", ")", ",", "(", "'selector'", ",", "RFC", ".", "TLSA_SELECT", ")", ",", "(", "'matching'", ",", "RFC", ".", "TLSA_MATCHING...
Validate and parse DNS record data for TLSA record(s) :param rdata: DNS record data :return: dict w/fields
[ "Validate", "and", "parse", "DNS", "record", "data", "for", "TLSA", "record", "(", "s", ")", ":", "param", "rdata", ":", "DNS", "record", "data", ":", "return", ":", "dict", "w", "/", "fields" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/dns.py#L1018-L1031
train
Validate and parse DNS record data for TLSA record.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/dns.py
service
def service( svc, proto='tcp', domain=None, walk=False, secure=None ): ''' Find an SRV service in a domain or it's parents :param svc: service to find (ldap, 389, etc) :param proto: protocol the service talks (tcp, udp, etc) :param domain: domain to start search in :param wal...
python
def service( svc, proto='tcp', domain=None, walk=False, secure=None ): ''' Find an SRV service in a domain or it's parents :param svc: service to find (ldap, 389, etc) :param proto: protocol the service talks (tcp, udp, etc) :param domain: domain to start search in :param wal...
[ "def", "service", "(", "svc", ",", "proto", "=", "'tcp'", ",", "domain", "=", "None", ",", "walk", "=", "False", ",", "secure", "=", "None", ")", ":", "qres", "=", "query", "(", "srv_name", "(", "svc", ",", "proto", ",", "domain", ")", ",", "'SRV...
Find an SRV service in a domain or it's parents :param svc: service to find (ldap, 389, etc) :param proto: protocol the service talks (tcp, udp, etc) :param domain: domain to start search in :param walk: walk the parents if domain doesn't provide the service :param secure: only return DNSSEC-validat...
[ "Find", "an", "SRV", "service", "in", "a", "domain", "or", "it", "s", "parents", ":", "param", "svc", ":", "service", "to", "find", "(", "ldap", "389", "etc", ")", ":", "param", "proto", ":", "protocol", "the", "service", "talks", "(", "tcp", "udp", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/dns.py#L1034-L1061
train
Find an SRV service in a domain or its parents.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/dns.py
services
def services(services_file='/etc/services'): ''' Parse through system-known services :return: { 'svc': [ { 'port': port 'proto': proto, 'desc': comment }, ], } ''' res = {} with salt.utils.files.fopen(services_file, 'r') as svc_d...
python
def services(services_file='/etc/services'): ''' Parse through system-known services :return: { 'svc': [ { 'port': port 'proto': proto, 'desc': comment }, ], } ''' res = {} with salt.utils.files.fopen(services_file, 'r') as svc_d...
[ "def", "services", "(", "services_file", "=", "'/etc/services'", ")", ":", "res", "=", "{", "}", "with", "salt", ".", "utils", ".", "files", ".", "fopen", "(", "services_file", ",", "'r'", ")", "as", "svc_defs", ":", "for", "svc_def", "in", "svc_defs", ...
Parse through system-known services :return: { 'svc': [ { 'port': port 'proto': proto, 'desc': comment }, ], }
[ "Parse", "through", "system", "-", "known", "services", ":", "return", ":", "{", "svc", ":", "[", "{", "port", ":", "port", "proto", ":", "proto", "desc", ":", "comment", "}", "]", "}" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/dns.py#L1064-L1125
train
Parse system - known services file and return a list of dicts
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...