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/win_pki.py
get_certs
def get_certs(context=_DEFAULT_CONTEXT, store=_DEFAULT_STORE): ''' Get the available certificates in the given store. :param str context: The name of the certificate store location context. :param str store: The name of the certificate store. :return: A dictionary of the certificate thumbprints an...
python
def get_certs(context=_DEFAULT_CONTEXT, store=_DEFAULT_STORE): ''' Get the available certificates in the given store. :param str context: The name of the certificate store location context. :param str store: The name of the certificate store. :return: A dictionary of the certificate thumbprints an...
[ "def", "get_certs", "(", "context", "=", "_DEFAULT_CONTEXT", ",", "store", "=", "_DEFAULT_STORE", ")", ":", "ret", "=", "dict", "(", ")", "cmd", "=", "list", "(", ")", "blacklist_keys", "=", "[", "'DnsNameList'", "]", "store_path", "=", "r'Cert:\\{0}\\{1}'",...
Get the available certificates in the given store. :param str context: The name of the certificate store location context. :param str store: The name of the certificate store. :return: A dictionary of the certificate thumbprints and properties. :rtype: dict CLI Example: .. code-block:: bash ...
[ "Get", "the", "available", "certificates", "in", "the", "given", "store", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_pki.py#L143-L183
train
Get the available certificates in the given store.
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/win_pki.py
get_cert_file
def get_cert_file(name, cert_format=_DEFAULT_FORMAT, password=''): ''' Get the details of the certificate file. :param str name: The filesystem path of the certificate file. :param str cert_format: The certificate format. Specify 'cer' for X.509, or 'pfx' for PKCS #12. :param str password: ...
python
def get_cert_file(name, cert_format=_DEFAULT_FORMAT, password=''): ''' Get the details of the certificate file. :param str name: The filesystem path of the certificate file. :param str cert_format: The certificate format. Specify 'cer' for X.509, or 'pfx' for PKCS #12. :param str password: ...
[ "def", "get_cert_file", "(", "name", ",", "cert_format", "=", "_DEFAULT_FORMAT", ",", "password", "=", "''", ")", ":", "ret", "=", "dict", "(", ")", "cmd", "=", "list", "(", ")", "blacklist_keys", "=", "[", "'DnsNameList'", "]", "cert_format", "=", "cert...
Get the details of the certificate file. :param str name: The filesystem path of the certificate file. :param str cert_format: The certificate format. Specify 'cer' for X.509, or 'pfx' for PKCS #12. :param str password: The password of the certificate. Only applicable to pfx format. Note th...
[ "Get", "the", "details", "of", "the", "certificate", "file", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_pki.py#L186-L250
train
Get the details of the certificate 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/win_pki.py
import_cert
def import_cert(name, cert_format=_DEFAULT_FORMAT, context=_DEFAULT_CONTEXT, store=_DEFAULT_STORE, exportable=True, password='', saltenv='base'): ''' Import the certificate file into the given certificate store. ...
python
def import_cert(name, cert_format=_DEFAULT_FORMAT, context=_DEFAULT_CONTEXT, store=_DEFAULT_STORE, exportable=True, password='', saltenv='base'): ''' Import the certificate file into the given certificate store. ...
[ "def", "import_cert", "(", "name", ",", "cert_format", "=", "_DEFAULT_FORMAT", ",", "context", "=", "_DEFAULT_CONTEXT", ",", "store", "=", "_DEFAULT_STORE", ",", "exportable", "=", "True", ",", "password", "=", "''", ",", "saltenv", "=", "'base'", ")", ":", ...
Import the certificate file into the given certificate store. :param str name: The path of the certificate file to import. :param str cert_format: The certificate format. Specify 'cer' for X.509, or 'pfx' for PKCS #12. :param str context: The name of the certificate store location context. :par...
[ "Import", "the", "certificate", "file", "into", "the", "given", "certificate", "store", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_pki.py#L253-L344
train
Import a certificate file into the given certificate store.
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/win_pki.py
export_cert
def export_cert(name, thumbprint, cert_format=_DEFAULT_FORMAT, context=_DEFAULT_CONTEXT, store=_DEFAULT_STORE, password=''): ''' Export the certificate to a file from the given certificate store. :param str name: The destinatio...
python
def export_cert(name, thumbprint, cert_format=_DEFAULT_FORMAT, context=_DEFAULT_CONTEXT, store=_DEFAULT_STORE, password=''): ''' Export the certificate to a file from the given certificate store. :param str name: The destinatio...
[ "def", "export_cert", "(", "name", ",", "thumbprint", ",", "cert_format", "=", "_DEFAULT_FORMAT", ",", "context", "=", "_DEFAULT_CONTEXT", ",", "store", "=", "_DEFAULT_STORE", ",", "password", "=", "''", ")", ":", "cmd", "=", "list", "(", ")", "thumbprint", ...
Export the certificate to a file from the given certificate store. :param str name: The destination path for the exported certificate file. :param str thumbprint: The thumbprint value of the target certificate. :param str cert_format: The certificate format. Specify 'cer' for X.509, or 'pfx' for PK...
[ "Export", "the", "certificate", "to", "a", "file", "from", "the", "given", "certificate", "store", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_pki.py#L347-L409
train
This function exports the certificate to a file from the given certificate store.
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/win_pki.py
remove_cert
def remove_cert(thumbprint, context=_DEFAULT_CONTEXT, store=_DEFAULT_STORE): ''' Remove the certificate from the given certificate store. :param str thumbprint: The thumbprint value of the target certificate. :param str context: The name of the certificate store location context. :param str store: ...
python
def remove_cert(thumbprint, context=_DEFAULT_CONTEXT, store=_DEFAULT_STORE): ''' Remove the certificate from the given certificate store. :param str thumbprint: The thumbprint value of the target certificate. :param str context: The name of the certificate store location context. :param str store: ...
[ "def", "remove_cert", "(", "thumbprint", ",", "context", "=", "_DEFAULT_CONTEXT", ",", "store", "=", "_DEFAULT_STORE", ")", ":", "thumbprint", "=", "thumbprint", ".", "upper", "(", ")", "store_path", "=", "r'Cert:\\{0}\\{1}'", ".", "format", "(", "context", ",...
Remove the certificate from the given certificate store. :param str thumbprint: The thumbprint value of the target certificate. :param str context: The name of the certificate store location context. :param str store: The name of the certificate store. :return: A boolean representing whether all chang...
[ "Remove", "the", "certificate", "from", "the", "given", "certificate", "store", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_pki.py#L459-L497
train
Remove the certificate from the given certificate store.
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/postgres_schema.py
present
def present(dbname, name, owner=None, user=None, db_user=None, db_password=None, db_host=None, db_port=None): ''' Ensure that the named schema is present in the database. dbname The database's name will work on name The name of the schema to manage ...
python
def present(dbname, name, owner=None, user=None, db_user=None, db_password=None, db_host=None, db_port=None): ''' Ensure that the named schema is present in the database. dbname The database's name will work on name The name of the schema to manage ...
[ "def", "present", "(", "dbname", ",", "name", ",", "owner", "=", "None", ",", "user", "=", "None", ",", "db_user", "=", "None", ",", "db_password", "=", "None", ",", "db_host", "=", "None", ",", "db_port", "=", "None", ")", ":", "ret", "=", "{", ...
Ensure that the named schema is present in the database. dbname The database's name will work on name The name of the schema to manage user system user all operations should be performed on behalf of db_user database username if different from config or default d...
[ "Ensure", "that", "the", "named", "schema", "is", "present", "in", "the", "database", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/postgres_schema.py#L31-L106
train
Ensure that the named schema is present in the database.
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/memcache_return.py
_get_serv
def _get_serv(ret): ''' Return a memcache server object ''' _options = _get_options(ret) host = _options.get('host') port = _options.get('port') log.debug('memcache server: %s:%s', host, port) if not host or not port: log.error('Host or port not defined in salt config') ...
python
def _get_serv(ret): ''' Return a memcache server object ''' _options = _get_options(ret) host = _options.get('host') port = _options.get('port') log.debug('memcache server: %s:%s', host, port) if not host or not port: log.error('Host or port not defined in salt config') ...
[ "def", "_get_serv", "(", "ret", ")", ":", "_options", "=", "_get_options", "(", "ret", ")", "host", "=", "_options", ".", "get", "(", "'host'", ")", "port", "=", "_options", ".", "get", "(", "'port'", ")", "log", ".", "debug", "(", "'memcache server: %...
Return a memcache server object
[ "Return", "a", "memcache", "server", "object" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/memcache_return.py#L93-L110
train
Return a memcache server object
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/memcache_return.py
returner
def returner(ret): ''' Return data to a memcache data store ''' serv = _get_serv(ret) minion = ret['id'] jid = ret['jid'] fun = ret['fun'] rets = salt.utils.json.dumps(ret) serv.set('{0}:{1}'.format(jid, minion), rets) # cache for get_jid serv.set('{0}:{1}'.format(fun, minion), ...
python
def returner(ret): ''' Return data to a memcache data store ''' serv = _get_serv(ret) minion = ret['id'] jid = ret['jid'] fun = ret['fun'] rets = salt.utils.json.dumps(ret) serv.set('{0}:{1}'.format(jid, minion), rets) # cache for get_jid serv.set('{0}:{1}'.format(fun, minion), ...
[ "def", "returner", "(", "ret", ")", ":", "serv", "=", "_get_serv", "(", "ret", ")", "minion", "=", "ret", "[", "'id'", "]", "jid", "=", "ret", "[", "'jid'", "]", "fun", "=", "ret", "[", "'fun'", "]", "rets", "=", "salt", ".", "utils", ".", "jso...
Return data to a memcache data store
[ "Return", "data", "to", "a", "memcache", "data", "store" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/memcache_return.py#L140-L155
train
Return data to a memcache data store
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/memcache_return.py
save_load
def save_load(jid, load, minions=None): ''' Save the load to the specified jid ''' serv = _get_serv(ret=None) serv.set(jid, salt.utils.json.dumps(load)) _append_list(serv, 'jids', jid)
python
def save_load(jid, load, minions=None): ''' Save the load to the specified jid ''' serv = _get_serv(ret=None) serv.set(jid, salt.utils.json.dumps(load)) _append_list(serv, 'jids', jid)
[ "def", "save_load", "(", "jid", ",", "load", ",", "minions", "=", "None", ")", ":", "serv", "=", "_get_serv", "(", "ret", "=", "None", ")", "serv", ".", "set", "(", "jid", ",", "salt", ".", "utils", ".", "json", ".", "dumps", "(", "load", ")", ...
Save the load to the specified jid
[ "Save", "the", "load", "to", "the", "specified", "jid" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/memcache_return.py#L158-L164
train
Save the load to the specified jid
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/memcache_return.py
get_fun
def get_fun(fun): ''' Return a dict of the last function called for all minions ''' serv = _get_serv(ret=None) minions = _get_list(serv, 'minions') returns = serv.get_multi(minions, key_prefix='{0}:'.format(fun)) # returns = {minion: return, minion: return, ...} ret = {} for minion, ...
python
def get_fun(fun): ''' Return a dict of the last function called for all minions ''' serv = _get_serv(ret=None) minions = _get_list(serv, 'minions') returns = serv.get_multi(minions, key_prefix='{0}:'.format(fun)) # returns = {minion: return, minion: return, ...} ret = {} for minion, ...
[ "def", "get_fun", "(", "fun", ")", ":", "serv", "=", "_get_serv", "(", "ret", "=", "None", ")", "minions", "=", "_get_list", "(", "serv", ",", "'minions'", ")", "returns", "=", "serv", ".", "get_multi", "(", "minions", ",", "key_prefix", "=", "'{0}:'",...
Return a dict of the last function called for all minions
[ "Return", "a", "dict", "of", "the", "last", "function", "called", "for", "all", "minions" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/memcache_return.py#L199-L210
train
Return a dict of the last function called for all minions
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/memcache_return.py
get_jids
def get_jids(): ''' Return a list of all job ids ''' serv = _get_serv(ret=None) jids = _get_list(serv, 'jids') loads = serv.get_multi(jids) # {jid: load, jid: load, ...} ret = {} for jid, load in six.iteritems(loads): ret[jid] = salt.utils.jid.format_jid_instance(jid, salt.utils...
python
def get_jids(): ''' Return a list of all job ids ''' serv = _get_serv(ret=None) jids = _get_list(serv, 'jids') loads = serv.get_multi(jids) # {jid: load, jid: load, ...} ret = {} for jid, load in six.iteritems(loads): ret[jid] = salt.utils.jid.format_jid_instance(jid, salt.utils...
[ "def", "get_jids", "(", ")", ":", "serv", "=", "_get_serv", "(", "ret", "=", "None", ")", "jids", "=", "_get_list", "(", "serv", ",", "'jids'", ")", "loads", "=", "serv", ".", "get_multi", "(", "jids", ")", "# {jid: load, jid: load, ...}", "ret", "=", ...
Return a list of all job ids
[ "Return", "a", "list", "of", "all", "job", "ids" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/memcache_return.py#L213-L223
train
Return a list of all job ids
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/boto_elb.py
present
def present(name, listeners, availability_zones=None, subnets=None, subnet_names=None, security_groups=None, scheme='internet-facing', health_check=None, attributes=None, attributes_from_pillar="boto_elb_attributes", cnames=None, alarms=None, alarms_from_pillar="boto_elb_...
python
def present(name, listeners, availability_zones=None, subnets=None, subnet_names=None, security_groups=None, scheme='internet-facing', health_check=None, attributes=None, attributes_from_pillar="boto_elb_attributes", cnames=None, alarms=None, alarms_from_pillar="boto_elb_...
[ "def", "present", "(", "name", ",", "listeners", ",", "availability_zones", "=", "None", ",", "subnets", "=", "None", ",", "subnet_names", "=", "None", ",", "security_groups", "=", "None", ",", "scheme", "=", "'internet-facing'", ",", "health_check", "=", "N...
Ensure the ELB exists. name Name of the ELB. availability_zones A list of availability zones for this ELB. listeners A list of listener lists; example:: [ ['443', 'HTTPS', 'arn:aws:iam::1111111:server-certificate/mycert'], ['8443', '80'...
[ "Ensure", "the", "ELB", "exists", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_elb.py#L261-L485
train
Ensures that the specified ELB exists and has the specified attributes and attributes 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/states/boto_elb.py
register_instances
def register_instances(name, instances, region=None, key=None, keyid=None, profile=None): ''' Add EC2 instance(s) to an Elastic Load Balancer. Removing an instance from the ``instances`` list does not remove it from the ELB. name The name of the Elastic Load Balancer to a...
python
def register_instances(name, instances, region=None, key=None, keyid=None, profile=None): ''' Add EC2 instance(s) to an Elastic Load Balancer. Removing an instance from the ``instances`` list does not remove it from the ELB. name The name of the Elastic Load Balancer to a...
[ "def", "register_instances", "(", "name", ",", "instances", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "True", ...
Add EC2 instance(s) to an Elastic Load Balancer. Removing an instance from the ``instances`` list does not remove it from the ELB. name The name of the Elastic Load Balancer to add EC2 instances to. instances A list of EC2 instance IDs that this Elastic Load Balancer should distrib...
[ "Add", "EC2", "instance", "(", "s", ")", "to", "an", "Elastic", "Load", "Balancer", ".", "Removing", "an", "instance", "from", "the", "instances", "list", "does", "not", "remove", "it", "from", "the", "ELB", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_elb.py#L488-L550
train
Add EC2 instances to an ELB.
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/boto_elb.py
_alarms_present
def _alarms_present(name, alarms, alarms_from_pillar, region, key, keyid, profile): '''helper method for present. ensure that cloudwatch_alarms are set''' current = __salt__['config.option'](alarms_from_pillar, {}) if alarms: current = salt.utils.dictupdate.update(current, alarms) ret = {'name'...
python
def _alarms_present(name, alarms, alarms_from_pillar, region, key, keyid, profile): '''helper method for present. ensure that cloudwatch_alarms are set''' current = __salt__['config.option'](alarms_from_pillar, {}) if alarms: current = salt.utils.dictupdate.update(current, alarms) ret = {'name'...
[ "def", "_alarms_present", "(", "name", ",", "alarms", ",", "alarms_from_pillar", ",", "region", ",", "key", ",", "keyid", ",", "profile", ")", ":", "current", "=", "__salt__", "[", "'config.option'", "]", "(", "alarms_from_pillar", ",", "{", "}", ")", "if"...
helper method for present. ensure that cloudwatch_alarms are set
[ "helper", "method", "for", "present", ".", "ensure", "that", "cloudwatch_alarms", "are", "set" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_elb.py#L987-L1013
train
helper method for present. ensure that cloudwatch_alarms are 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/states/boto_elb.py
_policies_present
def _policies_present(name, policies, policies_from_pillar, listeners, backends, region, key, keyid, profile): '''helper method for present. ensure that ELB policies are set''' if policies is None: policies = [] pillar_policies = __salt__['config.option'](policies_from_pillar, ...
python
def _policies_present(name, policies, policies_from_pillar, listeners, backends, region, key, keyid, profile): '''helper method for present. ensure that ELB policies are set''' if policies is None: policies = [] pillar_policies = __salt__['config.option'](policies_from_pillar, ...
[ "def", "_policies_present", "(", "name", ",", "policies", ",", "policies_from_pillar", ",", "listeners", ",", "backends", ",", "region", ",", "key", ",", "keyid", ",", "profile", ")", ":", "if", "policies", "is", "None", ":", "policies", "=", "[", "]", "...
helper method for present. ensure that ELB policies are set
[ "helper", "method", "for", "present", ".", "ensure", "that", "ELB", "policies", "are", "set" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_elb.py#L1016-L1247
train
ensure that ELB policies are 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/states/boto_elb.py
absent
def absent(name, region=None, key=None, keyid=None, profile=None): ''' Ensure an ELB does not exist name name of the ELB ''' ret = {'name': name, 'result': True, 'comment': '', 'changes': {}} exists = __salt__['boto_elb.exists'](name, region, key, keyid, profile) if exists: ...
python
def absent(name, region=None, key=None, keyid=None, profile=None): ''' Ensure an ELB does not exist name name of the ELB ''' ret = {'name': name, 'result': True, 'comment': '', 'changes': {}} exists = __salt__['boto_elb.exists'](name, region, key, keyid, profile) if exists: ...
[ "def", "absent", "(", "name", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "True", ",", "'comment'", ":", "''"...
Ensure an ELB does not exist name name of the ELB
[ "Ensure", "an", "ELB", "does", "not", "exist" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_elb.py#L1262-L1288
train
Ensure an ELB does not exist
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/boto_elb.py
_tags_present
def _tags_present(name, tags, region, key, keyid, profile): ''' helper function to validate tags on elb ''' ret = {'result': True, 'comment': '', 'changes': {}} if tags: lb = __salt__['boto_elb.get_elb_config'](name, region, key, keyid, profile) tags_to_add = tags tags_to_up...
python
def _tags_present(name, tags, region, key, keyid, profile): ''' helper function to validate tags on elb ''' ret = {'result': True, 'comment': '', 'changes': {}} if tags: lb = __salt__['boto_elb.get_elb_config'](name, region, key, keyid, profile) tags_to_add = tags tags_to_up...
[ "def", "_tags_present", "(", "name", ",", "tags", ",", "region", ",", "key", ",", "keyid", ",", "profile", ")", ":", "ret", "=", "{", "'result'", ":", "True", ",", "'comment'", ":", "''", ",", "'changes'", ":", "{", "}", "}", "if", "tags", ":", "...
helper function to validate tags on elb
[ "helper", "function", "to", "validate", "tags", "on", "elb" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_elb.py#L1291-L1364
train
helper function to validate tags on elb
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/thread_local_proxy.py
ThreadLocalProxy.get_reference
def get_reference(proxy): ''' Return the object that is referenced by the specified proxy. If the proxy has not been bound to a reference for the current thread, the behavior depends on th the ``fallback_to_shared`` flag that has been specified when creating the proxy. If the fl...
python
def get_reference(proxy): ''' Return the object that is referenced by the specified proxy. If the proxy has not been bound to a reference for the current thread, the behavior depends on th the ``fallback_to_shared`` flag that has been specified when creating the proxy. If the fl...
[ "def", "get_reference", "(", "proxy", ")", ":", "thread_local", "=", "object", ".", "__getattribute__", "(", "proxy", ",", "'_thread_local'", ")", "try", ":", "return", "thread_local", ".", "reference", "except", "AttributeError", ":", "fallback_to_shared", "=", ...
Return the object that is referenced by the specified proxy. If the proxy has not been bound to a reference for the current thread, the behavior depends on th the ``fallback_to_shared`` flag that has been specified when creating the proxy. If the flag has been set, the last reference th...
[ "Return", "the", "object", "that", "is", "referenced", "by", "the", "specified", "proxy", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/thread_local_proxy.py#L47-L92
train
Returns the object that is referenced by the specified proxy.
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/thread_local_proxy.py
ThreadLocalProxy.set_reference
def set_reference(proxy, new_reference): ''' Set the reference to be used the current thread of execution. After calling this function, the specified proxy will act like it was the referenced object. proxy: proxy object for which the reference shall be set. If the s...
python
def set_reference(proxy, new_reference): ''' Set the reference to be used the current thread of execution. After calling this function, the specified proxy will act like it was the referenced object. proxy: proxy object for which the reference shall be set. If the s...
[ "def", "set_reference", "(", "proxy", ",", "new_reference", ")", ":", "# If the new reference is itself a proxy, we have to ensure that it does", "# not refer to this proxy. If it does, we simply return because updating", "# the reference would result in an inifite loop when trying to use the", ...
Set the reference to be used the current thread of execution. After calling this function, the specified proxy will act like it was the referenced object. proxy: proxy object for which the reference shall be set. If the specified object is not an instance of `ThreadLoca...
[ "Set", "the", "reference", "to", "be", "used", "the", "current", "thread", "of", "execution", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/thread_local_proxy.py#L95-L123
train
Sets the reference of the specified object to the specified new_reference.
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/thread_local_proxy.py
ThreadLocalProxy.unproxy
def unproxy(possible_proxy): ''' Unwrap and return the object referenced by a proxy. This function is very similar to :func:`get_reference`, but works for both proxies and regular objects. If the specified object is a proxy, its reference is extracted with ``get_reference`` and ...
python
def unproxy(possible_proxy): ''' Unwrap and return the object referenced by a proxy. This function is very similar to :func:`get_reference`, but works for both proxies and regular objects. If the specified object is a proxy, its reference is extracted with ``get_reference`` and ...
[ "def", "unproxy", "(", "possible_proxy", ")", ":", "while", "isinstance", "(", "possible_proxy", ",", "ThreadLocalProxy", ")", ":", "possible_proxy", "=", "ThreadLocalProxy", ".", "get_reference", "(", "possible_proxy", ")", "return", "possible_proxy" ]
Unwrap and return the object referenced by a proxy. This function is very similar to :func:`get_reference`, but works for both proxies and regular objects. If the specified object is a proxy, its reference is extracted with ``get_reference`` and returned. If it is not a proxy, it is ret...
[ "Unwrap", "and", "return", "the", "object", "referenced", "by", "a", "proxy", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/thread_local_proxy.py#L143-L160
train
Unwrap and return the object referenced by a proxy.
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/kmod.py
_new_mods
def _new_mods(pre_mods, post_mods): ''' Return a list of the new modules, pass an lsmod dict before running modprobe and one after modprobe has run ''' pre = set() post = set() for mod in pre_mods: pre.add(mod['module']) for mod in post_mods: post.add(mod['module']) r...
python
def _new_mods(pre_mods, post_mods): ''' Return a list of the new modules, pass an lsmod dict before running modprobe and one after modprobe has run ''' pre = set() post = set() for mod in pre_mods: pre.add(mod['module']) for mod in post_mods: post.add(mod['module']) r...
[ "def", "_new_mods", "(", "pre_mods", ",", "post_mods", ")", ":", "pre", "=", "set", "(", ")", "post", "=", "set", "(", ")", "for", "mod", "in", "pre_mods", ":", "pre", ".", "add", "(", "mod", "[", "'module'", "]", ")", "for", "mod", "in", "post_m...
Return a list of the new modules, pass an lsmod dict before running modprobe and one after modprobe has run
[ "Return", "a", "list", "of", "the", "new", "modules", "pass", "an", "lsmod", "dict", "before", "running", "modprobe", "and", "one", "after", "modprobe", "has", "run" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/kmod.py#L26-L37
train
Return a list of the new modules pass an lsmod dict before modprobe and one after modprobe
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/kmod.py
_rm_mods
def _rm_mods(pre_mods, post_mods): ''' Return a list of the new modules, pass an lsmod dict before running modprobe and one after modprobe has run ''' pre = set() post = set() for mod in pre_mods: pre.add(mod['module']) for mod in post_mods: post.add(mod['module']) re...
python
def _rm_mods(pre_mods, post_mods): ''' Return a list of the new modules, pass an lsmod dict before running modprobe and one after modprobe has run ''' pre = set() post = set() for mod in pre_mods: pre.add(mod['module']) for mod in post_mods: post.add(mod['module']) re...
[ "def", "_rm_mods", "(", "pre_mods", ",", "post_mods", ")", ":", "pre", "=", "set", "(", ")", "post", "=", "set", "(", ")", "for", "mod", "in", "pre_mods", ":", "pre", ".", "add", "(", "mod", "[", "'module'", "]", ")", "for", "mod", "in", "post_mo...
Return a list of the new modules, pass an lsmod dict before running modprobe and one after modprobe has run
[ "Return", "a", "list", "of", "the", "new", "modules", "pass", "an", "lsmod", "dict", "before", "running", "modprobe", "and", "one", "after", "modprobe", "has", "run" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/kmod.py#L40-L51
train
Return a list of the new modules pass an lsmod dict before modprobe and one after modprobe
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/kmod.py
_set_persistent_module
def _set_persistent_module(mod): ''' Add module to configuration file to make it persistent. If module is commented uncomment it. ''' conf = _get_modules_conf() if not os.path.exists(conf): __salt__['file.touch'](conf) mod_name = _strip_module_name(mod) if not mod_name or mod_nam...
python
def _set_persistent_module(mod): ''' Add module to configuration file to make it persistent. If module is commented uncomment it. ''' conf = _get_modules_conf() if not os.path.exists(conf): __salt__['file.touch'](conf) mod_name = _strip_module_name(mod) if not mod_name or mod_nam...
[ "def", "_set_persistent_module", "(", "mod", ")", ":", "conf", "=", "_get_modules_conf", "(", ")", "if", "not", "os", ".", "path", ".", "exists", "(", "conf", ")", ":", "__salt__", "[", "'file.touch'", "]", "(", "conf", ")", "mod_name", "=", "_strip_modu...
Add module to configuration file to make it persistent. If module is commented uncomment it.
[ "Add", "module", "to", "configuration", "file", "to", "make", "it", "persistent", ".", "If", "module", "is", "commented", "uncomment", "it", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/kmod.py#L76-L96
train
Set the module to be persistent.
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/kmod.py
_remove_persistent_module
def _remove_persistent_module(mod, comment): ''' Remove module from configuration file. If comment is true only comment line where module is. ''' conf = _get_modules_conf() mod_name = _strip_module_name(mod) if not mod_name or mod_name not in mod_list(True): return set() escape_m...
python
def _remove_persistent_module(mod, comment): ''' Remove module from configuration file. If comment is true only comment line where module is. ''' conf = _get_modules_conf() mod_name = _strip_module_name(mod) if not mod_name or mod_name not in mod_list(True): return set() escape_m...
[ "def", "_remove_persistent_module", "(", "mod", ",", "comment", ")", ":", "conf", "=", "_get_modules_conf", "(", ")", "mod_name", "=", "_strip_module_name", "(", "mod", ")", "if", "not", "mod_name", "or", "mod_name", "not", "in", "mod_list", "(", "True", ")"...
Remove module from configuration file. If comment is true only comment line where module is.
[ "Remove", "module", "from", "configuration", "file", ".", "If", "comment", "is", "true", "only", "comment", "line", "where", "module", "is", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/kmod.py#L99-L113
train
Remove persistent module from configuration file. If comment is true only comment line where module is.
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/kmod.py
available
def available(): ''' Return a list of all available kernel modules CLI Example: .. code-block:: bash salt '*' kmod.available ''' ret = [] mod_dir = os.path.join('/lib/modules/', os.uname()[2]) built_in_file = os.path.join(mod_dir, 'modules.builtin') if os.path.exists(bui...
python
def available(): ''' Return a list of all available kernel modules CLI Example: .. code-block:: bash salt '*' kmod.available ''' ret = [] mod_dir = os.path.join('/lib/modules/', os.uname()[2]) built_in_file = os.path.join(mod_dir, 'modules.builtin') if os.path.exists(bui...
[ "def", "available", "(", ")", ":", "ret", "=", "[", "]", "mod_dir", "=", "os", ".", "path", ".", "join", "(", "'/lib/modules/'", ",", "os", ".", "uname", "(", ")", "[", "2", "]", ")", "built_in_file", "=", "os", ".", "path", ".", "join", "(", "...
Return a list of all available kernel modules CLI Example: .. code-block:: bash salt '*' kmod.available
[ "Return", "a", "list", "of", "all", "available", "kernel", "modules" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/kmod.py#L116-L150
train
Return a list of all available kernel modules CLI Example : bash salt '*' kmod. available
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/kmod.py
load
def load(mod, persist=False): ''' Load the specified kernel module mod Name of module to add persist Write module to /etc/modules to make it load on system reboot CLI Example: .. code-block:: bash salt '*' kmod.load kvm ''' pre_mods = lsmod() res = __salt...
python
def load(mod, persist=False): ''' Load the specified kernel module mod Name of module to add persist Write module to /etc/modules to make it load on system reboot CLI Example: .. code-block:: bash salt '*' kmod.load kvm ''' pre_mods = lsmod() res = __salt...
[ "def", "load", "(", "mod", ",", "persist", "=", "False", ")", ":", "pre_mods", "=", "lsmod", "(", ")", "res", "=", "__salt__", "[", "'cmd.run_all'", "]", "(", "'modprobe {0}'", ".", "format", "(", "mod", ")", ",", "python_shell", "=", "False", ")", "...
Load the specified kernel module mod Name of module to add persist Write module to /etc/modules to make it load on system reboot CLI Example: .. code-block:: bash salt '*' kmod.load kvm
[ "Load", "the", "specified", "kernel", "module" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/kmod.py#L228-L254
train
Load the specified kernel module
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/proxy/onyx.py
init
def init(opts=None): ''' Required. Can be used to initialize the server connection. ''' if opts is None: opts = __opts__ try: DETAILS[_worker_name()] = SSHConnection( host=opts['proxy']['host'], username=opts['proxy']['username'], password=opts...
python
def init(opts=None): ''' Required. Can be used to initialize the server connection. ''' if opts is None: opts = __opts__ try: DETAILS[_worker_name()] = SSHConnection( host=opts['proxy']['host'], username=opts['proxy']['username'], password=opts...
[ "def", "init", "(", "opts", "=", "None", ")", ":", "if", "opts", "is", "None", ":", "opts", "=", "__opts__", "try", ":", "DETAILS", "[", "_worker_name", "(", ")", "]", "=", "SSHConnection", "(", "host", "=", "opts", "[", "'proxy'", "]", "[", "'host...
Required. Can be used to initialize the server connection.
[ "Required", ".", "Can", "be", "used", "to", "initialize", "the", "server", "connection", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/onyx.py#L87-L107
train
Initialize the server connection.
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/proxy/onyx.py
ping
def ping(): ''' Ping the device on the other end of the connection .. code-block: bash salt '*' onyx.cmd ping ''' if _worker_name() not in DETAILS: init() try: return DETAILS[_worker_name()].conn.isalive() except TerminalException as e: log.error(e) ...
python
def ping(): ''' Ping the device on the other end of the connection .. code-block: bash salt '*' onyx.cmd ping ''' if _worker_name() not in DETAILS: init() try: return DETAILS[_worker_name()].conn.isalive() except TerminalException as e: log.error(e) ...
[ "def", "ping", "(", ")", ":", "if", "_worker_name", "(", ")", "not", "in", "DETAILS", ":", "init", "(", ")", "try", ":", "return", "DETAILS", "[", "_worker_name", "(", ")", "]", ".", "conn", ".", "isalive", "(", ")", "except", "TerminalException", "a...
Ping the device on the other end of the connection .. code-block: bash salt '*' onyx.cmd ping
[ "Ping", "the", "device", "on", "the", "other", "end", "of", "the", "connection" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/onyx.py#L117-L131
train
Ping the device on the other end of the connection
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/proxy/onyx.py
sendline
def sendline(command): ''' Run command through switch's cli .. code-block: bash salt '*' onyx.cmd sendline 'show run | include "username admin password 7"' ''' if ping() is False: init() out, _ = DETAILS[_worker_name()].sendline(command) return out
python
def sendline(command): ''' Run command through switch's cli .. code-block: bash salt '*' onyx.cmd sendline 'show run | include "username admin password 7"' ''' if ping() is False: init() out, _ = DETAILS[_worker_name()].sendline(command) return out
[ "def", "sendline", "(", "command", ")", ":", "if", "ping", "(", ")", "is", "False", ":", "init", "(", ")", "out", ",", "_", "=", "DETAILS", "[", "_worker_name", "(", ")", "]", ".", "sendline", "(", "command", ")", "return", "out" ]
Run command through switch's cli .. code-block: bash salt '*' onyx.cmd sendline 'show run | include "username admin password 7"'
[ "Run", "command", "through", "switch", "s", "cli" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/onyx.py#L141-L153
train
Run command through switch s sendline
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/proxy/onyx.py
grains
def grains(): ''' Get grains for proxy minion .. code-block: bash salt '*' onyx.cmd grains ''' if not DETAILS['grains_cache']: ret = system_info() log.debug(ret) DETAILS['grains_cache'].update(ret) return {'onyx': DETAILS['grains_cache']}
python
def grains(): ''' Get grains for proxy minion .. code-block: bash salt '*' onyx.cmd grains ''' if not DETAILS['grains_cache']: ret = system_info() log.debug(ret) DETAILS['grains_cache'].update(ret) return {'onyx': DETAILS['grains_cache']}
[ "def", "grains", "(", ")", ":", "if", "not", "DETAILS", "[", "'grains_cache'", "]", ":", "ret", "=", "system_info", "(", ")", "log", ".", "debug", "(", "ret", ")", "DETAILS", "[", "'grains_cache'", "]", ".", "update", "(", "ret", ")", "return", "{", ...
Get grains for proxy minion .. code-block: bash salt '*' onyx.cmd grains
[ "Get", "grains", "for", "proxy", "minion" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/onyx.py#L221-L233
train
Return grains for proxy minion
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/proxy/onyx.py
get_user
def get_user(username): ''' Get username line from switch .. code-block: bash salt '*' onyx.cmd get_user username=admin ''' try: enable() configure_terminal() cmd_out = sendline('show running-config | include "username {0} password 7"'.format(username)) cmd_...
python
def get_user(username): ''' Get username line from switch .. code-block: bash salt '*' onyx.cmd get_user username=admin ''' try: enable() configure_terminal() cmd_out = sendline('show running-config | include "username {0} password 7"'.format(username)) cmd_...
[ "def", "get_user", "(", "username", ")", ":", "try", ":", "enable", "(", ")", "configure_terminal", "(", ")", "cmd_out", "=", "sendline", "(", "'show running-config | include \"username {0} password 7\"'", ".", "format", "(", "username", ")", ")", "cmd_out", ".", ...
Get username line from switch .. code-block: bash salt '*' onyx.cmd get_user username=admin
[ "Get", "username", "line", "from", "switch" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/onyx.py#L248-L267
train
Get username line from switch
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/proxy/onyx.py
get_roles
def get_roles(username): ''' Get roles that the username is assigned from switch .. code-block: bash salt '*' onyx.cmd get_roles username=admin ''' info = sendline('show user-account {0}'.format(username)) roles = re.search(r'^\s*roles:(.*)$', info, re.MULTILINE) if roles: ...
python
def get_roles(username): ''' Get roles that the username is assigned from switch .. code-block: bash salt '*' onyx.cmd get_roles username=admin ''' info = sendline('show user-account {0}'.format(username)) roles = re.search(r'^\s*roles:(.*)$', info, re.MULTILINE) if roles: ...
[ "def", "get_roles", "(", "username", ")", ":", "info", "=", "sendline", "(", "'show user-account {0}'", ".", "format", "(", "username", ")", ")", "roles", "=", "re", ".", "search", "(", "r'^\\s*roles:(.*)$'", ",", "info", ",", "re", ".", "MULTILINE", ")", ...
Get roles that the username is assigned from switch .. code-block: bash salt '*' onyx.cmd get_roles username=admin
[ "Get", "roles", "that", "the", "username", "is", "assigned", "from", "switch" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/onyx.py#L270-L284
train
Get roles that the username is assigned to switch
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/proxy/onyx.py
remove_user
def remove_user(username): ''' Remove user from switch .. code-block:: bash salt '*' onyx.cmd remove_user username=daniel ''' try: sendline('config terminal') user_line = 'no username {0}'.format(username) ret = sendline(user_line) sendline('end') se...
python
def remove_user(username): ''' Remove user from switch .. code-block:: bash salt '*' onyx.cmd remove_user username=daniel ''' try: sendline('config terminal') user_line = 'no username {0}'.format(username) ret = sendline(user_line) sendline('end') se...
[ "def", "remove_user", "(", "username", ")", ":", "try", ":", "sendline", "(", "'config terminal'", ")", "user_line", "=", "'no username {0}'", ".", "format", "(", "username", ")", "ret", "=", "sendline", "(", "user_line", ")", "sendline", "(", "'end'", ")", ...
Remove user from switch .. code-block:: bash salt '*' onyx.cmd remove_user username=daniel
[ "Remove", "user", "from", "switch" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/onyx.py#L298-L315
train
Remove user from switch
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/proxy/onyx.py
set_role
def set_role(username, role): ''' Assign role to username .. code-block:: bash salt '*' onyx.cmd set_role username=daniel role=vdc-admin ''' try: sendline('config terminal') role_line = 'username {0} role {1}'.format(username, role) ret = sendline(role_line) ...
python
def set_role(username, role): ''' Assign role to username .. code-block:: bash salt '*' onyx.cmd set_role username=daniel role=vdc-admin ''' try: sendline('config terminal') role_line = 'username {0} role {1}'.format(username, role) ret = sendline(role_line) ...
[ "def", "set_role", "(", "username", ",", "role", ")", ":", "try", ":", "sendline", "(", "'config terminal'", ")", "role_line", "=", "'username {0} role {1}'", ".", "format", "(", "username", ",", "role", ")", "ret", "=", "sendline", "(", "role_line", ")", ...
Assign role to username .. code-block:: bash salt '*' onyx.cmd set_role username=daniel role=vdc-admin
[ "Assign", "role", "to", "username" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/onyx.py#L318-L335
train
Assign role to username
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/proxy/onyx.py
show_run
def show_run(): ''' Shortcut to run `show run` on switch .. code-block:: bash salt '*' onyx.cmd show_run ''' try: enable() configure_terminal() ret = sendline('show running-config') configure_terminal_exit() disable() except TerminalException as ...
python
def show_run(): ''' Shortcut to run `show run` on switch .. code-block:: bash salt '*' onyx.cmd show_run ''' try: enable() configure_terminal() ret = sendline('show running-config') configure_terminal_exit() disable() except TerminalException as ...
[ "def", "show_run", "(", ")", ":", "try", ":", "enable", "(", ")", "configure_terminal", "(", ")", "ret", "=", "sendline", "(", "'show running-config'", ")", "configure_terminal_exit", "(", ")", "disable", "(", ")", "except", "TerminalException", "as", "e", "...
Shortcut to run `show run` on switch .. code-block:: bash salt '*' onyx.cmd show_run
[ "Shortcut", "to", "run", "show", "run", "on", "switch" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/onyx.py#L358-L375
train
Shortcut to run show run on switch
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/proxy/onyx.py
add_config
def add_config(lines): ''' Add one or more config lines to the switch running config .. code-block:: bash salt '*' onyx.cmd add_config 'snmp-server community TESTSTRINGHERE rw' .. note:: For more than one config added per command, lines should be a list. ''' if not isinstance(...
python
def add_config(lines): ''' Add one or more config lines to the switch running config .. code-block:: bash salt '*' onyx.cmd add_config 'snmp-server community TESTSTRINGHERE rw' .. note:: For more than one config added per command, lines should be a list. ''' if not isinstance(...
[ "def", "add_config", "(", "lines", ")", ":", "if", "not", "isinstance", "(", "lines", ",", "list", ")", ":", "lines", "=", "[", "lines", "]", "try", ":", "enable", "(", ")", "configure_terminal", "(", ")", "for", "line", "in", "lines", ":", "sendline...
Add one or more config lines to the switch running config .. code-block:: bash salt '*' onyx.cmd add_config 'snmp-server community TESTSTRINGHERE rw' .. note:: For more than one config added per command, lines should be a list.
[ "Add", "one", "or", "more", "config", "lines", "to", "the", "switch", "running", "config" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/onyx.py#L394-L418
train
Add one or more config lines to the switch running config
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/proxy/onyx.py
delete_config
def delete_config(lines): ''' Delete one or more config lines to the switch running config .. code-block:: bash salt '*' onyx.cmd delete_config 'snmp-server community TESTSTRINGHERE group network-operator' .. note:: For more than one config deleted per command, lines should be a list....
python
def delete_config(lines): ''' Delete one or more config lines to the switch running config .. code-block:: bash salt '*' onyx.cmd delete_config 'snmp-server community TESTSTRINGHERE group network-operator' .. note:: For more than one config deleted per command, lines should be a list....
[ "def", "delete_config", "(", "lines", ")", ":", "if", "not", "isinstance", "(", "lines", ",", "list", ")", ":", "lines", "=", "[", "lines", "]", "try", ":", "sendline", "(", "'config terminal'", ")", "for", "line", "in", "lines", ":", "sendline", "(", ...
Delete one or more config lines to the switch running config .. code-block:: bash salt '*' onyx.cmd delete_config 'snmp-server community TESTSTRINGHERE group network-operator' .. note:: For more than one config deleted per command, lines should be a list.
[ "Delete", "one", "or", "more", "config", "lines", "to", "the", "switch", "running", "config" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/onyx.py#L421-L444
train
Delete one or more config lines to the switch running config
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/proxy/onyx.py
find
def find(pattern): ''' Find all instances where the pattern is in the running command .. code-block:: bash salt '*' onyx.cmd find '^snmp-server.*$' .. note:: This uses the `re.MULTILINE` regex format for python, and runs the regex against the whole show_run output. ''' ...
python
def find(pattern): ''' Find all instances where the pattern is in the running command .. code-block:: bash salt '*' onyx.cmd find '^snmp-server.*$' .. note:: This uses the `re.MULTILINE` regex format for python, and runs the regex against the whole show_run output. ''' ...
[ "def", "find", "(", "pattern", ")", ":", "matcher", "=", "re", ".", "compile", "(", "pattern", ",", "re", ".", "MULTILINE", ")", "return", "matcher", ".", "findall", "(", "show_run", "(", ")", ")" ]
Find all instances where the pattern is in the running command .. code-block:: bash salt '*' onyx.cmd find '^snmp-server.*$' .. note:: This uses the `re.MULTILINE` regex format for python, and runs the regex against the whole show_run output.
[ "Find", "all", "instances", "where", "the", "pattern", "is", "in", "the", "running", "command" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/onyx.py#L447-L460
train
Find all instances where the pattern is in the running command
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/proxy/onyx.py
replace
def replace(old_value, new_value, full_match=False): ''' Replace string or full line matches in switch's running config If full_match is set to True, then the whole line will need to be matched as part of the old value. .. code-block:: bash salt '*' onyx.cmd replace 'TESTSTRINGHERE' 'NEWT...
python
def replace(old_value, new_value, full_match=False): ''' Replace string or full line matches in switch's running config If full_match is set to True, then the whole line will need to be matched as part of the old value. .. code-block:: bash salt '*' onyx.cmd replace 'TESTSTRINGHERE' 'NEWT...
[ "def", "replace", "(", "old_value", ",", "new_value", ",", "full_match", "=", "False", ")", ":", "if", "full_match", "is", "False", ":", "matcher", "=", "re", ".", "compile", "(", "'^.*{0}.*$'", ".", "format", "(", "re", ".", "escape", "(", "old_value", ...
Replace string or full line matches in switch's running config If full_match is set to True, then the whole line will need to be matched as part of the old value. .. code-block:: bash salt '*' onyx.cmd replace 'TESTSTRINGHERE' 'NEWTESTSTRINGHERE'
[ "Replace", "string", "or", "full", "line", "matches", "in", "switch", "s", "running", "config" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/onyx.py#L463-L489
train
Replace string or full line matches in switch s running config with new_value
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/postgres_group.py
present
def present(name, createdb=None, createroles=None, encrypted=None, superuser=None, inherit=None, login=None, replication=None, password=None, refresh_password=None, groups=None, user=None,...
python
def present(name, createdb=None, createroles=None, encrypted=None, superuser=None, inherit=None, login=None, replication=None, password=None, refresh_password=None, groups=None, user=None,...
[ "def", "present", "(", "name", ",", "createdb", "=", "None", ",", "createroles", "=", "None", ",", "encrypted", "=", "None", ",", "superuser", "=", "None", ",", "inherit", "=", "None", ",", "login", "=", "None", ",", "replication", "=", "None", ",", ...
Ensure that the named group is present with the specified privileges Please note that the user/group notion in postgresql is just abstract, we have roles, where users can be seen as roles with the ``LOGIN`` privilege and groups the others. name The name of the group to manage createdb ...
[ "Ensure", "that", "the", "named", "group", "is", "present", "with", "the", "specified", "privileges", "Please", "note", "that", "the", "user", "/", "group", "notion", "in", "postgresql", "is", "just", "abstract", "we", "have", "roles", "where", "users", "can...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/postgres_group.py#L36-L213
train
Ensures that the named group is present with the specified privileges.
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/postgres_group.py
absent
def absent(name, user=None, maintenance_db=None, db_password=None, db_host=None, db_port=None, db_user=None): ''' Ensure that the named group is absent name The groupname of the group to remove user System user all opera...
python
def absent(name, user=None, maintenance_db=None, db_password=None, db_host=None, db_port=None, db_user=None): ''' Ensure that the named group is absent name The groupname of the group to remove user System user all opera...
[ "def", "absent", "(", "name", ",", "user", "=", "None", ",", "maintenance_db", "=", "None", ",", "db_password", "=", "None", ",", "db_host", "=", "None", ",", "db_port", "=", "None", ",", "db_user", "=", "None", ")", ":", "ret", "=", "{", "'name'", ...
Ensure that the named group is absent name The groupname of the group to remove user System user all operations should be performed on behalf of .. versionadded:: 0.17.0 db_user database username if different from config or defaul db_password user password if...
[ "Ensure", "that", "the", "named", "group", "is", "absent" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/postgres_group.py#L216-L273
train
Ensure that the named group is absent
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/docker/translate/helpers.py
get_port_def
def get_port_def(port_num, proto='tcp'): ''' Given a port number and protocol, returns the port definition expected by docker-py. For TCP ports this is simply an integer, for UDP ports this is (port_num, 'udp'). port_num can also be a string in the format 'port_num/udp'. If so, the "proto" argu...
python
def get_port_def(port_num, proto='tcp'): ''' Given a port number and protocol, returns the port definition expected by docker-py. For TCP ports this is simply an integer, for UDP ports this is (port_num, 'udp'). port_num can also be a string in the format 'port_num/udp'. If so, the "proto" argu...
[ "def", "get_port_def", "(", "port_num", ",", "proto", "=", "'tcp'", ")", ":", "try", ":", "port_num", ",", "_", ",", "port_num_proto", "=", "port_num", ".", "partition", "(", "'/'", ")", "except", "AttributeError", ":", "pass", "else", ":", "if", "port_n...
Given a port number and protocol, returns the port definition expected by docker-py. For TCP ports this is simply an integer, for UDP ports this is (port_num, 'udp'). port_num can also be a string in the format 'port_num/udp'. If so, the "proto" argument will be ignored. The reason we need to be able t...
[ "Given", "a", "port", "number", "and", "protocol", "returns", "the", "port", "definition", "expected", "by", "docker", "-", "py", ".", "For", "TCP", "ports", "this", "is", "simply", "an", "integer", "for", "UDP", "ports", "this", "is", "(", "port_num", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/docker/translate/helpers.py#L26-L59
train
Given a port number and protocol returns the port definition expected by the base container docker - py.
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/docker/translate/helpers.py
get_port_range
def get_port_range(port_def): ''' Given a port number or range, return a start and end to that range. Port ranges are defined as a string containing two numbers separated by a dash (e.g. '4505-4506'). A ValueError will be raised if bad input is provided. ''' if isinstance(port_def, six.inte...
python
def get_port_range(port_def): ''' Given a port number or range, return a start and end to that range. Port ranges are defined as a string containing two numbers separated by a dash (e.g. '4505-4506'). A ValueError will be raised if bad input is provided. ''' if isinstance(port_def, six.inte...
[ "def", "get_port_range", "(", "port_def", ")", ":", "if", "isinstance", "(", "port_def", ",", "six", ".", "integer_types", ")", ":", "# Single integer, start/end of range is the same", "return", "port_def", ",", "port_def", "try", ":", "comps", "=", "[", "int", ...
Given a port number or range, return a start and end to that range. Port ranges are defined as a string containing two numbers separated by a dash (e.g. '4505-4506'). A ValueError will be raised if bad input is provided.
[ "Given", "a", "port", "number", "or", "range", "return", "a", "start", "and", "end", "to", "that", "range", ".", "Port", "ranges", "are", "defined", "as", "a", "string", "containing", "two", "numbers", "separated", "by", "a", "dash", "(", "e", ".", "g"...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/docker/translate/helpers.py#L62-L93
train
Given a port number or range return a start and end to that range.
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/docker/translate/helpers.py
map_vals
def map_vals(val, *names, **extra_opts): ''' Many arguments come in as a list of VAL1:VAL2 pairs, but map to a list of dicts in the format {NAME1: VAL1, NAME2: VAL2}. This function provides common code to handle these instances. ''' fill = extra_opts.pop('fill', NOTSET) expected_num_elements...
python
def map_vals(val, *names, **extra_opts): ''' Many arguments come in as a list of VAL1:VAL2 pairs, but map to a list of dicts in the format {NAME1: VAL1, NAME2: VAL2}. This function provides common code to handle these instances. ''' fill = extra_opts.pop('fill', NOTSET) expected_num_elements...
[ "def", "map_vals", "(", "val", ",", "*", "names", ",", "*", "*", "extra_opts", ")", ":", "fill", "=", "extra_opts", ".", "pop", "(", "'fill'", ",", "NOTSET", ")", "expected_num_elements", "=", "len", "(", "names", ")", "val", "=", "translate_stringlist",...
Many arguments come in as a list of VAL1:VAL2 pairs, but map to a list of dicts in the format {NAME1: VAL1, NAME2: VAL2}. This function provides common code to handle these instances.
[ "Many", "arguments", "come", "in", "as", "a", "list", "of", "VAL1", ":", "VAL2", "pairs", "but", "map", "to", "a", "list", "of", "dicts", "in", "the", "format", "{", "NAME1", ":", "VAL1", "NAME2", ":", "VAL2", "}", ".", "This", "function", "provides"...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/docker/translate/helpers.py#L96-L127
train
Map values from a list of names to 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...
saltstack/salt
salt/utils/docker/translate/helpers.py
translate_command
def translate_command(val): ''' Input should either be a single string, or a list of strings. This is used for the two args that deal with commands ("command" and "entrypoint"). ''' if isinstance(val, six.string_types): return val elif isinstance(val, list): for idx in range(len(...
python
def translate_command(val): ''' Input should either be a single string, or a list of strings. This is used for the two args that deal with commands ("command" and "entrypoint"). ''' if isinstance(val, six.string_types): return val elif isinstance(val, list): for idx in range(len(...
[ "def", "translate_command", "(", "val", ")", ":", "if", "isinstance", "(", "val", ",", "six", ".", "string_types", ")", ":", "return", "val", "elif", "isinstance", "(", "val", ",", "list", ")", ":", "for", "idx", "in", "range", "(", "len", "(", "val"...
Input should either be a single string, or a list of strings. This is used for the two args that deal with commands ("command" and "entrypoint").
[ "Input", "should", "either", "be", "a", "single", "string", "or", "a", "list", "of", "strings", ".", "This", "is", "used", "for", "the", "two", "args", "that", "deal", "with", "commands", "(", "command", "and", "entrypoint", ")", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/docker/translate/helpers.py#L176-L190
train
Translate a command to a list of strings.
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/docker/translate/helpers.py
translate_bytes
def translate_bytes(val): ''' These values can be expressed as an integer number of bytes, or a string expression (i.e. 100mb, 1gb, etc.). ''' try: val = int(val) except (TypeError, ValueError): if not isinstance(val, six.string_types): val = six.text_type(val) re...
python
def translate_bytes(val): ''' These values can be expressed as an integer number of bytes, or a string expression (i.e. 100mb, 1gb, etc.). ''' try: val = int(val) except (TypeError, ValueError): if not isinstance(val, six.string_types): val = six.text_type(val) re...
[ "def", "translate_bytes", "(", "val", ")", ":", "try", ":", "val", "=", "int", "(", "val", ")", "except", "(", "TypeError", ",", "ValueError", ")", ":", "if", "not", "isinstance", "(", "val", ",", "six", ".", "string_types", ")", ":", "val", "=", "...
These values can be expressed as an integer number of bytes, or a string expression (i.e. 100mb, 1gb, etc.).
[ "These", "values", "can", "be", "expressed", "as", "an", "integer", "number", "of", "bytes", "or", "a", "string", "expression", "(", "i", ".", "e", ".", "100mb", "1gb", "etc", ".", ")", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/docker/translate/helpers.py#L193-L203
train
Translate bytes to the corresponding Python 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/docker/translate/helpers.py
translate_stringlist
def translate_stringlist(val): ''' On the CLI, these are passed as multiple instances of a given CLI option. In Salt, we accept these as a comma-delimited list but the API expects a Python list. This function accepts input and returns it back as a Python list of strings. If the input is a string whi...
python
def translate_stringlist(val): ''' On the CLI, these are passed as multiple instances of a given CLI option. In Salt, we accept these as a comma-delimited list but the API expects a Python list. This function accepts input and returns it back as a Python list of strings. If the input is a string whi...
[ "def", "translate_stringlist", "(", "val", ")", ":", "if", "not", "isinstance", "(", "val", ",", "list", ")", ":", "try", ":", "val", "=", "split", "(", "val", ")", "except", "AttributeError", ":", "val", "=", "split", "(", "six", ".", "text_type", "...
On the CLI, these are passed as multiple instances of a given CLI option. In Salt, we accept these as a comma-delimited list but the API expects a Python list. This function accepts input and returns it back as a Python list of strings. If the input is a string which is a comma-separated list of items, ...
[ "On", "the", "CLI", "these", "are", "passed", "as", "multiple", "instances", "of", "a", "given", "CLI", "option", ".", "In", "Salt", "we", "accept", "these", "as", "a", "comma", "-", "delimited", "list", "but", "the", "API", "expects", "a", "Python", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/docker/translate/helpers.py#L206-L222
train
Translate a string list into a list of strings.
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/docker/translate/helpers.py
translate_device_rates
def translate_device_rates(val, numeric_rate=True): ''' CLI input is a list of PATH:RATE pairs, but the API expects a list of dictionaries in the format [{'Path': path, 'Rate': rate}] ''' val = map_vals(val, 'Path', 'Rate') for idx in range(len(val)): try: is_abs = os.path.is...
python
def translate_device_rates(val, numeric_rate=True): ''' CLI input is a list of PATH:RATE pairs, but the API expects a list of dictionaries in the format [{'Path': path, 'Rate': rate}] ''' val = map_vals(val, 'Path', 'Rate') for idx in range(len(val)): try: is_abs = os.path.is...
[ "def", "translate_device_rates", "(", "val", ",", "numeric_rate", "=", "True", ")", ":", "val", "=", "map_vals", "(", "val", ",", "'Path'", ",", "'Rate'", ")", "for", "idx", "in", "range", "(", "len", "(", "val", ")", ")", ":", "try", ":", "is_abs", ...
CLI input is a list of PATH:RATE pairs, but the API expects a list of dictionaries in the format [{'Path': path, 'Rate': rate}]
[ "CLI", "input", "is", "a", "list", "of", "PATH", ":", "RATE", "pairs", "but", "the", "API", "expects", "a", "list", "of", "dictionaries", "in", "the", "format", "[", "{", "Path", ":", "path", "Rate", ":", "rate", "}", "]" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/docker/translate/helpers.py#L225-L257
train
Translate device rates to their corresponding 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/utils/docker/translate/helpers.py
translate_key_val
def translate_key_val(val, delimiter='='): ''' CLI input is a list of key/val pairs, but the API expects a dictionary in the format {key: val} ''' if isinstance(val, dict): return val val = translate_stringlist(val) new_val = {} for item in val: try: lvalue, r...
python
def translate_key_val(val, delimiter='='): ''' CLI input is a list of key/val pairs, but the API expects a dictionary in the format {key: val} ''' if isinstance(val, dict): return val val = translate_stringlist(val) new_val = {} for item in val: try: lvalue, r...
[ "def", "translate_key_val", "(", "val", ",", "delimiter", "=", "'='", ")", ":", "if", "isinstance", "(", "val", ",", "dict", ")", ":", "return", "val", "val", "=", "translate_stringlist", "(", "val", ")", "new_val", "=", "{", "}", "for", "item", "in", ...
CLI input is a list of key/val pairs, but the API expects a dictionary in the format {key: val}
[ "CLI", "input", "is", "a", "list", "of", "key", "/", "val", "pairs", "but", "the", "API", "expects", "a", "dictionary", "in", "the", "format", "{", "key", ":", "val", "}" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/docker/translate/helpers.py#L260-L277
train
Translate a list of key value pairs into a dictionary of key - value pairs.
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/docker/translate/helpers.py
translate_labels
def translate_labels(val): ''' Can either be a list of label names, or a list of name=value pairs. The API can accept either a list of label names or a dictionary mapping names to values, so the value we translate will be different depending on the input. ''' if not isinstance(val, dict): ...
python
def translate_labels(val): ''' Can either be a list of label names, or a list of name=value pairs. The API can accept either a list of label names or a dictionary mapping names to values, so the value we translate will be different depending on the input. ''' if not isinstance(val, dict): ...
[ "def", "translate_labels", "(", "val", ")", ":", "if", "not", "isinstance", "(", "val", ",", "dict", ")", ":", "if", "not", "isinstance", "(", "val", ",", "list", ")", ":", "val", "=", "split", "(", "val", ")", "new_val", "=", "{", "}", "for", "i...
Can either be a list of label names, or a list of name=value pairs. The API can accept either a list of label names or a dictionary mapping names to values, so the value we translate will be different depending on the input.
[ "Can", "either", "be", "a", "list", "of", "label", "names", "or", "a", "list", "of", "name", "=", "value", "pairs", ".", "The", "API", "can", "accept", "either", "a", "list", "of", "label", "names", "or", "a", "dictionary", "mapping", "names", "to", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/docker/translate/helpers.py#L280-L308
train
Translate the label names to the corresponding APIVersion.
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/firewall.py
check
def check(name, port=None, **kwargs): ''' Checks if there is an open connection from the minion to the defined host on a specific port. name host name or ip address to test connection to port The port to test the connection on kwargs Additional parameters, parameters allowe...
python
def check(name, port=None, **kwargs): ''' Checks if there is an open connection from the minion to the defined host on a specific port. name host name or ip address to test connection to port The port to test the connection on kwargs Additional parameters, parameters allowe...
[ "def", "check", "(", "name", ",", "port", "=", "None", ",", "*", "*", "kwargs", ")", ":", "# set name to host as required by the module", "host", "=", "name", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "True", ",", "'changes'", ":", "{...
Checks if there is an open connection from the minion to the defined host on a specific port. name host name or ip address to test connection to port The port to test the connection on kwargs Additional parameters, parameters allowed are: proto (tcp or udp) family (i...
[ "Checks", "if", "there", "is", "an", "open", "connection", "from", "the", "minion", "to", "the", "defined", "host", "on", "a", "specific", "port", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/firewall.py#L19-L67
train
Checks if there is an open connection to the specified host on a specific port.
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/selinux.py
_refine_mode
def _refine_mode(mode): ''' Return a mode value that is predictable ''' mode = six.text_type(mode).lower() if any([mode.startswith('e'), mode == '1', mode == 'on']): return 'Enforcing' if any([mode.startswith('p'), mode == '0', mode == 'off...
python
def _refine_mode(mode): ''' Return a mode value that is predictable ''' mode = six.text_type(mode).lower() if any([mode.startswith('e'), mode == '1', mode == 'on']): return 'Enforcing' if any([mode.startswith('p'), mode == '0', mode == 'off...
[ "def", "_refine_mode", "(", "mode", ")", ":", "mode", "=", "six", ".", "text_type", "(", "mode", ")", ".", "lower", "(", ")", "if", "any", "(", "[", "mode", ".", "startswith", "(", "'e'", ")", ",", "mode", "==", "'1'", ",", "mode", "==", "'on'", ...
Return a mode value that is predictable
[ "Return", "a", "mode", "value", "that", "is", "predictable" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/selinux.py#L41-L56
train
Return a mode value that is predictable
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/selinux.py
mode
def mode(name): ''' Verifies the mode SELinux is running in, can be set to enforcing, permissive, or disabled .. note:: A change to or from disabled mode requires a system reboot. You will need to perform this yourself. name The mode to run SELinux in, permissive, enforcing...
python
def mode(name): ''' Verifies the mode SELinux is running in, can be set to enforcing, permissive, or disabled .. note:: A change to or from disabled mode requires a system reboot. You will need to perform this yourself. name The mode to run SELinux in, permissive, enforcing...
[ "def", "mode", "(", "name", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "False", ",", "'comment'", ":", "''", ",", "'changes'", ":", "{", "}", "}", "tmode", "=", "_refine_mode", "(", "name", ")", "if", "tmode", "==", "...
Verifies the mode SELinux is running in, can be set to enforcing, permissive, or disabled .. note:: A change to or from disabled mode requires a system reboot. You will need to perform this yourself. name The mode to run SELinux in, permissive, enforcing, or disabled.
[ "Verifies", "the", "mode", "SELinux", "is", "running", "in", "can", "be", "set", "to", "enforcing", "permissive", "or", "disabled" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/selinux.py#L84-L133
train
Ensure the current mode is in the alphabetical order.
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/selinux.py
boolean
def boolean(name, value, persist=False): ''' Set up an SELinux boolean name The name of the boolean to set value The value to set on the boolean persist Defaults to False, set persist to true to make the boolean apply on a reboot ''' ret = {'name': name, ...
python
def boolean(name, value, persist=False): ''' Set up an SELinux boolean name The name of the boolean to set value The value to set on the boolean persist Defaults to False, set persist to true to make the boolean apply on a reboot ''' ret = {'name': name, ...
[ "def", "boolean", "(", "name", ",", "value", ",", "persist", "=", "False", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "True", ",", "'comment'", ":", "''", ",", "'changes'", ":", "{", "}", "}", "bools", "=", "__salt__", ...
Set up an SELinux boolean name The name of the boolean to set value The value to set on the boolean persist Defaults to False, set persist to true to make the boolean apply on a reboot
[ "Set", "up", "an", "SELinux", "boolean" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/selinux.py#L136-L191
train
Set the value of a SELinux boolean on the specified resource
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/selinux.py
module
def module(name, module_state='Enabled', version='any', **opts): ''' Enable/Disable and optionally force a specific version for an SELinux module name The name of the module to control module_state Should the module be enabled or disabled? version Defaults to no preference...
python
def module(name, module_state='Enabled', version='any', **opts): ''' Enable/Disable and optionally force a specific version for an SELinux module name The name of the module to control module_state Should the module be enabled or disabled? version Defaults to no preference...
[ "def", "module", "(", "name", ",", "module_state", "=", "'Enabled'", ",", "version", "=", "'any'", ",", "*", "*", "opts", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "True", ",", "'comment'", ":", "''", ",", "'changes'", ...
Enable/Disable and optionally force a specific version for an SELinux module name The name of the module to control module_state Should the module be enabled or disabled? version Defaults to no preference, set to a specified value if required. Currently can only alert if t...
[ "Enable", "/", "Disable", "and", "optionally", "force", "a", "specific", "version", "for", "an", "SELinux", "module" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/selinux.py#L194-L268
train
Enable or disable a module.
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/selinux.py
module_install
def module_install(name): ''' Installs custom SELinux module from given file name Path to file with module to install .. versionadded:: 2016.11.6 ''' ret = {'name': name, 'result': True, 'comment': '', 'changes': {}} if __salt__['selinux.install_sem...
python
def module_install(name): ''' Installs custom SELinux module from given file name Path to file with module to install .. versionadded:: 2016.11.6 ''' ret = {'name': name, 'result': True, 'comment': '', 'changes': {}} if __salt__['selinux.install_sem...
[ "def", "module_install", "(", "name", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "True", ",", "'comment'", ":", "''", ",", "'changes'", ":", "{", "}", "}", "if", "__salt__", "[", "'selinux.install_semod'", "]", "(", "name",...
Installs custom SELinux module from given file name Path to file with module to install .. versionadded:: 2016.11.6
[ "Installs", "custom", "SELinux", "module", "from", "given", "file" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/selinux.py#L271-L289
train
Installs custom SELinux module from given file with module name 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/states/selinux.py
module_remove
def module_remove(name): ''' Removes SELinux module name The name of the module to remove .. versionadded:: 2016.11.6 ''' ret = {'name': name, 'result': True, 'comment': '', 'changes': {}} modules = __salt__['selinux.list_semod']() if name not i...
python
def module_remove(name): ''' Removes SELinux module name The name of the module to remove .. versionadded:: 2016.11.6 ''' ret = {'name': name, 'result': True, 'comment': '', 'changes': {}} modules = __salt__['selinux.list_semod']() if name not i...
[ "def", "module_remove", "(", "name", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "True", ",", "'comment'", ":", "''", ",", "'changes'", ":", "{", "}", "}", "modules", "=", "__salt__", "[", "'selinux.list_semod'", "]", "(", ...
Removes SELinux module name The name of the module to remove .. versionadded:: 2016.11.6
[ "Removes", "SELinux", "module" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/selinux.py#L292-L315
train
Removes SELinux module
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/selinux.py
fcontext_policy_present
def fcontext_policy_present(name, sel_type, filetype='a', sel_user=None, sel_level=None): ''' .. versionadded:: 2017.7.0 Makes sure a SELinux policy for a given filespec (name), filetype and SELinux context type is present. name filespec of the file or directory. Regex syntax is allowed. ...
python
def fcontext_policy_present(name, sel_type, filetype='a', sel_user=None, sel_level=None): ''' .. versionadded:: 2017.7.0 Makes sure a SELinux policy for a given filespec (name), filetype and SELinux context type is present. name filespec of the file or directory. Regex syntax is allowed. ...
[ "def", "fcontext_policy_present", "(", "name", ",", "sel_type", ",", "filetype", "=", "'a'", ",", "sel_user", "=", "None", ",", "sel_level", "=", "None", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "False", ",", "'changes'", ...
.. versionadded:: 2017.7.0 Makes sure a SELinux policy for a given filespec (name), filetype and SELinux context type is present. name filespec of the file or directory. Regex syntax is allowed. sel_type SELinux context type. There are many. filetype The SELinux filetype ...
[ "..", "versionadded", "::", "2017", ".", "7", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/selinux.py#L318-L396
train
Ensures that a SELinux policy for a given file or directory is present.
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/selinux.py
fcontext_policy_absent
def fcontext_policy_absent(name, filetype='a', sel_type=None, sel_user=None, sel_level=None): ''' .. versionadded:: 2017.7.0 Makes sure an SELinux file context policy for a given filespec (name), filetype and SELinux context type is absent. name filespec of the file or directory. Regex syn...
python
def fcontext_policy_absent(name, filetype='a', sel_type=None, sel_user=None, sel_level=None): ''' .. versionadded:: 2017.7.0 Makes sure an SELinux file context policy for a given filespec (name), filetype and SELinux context type is absent. name filespec of the file or directory. Regex syn...
[ "def", "fcontext_policy_absent", "(", "name", ",", "filetype", "=", "'a'", ",", "sel_type", "=", "None", ",", "sel_user", "=", "None", ",", "sel_level", "=", "None", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "False", ",", ...
.. versionadded:: 2017.7.0 Makes sure an SELinux file context policy for a given filespec (name), filetype and SELinux context type is absent. name filespec of the file or directory. Regex syntax is allowed. filetype The SELinux filetype specification. Use one of [a, f, d, c, b, ...
[ "..", "versionadded", "::", "2017", ".", "7", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/selinux.py#L399-L455
train
Ensures that a SELinux file context policy for a given file or directory is absent.
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/selinux.py
fcontext_policy_applied
def fcontext_policy_applied(name, recursive=False): ''' .. versionadded:: 2017.7.0 Checks and makes sure the SELinux policies for a given filespec are applied. ''' ret = {'name': name, 'result': False, 'changes': {}, 'comment': ''} changes_text = __salt__['selinux.fcontext_policy_is_applie...
python
def fcontext_policy_applied(name, recursive=False): ''' .. versionadded:: 2017.7.0 Checks and makes sure the SELinux policies for a given filespec are applied. ''' ret = {'name': name, 'result': False, 'changes': {}, 'comment': ''} changes_text = __salt__['selinux.fcontext_policy_is_applie...
[ "def", "fcontext_policy_applied", "(", "name", ",", "recursive", "=", "False", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "False", ",", "'changes'", ":", "{", "}", ",", "'comment'", ":", "''", "}", "changes_text", "=", "__s...
.. versionadded:: 2017.7.0 Checks and makes sure the SELinux policies for a given filespec are applied.
[ "..", "versionadded", "::", "2017", ".", "7", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/selinux.py#L458-L481
train
Checks and makes sure the SELinux policies for a given filespec are applied.
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/selinux.py
port_policy_present
def port_policy_present(name, sel_type, protocol=None, port=None, sel_range=None): ''' .. versionadded:: 2019.2.0 Makes sure an SELinux port policy for a given port, protocol and SELinux context type is present. name The protocol and port spec. Can be formatted as ``(tcp|udp)/(port|port-range)...
python
def port_policy_present(name, sel_type, protocol=None, port=None, sel_range=None): ''' .. versionadded:: 2019.2.0 Makes sure an SELinux port policy for a given port, protocol and SELinux context type is present. name The protocol and port spec. Can be formatted as ``(tcp|udp)/(port|port-range)...
[ "def", "port_policy_present", "(", "name", ",", "sel_type", ",", "protocol", "=", "None", ",", "port", "=", "None", ",", "sel_range", "=", "None", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "False", ",", "'changes'", ":", ...
.. versionadded:: 2019.2.0 Makes sure an SELinux port policy for a given port, protocol and SELinux context type is present. name The protocol and port spec. Can be formatted as ``(tcp|udp)/(port|port-range)``. sel_type The SELinux Type. protocol The protocol for the port, ``...
[ "..", "versionadded", "::", "2019", ".", "2", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/selinux.py#L484-L536
train
Ensure an SELinux port policy is present.
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/selinux.py
port_policy_absent
def port_policy_absent(name, sel_type=None, protocol=None, port=None): ''' .. versionadded:: 2019.2.0 Makes sure an SELinux port policy for a given port, protocol and SELinux context type is absent. name The protocol and port spec. Can be formatted as ``(tcp|udp)/(port|port-range)``. sel_...
python
def port_policy_absent(name, sel_type=None, protocol=None, port=None): ''' .. versionadded:: 2019.2.0 Makes sure an SELinux port policy for a given port, protocol and SELinux context type is absent. name The protocol and port spec. Can be formatted as ``(tcp|udp)/(port|port-range)``. sel_...
[ "def", "port_policy_absent", "(", "name", ",", "sel_type", "=", "None", ",", "protocol", "=", "None", ",", "port", "=", "None", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "False", ",", "'changes'", ":", "{", "}", ",", "...
.. versionadded:: 2019.2.0 Makes sure an SELinux port policy for a given port, protocol and SELinux context type is absent. name The protocol and port spec. Can be formatted as ``(tcp|udp)/(port|port-range)``. sel_type The SELinux Type. Optional; can be used in determining if policy is pr...
[ "..", "versionadded", "::", "2019", ".", "2", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/selinux.py#L539-L587
train
Ensures that an SELinux port policy for a given port is absent.
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/openstack_config.py
present
def present(name, filename, section, value, parameter=None): ''' Ensure a value is set in an OpenStack configuration file. filename The full path to the configuration file section The section in which the parameter will be set parameter (optional) The parameter to change. ...
python
def present(name, filename, section, value, parameter=None): ''' Ensure a value is set in an OpenStack configuration file. filename The full path to the configuration file section The section in which the parameter will be set parameter (optional) The parameter to change. ...
[ "def", "present", "(", "name", ",", "filename", ",", "section", ",", "value", ",", "parameter", "=", "None", ")", ":", "if", "parameter", "is", "None", ":", "parameter", "=", "name", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{",...
Ensure a value is set in an OpenStack configuration file. filename The full path to the configuration file section The section in which the parameter will be set parameter (optional) The parameter to change. If the parameter is not supplied, the name will be used as the parameter...
[ "Ensure", "a", "value", "is", "set", "in", "an", "OpenStack", "configuration", "file", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/openstack_config.py#L33-L90
train
Ensure a value is set in an OpenStack configuration 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/azurearm_compute.py
availability_set_present
def availability_set_present(name, resource_group, tags=None, platform_update_domain_count=None, platform_fault_domain_count=None, virtual_machines=None, sku=None, connection_auth=None, **kwargs): ''' .. versionadded:: 2019.2.0 Ensure an availabilit...
python
def availability_set_present(name, resource_group, tags=None, platform_update_domain_count=None, platform_fault_domain_count=None, virtual_machines=None, sku=None, connection_auth=None, **kwargs): ''' .. versionadded:: 2019.2.0 Ensure an availabilit...
[ "def", "availability_set_present", "(", "name", ",", "resource_group", ",", "tags", "=", "None", ",", "platform_update_domain_count", "=", "None", ",", "platform_fault_domain_count", "=", "None", ",", "virtual_machines", "=", "None", ",", "sku", "=", "None", ",", ...
.. versionadded:: 2019.2.0 Ensure an availability set exists. :param name: Name of the availability set. :param resource_group: The resource group assigned to the availability set. :param tags: A dictionary of strings can be passed as tag metadata to the availability set obje...
[ "..", "versionadded", "::", "2019", ".", "2", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/azurearm_compute.py#L104-L263
train
Ensures an availability set exists and is up - to - date.
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/azurearm_compute.py
availability_set_absent
def availability_set_absent(name, resource_group, connection_auth=None): ''' .. versionadded:: 2019.2.0 Ensure an availability set does not exist in a resource group. :param name: Name of the availability set. :param resource_group: Name of the resource group containing the availa...
python
def availability_set_absent(name, resource_group, connection_auth=None): ''' .. versionadded:: 2019.2.0 Ensure an availability set does not exist in a resource group. :param name: Name of the availability set. :param resource_group: Name of the resource group containing the availa...
[ "def", "availability_set_absent", "(", "name", ",", "resource_group", ",", "connection_auth", "=", "None", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "False", ",", "'comment'", ":", "''", ",", "'changes'", ":", "{", "}", "}",...
.. versionadded:: 2019.2.0 Ensure an availability set does not exist in a resource group. :param name: Name of the availability set. :param resource_group: Name of the resource group containing the availability set. :param connection_auth: A dict with subscription and authent...
[ "..", "versionadded", "::", "2019", ".", "2", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/azurearm_compute.py#L266-L326
train
Ensure an availability set does not exist in a resource 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/grains/fibre_channel.py
_linux_wwns
def _linux_wwns(): ''' Return Fibre Channel port WWNs from a Linux host. ''' ret = [] for fc_file in glob.glob('/sys/class/fc_host/*/port_name'): with salt.utils.files.fopen(fc_file, 'r') as _wwn: content = _wwn.read() for line in content.splitlines(): ...
python
def _linux_wwns(): ''' Return Fibre Channel port WWNs from a Linux host. ''' ret = [] for fc_file in glob.glob('/sys/class/fc_host/*/port_name'): with salt.utils.files.fopen(fc_file, 'r') as _wwn: content = _wwn.read() for line in content.splitlines(): ...
[ "def", "_linux_wwns", "(", ")", ":", "ret", "=", "[", "]", "for", "fc_file", "in", "glob", ".", "glob", "(", "'/sys/class/fc_host/*/port_name'", ")", ":", "with", "salt", ".", "utils", ".", "files", ".", "fopen", "(", "fc_file", ",", "'r'", ")", "as", ...
Return Fibre Channel port WWNs from a Linux host.
[ "Return", "Fibre", "Channel", "port", "WWNs", "from", "a", "Linux", "host", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/grains/fibre_channel.py#L38-L48
train
Return a list of Fibre Channel port WWNs from a Linux 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/grains/fibre_channel.py
_windows_wwns
def _windows_wwns(): ''' Return Fibre Channel port WWNs from a Windows host. ''' ps_cmd = r'Get-WmiObject -ErrorAction Stop ' \ r'-class MSFC_FibrePortHBAAttributes ' \ r'-namespace "root\WMI" | ' \ r'Select -Expandproperty Attributes | ' \ r'%{($_.Por...
python
def _windows_wwns(): ''' Return Fibre Channel port WWNs from a Windows host. ''' ps_cmd = r'Get-WmiObject -ErrorAction Stop ' \ r'-class MSFC_FibrePortHBAAttributes ' \ r'-namespace "root\WMI" | ' \ r'Select -Expandproperty Attributes | ' \ r'%{($_.Por...
[ "def", "_windows_wwns", "(", ")", ":", "ps_cmd", "=", "r'Get-WmiObject -ErrorAction Stop '", "r'-class MSFC_FibrePortHBAAttributes '", "r'-namespace \"root\\WMI\" | '", "r'Select -Expandproperty Attributes | '", "r'%{($_.PortWWN | % {\"{0:x2}\" -f $_}) -join \"\"}'", "ret", "=", "[", "...
Return Fibre Channel port WWNs from a Windows host.
[ "Return", "Fibre", "Channel", "port", "WWNs", "from", "a", "Windows", "host", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/grains/fibre_channel.py#L51-L64
train
Return a list of port WWNs from a Windows 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/grains/fibre_channel.py
fibre_channel_wwns
def fibre_channel_wwns(): ''' Return list of fiber channel HBA WWNs ''' grains = {'fc_wwn': False} if salt.utils.platform.is_linux(): grains['fc_wwn'] = _linux_wwns() elif salt.utils.platform.is_windows(): grains['fc_wwn'] = _windows_wwns() return grains
python
def fibre_channel_wwns(): ''' Return list of fiber channel HBA WWNs ''' grains = {'fc_wwn': False} if salt.utils.platform.is_linux(): grains['fc_wwn'] = _linux_wwns() elif salt.utils.platform.is_windows(): grains['fc_wwn'] = _windows_wwns() return grains
[ "def", "fibre_channel_wwns", "(", ")", ":", "grains", "=", "{", "'fc_wwn'", ":", "False", "}", "if", "salt", ".", "utils", ".", "platform", ".", "is_linux", "(", ")", ":", "grains", "[", "'fc_wwn'", "]", "=", "_linux_wwns", "(", ")", "elif", "salt", ...
Return list of fiber channel HBA WWNs
[ "Return", "list", "of", "fiber", "channel", "HBA", "WWNs" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/grains/fibre_channel.py#L67-L76
train
Return list of fiber channel HBA WWNs
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/vsan.py
vsan_supported
def vsan_supported(service_instance): ''' Returns whether vsan is supported on the vCenter: api version needs to be 6 or higher service_instance Service instance to the host or vCenter ''' try: api_version = service_instance.content.about.apiVersion except vim.fault.NoPe...
python
def vsan_supported(service_instance): ''' Returns whether vsan is supported on the vCenter: api version needs to be 6 or higher service_instance Service instance to the host or vCenter ''' try: api_version = service_instance.content.about.apiVersion except vim.fault.NoPe...
[ "def", "vsan_supported", "(", "service_instance", ")", ":", "try", ":", "api_version", "=", "service_instance", ".", "content", ".", "about", ".", "apiVersion", "except", "vim", ".", "fault", ".", "NoPermission", "as", "exc", ":", "log", ".", "exception", "(...
Returns whether vsan is supported on the vCenter: api version needs to be 6 or higher service_instance Service instance to the host or vCenter
[ "Returns", "whether", "vsan", "is", "supported", "on", "the", "vCenter", ":", "api", "version", "needs", "to", "be", "6", "or", "higher" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vsan.py#L85-L107
train
Returns whether vsan is supported on the vCenter.
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/vsan.py
get_vsan_cluster_config_system
def get_vsan_cluster_config_system(service_instance): ''' Returns a vim.cluster.VsanVcClusterConfigSystem object service_instance Service instance to the host or vCenter ''' #TODO Replace when better connection mechanism is available #For python 2.7.9 and later, the defaul SSL conext ...
python
def get_vsan_cluster_config_system(service_instance): ''' Returns a vim.cluster.VsanVcClusterConfigSystem object service_instance Service instance to the host or vCenter ''' #TODO Replace when better connection mechanism is available #For python 2.7.9 and later, the defaul SSL conext ...
[ "def", "get_vsan_cluster_config_system", "(", "service_instance", ")", ":", "#TODO Replace when better connection mechanism is available", "#For python 2.7.9 and later, the defaul SSL conext has more strict", "#connection handshaking rule. We may need turn of the hostname checking", "#and client s...
Returns a vim.cluster.VsanVcClusterConfigSystem object service_instance Service instance to the host or vCenter
[ "Returns", "a", "vim", ".", "cluster", ".", "VsanVcClusterConfigSystem", "object" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vsan.py#L110-L131
train
Returns a vim. cluster. VsanVcClusterConfigSystem object for the given service instance.
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/vsan.py
get_host_vsan_system
def get_host_vsan_system(service_instance, host_ref, hostname=None): ''' Returns a host's vsan system service_instance Service instance to the host or vCenter host_ref Refernce to ESXi host hostname Name of ESXi host. Default value is None. ''' if not hostname: ...
python
def get_host_vsan_system(service_instance, host_ref, hostname=None): ''' Returns a host's vsan system service_instance Service instance to the host or vCenter host_ref Refernce to ESXi host hostname Name of ESXi host. Default value is None. ''' if not hostname: ...
[ "def", "get_host_vsan_system", "(", "service_instance", ",", "host_ref", ",", "hostname", "=", "None", ")", ":", "if", "not", "hostname", ":", "hostname", "=", "salt", ".", "utils", ".", "vmware", ".", "get_managed_object_name", "(", "host_ref", ")", "traversa...
Returns a host's vsan system service_instance Service instance to the host or vCenter host_ref Refernce to ESXi host hostname Name of ESXi host. Default value is None.
[ "Returns", "a", "host", "s", "vsan", "system" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vsan.py#L158-L184
train
Returns a host s vsan system
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/vsan.py
create_diskgroup
def create_diskgroup(service_instance, vsan_disk_mgmt_system, host_ref, cache_disk, capacity_disks): ''' Creates a disk group service_instance Service instance to the host or vCenter vsan_disk_mgmt_system vim.VimClusterVsanVcDiskManagemenetSystem representing the v...
python
def create_diskgroup(service_instance, vsan_disk_mgmt_system, host_ref, cache_disk, capacity_disks): ''' Creates a disk group service_instance Service instance to the host or vCenter vsan_disk_mgmt_system vim.VimClusterVsanVcDiskManagemenetSystem representing the v...
[ "def", "create_diskgroup", "(", "service_instance", ",", "vsan_disk_mgmt_system", ",", "host_ref", ",", "cache_disk", ",", "capacity_disks", ")", ":", "hostname", "=", "salt", ".", "utils", ".", "vmware", ".", "get_managed_object_name", "(", "host_ref", ")", "cach...
Creates a disk group service_instance Service instance to the host or vCenter vsan_disk_mgmt_system vim.VimClusterVsanVcDiskManagemenetSystem representing the vSan disk management system retrieved from the vsan endpoint. host_ref vim.HostSystem object representing the targ...
[ "Creates", "a", "disk", "group" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vsan.py#L187-L242
train
This method creates a disk group for a given host or vCenter and a list of capacity disks.
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/vsan.py
remove_capacity_from_diskgroup
def remove_capacity_from_diskgroup(service_instance, host_ref, diskgroup, capacity_disks, data_evacuation=True, hostname=None, host_vsan_system=None): ''' Removes capacity disk(s) from a disk group. ser...
python
def remove_capacity_from_diskgroup(service_instance, host_ref, diskgroup, capacity_disks, data_evacuation=True, hostname=None, host_vsan_system=None): ''' Removes capacity disk(s) from a disk group. ser...
[ "def", "remove_capacity_from_diskgroup", "(", "service_instance", ",", "host_ref", ",", "diskgroup", ",", "capacity_disks", ",", "data_evacuation", "=", "True", ",", "hostname", "=", "None", ",", "host_vsan_system", "=", "None", ")", ":", "if", "not", "hostname", ...
Removes capacity disk(s) from a disk group. service_instance Service instance to the host or vCenter host_vsan_system ESXi host's VSAN system host_ref Reference to the ESXi host diskgroup The vsan.HostDiskMapping object representing the host's diskgroup from w...
[ "Removes", "capacity", "disk", "(", "s", ")", "from", "a", "disk", "group", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vsan.py#L308-L379
train
This function removes capacity disks from a disk 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/utils/vsan.py
remove_diskgroup
def remove_diskgroup(service_instance, host_ref, diskgroup, hostname=None, host_vsan_system=None, erase_disk_partitions=False, data_accessibility=True): ''' Removes a disk group. service_instance Service instance to the host or vCenter host_ref ...
python
def remove_diskgroup(service_instance, host_ref, diskgroup, hostname=None, host_vsan_system=None, erase_disk_partitions=False, data_accessibility=True): ''' Removes a disk group. service_instance Service instance to the host or vCenter host_ref ...
[ "def", "remove_diskgroup", "(", "service_instance", ",", "host_ref", ",", "diskgroup", ",", "hostname", "=", "None", ",", "host_vsan_system", "=", "None", ",", "erase_disk_partitions", "=", "False", ",", "data_accessibility", "=", "True", ")", ":", "if", "not", ...
Removes a disk group. service_instance Service instance to the host or vCenter host_ref Reference to the ESXi host diskgroup The vsan.HostDiskMapping object representing the host's diskgroup from where the capacity needs to be removed hostname Name of ESXi hos...
[ "Removes", "a", "disk", "group", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vsan.py#L382-L440
train
Removes a disk group from the specified host or vCenter.
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/vsan.py
get_cluster_vsan_info
def get_cluster_vsan_info(cluster_ref): ''' Returns the extended cluster vsan configuration object (vim.VsanConfigInfoEx). cluster_ref Reference to the cluster ''' cluster_name = salt.utils.vmware.get_managed_object_name(cluster_ref) log.trace('Retrieving cluster vsan info of clust...
python
def get_cluster_vsan_info(cluster_ref): ''' Returns the extended cluster vsan configuration object (vim.VsanConfigInfoEx). cluster_ref Reference to the cluster ''' cluster_name = salt.utils.vmware.get_managed_object_name(cluster_ref) log.trace('Retrieving cluster vsan info of clust...
[ "def", "get_cluster_vsan_info", "(", "cluster_ref", ")", ":", "cluster_name", "=", "salt", ".", "utils", ".", "vmware", ".", "get_managed_object_name", "(", "cluster_ref", ")", "log", ".", "trace", "(", "'Retrieving cluster vsan info of cluster \\'%s\\''", ",", "clust...
Returns the extended cluster vsan configuration object (vim.VsanConfigInfoEx). cluster_ref Reference to the cluster
[ "Returns", "the", "extended", "cluster", "vsan", "configuration", "object", "(", "vim", ".", "VsanConfigInfoEx", ")", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vsan.py#L443-L468
train
Returns the extended cluster vsan configuration object of the specified 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/utils/vsan.py
reconfigure_cluster_vsan
def reconfigure_cluster_vsan(cluster_ref, cluster_vsan_spec): ''' Reconfigures the VSAN system of a cluster. cluster_ref Reference to the cluster cluster_vsan_spec Cluster VSAN reconfigure spec (vim.vsan.ReconfigSpec). ''' cluster_name = salt.utils.vmware.get_managed_object_nam...
python
def reconfigure_cluster_vsan(cluster_ref, cluster_vsan_spec): ''' Reconfigures the VSAN system of a cluster. cluster_ref Reference to the cluster cluster_vsan_spec Cluster VSAN reconfigure spec (vim.vsan.ReconfigSpec). ''' cluster_name = salt.utils.vmware.get_managed_object_nam...
[ "def", "reconfigure_cluster_vsan", "(", "cluster_ref", ",", "cluster_vsan_spec", ")", ":", "cluster_name", "=", "salt", ".", "utils", ".", "vmware", ".", "get_managed_object_name", "(", "cluster_ref", ")", "log", ".", "trace", "(", "'Reconfiguring vsan on cluster \\'%...
Reconfigures the VSAN system of a cluster. cluster_ref Reference to the cluster cluster_vsan_spec Cluster VSAN reconfigure spec (vim.vsan.ReconfigSpec).
[ "Reconfigures", "the", "VSAN", "system", "of", "a", "cluster", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vsan.py#L471-L500
train
Reconfigures the VSAN system of a 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/utils/vsan.py
_wait_for_tasks
def _wait_for_tasks(tasks, service_instance): ''' Wait for tasks created via the VSAN API ''' log.trace('Waiting for vsan tasks: {0}', ', '.join([six.text_type(t) for t in tasks])) try: vsanapiutils.WaitForTasks(tasks, service_instance) except vim.fault.NoPermission as exc:...
python
def _wait_for_tasks(tasks, service_instance): ''' Wait for tasks created via the VSAN API ''' log.trace('Waiting for vsan tasks: {0}', ', '.join([six.text_type(t) for t in tasks])) try: vsanapiutils.WaitForTasks(tasks, service_instance) except vim.fault.NoPermission as exc:...
[ "def", "_wait_for_tasks", "(", "tasks", ",", "service_instance", ")", ":", "log", ".", "trace", "(", "'Waiting for vsan tasks: {0}'", ",", "', '", ".", "join", "(", "[", "six", ".", "text_type", "(", "t", ")", "for", "t", "in", "tasks", "]", ")", ")", ...
Wait for tasks created via the VSAN API
[ "Wait", "for", "tasks", "created", "via", "the", "VSAN", "API" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vsan.py#L503-L522
train
Waits for tasks created via the VSAN API and returns the object.
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/crypt.py
decrypt
def decrypt(data, rend, translate_newlines=False, renderers=None, opts=None, valid_rend=None): ''' .. versionadded:: 2017.7.0 Decrypt a data structure using the specified renderer. Written originally as a common codebase to handle decryption o...
python
def decrypt(data, rend, translate_newlines=False, renderers=None, opts=None, valid_rend=None): ''' .. versionadded:: 2017.7.0 Decrypt a data structure using the specified renderer. Written originally as a common codebase to handle decryption o...
[ "def", "decrypt", "(", "data", ",", "rend", ",", "translate_newlines", "=", "False", ",", "renderers", "=", "None", ",", "opts", "=", "None", ",", "valid_rend", "=", "None", ")", ":", "try", ":", "if", "valid_rend", "and", "rend", "not", "in", "valid_r...
.. versionadded:: 2017.7.0 Decrypt a data structure using the specified renderer. Written originally as a common codebase to handle decryption of encrypted elements within Pillar data, but should be flexible enough for other uses as well. Returns the decrypted result, but any decryption renderer shoul...
[ "..", "versionadded", "::", "2017", ".", "7", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/crypt.py#L27-L100
train
This function decrypts a data structure with the specified renderer and returns the decrypted data structure.
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/crypt.py
pem_finger
def pem_finger(path=None, key=None, sum_type='sha256'): ''' Pass in either a raw pem string, or the path on disk to the location of a pem file, and the type of cryptographic hash to use. The default is SHA256. The fingerprint of the pem will be returned. If neither a key nor a path are passed in, a...
python
def pem_finger(path=None, key=None, sum_type='sha256'): ''' Pass in either a raw pem string, or the path on disk to the location of a pem file, and the type of cryptographic hash to use. The default is SHA256. The fingerprint of the pem will be returned. If neither a key nor a path are passed in, a...
[ "def", "pem_finger", "(", "path", "=", "None", ",", "key", "=", "None", ",", "sum_type", "=", "'sha256'", ")", ":", "if", "not", "key", ":", "if", "not", "os", ".", "path", ".", "isfile", "(", "path", ")", ":", "return", "''", "with", "salt", "."...
Pass in either a raw pem string, or the path on disk to the location of a pem file, and the type of cryptographic hash to use. The default is SHA256. The fingerprint of the pem will be returned. If neither a key nor a path are passed in, a blank string will be returned.
[ "Pass", "in", "either", "a", "raw", "pem", "string", "or", "the", "path", "on", "disk", "to", "the", "location", "of", "a", "pem", "file", "and", "the", "type", "of", "cryptographic", "hash", "to", "use", ".", "The", "default", "is", "SHA256", ".", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/crypt.py#L117-L140
train
Return the fingerprint of the a pem 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/utils/schema.py
SchemaItem._get_argname_value
def _get_argname_value(self, argname): ''' Return the argname value looking up on all possible attributes ''' # Let's see if there's a private function to get the value argvalue = getattr(self, '__get_{0}__'.format(argname), None) if argvalue is not None and callable(argv...
python
def _get_argname_value(self, argname): ''' Return the argname value looking up on all possible attributes ''' # Let's see if there's a private function to get the value argvalue = getattr(self, '__get_{0}__'.format(argname), None) if argvalue is not None and callable(argv...
[ "def", "_get_argname_value", "(", "self", ",", "argname", ")", ":", "# Let's see if there's a private function to get the value", "argvalue", "=", "getattr", "(", "self", ",", "'__get_{0}__'", ".", "format", "(", "argname", ")", ",", "None", ")", "if", "argvalue", ...
Return the argname value looking up on all possible attributes
[ "Return", "the", "argname", "value", "looking", "up", "on", "all", "possible", "attributes" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/schema.py#L731-L748
train
Return the argname value looking up on all possible attributes
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/schema.py
BaseSchemaItem.serialize
def serialize(self): ''' Return a serializable form of the config instance ''' serialized = {'type': self.__type__} for argname in self._attributes: if argname == 'required': # This is handled elsewhere continue argvalue = s...
python
def serialize(self): ''' Return a serializable form of the config instance ''' serialized = {'type': self.__type__} for argname in self._attributes: if argname == 'required': # This is handled elsewhere continue argvalue = s...
[ "def", "serialize", "(", "self", ")", ":", "serialized", "=", "{", "'type'", ":", "self", ".", "__type__", "}", "for", "argname", "in", "self", ".", "_attributes", ":", "if", "argname", "==", "'required'", ":", "# This is handled elsewhere", "continue", "arg...
Return a serializable form of the config instance
[ "Return", "a", "serializable", "form", "of", "the", "config", "instance" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/schema.py#L827-L845
train
Return a serializable form of the config instance
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/schema.py
ComplexSchemaItem._add_missing_schema_attributes
def _add_missing_schema_attributes(self): ''' Adds any missed schema attributes to the _attributes list The attributes can be class attributes and they won't be included in the _attributes list automatically ''' for attr in [attr for attr in dir(self) if not attr.startsw...
python
def _add_missing_schema_attributes(self): ''' Adds any missed schema attributes to the _attributes list The attributes can be class attributes and they won't be included in the _attributes list automatically ''' for attr in [attr for attr in dir(self) if not attr.startsw...
[ "def", "_add_missing_schema_attributes", "(", "self", ")", ":", "for", "attr", "in", "[", "attr", "for", "attr", "in", "dir", "(", "self", ")", "if", "not", "attr", ".", "startswith", "(", "'__'", ")", "]", ":", "attr_val", "=", "getattr", "(", "self",...
Adds any missed schema attributes to the _attributes list The attributes can be class attributes and they won't be included in the _attributes list automatically
[ "Adds", "any", "missed", "schema", "attributes", "to", "the", "_attributes", "list" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/schema.py#L1481-L1493
train
Adds any missed schema attributes to the _attributes list automatically
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/schema.py
ComplexSchemaItem.get_definition
def get_definition(self): '''Returns the definition of the complex item''' serialized = super(ComplexSchemaItem, self).serialize() # Adjust entries in the serialization del serialized['definition_name'] serialized['title'] = self.definition_name properties = {} ...
python
def get_definition(self): '''Returns the definition of the complex item''' serialized = super(ComplexSchemaItem, self).serialize() # Adjust entries in the serialization del serialized['definition_name'] serialized['title'] = self.definition_name properties = {} ...
[ "def", "get_definition", "(", "self", ")", ":", "serialized", "=", "super", "(", "ComplexSchemaItem", ",", "self", ")", ".", "serialize", "(", ")", "# Adjust entries in the serialization", "del", "serialized", "[", "'definition_name'", "]", "serialized", "[", "'ti...
Returns the definition of the complex item
[ "Returns", "the", "definition", "of", "the", "complex", "item" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/schema.py#L1506-L1533
train
Returns the definition of the complex item
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/schema.py
ComplexSchemaItem.get_complex_attrs
def get_complex_attrs(self): '''Returns a dictionary of the complex attributes''' return [getattr(self, attr_name) for attr_name in self._attributes if isinstance(getattr(self, attr_name), ComplexSchemaItem)]
python
def get_complex_attrs(self): '''Returns a dictionary of the complex attributes''' return [getattr(self, attr_name) for attr_name in self._attributes if isinstance(getattr(self, attr_name), ComplexSchemaItem)]
[ "def", "get_complex_attrs", "(", "self", ")", ":", "return", "[", "getattr", "(", "self", ",", "attr_name", ")", "for", "attr_name", "in", "self", ".", "_attributes", "if", "isinstance", "(", "getattr", "(", "self", ",", "attr_name", ")", ",", "ComplexSche...
Returns a dictionary of the complex attributes
[ "Returns", "a", "dictionary", "of", "the", "complex", "attributes" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/schema.py#L1535-L1538
train
Returns a dictionary of the complex attributes
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_rds.py
exists
def exists(name, tags=None, region=None, key=None, keyid=None, profile=None): ''' Check to see if an RDS exists. CLI example:: salt myminion boto_rds.exists myrds region=us-east-1 ''' conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile) try: rds = conn.descri...
python
def exists(name, tags=None, region=None, key=None, keyid=None, profile=None): ''' Check to see if an RDS exists. CLI example:: salt myminion boto_rds.exists myrds region=us-east-1 ''' conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile) try: rds = conn.descri...
[ "def", "exists", "(", "name", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "="...
Check to see if an RDS exists. CLI example:: salt myminion boto_rds.exists myrds region=us-east-1
[ "Check", "to", "see", "if", "an", "RDS", "exists", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L141-L155
train
Check to see if an RDS 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_rds.py
option_group_exists
def option_group_exists(name, tags=None, region=None, key=None, keyid=None, profile=None): ''' Check to see if an RDS option group exists. CLI example:: salt myminion boto_rds.option_group_exists myoptiongr region=us-east-1 ''' conn = _get_conn(region=region, key=ke...
python
def option_group_exists(name, tags=None, region=None, key=None, keyid=None, profile=None): ''' Check to see if an RDS option group exists. CLI example:: salt myminion boto_rds.option_group_exists myoptiongr region=us-east-1 ''' conn = _get_conn(region=region, key=ke...
[ "def", "option_group_exists", "(", "name", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", ...
Check to see if an RDS option group exists. CLI example:: salt myminion boto_rds.option_group_exists myoptiongr region=us-east-1
[ "Check", "to", "see", "if", "an", "RDS", "option", "group", "exists", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L158-L173
train
Check to see if an RDS option 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_rds.py
parameter_group_exists
def parameter_group_exists(name, tags=None, region=None, key=None, keyid=None, profile=None): ''' Check to see if an RDS parameter group exists. CLI example:: salt myminion boto_rds.parameter_group_exists myparametergroup \ region=us-east-1 ''' co...
python
def parameter_group_exists(name, tags=None, region=None, key=None, keyid=None, profile=None): ''' Check to see if an RDS parameter group exists. CLI example:: salt myminion boto_rds.parameter_group_exists myparametergroup \ region=us-east-1 ''' co...
[ "def", "parameter_group_exists", "(", "name", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ","...
Check to see if an RDS parameter group exists. CLI example:: salt myminion boto_rds.parameter_group_exists myparametergroup \ region=us-east-1
[ "Check", "to", "see", "if", "an", "RDS", "parameter", "group", "exists", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L176-L196
train
Check to see if an RDS parameter 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_rds.py
subnet_group_exists
def subnet_group_exists(name, tags=None, region=None, key=None, keyid=None, profile=None): ''' Check to see if an RDS subnet group exists. CLI example:: salt myminion boto_rds.subnet_group_exists my-param-group \ region=us-east-1 ''' try: con...
python
def subnet_group_exists(name, tags=None, region=None, key=None, keyid=None, profile=None): ''' Check to see if an RDS subnet group exists. CLI example:: salt myminion boto_rds.subnet_group_exists my-param-group \ region=us-east-1 ''' try: con...
[ "def", "subnet_group_exists", "(", "name", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=", "r...
Check to see if an RDS subnet group exists. CLI example:: salt myminion boto_rds.subnet_group_exists my-param-group \ region=us-east-1
[ "Check", "to", "see", "if", "an", "RDS", "subnet", "group", "exists", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L199-L220
train
Check to see if an RDS 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_rds.py
create
def create(name, allocated_storage, db_instance_class, engine, master_username, master_user_password, db_name=None, db_security_groups=None, vpc_security_group_ids=None, vpc_security_groups=None, availability_zone=None, db_subnet_group_name=None, preferred_maintenance_window=...
python
def create(name, allocated_storage, db_instance_class, engine, master_username, master_user_password, db_name=None, db_security_groups=None, vpc_security_group_ids=None, vpc_security_groups=None, availability_zone=None, db_subnet_group_name=None, preferred_maintenance_window=...
[ "def", "create", "(", "name", ",", "allocated_storage", ",", "db_instance_class", ",", "engine", ",", "master_username", ",", "master_user_password", ",", "db_name", "=", "None", ",", "db_security_groups", "=", "None", ",", "vpc_security_group_ids", "=", "None", "...
Create an RDS Instance CLI example to create an RDS Instance:: salt myminion boto_rds.create myrds 10 db.t2.micro MySQL sqlusr sqlpassw
[ "Create", "an", "RDS", "Instance" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L223-L319
train
Create an RDS Instance
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_rds.py
create_read_replica
def create_read_replica(name, source_name, db_instance_class=None, availability_zone=None, port=None, auto_minor_version_upgrade=None, iops=None, option_group_name=None, publicly_accessible=None, tags=None, db_subnet_group_n...
python
def create_read_replica(name, source_name, db_instance_class=None, availability_zone=None, port=None, auto_minor_version_upgrade=None, iops=None, option_group_name=None, publicly_accessible=None, tags=None, db_subnet_group_n...
[ "def", "create_read_replica", "(", "name", ",", "source_name", ",", "db_instance_class", "=", "None", ",", "availability_zone", "=", "None", ",", "port", "=", "None", ",", "auto_minor_version_upgrade", "=", "None", ",", "iops", "=", "None", ",", "option_group_na...
Create an RDS read replica CLI example to create an RDS read replica:: salt myminion boto_rds.create_read_replica replicaname source_name
[ "Create", "an", "RDS", "read", "replica" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L322-L377
train
Create an RDS read replica.
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_rds.py
create_option_group
def create_option_group(name, engine_name, major_engine_version, option_group_description, tags=None, region=None, key=None, keyid=None, profile=None): ''' Create an RDS option group CLI example to create an RDS option group:: salt myminion boto_rds....
python
def create_option_group(name, engine_name, major_engine_version, option_group_description, tags=None, region=None, key=None, keyid=None, profile=None): ''' Create an RDS option group CLI example to create an RDS option group:: salt myminion boto_rds....
[ "def", "create_option_group", "(", "name", ",", "engine_name", ",", "major_engine_version", ",", "option_group_description", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None"...
Create an RDS option group CLI example to create an RDS option group:: salt myminion boto_rds.create_option_group my-opt-group mysql 5.6 \ "group description"
[ "Create", "an", "RDS", "option", "group" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L380-L410
train
Create an RDS option 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_rds.py
create_parameter_group
def create_parameter_group(name, db_parameter_group_family, description, tags=None, region=None, key=None, keyid=None, profile=None): ''' Create an RDS parameter group CLI example to create an RDS parameter group:: salt myminion boto_rds.create...
python
def create_parameter_group(name, db_parameter_group_family, description, tags=None, region=None, key=None, keyid=None, profile=None): ''' Create an RDS parameter group CLI example to create an RDS parameter group:: salt myminion boto_rds.create...
[ "def", "create_parameter_group", "(", "name", ",", "db_parameter_group_family", ",", "description", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "res", "=...
Create an RDS parameter group CLI example to create an RDS parameter group:: salt myminion boto_rds.create_parameter_group my-param-group mysql5.6 \ "group description"
[ "Create", "an", "RDS", "parameter", "group" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L413-L446
train
Create an RDS parameter 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_rds.py
create_subnet_group
def create_subnet_group(name, description, subnet_ids, tags=None, region=None, key=None, keyid=None, profile=None): ''' Create an RDS subnet group CLI example to create an RDS subnet group:: salt myminion boto_rds.create_subnet_group my-subnet-group \ "group des...
python
def create_subnet_group(name, description, subnet_ids, tags=None, region=None, key=None, keyid=None, profile=None): ''' Create an RDS subnet group CLI example to create an RDS subnet group:: salt myminion boto_rds.create_subnet_group my-subnet-group \ "group des...
[ "def", "create_subnet_group", "(", "name", ",", "description", ",", "subnet_ids", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "res", "=", "__salt__", ...
Create an RDS subnet group CLI example to create an RDS subnet group:: salt myminion boto_rds.create_subnet_group my-subnet-group \ "group description" '[subnet-12345678, subnet-87654321]' \ region=us-east-1
[ "Create", "an", "RDS", "subnet", "group" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L449-L477
train
Create an RDS 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_rds.py
update_parameter_group
def update_parameter_group(name, parameters, apply_method="pending-reboot", tags=None, region=None, key=None, keyid=None, profile=None): ''' Update an RDS parameter group. CLI example:: salt myminion boto_rds.update_parameter_group my-param-gro...
python
def update_parameter_group(name, parameters, apply_method="pending-reboot", tags=None, region=None, key=None, keyid=None, profile=None): ''' Update an RDS parameter group. CLI example:: salt myminion boto_rds.update_parameter_group my-param-gro...
[ "def", "update_parameter_group", "(", "name", ",", "parameters", ",", "apply_method", "=", "\"pending-reboot\"", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", "...
Update an RDS parameter group. CLI example:: salt myminion boto_rds.update_parameter_group my-param-group \ parameters='{"back_log":1, "binlog_cache_size":4096}' \ region=us-east-1
[ "Update", "an", "RDS", "parameter", "group", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L480-L522
train
Update an RDS parameter 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_rds.py
describe
def describe(name, tags=None, region=None, key=None, keyid=None, profile=None): ''' Return RDS instance details. CLI example:: salt myminion boto_rds.describe myrds ''' res = __salt__['boto_rds.exists'](name, tags, region, key, keyid, pro...
python
def describe(name, tags=None, region=None, key=None, keyid=None, profile=None): ''' Return RDS instance details. CLI example:: salt myminion boto_rds.describe myrds ''' res = __salt__['boto_rds.exists'](name, tags, region, key, keyid, pro...
[ "def", "describe", "(", "name", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "res", "=", "__salt__", "[", "'boto_rds.exists'", "]", "(", "name", ","...
Return RDS instance details. CLI example:: salt myminion boto_rds.describe myrds
[ "Return", "RDS", "instance", "details", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L525-L572
train
Return details of an RDS instance.
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_rds.py
describe_db_instances
def describe_db_instances(name=None, filters=None, jmespath='DBInstances', region=None, key=None, keyid=None, profile=None): ''' Return a detailed listing of some, or all, DB Instances visible in the current scope. Arbitrary subelements or subsections of the returned dataset c...
python
def describe_db_instances(name=None, filters=None, jmespath='DBInstances', region=None, key=None, keyid=None, profile=None): ''' Return a detailed listing of some, or all, DB Instances visible in the current scope. Arbitrary subelements or subsections of the returned dataset c...
[ "def", "describe_db_instances", "(", "name", "=", "None", ",", "filters", "=", "None", ",", "jmespath", "=", "'DBInstances'", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn",...
Return a detailed listing of some, or all, DB Instances visible in the current scope. Arbitrary subelements or subsections of the returned dataset can be selected by passing in a valid JMSEPath filter as well. CLI example:: salt myminion boto_rds.describe_db_instances jmespath='DBInstances[*].DBI...
[ "Return", "a", "detailed", "listing", "of", "some", "or", "all", "DB", "Instances", "visible", "in", "the", "current", "scope", ".", "Arbitrary", "subelements", "or", "subsections", "of", "the", "returned", "dataset", "can", "be", "selected", "by", "passing", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L575-L600
train
Return a detailed listing of some or all DB Instances visible in the current scope.
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_rds.py
describe_db_subnet_groups
def describe_db_subnet_groups(name=None, filters=None, jmespath='DBSubnetGroups', region=None, key=None, keyid=None, profile=None): ''' Return a detailed listing of some, or all, DB Subnet Groups visible in the current scope. Arbitrary subelements or subsections of the returne...
python
def describe_db_subnet_groups(name=None, filters=None, jmespath='DBSubnetGroups', region=None, key=None, keyid=None, profile=None): ''' Return a detailed listing of some, or all, DB Subnet Groups visible in the current scope. Arbitrary subelements or subsections of the returne...
[ "def", "describe_db_subnet_groups", "(", "name", "=", "None", ",", "filters", "=", "None", ",", "jmespath", "=", "'DBSubnetGroups'", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", ...
Return a detailed listing of some, or all, DB Subnet Groups visible in the current scope. Arbitrary subelements or subsections of the returned dataset can be selected by passing in a valid JMSEPath filter as well. CLI example:: salt myminion boto_rds.describe_db_subnet_groups
[ "Return", "a", "detailed", "listing", "of", "some", "or", "all", "DB", "Subnet", "Groups", "visible", "in", "the", "current", "scope", ".", "Arbitrary", "subelements", "or", "subsections", "of", "the", "returned", "dataset", "can", "be", "selected", "by", "p...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L603-L622
train
Return a detailed listing of some or all DB Subnet Groups visible in the available scope.
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_rds.py
get_endpoint
def get_endpoint(name, tags=None, region=None, key=None, keyid=None, profile=None): ''' Return the endpoint of an RDS instance. CLI example:: salt myminion boto_rds.get_endpoint myrds ''' endpoint = False res = __salt__['boto_rds.exists'](name, tags, region, key, keyi...
python
def get_endpoint(name, tags=None, region=None, key=None, keyid=None, profile=None): ''' Return the endpoint of an RDS instance. CLI example:: salt myminion boto_rds.get_endpoint myrds ''' endpoint = False res = __salt__['boto_rds.exists'](name, tags, region, key, keyi...
[ "def", "get_endpoint", "(", "name", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "endpoint", "=", "False", "res", "=", "__salt__", "[", "'boto_rds.exi...
Return the endpoint of an RDS instance. CLI example:: salt myminion boto_rds.get_endpoint myrds
[ "Return", "the", "endpoint", "of", "an", "RDS", "instance", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L625-L651
train
Return the endpoint of an RDS instance.
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_rds.py
delete
def delete(name, skip_final_snapshot=None, final_db_snapshot_identifier=None, region=None, key=None, keyid=None, profile=None, tags=None, wait_for_deletion=True, timeout=180): ''' Delete an RDS instance. CLI example:: salt myminion boto_rds.delete myrds skip_final_snapshot=Tr...
python
def delete(name, skip_final_snapshot=None, final_db_snapshot_identifier=None, region=None, key=None, keyid=None, profile=None, tags=None, wait_for_deletion=True, timeout=180): ''' Delete an RDS instance. CLI example:: salt myminion boto_rds.delete myrds skip_final_snapshot=Tr...
[ "def", "delete", "(", "name", ",", "skip_final_snapshot", "=", "None", ",", "final_db_snapshot_identifier", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ",", "tags", "=", "None"...
Delete an RDS instance. CLI example:: salt myminion boto_rds.delete myrds skip_final_snapshot=True \ region=us-east-1
[ "Delete", "an", "RDS", "instance", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L654-L708
train
Delete an RDS instance.
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_rds.py
delete_option_group
def delete_option_group(name, region=None, key=None, keyid=None, profile=None): ''' Delete an RDS option group. CLI example:: salt myminion boto_rds.delete_option_group my-opt-group \ region=us-east-1 ''' try: conn = _get_conn(region=region, key=key, keyid=keyid, pr...
python
def delete_option_group(name, region=None, key=None, keyid=None, profile=None): ''' Delete an RDS option group. CLI example:: salt myminion boto_rds.delete_option_group my-opt-group \ region=us-east-1 ''' try: conn = _get_conn(region=region, key=key, keyid=keyid, pr...
[ "def", "delete_option_group", "(", "name", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "=", "...
Delete an RDS option group. CLI example:: salt myminion boto_rds.delete_option_group my-opt-group \ region=us-east-1
[ "Delete", "an", "RDS", "option", "group", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_rds.py#L711-L733
train
Delete an RDS option 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...