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/states/macpackage.py
_mod_run_check
def _mod_run_check(cmd_kwargs, onlyif, unless): ''' Execute the onlyif and unless logic. Return a result dict if: * onlyif failed (onlyif != 0) * unless succeeded (unless == 0) else return True ''' if onlyif: if __salt__['cmd.retcode'](onlyif, **cmd_kwargs) != 0: retu...
python
def _mod_run_check(cmd_kwargs, onlyif, unless): ''' Execute the onlyif and unless logic. Return a result dict if: * onlyif failed (onlyif != 0) * unless succeeded (unless == 0) else return True ''' if onlyif: if __salt__['cmd.retcode'](onlyif, **cmd_kwargs) != 0: retu...
[ "def", "_mod_run_check", "(", "cmd_kwargs", ",", "onlyif", ",", "unless", ")", ":", "if", "onlyif", ":", "if", "__salt__", "[", "'cmd.retcode'", "]", "(", "onlyif", ",", "*", "*", "cmd_kwargs", ")", "!=", "0", ":", "return", "{", "'comment'", ":", "'on...
Execute the onlyif and unless logic. Return a result dict if: * onlyif failed (onlyif != 0) * unless succeeded (unless == 0) else return True
[ "Execute", "the", "onlyif", "and", "unless", "logic", ".", "Return", "a", "result", "dict", "if", ":", "*", "onlyif", "failed", "(", "onlyif", "!", "=", "0", ")", "*", "unless", "succeeded", "(", "unless", "==", "0", ")", "else", "return", "True" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/macpackage.py#L248-L269
train
Execute the onlyif and unless logic.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/rest_service.py
status
def status(name, sig=None): ''' Return the status for a service via rest_sample. If the name contains globbing, a dict mapping service name to True/False values is returned. .. versionadded:: 2015.8.0 .. versionchanged:: 2018.3.0 The service name can now be a glob (e.g. ``salt*``) ...
python
def status(name, sig=None): ''' Return the status for a service via rest_sample. If the name contains globbing, a dict mapping service name to True/False values is returned. .. versionadded:: 2015.8.0 .. versionchanged:: 2018.3.0 The service name can now be a glob (e.g. ``salt*``) ...
[ "def", "status", "(", "name", ",", "sig", "=", "None", ")", ":", "proxy_fn", "=", "'rest_sample.service_status'", "contains_globbing", "=", "bool", "(", "re", ".", "search", "(", "r'\\*|\\?|\\[.+\\]'", ",", "name", ")", ")", "if", "contains_globbing", ":", "...
Return the status for a service via rest_sample. If the name contains globbing, a dict mapping service name to True/False values is returned. .. versionadded:: 2015.8.0 .. versionchanged:: 2018.3.0 The service name can now be a glob (e.g. ``salt*``) Args: name (str): The name of t...
[ "Return", "the", "status", "for", "a", "service", "via", "rest_sample", ".", "If", "the", "name", "contains", "globbing", "a", "dict", "mapping", "service", "name", "to", "True", "/", "False", "values", "is", "returned", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rest_service.py#L128-L169
train
Return the status of a service via rest_sample. service_status
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/schedule.py
clean_proc_dir
def clean_proc_dir(opts): ''' Loop through jid files in the minion proc directory (default /var/cache/salt/minion/proc) and remove any that refer to processes that no longer exist ''' for basefilename in os.listdir(salt.minion.get_proc_dir(opts['cachedir'])): fn_ = os.path.join(salt.minion...
python
def clean_proc_dir(opts): ''' Loop through jid files in the minion proc directory (default /var/cache/salt/minion/proc) and remove any that refer to processes that no longer exist ''' for basefilename in os.listdir(salt.minion.get_proc_dir(opts['cachedir'])): fn_ = os.path.join(salt.minion...
[ "def", "clean_proc_dir", "(", "opts", ")", ":", "for", "basefilename", "in", "os", ".", "listdir", "(", "salt", ".", "minion", ".", "get_proc_dir", "(", "opts", "[", "'cachedir'", "]", ")", ")", ":", "fn_", "=", "os", ".", "path", ".", "join", "(", ...
Loop through jid files in the minion proc directory (default /var/cache/salt/minion/proc) and remove any that refer to processes that no longer exist
[ "Loop", "through", "jid", "files", "in", "the", "minion", "proc", "directory", "(", "default", "/", "var", "/", "cache", "/", "salt", "/", "minion", "/", "proc", ")", "and", "remove", "any", "that", "refer", "to", "processes", "that", "no", "longer", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/schedule.py#L1693-L1733
train
Clean the proc directory and remove any processes that no longer exist.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/schedule.py
Schedule.option
def option(self, opt): ''' Return options merged from config and pillar ''' if 'config.merge' in self.functions: return self.functions['config.merge'](opt, {}, omit_master=True) return self.opts.get(opt, {})
python
def option(self, opt): ''' Return options merged from config and pillar ''' if 'config.merge' in self.functions: return self.functions['config.merge'](opt, {}, omit_master=True) return self.opts.get(opt, {})
[ "def", "option", "(", "self", ",", "opt", ")", ":", "if", "'config.merge'", "in", "self", ".", "functions", ":", "return", "self", ".", "functions", "[", "'config.merge'", "]", "(", "opt", ",", "{", "}", ",", "omit_master", "=", "True", ")", "return", ...
Return options merged from config and pillar
[ "Return", "options", "merged", "from", "config", "and", "pillar" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/schedule.py#L165-L171
train
Return options merged from config and pillar
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/schedule.py
Schedule._get_schedule
def _get_schedule(self, include_opts=True, include_pillar=True, remove_hidden=False): ''' Return the schedule data structure ''' schedule = {} if include_pillar: pillar_schedule = self.opts.get('pillar'...
python
def _get_schedule(self, include_opts=True, include_pillar=True, remove_hidden=False): ''' Return the schedule data structure ''' schedule = {} if include_pillar: pillar_schedule = self.opts.get('pillar'...
[ "def", "_get_schedule", "(", "self", ",", "include_opts", "=", "True", ",", "include_pillar", "=", "True", ",", "remove_hidden", "=", "False", ")", ":", "schedule", "=", "{", "}", "if", "include_pillar", ":", "pillar_schedule", "=", "self", ".", "opts", "....
Return the schedule data structure
[ "Return", "the", "schedule", "data", "structure" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/schedule.py#L173-L199
train
Return the schedule data structure
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/schedule.py
Schedule._check_max_running
def _check_max_running(self, func, data, opts, now): ''' Return the schedule data structure ''' # Check to see if there are other jobs with this # signature running. If there are more than maxrunning # jobs present then don't start another. # If jid_include is Fa...
python
def _check_max_running(self, func, data, opts, now): ''' Return the schedule data structure ''' # Check to see if there are other jobs with this # signature running. If there are more than maxrunning # jobs present then don't start another. # If jid_include is Fa...
[ "def", "_check_max_running", "(", "self", ",", "func", ",", "data", ",", "opts", ",", "now", ")", ":", "# Check to see if there are other jobs with this", "# signature running. If there are more than maxrunning", "# jobs present then don't start another.", "# If jid_include is Fal...
Return the schedule data structure
[ "Return", "the", "schedule", "data", "structure" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/schedule.py#L201-L246
train
Check to see if the job is still running and if so start another job if not
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/schedule.py
Schedule.persist
def persist(self): ''' Persist the modified schedule into <<configdir>>/<<default_include>>/_schedule.conf ''' config_dir = self.opts.get('conf_dir', None) if config_dir is None and 'conf_file' in self.opts: config_dir = os.path.dirname(self.opts['conf_file']) ...
python
def persist(self): ''' Persist the modified schedule into <<configdir>>/<<default_include>>/_schedule.conf ''' config_dir = self.opts.get('conf_dir', None) if config_dir is None and 'conf_file' in self.opts: config_dir = os.path.dirname(self.opts['conf_file']) ...
[ "def", "persist", "(", "self", ")", ":", "config_dir", "=", "self", ".", "opts", ".", "get", "(", "'conf_dir'", ",", "None", ")", "if", "config_dir", "is", "None", "and", "'conf_file'", "in", "self", ".", "opts", ":", "config_dir", "=", "os", ".", "p...
Persist the modified schedule into <<configdir>>/<<default_include>>/_schedule.conf
[ "Persist", "the", "modified", "schedule", "into", "<<configdir", ">>", "/", "<<default_include", ">>", "/", "_schedule", ".", "conf" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/schedule.py#L248-L281
train
Persist the modified schedule into the _schedule. conf file
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/schedule.py
Schedule.delete_job
def delete_job(self, name, persist=True): ''' Deletes a job from the scheduler. Ignore jobs from pillar ''' # ensure job exists, then delete it if name in self.opts['schedule']: del self.opts['schedule'][name] elif name in self._get_schedule(include_opts=False...
python
def delete_job(self, name, persist=True): ''' Deletes a job from the scheduler. Ignore jobs from pillar ''' # ensure job exists, then delete it if name in self.opts['schedule']: del self.opts['schedule'][name] elif name in self._get_schedule(include_opts=False...
[ "def", "delete_job", "(", "self", ",", "name", ",", "persist", "=", "True", ")", ":", "# ensure job exists, then delete it", "if", "name", "in", "self", ".", "opts", "[", "'schedule'", "]", ":", "del", "self", ".", "opts", "[", "'schedule'", "]", "[", "n...
Deletes a job from the scheduler. Ignore jobs from pillar
[ "Deletes", "a", "job", "from", "the", "scheduler", ".", "Ignore", "jobs", "from", "pillar" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/schedule.py#L283-L304
train
Delete a job from the scheduler. Ignore jobs from pillar
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/schedule.py
Schedule.reset
def reset(self): ''' Reset the scheduler to defaults ''' self.skip_function = None self.skip_during_range = None self.enabled = True self.splay = None self.opts['schedule'] = {}
python
def reset(self): ''' Reset the scheduler to defaults ''' self.skip_function = None self.skip_during_range = None self.enabled = True self.splay = None self.opts['schedule'] = {}
[ "def", "reset", "(", "self", ")", ":", "self", ".", "skip_function", "=", "None", "self", ".", "skip_during_range", "=", "None", "self", ".", "enabled", "=", "True", "self", ".", "splay", "=", "None", "self", ".", "opts", "[", "'schedule'", "]", "=", ...
Reset the scheduler to defaults
[ "Reset", "the", "scheduler", "to", "defaults" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/schedule.py#L306-L314
train
Reset the scheduler to defaults
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/schedule.py
Schedule.delete_job_prefix
def delete_job_prefix(self, name, persist=True): ''' Deletes a job from the scheduler. Ignores jobs from pillar ''' # ensure job exists, then delete it for job in list(self.opts['schedule'].keys()): if job.startswith(name): del self.opts['schedule'][jo...
python
def delete_job_prefix(self, name, persist=True): ''' Deletes a job from the scheduler. Ignores jobs from pillar ''' # ensure job exists, then delete it for job in list(self.opts['schedule'].keys()): if job.startswith(name): del self.opts['schedule'][jo...
[ "def", "delete_job_prefix", "(", "self", ",", "name", ",", "persist", "=", "True", ")", ":", "# ensure job exists, then delete it", "for", "job", "in", "list", "(", "self", ".", "opts", "[", "'schedule'", "]", ".", "keys", "(", ")", ")", ":", "if", "job"...
Deletes a job from the scheduler. Ignores jobs from pillar
[ "Deletes", "a", "job", "from", "the", "scheduler", ".", "Ignores", "jobs", "from", "pillar" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/schedule.py#L316-L340
train
Deletes a job from the scheduler. Ignores jobs from pillar
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/schedule.py
Schedule.add_job
def add_job(self, data, persist=True): ''' Adds a new job to the scheduler. The format is the same as required in the configuration file. See the docs on how YAML is interpreted into python data-structures to make sure, you pass correct dictionaries. ''' # we don't do an...
python
def add_job(self, data, persist=True): ''' Adds a new job to the scheduler. The format is the same as required in the configuration file. See the docs on how YAML is interpreted into python data-structures to make sure, you pass correct dictionaries. ''' # we don't do an...
[ "def", "add_job", "(", "self", ",", "data", ",", "persist", "=", "True", ")", ":", "# we don't do any checking here besides making sure its a dict.", "# eval() already does for us and raises errors accordingly", "if", "not", "isinstance", "(", "data", ",", "dict", ")", ":...
Adds a new job to the scheduler. The format is the same as required in the configuration file. See the docs on how YAML is interpreted into python data-structures to make sure, you pass correct dictionaries.
[ "Adds", "a", "new", "job", "to", "the", "scheduler", ".", "The", "format", "is", "the", "same", "as", "required", "in", "the", "configuration", "file", ".", "See", "the", "docs", "on", "how", "YAML", "is", "interpreted", "into", "python", "data", "-", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/schedule.py#L342-L382
train
Adds a new job to the scheduler.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/schedule.py
Schedule.modify_job
def modify_job(self, name, schedule, persist=True): ''' Modify a job in the scheduler. Ignores jobs from pillar ''' # ensure job exists, then replace it if name in self.opts['schedule']: self.delete_job(name, persist) elif name in self._get_schedule(include_op...
python
def modify_job(self, name, schedule, persist=True): ''' Modify a job in the scheduler. Ignores jobs from pillar ''' # ensure job exists, then replace it if name in self.opts['schedule']: self.delete_job(name, persist) elif name in self._get_schedule(include_op...
[ "def", "modify_job", "(", "self", ",", "name", ",", "schedule", ",", "persist", "=", "True", ")", ":", "# ensure job exists, then replace it", "if", "name", "in", "self", ".", "opts", "[", "'schedule'", "]", ":", "self", ".", "delete_job", "(", "name", ","...
Modify a job in the scheduler. Ignores jobs from pillar
[ "Modify", "a", "job", "in", "the", "scheduler", ".", "Ignores", "jobs", "from", "pillar" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/schedule.py#L424-L438
train
Modify a job in the scheduler. Ignores jobs from pillar
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/schedule.py
Schedule.run_job
def run_job(self, name): ''' Run a schedule job now ''' data = self._get_schedule().get(name, {}) if 'function' in data: func = data['function'] elif 'func' in data: func = data['func'] elif 'fun' in data: func = data['fun'] ...
python
def run_job(self, name): ''' Run a schedule job now ''' data = self._get_schedule().get(name, {}) if 'function' in data: func = data['function'] elif 'func' in data: func = data['func'] elif 'fun' in data: func = data['fun'] ...
[ "def", "run_job", "(", "self", ",", "name", ")", ":", "data", "=", "self", ".", "_get_schedule", "(", ")", ".", "get", "(", "name", ",", "{", "}", ")", "if", "'function'", "in", "data", ":", "func", "=", "data", "[", "'function'", "]", "elif", "'...
Run a schedule job now
[ "Run", "a", "schedule", "job", "now" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/schedule.py#L440-L470
train
Run a scheduled job now
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/schedule.py
Schedule.enable_schedule
def enable_schedule(self): ''' Enable the scheduler. ''' self.opts['schedule']['enabled'] = True # Fire the complete event back along with updated list of schedule evt = salt.utils.event.get_event('minion', opts=self.opts, listen=False) evt.fire_event({'complete'...
python
def enable_schedule(self): ''' Enable the scheduler. ''' self.opts['schedule']['enabled'] = True # Fire the complete event back along with updated list of schedule evt = salt.utils.event.get_event('minion', opts=self.opts, listen=False) evt.fire_event({'complete'...
[ "def", "enable_schedule", "(", "self", ")", ":", "self", ".", "opts", "[", "'schedule'", "]", "[", "'enabled'", "]", "=", "True", "# Fire the complete event back along with updated list of schedule", "evt", "=", "salt", ".", "utils", ".", "event", ".", "get_event"...
Enable the scheduler.
[ "Enable", "the", "scheduler", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/schedule.py#L472-L481
train
Enable the scheduler.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/schedule.py
Schedule.reload
def reload(self, schedule): ''' Reload the schedule from saved schedule file. ''' # Remove all jobs from self.intervals self.intervals = {} if 'schedule' in schedule: schedule = schedule['schedule'] self.opts.setdefault('schedule', {}).update(schedule...
python
def reload(self, schedule): ''' Reload the schedule from saved schedule file. ''' # Remove all jobs from self.intervals self.intervals = {} if 'schedule' in schedule: schedule = schedule['schedule'] self.opts.setdefault('schedule', {}).update(schedule...
[ "def", "reload", "(", "self", ",", "schedule", ")", ":", "# Remove all jobs from self.intervals", "self", ".", "intervals", "=", "{", "}", "if", "'schedule'", "in", "schedule", ":", "schedule", "=", "schedule", "[", "'schedule'", "]", "self", ".", "opts", "....
Reload the schedule from saved schedule file.
[ "Reload", "the", "schedule", "from", "saved", "schedule", "file", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/schedule.py#L494-L503
train
Reload the schedule from saved schedule file.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/schedule.py
Schedule.list
def list(self, where): ''' List the current schedule items ''' if where == 'pillar': schedule = self._get_schedule(include_opts=False) elif where == 'opts': schedule = self._get_schedule(include_pillar=False) else: schedule = self._get_...
python
def list(self, where): ''' List the current schedule items ''' if where == 'pillar': schedule = self._get_schedule(include_opts=False) elif where == 'opts': schedule = self._get_schedule(include_pillar=False) else: schedule = self._get_...
[ "def", "list", "(", "self", ",", "where", ")", ":", "if", "where", "==", "'pillar'", ":", "schedule", "=", "self", ".", "_get_schedule", "(", "include_opts", "=", "False", ")", "elif", "where", "==", "'opts'", ":", "schedule", "=", "self", ".", "_get_s...
List the current schedule items
[ "List", "the", "current", "schedule", "items" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/schedule.py#L505-L519
train
List the current schedule items
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/schedule.py
Schedule.save_schedule
def save_schedule(self): ''' Save the current schedule ''' self.persist() # Fire the complete event back along with the list of schedule evt = salt.utils.event.get_event('minion', opts=self.opts, listen=False) evt.fire_event({'complete': True}, ...
python
def save_schedule(self): ''' Save the current schedule ''' self.persist() # Fire the complete event back along with the list of schedule evt = salt.utils.event.get_event('minion', opts=self.opts, listen=False) evt.fire_event({'complete': True}, ...
[ "def", "save_schedule", "(", "self", ")", ":", "self", ".", "persist", "(", ")", "# Fire the complete event back along with the list of schedule", "evt", "=", "salt", ".", "utils", ".", "event", ".", "get_event", "(", "'minion'", ",", "opts", "=", "self", ".", ...
Save the current schedule
[ "Save", "the", "current", "schedule" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/schedule.py#L521-L530
train
Save the current schedule
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/schedule.py
Schedule.skip_job
def skip_job(self, name, data): ''' Skip a job at a specific time in the scheduler. Ignores jobs from pillar ''' time = data['time'] time_fmt = data.get('time_fmt', '%Y-%m-%dT%H:%M:%S') # ensure job exists, then disable it if name in self.opts['schedule']...
python
def skip_job(self, name, data): ''' Skip a job at a specific time in the scheduler. Ignores jobs from pillar ''' time = data['time'] time_fmt = data.get('time_fmt', '%Y-%m-%dT%H:%M:%S') # ensure job exists, then disable it if name in self.opts['schedule']...
[ "def", "skip_job", "(", "self", ",", "name", ",", "data", ")", ":", "time", "=", "data", "[", "'time'", "]", "time_fmt", "=", "data", ".", "get", "(", "'time_fmt'", ",", "'%Y-%m-%dT%H:%M:%S'", ")", "# ensure job exists, then disable it", "if", "name", "in", ...
Skip a job at a specific time in the scheduler. Ignores jobs from pillar
[ "Skip", "a", "job", "at", "a", "specific", "time", "in", "the", "scheduler", ".", "Ignores", "jobs", "from", "pillar" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/schedule.py#L562-L584
train
Skip a job at a specific time in the scheduler.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/schedule.py
Schedule.get_next_fire_time
def get_next_fire_time(self, name, fmt='%Y-%m-%dT%H:%M:%S'): ''' Return the next fire time for the specified job ''' schedule = self._get_schedule() _next_fire_time = None if schedule: _next_fire_time = schedule.get(name, {}).get('_next_fire_time', None) ...
python
def get_next_fire_time(self, name, fmt='%Y-%m-%dT%H:%M:%S'): ''' Return the next fire time for the specified job ''' schedule = self._get_schedule() _next_fire_time = None if schedule: _next_fire_time = schedule.get(name, {}).get('_next_fire_time', None) ...
[ "def", "get_next_fire_time", "(", "self", ",", "name", ",", "fmt", "=", "'%Y-%m-%dT%H:%M:%S'", ")", ":", "schedule", "=", "self", ".", "_get_schedule", "(", ")", "_next_fire_time", "=", "None", "if", "schedule", ":", "_next_fire_time", "=", "schedule", ".", ...
Return the next fire time for the specified job
[ "Return", "the", "next", "fire", "time", "for", "the", "specified", "job" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/schedule.py#L586-L601
train
Return the next fire time for the specified job
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/schedule.py
Schedule.handle_func
def handle_func(self, multiprocessing_enabled, func, data): ''' Execute this method in a multiprocess or thread ''' if salt.utils.platform.is_windows() \ or self.opts.get('transport') == 'zeromq': # Since function references can't be pickled and pickling ...
python
def handle_func(self, multiprocessing_enabled, func, data): ''' Execute this method in a multiprocess or thread ''' if salt.utils.platform.is_windows() \ or self.opts.get('transport') == 'zeromq': # Since function references can't be pickled and pickling ...
[ "def", "handle_func", "(", "self", ",", "multiprocessing_enabled", ",", "func", ",", "data", ")", ":", "if", "salt", ".", "utils", ".", "platform", ".", "is_windows", "(", ")", "or", "self", ".", "opts", ".", "get", "(", "'transport'", ")", "==", "'zer...
Execute this method in a multiprocess or thread
[ "Execute", "this", "method", "in", "a", "multiprocess", "or", "thread" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/schedule.py#L611-L851
train
Execute this method in a multiprocess or thread.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/schedule.py
Schedule.eval
def eval(self, now=None): ''' Evaluate and execute the schedule :param datetime now: Override current time with a datetime object instance`` ''' log.trace('==== evaluating schedule now %s =====', now) loop_interval = self.opts['loop_interval'] if not isinstanc...
python
def eval(self, now=None): ''' Evaluate and execute the schedule :param datetime now: Override current time with a datetime object instance`` ''' log.trace('==== evaluating schedule now %s =====', now) loop_interval = self.opts['loop_interval'] if not isinstanc...
[ "def", "eval", "(", "self", ",", "now", "=", "None", ")", ":", "log", ".", "trace", "(", "'==== evaluating schedule now %s ====='", ",", "now", ")", "loop_interval", "=", "self", ".", "opts", "[", "'loop_interval'", "]", "if", "not", "isinstance", "(", "lo...
Evaluate and execute the schedule :param datetime now: Override current time with a datetime object instance``
[ "Evaluate", "and", "execute", "the", "schedule" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/schedule.py#L853-L1637
train
Evaluate and execute the schedule.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/aws_sqs.py
_run_aws
def _run_aws(cmd, region, opts, user, **kwargs): ''' Runs the given command against AWS. cmd Command to run region Region to execute cmd in opts Pass in from salt user Pass in from salt kwargs Key-value arguments to pass to the command ''' # Th...
python
def _run_aws(cmd, region, opts, user, **kwargs): ''' Runs the given command against AWS. cmd Command to run region Region to execute cmd in opts Pass in from salt user Pass in from salt kwargs Key-value arguments to pass to the command ''' # Th...
[ "def", "_run_aws", "(", "cmd", ",", "region", ",", "opts", ",", "user", ",", "*", "*", "kwargs", ")", ":", "# These args need a specific key value that aren't", "# valid python parameter keys", "receipthandle", "=", "kwargs", ".", "pop", "(", "'receipthandle'", ",",...
Runs the given command against AWS. cmd Command to run region Region to execute cmd in opts Pass in from salt user Pass in from salt kwargs Key-value arguments to pass to the command
[ "Runs", "the", "given", "command", "against", "AWS", ".", "cmd", "Command", "to", "run", "region", "Region", "to", "execute", "cmd", "in", "opts", "Pass", "in", "from", "salt", "user", "Pass", "in", "from", "salt", "kwargs", "Key", "-", "value", "argumen...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aws_sqs.py#L34-L68
train
Runs the given command against AWS and returns the output as a json string
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/aws_sqs.py
receive_message
def receive_message(queue, region, num=1, opts=None, user=None): ''' Receive one or more messages from a queue in a region queue The name of the queue to receive messages from region Region where SQS queues exists num : 1 The max number of messages to receive opts : N...
python
def receive_message(queue, region, num=1, opts=None, user=None): ''' Receive one or more messages from a queue in a region queue The name of the queue to receive messages from region Region where SQS queues exists num : 1 The max number of messages to receive opts : N...
[ "def", "receive_message", "(", "queue", ",", "region", ",", "num", "=", "1", ",", "opts", "=", "None", ",", "user", "=", "None", ")", ":", "ret", "=", "{", "'Messages'", ":", "None", ",", "}", "queues", "=", "list_queues", "(", "region", ",", "opts...
Receive one or more messages from a queue in a region queue The name of the queue to receive messages from region Region where SQS queues exists num : 1 The max number of messages to receive opts : None Any additional options to add to the command line user : Non...
[ "Receive", "one", "or", "more", "messages", "from", "a", "queue", "in", "a", "region" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aws_sqs.py#L71-L112
train
Receive one or more messages from a queue in a region
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/aws_sqs.py
delete_message
def delete_message(queue, region, receipthandle, opts=None, user=None): ''' Delete one or more messages from a queue in a region queue The name of the queue to delete messages from region Region where SQS queues exists receipthandle The ReceiptHandle of the message to dele...
python
def delete_message(queue, region, receipthandle, opts=None, user=None): ''' Delete one or more messages from a queue in a region queue The name of the queue to delete messages from region Region where SQS queues exists receipthandle The ReceiptHandle of the message to dele...
[ "def", "delete_message", "(", "queue", ",", "region", ",", "receipthandle", ",", "opts", "=", "None", ",", "user", "=", "None", ")", ":", "queues", "=", "list_queues", "(", "region", ",", "opts", ",", "user", ")", "url_map", "=", "_parse_queue_list", "("...
Delete one or more messages from a queue in a region queue The name of the queue to delete messages from region Region where SQS queues exists receipthandle The ReceiptHandle of the message to delete. The ReceiptHandle is obtained in the return from receive_message op...
[ "Delete", "one", "or", "more", "messages", "from", "a", "queue", "in", "a", "region" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aws_sqs.py#L115-L152
train
Delete one or more messages from a queue in a region
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/aws_sqs.py
list_queues
def list_queues(region, opts=None, user=None): ''' List the queues in the selected region. region Region to list SQS queues for opts : None Any additional options to add to the command line user : None Run hg as a user other than what the minion runs as CLI Example: ...
python
def list_queues(region, opts=None, user=None): ''' List the queues in the selected region. region Region to list SQS queues for opts : None Any additional options to add to the command line user : None Run hg as a user other than what the minion runs as CLI Example: ...
[ "def", "list_queues", "(", "region", ",", "opts", "=", "None", ",", "user", "=", "None", ")", ":", "out", "=", "_run_aws", "(", "'list-queues'", ",", "region", ",", "opts", ",", "user", ")", "ret", "=", "{", "'retcode'", ":", "0", ",", "'stdout'", ...
List the queues in the selected region. region Region to list SQS queues for opts : None Any additional options to add to the command line user : None Run hg as a user other than what the minion runs as CLI Example: salt '*' aws_sqs.list_queues <region>
[ "List", "the", "queues", "in", "the", "selected", "region", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aws_sqs.py#L155-L179
train
List the SQS queues in the specified region
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/aws_sqs.py
create_queue
def create_queue(name, region, opts=None, user=None): ''' Creates a queue with the correct name. name Name of the SQS queue to create region Region to create the SQS queue in opts : None Any additional options to add to the command line user : None Run hg as a...
python
def create_queue(name, region, opts=None, user=None): ''' Creates a queue with the correct name. name Name of the SQS queue to create region Region to create the SQS queue in opts : None Any additional options to add to the command line user : None Run hg as a...
[ "def", "create_queue", "(", "name", ",", "region", ",", "opts", "=", "None", ",", "user", "=", "None", ")", ":", "create", "=", "{", "'queue-name'", ":", "name", "}", "out", "=", "_run_aws", "(", "'create-queue'", ",", "region", "=", "region", ",", "...
Creates a queue with the correct name. name Name of the SQS queue to create region Region to create the SQS queue in opts : None Any additional options to add to the command line user : None Run hg as a user other than what the minion runs as CLI Example: ...
[ "Creates", "a", "queue", "with", "the", "correct", "name", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aws_sqs.py#L182-L214
train
Create a new SQS queue with the correct name and region
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/aws_sqs.py
delete_queue
def delete_queue(name, region, opts=None, user=None): ''' Deletes a queue in the region. name Name of the SQS queue to deletes region Name of the region to delete the queue from opts : None Any additional options to add to the command line user : None Run hg as...
python
def delete_queue(name, region, opts=None, user=None): ''' Deletes a queue in the region. name Name of the SQS queue to deletes region Name of the region to delete the queue from opts : None Any additional options to add to the command line user : None Run hg as...
[ "def", "delete_queue", "(", "name", ",", "region", ",", "opts", "=", "None", ",", "user", "=", "None", ")", ":", "queues", "=", "list_queues", "(", "region", ",", "opts", ",", "user", ")", "url_map", "=", "_parse_queue_list", "(", "queues", ")", "log",...
Deletes a queue in the region. name Name of the SQS queue to deletes region Name of the region to delete the queue from opts : None Any additional options to add to the command line user : None Run hg as a user other than what the minion runs as CLI Example: ...
[ "Deletes", "a", "queue", "in", "the", "region", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aws_sqs.py#L217-L264
train
Delete a SQS queue in a specific region
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/aws_sqs.py
queue_exists
def queue_exists(name, region, opts=None, user=None): ''' Returns True or False on whether the queue exists in the region name Name of the SQS queue to search for region Name of the region to search for the queue in opts : None Any additional options to add to the command ...
python
def queue_exists(name, region, opts=None, user=None): ''' Returns True or False on whether the queue exists in the region name Name of the SQS queue to search for region Name of the region to search for the queue in opts : None Any additional options to add to the command ...
[ "def", "queue_exists", "(", "name", ",", "region", ",", "opts", "=", "None", ",", "user", "=", "None", ")", ":", "output", "=", "list_queues", "(", "region", ",", "opts", ",", "user", ")", "return", "name", "in", "_parse_queue_list", "(", "output", ")"...
Returns True or False on whether the queue exists in the region name Name of the SQS queue to search for region Name of the region to search for the queue in opts : None Any additional options to add to the command line user : None Run hg as a user other than what the...
[ "Returns", "True", "or", "False", "on", "whether", "the", "queue", "exists", "in", "the", "region" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aws_sqs.py#L267-L290
train
Returns True or False on whether the queue exists in the region
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/aws_sqs.py
_parse_queue_list
def _parse_queue_list(list_output): ''' Parse the queue to get a dict of name -> URL ''' queues = dict((q.split('/')[-1], q) for q in list_output['stdout']) return queues
python
def _parse_queue_list(list_output): ''' Parse the queue to get a dict of name -> URL ''' queues = dict((q.split('/')[-1], q) for q in list_output['stdout']) return queues
[ "def", "_parse_queue_list", "(", "list_output", ")", ":", "queues", "=", "dict", "(", "(", "q", ".", "split", "(", "'/'", ")", "[", "-", "1", "]", ",", "q", ")", "for", "q", "in", "list_output", "[", "'stdout'", "]", ")", "return", "queues" ]
Parse the queue to get a dict of name -> URL
[ "Parse", "the", "queue", "to", "get", "a", "dict", "of", "name", "-", ">", "URL" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aws_sqs.py#L293-L298
train
Parse the queue list to get a dict of name -> URL
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/xen.py
_get_session
def _get_session(): ''' Get a connection to the XenServer host ''' api_version = '1.0' originator = 'salt_cloud_{}_driver'.format(__virtualname__) url = config.get_cloud_config_value( 'url', get_configured_provider(), __opts__, search_global=False ) user =...
python
def _get_session(): ''' Get a connection to the XenServer host ''' api_version = '1.0' originator = 'salt_cloud_{}_driver'.format(__virtualname__) url = config.get_cloud_config_value( 'url', get_configured_provider(), __opts__, search_global=False ) user =...
[ "def", "_get_session", "(", ")", ":", "api_version", "=", "'1.0'", "originator", "=", "'salt_cloud_{}_driver'", ".", "format", "(", "__virtualname__", ")", "url", "=", "config", ".", "get_cloud_config_value", "(", "'url'", ",", "get_configured_provider", "(", ")",...
Get a connection to the XenServer host
[ "Get", "a", "connection", "to", "the", "XenServer", "host" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/xen.py#L131-L181
train
Get a connection to the XenServer host
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/xen.py
list_nodes
def list_nodes(): ''' List virtual machines .. code-block:: bash salt-cloud -Q ''' session = _get_session() vms = session.xenapi.VM.get_all_records() ret = {} for vm in vms: record = session.xenapi.VM.get_record(vm) if not record['is_a_template'] and not re...
python
def list_nodes(): ''' List virtual machines .. code-block:: bash salt-cloud -Q ''' session = _get_session() vms = session.xenapi.VM.get_all_records() ret = {} for vm in vms: record = session.xenapi.VM.get_record(vm) if not record['is_a_template'] and not re...
[ "def", "list_nodes", "(", ")", ":", "session", "=", "_get_session", "(", ")", "vms", "=", "session", ".", "xenapi", ".", "VM", ".", "get_all_records", "(", ")", "ret", "=", "{", "}", "for", "vm", "in", "vms", ":", "record", "=", "session", ".", "xe...
List virtual machines .. code-block:: bash salt-cloud -Q
[ "List", "virtual", "machines" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/xen.py#L184-L214
train
List virtual machines in a single virtual machine.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/xen.py
get_vm_ip
def get_vm_ip(name=None, session=None, call=None): ''' Get the IP address of the VM .. code-block:: bash salt-cloud -a get_vm_ip xenvm01 .. note:: Requires xen guest tools to be installed in VM ''' if call == 'function': raise SaltCloudException( 'This function mu...
python
def get_vm_ip(name=None, session=None, call=None): ''' Get the IP address of the VM .. code-block:: bash salt-cloud -a get_vm_ip xenvm01 .. note:: Requires xen guest tools to be installed in VM ''' if call == 'function': raise SaltCloudException( 'This function mu...
[ "def", "get_vm_ip", "(", "name", "=", "None", ",", "session", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "==", "'function'", ":", "raise", "SaltCloudException", "(", "'This function must be called with -a or --action.'", ")", "if", "session",...
Get the IP address of the VM .. code-block:: bash salt-cloud -a get_vm_ip xenvm01 .. note:: Requires xen guest tools to be installed in VM
[ "Get", "the", "IP", "address", "of", "the", "VM" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/xen.py#L217-L260
train
Get the IP address of the VM
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/xen.py
set_vm_ip
def set_vm_ip(name=None, ipv4_cidr=None, ipv4_gw=None, session=None, call=None): ''' Set the IP address on a virtual interface (vif) ''' mode = 'static' # TODO: Need to add support for IPv6 if call == 'function': raise SaltCloudExc...
python
def set_vm_ip(name=None, ipv4_cidr=None, ipv4_gw=None, session=None, call=None): ''' Set the IP address on a virtual interface (vif) ''' mode = 'static' # TODO: Need to add support for IPv6 if call == 'function': raise SaltCloudExc...
[ "def", "set_vm_ip", "(", "name", "=", "None", ",", "ipv4_cidr", "=", "None", ",", "ipv4_gw", "=", "None", ",", "session", "=", "None", ",", "call", "=", "None", ")", ":", "mode", "=", "'static'", "# TODO: Need to add support for IPv6", "if", "call", "==", ...
Set the IP address on a virtual interface (vif)
[ "Set", "the", "IP", "address", "on", "a", "virtual", "interface", "(", "vif", ")" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/xen.py#L263-L302
train
Set the IP address on a virtual 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/cloud/clouds/xen.py
list_nodes_full
def list_nodes_full(session=None): ''' List full virtual machines .. code-block:: bash salt-cloud -F ''' if session is None: session = _get_session() ret = {} vms = session.xenapi.VM.get_all() for vm in vms: record = session.xenapi.VM.get_record(vm) ...
python
def list_nodes_full(session=None): ''' List full virtual machines .. code-block:: bash salt-cloud -F ''' if session is None: session = _get_session() ret = {} vms = session.xenapi.VM.get_all() for vm in vms: record = session.xenapi.VM.get_record(vm) ...
[ "def", "list_nodes_full", "(", "session", "=", "None", ")", ":", "if", "session", "is", "None", ":", "session", "=", "_get_session", "(", ")", "ret", "=", "{", "}", "vms", "=", "session", ".", "xenapi", ".", "VM", ".", "get_all", "(", ")", "for", "...
List full virtual machines .. code-block:: bash salt-cloud -F
[ "List", "full", "virtual", "machines" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/xen.py#L305-L351
train
List all virtual machines in the current state
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/xen.py
vdi_list
def vdi_list(call=None, kwargs=None): ''' Return available Xen VDI images If this function is called with the ``-f`` or ``--function`` then it can return a list with minimal deatil using the ``terse=True`` keyword argument. .. code-block:: bash salt-cloud -f vdi_list myxen terse=True ...
python
def vdi_list(call=None, kwargs=None): ''' Return available Xen VDI images If this function is called with the ``-f`` or ``--function`` then it can return a list with minimal deatil using the ``terse=True`` keyword argument. .. code-block:: bash salt-cloud -f vdi_list myxen terse=True ...
[ "def", "vdi_list", "(", "call", "=", "None", ",", "kwargs", "=", "None", ")", ":", "if", "call", "==", "'action'", ":", "raise", "SaltCloudException", "(", "'This function must be called with -f or --function.'", ")", "log", ".", "debug", "(", "'kwargs is %s'", ...
Return available Xen VDI images If this function is called with the ``-f`` or ``--function`` then it can return a list with minimal deatil using the ``terse=True`` keyword argument. .. code-block:: bash salt-cloud -f vdi_list myxen terse=True
[ "Return", "available", "Xen", "VDI", "images" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/xen.py#L370-L411
train
Return a list of available Xen VDI images
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/xen.py
template_list
def template_list(call=None): ''' Return available Xen template information. This returns the details of each template to show number cores, memory sizes, etc.. .. code-block:: bash salt-cloud -f template_list myxen ''' templates = {} session = _get_session() vms = session...
python
def template_list(call=None): ''' Return available Xen template information. This returns the details of each template to show number cores, memory sizes, etc.. .. code-block:: bash salt-cloud -f template_list myxen ''' templates = {} session = _get_session() vms = session...
[ "def", "template_list", "(", "call", "=", "None", ")", ":", "templates", "=", "{", "}", "session", "=", "_get_session", "(", ")", "vms", "=", "session", ".", "xenapi", ".", "VM", ".", "get_all", "(", ")", "for", "vm", "in", "vms", ":", "record", "=...
Return available Xen template information. This returns the details of each template to show number cores, memory sizes, etc.. .. code-block:: bash salt-cloud -f template_list myxen
[ "Return", "available", "Xen", "template", "information", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/xen.py#L447-L466
train
Return available Xen template information.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/xen.py
show_instance
def show_instance(name, session=None, call=None): ''' Show information about a specific VM or template .. code-block:: bash salt-cloud -a show_instance xenvm01 .. note:: memory is memory_dynamic_max ''' if call == 'function': raise SaltCloudException( 'The...
python
def show_instance(name, session=None, call=None): ''' Show information about a specific VM or template .. code-block:: bash salt-cloud -a show_instance xenvm01 .. note:: memory is memory_dynamic_max ''' if call == 'function': raise SaltCloudException( 'The...
[ "def", "show_instance", "(", "name", ",", "session", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "==", "'function'", ":", "raise", "SaltCloudException", "(", "'The show_instnce function must be called with -a or --action.'", ")", "log", ".", "de...
Show information about a specific VM or template .. code-block:: bash salt-cloud -a show_instance xenvm01 .. note:: memory is memory_dynamic_max
[ "Show", "information", "about", "a", "specific", "VM", "or", "template" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/xen.py#L469-L511
train
Show information about a specific VM or template.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/xen.py
_determine_resource_pool
def _determine_resource_pool(session, vm_): ''' Called by create() used to determine resource pool ''' resource_pool = '' if 'resource_pool' in vm_.keys(): resource_pool = _get_pool(vm_['resource_pool'], session) else: pool = session.xenapi.pool.get_all() if not pool: ...
python
def _determine_resource_pool(session, vm_): ''' Called by create() used to determine resource pool ''' resource_pool = '' if 'resource_pool' in vm_.keys(): resource_pool = _get_pool(vm_['resource_pool'], session) else: pool = session.xenapi.pool.get_all() if not pool: ...
[ "def", "_determine_resource_pool", "(", "session", ",", "vm_", ")", ":", "resource_pool", "=", "''", "if", "'resource_pool'", "in", "vm_", ".", "keys", "(", ")", ":", "resource_pool", "=", "_get_pool", "(", "vm_", "[", "'resource_pool'", "]", ",", "session",...
Called by create() used to determine resource pool
[ "Called", "by", "create", "()", "used", "to", "determine", "resource", "pool" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/xen.py#L514-L530
train
Called by create to determine resource pool
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/xen.py
_determine_storage_repo
def _determine_storage_repo(session, resource_pool, vm_): ''' Called by create() used to determine storage repo for create ''' storage_repo = '' if 'storage_repo' in vm_.keys(): storage_repo = _get_sr(vm_['storage_repo'], session) else: storage_repo = None if resource_poo...
python
def _determine_storage_repo(session, resource_pool, vm_): ''' Called by create() used to determine storage repo for create ''' storage_repo = '' if 'storage_repo' in vm_.keys(): storage_repo = _get_sr(vm_['storage_repo'], session) else: storage_repo = None if resource_poo...
[ "def", "_determine_storage_repo", "(", "session", ",", "resource_pool", ",", "vm_", ")", ":", "storage_repo", "=", "''", "if", "'storage_repo'", "in", "vm_", ".", "keys", "(", ")", ":", "storage_repo", "=", "_get_sr", "(", "vm_", "[", "'storage_repo'", "]", ...
Called by create() used to determine storage repo for create
[ "Called", "by", "create", "()", "used", "to", "determine", "storage", "repo", "for", "create" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/xen.py#L533-L550
train
Determines the storage repo for the current resource pool.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/xen.py
create
def create(vm_): ''' Create a VM in Xen The configuration for this function is read from the profile settings. .. code-block:: bash salt-cloud -p some_profile xenvm01 ''' name = vm_['name'] record = {} ret = {} # fire creating event __utils__['cloud.fire_event']( ...
python
def create(vm_): ''' Create a VM in Xen The configuration for this function is read from the profile settings. .. code-block:: bash salt-cloud -p some_profile xenvm01 ''' name = vm_['name'] record = {} ret = {} # fire creating event __utils__['cloud.fire_event']( ...
[ "def", "create", "(", "vm_", ")", ":", "name", "=", "vm_", "[", "'name'", "]", "record", "=", "{", "}", "ret", "=", "{", "}", "# fire creating event", "__utils__", "[", "'cloud.fire_event'", "]", "(", "'event'", ",", "'starting create'", ",", "'salt/cloud/...
Create a VM in Xen The configuration for this function is read from the profile settings. .. code-block:: bash salt-cloud -p some_profile xenvm01
[ "Create", "a", "VM", "in", "Xen" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/xen.py#L553-L661
train
Create a VM in Xen
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/xen.py
_deploy_salt_minion
def _deploy_salt_minion(name, session, vm_): ''' Deploy salt minion during create() ''' # Get bootstrap values vm_['ssh_host'] = get_vm_ip(name, session) vm_['user'] = vm_.get('user', 'root') vm_['password'] = vm_.get('password', 'p@ssw0rd!') vm_['provider'] = vm_.get('provider', 'xen') ...
python
def _deploy_salt_minion(name, session, vm_): ''' Deploy salt minion during create() ''' # Get bootstrap values vm_['ssh_host'] = get_vm_ip(name, session) vm_['user'] = vm_.get('user', 'root') vm_['password'] = vm_.get('password', 'p@ssw0rd!') vm_['provider'] = vm_.get('provider', 'xen') ...
[ "def", "_deploy_salt_minion", "(", "name", ",", "session", ",", "vm_", ")", ":", "# Get bootstrap values", "vm_", "[", "'ssh_host'", "]", "=", "get_vm_ip", "(", "name", ",", "session", ")", "vm_", "[", "'user'", "]", "=", "vm_", ".", "get", "(", "'user'"...
Deploy salt minion during create()
[ "Deploy", "salt", "minion", "during", "create", "()" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/xen.py#L664-L678
train
Deploy a salt minion during create
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/xen.py
_set_static_ip
def _set_static_ip(name, session, vm_): ''' Set static IP during create() if defined ''' ipv4_cidr = '' ipv4_gw = '' if 'ipv4_gw' in vm_.keys(): log.debug('ipv4_gw is found in keys') ipv4_gw = vm_['ipv4_gw'] if 'ipv4_cidr' in vm_.keys(): log.debug('ipv4_cidr is found ...
python
def _set_static_ip(name, session, vm_): ''' Set static IP during create() if defined ''' ipv4_cidr = '' ipv4_gw = '' if 'ipv4_gw' in vm_.keys(): log.debug('ipv4_gw is found in keys') ipv4_gw = vm_['ipv4_gw'] if 'ipv4_cidr' in vm_.keys(): log.debug('ipv4_cidr is found ...
[ "def", "_set_static_ip", "(", "name", ",", "session", ",", "vm_", ")", ":", "ipv4_cidr", "=", "''", "ipv4_gw", "=", "''", "if", "'ipv4_gw'", "in", "vm_", ".", "keys", "(", ")", ":", "log", ".", "debug", "(", "'ipv4_gw is found in keys'", ")", "ipv4_gw", ...
Set static IP during create() if defined
[ "Set", "static", "IP", "during", "create", "()", "if", "defined" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/xen.py#L681-L694
train
Set static IP in the VM if it is not already set
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/xen.py
_wait_for_ip
def _wait_for_ip(name, session): ''' Wait for IP to be available during create() ''' start_time = datetime.now() status = None while status is None: status = get_vm_ip(name, session) if status is not None: # ignore APIPA address if status.startswith('169'...
python
def _wait_for_ip(name, session): ''' Wait for IP to be available during create() ''' start_time = datetime.now() status = None while status is None: status = get_vm_ip(name, session) if status is not None: # ignore APIPA address if status.startswith('169'...
[ "def", "_wait_for_ip", "(", "name", ",", "session", ")", ":", "start_time", "=", "datetime", ".", "now", "(", ")", "status", "=", "None", "while", "status", "is", "None", ":", "status", "=", "get_vm_ip", "(", "name", ",", "session", ")", "if", "status"...
Wait for IP to be available during create()
[ "Wait", "for", "IP", "to", "be", "available", "during", "create", "()" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/xen.py#L697-L718
train
Wait for IP to be available during create
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/xen.py
_run_async_task
def _run_async_task(task=None, session=None): ''' Run XenAPI task in asynchronous mode to prevent timeouts ''' if task is None or session is None: return None task_name = session.xenapi.task.get_name_label(task) log.debug('Running %s', task_name) while session.xenapi.task.get_status...
python
def _run_async_task(task=None, session=None): ''' Run XenAPI task in asynchronous mode to prevent timeouts ''' if task is None or session is None: return None task_name = session.xenapi.task.get_name_label(task) log.debug('Running %s', task_name) while session.xenapi.task.get_status...
[ "def", "_run_async_task", "(", "task", "=", "None", ",", "session", "=", "None", ")", ":", "if", "task", "is", "None", "or", "session", "is", "None", ":", "return", "None", "task_name", "=", "session", ".", "xenapi", ".", "task", ".", "get_name_label", ...
Run XenAPI task in asynchronous mode to prevent timeouts
[ "Run", "XenAPI", "task", "in", "asynchronous", "mode", "to", "prevent", "timeouts" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/xen.py#L721-L734
train
Run XenAPI task in asynchronous mode to prevent timeouts
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/xen.py
_clone_vm
def _clone_vm(image=None, name=None, session=None): ''' Create VM by cloning This is faster and should be used if source and target are in the same storage repository ''' if session is None: session = _get_session() log.debug('Creating VM %s by cloning %s', name, image) source ...
python
def _clone_vm(image=None, name=None, session=None): ''' Create VM by cloning This is faster and should be used if source and target are in the same storage repository ''' if session is None: session = _get_session() log.debug('Creating VM %s by cloning %s', name, image) source ...
[ "def", "_clone_vm", "(", "image", "=", "None", ",", "name", "=", "None", ",", "session", "=", "None", ")", ":", "if", "session", "is", "None", ":", "session", "=", "_get_session", "(", ")", "log", ".", "debug", "(", "'Creating VM %s by cloning %s'", ",",...
Create VM by cloning This is faster and should be used if source and target are in the same storage repository
[ "Create", "VM", "by", "cloning" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/xen.py#L737-L750
train
Create VM by cloning the source VM and then cloning the target VM
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/xen.py
_copy_vm
def _copy_vm(template=None, name=None, session=None, sr=None): ''' Create VM by copy This is slower and should be used if source and target are NOT in the same storage repository template = object reference name = string name of new VM session = object reference sr = object reference ...
python
def _copy_vm(template=None, name=None, session=None, sr=None): ''' Create VM by copy This is slower and should be used if source and target are NOT in the same storage repository template = object reference name = string name of new VM session = object reference sr = object reference ...
[ "def", "_copy_vm", "(", "template", "=", "None", ",", "name", "=", "None", ",", "session", "=", "None", ",", "sr", "=", "None", ")", ":", "if", "session", "is", "None", ":", "session", "=", "_get_session", "(", ")", "log", ".", "debug", "(", "'Crea...
Create VM by copy This is slower and should be used if source and target are NOT in the same storage repository template = object reference name = string name of new VM session = object reference sr = object reference
[ "Create", "VM", "by", "copy" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/xen.py#L753-L770
train
Create VM by copying a template VM
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/xen.py
_provision_vm
def _provision_vm(name=None, session=None): ''' Provision vm right after clone/copy ''' if session is None: session = _get_session() log.info('Provisioning VM %s', name) vm = _get_vm(name, session) task = session.xenapi.Async.VM.provision(vm) _run_async_task(task, session)
python
def _provision_vm(name=None, session=None): ''' Provision vm right after clone/copy ''' if session is None: session = _get_session() log.info('Provisioning VM %s', name) vm = _get_vm(name, session) task = session.xenapi.Async.VM.provision(vm) _run_async_task(task, session)
[ "def", "_provision_vm", "(", "name", "=", "None", ",", "session", "=", "None", ")", ":", "if", "session", "is", "None", ":", "session", "=", "_get_session", "(", ")", "log", ".", "info", "(", "'Provisioning VM %s'", ",", "name", ")", "vm", "=", "_get_v...
Provision vm right after clone/copy
[ "Provision", "vm", "right", "after", "clone", "/", "copy" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/xen.py#L773-L782
train
Provision vm right after clone or copy
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/xen.py
unpause
def unpause(name, call=None, session=None): ''' UnPause a vm .. code-block:: bash salt-cloud -a unpause xenvm01 ''' if call == 'function': raise SaltCloudException( 'The show_instnce function must be called with -a or --action.' ) if session is None: ...
python
def unpause(name, call=None, session=None): ''' UnPause a vm .. code-block:: bash salt-cloud -a unpause xenvm01 ''' if call == 'function': raise SaltCloudException( 'The show_instnce function must be called with -a or --action.' ) if session is None: ...
[ "def", "unpause", "(", "name", ",", "call", "=", "None", ",", "session", "=", "None", ")", ":", "if", "call", "==", "'function'", ":", "raise", "SaltCloudException", "(", "'The show_instnce function must be called with -a or --action.'", ")", "if", "session", "is"...
UnPause a vm .. code-block:: bash salt-cloud -a unpause xenvm01
[ "UnPause", "a", "vm" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/xen.py#L829-L848
train
Unpause a VM
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/xen.py
resume
def resume(name, call=None, session=None): ''' Resume a vm from disk .. code-block:: bash salt-cloud -a resume xenvm01 ''' if call == 'function': raise SaltCloudException( 'The show_instnce function must be called with -a or --action.' ) if session is None:...
python
def resume(name, call=None, session=None): ''' Resume a vm from disk .. code-block:: bash salt-cloud -a resume xenvm01 ''' if call == 'function': raise SaltCloudException( 'The show_instnce function must be called with -a or --action.' ) if session is None:...
[ "def", "resume", "(", "name", ",", "call", "=", "None", ",", "session", "=", "None", ")", ":", "if", "call", "==", "'function'", ":", "raise", "SaltCloudException", "(", "'The show_instnce function must be called with -a or --action.'", ")", "if", "session", "is",...
Resume a vm from disk .. code-block:: bash salt-cloud -a resume xenvm01
[ "Resume", "a", "vm", "from", "disk" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/xen.py#L873-L892
train
Resume a VM from disk
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/xen.py
stop
def stop(name, call=None, session=None): ''' Stop a vm .. code-block:: bash salt-cloud -a stop xenvm01 ''' if call == 'function': raise SaltCloudException( 'The show_instnce function must be called with -a or --action.' ) return shutdown(name, call, sessio...
python
def stop(name, call=None, session=None): ''' Stop a vm .. code-block:: bash salt-cloud -a stop xenvm01 ''' if call == 'function': raise SaltCloudException( 'The show_instnce function must be called with -a or --action.' ) return shutdown(name, call, sessio...
[ "def", "stop", "(", "name", ",", "call", "=", "None", ",", "session", "=", "None", ")", ":", "if", "call", "==", "'function'", ":", "raise", "SaltCloudException", "(", "'The show_instnce function must be called with -a or --action.'", ")", "return", "shutdown", "(...
Stop a vm .. code-block:: bash salt-cloud -a stop xenvm01
[ "Stop", "a", "vm" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/xen.py#L895-L909
train
Stop a VM and all its children
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/xen.py
reboot
def reboot(name, call=None, session=None): ''' Reboot a vm .. code-block:: bash salt-cloud -a reboot xenvm01 ''' if call == 'function': raise SaltCloudException( 'The show_instnce function must be called with -a or --action.' ) if session is None: s...
python
def reboot(name, call=None, session=None): ''' Reboot a vm .. code-block:: bash salt-cloud -a reboot xenvm01 ''' if call == 'function': raise SaltCloudException( 'The show_instnce function must be called with -a or --action.' ) if session is None: s...
[ "def", "reboot", "(", "name", ",", "call", "=", "None", ",", "session", "=", "None", ")", ":", "if", "call", "==", "'function'", ":", "raise", "SaltCloudException", "(", "'The show_instnce function must be called with -a or --action.'", ")", "if", "session", "is",...
Reboot a vm .. code-block:: bash salt-cloud -a reboot xenvm01
[ "Reboot", "a", "vm" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/xen.py#L934-L957
train
Reboot a VM
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/xen.py
_get_vm
def _get_vm(name=None, session=None): ''' Get XEN vm instance object reference ''' if session is None: session = _get_session() vms = session.xenapi.VM.get_by_name_label(name) if len(vms) == 1: return vms[0] return None
python
def _get_vm(name=None, session=None): ''' Get XEN vm instance object reference ''' if session is None: session = _get_session() vms = session.xenapi.VM.get_by_name_label(name) if len(vms) == 1: return vms[0] return None
[ "def", "_get_vm", "(", "name", "=", "None", ",", "session", "=", "None", ")", ":", "if", "session", "is", "None", ":", "session", "=", "_get_session", "(", ")", "vms", "=", "session", ".", "xenapi", ".", "VM", ".", "get_by_name_label", "(", "name", "...
Get XEN vm instance object reference
[ "Get", "XEN", "vm", "instance", "object", "reference" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/xen.py#L960-L969
train
Get XEN vm instance object reference
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/xen.py
_get_sr
def _get_sr(name=None, session=None): ''' Get XEN sr (storage repo) object reference ''' if session is None: session = _get_session() srs = session.xenapi.SR.get_by_name_label(name) if len(srs) == 1: return srs[0] return None
python
def _get_sr(name=None, session=None): ''' Get XEN sr (storage repo) object reference ''' if session is None: session = _get_session() srs = session.xenapi.SR.get_by_name_label(name) if len(srs) == 1: return srs[0] return None
[ "def", "_get_sr", "(", "name", "=", "None", ",", "session", "=", "None", ")", ":", "if", "session", "is", "None", ":", "session", "=", "_get_session", "(", ")", "srs", "=", "session", ".", "xenapi", ".", "SR", ".", "get_by_name_label", "(", "name", "...
Get XEN sr (storage repo) object reference
[ "Get", "XEN", "sr", "(", "storage", "repo", ")", "object", "reference" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/xen.py#L972-L981
train
Get XEN sr object reference
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/xen.py
_get_pool
def _get_pool(name=None, session=None): ''' Get XEN resource pool object reference ''' if session is None: session = _get_session() pools = session.xenapi.pool.get_all() for pool in pools: pool_record = session.xenapi.pool.get_record(pool) if name in pool_record.get('name...
python
def _get_pool(name=None, session=None): ''' Get XEN resource pool object reference ''' if session is None: session = _get_session() pools = session.xenapi.pool.get_all() for pool in pools: pool_record = session.xenapi.pool.get_record(pool) if name in pool_record.get('name...
[ "def", "_get_pool", "(", "name", "=", "None", ",", "session", "=", "None", ")", ":", "if", "session", "is", "None", ":", "session", "=", "_get_session", "(", ")", "pools", "=", "session", ".", "xenapi", ".", "pool", ".", "get_all", "(", ")", "for", ...
Get XEN resource pool object reference
[ "Get", "XEN", "resource", "pool", "object", "reference" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/xen.py#L984-L995
train
Get XEN resource pool object reference
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/xen.py
destroy
def destroy(name=None, call=None): ''' Destroy Xen VM or template instance .. code-block:: bash salt-cloud -d xenvm01 ''' if call == 'function': raise SaltCloudSystemExit( 'The destroy action must be called with -d, --destroy, ' '-a or --action.' ) ...
python
def destroy(name=None, call=None): ''' Destroy Xen VM or template instance .. code-block:: bash salt-cloud -d xenvm01 ''' if call == 'function': raise SaltCloudSystemExit( 'The destroy action must be called with -d, --destroy, ' '-a or --action.' ) ...
[ "def", "destroy", "(", "name", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "==", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The destroy action must be called with -d, --destroy, '", "'-a or --action.'", ")", "ret", "=", "{", "}", ...
Destroy Xen VM or template instance .. code-block:: bash salt-cloud -d xenvm01
[ "Destroy", "Xen", "VM", "or", "template", "instance" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/xen.py#L998-L1053
train
Destroy an Xen VM or template instance.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/xen.py
sr_list
def sr_list(call=None): ''' Geta list of storage repositories .. code-block:: bash salt-cloud -f sr_list myxen ''' if call != 'function': raise SaltCloudSystemExit( 'This function must be called with -f, --function argument.' ) ret = {} session = _get_s...
python
def sr_list(call=None): ''' Geta list of storage repositories .. code-block:: bash salt-cloud -f sr_list myxen ''' if call != 'function': raise SaltCloudSystemExit( 'This function must be called with -f, --function argument.' ) ret = {} session = _get_s...
[ "def", "sr_list", "(", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'This function must be called with -f, --function argument.'", ")", "ret", "=", "{", "}", "session", "=", "_get_session", "(", ")", ...
Geta list of storage repositories .. code-block:: bash salt-cloud -f sr_list myxen
[ "Geta", "list", "of", "storage", "repositories" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/xen.py#L1056-L1075
train
Return a list of storage 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/cloud/clouds/xen.py
host_list
def host_list(call=None): ''' Get a list of Xen Servers .. code-block:: bash salt-cloud -f host_list myxen ''' if call == 'action': raise SaltCloudSystemExit( 'This function must be called with -f, --function argument.' ) ret = {} session = _get_session(...
python
def host_list(call=None): ''' Get a list of Xen Servers .. code-block:: bash salt-cloud -f host_list myxen ''' if call == 'action': raise SaltCloudSystemExit( 'This function must be called with -f, --function argument.' ) ret = {} session = _get_session(...
[ "def", "host_list", "(", "call", "=", "None", ")", ":", "if", "call", "==", "'action'", ":", "raise", "SaltCloudSystemExit", "(", "'This function must be called with -f, --function argument.'", ")", "ret", "=", "{", "}", "session", "=", "_get_session", "(", ")", ...
Get a list of Xen Servers .. code-block:: bash salt-cloud -f host_list myxen
[ "Get", "a", "list", "of", "Xen", "Servers" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/xen.py#L1078-L1096
train
Return a list of Xen Servers in this VMware environment
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/xen.py
pool_list
def pool_list(call=None): ''' Get a list of Resource Pools .. code-block:: bash salt-cloud -f pool_list myxen ''' if call == 'action': raise SaltCloudSystemExit( 'This function must be called with -f, --function argument.' ) ret = {} session = _get_sess...
python
def pool_list(call=None): ''' Get a list of Resource Pools .. code-block:: bash salt-cloud -f pool_list myxen ''' if call == 'action': raise SaltCloudSystemExit( 'This function must be called with -f, --function argument.' ) ret = {} session = _get_sess...
[ "def", "pool_list", "(", "call", "=", "None", ")", ":", "if", "call", "==", "'action'", ":", "raise", "SaltCloudSystemExit", "(", "'This function must be called with -f, --function argument.'", ")", "ret", "=", "{", "}", "session", "=", "_get_session", "(", ")", ...
Get a list of Resource Pools .. code-block:: bash salt-cloud -f pool_list myxen
[ "Get", "a", "list", "of", "Resource", "Pools" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/xen.py#L1099-L1118
train
Return a list of Resource Pools
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/xen.py
pif_list
def pif_list(call=None): ''' Get a list of Resource Pools .. code-block:: bash salt-cloud -f pool_list myxen ''' if call != 'function': raise SaltCloudSystemExit( 'This function must be called with -f, --function argument.' ) ret = {} session = _get_sess...
python
def pif_list(call=None): ''' Get a list of Resource Pools .. code-block:: bash salt-cloud -f pool_list myxen ''' if call != 'function': raise SaltCloudSystemExit( 'This function must be called with -f, --function argument.' ) ret = {} session = _get_sess...
[ "def", "pif_list", "(", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'This function must be called with -f, --function argument.'", ")", "ret", "=", "{", "}", "session", "=", "_get_session", "(", ")", ...
Get a list of Resource Pools .. code-block:: bash salt-cloud -f pool_list myxen
[ "Get", "a", "list", "of", "Resource", "Pools" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/xen.py#L1121-L1139
train
Return a list of Resource Pools
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/xen.py
vif_list
def vif_list(name, call=None, kwargs=None): ''' Get a list of virtual network interfaces on a VM **requires**: the name of the vm with the vbd definition .. code-block:: bash salt-cloud -a vif_list xenvm01 ''' if call == 'function': raise SaltCloudSystemExit( 'Th...
python
def vif_list(name, call=None, kwargs=None): ''' Get a list of virtual network interfaces on a VM **requires**: the name of the vm with the vbd definition .. code-block:: bash salt-cloud -a vif_list xenvm01 ''' if call == 'function': raise SaltCloudSystemExit( 'Th...
[ "def", "vif_list", "(", "name", ",", "call", "=", "None", ",", "kwargs", "=", "None", ")", ":", "if", "call", "==", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'This function must be called with -a, --action argument.'", ")", "if", "name", "is", "No...
Get a list of virtual network interfaces on a VM **requires**: the name of the vm with the vbd definition .. code-block:: bash salt-cloud -a vif_list xenvm01
[ "Get", "a", "list", "of", "virtual", "network", "interfaces", "on", "a", "VM" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/xen.py#L1142-L1171
train
Return a list of virtual network interfaces on a VM
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/xen.py
vbd_list
def vbd_list(name=None, call=None): ''' Get a list of VBDs on a VM **requires**: the name of the vm with the vbd definition .. code-block:: bash salt-cloud -a vbd_list xenvm01 ''' if call == 'function': raise SaltCloudSystemExit( 'This function must be called with...
python
def vbd_list(name=None, call=None): ''' Get a list of VBDs on a VM **requires**: the name of the vm with the vbd definition .. code-block:: bash salt-cloud -a vbd_list xenvm01 ''' if call == 'function': raise SaltCloudSystemExit( 'This function must be called with...
[ "def", "vbd_list", "(", "name", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "==", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'This function must be called with -a, --action argument.'", ")", "if", "name", "is", "None", ":", "retu...
Get a list of VBDs on a VM **requires**: the name of the vm with the vbd definition .. code-block:: bash salt-cloud -a vbd_list xenvm01
[ "Get", "a", "list", "of", "VBDs", "on", "a", "VM" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/xen.py#L1174-L1205
train
Return a list of VBDs on a VM
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/xen.py
destroy_vm_vdis
def destroy_vm_vdis(name=None, session=None, call=None): ''' Get virtual block devices on VM .. code-block:: bash salt-cloud -a destroy_vm_vdis xenvm01 ''' if session is None: session = _get_session() ret = {} # get vm object vms = session.xenapi.VM.get_by_name_label(...
python
def destroy_vm_vdis(name=None, session=None, call=None): ''' Get virtual block devices on VM .. code-block:: bash salt-cloud -a destroy_vm_vdis xenvm01 ''' if session is None: session = _get_session() ret = {} # get vm object vms = session.xenapi.VM.get_by_name_label(...
[ "def", "destroy_vm_vdis", "(", "name", "=", "None", ",", "session", "=", "None", ",", "call", "=", "None", ")", ":", "if", "session", "is", "None", ":", "session", "=", "_get_session", "(", ")", "ret", "=", "{", "}", "# get vm object", "vms", "=", "s...
Get virtual block devices on VM .. code-block:: bash salt-cloud -a destroy_vm_vdis xenvm01
[ "Get", "virtual", "block", "devices", "on", "VM" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/xen.py#L1227-L1256
train
Destroy virtual block devices on VM
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/xen.py
destroy_template
def destroy_template(name=None, call=None, kwargs=None): ''' Destroy Xen VM or template instance .. code-block:: bash salt-cloud -f destroy_template myxen name=testvm2 ''' if call == 'action': raise SaltCloudSystemExit( 'The destroy_template function must be ca...
python
def destroy_template(name=None, call=None, kwargs=None): ''' Destroy Xen VM or template instance .. code-block:: bash salt-cloud -f destroy_template myxen name=testvm2 ''' if call == 'action': raise SaltCloudSystemExit( 'The destroy_template function must be ca...
[ "def", "destroy_template", "(", "name", "=", "None", ",", "call", "=", "None", ",", "kwargs", "=", "None", ")", ":", "if", "call", "==", "'action'", ":", "raise", "SaltCloudSystemExit", "(", "'The destroy_template function must be called with -f.'", ")", "if", ...
Destroy Xen VM or template instance .. code-block:: bash salt-cloud -f destroy_template myxen name=testvm2
[ "Destroy", "Xen", "VM", "or", "template", "instance" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/xen.py#L1259-L1289
train
Destroys a specific Xen VM or template instance.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/xen.py
get_pv_args
def get_pv_args(name, session=None, call=None): ''' Get PV arguments for a VM .. code-block:: bash salt-cloud -a get_pv_args xenvm01 ''' if call == 'function': raise SaltCloudException( 'This function must be called with -a or --action.' ) if session is Non...
python
def get_pv_args(name, session=None, call=None): ''' Get PV arguments for a VM .. code-block:: bash salt-cloud -a get_pv_args xenvm01 ''' if call == 'function': raise SaltCloudException( 'This function must be called with -a or --action.' ) if session is Non...
[ "def", "get_pv_args", "(", "name", ",", "session", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "==", "'function'", ":", "raise", "SaltCloudException", "(", "'This function must be called with -a or --action.'", ")", "if", "session", "is", "Non...
Get PV arguments for a VM .. code-block:: bash salt-cloud -a get_pv_args xenvm01
[ "Get", "PV", "arguments", "for", "a", "VM" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/xen.py#L1292-L1312
train
Get the PV arguments for a VM
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/xen.py
set_pv_args
def set_pv_args(name, kwargs=None, session=None, call=None): ''' Set PV arguments for a VM .. code-block:: bash salt-cloud -a set_pv_args xenvm01 pv_args="utf-8 graphical" ''' if call == 'function': raise SaltCloudException( 'This function must be called with -a or --a...
python
def set_pv_args(name, kwargs=None, session=None, call=None): ''' Set PV arguments for a VM .. code-block:: bash salt-cloud -a set_pv_args xenvm01 pv_args="utf-8 graphical" ''' if call == 'function': raise SaltCloudException( 'This function must be called with -a or --a...
[ "def", "set_pv_args", "(", "name", ",", "kwargs", "=", "None", ",", "session", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "==", "'function'", ":", "raise", "SaltCloudException", "(", "'This function must be called with -a or --action.'", ")",...
Set PV arguments for a VM .. code-block:: bash salt-cloud -a set_pv_args xenvm01 pv_args="utf-8 graphical"
[ "Set", "PV", "arguments", "for", "a", "VM" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/xen.py#L1315-L1341
train
Set PV arguments for a VM
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/mac_service.py
_name_in_services
def _name_in_services(name, services): ''' Checks to see if the given service is in the given services. :param str name: Service label, file name, or full path :param dict services: The currently available services. :return: The service information for the service, otherwise an empty dictiona...
python
def _name_in_services(name, services): ''' Checks to see if the given service is in the given services. :param str name: Service label, file name, or full path :param dict services: The currently available services. :return: The service information for the service, otherwise an empty dictiona...
[ "def", "_name_in_services", "(", "name", ",", "services", ")", ":", "if", "name", "in", "services", ":", "# Match on label", "return", "services", "[", "name", "]", "for", "service", "in", "six", ".", "itervalues", "(", "services", ")", ":", "if", "service...
Checks to see if the given service is in the given services. :param str name: Service label, file name, or full path :param dict services: The currently available services. :return: The service information for the service, otherwise an empty dictionary :rtype: dict
[ "Checks", "to", "see", "if", "the", "given", "service", "is", "in", "the", "given", "services", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/mac_service.py#L76-L102
train
Checks to see if the given service is in the given 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/modules/mac_service.py
_get_service
def _get_service(name): ''' Get information about a service. If the service is not found, raise an error :param str name: Service label, file name, or full path :return: The service information for the service, otherwise an Error :rtype: dict ''' services = __utils__['mac_utils.availa...
python
def _get_service(name): ''' Get information about a service. If the service is not found, raise an error :param str name: Service label, file name, or full path :return: The service information for the service, otherwise an Error :rtype: dict ''' services = __utils__['mac_utils.availa...
[ "def", "_get_service", "(", "name", ")", ":", "services", "=", "__utils__", "[", "'mac_utils.available_services'", "]", "(", ")", "name", "=", "name", ".", "lower", "(", ")", "service", "=", "_name_in_services", "(", "name", ",", "services", ")", "# if we wo...
Get information about a service. If the service is not found, raise an error :param str name: Service label, file name, or full path :return: The service information for the service, otherwise an Error :rtype: dict
[ "Get", "information", "about", "a", "service", ".", "If", "the", "service", "is", "not", "found", "raise", "an", "error" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/mac_service.py#L105-L145
train
Get information about a service.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/mac_service.py
_always_running_service
def _always_running_service(name): ''' Check if the service should always be running based on the KeepAlive Key in the service plist. :param str name: Service label, file name, or full path :return: True if the KeepAlive key is set to True, False if set to False or not set in the plist at ...
python
def _always_running_service(name): ''' Check if the service should always be running based on the KeepAlive Key in the service plist. :param str name: Service label, file name, or full path :return: True if the KeepAlive key is set to True, False if set to False or not set in the plist at ...
[ "def", "_always_running_service", "(", "name", ")", ":", "# get all the info from the launchctl service", "service_info", "=", "show", "(", "name", ")", "# get the value for the KeepAlive key in service plist", "try", ":", "keep_alive", "=", "service_info", "[", "'plist'", ...
Check if the service should always be running based on the KeepAlive Key in the service plist. :param str name: Service label, file name, or full path :return: True if the KeepAlive key is set to True, False if set to False or not set in the plist at all. :rtype: bool .. versionadded:: 2...
[ "Check", "if", "the", "service", "should", "always", "be", "running", "based", "on", "the", "KeepAlive", "Key", "in", "the", "service", "plist", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/mac_service.py#L148-L185
train
Check if the service should always be running based on the KeepAlive key in the service plist.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/mac_service.py
_get_domain_target
def _get_domain_target(name, service_target=False): ''' Returns the domain/service target and path for a service. This is used to determine whether or not a service should be loaded in a user space or system space. :param str name: Service label, file name, or full path :param bool service_tar...
python
def _get_domain_target(name, service_target=False): ''' Returns the domain/service target and path for a service. This is used to determine whether or not a service should be loaded in a user space or system space. :param str name: Service label, file name, or full path :param bool service_tar...
[ "def", "_get_domain_target", "(", "name", ",", "service_target", "=", "False", ")", ":", "# Get service information", "service", "=", "_get_service", "(", "name", ")", "# get the path to the service", "path", "=", "service", "[", "'file_path'", "]", "# most of the tim...
Returns the domain/service target and path for a service. This is used to determine whether or not a service should be loaded in a user space or system space. :param str name: Service label, file name, or full path :param bool service_target: Whether to return a full service target. This is needed...
[ "Returns", "the", "domain", "/", "service", "target", "and", "path", "for", "a", "service", ".", "This", "is", "used", "to", "determine", "whether", "or", "not", "a", "service", "should", "be", "loaded", "in", "a", "user", "space", "or", "system", "space...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/mac_service.py#L188-L226
train
Returns the domain target and path for a service.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/mac_service.py
list_
def list_(name=None, runas=None): ''' Run launchctl list and return the output :param str name: The name of the service to list :param str runas: User to run launchctl commands :return: If a name is passed returns information about the named service, otherwise returns a list of all servic...
python
def list_(name=None, runas=None): ''' Run launchctl list and return the output :param str name: The name of the service to list :param str runas: User to run launchctl commands :return: If a name is passed returns information about the named service, otherwise returns a list of all servic...
[ "def", "list_", "(", "name", "=", "None", ",", "runas", "=", "None", ")", ":", "if", "name", ":", "# Get service information and label", "service", "=", "_get_service", "(", "name", ")", "label", "=", "service", "[", "'plist'", "]", "[", "'Label'", "]", ...
Run launchctl list and return the output :param str name: The name of the service to list :param str runas: User to run launchctl commands :return: If a name is passed returns information about the named service, otherwise returns a list of all services and pids :rtype: str CLI Example: ...
[ "Run", "launchctl", "list", "and", "return", "the", "output" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/mac_service.py#L298-L336
train
List the services and pids of a service.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/mac_service.py
enable
def enable(name, runas=None): ''' Enable a launchd service. Raises an error if the service fails to be enabled :param str name: Service label, file name, or full path :param str runas: User to run launchctl commands :return: ``True`` if successful or if the service is already enabled :rtype: ...
python
def enable(name, runas=None): ''' Enable a launchd service. Raises an error if the service fails to be enabled :param str name: Service label, file name, or full path :param str runas: User to run launchctl commands :return: ``True`` if successful or if the service is already enabled :rtype: ...
[ "def", "enable", "(", "name", ",", "runas", "=", "None", ")", ":", "# Get the domain target. enable requires a full <service-target>", "service_target", "=", "_get_domain_target", "(", "name", ",", "service_target", "=", "True", ")", "[", "0", "]", "# Enable the servi...
Enable a launchd service. Raises an error if the service fails to be enabled :param str name: Service label, file name, or full path :param str runas: User to run launchctl commands :return: ``True`` if successful or if the service is already enabled :rtype: bool CLI Example: .. code-block:...
[ "Enable", "a", "launchd", "service", ".", "Raises", "an", "error", "if", "the", "service", "fails", "to", "be", "enabled" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/mac_service.py#L339-L360
train
Enable a launchd service.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/mac_service.py
disable
def disable(name, runas=None): ''' Disable a launchd service. Raises an error if the service fails to be disabled :param str name: Service label, file name, or full path :param str runas: User to run launchctl commands :return: ``True`` if successful or if the service is already disabled ...
python
def disable(name, runas=None): ''' Disable a launchd service. Raises an error if the service fails to be disabled :param str name: Service label, file name, or full path :param str runas: User to run launchctl commands :return: ``True`` if successful or if the service is already disabled ...
[ "def", "disable", "(", "name", ",", "runas", "=", "None", ")", ":", "# Get the service target. enable requires a full <service-target>", "service_target", "=", "_get_domain_target", "(", "name", ",", "service_target", "=", "True", ")", "[", "0", "]", "# disable the se...
Disable a launchd service. Raises an error if the service fails to be disabled :param str name: Service label, file name, or full path :param str runas: User to run launchctl commands :return: ``True`` if successful or if the service is already disabled :rtype: bool CLI Example: .. code...
[ "Disable", "a", "launchd", "service", ".", "Raises", "an", "error", "if", "the", "service", "fails", "to", "be", "disabled" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/mac_service.py#L363-L385
train
Disable a launchd service.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/mac_service.py
start
def start(name, runas=None): ''' Start a launchd service. Raises an error if the service fails to start .. note:: To start a service in macOS the service must be enabled first. Use ``service.enable`` to enable the service. :param str name: Service label, file name, or full path :...
python
def start(name, runas=None): ''' Start a launchd service. Raises an error if the service fails to start .. note:: To start a service in macOS the service must be enabled first. Use ``service.enable`` to enable the service. :param str name: Service label, file name, or full path :...
[ "def", "start", "(", "name", ",", "runas", "=", "None", ")", ":", "# Get the domain target.", "domain_target", ",", "path", "=", "_get_domain_target", "(", "name", ")", "# Load (bootstrap) the service: will raise an error if it fails", "return", "launchctl", "(", "'boot...
Start a launchd service. Raises an error if the service fails to start .. note:: To start a service in macOS the service must be enabled first. Use ``service.enable`` to enable the service. :param str name: Service label, file name, or full path :param str runas: User to run launchctl co...
[ "Start", "a", "launchd", "service", ".", "Raises", "an", "error", "if", "the", "service", "fails", "to", "start" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/mac_service.py#L388-L413
train
Start a launchd service.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/mac_service.py
stop
def stop(name, runas=None): ''' Stop a launchd service. Raises an error if the service fails to stop .. note:: Though ``service.stop`` will unload a service in macOS, the service will start on next boot unless it is disabled. Use ``service.disable`` to disable the service :par...
python
def stop(name, runas=None): ''' Stop a launchd service. Raises an error if the service fails to stop .. note:: Though ``service.stop`` will unload a service in macOS, the service will start on next boot unless it is disabled. Use ``service.disable`` to disable the service :par...
[ "def", "stop", "(", "name", ",", "runas", "=", "None", ")", ":", "# Get the domain target.", "domain_target", ",", "path", "=", "_get_domain_target", "(", "name", ")", "# Stop (bootout) the service: will raise an error if it fails", "return", "launchctl", "(", "'bootout...
Stop a launchd service. Raises an error if the service fails to stop .. note:: Though ``service.stop`` will unload a service in macOS, the service will start on next boot unless it is disabled. Use ``service.disable`` to disable the service :param str name: Service label, file name, o...
[ "Stop", "a", "launchd", "service", ".", "Raises", "an", "error", "if", "the", "service", "fails", "to", "stop" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/mac_service.py#L416-L442
train
Stop a launchd service.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/mac_service.py
restart
def restart(name, runas=None): ''' Unloads and reloads a launchd service. Raises an error if the service fails to reload :param str name: Service label, file name, or full path :param str runas: User to run launchctl commands :return: ``True`` if successful :rtype: bool CLI Example:...
python
def restart(name, runas=None): ''' Unloads and reloads a launchd service. Raises an error if the service fails to reload :param str name: Service label, file name, or full path :param str runas: User to run launchctl commands :return: ``True`` if successful :rtype: bool CLI Example:...
[ "def", "restart", "(", "name", ",", "runas", "=", "None", ")", ":", "# Restart the service: will raise an error if it fails", "if", "enabled", "(", "name", ")", ":", "stop", "(", "name", ",", "runas", "=", "runas", ")", "start", "(", "name", ",", "runas", ...
Unloads and reloads a launchd service. Raises an error if the service fails to reload :param str name: Service label, file name, or full path :param str runas: User to run launchctl commands :return: ``True`` if successful :rtype: bool CLI Example: .. code-block:: bash salt '*...
[ "Unloads", "and", "reloads", "a", "launchd", "service", ".", "Raises", "an", "error", "if", "the", "service", "fails", "to", "reload" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/mac_service.py#L445-L468
train
Unloads and reloads a launchd service.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/mac_service.py
status
def status(name, sig=None, runas=None): ''' Return the status for a service. :param str name: Used to find the service from launchctl. Can be any part of the service name or a regex expression. :param str sig: Find the service with status.pid instead. Note that ``name`` must still be...
python
def status(name, sig=None, runas=None): ''' Return the status for a service. :param str name: Used to find the service from launchctl. Can be any part of the service name or a regex expression. :param str sig: Find the service with status.pid instead. Note that ``name`` must still be...
[ "def", "status", "(", "name", ",", "sig", "=", "None", ",", "runas", "=", "None", ")", ":", "# Find service with ps", "if", "sig", ":", "return", "__salt__", "[", "'status.pid'", "]", "(", "sig", ")", "try", ":", "_get_service", "(", "name", ")", "exce...
Return the status for a service. :param str name: Used to find the service from launchctl. Can be any part of the service name or a regex expression. :param str sig: Find the service with status.pid instead. Note that ``name`` must still be provided. :param str runas: User to run launch...
[ "Return", "the", "status", "for", "a", "service", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/mac_service.py#L471-L527
train
Return the status of a service.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/mac_service.py
enabled
def enabled(name, runas=None): ''' Check if the specified service is enabled :param str name: The name of the service to look up :param str runas: User to run launchctl commands :return: True if the specified service enabled, otherwise False :rtype: bool CLI Example: .. code-block::...
python
def enabled(name, runas=None): ''' Check if the specified service is enabled :param str name: The name of the service to look up :param str runas: User to run launchctl commands :return: True if the specified service enabled, otherwise False :rtype: bool CLI Example: .. code-block::...
[ "def", "enabled", "(", "name", ",", "runas", "=", "None", ")", ":", "# Try to list the service. If it can't be listed, it's not enabled", "try", ":", "list_", "(", "name", "=", "name", ",", "runas", "=", "runas", ")", "return", "True", "except", "CommandExecution...
Check if the specified service is enabled :param str name: The name of the service to look up :param str runas: User to run launchctl commands :return: True if the specified service enabled, otherwise False :rtype: bool CLI Example: .. code-block:: bash salt '*' service.enabled org...
[ "Check", "if", "the", "specified", "service", "is", "enabled" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/mac_service.py#L571-L593
train
Check if the specified service is enabled
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/mac_service.py
disabled
def disabled(name, runas=None, domain='system'): ''' Check if the specified service is not enabled. This is the opposite of ``service.enabled`` :param str name: The name to look up :param str runas: User to run launchctl commands :param str domain: domain to check for disabled services. Defau...
python
def disabled(name, runas=None, domain='system'): ''' Check if the specified service is not enabled. This is the opposite of ``service.enabled`` :param str name: The name to look up :param str runas: User to run launchctl commands :param str domain: domain to check for disabled services. Defau...
[ "def", "disabled", "(", "name", ",", "runas", "=", "None", ",", "domain", "=", "'system'", ")", ":", "disabled", "=", "launchctl", "(", "'print-disabled'", ",", "domain", ",", "return_stdout", "=", "True", ",", "runas", "=", "runas", ")", "for", "service...
Check if the specified service is not enabled. This is the opposite of ``service.enabled`` :param str name: The name to look up :param str runas: User to run launchctl commands :param str domain: domain to check for disabled services. Default is system. :return: True if the specified service is ...
[ "Check", "if", "the", "specified", "service", "is", "not", "enabled", ".", "This", "is", "the", "opposite", "of", "service", ".", "enabled" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/mac_service.py#L596-L630
train
Check if the specified service is disabled.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/mac_service.py
get_all
def get_all(runas=None): ''' Return a list of services that are enabled or available. Can be used to find the name of a service. :param str runas: User to run launchctl commands :return: A list of all the services available or enabled :rtype: list CLI Example: .. code-block:: bash ...
python
def get_all(runas=None): ''' Return a list of services that are enabled or available. Can be used to find the name of a service. :param str runas: User to run launchctl commands :return: A list of all the services available or enabled :rtype: list CLI Example: .. code-block:: bash ...
[ "def", "get_all", "(", "runas", "=", "None", ")", ":", "# Get list of enabled services", "enabled", "=", "get_enabled", "(", "runas", "=", "runas", ")", "# Get list of all services", "available", "=", "list", "(", "__utils__", "[", "'mac_utils.available_services'", ...
Return a list of services that are enabled or available. Can be used to find the name of a service. :param str runas: User to run launchctl commands :return: A list of all the services available or enabled :rtype: list CLI Example: .. code-block:: bash salt '*' service.get_all
[ "Return", "a", "list", "of", "services", "that", "are", "enabled", "or", "available", ".", "Can", "be", "used", "to", "find", "the", "name", "of", "a", "service", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/mac_service.py#L633-L656
train
Return a list of all services that are enabled or available. Can be used to get a list of services that are enabled or available. Can be used to get a list of services that are enabled or available.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/mac_service.py
get_enabled
def get_enabled(runas=None): ''' Return a list of all services that are enabled. Can be used to find the name of a service. :param str runas: User to run launchctl commands :return: A list of all the services enabled on the system :rtype: list CLI Example: .. code-block:: bash ...
python
def get_enabled(runas=None): ''' Return a list of all services that are enabled. Can be used to find the name of a service. :param str runas: User to run launchctl commands :return: A list of all the services enabled on the system :rtype: list CLI Example: .. code-block:: bash ...
[ "def", "get_enabled", "(", "runas", "=", "None", ")", ":", "# Collect list of enabled services", "stdout", "=", "list_", "(", "runas", "=", "runas", ")", "service_lines", "=", "[", "line", "for", "line", "in", "stdout", ".", "splitlines", "(", ")", "]", "#...
Return a list of all services that are enabled. Can be used to find the name of a service. :param str runas: User to run launchctl commands :return: A list of all the services enabled on the system :rtype: list CLI Example: .. code-block:: bash salt '*' service.get_enabled
[ "Return", "a", "list", "of", "all", "services", "that", "are", "enabled", ".", "Can", "be", "used", "to", "find", "the", "name", "of", "a", "service", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/mac_service.py#L659-L689
train
Return a list of all services that are enabled on the 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/cloud/clouds/nova.py
get_conn
def get_conn(): ''' Return a conn object for the passed VM data ''' vm_ = get_configured_provider() kwargs = vm_.copy() # pylint: disable=E1103 kwargs['username'] = vm_['user'] kwargs['project_id'] = vm_['tenant'] kwargs['auth_url'] = vm_['identity_url'] kwargs['region_name'] = vm...
python
def get_conn(): ''' Return a conn object for the passed VM data ''' vm_ = get_configured_provider() kwargs = vm_.copy() # pylint: disable=E1103 kwargs['username'] = vm_['user'] kwargs['project_id'] = vm_['tenant'] kwargs['auth_url'] = vm_['identity_url'] kwargs['region_name'] = vm...
[ "def", "get_conn", "(", ")", ":", "vm_", "=", "get_configured_provider", "(", ")", "kwargs", "=", "vm_", ".", "copy", "(", ")", "# pylint: disable=E1103", "kwargs", "[", "'username'", "]", "=", "vm_", "[", "'user'", "]", "kwargs", "[", "'project_id'", "]",...
Return a conn object for the passed VM data
[ "Return", "a", "conn", "object", "for", "the", "passed", "VM", "data" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/nova.py#L301-L324
train
Return a conn object for the passed VM 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/cloud/clouds/nova.py
avail_locations
def avail_locations(conn=None, call=None): ''' Return a list of locations ''' if call == 'action': raise SaltCloudSystemExit( 'The avail_locations function must be called with ' '-f or --function, or with the --list-locations option' ) if conn is None: ...
python
def avail_locations(conn=None, call=None): ''' Return a list of locations ''' if call == 'action': raise SaltCloudSystemExit( 'The avail_locations function must be called with ' '-f or --function, or with the --list-locations option' ) if conn is None: ...
[ "def", "avail_locations", "(", "conn", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "==", "'action'", ":", "raise", "SaltCloudSystemExit", "(", "'The avail_locations function must be called with '", "'-f or --function, or with the --list-locations option'"...
Return a list of locations
[ "Return", "a", "list", "of", "locations" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/nova.py#L327-L345
train
Return a list of locations for the resource in the cloud provider
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/nova.py
get_image
def get_image(conn, vm_): ''' Return the image object to use ''' vm_image = config.get_cloud_config_value('image', vm_, __opts__, default='').encode( 'ascii', 'salt-cloud-force-ascii' ) if not vm_image: log.debug('No image set, must be boot from volume') return None ...
python
def get_image(conn, vm_): ''' Return the image object to use ''' vm_image = config.get_cloud_config_value('image', vm_, __opts__, default='').encode( 'ascii', 'salt-cloud-force-ascii' ) if not vm_image: log.debug('No image set, must be boot from volume') return None ...
[ "def", "get_image", "(", "conn", ",", "vm_", ")", ":", "vm_image", "=", "config", ".", "get_cloud_config_value", "(", "'image'", ",", "vm_", ",", "__opts__", ",", "default", "=", "''", ")", ".", "encode", "(", "'ascii'", ",", "'salt-cloud-force-ascii'", ")...
Return the image object to use
[ "Return", "the", "image", "object", "to", "use" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/nova.py#L348-L374
train
Return the image object to use
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/nova.py
show_instance
def show_instance(name, call=None): ''' Show the details from the provider concerning an instance ''' if call != 'action': raise SaltCloudSystemExit( 'The show_instance action must be called with -a or --action.' ) conn = get_conn() node = conn.show_instance(name).__...
python
def show_instance(name, call=None): ''' Show the details from the provider concerning an instance ''' if call != 'action': raise SaltCloudSystemExit( 'The show_instance action must be called with -a or --action.' ) conn = get_conn() node = conn.show_instance(name).__...
[ "def", "show_instance", "(", "name", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'action'", ":", "raise", "SaltCloudSystemExit", "(", "'The show_instance action must be called with -a or --action.'", ")", "conn", "=", "get_conn", "(", ")", "node", "="...
Show the details from the provider concerning an instance
[ "Show", "the", "details", "from", "the", "provider", "concerning", "an", "instance" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/nova.py#L388-L400
train
Show the details from the provider concerning an instance
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/nova.py
get_size
def get_size(conn, vm_): ''' Return the VM's size object ''' sizes = conn.list_sizes() vm_size = config.get_cloud_config_value('size', vm_, __opts__) if not vm_size: return sizes[0] for size in sizes: if vm_size and six.text_type(vm_size) in (six.text_type(sizes[size]['id'])...
python
def get_size(conn, vm_): ''' Return the VM's size object ''' sizes = conn.list_sizes() vm_size = config.get_cloud_config_value('size', vm_, __opts__) if not vm_size: return sizes[0] for size in sizes: if vm_size and six.text_type(vm_size) in (six.text_type(sizes[size]['id'])...
[ "def", "get_size", "(", "conn", ",", "vm_", ")", ":", "sizes", "=", "conn", ".", "list_sizes", "(", ")", "vm_size", "=", "config", ".", "get_cloud_config_value", "(", "'size'", ",", "vm_", ",", "__opts__", ")", "if", "not", "vm_size", ":", "return", "s...
Return the VM's size object
[ "Return", "the", "VM", "s", "size", "object" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/nova.py#L403-L417
train
Return the VM s size 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/cloud/clouds/nova.py
ignore_cidr
def ignore_cidr(vm_, ip): ''' Return True if we are to ignore the specified IP. Compatible with IPv4. ''' if HAS_NETADDR is False: log.error('Error: netaddr is not installed') return 'Error: netaddr is not installed' cidr = config.get_cloud_config_value( 'ignore_cidr', vm_, ...
python
def ignore_cidr(vm_, ip): ''' Return True if we are to ignore the specified IP. Compatible with IPv4. ''' if HAS_NETADDR is False: log.error('Error: netaddr is not installed') return 'Error: netaddr is not installed' cidr = config.get_cloud_config_value( 'ignore_cidr', vm_, ...
[ "def", "ignore_cidr", "(", "vm_", ",", "ip", ")", ":", "if", "HAS_NETADDR", "is", "False", ":", "log", ".", "error", "(", "'Error: netaddr is not installed'", ")", "return", "'Error: netaddr is not installed'", "cidr", "=", "config", ".", "get_cloud_config_value", ...
Return True if we are to ignore the specified IP. Compatible with IPv4.
[ "Return", "True", "if", "we", "are", "to", "ignore", "the", "specified", "IP", ".", "Compatible", "with", "IPv4", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/nova.py#L441-L456
train
Return True if we are to ignore the specified IP. Compatible with IPv4.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/nova.py
rackconnect
def rackconnect(vm_): ''' Determine if we should wait for rackconnect automation before running. Either 'False' (default) or 'True'. ''' return config.get_cloud_config_value( 'rackconnect', vm_, __opts__, default=False, search_global=False )
python
def rackconnect(vm_): ''' Determine if we should wait for rackconnect automation before running. Either 'False' (default) or 'True'. ''' return config.get_cloud_config_value( 'rackconnect', vm_, __opts__, default=False, search_global=False )
[ "def", "rackconnect", "(", "vm_", ")", ":", "return", "config", ".", "get_cloud_config_value", "(", "'rackconnect'", ",", "vm_", ",", "__opts__", ",", "default", "=", "False", ",", "search_global", "=", "False", ")" ]
Determine if we should wait for rackconnect automation before running. Either 'False' (default) or 'True'.
[ "Determine", "if", "we", "should", "wait", "for", "rackconnect", "automation", "before", "running", ".", "Either", "False", "(", "default", ")", "or", "True", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/nova.py#L470-L478
train
Return whether we should wait for rackconnect automation before running.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/nova.py
rackconnectv3
def rackconnectv3(vm_): ''' Determine if server is using rackconnectv3 or not Return the rackconnect network name or False ''' return config.get_cloud_config_value( 'rackconnectv3', vm_, __opts__, default=False, search_global=False )
python
def rackconnectv3(vm_): ''' Determine if server is using rackconnectv3 or not Return the rackconnect network name or False ''' return config.get_cloud_config_value( 'rackconnectv3', vm_, __opts__, default=False, search_global=False )
[ "def", "rackconnectv3", "(", "vm_", ")", ":", "return", "config", ".", "get_cloud_config_value", "(", "'rackconnectv3'", ",", "vm_", ",", "__opts__", ",", "default", "=", "False", ",", "search_global", "=", "False", ")" ]
Determine if server is using rackconnectv3 or not Return the rackconnect network name or False
[ "Determine", "if", "server", "is", "using", "rackconnectv3", "or", "not", "Return", "the", "rackconnect", "network", "name", "or", "False" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/nova.py#L481-L489
train
Return rackconnect network name or 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/cloud/clouds/nova.py
cloudnetwork
def cloudnetwork(vm_): ''' Determine if we should use an extra network to bootstrap Either 'False' (default) or 'True'. ''' return config.get_cloud_config_value( 'cloudnetwork', vm_, __opts__, default=False, search_global=False )
python
def cloudnetwork(vm_): ''' Determine if we should use an extra network to bootstrap Either 'False' (default) or 'True'. ''' return config.get_cloud_config_value( 'cloudnetwork', vm_, __opts__, default=False, search_global=False )
[ "def", "cloudnetwork", "(", "vm_", ")", ":", "return", "config", ".", "get_cloud_config_value", "(", "'cloudnetwork'", ",", "vm_", ",", "__opts__", ",", "default", "=", "False", ",", "search_global", "=", "False", ")" ]
Determine if we should use an extra network to bootstrap Either 'False' (default) or 'True'.
[ "Determine", "if", "we", "should", "use", "an", "extra", "network", "to", "bootstrap", "Either", "False", "(", "default", ")", "or", "True", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/nova.py#L492-L500
train
Determine if we should use extra network to bootstrap the current 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/cloud/clouds/nova.py
managedcloud
def managedcloud(vm_): ''' Determine if we should wait for the managed cloud automation before running. Either 'False' (default) or 'True'. ''' return config.get_cloud_config_value( 'managedcloud', vm_, __opts__, default=False, search_global=False )
python
def managedcloud(vm_): ''' Determine if we should wait for the managed cloud automation before running. Either 'False' (default) or 'True'. ''' return config.get_cloud_config_value( 'managedcloud', vm_, __opts__, default=False, search_global=False )
[ "def", "managedcloud", "(", "vm_", ")", ":", "return", "config", ".", "get_cloud_config_value", "(", "'managedcloud'", ",", "vm_", ",", "__opts__", ",", "default", "=", "False", ",", "search_global", "=", "False", ")" ]
Determine if we should wait for the managed cloud automation before running. Either 'False' (default) or 'True'.
[ "Determine", "if", "we", "should", "wait", "for", "the", "managed", "cloud", "automation", "before", "running", ".", "Either", "False", "(", "default", ")", "or", "True", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/nova.py#L503-L511
train
Return whether managedcloud is enabled for this VM. Either False or 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/cloud/clouds/nova.py
destroy
def destroy(name, conn=None, call=None): ''' Delete a single VM ''' if call == 'function': raise SaltCloudSystemExit( 'The destroy action must be called with -d, --destroy, ' '-a or --action.' ) __utils__['cloud.fire_event']( 'event', 'destroy...
python
def destroy(name, conn=None, call=None): ''' Delete a single VM ''' if call == 'function': raise SaltCloudSystemExit( 'The destroy action must be called with -d, --destroy, ' '-a or --action.' ) __utils__['cloud.fire_event']( 'event', 'destroy...
[ "def", "destroy", "(", "name", ",", "conn", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "==", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The destroy action must be called with -d, --destroy, '", "'-a or --action.'", ")", "__utils__"...
Delete a single VM
[ "Delete", "a", "single", "VM" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/nova.py#L514-L575
train
Delete a single VM
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/nova.py
request_instance
def request_instance(vm_=None, call=None): ''' Put together all of the information necessary to request an instance through Novaclient and then fire off the request the instance. Returns data about the instance ''' if call == 'function': # Technically this function may be called other w...
python
def request_instance(vm_=None, call=None): ''' Put together all of the information necessary to request an instance through Novaclient and then fire off the request the instance. Returns data about the instance ''' if call == 'function': # Technically this function may be called other w...
[ "def", "request_instance", "(", "vm_", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "==", "'function'", ":", "# Technically this function may be called other ways too, but it", "# definitely cannot be called with --function.", "raise", "SaltCloudSystemExit",...
Put together all of the information necessary to request an instance through Novaclient and then fire off the request the instance. Returns data about the instance
[ "Put", "together", "all", "of", "the", "information", "necessary", "to", "request", "an", "instance", "through", "Novaclient", "and", "then", "fire", "off", "the", "request", "the", "instance", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/nova.py#L578-L791
train
Request an instance from OpenStack.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/nova.py
create
def create(vm_): ''' Create a single VM from a data dict ''' try: # Check for required profile parameters before sending any API calls. if vm_['profile'] and config.is_profile_configured(__opts__, __active_provider_name__ or 'nov...
python
def create(vm_): ''' Create a single VM from a data dict ''' try: # Check for required profile parameters before sending any API calls. if vm_['profile'] and config.is_profile_configured(__opts__, __active_provider_name__ or 'nov...
[ "def", "create", "(", "vm_", ")", ":", "try", ":", "# Check for required profile parameters before sending any API calls.", "if", "vm_", "[", "'profile'", "]", "and", "config", ".", "is_profile_configured", "(", "__opts__", ",", "__active_provider_name__", "or", "'nova'...
Create a single VM from a data dict
[ "Create", "a", "single", "VM", "from", "a", "data", "dict" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/nova.py#L934-L1077
train
Create a single VM from a data dict
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/nova.py
list_nodes
def list_nodes(call=None, **kwargs): ''' Return a list of the VMs that in this location ''' if call == 'action': raise SaltCloudSystemExit( 'The list_nodes function must be called with -f or --function.' ) ret = {} conn = get_conn() server_list = conn.server_list...
python
def list_nodes(call=None, **kwargs): ''' Return a list of the VMs that in this location ''' if call == 'action': raise SaltCloudSystemExit( 'The list_nodes function must be called with -f or --function.' ) ret = {} conn = get_conn() server_list = conn.server_list...
[ "def", "list_nodes", "(", "call", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "call", "==", "'action'", ":", "raise", "SaltCloudSystemExit", "(", "'The list_nodes function must be called with -f or --function.'", ")", "ret", "=", "{", "}", "conn", "=",...
Return a list of the VMs that in this location
[ "Return", "a", "list", "of", "the", "VMs", "that", "in", "this", "location" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/nova.py#L1096-L1147
train
Return a list of the VMs that are in this location
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/nova.py
list_nodes_full
def list_nodes_full(call=None, **kwargs): ''' Return a list of the VMs that in this location ''' if call == 'action': raise SaltCloudSystemExit( ( 'The list_nodes_full function must be called with' ' -f or --function.' ) ) ret ...
python
def list_nodes_full(call=None, **kwargs): ''' Return a list of the VMs that in this location ''' if call == 'action': raise SaltCloudSystemExit( ( 'The list_nodes_full function must be called with' ' -f or --function.' ) ) ret ...
[ "def", "list_nodes_full", "(", "call", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "call", "==", "'action'", ":", "raise", "SaltCloudSystemExit", "(", "(", "'The list_nodes_full function must be called with'", "' -f or --function.'", ")", ")", "ret", "="...
Return a list of the VMs that in this location
[ "Return", "a", "list", "of", "the", "VMs", "that", "in", "this", "location" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/nova.py#L1150-L1177
train
Return a list of the VMs that are in this location
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/nova.py
list_nodes_min
def list_nodes_min(call=None, **kwargs): ''' Return a list of the VMs that in this location ''' if call == 'action': raise SaltCloudSystemExit( ( 'The list_nodes_min function must be called with' ' -f or --function.' ) ) conn =...
python
def list_nodes_min(call=None, **kwargs): ''' Return a list of the VMs that in this location ''' if call == 'action': raise SaltCloudSystemExit( ( 'The list_nodes_min function must be called with' ' -f or --function.' ) ) conn =...
[ "def", "list_nodes_min", "(", "call", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "call", "==", "'action'", ":", "raise", "SaltCloudSystemExit", "(", "(", "'The list_nodes_min function must be called with'", "' -f or --function.'", ")", ")", "conn", "=",...
Return a list of the VMs that in this location
[ "Return", "a", "list", "of", "the", "VMs", "that", "in", "this", "location" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/nova.py#L1180-L1197
train
Return a list of the VMs that are in this location
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/nova.py
volume_create
def volume_create(name, size=100, snapshot=None, voltype=None, **kwargs): ''' Create block storage device ''' conn = get_conn() create_kwargs = {'name': name, 'size': size, 'snapshot': snapshot, 'voltype': voltype} create_kwargs['ava...
python
def volume_create(name, size=100, snapshot=None, voltype=None, **kwargs): ''' Create block storage device ''' conn = get_conn() create_kwargs = {'name': name, 'size': size, 'snapshot': snapshot, 'voltype': voltype} create_kwargs['ava...
[ "def", "volume_create", "(", "name", ",", "size", "=", "100", ",", "snapshot", "=", "None", ",", "voltype", "=", "None", ",", "*", "*", "kwargs", ")", ":", "conn", "=", "get_conn", "(", ")", "create_kwargs", "=", "{", "'name'", ":", "name", ",", "'...
Create block storage device
[ "Create", "block", "storage", "device" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/nova.py#L1209-L1219
train
Create block storage device
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/nova.py
volume_attach
def volume_attach(name, server_name, device='/dev/xvdb', **kwargs): ''' Attach block volume ''' conn = get_conn() return conn.volume_attach( name, server_name, device, timeout=300 )
python
def volume_attach(name, server_name, device='/dev/xvdb', **kwargs): ''' Attach block volume ''' conn = get_conn() return conn.volume_attach( name, server_name, device, timeout=300 )
[ "def", "volume_attach", "(", "name", ",", "server_name", ",", "device", "=", "'/dev/xvdb'", ",", "*", "*", "kwargs", ")", ":", "conn", "=", "get_conn", "(", ")", "return", "conn", ".", "volume_attach", "(", "name", ",", "server_name", ",", "device", ",",...
Attach block volume
[ "Attach", "block", "volume" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/nova.py#L1245-L1255
train
Attach a block volume to a server
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/nova.py
volume_create_attach
def volume_create_attach(name, call=None, **kwargs): ''' Create and attach volumes to created node ''' if call == 'function': raise SaltCloudSystemExit( 'The create_attach_volumes action must be called with ' '-a or --action.' ) if type(kwargs['volumes']) is ...
python
def volume_create_attach(name, call=None, **kwargs): ''' Create and attach volumes to created node ''' if call == 'function': raise SaltCloudSystemExit( 'The create_attach_volumes action must be called with ' '-a or --action.' ) if type(kwargs['volumes']) is ...
[ "def", "volume_create_attach", "(", "name", ",", "call", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "call", "==", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The create_attach_volumes action must be called with '", "'-a or --action.'", ")", ...
Create and attach volumes to created node
[ "Create", "and", "attach", "volumes", "to", "created", "node" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/nova.py#L1262-L1318
train
Create and attach volumes to a node
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cloud/clouds/nova.py
virtual_interface_create
def virtual_interface_create(name, net_name, **kwargs): ''' Create private networks ''' conn = get_conn() return conn.virtual_interface_create(name, net_name)
python
def virtual_interface_create(name, net_name, **kwargs): ''' Create private networks ''' conn = get_conn() return conn.virtual_interface_create(name, net_name)
[ "def", "virtual_interface_create", "(", "name", ",", "net_name", ",", "*", "*", "kwargs", ")", ":", "conn", "=", "get_conn", "(", ")", "return", "conn", ".", "virtual_interface_create", "(", "name", ",", "net_name", ")" ]
Create private networks
[ "Create", "private", "networks" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/nova.py#L1357-L1362
train
Create private networks
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...