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/nagios.py
list_plugins
def list_plugins(): ''' List all the nagios plugins CLI Example: .. code-block:: bash salt '*' nagios.list_plugins ''' plugin_list = os.listdir(PLUGINDIR) ret = [] for plugin in plugin_list: # Check if execute bit stat_f = os.path.join(PLUGINDIR, plugin) ...
python
def list_plugins(): ''' List all the nagios plugins CLI Example: .. code-block:: bash salt '*' nagios.list_plugins ''' plugin_list = os.listdir(PLUGINDIR) ret = [] for plugin in plugin_list: # Check if execute bit stat_f = os.path.join(PLUGINDIR, plugin) ...
[ "def", "list_plugins", "(", ")", ":", "plugin_list", "=", "os", ".", "listdir", "(", "PLUGINDIR", ")", "ret", "=", "[", "]", "for", "plugin", "in", "plugin_list", ":", "# Check if execute bit", "stat_f", "=", "os", ".", "path", ".", "join", "(", "PLUGIND...
List all the nagios plugins CLI Example: .. code-block:: bash salt '*' nagios.list_plugins
[ "List", "all", "the", "nagios", "plugins" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/nagios.py#L255-L273
train
List all the nagios plugins in the nagios tree
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/cyg.py
installed
def installed(name, cyg_arch='x86_64', mirrors=None): ''' Make sure that a package is installed. name The name of the package to install cyg_arch : x86_64 The cygwin architecture to install the package into. Current options are x86 and x86_64 mi...
python
def installed(name, cyg_arch='x86_64', mirrors=None): ''' Make sure that a package is installed. name The name of the package to install cyg_arch : x86_64 The cygwin architecture to install the package into. Current options are x86 and x86_64 mi...
[ "def", "installed", "(", "name", ",", "cyg_arch", "=", "'x86_64'", ",", "mirrors", "=", "None", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "None", ",", "'comment'", ":", "''", ",", "'changes'", ":", "{", "}", "}", "if",...
Make sure that a package is installed. name The name of the package to install cyg_arch : x86_64 The cygwin architecture to install the package into. Current options are x86 and x86_64 mirrors : None List of mirrors to check. None will use a default mirror (kernel....
[ "Make", "sure", "that", "a", "package", "is", "installed", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/cyg.py#L26-L91
train
Ensure that a package is installed.
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/cyg.py
removed
def removed(name, cyg_arch='x86_64', mirrors=None): ''' Make sure that a package is not installed. name The name of the package to uninstall cyg_arch : x86_64 The cygwin architecture to remove the package from. Current options are x86 and x86_64 mirrors : None List...
python
def removed(name, cyg_arch='x86_64', mirrors=None): ''' Make sure that a package is not installed. name The name of the package to uninstall cyg_arch : x86_64 The cygwin architecture to remove the package from. Current options are x86 and x86_64 mirrors : None List...
[ "def", "removed", "(", "name", ",", "cyg_arch", "=", "'x86_64'", ",", "mirrors", "=", "None", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "None", ",", "'comment'", ":", "''", ",", "'changes'", ":", "{", "}", "}", "if", ...
Make sure that a package is not installed. name The name of the package to uninstall cyg_arch : x86_64 The cygwin architecture to remove the package from. Current options are x86 and x86_64 mirrors : None List of mirrors to check. None will use a default mirror (ke...
[ "Make", "sure", "that", "a", "package", "is", "not", "installed", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/cyg.py#L94-L149
train
Ensure that a package is not installed.
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/cyg.py
updated
def updated(name=None, cyg_arch='x86_64', mirrors=None): ''' Make sure all packages are up to date. name : None No affect, salt fails poorly without the arg available cyg_arch : x86_64 The cygwin architecture to update. Current options are x86 and x86_64 mirrors : None ...
python
def updated(name=None, cyg_arch='x86_64', mirrors=None): ''' Make sure all packages are up to date. name : None No affect, salt fails poorly without the arg available cyg_arch : x86_64 The cygwin architecture to update. Current options are x86 and x86_64 mirrors : None ...
[ "def", "updated", "(", "name", "=", "None", ",", "cyg_arch", "=", "'x86_64'", ",", "mirrors", "=", "None", ")", ":", "ret", "=", "{", "'name'", ":", "'cyg.updated'", ",", "'result'", ":", "None", ",", "'comment'", ":", "''", ",", "'changes'", ":", "{...
Make sure all packages are up to date. name : None No affect, salt fails poorly without the arg available cyg_arch : x86_64 The cygwin architecture to update. Current options are x86 and x86_64 mirrors : None List of mirrors to check. None will use a default mirror...
[ "Make", "sure", "all", "packages", "are", "up", "to", "date", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/cyg.py#L152-L207
train
Ensure all packages are 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/pillar/varstack_pillar.py
ext_pillar
def ext_pillar(minion_id, # pylint: disable=W0613 pillar, # pylint: disable=W0613 conf): ''' Parse varstack data and return the result ''' vs = varstack.Varstack(config_filename=conf) return vs.evaluate(__grains__)
python
def ext_pillar(minion_id, # pylint: disable=W0613 pillar, # pylint: disable=W0613 conf): ''' Parse varstack data and return the result ''' vs = varstack.Varstack(config_filename=conf) return vs.evaluate(__grains__)
[ "def", "ext_pillar", "(", "minion_id", ",", "# pylint: disable=W0613", "pillar", ",", "# pylint: disable=W0613", "conf", ")", ":", "vs", "=", "varstack", ".", "Varstack", "(", "config_filename", "=", "conf", ")", "return", "vs", ".", "evaluate", "(", "__grains__...
Parse varstack data and return the result
[ "Parse", "varstack", "data", "and", "return", "the", "result" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/varstack_pillar.py#L40-L47
train
Parse varstack data and return the result
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/pagerduty.py
query
def query(method='GET', profile_dict=None, url=None, path='api/v1', action=None, api_key=None, service=None, params=None, data=None, subdomain=None, client_url=None, description=None, opts=None, verify_ssl=True): ''' Query the PagerDuty API ''' user_agent = 'SaltStack {0}'....
python
def query(method='GET', profile_dict=None, url=None, path='api/v1', action=None, api_key=None, service=None, params=None, data=None, subdomain=None, client_url=None, description=None, opts=None, verify_ssl=True): ''' Query the PagerDuty API ''' user_agent = 'SaltStack {0}'....
[ "def", "query", "(", "method", "=", "'GET'", ",", "profile_dict", "=", "None", ",", "url", "=", "None", ",", "path", "=", "'api/v1'", ",", "action", "=", "None", ",", "api_key", "=", "None", ",", "service", "=", "None", ",", "params", "=", "None", ...
Query the PagerDuty API
[ "Query", "the", "PagerDuty", "API" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/pagerduty.py#L29-L108
train
Query the PagerDuty API
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/pagerduty.py
list_items
def list_items(action, key, profile_dict=None, api_key=None, opts=None): ''' List items belonging to an API call. Used for list_services() and list_incidents() ''' items = salt.utils.json.loads(query( profile_dict=profile_dict, api_key=api_key, action=action, opts=opt...
python
def list_items(action, key, profile_dict=None, api_key=None, opts=None): ''' List items belonging to an API call. Used for list_services() and list_incidents() ''' items = salt.utils.json.loads(query( profile_dict=profile_dict, api_key=api_key, action=action, opts=opt...
[ "def", "list_items", "(", "action", ",", "key", ",", "profile_dict", "=", "None", ",", "api_key", "=", "None", ",", "opts", "=", "None", ")", ":", "items", "=", "salt", ".", "utils", ".", "json", ".", "loads", "(", "query", "(", "profile_dict", "=", ...
List items belonging to an API call. Used for list_services() and list_incidents()
[ "List", "items", "belonging", "to", "an", "API", "call", ".", "Used", "for", "list_services", "()", "and", "list_incidents", "()" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/pagerduty.py#L111-L125
train
List items belonging to an API call. Used for list_services and list_incidents
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/aix_group.py
add
def add(name, gid=None, system=False, root=None): ''' Add the specified group CLI Example: .. code-block:: bash salt '*' group.add foo 3456 ''' cmd = 'mkgroup ' if system and root is not None: cmd += '-a ' if gid: cmd += 'id={0} '.format(gid) cmd += name ...
python
def add(name, gid=None, system=False, root=None): ''' Add the specified group CLI Example: .. code-block:: bash salt '*' group.add foo 3456 ''' cmd = 'mkgroup ' if system and root is not None: cmd += '-a ' if gid: cmd += 'id={0} '.format(gid) cmd += name ...
[ "def", "add", "(", "name", ",", "gid", "=", "None", ",", "system", "=", "False", ",", "root", "=", "None", ")", ":", "cmd", "=", "'mkgroup '", "if", "system", "and", "root", "is", "not", "None", ":", "cmd", "+=", "'-a '", "if", "gid", ":", "cmd",...
Add the specified group CLI Example: .. code-block:: bash salt '*' group.add foo 3456
[ "Add", "the", "specified", "group" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aix_group.py#L39-L60
train
Add the specified 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/aix_group.py
info
def info(name): ''' Return information about a group CLI Example: .. code-block:: bash salt '*' group.info foo ''' try: grinfo = grp.getgrnam(name) except KeyError: return {} else: return {'name': grinfo.gr_name, 'passwd': grinfo.gr_pass...
python
def info(name): ''' Return information about a group CLI Example: .. code-block:: bash salt '*' group.info foo ''' try: grinfo = grp.getgrnam(name) except KeyError: return {} else: return {'name': grinfo.gr_name, 'passwd': grinfo.gr_pass...
[ "def", "info", "(", "name", ")", ":", "try", ":", "grinfo", "=", "grp", ".", "getgrnam", "(", "name", ")", "except", "KeyError", ":", "return", "{", "}", "else", ":", "return", "{", "'name'", ":", "grinfo", ".", "gr_name", ",", "'passwd'", ":", "gr...
Return information about a group CLI Example: .. code-block:: bash salt '*' group.info foo
[ "Return", "information", "about", "a", "group" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aix_group.py#L78-L96
train
Return information about a group CLI Example : bash salt '*' group. info foo
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/aix_group.py
getent
def getent(refresh=False): ''' Return info on all groups CLI Example: .. code-block:: bash salt '*' group.getent ''' if 'group.getent' in __context__ and not refresh: return __context__['group.getent'] ret = [] for grinfo in grp.getgrall(): ret.append(info(gri...
python
def getent(refresh=False): ''' Return info on all groups CLI Example: .. code-block:: bash salt '*' group.getent ''' if 'group.getent' in __context__ and not refresh: return __context__['group.getent'] ret = [] for grinfo in grp.getgrall(): ret.append(info(gri...
[ "def", "getent", "(", "refresh", "=", "False", ")", ":", "if", "'group.getent'", "in", "__context__", "and", "not", "refresh", ":", "return", "__context__", "[", "'group.getent'", "]", "ret", "=", "[", "]", "for", "grinfo", "in", "grp", ".", "getgrall", ...
Return info on all groups CLI Example: .. code-block:: bash salt '*' group.getent
[ "Return", "info", "on", "all", "groups" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aix_group.py#L99-L117
train
Return info on all groups CLI Example : bash salt '*' group. getent
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/aix_group.py
deluser
def deluser(name, username, root=None): ''' Remove a user from the group. CLI Example: .. code-block:: bash salt '*' group.deluser foo bar Removes a member user 'bar' from a group 'foo'. If group is not present then returns True. ''' grp_info = __salt__['group.info'](name) ...
python
def deluser(name, username, root=None): ''' Remove a user from the group. CLI Example: .. code-block:: bash salt '*' group.deluser foo bar Removes a member user 'bar' from a group 'foo'. If group is not present then returns True. ''' grp_info = __salt__['group.info'](name) ...
[ "def", "deluser", "(", "name", ",", "username", ",", "root", "=", "None", ")", ":", "grp_info", "=", "__salt__", "[", "'group.info'", "]", "(", "name", ")", "try", ":", "if", "username", "in", "grp_info", "[", "'members'", "]", ":", "cmd", "=", "'chg...
Remove a user from the group. CLI Example: .. code-block:: bash salt '*' group.deluser foo bar Removes a member user 'bar' from a group 'foo'. If group is not present then returns True.
[ "Remove", "a", "user", "from", "the", "group", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aix_group.py#L161-L183
train
Removes a user from a group. Returns True if the group is present otherwise returns False.
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/aix_group.py
members
def members(name, members_list, root=None): ''' Replaces members of the group with a provided list. CLI Example: salt '*' group.members foo 'user1,user2,user3,...' Replaces a membership list for a local group 'foo'. foo:x:1234:user1,user2,user3,... ''' cmd = 'chgrpmem -m = {0}...
python
def members(name, members_list, root=None): ''' Replaces members of the group with a provided list. CLI Example: salt '*' group.members foo 'user1,user2,user3,...' Replaces a membership list for a local group 'foo'. foo:x:1234:user1,user2,user3,... ''' cmd = 'chgrpmem -m = {0}...
[ "def", "members", "(", "name", ",", "members_list", ",", "root", "=", "None", ")", ":", "cmd", "=", "'chgrpmem -m = {0} {1}'", ".", "format", "(", "members_list", ",", "name", ")", "retcode", "=", "__salt__", "[", "'cmd.retcode'", "]", "(", "cmd", ",", "...
Replaces members of the group with a provided list. CLI Example: salt '*' group.members foo 'user1,user2,user3,...' Replaces a membership list for a local group 'foo'. foo:x:1234:user1,user2,user3,...
[ "Replaces", "members", "of", "the", "group", "with", "a", "provided", "list", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aix_group.py#L186-L200
train
Replaces members of the group with a provided list.
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/pyenv.py
install
def install(runas=None, path=None): ''' Install pyenv systemwide CLI Example: .. code-block:: bash salt '*' pyenv.install ''' path = path or _pyenv_path(runas) path = os.path.expanduser(path) return _install_pyenv(path, runas)
python
def install(runas=None, path=None): ''' Install pyenv systemwide CLI Example: .. code-block:: bash salt '*' pyenv.install ''' path = path or _pyenv_path(runas) path = os.path.expanduser(path) return _install_pyenv(path, runas)
[ "def", "install", "(", "runas", "=", "None", ",", "path", "=", "None", ")", ":", "path", "=", "path", "or", "_pyenv_path", "(", "runas", ")", "path", "=", "os", ".", "path", ".", "expanduser", "(", "path", ")", "return", "_install_pyenv", "(", "path"...
Install pyenv systemwide CLI Example: .. code-block:: bash salt '*' pyenv.install
[ "Install", "pyenv", "systemwide" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/pyenv.py#L105-L117
train
Install a system wide CLI Example
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/pyenv.py
install_python
def install_python(python, runas=None): ''' Install a python implementation. python The version of python to install, should match one of the versions listed by pyenv.list CLI Example: .. code-block:: bash salt '*' pyenv.install_python 2.0.0-p0 ''' python = re.sub...
python
def install_python(python, runas=None): ''' Install a python implementation. python The version of python to install, should match one of the versions listed by pyenv.list CLI Example: .. code-block:: bash salt '*' pyenv.install_python 2.0.0-p0 ''' python = re.sub...
[ "def", "install_python", "(", "python", ",", "runas", "=", "None", ")", ":", "python", "=", "re", ".", "sub", "(", "r'^python-'", ",", "''", ",", "python", ")", "env", "=", "None", "env_list", "=", "[", "]", "if", "__grains__", "[", "'os'", "]", "i...
Install a python implementation. python The version of python to install, should match one of the versions listed by pyenv.list CLI Example: .. code-block:: bash salt '*' pyenv.install_python 2.0.0-p0
[ "Install", "a", "python", "implementation", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/pyenv.py#L149-L185
train
Install a python implementation.
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/pyenv.py
uninstall_python
def uninstall_python(python, runas=None): ''' Uninstall a python implementation. python The version of python to uninstall. Should match one of the versions listed by :mod:`pyenv.versions <salt.modules.pyenv.versions>` CLI Example: .. code-block:: bash salt '*' pyenv.unin...
python
def uninstall_python(python, runas=None): ''' Uninstall a python implementation. python The version of python to uninstall. Should match one of the versions listed by :mod:`pyenv.versions <salt.modules.pyenv.versions>` CLI Example: .. code-block:: bash salt '*' pyenv.unin...
[ "def", "uninstall_python", "(", "python", ",", "runas", "=", "None", ")", ":", "python", "=", "re", ".", "sub", "(", "r'^python-'", ",", "''", ",", "python", ")", "args", "=", "'--force {0}'", ".", "format", "(", "python", ")", "_pyenv_exec", "(", "'un...
Uninstall a python implementation. python The version of python to uninstall. Should match one of the versions listed by :mod:`pyenv.versions <salt.modules.pyenv.versions>` CLI Example: .. code-block:: bash salt '*' pyenv.uninstall_python 2.0.0-p0
[ "Uninstall", "a", "python", "implementation", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/pyenv.py#L188-L206
train
Uninstall a python implementation.
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/pyenv.py
versions
def versions(runas=None): ''' List the installed versions of python. CLI Example: .. code-block:: bash salt '*' pyenv.versions ''' ret = _pyenv_exec('versions', '--bare', runas=runas) return [] if ret is False else ret.splitlines()
python
def versions(runas=None): ''' List the installed versions of python. CLI Example: .. code-block:: bash salt '*' pyenv.versions ''' ret = _pyenv_exec('versions', '--bare', runas=runas) return [] if ret is False else ret.splitlines()
[ "def", "versions", "(", "runas", "=", "None", ")", ":", "ret", "=", "_pyenv_exec", "(", "'versions'", ",", "'--bare'", ",", "runas", "=", "runas", ")", "return", "[", "]", "if", "ret", "is", "False", "else", "ret", ".", "splitlines", "(", ")" ]
List the installed versions of python. CLI Example: .. code-block:: bash salt '*' pyenv.versions
[ "List", "the", "installed", "versions", "of", "python", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/pyenv.py#L209-L220
train
List installed versions of python.
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/pyenv.py
default
def default(python=None, runas=None): ''' Returns or sets the currently defined default python. python=None The version to set as the default. Should match one of the versions listed by :mod:`pyenv.versions <salt.modules.pyenv.versions>`. Leave blank to return the current default. ...
python
def default(python=None, runas=None): ''' Returns or sets the currently defined default python. python=None The version to set as the default. Should match one of the versions listed by :mod:`pyenv.versions <salt.modules.pyenv.versions>`. Leave blank to return the current default. ...
[ "def", "default", "(", "python", "=", "None", ",", "runas", "=", "None", ")", ":", "if", "python", ":", "_pyenv_exec", "(", "'global'", ",", "python", ",", "runas", "=", "runas", ")", "return", "True", "else", ":", "ret", "=", "_pyenv_exec", "(", "'g...
Returns or sets the currently defined default python. python=None The version to set as the default. Should match one of the versions listed by :mod:`pyenv.versions <salt.modules.pyenv.versions>`. Leave blank to return the current default. CLI Example: .. code-block:: bash ...
[ "Returns", "or", "sets", "the", "currently", "defined", "default", "python", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/pyenv.py#L223-L244
train
Returns or sets the currently defined default python.
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/pyenv.py
do
def do(cmdline=None, runas=None): ''' Execute a python command with pyenv's shims from the user or the system. CLI Example: .. code-block:: bash salt '*' pyenv.do 'gem list bundler' salt '*' pyenv.do 'gem list bundler' deploy ''' path = _pyenv_path(runas) cmd_split = cmdli...
python
def do(cmdline=None, runas=None): ''' Execute a python command with pyenv's shims from the user or the system. CLI Example: .. code-block:: bash salt '*' pyenv.do 'gem list bundler' salt '*' pyenv.do 'gem list bundler' deploy ''' path = _pyenv_path(runas) cmd_split = cmdli...
[ "def", "do", "(", "cmdline", "=", "None", ",", "runas", "=", "None", ")", ":", "path", "=", "_pyenv_path", "(", "runas", ")", "cmd_split", "=", "cmdline", ".", "split", "(", ")", "quoted_line", "=", "''", "for", "cmd", "in", "cmd_split", ":", "quoted...
Execute a python command with pyenv's shims from the user or the system. CLI Example: .. code-block:: bash salt '*' pyenv.do 'gem list bundler' salt '*' pyenv.do 'gem list bundler' deploy
[ "Execute", "a", "python", "command", "with", "pyenv", "s", "shims", "from", "the", "user", "or", "the", "system", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/pyenv.py#L281-L307
train
Execute a python command with pyenv s shims from the user or 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/modules/pyenv.py
do_with_python
def do_with_python(python, cmdline, runas=None): ''' Execute a python command with pyenv's shims using a specific python version. CLI Example: .. code-block:: bash salt '*' pyenv.do_with_python 2.0.0-p0 'gem list bundler' salt '*' pyenv.do_with_python 2.0.0-p0 'gem list bundler' deplo...
python
def do_with_python(python, cmdline, runas=None): ''' Execute a python command with pyenv's shims using a specific python version. CLI Example: .. code-block:: bash salt '*' pyenv.do_with_python 2.0.0-p0 'gem list bundler' salt '*' pyenv.do_with_python 2.0.0-p0 'gem list bundler' deplo...
[ "def", "do_with_python", "(", "python", ",", "cmdline", ",", "runas", "=", "None", ")", ":", "if", "python", ":", "cmd", "=", "'PYENV_VERSION={0} {1}'", ".", "format", "(", "python", ",", "cmdline", ")", "else", ":", "cmd", "=", "cmdline", "return", "do"...
Execute a python command with pyenv's shims using a specific python version. CLI Example: .. code-block:: bash salt '*' pyenv.do_with_python 2.0.0-p0 'gem list bundler' salt '*' pyenv.do_with_python 2.0.0-p0 'gem list bundler' deploy
[ "Execute", "a", "python", "command", "with", "pyenv", "s", "shims", "using", "a", "specific", "python", "version", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/pyenv.py#L310-L326
train
Execute a python command with a specific python version.
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_rds.py
present
def present(name, allocated_storage, db_instance_class, engine, master_username, master_user_password, db_name=None, storage_type=None, db_security_groups=None, vpc_security_group_ids=None, vpc_securi...
python
def present(name, allocated_storage, db_instance_class, engine, master_username, master_user_password, db_name=None, storage_type=None, db_security_groups=None, vpc_security_group_ids=None, vpc_securi...
[ "def", "present", "(", "name", ",", "allocated_storage", ",", "db_instance_class", ",", "engine", ",", "master_username", ",", "master_user_password", ",", "db_name", "=", "None", ",", "storage_type", "=", "None", ",", "db_security_groups", "=", "None", ",", "vp...
Ensure RDS instance exists. name Name of the RDS state definition. allocated_storage The amount of storage (in gigabytes) to be initially allocated for the database instance. db_instance_class The compute and memory capacity of the Amazon RDS DB instance. engine ...
[ "Ensure", "RDS", "instance", "exists", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_rds.py#L94-L361
train
Ensures that the RDS instance 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/states/boto_rds.py
replica_present
def replica_present(name, source, 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, region=None, key=None, keyid=None, ...
python
def replica_present(name, source, 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, region=None, key=None, keyid=None, ...
[ "def", "replica_present", "(", "name", ",", "source", ",", "db_instance_class", "=", "None", ",", "availability_zone", "=", "None", ",", "port", "=", "None", ",", "auto_minor_version_upgrade", "=", "None", ",", "iops", "=", "None", ",", "option_group_name", "=...
Ensure RDS replica exists. .. code-block:: yaml Ensure myrds replica RDS exists: boto_rds.create_replica: - name: myreplica - source: mydb
[ "Ensure", "RDS", "replica", "exists", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_rds.py#L364-L428
train
Ensure RDS replica 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/states/boto_rds.py
subnet_group_present
def subnet_group_present(name, description, subnet_ids=None, subnet_names=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Ensure DB subnet group exists. name The name for the DB subnet group. This value is stored as a lowercas...
python
def subnet_group_present(name, description, subnet_ids=None, subnet_names=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Ensure DB subnet group exists. name The name for the DB subnet group. This value is stored as a lowercas...
[ "def", "subnet_group_present", "(", "name", ",", "description", ",", "subnet_ids", "=", "None", ",", "subnet_names", "=", "None", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", ...
Ensure DB subnet group exists. name The name for the DB subnet group. This value is stored as a lowercase string. subnet_ids A list of the EC2 Subnet IDs for the DB subnet group. Either subnet_ids or subnet_names must be provided. subnet_names A list of The EC2 Subnet name...
[ "Ensure", "DB", "subnet", "group", "exists", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_rds.py#L431-L523
train
Ensure DB subnet group exists and contains the given 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/states/boto_rds.py
absent
def absent(name, skip_final_snapshot=None, final_db_snapshot_identifier=None, tags=None, wait_for_deletion=True, timeout=180, region=None, key=None, keyid=None, profile=None): ''' Ensure RDS instance is absent. name Name of the RDS instance. skip_final_snapshot Wh...
python
def absent(name, skip_final_snapshot=None, final_db_snapshot_identifier=None, tags=None, wait_for_deletion=True, timeout=180, region=None, key=None, keyid=None, profile=None): ''' Ensure RDS instance is absent. name Name of the RDS instance. skip_final_snapshot Wh...
[ "def", "absent", "(", "name", ",", "skip_final_snapshot", "=", "None", ",", "final_db_snapshot_identifier", "=", "None", ",", "tags", "=", "None", ",", "wait_for_deletion", "=", "True", ",", "timeout", "=", "180", ",", "region", "=", "None", ",", "key", "=...
Ensure RDS instance is absent. name Name of the RDS instance. skip_final_snapshot Whether a final db snapshot is created before the instance is deleted. If True, no snapshot is created. If False, a snapshot is created before deleting the instance. final_db_snapshot_identif...
[ "Ensure", "RDS", "instance", "is", "absent", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_rds.py#L526-L595
train
Ensure RDS instance 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/boto_rds.py
parameter_present
def parameter_present(name, db_parameter_group_family, description, parameters=None, apply_method="pending-reboot", tags=None, region=None, key=None, keyid=None, profile=None): ''' Ensure DB parameter group exists and update parameters. name The name for the parameter group. ...
python
def parameter_present(name, db_parameter_group_family, description, parameters=None, apply_method="pending-reboot", tags=None, region=None, key=None, keyid=None, profile=None): ''' Ensure DB parameter group exists and update parameters. name The name for the parameter group. ...
[ "def", "parameter_present", "(", "name", ",", "db_parameter_group_family", ",", "description", ",", "parameters", "=", "None", ",", "apply_method", "=", "\"pending-reboot\"", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", ...
Ensure DB parameter group exists and update parameters. name The name for the parameter group. db_parameter_group_family The DB parameter group family name. A DB parameter group can be associated with one and only one DB parameter group family, and can be applied only to a DB i...
[ "Ensure", "DB", "parameter", "group", "exists", "and", "update", "parameters", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_rds.py#L627-L734
train
Ensure that the named parameter group is present in the DB.
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/find.py
_parse_interval
def _parse_interval(value): ''' Convert an interval string like 1w3d6h into the number of seconds, time resolution (1 unit of the smallest specified time unit) and the modifier( '+', '-', or ''). w = week d = day h = hour m = minute s = second ''' match = ...
python
def _parse_interval(value): ''' Convert an interval string like 1w3d6h into the number of seconds, time resolution (1 unit of the smallest specified time unit) and the modifier( '+', '-', or ''). w = week d = day h = hour m = minute s = second ''' match = ...
[ "def", "_parse_interval", "(", "value", ")", ":", "match", "=", "_INTERVAL_REGEX", ".", "match", "(", "six", ".", "text_type", "(", "value", ")", ")", "if", "match", "is", "None", ":", "raise", "ValueError", "(", "'invalid time interval: \\'{0}\\''", ".", "f...
Convert an interval string like 1w3d6h into the number of seconds, time resolution (1 unit of the smallest specified time unit) and the modifier( '+', '-', or ''). w = week d = day h = hour m = minute s = second
[ "Convert", "an", "interval", "string", "like", "1w3d6h", "into", "the", "number", "of", "seconds", "time", "resolution", "(", "1", "unit", "of", "the", "smallest", "specified", "time", "unit", ")", "and", "the", "modifier", "(", "+", "-", "or", ")", ".",...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/find.py#L152-L179
train
Parse an interval string like 1w3d6h into the number of seconds resolution and modifier.
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/find.py
find
def find(path, options): ''' WRITEME ''' finder = Finder(options) for path in finder.find(path): yield path
python
def find(path, options): ''' WRITEME ''' finder = Finder(options) for path in finder.find(path): yield path
[ "def", "find", "(", "path", ",", "options", ")", ":", "finder", "=", "Finder", "(", "options", ")", "for", "path", "in", "finder", ".", "find", "(", "path", ")", ":", "yield", "path" ]
WRITEME
[ "WRITEME" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/find.py#L697-L703
train
Yields all the files that match the given path.
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/find.py
Finder.find
def find(self, path): ''' Generate filenames in path that satisfy criteria specified in the constructor. This method is a generator and should be repeatedly called until there are no more results. ''' if self.mindepth < 1: dirpath, name = os.path.split...
python
def find(self, path): ''' Generate filenames in path that satisfy criteria specified in the constructor. This method is a generator and should be repeatedly called until there are no more results. ''' if self.mindepth < 1: dirpath, name = os.path.split...
[ "def", "find", "(", "self", ",", "path", ")", ":", "if", "self", ".", "mindepth", "<", "1", ":", "dirpath", ",", "name", "=", "os", ".", "path", ".", "split", "(", "path", ")", "match", ",", "fstat", "=", "self", ".", "_check_criteria", "(", "dir...
Generate filenames in path that satisfy criteria specified in the constructor. This method is a generator and should be repeatedly called until there are no more results.
[ "Generate", "filenames", "in", "path", "that", "satisfy", "criteria", "specified", "in", "the", "constructor", ".", "This", "method", "is", "a", "generator", "and", "should", "be", "repeatedly", "called", "until", "there", "are", "no", "more", "results", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/find.py#L632-L658
train
Generate filenames in path that satisfy criteria specified in the constructor. This method returns a generator that yields the unique identifiers that satisfy the criteria specified in the constructor.
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/pagerduty.py
list_services
def list_services(profile=None, api_key=None): ''' List services belonging to this account CLI Example: salt myminion pagerduty.list_services my-pagerduty-account ''' return salt.utils.pagerduty.list_items( 'services', 'name', __salt__['config.option'](profile), ...
python
def list_services(profile=None, api_key=None): ''' List services belonging to this account CLI Example: salt myminion pagerduty.list_services my-pagerduty-account ''' return salt.utils.pagerduty.list_items( 'services', 'name', __salt__['config.option'](profile), ...
[ "def", "list_services", "(", "profile", "=", "None", ",", "api_key", "=", "None", ")", ":", "return", "salt", ".", "utils", ".", "pagerduty", ".", "list_items", "(", "'services'", ",", "'name'", ",", "__salt__", "[", "'config.option'", "]", "(", "profile",...
List services belonging to this account CLI Example: salt myminion pagerduty.list_services my-pagerduty-account
[ "List", "services", "belonging", "to", "this", "account" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/pagerduty.py#L37-L51
train
List all services belonging to this account
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/pagerduty.py
create_event
def create_event(service_key=None, description=None, details=None, incident_key=None, profile=None): ''' Create an event in PagerDuty. Designed for use in states. CLI Example: .. code-block:: yaml salt myminion pagerduty.create_event <service_key> <description> <details> \ ...
python
def create_event(service_key=None, description=None, details=None, incident_key=None, profile=None): ''' Create an event in PagerDuty. Designed for use in states. CLI Example: .. code-block:: yaml salt myminion pagerduty.create_event <service_key> <description> <details> \ ...
[ "def", "create_event", "(", "service_key", "=", "None", ",", "description", "=", "None", ",", "details", "=", "None", ",", "incident_key", "=", "None", ",", "profile", "=", "None", ")", ":", "trigger_url", "=", "'https://events.pagerduty.com/generic/2010-04-15/cre...
Create an event in PagerDuty. Designed for use in states. CLI Example: .. code-block:: yaml salt myminion pagerduty.create_event <service_key> <description> <details> \ profile=my-pagerduty-account The following parameters are required: service_key This key can be found by u...
[ "Create", "an", "event", "in", "PagerDuty", ".", "Designed", "for", "use", "in", "states", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/pagerduty.py#L149-L197
train
Create an event in PagerDuty.
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/win_certutil.py
add_store
def add_store(name, store, saltenv='base'): ''' Store a certificate to the given store name The certificate to store, this can use local paths or salt:// paths store The store to add the certificate to saltenv The salt environment to use, this is ignored if a local...
python
def add_store(name, store, saltenv='base'): ''' Store a certificate to the given store name The certificate to store, this can use local paths or salt:// paths store The store to add the certificate to saltenv The salt environment to use, this is ignored if a local...
[ "def", "add_store", "(", "name", ",", "store", ",", "saltenv", "=", "'base'", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "True", ",", "'comment'", ":", "''", ",", "'changes'", ":", "{", "}", "}", "cert_file", "=", "__sa...
Store a certificate to the given store name The certificate to store, this can use local paths or salt:// paths store The store to add the certificate to saltenv The salt environment to use, this is ignored if a local path is specified
[ "Store", "a", "certificate", "to", "the", "given", "store" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/win_certutil.py#L34-L73
train
Add a certificate to 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/client/mixins.py
SyncClientMixin.master_call
def master_call(self, **kwargs): ''' Execute a function through the master network interface. ''' load = kwargs load['cmd'] = self.client channel = salt.transport.client.ReqChannel.factory(self.opts, crypt='clear'...
python
def master_call(self, **kwargs): ''' Execute a function through the master network interface. ''' load = kwargs load['cmd'] = self.client channel = salt.transport.client.ReqChannel.factory(self.opts, crypt='clear'...
[ "def", "master_call", "(", "self", ",", "*", "*", "kwargs", ")", ":", "load", "=", "kwargs", "load", "[", "'cmd'", "]", "=", "self", ".", "client", "channel", "=", "salt", ".", "transport", ".", "client", ".", "ReqChannel", ".", "factory", "(", "self...
Execute a function through the master network interface.
[ "Execute", "a", "function", "through", "the", "master", "network", "interface", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/mixins.py#L139-L155
train
Execute a function through the master network interface.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/client/mixins.py
SyncClientMixin.cmd_sync
def cmd_sync(self, low, timeout=None, full_return=False): ''' Execute a runner function synchronously; eauth is respected This function requires that :conf_master:`external_auth` is configured and the user is authorized to execute runner functions: (``@runner``). .. code-block:...
python
def cmd_sync(self, low, timeout=None, full_return=False): ''' Execute a runner function synchronously; eauth is respected This function requires that :conf_master:`external_auth` is configured and the user is authorized to execute runner functions: (``@runner``). .. code-block:...
[ "def", "cmd_sync", "(", "self", ",", "low", ",", "timeout", "=", "None", ",", "full_return", "=", "False", ")", ":", "event", "=", "salt", ".", "utils", ".", "event", ".", "get_master_event", "(", "self", ".", "opts", ",", "self", ".", "opts", "[", ...
Execute a runner function synchronously; eauth is respected This function requires that :conf_master:`external_auth` is configured and the user is authorized to execute runner functions: (``@runner``). .. code-block:: python runner.eauth_sync({ 'fun': 'jobs.list_jo...
[ "Execute", "a", "runner", "function", "synchronously", ";", "eauth", "is", "respected" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/mixins.py#L157-L185
train
Execute a runner function synchronously ; eauth is respected
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/client/mixins.py
SyncClientMixin.cmd
def cmd(self, fun, arg=None, pub_data=None, kwarg=None, print_event=True, full_return=False): ''' Execute a function .. code-block:: python >>> opts = salt.config.master_config('/etc/salt/master') >>> runner = salt.runner.RunnerClient(opts) >>> runner.cmd('j...
python
def cmd(self, fun, arg=None, pub_data=None, kwarg=None, print_event=True, full_return=False): ''' Execute a function .. code-block:: python >>> opts = salt.config.master_config('/etc/salt/master') >>> runner = salt.runner.RunnerClient(opts) >>> runner.cmd('j...
[ "def", "cmd", "(", "self", ",", "fun", ",", "arg", "=", "None", ",", "pub_data", "=", "None", ",", "kwarg", "=", "None", ",", "print_event", "=", "True", ",", "full_return", "=", "False", ")", ":", "if", "arg", "is", "None", ":", "arg", "=", "tup...
Execute a function .. code-block:: python >>> opts = salt.config.master_config('/etc/salt/master') >>> runner = salt.runner.RunnerClient(opts) >>> runner.cmd('jobs.list_jobs', []) { '20131219215650131543': { 'Arguments': [300]...
[ "Execute", "a", "function" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/mixins.py#L187-L249
train
Execute a function on the master and return the result.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/client/mixins.py
SyncClientMixin.store_job
def store_job(self): ''' Helper that allows us to turn off storing jobs for different classes that may incorporate this mixin. ''' try: class_name = self.__class__.__name__.lower() except AttributeError: log.warning( 'Unable to dete...
python
def store_job(self): ''' Helper that allows us to turn off storing jobs for different classes that may incorporate this mixin. ''' try: class_name = self.__class__.__name__.lower() except AttributeError: log.warning( 'Unable to dete...
[ "def", "store_job", "(", "self", ")", ":", "try", ":", "class_name", "=", "self", ".", "__class__", ".", "__name__", ".", "lower", "(", ")", "except", "AttributeError", ":", "log", ".", "warning", "(", "'Unable to determine class name'", ",", "exc_info_on_logl...
Helper that allows us to turn off storing jobs for different classes that may incorporate this mixin.
[ "Helper", "that", "allows", "us", "to", "turn", "off", "storing", "jobs", "for", "different", "classes", "that", "may", "incorporate", "this", "mixin", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/mixins.py#L258-L277
train
Helper that allows us to turn off storing jobs for different classes returns True if the job was successfully stored False if it was not stored
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/client/mixins.py
SyncClientMixin.low
def low(self, fun, low, print_event=True, full_return=False): ''' Execute a function from low data Low data includes: required: - fun: the name of the function to run optional: - arg: a list of args to pass to fun - kwarg: k...
python
def low(self, fun, low, print_event=True, full_return=False): ''' Execute a function from low data Low data includes: required: - fun: the name of the function to run optional: - arg: a list of args to pass to fun - kwarg: k...
[ "def", "low", "(", "self", ",", "fun", ",", "low", ",", "print_event", "=", "True", ",", "full_return", "=", "False", ")", ":", "# fire the mminion loading (if not already done) here", "# this is not to clutter the output with the module loading", "# if we have a high debug l...
Execute a function from low data Low data includes: required: - fun: the name of the function to run optional: - arg: a list of args to pass to fun - kwarg: kwargs for fun - __user__: user who is running the command ...
[ "Execute", "a", "function", "from", "low", "data", "Low", "data", "includes", ":", "required", ":", "-", "fun", ":", "the", "name", "of", "the", "function", "to", "run", "optional", ":", "-", "arg", ":", "a", "list", "of", "args", "to", "pass", "to",...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/mixins.py#L279-L444
train
Execute a function from low data and return a dict with the result.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/client/mixins.py
SyncClientMixin.get_docs
def get_docs(self, arg=None): ''' Return a dictionary of functions and the inline documentation for each ''' if arg: if '*' in arg: target_mod = arg _use_fnmatch = True else: target_mod = arg + '.' if not arg.endswit...
python
def get_docs(self, arg=None): ''' Return a dictionary of functions and the inline documentation for each ''' if arg: if '*' in arg: target_mod = arg _use_fnmatch = True else: target_mod = arg + '.' if not arg.endswit...
[ "def", "get_docs", "(", "self", ",", "arg", "=", "None", ")", ":", "if", "arg", ":", "if", "'*'", "in", "arg", ":", "target_mod", "=", "arg", "_use_fnmatch", "=", "True", "else", ":", "target_mod", "=", "arg", "+", "'.'", "if", "not", "arg", ".", ...
Return a dictionary of functions and the inline documentation for each
[ "Return", "a", "dictionary", "of", "functions", "and", "the", "inline", "documentation", "for", "each" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/mixins.py#L446-L468
train
Return a dictionary of functions and the inline documentation for each
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/client/mixins.py
AsyncClientMixin.asynchronous
def asynchronous(self, fun, low, user='UNKNOWN', pub=None): ''' Execute the function in a multiprocess and return the event tag to use to watch for the return ''' async_pub = pub if pub is not None else self._gen_async_pub() proc = salt.utils.process.SignalHandlingMultip...
python
def asynchronous(self, fun, low, user='UNKNOWN', pub=None): ''' Execute the function in a multiprocess and return the event tag to use to watch for the return ''' async_pub = pub if pub is not None else self._gen_async_pub() proc = salt.utils.process.SignalHandlingMultip...
[ "def", "asynchronous", "(", "self", ",", "fun", ",", "low", ",", "user", "=", "'UNKNOWN'", ",", "pub", "=", "None", ")", ":", "async_pub", "=", "pub", "if", "pub", "is", "not", "None", "else", "self", ".", "_gen_async_pub", "(", ")", "proc", "=", "...
Execute the function in a multiprocess and return the event tag to use to watch for the return
[ "Execute", "the", "function", "in", "a", "multiprocess", "and", "return", "the", "event", "tag", "to", "use", "to", "watch", "for", "the", "return" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/mixins.py#L525-L540
train
Execute the function in a multiprocess and return the event tag to use to watch for the return
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/client/mixins.py
AsyncClientMixin.print_async_event
def print_async_event(self, suffix, event): ''' Print all of the events with the prefix 'tag' ''' if not isinstance(event, dict): return # if we are "quiet", don't print if self.opts.get('quiet', False): return # some suffixes we don't wa...
python
def print_async_event(self, suffix, event): ''' Print all of the events with the prefix 'tag' ''' if not isinstance(event, dict): return # if we are "quiet", don't print if self.opts.get('quiet', False): return # some suffixes we don't wa...
[ "def", "print_async_event", "(", "self", ",", "suffix", ",", "event", ")", ":", "if", "not", "isinstance", "(", "event", ",", "dict", ")", ":", "return", "# if we are \"quiet\", don't print", "if", "self", ".", "opts", ".", "get", "(", "'quiet'", ",", "Fal...
Print all of the events with the prefix 'tag'
[ "Print", "all", "of", "the", "events", "with", "the", "prefix", "tag" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/mixins.py#L542-L575
train
Print the event with the prefix tag
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
doc/_ext/shorturls.py
write_urls_index
def write_urls_index(app, exc): ''' Generate a JSON file to serve as an index for short-URL lookups ''' inventory = os.path.join(app.builder.outdir, 'objects.inv') objects = sphinx.ext.intersphinx.fetch_inventory(app, DOCS_URL, inventory) with open(os.path.join(app.builder.outdir, 'shorturls.js...
python
def write_urls_index(app, exc): ''' Generate a JSON file to serve as an index for short-URL lookups ''' inventory = os.path.join(app.builder.outdir, 'objects.inv') objects = sphinx.ext.intersphinx.fetch_inventory(app, DOCS_URL, inventory) with open(os.path.join(app.builder.outdir, 'shorturls.js...
[ "def", "write_urls_index", "(", "app", ",", "exc", ")", ":", "inventory", "=", "os", ".", "path", ".", "join", "(", "app", ".", "builder", ".", "outdir", ",", "'objects.inv'", ")", "objects", "=", "sphinx", ".", "ext", ".", "intersphinx", ".", "fetch_i...
Generate a JSON file to serve as an index for short-URL lookups
[ "Generate", "a", "JSON", "file", "to", "serve", "as", "an", "index", "for", "short", "-", "URL", "lookups" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/doc/_ext/shorturls.py#L11-L19
train
Generate a JSON file to serve as an index for short - URL lookups
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/mac_utils.py
execute_return_success
def execute_return_success(cmd): ''' Executes the passed command. Returns True if successful :param str cmd: The command to run :return: True if successful, otherwise False :rtype: bool :raises: Error if command fails or is not supported ''' ret = _run_all(cmd) if ret['retcode']...
python
def execute_return_success(cmd): ''' Executes the passed command. Returns True if successful :param str cmd: The command to run :return: True if successful, otherwise False :rtype: bool :raises: Error if command fails or is not supported ''' ret = _run_all(cmd) if ret['retcode']...
[ "def", "execute_return_success", "(", "cmd", ")", ":", "ret", "=", "_run_all", "(", "cmd", ")", "if", "ret", "[", "'retcode'", "]", "!=", "0", "or", "'not supported'", "in", "ret", "[", "'stdout'", "]", ".", "lower", "(", ")", ":", "msg", "=", "'Comm...
Executes the passed command. Returns True if successful :param str cmd: The command to run :return: True if successful, otherwise False :rtype: bool :raises: Error if command fails or is not supported
[ "Executes", "the", "passed", "command", ".", "Returns", "True", "if", "successful" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/mac_utils.py#L144-L165
train
Executes the passed command and returns True if successful otherwise False
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/mac_utils.py
execute_return_result
def execute_return_result(cmd): ''' Executes the passed command. Returns the standard out if successful :param str cmd: The command to run :return: The standard out of the command if successful, otherwise returns an error :rtype: str :raises: Error if command fails or is not supported ...
python
def execute_return_result(cmd): ''' Executes the passed command. Returns the standard out if successful :param str cmd: The command to run :return: The standard out of the command if successful, otherwise returns an error :rtype: str :raises: Error if command fails or is not supported ...
[ "def", "execute_return_result", "(", "cmd", ")", ":", "ret", "=", "_run_all", "(", "cmd", ")", "if", "ret", "[", "'retcode'", "]", "!=", "0", "or", "'not supported'", "in", "ret", "[", "'stdout'", "]", ".", "lower", "(", ")", ":", "msg", "=", "'Comma...
Executes the passed command. Returns the standard out if successful :param str cmd: The command to run :return: The standard out of the command if successful, otherwise returns an error :rtype: str :raises: Error if command fails or is not supported
[ "Executes", "the", "passed", "command", ".", "Returns", "the", "standard", "out", "if", "successful" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/mac_utils.py#L168-L189
train
Executes the passed command and returns the standard out if successful otherwise raises an error
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/mac_utils.py
validate_enabled
def validate_enabled(enabled): ''' Helper function to validate the enabled parameter. Boolean values are converted to "on" and "off". String values are checked to make sure they are either "on" or "off"/"yes" or "no". Integer ``0`` will return "off". All other integers will return "on" :param e...
python
def validate_enabled(enabled): ''' Helper function to validate the enabled parameter. Boolean values are converted to "on" and "off". String values are checked to make sure they are either "on" or "off"/"yes" or "no". Integer ``0`` will return "off". All other integers will return "on" :param e...
[ "def", "validate_enabled", "(", "enabled", ")", ":", "if", "isinstance", "(", "enabled", ",", "six", ".", "string_types", ")", ":", "if", "enabled", ".", "lower", "(", ")", "not", "in", "[", "'on'", ",", "'off'", ",", "'yes'", ",", "'no'", "]", ":", ...
Helper function to validate the enabled parameter. Boolean values are converted to "on" and "off". String values are checked to make sure they are either "on" or "off"/"yes" or "no". Integer ``0`` will return "off". All other integers will return "on" :param enabled: Enabled can be boolean True or Fals...
[ "Helper", "function", "to", "validate", "the", "enabled", "parameter", ".", "Boolean", "values", "are", "converted", "to", "on", "and", "off", ".", "String", "values", "are", "checked", "to", "make", "sure", "they", "are", "either", "on", "or", "off", "/",...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/mac_utils.py#L213-L236
train
Helper function to validate the enabled parameter.
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/mac_utils.py
confirm_updated
def confirm_updated(value, check_fun, normalize_ret=False, wait=5): ''' Wait up to ``wait`` seconds for a system parameter to be changed before deciding it hasn't changed. :param str value: The value indicating a successful change :param function check_fun: The function whose return is compared wi...
python
def confirm_updated(value, check_fun, normalize_ret=False, wait=5): ''' Wait up to ``wait`` seconds for a system parameter to be changed before deciding it hasn't changed. :param str value: The value indicating a successful change :param function check_fun: The function whose return is compared wi...
[ "def", "confirm_updated", "(", "value", ",", "check_fun", ",", "normalize_ret", "=", "False", ",", "wait", "=", "5", ")", ":", "for", "i", "in", "range", "(", "wait", ")", ":", "state", "=", "validate_enabled", "(", "check_fun", "(", ")", ")", "if", ...
Wait up to ``wait`` seconds for a system parameter to be changed before deciding it hasn't changed. :param str value: The value indicating a successful change :param function check_fun: The function whose return is compared with ``value`` :param bool normalize_ret: Whether to normalize the re...
[ "Wait", "up", "to", "wait", "seconds", "for", "a", "system", "parameter", "to", "be", "changed", "before", "deciding", "it", "hasn", "t", "changed", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/mac_utils.py#L239-L260
train
Confirm that a system parameter has been updated.
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/mac_utils.py
launchctl
def launchctl(sub_cmd, *args, **kwargs): ''' Run a launchctl command and raise an error if it fails Args: additional args are passed to launchctl sub_cmd (str): Sub command supplied to launchctl Kwargs: passed to ``cmd.run_all`` return_stdout (bool): A keyword argument. If true return ...
python
def launchctl(sub_cmd, *args, **kwargs): ''' Run a launchctl command and raise an error if it fails Args: additional args are passed to launchctl sub_cmd (str): Sub command supplied to launchctl Kwargs: passed to ``cmd.run_all`` return_stdout (bool): A keyword argument. If true return ...
[ "def", "launchctl", "(", "sub_cmd", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "# Get return type", "return_stdout", "=", "kwargs", ".", "pop", "(", "'return_stdout'", ",", "False", ")", "# Construct command", "cmd", "=", "[", "'launchctl'", ",", ...
Run a launchctl command and raise an error if it fails Args: additional args are passed to launchctl sub_cmd (str): Sub command supplied to launchctl Kwargs: passed to ``cmd.run_all`` return_stdout (bool): A keyword argument. If true return the stdout of the launchctl command ...
[ "Run", "a", "launchctl", "command", "and", "raise", "an", "error", "if", "it", "fails" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/mac_utils.py#L263-L309
train
Run a launchctl command and raise an error if it fails
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/mac_utils.py
_available_services
def _available_services(refresh=False): ''' This is a helper function for getting the available macOS services. The strategy is to look through the known system locations for launchd plist files, parse them, and use their information for populating the list of services. Services can run without a p...
python
def _available_services(refresh=False): ''' This is a helper function for getting the available macOS services. The strategy is to look through the known system locations for launchd plist files, parse them, and use their information for populating the list of services. Services can run without a p...
[ "def", "_available_services", "(", "refresh", "=", "False", ")", ":", "try", ":", "if", "__context__", "[", "'available_services'", "]", "and", "not", "refresh", ":", "log", ".", "debug", "(", "'Found context for available services.'", ")", "__context__", "[", "...
This is a helper function for getting the available macOS services. The strategy is to look through the known system locations for launchd plist files, parse them, and use their information for populating the list of services. Services can run without a plist file present, but normally services which h...
[ "This", "is", "a", "helper", "function", "for", "getting", "the", "available", "macOS", "services", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/mac_utils.py#L312-L417
train
Return a dict of available services.
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/mac_utils.py
console_user
def console_user(username=False): ''' Gets the UID or Username of the current console user. :return: The uid or username of the console user. :param bool username: Whether to return the username of the console user instead of the UID. Defaults to False :rtype: Interger of the UID, or a string...
python
def console_user(username=False): ''' Gets the UID or Username of the current console user. :return: The uid or username of the console user. :param bool username: Whether to return the username of the console user instead of the UID. Defaults to False :rtype: Interger of the UID, or a string...
[ "def", "console_user", "(", "username", "=", "False", ")", ":", "try", ":", "# returns the 'st_uid' stat from the /dev/console file.", "uid", "=", "os", ".", "stat", "(", "'/dev/console'", ")", "[", "4", "]", "except", "(", "OSError", ",", "IndexError", ")", "...
Gets the UID or Username of the current console user. :return: The uid or username of the console user. :param bool username: Whether to return the username of the console user instead of the UID. Defaults to False :rtype: Interger of the UID, or a string of the username. Raises: Command...
[ "Gets", "the", "UID", "or", "Username", "of", "the", "current", "console", "user", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/mac_utils.py#L441-L472
train
Gets the UID or Username of the current console user.
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/pkgrepo.py
managed
def managed(name, ppa=None, **kwargs): ''' This state manages software package repositories. Currently, :mod:`yum <salt.modules.yumpkg>`, :mod:`apt <salt.modules.aptpkg>`, and :mod:`zypper <salt.modules.zypper>` repositories are supported. **YUM/DNF/ZYPPER-BASED SYSTEMS** .. note:: One...
python
def managed(name, ppa=None, **kwargs): ''' This state manages software package repositories. Currently, :mod:`yum <salt.modules.yumpkg>`, :mod:`apt <salt.modules.aptpkg>`, and :mod:`zypper <salt.modules.zypper>` repositories are supported. **YUM/DNF/ZYPPER-BASED SYSTEMS** .. note:: One...
[ "def", "managed", "(", "name", ",", "ppa", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "'refresh_db'", "in", "kwargs", ":", "salt", ".", "utils", ".", "versions", ".", "warn_until", "(", "'Neon'", ",", "'The \\'refresh_db\\' argument to \\'pkg.mod_...
This state manages software package repositories. Currently, :mod:`yum <salt.modules.yumpkg>`, :mod:`apt <salt.modules.aptpkg>`, and :mod:`zypper <salt.modules.zypper>` repositories are supported. **YUM/DNF/ZYPPER-BASED SYSTEMS** .. note:: One of ``baseurl`` or ``mirrorlist`` below is required...
[ "This", "state", "manages", "software", "package", "repositories", ".", "Currently", ":", "mod", ":", "yum", "<salt", ".", "modules", ".", "yumpkg", ">", ":", "mod", ":", "apt", "<salt", ".", "modules", ".", "aptpkg", ">", "and", ":", "mod", ":", "zypp...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pkgrepo.py#L112-L535
train
This state manages software package repositories.
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/pkgrepo.py
absent
def absent(name, **kwargs): ''' This function deletes the specified repo on the system, if it exists. It is essentially a wrapper around pkg.del_repo. name The name of the package repo, as it would be referred to when running the regular package manager commands. **UBUNTU-SPECIFIC ...
python
def absent(name, **kwargs): ''' This function deletes the specified repo on the system, if it exists. It is essentially a wrapper around pkg.del_repo. name The name of the package repo, as it would be referred to when running the regular package manager commands. **UBUNTU-SPECIFIC ...
[ "def", "absent", "(", "name", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'result'", ":", "None", ",", "'comment'", ":", "''", "}", "if", "'ppa'", "in", "kwargs", "and", "__gra...
This function deletes the specified repo on the system, if it exists. It is essentially a wrapper around pkg.del_repo. name The name of the package repo, as it would be referred to when running the regular package manager commands. **UBUNTU-SPECIFIC OPTIONS** ppa On Ubuntu, yo...
[ "This", "function", "deletes", "the", "specified", "repo", "on", "the", "system", "if", "it", "exists", ".", "It", "is", "essentially", "a", "wrapper", "around", "pkg", ".", "del_repo", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pkgrepo.py#L538-L653
train
This function deletes the specified repo on the system if it 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/pillar/foreman.py
ext_pillar
def ext_pillar(minion_id, pillar, # pylint: disable=W0613 key=None, only=()): ''' Read pillar data from Foreman via its API. ''' url = __opts__['foreman.url'] user = __opts__['foreman.user'] password = __opts__['foreman.password'] api = __opts__[...
python
def ext_pillar(minion_id, pillar, # pylint: disable=W0613 key=None, only=()): ''' Read pillar data from Foreman via its API. ''' url = __opts__['foreman.url'] user = __opts__['foreman.user'] password = __opts__['foreman.password'] api = __opts__[...
[ "def", "ext_pillar", "(", "minion_id", ",", "pillar", ",", "# pylint: disable=W0613", "key", "=", "None", ",", "only", "=", "(", ")", ")", ":", "url", "=", "__opts__", "[", "'foreman.url'", "]", "user", "=", "__opts__", "[", "'foreman.user'", "]", "passwor...
Read pillar data from Foreman via its API.
[ "Read", "pillar", "data", "from", "Foreman", "via", "its", "API", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/foreman.py#L81-L141
train
Read pillar data from Foreman via its API.
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_dynamodb.py
create_table
def create_table(table_name, region=None, key=None, keyid=None, profile=None, read_capacity_units=None, write_capacity_units=None, hash_key=None, hash_key_data_type=None, range_key=None, range_key_data_type=None, local_indexes=None, global_indexes=None...
python
def create_table(table_name, region=None, key=None, keyid=None, profile=None, read_capacity_units=None, write_capacity_units=None, hash_key=None, hash_key_data_type=None, range_key=None, range_key_data_type=None, local_indexes=None, global_indexes=None...
[ "def", "create_table", "(", "table_name", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ",", "read_capacity_units", "=", "None", ",", "write_capacity_units", "=", "None", ",", "hash_key", "=", ...
Creates a DynamoDB table. CLI Example: .. code-block:: bash salt myminion boto_dynamodb.create_table table_name / region=us-east-1 / hash_key=id / hash_key_data_type=N / range_key=created_at / range_key_data_type=N / read_capacity_units=1 / writ...
[ "Creates", "a", "DynamoDB", "table", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_dynamodb.py#L85-L161
train
Creates a DynamoDB table.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/boto_dynamodb.py
exists
def exists(table_name, region=None, key=None, keyid=None, profile=None): ''' Check to see if a table exists. CLI Example: .. code-block:: bash salt myminion boto_dynamodb.exists table_name region=us-east-1 ''' try: conn = _get_conn(region=region, key=key, keyid=keyid, profile=...
python
def exists(table_name, region=None, key=None, keyid=None, profile=None): ''' Check to see if a table exists. CLI Example: .. code-block:: bash salt myminion boto_dynamodb.exists table_name region=us-east-1 ''' try: conn = _get_conn(region=region, key=key, keyid=keyid, profile=...
[ "def", "exists", "(", "table_name", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "=", "key", ...
Check to see if a table exists. CLI Example: .. code-block:: bash salt myminion boto_dynamodb.exists table_name region=us-east-1
[ "Check", "to", "see", "if", "a", "table", "exists", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_dynamodb.py#L164-L182
train
Check to see if a table 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_dynamodb.py
delete
def delete(table_name, region=None, key=None, keyid=None, profile=None): ''' Delete a DynamoDB table. CLI Example: .. code-block:: bash salt myminion boto_dynamodb.delete table_name region=us-east-1 ''' conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile) table ...
python
def delete(table_name, region=None, key=None, keyid=None, profile=None): ''' Delete a DynamoDB table. CLI Example: .. code-block:: bash salt myminion boto_dynamodb.delete table_name region=us-east-1 ''' conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile) table ...
[ "def", "delete", "(", "table_name", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "=", "key", ",", "keyid",...
Delete a DynamoDB table. CLI Example: .. code-block:: bash salt myminion boto_dynamodb.delete table_name region=us-east-1
[ "Delete", "a", "DynamoDB", "table", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_dynamodb.py#L185-L208
train
Delete a DynamoDB table.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/boto_dynamodb.py
update
def update(table_name, throughput=None, global_indexes=None, region=None, key=None, keyid=None, profile=None): ''' Update a DynamoDB table. CLI example:: salt myminion boto_dynamodb.update table_name region=us-east-1 ''' conn = _get_conn(region=region, key=key, keyid=keyid, prof...
python
def update(table_name, throughput=None, global_indexes=None, region=None, key=None, keyid=None, profile=None): ''' Update a DynamoDB table. CLI example:: salt myminion boto_dynamodb.update table_name region=us-east-1 ''' conn = _get_conn(region=region, key=key, keyid=keyid, prof...
[ "def", "update", "(", "table_name", ",", "throughput", "=", "None", ",", "global_indexes", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", "_get_conn", "...
Update a DynamoDB table. CLI example:: salt myminion boto_dynamodb.update table_name region=us-east-1
[ "Update", "a", "DynamoDB", "table", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_dynamodb.py#L211-L222
train
Update a DynamoDB table. boto_dynamodb. update table_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/modules/boto_dynamodb.py
create_global_secondary_index
def create_global_secondary_index(table_name, global_index, region=None, key=None, keyid=None, profile=None): ''' Creates a single global secondary index on a DynamoDB table. CLI Example: .. code-block:: bash salt myminion boto_dynamodb.create_global_secondary...
python
def create_global_secondary_index(table_name, global_index, region=None, key=None, keyid=None, profile=None): ''' Creates a single global secondary index on a DynamoDB table. CLI Example: .. code-block:: bash salt myminion boto_dynamodb.create_global_secondary...
[ "def", "create_global_secondary_index", "(", "table_name", ",", "global_index", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ...
Creates a single global secondary index on a DynamoDB table. CLI Example: .. code-block:: bash salt myminion boto_dynamodb.create_global_secondary_index table_name / index_name
[ "Creates", "a", "single", "global", "secondary", "index", "on", "a", "DynamoDB", "table", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_dynamodb.py#L225-L238
train
Creates a global secondary index on a DynamoDB table.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/boto_dynamodb.py
update_global_secondary_index
def update_global_secondary_index(table_name, global_indexes, region=None, key=None, keyid=None, profile=None): ''' Updates the throughput of the given global secondary indexes. CLI Example: .. code-block:: bash salt myminion boto_dynamodb.update_global_second...
python
def update_global_secondary_index(table_name, global_indexes, region=None, key=None, keyid=None, profile=None): ''' Updates the throughput of the given global secondary indexes. CLI Example: .. code-block:: bash salt myminion boto_dynamodb.update_global_second...
[ "def", "update_global_secondary_index", "(", "table_name", ",", "global_indexes", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", "_get_conn", "(", "region", "=", "region",...
Updates the throughput of the given global secondary indexes. CLI Example: .. code-block:: bash salt myminion boto_dynamodb.update_global_secondary_index table_name / indexes
[ "Updates", "the", "throughput", "of", "the", "given", "global", "secondary", "indexes", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_dynamodb.py#L241-L254
train
Updates the throughput of the given global secondary indexes.
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_dynamodb.py
describe
def describe(table_name, region=None, key=None, keyid=None, profile=None): ''' Describe a DynamoDB table. CLI example:: salt myminion boto_dynamodb.describe table_name region=us-east-1 ''' conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile) table = Table(table_name, ...
python
def describe(table_name, region=None, key=None, keyid=None, profile=None): ''' Describe a DynamoDB table. CLI example:: salt myminion boto_dynamodb.describe table_name region=us-east-1 ''' conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile) table = Table(table_name, ...
[ "def", "describe", "(", "table_name", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "=", "key", ",", "keyid...
Describe a DynamoDB table. CLI example:: salt myminion boto_dynamodb.describe table_name region=us-east-1
[ "Describe", "a", "DynamoDB", "table", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_dynamodb.py#L257-L267
train
Describe a DynamoDB table.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/boto_dynamodb.py
extract_index
def extract_index(index_data, global_index=False): ''' Instantiates and returns an AllIndex object given a valid index configuration CLI Example: salt myminion boto_dynamodb.extract_index index ''' parsed_data = {} keys = [] for key, value in six.iteritems(index_data): ...
python
def extract_index(index_data, global_index=False): ''' Instantiates and returns an AllIndex object given a valid index configuration CLI Example: salt myminion boto_dynamodb.extract_index index ''' parsed_data = {} keys = [] for key, value in six.iteritems(index_data): ...
[ "def", "extract_index", "(", "index_data", ",", "global_index", "=", "False", ")", ":", "parsed_data", "=", "{", "}", "keys", "=", "[", "]", "for", "key", ",", "value", "in", "six", ".", "iteritems", "(", "index_data", ")", ":", "for", "item", "in", ...
Instantiates and returns an AllIndex object given a valid index configuration CLI Example: salt myminion boto_dynamodb.extract_index index
[ "Instantiates", "and", "returns", "an", "AllIndex", "object", "given", "a", "valid", "index", "configuration" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_dynamodb.py#L270-L353
train
Instantiates and returns an AllIndex object given a valid index_data CLI Example :
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/cpan.py
install
def install(module): ''' Install a Perl module from CPAN CLI Example: .. code-block:: bash salt '*' cpan.install Template::Alloy ''' ret = { 'old': None, 'new': None, } old_info = show(module) cmd = 'cpan -i {0}'.format(module) out = __salt__['cmd.run...
python
def install(module): ''' Install a Perl module from CPAN CLI Example: .. code-block:: bash salt '*' cpan.install Template::Alloy ''' ret = { 'old': None, 'new': None, } old_info = show(module) cmd = 'cpan -i {0}'.format(module) out = __salt__['cmd.run...
[ "def", "install", "(", "module", ")", ":", "ret", "=", "{", "'old'", ":", "None", ",", "'new'", ":", "None", ",", "}", "old_info", "=", "show", "(", "module", ")", "cmd", "=", "'cpan -i {0}'", ".", "format", "(", "module", ")", "out", "=", "__salt_...
Install a Perl module from CPAN CLI Example: .. code-block:: bash salt '*' cpan.install Template::Alloy
[ "Install", "a", "Perl", "module", "from", "CPAN" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/cpan.py#L35-L63
train
Install a Perl module from CPAN
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/cpan.py
remove
def remove(module, details=False): ''' Attempt to remove a Perl module that was installed from CPAN. Because the ``cpan`` command doesn't actually support "uninstall"-like functionality, this function will attempt to do what it can, with what it has from CPAN. Until this function is declared stable...
python
def remove(module, details=False): ''' Attempt to remove a Perl module that was installed from CPAN. Because the ``cpan`` command doesn't actually support "uninstall"-like functionality, this function will attempt to do what it can, with what it has from CPAN. Until this function is declared stable...
[ "def", "remove", "(", "module", ",", "details", "=", "False", ")", ":", "ret", "=", "{", "'old'", ":", "None", ",", "'new'", ":", "None", ",", "}", "info", "=", "show", "(", "module", ")", "if", "'error'", "in", "info", ":", "return", "{", "'erro...
Attempt to remove a Perl module that was installed from CPAN. Because the ``cpan`` command doesn't actually support "uninstall"-like functionality, this function will attempt to do what it can, with what it has from CPAN. Until this function is declared stable, USE AT YOUR OWN RISK! CLI Example: ...
[ "Attempt", "to", "remove", "a", "Perl", "module", "that", "was", "installed", "from", "CPAN", ".", "Because", "the", "cpan", "command", "doesn", "t", "actually", "support", "uninstall", "-", "like", "functionality", "this", "function", "will", "attempt", "to",...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/cpan.py#L66-L130
train
Remove a Perl module from CPAN
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/cpan.py
show
def show(module): ''' Show information about a specific Perl module CLI Example: .. code-block:: bash salt '*' cpan.show Template::Alloy ''' ret = {} ret['name'] = module # This section parses out details from CPAN, if possible cmd = 'cpan -D {0}'.format(module) out =...
python
def show(module): ''' Show information about a specific Perl module CLI Example: .. code-block:: bash salt '*' cpan.show Template::Alloy ''' ret = {} ret['name'] = module # This section parses out details from CPAN, if possible cmd = 'cpan -D {0}'.format(module) out =...
[ "def", "show", "(", "module", ")", ":", "ret", "=", "{", "}", "ret", "[", "'name'", "]", "=", "module", "# This section parses out details from CPAN, if possible", "cmd", "=", "'cpan -D {0}'", ".", "format", "(", "module", ")", "out", "=", "__salt__", "[", "...
Show information about a specific Perl module CLI Example: .. code-block:: bash salt '*' cpan.show Template::Alloy
[ "Show", "information", "about", "a", "specific", "Perl", "module" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/cpan.py#L152-L214
train
Show information about a specific Perl 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/modules/cpan.py
show_config
def show_config(): ''' Return a dict of CPAN configuration values CLI Example: .. code-block:: bash salt '*' cpan.show_config ''' ret = {} cmd = 'cpan -J' out = __salt__['cmd.run'](cmd).splitlines() for line in out: if '=>' not in line: # TODO: Some opt...
python
def show_config(): ''' Return a dict of CPAN configuration values CLI Example: .. code-block:: bash salt '*' cpan.show_config ''' ret = {} cmd = 'cpan -J' out = __salt__['cmd.run'](cmd).splitlines() for line in out: if '=>' not in line: # TODO: Some opt...
[ "def", "show_config", "(", ")", ":", "ret", "=", "{", "}", "cmd", "=", "'cpan -J'", "out", "=", "__salt__", "[", "'cmd.run'", "]", "(", "cmd", ")", ".", "splitlines", "(", ")", "for", "line", "in", "out", ":", "if", "'=>'", "not", "in", "line", "...
Return a dict of CPAN configuration values CLI Example: .. code-block:: bash salt '*' cpan.show_config
[ "Return", "a", "dict", "of", "CPAN", "configuration", "values" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/cpan.py#L217-L238
train
Return a dict of CPAN configuration values for the current CPAN node.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cache/mysql_cache.py
run_query
def run_query(conn, query, retries=3): ''' Get a cursor and run a query. Reconnect up to `retries` times if needed. Returns: cursor, affected rows counter Raises: SaltCacheError, AttributeError, OperationalError ''' try: cur = conn.cursor() out = cur.execute(query) re...
python
def run_query(conn, query, retries=3): ''' Get a cursor and run a query. Reconnect up to `retries` times if needed. Returns: cursor, affected rows counter Raises: SaltCacheError, AttributeError, OperationalError ''' try: cur = conn.cursor() out = cur.execute(query) re...
[ "def", "run_query", "(", "conn", ",", "query", ",", "retries", "=", "3", ")", ":", "try", ":", "cur", "=", "conn", ".", "cursor", "(", ")", "out", "=", "cur", ".", "execute", "(", "query", ")", "return", "cur", ",", "out", "except", "(", "Attribu...
Get a cursor and run a query. Reconnect up to `retries` times if needed. Returns: cursor, affected rows counter Raises: SaltCacheError, AttributeError, OperationalError
[ "Get", "a", "cursor", "and", "run", "a", "query", ".", "Reconnect", "up", "to", "retries", "times", "if", "needed", ".", "Returns", ":", "cursor", "affected", "rows", "counter", "Raises", ":", "SaltCacheError", "AttributeError", "OperationalError" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cache/mysql_cache.py#L92-L118
train
Run a query and return a cursor and affected rows
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/cache/mysql_cache.py
_create_table
def _create_table(): ''' Create table if needed ''' # Explicitely check if the table already exists as the library logs a # warning on CREATE TABLE query = """SELECT COUNT(TABLE_NAME) FROM information_schema.tables WHERE table_schema = '{0}' AND table_name = '{1}'""".format( ...
python
def _create_table(): ''' Create table if needed ''' # Explicitely check if the table already exists as the library logs a # warning on CREATE TABLE query = """SELECT COUNT(TABLE_NAME) FROM information_schema.tables WHERE table_schema = '{0}' AND table_name = '{1}'""".format( ...
[ "def", "_create_table", "(", ")", ":", "# Explicitely check if the table already exists as the library logs a", "# warning on CREATE TABLE", "query", "=", "\"\"\"SELECT COUNT(TABLE_NAME) FROM information_schema.tables\n WHERE table_schema = '{0}' AND table_name = '{1}'\"\"\"", ".", "for...
Create table if needed
[ "Create", "table", "if", "needed" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cache/mysql_cache.py#L121-L146
train
Create table if needed
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/cache/mysql_cache.py
_init_client
def _init_client(): """Initialize connection and create table if needed """ if client is not None: return global _mysql_kwargs, _table_name _mysql_kwargs = { 'host': __opts__.get('mysql.host', '127.0.0.1'), 'user': __opts__.get('mysql.user', None), 'passwd': __opts__...
python
def _init_client(): """Initialize connection and create table if needed """ if client is not None: return global _mysql_kwargs, _table_name _mysql_kwargs = { 'host': __opts__.get('mysql.host', '127.0.0.1'), 'user': __opts__.get('mysql.user', None), 'passwd': __opts__...
[ "def", "_init_client", "(", ")", ":", "if", "client", "is", "not", "None", ":", "return", "global", "_mysql_kwargs", ",", "_table_name", "_mysql_kwargs", "=", "{", "'host'", ":", "__opts__", ".", "get", "(", "'mysql.host'", ",", "'127.0.0.1'", ")", ",", "'...
Initialize connection and create table if needed
[ "Initialize", "connection", "and", "create", "table", "if", "needed" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cache/mysql_cache.py#L149-L176
train
Initialize connection and create table if needed
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/cache/mysql_cache.py
store
def store(bank, key, data): ''' Store a key value. ''' _init_client() data = __context__['serial'].dumps(data) query = b"REPLACE INTO {0} (bank, etcd_key, data) values('{1}', '{2}', " \ b"'{3}')".format(_table_name, bank, key, ...
python
def store(bank, key, data): ''' Store a key value. ''' _init_client() data = __context__['serial'].dumps(data) query = b"REPLACE INTO {0} (bank, etcd_key, data) values('{1}', '{2}', " \ b"'{3}')".format(_table_name, bank, key, ...
[ "def", "store", "(", "bank", ",", "key", ",", "data", ")", ":", "_init_client", "(", ")", "data", "=", "__context__", "[", "'serial'", "]", ".", "dumps", "(", "data", ")", "query", "=", "b\"REPLACE INTO {0} (bank, etcd_key, data) values('{1}', '{2}', \"", "b\"'{...
Store a key value.
[ "Store", "a", "key", "value", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cache/mysql_cache.py#L179-L196
train
Store a key 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/cache/mysql_cache.py
fetch
def fetch(bank, key): ''' Fetch a key value. ''' _init_client() query = "SELECT data FROM {0} WHERE bank='{1}' AND etcd_key='{2}'".format( _table_name, bank, key) cur, _ = run_query(client, query) r = cur.fetchone() cur.close() if r is None: return {} return __con...
python
def fetch(bank, key): ''' Fetch a key value. ''' _init_client() query = "SELECT data FROM {0} WHERE bank='{1}' AND etcd_key='{2}'".format( _table_name, bank, key) cur, _ = run_query(client, query) r = cur.fetchone() cur.close() if r is None: return {} return __con...
[ "def", "fetch", "(", "bank", ",", "key", ")", ":", "_init_client", "(", ")", "query", "=", "\"SELECT data FROM {0} WHERE bank='{1}' AND etcd_key='{2}'\"", ".", "format", "(", "_table_name", ",", "bank", ",", "key", ")", "cur", ",", "_", "=", "run_query", "(", ...
Fetch a key value.
[ "Fetch", "a", "key", "value", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cache/mysql_cache.py#L199-L211
train
Fetch a key 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/cache/mysql_cache.py
flush
def flush(bank, key=None): ''' Remove the key from the cache bank with all the key content. ''' _init_client() query = "DELETE FROM {0} WHERE bank='{1}'".format(_table_name, bank) if key is not None: query += " AND etcd_key='{0}'".format(key) cur, _ = run_query(client, query) cu...
python
def flush(bank, key=None): ''' Remove the key from the cache bank with all the key content. ''' _init_client() query = "DELETE FROM {0} WHERE bank='{1}'".format(_table_name, bank) if key is not None: query += " AND etcd_key='{0}'".format(key) cur, _ = run_query(client, query) cu...
[ "def", "flush", "(", "bank", ",", "key", "=", "None", ")", ":", "_init_client", "(", ")", "query", "=", "\"DELETE FROM {0} WHERE bank='{1}'\"", ".", "format", "(", "_table_name", ",", "bank", ")", "if", "key", "is", "not", "None", ":", "query", "+=", "\"...
Remove the key from the cache bank with all the key content.
[ "Remove", "the", "key", "from", "the", "cache", "bank", "with", "all", "the", "key", "content", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cache/mysql_cache.py#L214-L224
train
Remove all the content of the key from the cache bank.
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/cache/mysql_cache.py
ls
def ls(bank): ''' Return an iterable object containing all entries stored in the specified bank. ''' _init_client() query = "SELECT etcd_key FROM {0} WHERE bank='{1}'".format( _table_name, bank) cur, _ = run_query(client, query) out = [row[0] for row in cur.fetchall()] cur.cl...
python
def ls(bank): ''' Return an iterable object containing all entries stored in the specified bank. ''' _init_client() query = "SELECT etcd_key FROM {0} WHERE bank='{1}'".format( _table_name, bank) cur, _ = run_query(client, query) out = [row[0] for row in cur.fetchall()] cur.cl...
[ "def", "ls", "(", "bank", ")", ":", "_init_client", "(", ")", "query", "=", "\"SELECT etcd_key FROM {0} WHERE bank='{1}'\"", ".", "format", "(", "_table_name", ",", "bank", ")", "cur", ",", "_", "=", "run_query", "(", "client", ",", "query", ")", "out", "=...
Return an iterable object containing all entries stored in the specified bank.
[ "Return", "an", "iterable", "object", "containing", "all", "entries", "stored", "in", "the", "specified", "bank", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cache/mysql_cache.py#L227-L238
train
Return an iterable object containing all entries stored in the specified bank.
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/cache/mysql_cache.py
contains
def contains(bank, key): ''' Checks if the specified bank contains the specified key. ''' _init_client() query = "SELECT COUNT(data) FROM {0} WHERE bank='{1}' " \ "AND etcd_key='{2}'".format(_table_name, bank, key) cur, _ = run_query(client, query) r = cur.fetchone() cur.close() ...
python
def contains(bank, key): ''' Checks if the specified bank contains the specified key. ''' _init_client() query = "SELECT COUNT(data) FROM {0} WHERE bank='{1}' " \ "AND etcd_key='{2}'".format(_table_name, bank, key) cur, _ = run_query(client, query) r = cur.fetchone() cur.close() ...
[ "def", "contains", "(", "bank", ",", "key", ")", ":", "_init_client", "(", ")", "query", "=", "\"SELECT COUNT(data) FROM {0} WHERE bank='{1}' \"", "\"AND etcd_key='{2}'\"", ".", "format", "(", "_table_name", ",", "bank", ",", "key", ")", "cur", ",", "_", "=", ...
Checks if the specified bank contains the specified key.
[ "Checks", "if", "the", "specified", "bank", "contains", "the", "specified", "key", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cache/mysql_cache.py#L241-L251
train
Checks if the specified bank contains the specified key.
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/inspectlib/fsdb.py
CsvDB.new
def new(self): ''' Create a new database and opens it. :return: ''' dbname = self._label() self.db_path = os.path.join(self.path, dbname) if not os.path.exists(self.db_path): os.makedirs(self.db_path) self._opened = True self.list_tabl...
python
def new(self): ''' Create a new database and opens it. :return: ''' dbname = self._label() self.db_path = os.path.join(self.path, dbname) if not os.path.exists(self.db_path): os.makedirs(self.db_path) self._opened = True self.list_tabl...
[ "def", "new", "(", "self", ")", ":", "dbname", "=", "self", ".", "_label", "(", ")", "self", ".", "db_path", "=", "os", ".", "path", ".", "join", "(", "self", ".", "path", ",", "dbname", ")", "if", "not", "os", ".", "path", ".", "exists", "(", ...
Create a new database and opens it. :return:
[ "Create", "a", "new", "database", "and", "opens", "it", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/inspectlib/fsdb.py#L76-L89
train
Create a new database and opens it.
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/inspectlib/fsdb.py
CsvDB.purge
def purge(self, dbid): ''' Purge the database. :param dbid: :return: ''' db_path = os.path.join(self.path, dbid) if os.path.exists(db_path): shutil.rmtree(db_path, ignore_errors=True) return True return False
python
def purge(self, dbid): ''' Purge the database. :param dbid: :return: ''' db_path = os.path.join(self.path, dbid) if os.path.exists(db_path): shutil.rmtree(db_path, ignore_errors=True) return True return False
[ "def", "purge", "(", "self", ",", "dbid", ")", ":", "db_path", "=", "os", ".", "path", ".", "join", "(", "self", ".", "path", ",", "dbid", ")", "if", "os", ".", "path", ".", "exists", "(", "db_path", ")", ":", "shutil", ".", "rmtree", "(", "db_...
Purge the database. :param dbid: :return:
[ "Purge", "the", "database", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/inspectlib/fsdb.py#L91-L102
train
Purge 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/modules/inspectlib/fsdb.py
CsvDB.flush
def flush(self, table): ''' Flush table. :param table: :return: ''' table_path = os.path.join(self.db_path, table) if os.path.exists(table_path): os.unlink(table_path)
python
def flush(self, table): ''' Flush table. :param table: :return: ''' table_path = os.path.join(self.db_path, table) if os.path.exists(table_path): os.unlink(table_path)
[ "def", "flush", "(", "self", ",", "table", ")", ":", "table_path", "=", "os", ".", "path", ".", "join", "(", "self", ".", "db_path", ",", "table", ")", "if", "os", ".", "path", ".", "exists", "(", "table_path", ")", ":", "os", ".", "unlink", "(",...
Flush table. :param table: :return:
[ "Flush", "table", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/inspectlib/fsdb.py#L104-L113
train
Flush the cache for the specified table.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/inspectlib/fsdb.py
CsvDB.list
def list(self): ''' List all the databases on the given path. :return: ''' databases = [] for dbname in os.listdir(self.path): databases.append(dbname) return list(reversed(sorted(databases)))
python
def list(self): ''' List all the databases on the given path. :return: ''' databases = [] for dbname in os.listdir(self.path): databases.append(dbname) return list(reversed(sorted(databases)))
[ "def", "list", "(", "self", ")", ":", "databases", "=", "[", "]", "for", "dbname", "in", "os", ".", "listdir", "(", "self", ".", "path", ")", ":", "databases", ".", "append", "(", "dbname", ")", "return", "list", "(", "reversed", "(", "sorted", "("...
List all the databases on the given path. :return:
[ "List", "all", "the", "databases", "on", "the", "given", "path", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/inspectlib/fsdb.py#L115-L124
train
List all the databases on the given path.
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/inspectlib/fsdb.py
CsvDB.list_tables
def list_tables(self): ''' Load existing tables and their descriptions. :return: ''' if not self._tables: for table_name in os.listdir(self.db_path): self._tables[table_name] = self._load_table(table_name) return self._tables.keys()
python
def list_tables(self): ''' Load existing tables and their descriptions. :return: ''' if not self._tables: for table_name in os.listdir(self.db_path): self._tables[table_name] = self._load_table(table_name) return self._tables.keys()
[ "def", "list_tables", "(", "self", ")", ":", "if", "not", "self", ".", "_tables", ":", "for", "table_name", "in", "os", ".", "listdir", "(", "self", ".", "db_path", ")", ":", "self", ".", "_tables", "[", "table_name", "]", "=", "self", ".", "_load_ta...
Load existing tables and their descriptions. :return:
[ "Load", "existing", "tables", "and", "their", "descriptions", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/inspectlib/fsdb.py#L126-L136
train
Load existing tables and their descriptions.
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/inspectlib/fsdb.py
CsvDB.open
def open(self, dbname=None): ''' Open database from the path with the name or latest. If there are no yet databases, create a new implicitly. :return: ''' databases = self.list() if self.is_closed(): self.db_path = os.path.join(self.path, dbname or (d...
python
def open(self, dbname=None): ''' Open database from the path with the name or latest. If there are no yet databases, create a new implicitly. :return: ''' databases = self.list() if self.is_closed(): self.db_path = os.path.join(self.path, dbname or (d...
[ "def", "open", "(", "self", ",", "dbname", "=", "None", ")", ":", "databases", "=", "self", ".", "list", "(", ")", "if", "self", ".", "is_closed", "(", ")", ":", "self", ".", "db_path", "=", "os", ".", "path", ".", "join", "(", "self", ".", "pa...
Open database from the path with the name or latest. If there are no yet databases, create a new implicitly. :return:
[ "Open", "database", "from", "the", "path", "with", "the", "name", "or", "latest", ".", "If", "there", "are", "no", "yet", "databases", "create", "a", "new", "implicitly", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/inspectlib/fsdb.py#L142-L154
train
Open database from the path with the name or latest.
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/inspectlib/fsdb.py
CsvDB.create_table_from_object
def create_table_from_object(self, obj): ''' Create a table from the object. NOTE: This method doesn't stores anything. :param obj: :return: ''' get_type = lambda item: str(type(item)).split("'")[1] if not os.path.exists(os.path.join(self.db_path, obj._TA...
python
def create_table_from_object(self, obj): ''' Create a table from the object. NOTE: This method doesn't stores anything. :param obj: :return: ''' get_type = lambda item: str(type(item)).split("'")[1] if not os.path.exists(os.path.join(self.db_path, obj._TA...
[ "def", "create_table_from_object", "(", "self", ",", "obj", ")", ":", "get_type", "=", "lambda", "item", ":", "str", "(", "type", "(", "item", ")", ")", ".", "split", "(", "\"'\"", ")", "[", "1", "]", "if", "not", "os", ".", "path", ".", "exists", ...
Create a table from the object. NOTE: This method doesn't stores anything. :param obj: :return:
[ "Create", "a", "table", "from", "the", "object", ".", "NOTE", ":", "This", "method", "doesn", "t", "stores", "anything", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/inspectlib/fsdb.py#L172-L185
train
Create a table from 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/modules/inspectlib/fsdb.py
CsvDB.store
def store(self, obj, distinct=False): ''' Store an object in the table. :param obj: An object to store :param distinct: Store object only if there is none identical of such. If at least one field is different, store it. :return: ''' if d...
python
def store(self, obj, distinct=False): ''' Store an object in the table. :param obj: An object to store :param distinct: Store object only if there is none identical of such. If at least one field is different, store it. :return: ''' if d...
[ "def", "store", "(", "self", ",", "obj", ",", "distinct", "=", "False", ")", ":", "if", "distinct", ":", "fields", "=", "dict", "(", "zip", "(", "self", ".", "_tables", "[", "obj", ".", "_TABLE", "]", ".", "keys", "(", ")", ",", "obj", ".", "_s...
Store an object in the table. :param obj: An object to store :param distinct: Store object only if there is none identical of such. If at least one field is different, store it. :return:
[ "Store", "an", "object", "in", "the", "table", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/inspectlib/fsdb.py#L187-L203
train
Store an object in the table.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/inspectlib/fsdb.py
CsvDB.update
def update(self, obj, matches=None, mt=None, lt=None, eq=None): ''' Update object(s) in the database. :param obj: :param matches: :param mt: :param lt: :param eq: :return: ''' updated = False objects = list() for _obj in se...
python
def update(self, obj, matches=None, mt=None, lt=None, eq=None): ''' Update object(s) in the database. :param obj: :param matches: :param mt: :param lt: :param eq: :return: ''' updated = False objects = list() for _obj in se...
[ "def", "update", "(", "self", ",", "obj", ",", "matches", "=", "None", ",", "mt", "=", "None", ",", "lt", "=", "None", ",", "eq", "=", "None", ")", ":", "updated", "=", "False", "objects", "=", "list", "(", ")", "for", "_obj", "in", "self", "."...
Update object(s) in the database. :param obj: :param matches: :param mt: :param lt: :param eq: :return:
[ "Update", "object", "(", "s", ")", "in", "the", "database", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/inspectlib/fsdb.py#L205-L229
train
Update object 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/modules/inspectlib/fsdb.py
CsvDB.delete
def delete(self, obj, matches=None, mt=None, lt=None, eq=None): ''' Delete object from the database. :param obj: :param matches: :param mt: :param lt: :param eq: :return: ''' deleted = False objects = list() for _obj in sel...
python
def delete(self, obj, matches=None, mt=None, lt=None, eq=None): ''' Delete object from the database. :param obj: :param matches: :param mt: :param lt: :param eq: :return: ''' deleted = False objects = list() for _obj in sel...
[ "def", "delete", "(", "self", ",", "obj", ",", "matches", "=", "None", ",", "mt", "=", "None", ",", "lt", "=", "None", ",", "eq", "=", "None", ")", ":", "deleted", "=", "False", "objects", "=", "list", "(", ")", "for", "_obj", "in", "self", "."...
Delete object from the database. :param obj: :param matches: :param mt: :param lt: :param eq: :return:
[ "Delete", "object", "from", "the", "database", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/inspectlib/fsdb.py#L231-L255
train
Delete object from 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/modules/inspectlib/fsdb.py
CsvDB.__criteria
def __criteria(self, obj, matches=None, mt=None, lt=None, eq=None): ''' Returns True if object is aligned to the criteria. :param obj: :param matches: :param mt: :param lt: :param eq: :return: Boolean ''' # Fail matcher if "less than" ...
python
def __criteria(self, obj, matches=None, mt=None, lt=None, eq=None): ''' Returns True if object is aligned to the criteria. :param obj: :param matches: :param mt: :param lt: :param eq: :return: Boolean ''' # Fail matcher if "less than" ...
[ "def", "__criteria", "(", "self", ",", "obj", ",", "matches", "=", "None", ",", "mt", "=", "None", ",", "lt", "=", "None", ",", "eq", "=", "None", ")", ":", "# Fail matcher if \"less than\"", "for", "field", ",", "value", "in", "(", "mt", "or", "{", ...
Returns True if object is aligned to the criteria. :param obj: :param matches: :param mt: :param lt: :param eq: :return: Boolean
[ "Returns", "True", "if", "object", "is", "aligned", "to", "the", "criteria", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/inspectlib/fsdb.py#L263-L294
train
Returns True if object is aligned to the criteria.
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/inspectlib/fsdb.py
CsvDB.get
def get(self, obj, matches=None, mt=None, lt=None, eq=None): ''' Get objects from the table. :param table_name: :param matches: Regexp. :param mt: More than. :param lt: Less than. :param eq: Equals. :return: ''' objects = [] with g...
python
def get(self, obj, matches=None, mt=None, lt=None, eq=None): ''' Get objects from the table. :param table_name: :param matches: Regexp. :param mt: More than. :param lt: Less than. :param eq: Equals. :return: ''' objects = [] with g...
[ "def", "get", "(", "self", ",", "obj", ",", "matches", "=", "None", ",", "mt", "=", "None", ",", "lt", "=", "None", ",", "eq", "=", "None", ")", ":", "objects", "=", "[", "]", "with", "gzip", ".", "open", "(", "os", ".", "path", ".", "join", ...
Get objects from the table. :param table_name: :param matches: Regexp. :param mt: More than. :param lt: Less than. :param eq: Equals. :return:
[ "Get", "objects", "from", "the", "table", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/inspectlib/fsdb.py#L296-L320
train
Get objects from the table.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/runners/event.py
send
def send(tag, data=None): ''' Send an event with the given tag and data. This is useful for sending events directly to the master from the shell with salt-run. It is also quite useful for sending events in orchestration states where the ``fire_event`` requisite isn't sufficient because it does ...
python
def send(tag, data=None): ''' Send an event with the given tag and data. This is useful for sending events directly to the master from the shell with salt-run. It is also quite useful for sending events in orchestration states where the ``fire_event`` requisite isn't sufficient because it does ...
[ "def", "send", "(", "tag", ",", "data", "=", "None", ")", ":", "data", "=", "data", "or", "{", "}", "event", "=", "salt", ".", "utils", ".", "event", ".", "get_master_event", "(", "__opts__", ",", "__opts__", "[", "'sock_dir'", "]", ",", "listen", ...
Send an event with the given tag and data. This is useful for sending events directly to the master from the shell with salt-run. It is also quite useful for sending events in orchestration states where the ``fire_event`` requisite isn't sufficient because it does not support sending custom data with t...
[ "Send", "an", "event", "with", "the", "given", "tag", "and", "data", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/event.py#L17-L80
train
Send an event with the given tag and data.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/runners/cache.py
grains
def grains(tgt=None, tgt_type='glob', **kwargs): ''' .. versionchanged:: 2017.7.0 The ``expr_form`` argument has been renamed to ``tgt_type``, earlier releases must use ``expr_form``. Return cached grains of the targeted minions. tgt Target to match minion ids. .. vers...
python
def grains(tgt=None, tgt_type='glob', **kwargs): ''' .. versionchanged:: 2017.7.0 The ``expr_form`` argument has been renamed to ``tgt_type``, earlier releases must use ``expr_form``. Return cached grains of the targeted minions. tgt Target to match minion ids. .. vers...
[ "def", "grains", "(", "tgt", "=", "None", ",", "tgt_type", "=", "'glob'", ",", "*", "*", "kwargs", ")", ":", "if", "tgt", "is", "None", ":", "# Change ``tgt=None`` to ``tgt`` (mandatory kwarg) in Salt Sodium.", "# This behavior was changed in PR #45588 to fix Issue #45489...
.. versionchanged:: 2017.7.0 The ``expr_form`` argument has been renamed to ``tgt_type``, earlier releases must use ``expr_form``. Return cached grains of the targeted minions. tgt Target to match minion ids. .. versionchanged:: 2017.7.5,2018.3.0 The ``tgt`` argume...
[ "..", "versionchanged", "::", "2017", ".", "7", ".", "0", "The", "expr_form", "argument", "has", "been", "renamed", "to", "tgt_type", "earlier", "releases", "must", "use", "expr_form", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/cache.py#L33-L74
train
Return the grains for the targeted 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/runners/cache.py
pillar
def pillar(tgt=None, tgt_type='glob', **kwargs): ''' .. versionchanged:: 2017.7.0 The ``expr_form`` argument has been renamed to ``tgt_type``, earlier releases must use ``expr_form``. Return cached pillars of the targeted minions CLI Example: .. code-block:: bash salt-run...
python
def pillar(tgt=None, tgt_type='glob', **kwargs): ''' .. versionchanged:: 2017.7.0 The ``expr_form`` argument has been renamed to ``tgt_type``, earlier releases must use ``expr_form``. Return cached pillars of the targeted minions CLI Example: .. code-block:: bash salt-run...
[ "def", "pillar", "(", "tgt", "=", "None", ",", "tgt_type", "=", "'glob'", ",", "*", "*", "kwargs", ")", ":", "pillar_util", "=", "salt", ".", "utils", ".", "master", ".", "MasterPillarUtil", "(", "tgt", ",", "tgt_type", ",", "use_cached_grains", "=", "...
.. versionchanged:: 2017.7.0 The ``expr_form`` argument has been renamed to ``tgt_type``, earlier releases must use ``expr_form``. Return cached pillars of the targeted minions CLI Example: .. code-block:: bash salt-run cache.pillar
[ "..", "versionchanged", "::", "2017", ".", "7", ".", "0", "The", "expr_form", "argument", "has", "been", "renamed", "to", "tgt_type", "earlier", "releases", "must", "use", "expr_form", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/cache.py#L77-L98
train
Return pillar of the targeted 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/runners/cache.py
mine
def mine(tgt=None, tgt_type='glob', **kwargs): ''' .. versionchanged:: 2017.7.0 The ``expr_form`` argument has been renamed to ``tgt_type``, earlier releases must use ``expr_form``. Return cached mine data of the targeted minions CLI Example: .. code-block:: bash salt-run...
python
def mine(tgt=None, tgt_type='glob', **kwargs): ''' .. versionchanged:: 2017.7.0 The ``expr_form`` argument has been renamed to ``tgt_type``, earlier releases must use ``expr_form``. Return cached mine data of the targeted minions CLI Example: .. code-block:: bash salt-run...
[ "def", "mine", "(", "tgt", "=", "None", ",", "tgt_type", "=", "'glob'", ",", "*", "*", "kwargs", ")", ":", "pillar_util", "=", "salt", ".", "utils", ".", "master", ".", "MasterPillarUtil", "(", "tgt", ",", "tgt_type", ",", "use_cached_grains", "=", "Fa...
.. versionchanged:: 2017.7.0 The ``expr_form`` argument has been renamed to ``tgt_type``, earlier releases must use ``expr_form``. Return cached mine data of the targeted minions CLI Example: .. code-block:: bash salt-run cache.mine
[ "..", "versionchanged", "::", "2017", ".", "7", ".", "0", "The", "expr_form", "argument", "has", "been", "renamed", "to", "tgt_type", "earlier", "releases", "must", "use", "expr_form", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/cache.py#L101-L122
train
Return the mine data of the targeted 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/runners/cache.py
_clear_cache
def _clear_cache(tgt=None, tgt_type='glob', clear_pillar_flag=False, clear_grains_flag=False, clear_mine_flag=False, clear_mine_func_flag=None): ''' Clear the cached data/files for the targeted minions. ''' if tgt is No...
python
def _clear_cache(tgt=None, tgt_type='glob', clear_pillar_flag=False, clear_grains_flag=False, clear_mine_flag=False, clear_mine_func_flag=None): ''' Clear the cached data/files for the targeted minions. ''' if tgt is No...
[ "def", "_clear_cache", "(", "tgt", "=", "None", ",", "tgt_type", "=", "'glob'", ",", "clear_pillar_flag", "=", "False", ",", "clear_grains_flag", "=", "False", ",", "clear_mine_flag", "=", "False", ",", "clear_mine_func_flag", "=", "None", ")", ":", "if", "t...
Clear the cached data/files for the targeted minions.
[ "Clear", "the", "cached", "data", "/", "files", "for", "the", "targeted", "minions", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/cache.py#L125-L145
train
Clear the cached data for the targeted 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/runners/cache.py
clear_all
def clear_all(tgt=None, tgt_type='glob'): ''' .. versionchanged:: 2017.7.0 The ``expr_form`` argument has been renamed to ``tgt_type``, earlier releases must use ``expr_form``. Clear the cached pillar, grains, and mine data of the targeted minions CLI Example: .. code-block:: bash...
python
def clear_all(tgt=None, tgt_type='glob'): ''' .. versionchanged:: 2017.7.0 The ``expr_form`` argument has been renamed to ``tgt_type``, earlier releases must use ``expr_form``. Clear the cached pillar, grains, and mine data of the targeted minions CLI Example: .. code-block:: bash...
[ "def", "clear_all", "(", "tgt", "=", "None", ",", "tgt_type", "=", "'glob'", ")", ":", "return", "_clear_cache", "(", "tgt", ",", "tgt_type", ",", "clear_pillar_flag", "=", "True", ",", "clear_grains_flag", "=", "True", ",", "clear_mine_flag", "=", "True", ...
.. versionchanged:: 2017.7.0 The ``expr_form`` argument has been renamed to ``tgt_type``, earlier releases must use ``expr_form``. Clear the cached pillar, grains, and mine data of the targeted minions CLI Example: .. code-block:: bash salt-run cache.clear_all
[ "..", "versionchanged", "::", "2017", ".", "7", ".", "0", "The", "expr_form", "argument", "has", "been", "renamed", "to", "tgt_type", "earlier", "releases", "must", "use", "expr_form", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/cache.py#L218-L236
train
Clear all cached minions in the specified target 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/runners/cache.py
clear_git_lock
def clear_git_lock(role, remote=None, **kwargs): ''' .. versionadded:: 2015.8.2 Remove the update locks for Salt components (gitfs, git_pillar, winrepo) which use gitfs backend code from salt.utils.gitfs. .. note:: Running :py:func:`cache.clear_all <salt.runners.cache.clear_all>` will ...
python
def clear_git_lock(role, remote=None, **kwargs): ''' .. versionadded:: 2015.8.2 Remove the update locks for Salt components (gitfs, git_pillar, winrepo) which use gitfs backend code from salt.utils.gitfs. .. note:: Running :py:func:`cache.clear_all <salt.runners.cache.clear_all>` will ...
[ "def", "clear_git_lock", "(", "role", ",", "remote", "=", "None", ",", "*", "*", "kwargs", ")", ":", "kwargs", "=", "salt", ".", "utils", ".", "args", ".", "clean_kwargs", "(", "*", "*", "kwargs", ")", "type_", "=", "salt", ".", "utils", ".", "args...
.. versionadded:: 2015.8.2 Remove the update locks for Salt components (gitfs, git_pillar, winrepo) which use gitfs backend code from salt.utils.gitfs. .. note:: Running :py:func:`cache.clear_all <salt.runners.cache.clear_all>` will not include this function as it does for pillar, grains, ...
[ "..", "versionadded", "::", "2015", ".", "8", ".", "2" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/cache.py#L239-L343
train
Remove the git lock for all the git repository remotes.
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/runners/cache.py
cloud
def cloud(tgt, provider=None): ''' Return cloud cache data for target. .. note:: Only works with glob matching tgt Glob Target to match minion ids provider Cloud Provider CLI Example: .. code-block:: bash salt-run cache.cloud 'salt*' salt-run cache.cloud gla...
python
def cloud(tgt, provider=None): ''' Return cloud cache data for target. .. note:: Only works with glob matching tgt Glob Target to match minion ids provider Cloud Provider CLI Example: .. code-block:: bash salt-run cache.cloud 'salt*' salt-run cache.cloud gla...
[ "def", "cloud", "(", "tgt", ",", "provider", "=", "None", ")", ":", "if", "not", "isinstance", "(", "tgt", ",", "six", ".", "string_types", ")", ":", "return", "{", "}", "opts", "=", "salt", ".", "config", ".", "cloud_config", "(", "os", ".", "path...
Return cloud cache data for target. .. note:: Only works with glob matching tgt Glob Target to match minion ids provider Cloud Provider CLI Example: .. code-block:: bash salt-run cache.cloud 'salt*' salt-run cache.cloud glance.example.org provider=openstack
[ "Return", "cloud", "cache", "data", "for", "target", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/cache.py#L346-L385
train
Return cloud cache data for a target
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/runners/cache.py
store
def store(bank, key, data, cachedir=None): ''' Lists entries stored in the specified bank. CLI Example: .. code-block:: bash salt-run cache.store mycache mykey 'The time has come the walrus said' ''' if cachedir is None: cachedir = __opts__['cachedir'] try: cache ...
python
def store(bank, key, data, cachedir=None): ''' Lists entries stored in the specified bank. CLI Example: .. code-block:: bash salt-run cache.store mycache mykey 'The time has come the walrus said' ''' if cachedir is None: cachedir = __opts__['cachedir'] try: cache ...
[ "def", "store", "(", "bank", ",", "key", ",", "data", ",", "cachedir", "=", "None", ")", ":", "if", "cachedir", "is", "None", ":", "cachedir", "=", "__opts__", "[", "'cachedir'", "]", "try", ":", "cache", "=", "salt", ".", "cache", ".", "Cache", "(...
Lists entries stored in the specified bank. CLI Example: .. code-block:: bash salt-run cache.store mycache mykey 'The time has come the walrus said'
[ "Lists", "entries", "stored", "in", "the", "specified", "bank", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/cache.py#L388-L405
train
Stores the specified data in the specified cache bank.
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/runners/cache.py
list_
def list_(bank, cachedir=None): ''' Lists entries stored in the specified bank. CLI Example: .. code-block:: bash salt-run cache.list cloud/active/ec2/myec2 cachedir=/var/cache/salt/ ''' if cachedir is None: cachedir = __opts__['cachedir'] try: cache = salt.cache....
python
def list_(bank, cachedir=None): ''' Lists entries stored in the specified bank. CLI Example: .. code-block:: bash salt-run cache.list cloud/active/ec2/myec2 cachedir=/var/cache/salt/ ''' if cachedir is None: cachedir = __opts__['cachedir'] try: cache = salt.cache....
[ "def", "list_", "(", "bank", ",", "cachedir", "=", "None", ")", ":", "if", "cachedir", "is", "None", ":", "cachedir", "=", "__opts__", "[", "'cachedir'", "]", "try", ":", "cache", "=", "salt", ".", "cache", ".", "Cache", "(", "__opts__", ",", "cached...
Lists entries stored in the specified bank. CLI Example: .. code-block:: bash salt-run cache.list cloud/active/ec2/myec2 cachedir=/var/cache/salt/
[ "Lists", "entries", "stored", "in", "the", "specified", "bank", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/cache.py#L408-L425
train
Lists entries stored in the specified bank.
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/runners/cache.py
fetch
def fetch(bank, key, cachedir=None): ''' Fetch data from a salt.cache bank. CLI Example: .. code-block:: bash salt-run cache.fetch cloud/active/ec2/myec2 myminion cachedir=/var/cache/salt/ ''' if cachedir is None: cachedir = __opts__['cachedir'] try: cache = salt....
python
def fetch(bank, key, cachedir=None): ''' Fetch data from a salt.cache bank. CLI Example: .. code-block:: bash salt-run cache.fetch cloud/active/ec2/myec2 myminion cachedir=/var/cache/salt/ ''' if cachedir is None: cachedir = __opts__['cachedir'] try: cache = salt....
[ "def", "fetch", "(", "bank", ",", "key", ",", "cachedir", "=", "None", ")", ":", "if", "cachedir", "is", "None", ":", "cachedir", "=", "__opts__", "[", "'cachedir'", "]", "try", ":", "cache", "=", "salt", ".", "cache", ".", "Cache", "(", "__opts__", ...
Fetch data from a salt.cache bank. CLI Example: .. code-block:: bash salt-run cache.fetch cloud/active/ec2/myec2 myminion cachedir=/var/cache/salt/
[ "Fetch", "data", "from", "a", "salt", ".", "cache", "bank", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/cache.py#L428-L445
train
Fetch data from a salt. cache bank. CLI Example : bash salt - run cache. fetch cloud. fetch cloud. fetch myec2 myminion
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/queues/pgjsonb_queue.py
_conn
def _conn(commit=False): ''' Return an postgres cursor ''' defaults = {'host': 'localhost', 'user': 'salt', 'password': 'salt', 'dbname': 'salt', 'port': 5432} conn_kwargs = {} for key, value in defaults.items(): conn_kwarg...
python
def _conn(commit=False): ''' Return an postgres cursor ''' defaults = {'host': 'localhost', 'user': 'salt', 'password': 'salt', 'dbname': 'salt', 'port': 5432} conn_kwargs = {} for key, value in defaults.items(): conn_kwarg...
[ "def", "_conn", "(", "commit", "=", "False", ")", ":", "defaults", "=", "{", "'host'", ":", "'localhost'", ",", "'user'", ":", "'salt'", ",", "'password'", ":", "'salt'", ",", "'dbname'", ":", "'salt'", ",", "'port'", ":", "5432", "}", "conn_kwargs", "...
Return an postgres cursor
[ "Return", "an", "postgres", "cursor" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/queues/pgjsonb_queue.py#L72-L105
train
Return an postgres cursor for the sequence of items 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/queues/pgjsonb_queue.py
insert
def insert(queue, items): ''' Add an item or items to a queue ''' handle_queue_creation(queue) with _conn(commit=True) as cur: if isinstance(items, dict): items = salt.utils.json.dumps(items) cmd = str('''INSERT INTO {0}(data) VALUES('{1}')''').format(queue, items) ...
python
def insert(queue, items): ''' Add an item or items to a queue ''' handle_queue_creation(queue) with _conn(commit=True) as cur: if isinstance(items, dict): items = salt.utils.json.dumps(items) cmd = str('''INSERT INTO {0}(data) VALUES('{1}')''').format(queue, items) ...
[ "def", "insert", "(", "queue", ",", "items", ")", ":", "handle_queue_creation", "(", "queue", ")", "with", "_conn", "(", "commit", "=", "True", ")", "as", "cur", ":", "if", "isinstance", "(", "items", ",", "dict", ")", ":", "items", "=", "salt", ".",...
Add an item or items to a queue
[ "Add", "an", "item", "or", "items", "to", "a", "queue" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/queues/pgjsonb_queue.py#L183-L208
train
Insert an item or items to a queue
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/queues/pgjsonb_queue.py
delete
def delete(queue, items): ''' Delete an item or items from a queue ''' with _conn(commit=True) as cur: if isinstance(items, dict): cmd = str("""DELETE FROM {0} WHERE data = '{1}'""").format( # future lint: disable=blacklisted-function queue, salt.util...
python
def delete(queue, items): ''' Delete an item or items from a queue ''' with _conn(commit=True) as cur: if isinstance(items, dict): cmd = str("""DELETE FROM {0} WHERE data = '{1}'""").format( # future lint: disable=blacklisted-function queue, salt.util...
[ "def", "delete", "(", "queue", ",", "items", ")", ":", "with", "_conn", "(", "commit", "=", "True", ")", "as", "cur", ":", "if", "isinstance", "(", "items", ",", "dict", ")", ":", "cmd", "=", "str", "(", "\"\"\"DELETE FROM {0} WHERE data = '{1}'\"\"\"", ...
Delete an item or items from a queue
[ "Delete", "an", "item", "or", "items", "from", "a", "queue" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/queues/pgjsonb_queue.py#L211-L228
train
Delete an item or items from a queue
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/queues/pgjsonb_queue.py
pop
def pop(queue, quantity=1, is_runner=False): ''' Pop one or more or all items from the queue return them. ''' cmd = 'SELECT id, data FROM {0}'.format(queue) if quantity != 'all': try: quantity = int(quantity) except ValueError as exc: error_txt = ('Quantity mu...
python
def pop(queue, quantity=1, is_runner=False): ''' Pop one or more or all items from the queue return them. ''' cmd = 'SELECT id, data FROM {0}'.format(queue) if quantity != 'all': try: quantity = int(quantity) except ValueError as exc: error_txt = ('Quantity mu...
[ "def", "pop", "(", "queue", ",", "quantity", "=", "1", ",", "is_runner", "=", "False", ")", ":", "cmd", "=", "'SELECT id, data FROM {0}'", ".", "format", "(", "queue", ")", "if", "quantity", "!=", "'all'", ":", "try", ":", "quantity", "=", "int", "(", ...
Pop one or more or all items from the queue return them.
[ "Pop", "one", "or", "more", "or", "all", "items", "from", "the", "queue", "return", "them", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/queues/pgjsonb_queue.py#L231-L259
train
Pop one or more items from the queue return them.
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/process.py
daemonize
def daemonize(redirect_out=True): ''' Daemonize a process ''' # Avoid circular import import salt.utils.crypt try: pid = os.fork() if pid > 0: # exit first parent salt.utils.crypt.reinit_crypto() os._exit(salt.defaults.exitcodes.EX_OK) exce...
python
def daemonize(redirect_out=True): ''' Daemonize a process ''' # Avoid circular import import salt.utils.crypt try: pid = os.fork() if pid > 0: # exit first parent salt.utils.crypt.reinit_crypto() os._exit(salt.defaults.exitcodes.EX_OK) exce...
[ "def", "daemonize", "(", "redirect_out", "=", "True", ")", ":", "# Avoid circular import", "import", "salt", ".", "utils", ".", "crypt", "try", ":", "pid", "=", "os", ".", "fork", "(", ")", "if", "pid", ">", "0", ":", "# exit first parent", "salt", ".", ...
Daemonize a process
[ "Daemonize", "a", "process" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/process.py#L63-L110
train
Daemonize a process
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/process.py
daemonize_if
def daemonize_if(opts): ''' Daemonize a module function process if multiprocessing is True and the process is not being called by salt-call ''' if 'salt-call' in sys.argv[0]: return if not opts.get('multiprocessing', True): return if sys.platform.startswith('win'): re...
python
def daemonize_if(opts): ''' Daemonize a module function process if multiprocessing is True and the process is not being called by salt-call ''' if 'salt-call' in sys.argv[0]: return if not opts.get('multiprocessing', True): return if sys.platform.startswith('win'): re...
[ "def", "daemonize_if", "(", "opts", ")", ":", "if", "'salt-call'", "in", "sys", ".", "argv", "[", "0", "]", ":", "return", "if", "not", "opts", ".", "get", "(", "'multiprocessing'", ",", "True", ")", ":", "return", "if", "sys", ".", "platform", ".", ...
Daemonize a module function process if multiprocessing is True and the process is not being called by salt-call
[ "Daemonize", "a", "module", "function", "process", "if", "multiprocessing", "is", "True", "and", "the", "process", "is", "not", "being", "called", "by", "salt", "-", "call" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/process.py#L113-L124
train
Daemonize a module function process if multiprocessing is True
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/process.py
notify_systemd
def notify_systemd(): ''' Notify systemd that this process has started ''' try: import systemd.daemon except ImportError: if salt.utils.path.which('systemd-notify') \ and systemd_notify_call('--booted'): # Notify systemd synchronously notify_so...
python
def notify_systemd(): ''' Notify systemd that this process has started ''' try: import systemd.daemon except ImportError: if salt.utils.path.which('systemd-notify') \ and systemd_notify_call('--booted'): # Notify systemd synchronously notify_so...
[ "def", "notify_systemd", "(", ")", ":", "try", ":", "import", "systemd", ".", "daemon", "except", "ImportError", ":", "if", "salt", ".", "utils", ".", "path", ".", "which", "(", "'systemd-notify'", ")", "and", "systemd_notify_call", "(", "'--booted'", ")", ...
Notify systemd that this process has started
[ "Notify", "systemd", "that", "this", "process", "has", "started" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/process.py#L134-L164
train
Notify systemd that this process has started
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/process.py
set_pidfile
def set_pidfile(pidfile, user): ''' Save the pidfile ''' pdir = os.path.dirname(pidfile) if not os.path.isdir(pdir) and pdir: os.makedirs(pdir) try: with salt.utils.files.fopen(pidfile, 'w+') as ofile: ofile.write(str(os.getpid())) # future lint: disable=blacklisted-...
python
def set_pidfile(pidfile, user): ''' Save the pidfile ''' pdir = os.path.dirname(pidfile) if not os.path.isdir(pdir) and pdir: os.makedirs(pdir) try: with salt.utils.files.fopen(pidfile, 'w+') as ofile: ofile.write(str(os.getpid())) # future lint: disable=blacklisted-...
[ "def", "set_pidfile", "(", "pidfile", ",", "user", ")", ":", "pdir", "=", "os", ".", "path", ".", "dirname", "(", "pidfile", ")", "if", "not", "os", ".", "path", ".", "isdir", "(", "pdir", ")", "and", "pdir", ":", "os", ".", "makedirs", "(", "pdi...
Save the pidfile
[ "Save", "the", "pidfile" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/process.py#L167-L215
train
Save the pidfile to the user s ownership.
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...