repo stringlengths 7 54 | path stringlengths 4 223 | func_name stringlengths 1 134 | original_string stringlengths 75 104k | language stringclasses 1
value | code stringlengths 75 104k | code_tokens listlengths 20 28.4k | docstring stringlengths 1 46.3k | docstring_tokens listlengths 1 1.66k | sha stringlengths 40 40 | url stringlengths 87 315 | partition stringclasses 1
value | summary stringlengths 4 350 | obf_code stringlengths 7.85k 764k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
saltstack/salt | salt/modules/inspectlib/query.py | Query._identity | def _identity(self, *args, **kwargs):
'''
Local users and groups.
accounts
Can be either 'local', 'remote' or 'all' (equal to "local,remote").
Remote accounts cannot be resolved on all systems, but only
those, which supports 'passwd -S -a'.
disabled
... | python | def _identity(self, *args, **kwargs):
'''
Local users and groups.
accounts
Can be either 'local', 'remote' or 'all' (equal to "local,remote").
Remote accounts cannot be resolved on all systems, but only
those, which supports 'passwd -S -a'.
disabled
... | [
"def",
"_identity",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"LOCAL",
"=",
"'local accounts'",
"EXT",
"=",
"'external accounts'",
"data",
"=",
"dict",
"(",
")",
"data",
"[",
"LOCAL",
"]",
"=",
"self",
".",
"_get_local_users",
"... | Local users and groups.
accounts
Can be either 'local', 'remote' or 'all' (equal to "local,remote").
Remote accounts cannot be resolved on all systems, but only
those, which supports 'passwd -S -a'.
disabled
True (or False, default) to return only disabl... | [
"Local",
"users",
"and",
"groups",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/inspectlib/query.py#L281-L301 | train | Return a dictionary of identity 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/modules/inspectlib/query.py | Query._system | def _system(self, *args, **kwargs):
'''
This basically calls grains items and picks out only
necessary information in a certain structure.
:param args:
:param kwargs:
:return:
'''
sysinfo = SysInfo(__grains__.get("kernel"))
data = dict()
... | python | def _system(self, *args, **kwargs):
'''
This basically calls grains items and picks out only
necessary information in a certain structure.
:param args:
:param kwargs:
:return:
'''
sysinfo = SysInfo(__grains__.get("kernel"))
data = dict()
... | [
"def",
"_system",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"sysinfo",
"=",
"SysInfo",
"(",
"__grains__",
".",
"get",
"(",
"\"kernel\"",
")",
")",
"data",
"=",
"dict",
"(",
")",
"data",
"[",
"'cpu'",
"]",
"=",
"sysinfo",
"... | This basically calls grains items and picks out only
necessary information in a certain structure.
:param args:
:param kwargs:
:return: | [
"This",
"basically",
"calls",
"grains",
"items",
"and",
"picks",
"out",
"only",
"necessary",
"information",
"in",
"a",
"certain",
"structure",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/inspectlib/query.py#L303-L322 | train | This is a private method that returns a dictionary of system 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/modules/inspectlib/query.py | Query._software | def _software(self, *args, **kwargs):
'''
Return installed software.
'''
data = dict()
if 'exclude' in kwargs:
excludes = kwargs['exclude'].split(",")
else:
excludes = list()
os_family = __grains__.get("os_family").lower()
# Get l... | python | def _software(self, *args, **kwargs):
'''
Return installed software.
'''
data = dict()
if 'exclude' in kwargs:
excludes = kwargs['exclude'].split(",")
else:
excludes = list()
os_family = __grains__.get("os_family").lower()
# Get l... | [
"def",
"_software",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"data",
"=",
"dict",
"(",
")",
"if",
"'exclude'",
"in",
"kwargs",
":",
"excludes",
"=",
"kwargs",
"[",
"'exclude'",
"]",
".",
"split",
"(",
"\",\"",
")",
"else",
... | Return installed software. | [
"Return",
"installed",
"software",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/inspectlib/query.py#L324-L376 | train | Return installed software. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/inspectlib/query.py | Query._id_resolv | def _id_resolv(self, iid, named=True, uid=True):
'''
Resolve local users and groups.
:param iid:
:param named:
:param uid:
:return:
'''
if not self.local_identity:
self.local_identity['users'] = self._get_local_users()
self.local_... | python | def _id_resolv(self, iid, named=True, uid=True):
'''
Resolve local users and groups.
:param iid:
:param named:
:param uid:
:return:
'''
if not self.local_identity:
self.local_identity['users'] = self._get_local_users()
self.local_... | [
"def",
"_id_resolv",
"(",
"self",
",",
"iid",
",",
"named",
"=",
"True",
",",
"uid",
"=",
"True",
")",
":",
"if",
"not",
"self",
".",
"local_identity",
":",
"self",
".",
"local_identity",
"[",
"'users'",
"]",
"=",
"self",
".",
"_get_local_users",
"(",
... | Resolve local users and groups.
:param iid:
:param named:
:param uid:
:return: | [
"Resolve",
"local",
"users",
"and",
"groups",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/inspectlib/query.py#L387-L408 | train | Resolve local users and groups. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/inspectlib/query.py | Query._payload | def _payload(self, *args, **kwargs):
'''
Find all unmanaged files. Returns maximum 1000 values.
Parameters:
* **filter**: Include only results which path starts from the filter string.
* **time**: Display time in Unix ticks or format according to the configured TZ (default)
... | python | def _payload(self, *args, **kwargs):
'''
Find all unmanaged files. Returns maximum 1000 values.
Parameters:
* **filter**: Include only results which path starts from the filter string.
* **time**: Display time in Unix ticks or format according to the configured TZ (default)
... | [
"def",
"_payload",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"def",
"_size_format",
"(",
"size",
",",
"fmt",
")",
":",
"if",
"fmt",
"is",
"None",
":",
"return",
"size",
"fmt",
"=",
"fmt",
".",
"lower",
"(",
")",
"if",
"f... | Find all unmanaged files. Returns maximum 1000 values.
Parameters:
* **filter**: Include only results which path starts from the filter string.
* **time**: Display time in Unix ticks or format according to the configured TZ (default)
Values: ticks, tz (default)
* **... | [
"Find",
"all",
"unmanaged",
"files",
".",
"Returns",
"maximum",
"1000",
"values",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/inspectlib/query.py#L410-L493 | train | Return a list of unmanaged files in the current directory. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/inspectlib/query.py | Query._all | def _all(self, *args, **kwargs):
'''
Return all the summary of the particular system.
'''
data = dict()
data['software'] = self._software(**kwargs)
data['system'] = self._system(**kwargs)
data['services'] = self._services(**kwargs)
try:
data['c... | python | def _all(self, *args, **kwargs):
'''
Return all the summary of the particular system.
'''
data = dict()
data['software'] = self._software(**kwargs)
data['system'] = self._system(**kwargs)
data['services'] = self._services(**kwargs)
try:
data['c... | [
"def",
"_all",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"data",
"=",
"dict",
"(",
")",
"data",
"[",
"'software'",
"]",
"=",
"self",
".",
"_software",
"(",
"*",
"*",
"kwargs",
")",
"data",
"[",
"'system'",
"]",
"=",
"sel... | Return all the summary of the particular system. | [
"Return",
"all",
"the",
"summary",
"of",
"the",
"particular",
"system",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/inspectlib/query.py#L495-L510 | train | Return all the summary of the particular system. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/smartos_vmadm.py | _create_update_from_file | def _create_update_from_file(mode='create', uuid=None, path=None):
'''
Create vm from file
'''
ret = {}
if not os.path.isfile(path) or path is None:
ret['Error'] = 'File ({0}) does not exists!'.format(path)
return ret
# vmadm validate create|update [-f <filename>]
cmd = 'vmad... | python | def _create_update_from_file(mode='create', uuid=None, path=None):
'''
Create vm from file
'''
ret = {}
if not os.path.isfile(path) or path is None:
ret['Error'] = 'File ({0}) does not exists!'.format(path)
return ret
# vmadm validate create|update [-f <filename>]
cmd = 'vmad... | [
"def",
"_create_update_from_file",
"(",
"mode",
"=",
"'create'",
",",
"uuid",
"=",
"None",
",",
"path",
"=",
"None",
")",
":",
"ret",
"=",
"{",
"}",
"if",
"not",
"os",
".",
"path",
".",
"isfile",
"(",
"path",
")",
"or",
"path",
"is",
"None",
":",
... | Create vm from file | [
"Create",
"vm",
"from",
"file"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smartos_vmadm.py#L64-L107 | train | Create vm from file | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/smartos_vmadm.py | _create_update_from_cfg | def _create_update_from_cfg(mode='create', uuid=None, vmcfg=None):
'''
Create vm from configuration
'''
ret = {}
# write json file
vmadm_json_file = __salt__['temp.file'](prefix='vmadm-')
with salt.utils.files.fopen(vmadm_json_file, 'w') as vmadm_json:
salt.utils.json.dump(vmcfg, vm... | python | def _create_update_from_cfg(mode='create', uuid=None, vmcfg=None):
'''
Create vm from configuration
'''
ret = {}
# write json file
vmadm_json_file = __salt__['temp.file'](prefix='vmadm-')
with salt.utils.files.fopen(vmadm_json_file, 'w') as vmadm_json:
salt.utils.json.dump(vmcfg, vm... | [
"def",
"_create_update_from_cfg",
"(",
"mode",
"=",
"'create'",
",",
"uuid",
"=",
"None",
",",
"vmcfg",
"=",
"None",
")",
":",
"ret",
"=",
"{",
"}",
"# write json file",
"vmadm_json_file",
"=",
"__salt__",
"[",
"'temp.file'",
"]",
"(",
"prefix",
"=",
"'vma... | Create vm from configuration | [
"Create",
"vm",
"from",
"configuration"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smartos_vmadm.py#L110-L161 | train | Create vm from configuration | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/smartos_vmadm.py | start | def start(vm, options=None, key='uuid'):
'''
Start a vm
vm : string
vm to be started
options : string
optional additional options
key : string [uuid|alias|hostname]
value type of 'vm' parameter
CLI Example:
.. code-block:: bash
salt '*' vmadm.start 186da9a... | python | def start(vm, options=None, key='uuid'):
'''
Start a vm
vm : string
vm to be started
options : string
optional additional options
key : string [uuid|alias|hostname]
value type of 'vm' parameter
CLI Example:
.. code-block:: bash
salt '*' vmadm.start 186da9a... | [
"def",
"start",
"(",
"vm",
",",
"options",
"=",
"None",
",",
"key",
"=",
"'uuid'",
")",
":",
"ret",
"=",
"{",
"}",
"if",
"key",
"not",
"in",
"[",
"'uuid'",
",",
"'alias'",
",",
"'hostname'",
"]",
":",
"ret",
"[",
"'Error'",
"]",
"=",
"'Key must b... | Start a vm
vm : string
vm to be started
options : string
optional additional options
key : string [uuid|alias|hostname]
value type of 'vm' parameter
CLI Example:
.. code-block:: bash
salt '*' vmadm.start 186da9ab-7392-4f55-91a5-b8f1fe770543
salt '*' vmadm.... | [
"Start",
"a",
"vm"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smartos_vmadm.py#L164-L201 | train | Start a 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/modules/smartos_vmadm.py | stop | def stop(vm, force=False, key='uuid'):
'''
Stop a vm
vm : string
vm to be stopped
force : boolean
force stop of vm if true
key : string [uuid|alias|hostname]
value type of 'vm' parameter
CLI Example:
.. code-block:: bash
salt '*' vmadm.stop 186da9ab-7392-4... | python | def stop(vm, force=False, key='uuid'):
'''
Stop a vm
vm : string
vm to be stopped
force : boolean
force stop of vm if true
key : string [uuid|alias|hostname]
value type of 'vm' parameter
CLI Example:
.. code-block:: bash
salt '*' vmadm.stop 186da9ab-7392-4... | [
"def",
"stop",
"(",
"vm",
",",
"force",
"=",
"False",
",",
"key",
"=",
"'uuid'",
")",
":",
"ret",
"=",
"{",
"}",
"if",
"key",
"not",
"in",
"[",
"'uuid'",
",",
"'alias'",
",",
"'hostname'",
"]",
":",
"ret",
"[",
"'Error'",
"]",
"=",
"'Key must be ... | Stop a vm
vm : string
vm to be stopped
force : boolean
force stop of vm if true
key : string [uuid|alias|hostname]
value type of 'vm' parameter
CLI Example:
.. code-block:: bash
salt '*' vmadm.stop 186da9ab-7392-4f55-91a5-b8f1fe770543
salt '*' vmadm.stop 1... | [
"Stop",
"a",
"vm"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smartos_vmadm.py#L204-L241 | train | Stop a 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/modules/smartos_vmadm.py | list_vms | def list_vms(search=None, sort=None, order='uuid,type,ram,state,alias', keyed=True):
'''
Return a list of VMs
search : string
vmadm filter property
sort : string
vmadm sort (-s) property
order : string
vmadm order (-o) property -- Default: uuid,type,ram,state,alias
keyed... | python | def list_vms(search=None, sort=None, order='uuid,type,ram,state,alias', keyed=True):
'''
Return a list of VMs
search : string
vmadm filter property
sort : string
vmadm sort (-s) property
order : string
vmadm order (-o) property -- Default: uuid,type,ram,state,alias
keyed... | [
"def",
"list_vms",
"(",
"search",
"=",
"None",
",",
"sort",
"=",
"None",
",",
"order",
"=",
"'uuid,type,ram,state,alias'",
",",
"keyed",
"=",
"True",
")",
":",
"ret",
"=",
"{",
"}",
"# vmadm list [-p] [-H] [-o field,...] [-s field,...] [field=value ...]",
"cmd",
"... | Return a list of VMs
search : string
vmadm filter property
sort : string
vmadm sort (-s) property
order : string
vmadm order (-o) property -- Default: uuid,type,ram,state,alias
keyed : boolean
specified if the output should be an array (False) or dict (True)
... | [
"Return",
"a",
"list",
"of",
"VMs"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smartos_vmadm.py#L284-L339 | train | Return a list of VMs in the virtual machine system | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/smartos_vmadm.py | lookup | def lookup(search=None, order=None, one=False):
'''
Return a list of VMs using lookup
search : string
vmadm filter property
order : string
vmadm order (-o) property -- Default: uuid,type,ram,state,alias
one : boolean
return only one result (vmadm's -1)
CLI Example:
... | python | def lookup(search=None, order=None, one=False):
'''
Return a list of VMs using lookup
search : string
vmadm filter property
order : string
vmadm order (-o) property -- Default: uuid,type,ram,state,alias
one : boolean
return only one result (vmadm's -1)
CLI Example:
... | [
"def",
"lookup",
"(",
"search",
"=",
"None",
",",
"order",
"=",
"None",
",",
"one",
"=",
"False",
")",
":",
"ret",
"=",
"{",
"}",
"# vmadm lookup [-j|-1] [-o field,...] [field=value ...]",
"cmd",
"=",
"'vmadm lookup {one} {order} {search}'",
".",
"format",
"(",
... | Return a list of VMs using lookup
search : string
vmadm filter property
order : string
vmadm order (-o) property -- Default: uuid,type,ram,state,alias
one : boolean
return only one result (vmadm's -1)
CLI Example:
.. code-block:: bash
salt '*' vmadm.lookup search=... | [
"Return",
"a",
"list",
"of",
"VMs",
"using",
"lookup"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smartos_vmadm.py#L342-L381 | train | Return a list of VMs using lookup
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/smartos_vmadm.py | sysrq | def sysrq(vm, action='nmi', key='uuid'):
'''
Send non-maskable interrupt to vm or capture a screenshot
vm : string
vm to be targeted
action : string
nmi or screenshot -- Default: nmi
key : string [uuid|alias|hostname]
value type of 'vm' parameter
CLI Example:
.. co... | python | def sysrq(vm, action='nmi', key='uuid'):
'''
Send non-maskable interrupt to vm or capture a screenshot
vm : string
vm to be targeted
action : string
nmi or screenshot -- Default: nmi
key : string [uuid|alias|hostname]
value type of 'vm' parameter
CLI Example:
.. co... | [
"def",
"sysrq",
"(",
"vm",
",",
"action",
"=",
"'nmi'",
",",
"key",
"=",
"'uuid'",
")",
":",
"ret",
"=",
"{",
"}",
"if",
"key",
"not",
"in",
"[",
"'uuid'",
",",
"'alias'",
",",
"'hostname'",
"]",
":",
"ret",
"[",
"'Error'",
"]",
"=",
"'Key must b... | Send non-maskable interrupt to vm or capture a screenshot
vm : string
vm to be targeted
action : string
nmi or screenshot -- Default: nmi
key : string [uuid|alias|hostname]
value type of 'vm' parameter
CLI Example:
.. code-block:: bash
salt '*' vmadm.sysrq 186da9a... | [
"Send",
"non",
"-",
"maskable",
"interrupt",
"to",
"vm",
"or",
"capture",
"a",
"screenshot"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smartos_vmadm.py#L384-L423 | train | Send non - maskable interrupt to vm or capture a screenshot | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/smartos_vmadm.py | delete | def delete(vm, key='uuid'):
'''
Delete a vm
vm : string
vm to be deleted
key : string [uuid|alias|hostname]
value type of 'vm' parameter
CLI Example:
.. code-block:: bash
salt '*' vmadm.delete 186da9ab-7392-4f55-91a5-b8f1fe770543
salt '*' vmadm.delete nacl key... | python | def delete(vm, key='uuid'):
'''
Delete a vm
vm : string
vm to be deleted
key : string [uuid|alias|hostname]
value type of 'vm' parameter
CLI Example:
.. code-block:: bash
salt '*' vmadm.delete 186da9ab-7392-4f55-91a5-b8f1fe770543
salt '*' vmadm.delete nacl key... | [
"def",
"delete",
"(",
"vm",
",",
"key",
"=",
"'uuid'",
")",
":",
"ret",
"=",
"{",
"}",
"if",
"key",
"not",
"in",
"[",
"'uuid'",
",",
"'alias'",
",",
"'hostname'",
"]",
":",
"ret",
"[",
"'Error'",
"]",
"=",
"'Key must be either uuid, alias or hostname'",
... | Delete a vm
vm : string
vm to be deleted
key : string [uuid|alias|hostname]
value type of 'vm' parameter
CLI Example:
.. code-block:: bash
salt '*' vmadm.delete 186da9ab-7392-4f55-91a5-b8f1fe770543
salt '*' vmadm.delete nacl key=alias | [
"Delete",
"a",
"vm"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smartos_vmadm.py#L426-L456 | train | Delete a 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/modules/smartos_vmadm.py | get | def get(vm, key='uuid'):
'''
Output the JSON object describing a VM
vm : string
vm to be targeted
key : string [uuid|alias|hostname]
value type of 'vm' parameter
CLI Example:
.. code-block:: bash
salt '*' vmadm.get 186da9ab-7392-4f55-91a5-b8f1fe770543
salt '*'... | python | def get(vm, key='uuid'):
'''
Output the JSON object describing a VM
vm : string
vm to be targeted
key : string [uuid|alias|hostname]
value type of 'vm' parameter
CLI Example:
.. code-block:: bash
salt '*' vmadm.get 186da9ab-7392-4f55-91a5-b8f1fe770543
salt '*'... | [
"def",
"get",
"(",
"vm",
",",
"key",
"=",
"'uuid'",
")",
":",
"ret",
"=",
"{",
"}",
"if",
"key",
"not",
"in",
"[",
"'uuid'",
",",
"'alias'",
",",
"'hostname'",
"]",
":",
"ret",
"[",
"'Error'",
"]",
"=",
"'Key must be either uuid, alias or hostname'",
"... | Output the JSON object describing a VM
vm : string
vm to be targeted
key : string [uuid|alias|hostname]
value type of 'vm' parameter
CLI Example:
.. code-block:: bash
salt '*' vmadm.get 186da9ab-7392-4f55-91a5-b8f1fe770543
salt '*' vmadm.get nacl key=alias | [
"Output",
"the",
"JSON",
"object",
"describing",
"a",
"VM"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smartos_vmadm.py#L459-L489 | train | Get a VM with the specified key | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/smartos_vmadm.py | info | def info(vm, info_type='all', key='uuid'):
'''
Lookup info on running kvm
vm : string
vm to be targeted
info_type : string [all|block|blockstats|chardev|cpus|kvm|pci|spice|version|vnc]
info type to return
key : string [uuid|alias|hostname]
value type of 'vm' parameter
C... | python | def info(vm, info_type='all', key='uuid'):
'''
Lookup info on running kvm
vm : string
vm to be targeted
info_type : string [all|block|blockstats|chardev|cpus|kvm|pci|spice|version|vnc]
info type to return
key : string [uuid|alias|hostname]
value type of 'vm' parameter
C... | [
"def",
"info",
"(",
"vm",
",",
"info_type",
"=",
"'all'",
",",
"key",
"=",
"'uuid'",
")",
":",
"ret",
"=",
"{",
"}",
"if",
"info_type",
"not",
"in",
"[",
"'all'",
",",
"'block'",
",",
"'blockstats'",
",",
"'chardev'",
",",
"'cpus'",
",",
"'kvm'",
"... | Lookup info on running kvm
vm : string
vm to be targeted
info_type : string [all|block|blockstats|chardev|cpus|kvm|pci|spice|version|vnc]
info type to return
key : string [uuid|alias|hostname]
value type of 'vm' parameter
CLI Example:
.. code-block:: bash
salt '*'... | [
"Lookup",
"info",
"on",
"running",
"kvm"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smartos_vmadm.py#L492-L532 | train | Return info on running kvm | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/smartos_vmadm.py | create_snapshot | def create_snapshot(vm, name, key='uuid'):
'''
Create snapshot of a vm
vm : string
vm to be targeted
name : string
snapshot name
The snapname must be 64 characters or less
and must only contain alphanumeric characters and
characters in the set [-_.:%]... | python | def create_snapshot(vm, name, key='uuid'):
'''
Create snapshot of a vm
vm : string
vm to be targeted
name : string
snapshot name
The snapname must be 64 characters or less
and must only contain alphanumeric characters and
characters in the set [-_.:%]... | [
"def",
"create_snapshot",
"(",
"vm",
",",
"name",
",",
"key",
"=",
"'uuid'",
")",
":",
"ret",
"=",
"{",
"}",
"if",
"key",
"not",
"in",
"[",
"'uuid'",
",",
"'alias'",
",",
"'hostname'",
"]",
":",
"ret",
"[",
"'Error'",
"]",
"=",
"'Key must be either u... | Create snapshot of a vm
vm : string
vm to be targeted
name : string
snapshot name
The snapname must be 64 characters or less
and must only contain alphanumeric characters and
characters in the set [-_.:%] to comply with ZFS restrictions.
key : string [uui... | [
"Create",
"snapshot",
"of",
"a",
"vm"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smartos_vmadm.py#L535-L583 | train | Create a snapshot of a 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/modules/smartos_vmadm.py | reprovision | def reprovision(vm, image, key='uuid'):
'''
Reprovision a vm
vm : string
vm to be reprovisioned
image : string
uuid of new image
key : string [uuid|alias|hostname]
value type of 'vm' parameter
CLI Example:
.. code-block:: bash
salt '*' vmadm.reprovision 18... | python | def reprovision(vm, image, key='uuid'):
'''
Reprovision a vm
vm : string
vm to be reprovisioned
image : string
uuid of new image
key : string [uuid|alias|hostname]
value type of 'vm' parameter
CLI Example:
.. code-block:: bash
salt '*' vmadm.reprovision 18... | [
"def",
"reprovision",
"(",
"vm",
",",
"image",
",",
"key",
"=",
"'uuid'",
")",
":",
"ret",
"=",
"{",
"}",
"if",
"key",
"not",
"in",
"[",
"'uuid'",
",",
"'alias'",
",",
"'hostname'",
"]",
":",
"ret",
"[",
"'Error'",
"]",
"=",
"'Key must be either uuid... | Reprovision a vm
vm : string
vm to be reprovisioned
image : string
uuid of new image
key : string [uuid|alias|hostname]
value type of 'vm' parameter
CLI Example:
.. code-block:: bash
salt '*' vmadm.reprovision 186da9ab-7392-4f55-91a5-b8f1fe770543 c02a2044-c1bd-11e... | [
"Reprovision",
"a",
"vm"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smartos_vmadm.py#L682-L720 | train | Reprovision a 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/modules/smartos_vmadm.py | create | def create(from_file=None, **kwargs):
'''
Create a new vm
from_file : string
json file to create the vm from -- if present, all other options will be ignored
kwargs : string|int|...
options to set for the vm
CLI Example:
.. code-block:: bash
salt '*' vmadm.create from... | python | def create(from_file=None, **kwargs):
'''
Create a new vm
from_file : string
json file to create the vm from -- if present, all other options will be ignored
kwargs : string|int|...
options to set for the vm
CLI Example:
.. code-block:: bash
salt '*' vmadm.create from... | [
"def",
"create",
"(",
"from_file",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"{",
"}",
"# prepare vmcfg",
"vmcfg",
"=",
"{",
"}",
"kwargs",
"=",
"salt",
".",
"utils",
".",
"args",
".",
"clean_kwargs",
"(",
"*",
"*",
"kwargs",
")",... | Create a new vm
from_file : string
json file to create the vm from -- if present, all other options will be ignored
kwargs : string|int|...
options to set for the vm
CLI Example:
.. code-block:: bash
salt '*' vmadm.create from_file=/tmp/new_vm.json
salt '*' vmadm.crea... | [
"Create",
"a",
"new",
"vm"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smartos_vmadm.py#L723-L749 | train | Create a new vm using the from_file option | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/smartos_vmadm.py | update | def update(vm, from_file=None, key='uuid', **kwargs):
'''
Update a new vm
vm : string
vm to be updated
from_file : string
json file to update the vm with -- if present, all other options will be ignored
key : string [uuid|alias|hostname]
value type of 'vm' parameter
kwar... | python | def update(vm, from_file=None, key='uuid', **kwargs):
'''
Update a new vm
vm : string
vm to be updated
from_file : string
json file to update the vm with -- if present, all other options will be ignored
key : string [uuid|alias|hostname]
value type of 'vm' parameter
kwar... | [
"def",
"update",
"(",
"vm",
",",
"from_file",
"=",
"None",
",",
"key",
"=",
"'uuid'",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"{",
"}",
"# prepare vmcfg",
"vmcfg",
"=",
"{",
"}",
"kwargs",
"=",
"salt",
".",
"utils",
".",
"args",
".",
"clea... | Update a new vm
vm : string
vm to be updated
from_file : string
json file to update the vm with -- if present, all other options will be ignored
key : string [uuid|alias|hostname]
value type of 'vm' parameter
kwargs : string|int|...
options to update for the vm
CLI ... | [
"Update",
"a",
"new",
"vm"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smartos_vmadm.py#L752-L790 | train | Update a new virtual machine with the given key | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/smartos_vmadm.py | send | def send(vm, target, key='uuid'):
'''
Send a vm to a directory
vm : string
vm to be sent
target : string
target directory
key : string [uuid|alias|hostname]
value type of 'vm' parameter
CLI Example:
.. code-block:: bash
salt '*' vmadm.send 186da9ab-7392-4f... | python | def send(vm, target, key='uuid'):
'''
Send a vm to a directory
vm : string
vm to be sent
target : string
target directory
key : string [uuid|alias|hostname]
value type of 'vm' parameter
CLI Example:
.. code-block:: bash
salt '*' vmadm.send 186da9ab-7392-4f... | [
"def",
"send",
"(",
"vm",
",",
"target",
",",
"key",
"=",
"'uuid'",
")",
":",
"ret",
"=",
"{",
"}",
"if",
"key",
"not",
"in",
"[",
"'uuid'",
",",
"'alias'",
",",
"'hostname'",
"]",
":",
"ret",
"[",
"'Error'",
"]",
"=",
"'Key must be either uuid, alia... | Send a vm to a directory
vm : string
vm to be sent
target : string
target directory
key : string [uuid|alias|hostname]
value type of 'vm' parameter
CLI Example:
.. code-block:: bash
salt '*' vmadm.send 186da9ab-7392-4f55-91a5-b8f1fe770543 /opt/backups
salt... | [
"Send",
"a",
"vm",
"to",
"a",
"directory"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smartos_vmadm.py#L793-L848 | train | Send a vm to a directory | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/smartos_vmadm.py | receive | def receive(uuid, source):
'''
Receive a vm from a directory
uuid : string
uuid of vm to be received
source : string
source directory
CLI Example:
.. code-block:: bash
salt '*' vmadm.receive 186da9ab-7392-4f55-91a5-b8f1fe770543 /opt/backups
'''
ret = {}
if... | python | def receive(uuid, source):
'''
Receive a vm from a directory
uuid : string
uuid of vm to be received
source : string
source directory
CLI Example:
.. code-block:: bash
salt '*' vmadm.receive 186da9ab-7392-4f55-91a5-b8f1fe770543 /opt/backups
'''
ret = {}
if... | [
"def",
"receive",
"(",
"uuid",
",",
"source",
")",
":",
"ret",
"=",
"{",
"}",
"if",
"not",
"os",
".",
"path",
".",
"isdir",
"(",
"source",
")",
":",
"ret",
"[",
"'Error'",
"]",
"=",
"'Source must be a directory or host'",
"return",
"ret",
"if",
"not",
... | Receive a vm from a directory
uuid : string
uuid of vm to be received
source : string
source directory
CLI Example:
.. code-block:: bash
salt '*' vmadm.receive 186da9ab-7392-4f55-91a5-b8f1fe770543 /opt/backups | [
"Receive",
"a",
"vm",
"from",
"a",
"directory"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smartos_vmadm.py#L851-L905 | train | Receive a vm from a directory | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/win_dism.py | add_capability | def add_capability(capability,
source=None,
limit_access=False,
image=None,
restart=False):
'''
Install a capability
Args:
capability (str): The capability to install
source (Optional[str]): The optional source of t... | python | def add_capability(capability,
source=None,
limit_access=False,
image=None,
restart=False):
'''
Install a capability
Args:
capability (str): The capability to install
source (Optional[str]): The optional source of t... | [
"def",
"add_capability",
"(",
"capability",
",",
"source",
"=",
"None",
",",
"limit_access",
"=",
"False",
",",
"image",
"=",
"None",
",",
"restart",
"=",
"False",
")",
":",
"if",
"salt",
".",
"utils",
".",
"versions",
".",
"version_cmp",
"(",
"__grains_... | Install a capability
Args:
capability (str): The capability to install
source (Optional[str]): The optional source of the capability. Default
is set by group policy and can be Windows Update.
limit_access (Optional[bool]): Prevent DISM from contacting Windows
Update ... | [
"Install",
"a",
"capability"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_dism.py#L48-L98 | train | Install a capability to the Windows Nagios 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/modules/win_dism.py | remove_capability | def remove_capability(capability, image=None, restart=False):
'''
Uninstall a capability
Args:
capability(str): The capability to be removed
image (Optional[str]): The path to the root directory of an offline
Windows image. If `None` is passed, the running operating system is
... | python | def remove_capability(capability, image=None, restart=False):
'''
Uninstall a capability
Args:
capability(str): The capability to be removed
image (Optional[str]): The path to the root directory of an offline
Windows image. If `None` is passed, the running operating system is
... | [
"def",
"remove_capability",
"(",
"capability",
",",
"image",
"=",
"None",
",",
"restart",
"=",
"False",
")",
":",
"if",
"salt",
".",
"utils",
".",
"versions",
".",
"version_cmp",
"(",
"__grains__",
"[",
"'osversion'",
"]",
",",
"'10'",
")",
"==",
"-",
... | Uninstall a capability
Args:
capability(str): The capability to be removed
image (Optional[str]): The path to the root directory of an offline
Windows image. If `None` is passed, the running operating system is
targeted. Default is None.
restart (Optional[bool]): Reb... | [
"Uninstall",
"a",
"capability"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_dism.py#L101-L139 | train | Uninstall a capability from the current system | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/win_dism.py | get_capabilities | def get_capabilities(image=None):
'''
List all capabilities on the system
Args:
image (Optional[str]): The path to the root directory of an offline
Windows image. If `None` is passed, the running operating system is
targeted. Default is None.
Raises:
NotImplemen... | python | def get_capabilities(image=None):
'''
List all capabilities on the system
Args:
image (Optional[str]): The path to the root directory of an offline
Windows image. If `None` is passed, the running operating system is
targeted. Default is None.
Raises:
NotImplemen... | [
"def",
"get_capabilities",
"(",
"image",
"=",
"None",
")",
":",
"if",
"salt",
".",
"utils",
".",
"versions",
".",
"version_cmp",
"(",
"__grains__",
"[",
"'osversion'",
"]",
",",
"'10'",
")",
"==",
"-",
"1",
":",
"raise",
"NotImplementedError",
"(",
"'`in... | List all capabilities on the system
Args:
image (Optional[str]): The path to the root directory of an offline
Windows image. If `None` is passed, the running operating system is
targeted. Default is None.
Raises:
NotImplementedError: For all versions of Windows that are... | [
"List",
"all",
"capabilities",
"on",
"the",
"system"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_dism.py#L142-L179 | train | Return a list of all capabilities 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/modules/win_dism.py | installed_capabilities | def installed_capabilities(image=None):
'''
List the capabilities installed on the system
Args:
image (Optional[str]): The path to the root directory of an offline
Windows image. If `None` is passed, the running operating system is
targeted. Default is None.
Raises:
... | python | def installed_capabilities(image=None):
'''
List the capabilities installed on the system
Args:
image (Optional[str]): The path to the root directory of an offline
Windows image. If `None` is passed, the running operating system is
targeted. Default is None.
Raises:
... | [
"def",
"installed_capabilities",
"(",
"image",
"=",
"None",
")",
":",
"if",
"salt",
".",
"utils",
".",
"versions",
".",
"version_cmp",
"(",
"__grains__",
"[",
"'osversion'",
"]",
",",
"'10'",
")",
"==",
"-",
"1",
":",
"raise",
"NotImplementedError",
"(",
... | List the capabilities installed on the system
Args:
image (Optional[str]): The path to the root directory of an offline
Windows image. If `None` is passed, the running operating system is
targeted. Default is None.
Raises:
NotImplementedError: For all versions of Window... | [
"List",
"the",
"capabilities",
"installed",
"on",
"the",
"system"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_dism.py#L182-L208 | train | Return a list of installed capabilities 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/modules/win_dism.py | add_feature | def add_feature(feature,
package=None,
source=None,
limit_access=False,
enable_parent=False,
image=None,
restart=False):
'''
Install a feature using DISM
Args:
feature (str): The feature to install
... | python | def add_feature(feature,
package=None,
source=None,
limit_access=False,
enable_parent=False,
image=None,
restart=False):
'''
Install a feature using DISM
Args:
feature (str): The feature to install
... | [
"def",
"add_feature",
"(",
"feature",
",",
"package",
"=",
"None",
",",
"source",
"=",
"None",
",",
"limit_access",
"=",
"False",
",",
"enable_parent",
"=",
"False",
",",
"image",
"=",
"None",
",",
"restart",
"=",
"False",
")",
":",
"cmd",
"=",
"[",
... | Install a feature using DISM
Args:
feature (str): The feature to install
package (Optional[str]): The parent package for the feature. You do not
have to specify the package if it is the Windows Foundation Package.
Otherwise, use package to specify the parent package of the f... | [
"Install",
"a",
"feature",
"using",
"DISM"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_dism.py#L240-L291 | train | Install a feature using DISM and return the result of the command | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/win_dism.py | remove_feature | def remove_feature(feature, remove_payload=False, image=None, restart=False):
'''
Disables the feature.
Args:
feature (str): The feature to uninstall
remove_payload (Optional[bool]): Remove the feature's payload. Must
supply source when enabling in the future.
image (Opt... | python | def remove_feature(feature, remove_payload=False, image=None, restart=False):
'''
Disables the feature.
Args:
feature (str): The feature to uninstall
remove_payload (Optional[bool]): Remove the feature's payload. Must
supply source when enabling in the future.
image (Opt... | [
"def",
"remove_feature",
"(",
"feature",
",",
"remove_payload",
"=",
"False",
",",
"image",
"=",
"None",
",",
"restart",
"=",
"False",
")",
":",
"cmd",
"=",
"[",
"'DISM'",
",",
"'/Quiet'",
",",
"'/Image:{0}'",
".",
"format",
"(",
"image",
")",
"if",
"i... | Disables the feature.
Args:
feature (str): The feature to uninstall
remove_payload (Optional[bool]): Remove the feature's payload. Must
supply source when enabling in the future.
image (Optional[str]): The path to the root directory of an offline
Windows image. If `N... | [
"Disables",
"the",
"feature",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_dism.py#L294-L327 | train | Disables a feature from 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/modules/win_dism.py | get_features | def get_features(package=None, image=None):
'''
List features on the system or in a package
Args:
package (Optional[str]): The full path to the package. Can be either a
.cab file or a folder. Should point to the original source of the
package, not to where the file is instal... | python | def get_features(package=None, image=None):
'''
List features on the system or in a package
Args:
package (Optional[str]): The full path to the package. Can be either a
.cab file or a folder. Should point to the original source of the
package, not to where the file is instal... | [
"def",
"get_features",
"(",
"package",
"=",
"None",
",",
"image",
"=",
"None",
")",
":",
"cmd",
"=",
"[",
"'DISM'",
",",
"'/English'",
",",
"'/Image:{0}'",
".",
"format",
"(",
"image",
")",
"if",
"image",
"else",
"'/Online'",
",",
"'/Get-Features'",
"]",... | List features on the system or in a package
Args:
package (Optional[str]): The full path to the package. Can be either a
.cab file or a folder. Should point to the original source of the
package, not to where the file is installed. You cannot use this
command to get pack... | [
"List",
"features",
"on",
"the",
"system",
"or",
"in",
"a",
"package"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_dism.py#L330-L379 | train | Return a list of features on the system or in a package. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/win_dism.py | add_package | def add_package(package,
ignore_check=False,
prevent_pending=False,
image=None,
restart=False):
'''
Install a package using DISM
Args:
package (str):
The package to install. Can be a .cab file, a .msu file, or a folder
... | python | def add_package(package,
ignore_check=False,
prevent_pending=False,
image=None,
restart=False):
'''
Install a package using DISM
Args:
package (str):
The package to install. Can be a .cab file, a .msu file, or a folder
... | [
"def",
"add_package",
"(",
"package",
",",
"ignore_check",
"=",
"False",
",",
"prevent_pending",
"=",
"False",
",",
"image",
"=",
"None",
",",
"restart",
"=",
"False",
")",
":",
"cmd",
"=",
"[",
"'DISM'",
",",
"'/Quiet'",
",",
"'/Image:{0}'",
".",
"forma... | Install a package using DISM
Args:
package (str):
The package to install. Can be a .cab file, a .msu file, or a folder
.. note::
An `.msu` package is supported only when the target image is
offline, either mounted or applied.
ignore_check (O... | [
"Install",
"a",
"package",
"using",
"DISM"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_dism.py#L424-L477 | train | Install a package using DISM and return the result of the command | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/win_dism.py | remove_package | def remove_package(package, image=None, restart=False):
'''
Uninstall a package
Args:
package (str): The full path to the package. Can be either a .cab file
or a folder. Should point to the original source of the package, not
to where the file is installed. This can also be ... | python | def remove_package(package, image=None, restart=False):
'''
Uninstall a package
Args:
package (str): The full path to the package. Can be either a .cab file
or a folder. Should point to the original source of the package, not
to where the file is installed. This can also be ... | [
"def",
"remove_package",
"(",
"package",
",",
"image",
"=",
"None",
",",
"restart",
"=",
"False",
")",
":",
"cmd",
"=",
"[",
"'DISM'",
",",
"'/Quiet'",
",",
"'/Image:{0}'",
".",
"format",
"(",
"image",
")",
"if",
"image",
"else",
"'/Online'",
",",
"'/R... | Uninstall a package
Args:
package (str): The full path to the package. Can be either a .cab file
or a folder. Should point to the original source of the package, not
to where the file is installed. This can also be the name of a package as listed in
``dism.installed_pack... | [
"Uninstall",
"a",
"package"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_dism.py#L480-L520 | train | Remove a package from 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/modules/win_dism.py | package_info | def package_info(package, image=None):
'''
Display information about a package
Args:
package (str): The full path to the package. Can be either a .cab file
or a folder. Should point to the original source of the package, not
to where the file is installed. You cannot use thi... | python | def package_info(package, image=None):
'''
Display information about a package
Args:
package (str): The full path to the package. Can be either a .cab file
or a folder. Should point to the original source of the package, not
to where the file is installed. You cannot use thi... | [
"def",
"package_info",
"(",
"package",
",",
"image",
"=",
"None",
")",
":",
"cmd",
"=",
"[",
"'DISM'",
",",
"'/English'",
",",
"'/Image:{0}'",
".",
"format",
"(",
"image",
")",
"if",
"image",
"else",
"'/Online'",
",",
"'/Get-PackageInfo'",
"]",
"if",
"'~... | Display information about a package
Args:
package (str): The full path to the package. Can be either a .cab file
or a folder. Should point to the original source of the package, not
to where the file is installed. You cannot use this command to get
package information fo... | [
"Display",
"information",
"about",
"a",
"package"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_dism.py#L544-L589 | train | Display information about a package. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/executors/sudo.py | execute | def execute(opts, data, func, args, kwargs):
'''
Allow for the calling of execution modules via sudo.
This module is invoked by the minion if the ``sudo_user`` minion config is
present.
Example minion config:
.. code-block:: yaml
sudo_user: saltdev
Once this setting is made, any... | python | def execute(opts, data, func, args, kwargs):
'''
Allow for the calling of execution modules via sudo.
This module is invoked by the minion if the ``sudo_user`` minion config is
present.
Example minion config:
.. code-block:: yaml
sudo_user: saltdev
Once this setting is made, any... | [
"def",
"execute",
"(",
"opts",
",",
"data",
",",
"func",
",",
"args",
",",
"kwargs",
")",
":",
"cmd",
"=",
"[",
"'sudo'",
",",
"'-u'",
",",
"opts",
".",
"get",
"(",
"'sudo_user'",
")",
",",
"'salt-call'",
",",
"'--out'",
",",
"'json'",
",",
"'--met... | Allow for the calling of execution modules via sudo.
This module is invoked by the minion if the ``sudo_user`` minion config is
present.
Example minion config:
.. code-block:: yaml
sudo_user: saltdev
Once this setting is made, any execution module call done by the minion will be
run... | [
"Allow",
"for",
"the",
"calling",
"of",
"execution",
"modules",
"via",
"sudo",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/executors/sudo.py#L25-L79 | train | Execute the specified function on the specified minion | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/hg.py | _update_repo | def _update_repo(ret, name, target, clean, user, identity, rev, opts, update_head):
'''
Update the repo to a given revision. Using clean passes -C to the hg up
'''
log.debug('target %s is found, "hg pull && hg up is probably required"', target)
current_rev = __salt__['hg.revision'](target, user=use... | python | def _update_repo(ret, name, target, clean, user, identity, rev, opts, update_head):
'''
Update the repo to a given revision. Using clean passes -C to the hg up
'''
log.debug('target %s is found, "hg pull && hg up is probably required"', target)
current_rev = __salt__['hg.revision'](target, user=use... | [
"def",
"_update_repo",
"(",
"ret",
",",
"name",
",",
"target",
",",
"clean",
",",
"user",
",",
"identity",
",",
"rev",
",",
"opts",
",",
"update_head",
")",
":",
"log",
".",
"debug",
"(",
"'target %s is found, \"hg pull && hg up is probably required\"'",
",",
... | Update the repo to a given revision. Using clean passes -C to the hg up | [
"Update",
"the",
"repo",
"to",
"a",
"given",
"revision",
".",
"Using",
"clean",
"passes",
"-",
"C",
"to",
"the",
"hg",
"up"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/hg.py#L113-L175 | train | Update the repository with a given revision. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/zfs.py | exists | def exists(name, **kwargs):
'''
Check if a ZFS filesystem or volume or snapshot exists.
name : string
name of dataset
type : string
also check if dataset is of a certain type, valid choices are:
filesystem, snapshot, volume, bookmark, or all.
.. versionadded:: 2015.5.0
... | python | def exists(name, **kwargs):
'''
Check if a ZFS filesystem or volume or snapshot exists.
name : string
name of dataset
type : string
also check if dataset is of a certain type, valid choices are:
filesystem, snapshot, volume, bookmark, or all.
.. versionadded:: 2015.5.0
... | [
"def",
"exists",
"(",
"name",
",",
"*",
"*",
"kwargs",
")",
":",
"## Configure command",
"# NOTE: initialize the defaults",
"opts",
"=",
"{",
"}",
"# NOTE: set extra config from kwargs",
"if",
"kwargs",
".",
"get",
"(",
"'type'",
",",
"False",
")",
":",
"opts",
... | Check if a ZFS filesystem or volume or snapshot exists.
name : string
name of dataset
type : string
also check if dataset is of a certain type, valid choices are:
filesystem, snapshot, volume, bookmark, or all.
.. versionadded:: 2015.5.0
CLI Example:
.. code-block:: bash
... | [
"Check",
"if",
"a",
"ZFS",
"filesystem",
"or",
"volume",
"or",
"snapshot",
"exists",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zfs.py#L48-L87 | train | Check if a ZFS filesystem or volume or snapshot exists. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/zfs.py | create | def create(name, **kwargs):
'''
Create a ZFS File System.
name : string
name of dataset or volume
volume_size : string
if specified, a zvol will be created instead of a dataset
sparse : boolean
create sparse volume
create_parent : boolean
creates all the non-exis... | python | def create(name, **kwargs):
'''
Create a ZFS File System.
name : string
name of dataset or volume
volume_size : string
if specified, a zvol will be created instead of a dataset
sparse : boolean
create sparse volume
create_parent : boolean
creates all the non-exis... | [
"def",
"create",
"(",
"name",
",",
"*",
"*",
"kwargs",
")",
":",
"## Configure command",
"# NOTE: initialize the defaults",
"flags",
"=",
"[",
"]",
"opts",
"=",
"{",
"}",
"# NOTE: push filesystem properties",
"filesystem_properties",
"=",
"kwargs",
".",
"get",
"("... | Create a ZFS File System.
name : string
name of dataset or volume
volume_size : string
if specified, a zvol will be created instead of a dataset
sparse : boolean
create sparse volume
create_parent : boolean
creates all the non-existing parent datasets. any property speci... | [
"Create",
"a",
"ZFS",
"File",
"System",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zfs.py#L90-L154 | train | Create a ZFS File System by name | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/zfs.py | destroy | def destroy(name, **kwargs):
'''
Destroy a ZFS File System.
name : string
name of dataset, volume, or snapshot
force : boolean
force an unmount of any file systems using the unmount -f command.
recursive : boolean
recursively destroy all children. (-r)
recursive_all : bo... | python | def destroy(name, **kwargs):
'''
Destroy a ZFS File System.
name : string
name of dataset, volume, or snapshot
force : boolean
force an unmount of any file systems using the unmount -f command.
recursive : boolean
recursively destroy all children. (-r)
recursive_all : bo... | [
"def",
"destroy",
"(",
"name",
",",
"*",
"*",
"kwargs",
")",
":",
"## Configure command",
"# NOTE: initialize the defaults",
"flags",
"=",
"[",
"]",
"# NOTE: set extra config from kwargs",
"if",
"kwargs",
".",
"get",
"(",
"'force'",
",",
"False",
")",
":",
"flag... | Destroy a ZFS File System.
name : string
name of dataset, volume, or snapshot
force : boolean
force an unmount of any file systems using the unmount -f command.
recursive : boolean
recursively destroy all children. (-r)
recursive_all : boolean
recursively destroy all dep... | [
"Destroy",
"a",
"ZFS",
"File",
"System",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zfs.py#L157-L205 | train | Destroy a ZFS File System. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/zfs.py | rename | def rename(name, new_name, **kwargs):
'''
Rename or Relocate a ZFS File System.
name : string
name of dataset, volume, or snapshot
new_name : string
new name of dataset, volume, or snapshot
force : boolean
force unmount any filesystems that need to be unmounted in the proces... | python | def rename(name, new_name, **kwargs):
'''
Rename or Relocate a ZFS File System.
name : string
name of dataset, volume, or snapshot
new_name : string
new name of dataset, volume, or snapshot
force : boolean
force unmount any filesystems that need to be unmounted in the proces... | [
"def",
"rename",
"(",
"name",
",",
"new_name",
",",
"*",
"*",
"kwargs",
")",
":",
"## Configure command",
"# NOTE: initialize the defaults",
"flags",
"=",
"[",
"]",
"target",
"=",
"[",
"]",
"# NOTE: set extra config from kwargs",
"if",
"__utils__",
"[",
"'zfs.is_s... | Rename or Relocate a ZFS File System.
name : string
name of dataset, volume, or snapshot
new_name : string
new name of dataset, volume, or snapshot
force : boolean
force unmount any filesystems that need to be unmounted in the process.
create_parent : boolean
creates all... | [
"Rename",
"or",
"Relocate",
"a",
"ZFS",
"File",
"System",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zfs.py#L208-L270 | train | Rename or Relocate a ZFS File System. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/zfs.py | list_ | def list_(name=None, **kwargs):
'''
Return a list of all datasets or a specified dataset on the system and the
values of their used, available, referenced, and mountpoint properties.
name : string
name of dataset, volume, or snapshot
recursive : boolean
recursively list children
... | python | def list_(name=None, **kwargs):
'''
Return a list of all datasets or a specified dataset on the system and the
values of their used, available, referenced, and mountpoint properties.
name : string
name of dataset, volume, or snapshot
recursive : boolean
recursively list children
... | [
"def",
"list_",
"(",
"name",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"OrderedDict",
"(",
")",
"## update properties",
"# NOTE: properties should be a list",
"properties",
"=",
"kwargs",
".",
"get",
"(",
"'properties'",
",",
"'used,avail,refer... | Return a list of all datasets or a specified dataset on the system and the
values of their used, available, referenced, and mountpoint properties.
name : string
name of dataset, volume, or snapshot
recursive : boolean
recursively list children
depth : int
limit recursion to dept... | [
"Return",
"a",
"list",
"of",
"all",
"datasets",
"or",
"a",
"specified",
"dataset",
"on",
"the",
"system",
"and",
"the",
"values",
"of",
"their",
"used",
"available",
"referenced",
"and",
"mountpoint",
"properties",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zfs.py#L273-L374 | train | Return a list of all datasets or a specified dataset on the system and their associated properties. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/zfs.py | list_mount | def list_mount():
'''
List mounted zfs filesystems
.. versionadded:: 2018.3.1
CLI Example:
.. code-block:: bash
salt '*' zfs.list_mount
'''
## List mounted filesystem
res = __salt__['cmd.run_all'](
__utils__['zfs.zfs_command'](
command='mount',
),... | python | def list_mount():
'''
List mounted zfs filesystems
.. versionadded:: 2018.3.1
CLI Example:
.. code-block:: bash
salt '*' zfs.list_mount
'''
## List mounted filesystem
res = __salt__['cmd.run_all'](
__utils__['zfs.zfs_command'](
command='mount',
),... | [
"def",
"list_mount",
"(",
")",
":",
"## List mounted filesystem",
"res",
"=",
"__salt__",
"[",
"'cmd.run_all'",
"]",
"(",
"__utils__",
"[",
"'zfs.zfs_command'",
"]",
"(",
"command",
"=",
"'mount'",
",",
")",
",",
"python_shell",
"=",
"False",
",",
")",
"if",... | List mounted zfs filesystems
.. versionadded:: 2018.3.1
CLI Example:
.. code-block:: bash
salt '*' zfs.list_mount | [
"List",
"mounted",
"zfs",
"filesystems"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zfs.py#L377-L405 | train | List mounted filesystems | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/zfs.py | mount | def mount(name=None, **kwargs):
'''
Mounts ZFS file systems
name : string
name of the filesystem, having this set to None will mount all filesystems. (this is the default)
overlay : boolean
perform an overlay mount.
options : string
optional comma-separated list of mount opt... | python | def mount(name=None, **kwargs):
'''
Mounts ZFS file systems
name : string
name of the filesystem, having this set to None will mount all filesystems. (this is the default)
overlay : boolean
perform an overlay mount.
options : string
optional comma-separated list of mount opt... | [
"def",
"mount",
"(",
"name",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"## Configure command",
"# NOTE: initialize the defaults",
"flags",
"=",
"[",
"]",
"opts",
"=",
"{",
"}",
"# NOTE: set extra config from kwargs",
"if",
"kwargs",
".",
"get",
"(",
"'ov... | Mounts ZFS file systems
name : string
name of the filesystem, having this set to None will mount all filesystems. (this is the default)
overlay : boolean
perform an overlay mount.
options : string
optional comma-separated list of mount options to use temporarily for
the dura... | [
"Mounts",
"ZFS",
"file",
"systems"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zfs.py#L408-L471 | train | Mount all ZFS file systems in the specified 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/modules/zfs.py | unmount | def unmount(name, **kwargs):
'''
Unmounts ZFS file systems
name : string
name of the filesystem, you can use None to unmount all mounted filesystems.
force : boolean
forcefully unmount the file system, even if it is currently in use.
.. warning::
Using ``-a`` for the name ... | python | def unmount(name, **kwargs):
'''
Unmounts ZFS file systems
name : string
name of the filesystem, you can use None to unmount all mounted filesystems.
force : boolean
forcefully unmount the file system, even if it is currently in use.
.. warning::
Using ``-a`` for the name ... | [
"def",
"unmount",
"(",
"name",
",",
"*",
"*",
"kwargs",
")",
":",
"## Configure command",
"# NOTE: initialize the defaults",
"flags",
"=",
"[",
"]",
"# NOTE: set extra config from kwargs",
"if",
"kwargs",
".",
"get",
"(",
"'force'",
",",
"False",
")",
":",
"flag... | Unmounts ZFS file systems
name : string
name of the filesystem, you can use None to unmount all mounted filesystems.
force : boolean
forcefully unmount the file system, even if it is currently in use.
.. warning::
Using ``-a`` for the name parameter will probably break your system... | [
"Unmounts",
"ZFS",
"file",
"systems"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zfs.py#L474-L525 | train | Unmounts a file system 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/modules/zfs.py | inherit | def inherit(prop, name, **kwargs):
'''
Clears the specified property
prop : string
name of property
name : string
name of the filesystem, volume, or snapshot
recursive : boolean
recursively inherit the given property for all children.
revert : boolean
revert the ... | python | def inherit(prop, name, **kwargs):
'''
Clears the specified property
prop : string
name of property
name : string
name of the filesystem, volume, or snapshot
recursive : boolean
recursively inherit the given property for all children.
revert : boolean
revert the ... | [
"def",
"inherit",
"(",
"prop",
",",
"name",
",",
"*",
"*",
"kwargs",
")",
":",
"## Configure command",
"# NOTE: initialize the defaults",
"flags",
"=",
"[",
"]",
"# NOTE: set extra config from kwargs",
"if",
"kwargs",
".",
"get",
"(",
"'recursive'",
",",
"False",
... | Clears the specified property
prop : string
name of property
name : string
name of the filesystem, volume, or snapshot
recursive : boolean
recursively inherit the given property for all children.
revert : boolean
revert the property to the received value if one exists; o... | [
"Clears",
"the",
"specified",
"property"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zfs.py#L528-L572 | train | Inherit the given property from the given object. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/zfs.py | diff | def diff(name_a, name_b=None, **kwargs):
'''
Display the difference between a snapshot of a given filesystem and
another snapshot of that filesystem from a later time or the current
contents of the filesystem.
name_a : string
name of snapshot
name_b : string
(optional) name of s... | python | def diff(name_a, name_b=None, **kwargs):
'''
Display the difference between a snapshot of a given filesystem and
another snapshot of that filesystem from a later time or the current
contents of the filesystem.
name_a : string
name of snapshot
name_b : string
(optional) name of s... | [
"def",
"diff",
"(",
"name_a",
",",
"name_b",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"## Configure command",
"# NOTE: initialize the defaults",
"flags",
"=",
"[",
"'-H'",
"]",
"target",
"=",
"[",
"]",
"# NOTE: set extra config from kwargs",
"if",
"kwargs... | Display the difference between a snapshot of a given filesystem and
another snapshot of that filesystem from a later time or the current
contents of the filesystem.
name_a : string
name of snapshot
name_b : string
(optional) name of snapshot or filesystem
show_changetime : boolean
... | [
"Display",
"the",
"difference",
"between",
"a",
"snapshot",
"of",
"a",
"given",
"filesystem",
"and",
"another",
"snapshot",
"of",
"that",
"filesystem",
"from",
"a",
"later",
"time",
"or",
"the",
"current",
"contents",
"of",
"the",
"filesystem",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zfs.py#L575-L639 | train | Display the difference between two filesystems and a current filesystem. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/zfs.py | rollback | def rollback(name, **kwargs):
'''
Roll back the given dataset to a previous snapshot.
name : string
name of snapshot
recursive : boolean
destroy any snapshots and bookmarks more recent than the one
specified.
recursive_all : boolean
destroy any more recent snapshots ... | python | def rollback(name, **kwargs):
'''
Roll back the given dataset to a previous snapshot.
name : string
name of snapshot
recursive : boolean
destroy any snapshots and bookmarks more recent than the one
specified.
recursive_all : boolean
destroy any more recent snapshots ... | [
"def",
"rollback",
"(",
"name",
",",
"*",
"*",
"kwargs",
")",
":",
"## Configure command",
"# NOTE: initialize the defaults",
"flags",
"=",
"[",
"]",
"# NOTE: set extra config from kwargs",
"if",
"kwargs",
".",
"get",
"(",
"'recursive_all'",
",",
"False",
")",
":"... | Roll back the given dataset to a previous snapshot.
name : string
name of snapshot
recursive : boolean
destroy any snapshots and bookmarks more recent than the one
specified.
recursive_all : boolean
destroy any more recent snapshots and bookmarks, as well as any
clon... | [
"Roll",
"back",
"the",
"given",
"dataset",
"to",
"a",
"previous",
"snapshot",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zfs.py#L642-L702 | train | Roll back a dataset to a previous snapshot. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/zfs.py | clone | def clone(name_a, name_b, **kwargs):
'''
Creates a clone of the given snapshot.
name_a : string
name of snapshot
name_b : string
name of filesystem or volume
create_parent : boolean
creates all the non-existing parent datasets. any property specified on the
command l... | python | def clone(name_a, name_b, **kwargs):
'''
Creates a clone of the given snapshot.
name_a : string
name of snapshot
name_b : string
name of filesystem or volume
create_parent : boolean
creates all the non-existing parent datasets. any property specified on the
command l... | [
"def",
"clone",
"(",
"name_a",
",",
"name_b",
",",
"*",
"*",
"kwargs",
")",
":",
"## Configure command",
"# NOTE: initialize the defaults",
"flags",
"=",
"[",
"]",
"target",
"=",
"[",
"]",
"# NOTE: push filesystem properties",
"filesystem_properties",
"=",
"kwargs",... | Creates a clone of the given snapshot.
name_a : string
name of snapshot
name_b : string
name of filesystem or volume
create_parent : boolean
creates all the non-existing parent datasets. any property specified on the
command line using the -o option is ignored.
propertie... | [
"Creates",
"a",
"clone",
"of",
"the",
"given",
"snapshot",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zfs.py#L705-L763 | train | Creates a clone of the given snapshot. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/zfs.py | promote | def promote(name):
'''
Promotes a clone file system to no longer be dependent on its "origin"
snapshot.
.. note::
This makes it possible to destroy the file system that the
clone was created from. The clone parent-child dependency relationship
is reversed, so that the origin fi... | python | def promote(name):
'''
Promotes a clone file system to no longer be dependent on its "origin"
snapshot.
.. note::
This makes it possible to destroy the file system that the
clone was created from. The clone parent-child dependency relationship
is reversed, so that the origin fi... | [
"def",
"promote",
"(",
"name",
")",
":",
"## Promote clone",
"res",
"=",
"__salt__",
"[",
"'cmd.run_all'",
"]",
"(",
"__utils__",
"[",
"'zfs.zfs_command'",
"]",
"(",
"command",
"=",
"'promote'",
",",
"target",
"=",
"name",
",",
")",
",",
"python_shell",
"=... | Promotes a clone file system to no longer be dependent on its "origin"
snapshot.
.. note::
This makes it possible to destroy the file system that the
clone was created from. The clone parent-child dependency relationship
is reversed, so that the origin file system becomes a clone of th... | [
"Promotes",
"a",
"clone",
"file",
"system",
"to",
"no",
"longer",
"be",
"dependent",
"on",
"its",
"origin",
"snapshot",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zfs.py#L766-L807 | train | Promotes a clone file system to no longer depend on its origin file system. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/zfs.py | bookmark | def bookmark(snapshot, bookmark):
'''
Creates a bookmark of the given snapshot
.. note::
Bookmarks mark the point in time when the snapshot was created,
and can be used as the incremental source for a zfs send command.
This feature must be enabled to be used. See zpool-features(5)... | python | def bookmark(snapshot, bookmark):
'''
Creates a bookmark of the given snapshot
.. note::
Bookmarks mark the point in time when the snapshot was created,
and can be used as the incremental source for a zfs send command.
This feature must be enabled to be used. See zpool-features(5)... | [
"def",
"bookmark",
"(",
"snapshot",
",",
"bookmark",
")",
":",
"# abort if we do not have feature flags",
"if",
"not",
"__utils__",
"[",
"'zfs.has_feature_flags'",
"]",
"(",
")",
":",
"return",
"OrderedDict",
"(",
"[",
"(",
"'error'",
",",
"'bookmarks are not suppor... | Creates a bookmark of the given snapshot
.. note::
Bookmarks mark the point in time when the snapshot was created,
and can be used as the incremental source for a zfs send command.
This feature must be enabled to be used. See zpool-features(5) for
details on ZFS feature flags and ... | [
"Creates",
"a",
"bookmark",
"of",
"the",
"given",
"snapshot"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zfs.py#L810-L857 | train | Creates a bookmark of the given snapshot | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/zfs.py | holds | def holds(snapshot, **kwargs):
'''
Lists all existing user references for the given snapshot or snapshots.
snapshot : string
name of snapshot
recursive : boolean
lists the holds that are set on the named descendent snapshots also.
.. versionadded:: 2016.3.0
CLI Example:
.... | python | def holds(snapshot, **kwargs):
'''
Lists all existing user references for the given snapshot or snapshots.
snapshot : string
name of snapshot
recursive : boolean
lists the holds that are set on the named descendent snapshots also.
.. versionadded:: 2016.3.0
CLI Example:
.... | [
"def",
"holds",
"(",
"snapshot",
",",
"*",
"*",
"kwargs",
")",
":",
"## Configure command",
"# NOTE: initialize the defaults",
"flags",
"=",
"[",
"'-H'",
"]",
"target",
"=",
"[",
"]",
"# NOTE: set extra config from kwargs",
"if",
"kwargs",
".",
"get",
"(",
"'rec... | Lists all existing user references for the given snapshot or snapshots.
snapshot : string
name of snapshot
recursive : boolean
lists the holds that are set on the named descendent snapshots also.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt '*' zfs.h... | [
"Lists",
"all",
"existing",
"user",
"references",
"for",
"the",
"given",
"snapshot",
"or",
"snapshots",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zfs.py#L860-L909 | train | Lists all existing user references for the given snapshot or snapshots. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/zfs.py | hold | def hold(tag, *snapshot, **kwargs):
'''
Adds a single reference, named with the tag argument, to the specified
snapshot or snapshots.
.. note::
Each snapshot has its own tag namespace, and tags must be unique within that space.
If a hold exists on a snapshot, attempts to destroy that ... | python | def hold(tag, *snapshot, **kwargs):
'''
Adds a single reference, named with the tag argument, to the specified
snapshot or snapshots.
.. note::
Each snapshot has its own tag namespace, and tags must be unique within that space.
If a hold exists on a snapshot, attempts to destroy that ... | [
"def",
"hold",
"(",
"tag",
",",
"*",
"snapshot",
",",
"*",
"*",
"kwargs",
")",
":",
"## warn about tag change",
"if",
"','",
"in",
"tag",
":",
"salt",
".",
"utils",
".",
"versions",
".",
"warn_until",
"(",
"'Sodium'",
",",
"'A comma-separated tag is no suppo... | Adds a single reference, named with the tag argument, to the specified
snapshot or snapshots.
.. note::
Each snapshot has its own tag namespace, and tags must be unique within that space.
If a hold exists on a snapshot, attempts to destroy that snapshot by
using the zfs destroy comman... | [
"Adds",
"a",
"single",
"reference",
"named",
"with",
"the",
"tag",
"argument",
"to",
"the",
"specified",
"snapshot",
"or",
"snapshots",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zfs.py#L912-L978 | train | Adds a single reference to the specified snapshot or snapshots. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/zfs.py | snapshot | def snapshot(*snapshot, **kwargs):
'''
Creates snapshots with the given names.
snapshot : string
name of snapshot(s)
recursive : boolean
recursively create snapshots of all descendent datasets.
properties : dict
additional zfs properties (-o)
.. note::
ZFS prop... | python | def snapshot(*snapshot, **kwargs):
'''
Creates snapshots with the given names.
snapshot : string
name of snapshot(s)
recursive : boolean
recursively create snapshots of all descendent datasets.
properties : dict
additional zfs properties (-o)
.. note::
ZFS prop... | [
"def",
"snapshot",
"(",
"*",
"snapshot",
",",
"*",
"*",
"kwargs",
")",
":",
"## Configure command",
"# NOTE: initialize the defaults",
"flags",
"=",
"[",
"]",
"# NOTE: push filesystem properties",
"filesystem_properties",
"=",
"kwargs",
".",
"get",
"(",
"'properties'"... | Creates snapshots with the given names.
snapshot : string
name of snapshot(s)
recursive : boolean
recursively create snapshots of all descendent datasets.
properties : dict
additional zfs properties (-o)
.. note::
ZFS properties can be specified at the time of creation... | [
"Creates",
"snapshots",
"with",
"the",
"given",
"names",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zfs.py#L1049-L1100 | train | Creates snapshots of the given names. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/zfs.py | set | def set(*dataset, **kwargs):
'''
Sets the property or list of properties to the given value(s) for each dataset.
dataset : string
name of snapshot(s), filesystem(s), or volume(s)
properties : string
additional zfs properties pairs
.. note::
properties are passed as key-val... | python | def set(*dataset, **kwargs):
'''
Sets the property or list of properties to the given value(s) for each dataset.
dataset : string
name of snapshot(s), filesystem(s), or volume(s)
properties : string
additional zfs properties pairs
.. note::
properties are passed as key-val... | [
"def",
"set",
"(",
"*",
"dataset",
",",
"*",
"*",
"kwargs",
")",
":",
"## Configure command",
"# NOTE: push filesystem properties",
"filesystem_properties",
"=",
"salt",
".",
"utils",
".",
"args",
".",
"clean_kwargs",
"(",
"*",
"*",
"kwargs",
")",
"## Set proper... | Sets the property or list of properties to the given value(s) for each dataset.
dataset : string
name of snapshot(s), filesystem(s), or volume(s)
properties : string
additional zfs properties pairs
.. note::
properties are passed as key-value pairs. e.g.
compression=o... | [
"Sets",
"the",
"property",
"or",
"list",
"of",
"properties",
"to",
"the",
"given",
"value",
"(",
"s",
")",
"for",
"each",
"dataset",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zfs.py#L1103-L1155 | train | Sets the property or list of properties to the given value for each dataset. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/zfs.py | get | def get(*dataset, **kwargs):
'''
Displays properties for the given datasets.
dataset : string
name of snapshot(s), filesystem(s), or volume(s)
properties : string
comma-separated list of properties to list, defaults to all
recursive : boolean
recursively list children
de... | python | def get(*dataset, **kwargs):
'''
Displays properties for the given datasets.
dataset : string
name of snapshot(s), filesystem(s), or volume(s)
properties : string
comma-separated list of properties to list, defaults to all
recursive : boolean
recursively list children
de... | [
"def",
"get",
"(",
"*",
"dataset",
",",
"*",
"*",
"kwargs",
")",
":",
"## Configure command",
"# NOTE: initialize the defaults",
"flags",
"=",
"[",
"'-H'",
"]",
"opts",
"=",
"{",
"}",
"# NOTE: set extra config from kwargs",
"if",
"kwargs",
".",
"get",
"(",
"'d... | Displays properties for the given datasets.
dataset : string
name of snapshot(s), filesystem(s), or volume(s)
properties : string
comma-separated list of properties to list, defaults to all
recursive : boolean
recursively list children
depth : int
recursively list childr... | [
"Displays",
"properties",
"for",
"the",
"given",
"datasets",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zfs.py#L1158-L1264 | train | Return a list of properties for the given datasets. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/versions.py | warn_until | def warn_until(version,
message,
category=DeprecationWarning,
stacklevel=None,
_version_info_=None,
_dont_call_warnings=False):
'''
Helper function to raise a warning, by default, a ``DeprecationWarning``,
until the provided ``versio... | python | def warn_until(version,
message,
category=DeprecationWarning,
stacklevel=None,
_version_info_=None,
_dont_call_warnings=False):
'''
Helper function to raise a warning, by default, a ``DeprecationWarning``,
until the provided ``versio... | [
"def",
"warn_until",
"(",
"version",
",",
"message",
",",
"category",
"=",
"DeprecationWarning",
",",
"stacklevel",
"=",
"None",
",",
"_version_info_",
"=",
"None",
",",
"_dont_call_warnings",
"=",
"False",
")",
":",
"if",
"not",
"isinstance",
"(",
"version",
... | Helper function to raise a warning, by default, a ``DeprecationWarning``,
until the provided ``version``, after which, a ``RuntimeError`` will
be raised to remind the developers to remove the warning because the
target version has been reached.
:param version: The version info or name after which the w... | [
"Helper",
"function",
"to",
"raise",
"a",
"warning",
"by",
"default",
"a",
"DeprecationWarning",
"until",
"the",
"provided",
"version",
"after",
"which",
"a",
"RuntimeError",
"will",
"be",
"raised",
"to",
"remind",
"the",
"developers",
"to",
"remove",
"the",
"... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/versions.py#L78-L162 | train | Helper function to raise a deprecation warning or a RuntimeError until the provided version is reached. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/versions.py | kwargs_warn_until | def kwargs_warn_until(kwargs,
version,
category=DeprecationWarning,
stacklevel=None,
_version_info_=None,
_dont_call_warnings=False):
'''
Helper function to raise a warning (by default, a ``DeprecationW... | python | def kwargs_warn_until(kwargs,
version,
category=DeprecationWarning,
stacklevel=None,
_version_info_=None,
_dont_call_warnings=False):
'''
Helper function to raise a warning (by default, a ``DeprecationW... | [
"def",
"kwargs_warn_until",
"(",
"kwargs",
",",
"version",
",",
"category",
"=",
"DeprecationWarning",
",",
"stacklevel",
"=",
"None",
",",
"_version_info_",
"=",
"None",
",",
"_dont_call_warnings",
"=",
"False",
")",
":",
"if",
"not",
"isinstance",
"(",
"vers... | Helper function to raise a warning (by default, a ``DeprecationWarning``)
when unhandled keyword arguments are passed to function, until the
provided ``version_info``, after which, a ``RuntimeError`` will be raised
to remind the developers to remove the ``**kwargs`` because the target
version has been r... | [
"Helper",
"function",
"to",
"raise",
"a",
"warning",
"(",
"by",
"default",
"a",
"DeprecationWarning",
")",
"when",
"unhandled",
"keyword",
"arguments",
"are",
"passed",
"to",
"function",
"until",
"the",
"provided",
"version_info",
"after",
"which",
"a",
"Runtime... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/versions.py#L165-L232 | train | Helper function to raise a warning when the kwargs argument is passed to the function. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/versions.py | version_cmp | def version_cmp(pkg1, pkg2, ignore_epoch=False):
'''
Compares two version strings using salt.utils.versions.LooseVersion. This
is a fallback for providers which don't have a version comparison utility
built into them. Return -1 if version1 < version2, 0 if version1 ==
version2, and 1 if version1 > ... | python | def version_cmp(pkg1, pkg2, ignore_epoch=False):
'''
Compares two version strings using salt.utils.versions.LooseVersion. This
is a fallback for providers which don't have a version comparison utility
built into them. Return -1 if version1 < version2, 0 if version1 ==
version2, and 1 if version1 > ... | [
"def",
"version_cmp",
"(",
"pkg1",
",",
"pkg2",
",",
"ignore_epoch",
"=",
"False",
")",
":",
"normalize",
"=",
"lambda",
"x",
":",
"six",
".",
"text_type",
"(",
"x",
")",
".",
"split",
"(",
"':'",
",",
"1",
")",
"[",
"-",
"1",
"]",
"if",
"ignore_... | Compares two version strings using salt.utils.versions.LooseVersion. This
is a fallback for providers which don't have a version comparison utility
built into them. Return -1 if version1 < version2, 0 if version1 ==
version2, and 1 if version1 > version2. Return None if there was a problem
making the c... | [
"Compares",
"two",
"version",
"strings",
"using",
"salt",
".",
"utils",
".",
"versions",
".",
"LooseVersion",
".",
"This",
"is",
"a",
"fallback",
"for",
"providers",
"which",
"don",
"t",
"have",
"a",
"version",
"comparison",
"utility",
"built",
"into",
"them... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/versions.py#L235-L258 | train | Compares two version strings using salt. utils. versions. LooseVersion. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/versions.py | compare | def compare(ver1='', oper='==', ver2='', cmp_func=None, ignore_epoch=False):
'''
Compares two version numbers. Accepts a custom function to perform the
cmp-style version comparison, otherwise uses version_cmp().
'''
cmp_map = {'<': (-1,), '<=': (-1, 0), '==': (0,),
'>=': (0, 1), '>': ... | python | def compare(ver1='', oper='==', ver2='', cmp_func=None, ignore_epoch=False):
'''
Compares two version numbers. Accepts a custom function to perform the
cmp-style version comparison, otherwise uses version_cmp().
'''
cmp_map = {'<': (-1,), '<=': (-1, 0), '==': (0,),
'>=': (0, 1), '>': ... | [
"def",
"compare",
"(",
"ver1",
"=",
"''",
",",
"oper",
"=",
"'=='",
",",
"ver2",
"=",
"''",
",",
"cmp_func",
"=",
"None",
",",
"ignore_epoch",
"=",
"False",
")",
":",
"cmp_map",
"=",
"{",
"'<'",
":",
"(",
"-",
"1",
",",
")",
",",
"'<='",
":",
... | Compares two version numbers. Accepts a custom function to perform the
cmp-style version comparison, otherwise uses version_cmp(). | [
"Compares",
"two",
"version",
"numbers",
".",
"Accepts",
"a",
"custom",
"function",
"to",
"perform",
"the",
"cmp",
"-",
"style",
"version",
"comparison",
"otherwise",
"uses",
"version_cmp",
"()",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/versions.py#L261-L294 | train | Compares two version numbers. Accepts a custom function to perform the version comparison. Accepts a custom function to perform the version comparison. Accepts a custom function to perform the version comparison. Accepts a custom function to perform the version comparison. Accepts a custom function to perform the versi... | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/versions.py | check_boto_reqs | def check_boto_reqs(boto_ver=None,
boto3_ver=None,
botocore_ver=None,
check_boto=True,
check_boto3=True):
'''
Checks for the version of various required boto libs in one central location. Most
boto states and modules rely on a s... | python | def check_boto_reqs(boto_ver=None,
boto3_ver=None,
botocore_ver=None,
check_boto=True,
check_boto3=True):
'''
Checks for the version of various required boto libs in one central location. Most
boto states and modules rely on a s... | [
"def",
"check_boto_reqs",
"(",
"boto_ver",
"=",
"None",
",",
"boto3_ver",
"=",
"None",
",",
"botocore_ver",
"=",
"None",
",",
"check_boto",
"=",
"True",
",",
"check_boto3",
"=",
"True",
")",
":",
"if",
"check_boto",
"is",
"True",
":",
"try",
":",
"# Late... | Checks for the version of various required boto libs in one central location. Most
boto states and modules rely on a single version of the boto, boto3, or botocore libs.
However, some require newer versions of any of these dependencies. This function allows
the module to pass in a version to override the de... | [
"Checks",
"for",
"the",
"version",
"of",
"various",
"required",
"boto",
"libs",
"in",
"one",
"central",
"location",
".",
"Most",
"boto",
"states",
"and",
"modules",
"rely",
"on",
"a",
"single",
"version",
"of",
"the",
"boto",
"boto3",
"or",
"botocore",
"li... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/versions.py#L297-L364 | train | Checks if the minimum version of the boto modules and states are required. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/boto_elbv2.py | create_target_group | def create_target_group(name, protocol, port, vpc_id,
region=None, key=None, keyid=None, profile=None,
health_check_protocol='HTTP', health_check_port='traffic-port',
health_check_path='/', health_check_interval_seconds=30,
... | python | def create_target_group(name, protocol, port, vpc_id,
region=None, key=None, keyid=None, profile=None,
health_check_protocol='HTTP', health_check_port='traffic-port',
health_check_path='/', health_check_interval_seconds=30,
... | [
"def",
"create_target_group",
"(",
"name",
",",
"protocol",
",",
"port",
",",
"vpc_id",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
",",
"health_check_protocol",
"=",
"'HTTP'",
",",
"health... | .. versionadded:: 2017.11.0
Create target group if not present.
name
(string) - The name of the target group.
protocol
(string) - The protocol to use for routing traffic to the targets
port
(int) - The port on which the targets receive traffic. This port is used unless
... | [
"..",
"versionadded",
"::",
"2017",
".",
"11",
".",
"0"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_elbv2.py#L58-L150 | train | Create a target group for routing traffic to the load balancer. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/boto_elbv2.py | delete_target_group | def delete_target_group(name, region=None, key=None, keyid=None, profile=None):
'''
Delete target group.
name
(string) - The Amazon Resource Name (ARN) of the resource.
returns
(bool) - True on success, False on failure.
CLI example:
.. code-block:: bash
check-target... | python | def delete_target_group(name, region=None, key=None, keyid=None, profile=None):
'''
Delete target group.
name
(string) - The Amazon Resource Name (ARN) of the resource.
returns
(bool) - True on success, False on failure.
CLI example:
.. code-block:: bash
check-target... | [
"def",
"delete_target_group",
"(",
"name",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'result'",
":",
"None",
",",
"'comment'",
... | Delete target group.
name
(string) - The Amazon Resource Name (ARN) of the resource.
returns
(bool) - True on success, False on failure.
CLI example:
.. code-block:: bash
check-target:
boto_elb2.delete_targets_group:
- name: myALB
- protocol... | [
"Delete",
"target",
"group",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_elbv2.py#L153-L198 | train | Delete a target group. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/boto_elbv2.py | targets_registered | def targets_registered(name, targets, region=None, key=None, keyid=None,
profile=None, **kwargs):
'''
.. versionadded:: 2017.7.0
Add targets to an Application Load Balancer target group. This state will not remove targets.
name
The ARN of the Application Load Balancer Ta... | python | def targets_registered(name, targets, region=None, key=None, keyid=None,
profile=None, **kwargs):
'''
.. versionadded:: 2017.7.0
Add targets to an Application Load Balancer target group. This state will not remove targets.
name
The ARN of the Application Load Balancer Ta... | [
"def",
"targets_registered",
"(",
"name",
",",
"targets",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
... | .. versionadded:: 2017.7.0
Add targets to an Application Load Balancer target group. This state will not remove targets.
name
The ARN of the Application Load Balancer Target Group to add targets to.
targets
A list of target IDs or a string of a single target that this target group should
... | [
"..",
"versionadded",
"::",
"2017",
".",
"7",
".",
"0"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_elbv2.py#L201-L279 | train | Ensure that the specified targets are registered on the specified target group. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/bamboohr.py | list_employees | def list_employees(order_by='id'):
'''
Show all employees for this company.
CLI Example:
salt myminion bamboohr.list_employees
By default, the return data will be keyed by ID. However, it can be ordered
by any other field. Keep in mind that if the field that is chosen contains
duplica... | python | def list_employees(order_by='id'):
'''
Show all employees for this company.
CLI Example:
salt myminion bamboohr.list_employees
By default, the return data will be keyed by ID. However, it can be ordered
by any other field. Keep in mind that if the field that is chosen contains
duplica... | [
"def",
"list_employees",
"(",
"order_by",
"=",
"'id'",
")",
":",
"ret",
"=",
"{",
"}",
"status",
",",
"result",
"=",
"_query",
"(",
"action",
"=",
"'employees'",
",",
"command",
"=",
"'directory'",
")",
"root",
"=",
"ET",
".",
"fromstring",
"(",
"resul... | Show all employees for this company.
CLI Example:
salt myminion bamboohr.list_employees
By default, the return data will be keyed by ID. However, it can be ordered
by any other field. Keep in mind that if the field that is chosen contains
duplicate values (i.e., location is used, for a compan... | [
"Show",
"all",
"employees",
"for",
"this",
"company",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bamboohr.py#L45-L79 | train | Show all employees for this company. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/bamboohr.py | show_employee | def show_employee(emp_id, fields=None):
'''
Show all employees for this company.
CLI Example:
salt myminion bamboohr.show_employee 1138
By default, the fields normally returned from bamboohr.list_employees are
returned. These fields are:
- canUploadPhoto
- department
... | python | def show_employee(emp_id, fields=None):
'''
Show all employees for this company.
CLI Example:
salt myminion bamboohr.show_employee 1138
By default, the fields normally returned from bamboohr.list_employees are
returned. These fields are:
- canUploadPhoto
- department
... | [
"def",
"show_employee",
"(",
"emp_id",
",",
"fields",
"=",
"None",
")",
":",
"ret",
"=",
"{",
"}",
"if",
"fields",
"is",
"None",
":",
"fields",
"=",
"','",
".",
"join",
"(",
"(",
"'canUploadPhoto'",
",",
"'department'",
",",
"'displayName'",
",",
"'fir... | Show all employees for this company.
CLI Example:
salt myminion bamboohr.show_employee 1138
By default, the fields normally returned from bamboohr.list_employees are
returned. These fields are:
- canUploadPhoto
- department
- displayName
- firstName
- id
... | [
"Show",
"all",
"employees",
"for",
"this",
"company",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bamboohr.py#L82-L150 | train | Show the employees for a specific company. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/bamboohr.py | update_employee | def update_employee(emp_id, key=None, value=None, items=None):
'''
Update one or more items for this employee. Specifying an empty value will
clear it for that employee.
CLI Examples:
salt myminion bamboohr.update_employee 1138 nickname Curly
salt myminion bamboohr.update_employee 1138... | python | def update_employee(emp_id, key=None, value=None, items=None):
'''
Update one or more items for this employee. Specifying an empty value will
clear it for that employee.
CLI Examples:
salt myminion bamboohr.update_employee 1138 nickname Curly
salt myminion bamboohr.update_employee 1138... | [
"def",
"update_employee",
"(",
"emp_id",
",",
"key",
"=",
"None",
",",
"value",
"=",
"None",
",",
"items",
"=",
"None",
")",
":",
"if",
"items",
"is",
"None",
":",
"if",
"key",
"is",
"None",
"or",
"value",
"is",
"None",
":",
"return",
"{",
"'Error'... | Update one or more items for this employee. Specifying an empty value will
clear it for that employee.
CLI Examples:
salt myminion bamboohr.update_employee 1138 nickname Curly
salt myminion bamboohr.update_employee 1138 nickname ''
salt myminion bamboohr.update_employee 1138 items='{"n... | [
"Update",
"one",
"or",
"more",
"items",
"for",
"this",
"employee",
".",
"Specifying",
"an",
"empty",
"value",
"will",
"clear",
"it",
"for",
"that",
"employee",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bamboohr.py#L153-L184 | train | Update one or more items for this employee. Specifying an empty value will
clear it for that employee. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/bamboohr.py | list_users | def list_users(order_by='id'):
'''
Show all users for this company.
CLI Example:
salt myminion bamboohr.list_users
By default, the return data will be keyed by ID. However, it can be ordered
by any other field. Keep in mind that if the field that is chosen contains
duplicate values (i... | python | def list_users(order_by='id'):
'''
Show all users for this company.
CLI Example:
salt myminion bamboohr.list_users
By default, the return data will be keyed by ID. However, it can be ordered
by any other field. Keep in mind that if the field that is chosen contains
duplicate values (i... | [
"def",
"list_users",
"(",
"order_by",
"=",
"'id'",
")",
":",
"ret",
"=",
"{",
"}",
"status",
",",
"result",
"=",
"_query",
"(",
"action",
"=",
"'meta'",
",",
"command",
"=",
"'users'",
")",
"root",
"=",
"ET",
".",
"fromstring",
"(",
"result",
")",
... | Show all users for this company.
CLI Example:
salt myminion bamboohr.list_users
By default, the return data will be keyed by ID. However, it can be ordered
by any other field. Keep in mind that if the field that is chosen contains
duplicate values (i.e., location is used, for a company which ... | [
"Show",
"all",
"users",
"for",
"this",
"company",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bamboohr.py#L187-L221 | train | Show all users for this company. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/bamboohr.py | list_meta_fields | def list_meta_fields():
'''
Show all meta data fields for this company.
CLI Example:
salt myminion bamboohr.list_meta_fields
'''
ret = {}
status, result = _query(action='meta', command='fields')
root = ET.fromstring(result)
fields = root.getchildren()
for field in fields:
... | python | def list_meta_fields():
'''
Show all meta data fields for this company.
CLI Example:
salt myminion bamboohr.list_meta_fields
'''
ret = {}
status, result = _query(action='meta', command='fields')
root = ET.fromstring(result)
fields = root.getchildren()
for field in fields:
... | [
"def",
"list_meta_fields",
"(",
")",
":",
"ret",
"=",
"{",
"}",
"status",
",",
"result",
"=",
"_query",
"(",
"action",
"=",
"'meta'",
",",
"command",
"=",
"'fields'",
")",
"root",
"=",
"ET",
".",
"fromstring",
"(",
"result",
")",
"fields",
"=",
"root... | Show all meta data fields for this company.
CLI Example:
salt myminion bamboohr.list_meta_fields | [
"Show",
"all",
"meta",
"data",
"fields",
"for",
"this",
"company",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bamboohr.py#L224-L244 | train | Show all meta data fields for this company. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/bamboohr.py | _query | def _query(action=None,
command=None,
args=None,
method='GET',
data=None):
'''
Make a web call to BambooHR
The password can be any random text, so we chose Salty text.
'''
subdomain = __opts__.get('bamboohr', {}).get('subdomain', None)
path = 'https:/... | python | def _query(action=None,
command=None,
args=None,
method='GET',
data=None):
'''
Make a web call to BambooHR
The password can be any random text, so we chose Salty text.
'''
subdomain = __opts__.get('bamboohr', {}).get('subdomain', None)
path = 'https:/... | [
"def",
"_query",
"(",
"action",
"=",
"None",
",",
"command",
"=",
"None",
",",
"args",
"=",
"None",
",",
"method",
"=",
"'GET'",
",",
"data",
"=",
"None",
")",
":",
"subdomain",
"=",
"__opts__",
".",
"get",
"(",
"'bamboohr'",
",",
"{",
"}",
")",
... | Make a web call to BambooHR
The password can be any random text, so we chose Salty text. | [
"Make",
"a",
"web",
"call",
"to",
"BambooHR"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bamboohr.py#L247-L288 | train | Query the Bamboo HR API for the current 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/spm/pkgdb/sqlite3.py | init | def init():
'''
Get an sqlite3 connection, and initialize the package database if necessary
'''
if not os.path.exists(__opts__['spm_cache_dir']):
log.debug('Creating SPM cache directory at %s', __opts__['spm_db'])
os.makedirs(__opts__['spm_cache_dir'])
if not os.path.exists(__opts__... | python | def init():
'''
Get an sqlite3 connection, and initialize the package database if necessary
'''
if not os.path.exists(__opts__['spm_cache_dir']):
log.debug('Creating SPM cache directory at %s', __opts__['spm_db'])
os.makedirs(__opts__['spm_cache_dir'])
if not os.path.exists(__opts__... | [
"def",
"init",
"(",
")",
":",
"if",
"not",
"os",
".",
"path",
".",
"exists",
"(",
"__opts__",
"[",
"'spm_cache_dir'",
"]",
")",
":",
"log",
".",
"debug",
"(",
"'Creating SPM cache directory at %s'",
",",
"__opts__",
"[",
"'spm_db'",
"]",
")",
"os",
".",
... | Get an sqlite3 connection, and initialize the package database if necessary | [
"Get",
"an",
"sqlite3",
"connection",
"and",
"initialize",
"the",
"package",
"database",
"if",
"necessary"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/spm/pkgdb/sqlite3.py#L20-L69 | train | Initialize the SPM cache directory and database if necessary | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/spm/pkgdb/sqlite3.py | info | def info(package, conn=None):
'''
List info for a package
'''
close = False
if conn is None:
close = True
conn = init()
fields = (
'package',
'version',
'release',
'installed',
'os',
'os_family',
'dependencies',
'os... | python | def info(package, conn=None):
'''
List info for a package
'''
close = False
if conn is None:
close = True
conn = init()
fields = (
'package',
'version',
'release',
'installed',
'os',
'os_family',
'dependencies',
'os... | [
"def",
"info",
"(",
"package",
",",
"conn",
"=",
"None",
")",
":",
"close",
"=",
"False",
"if",
"conn",
"is",
"None",
":",
"close",
"=",
"True",
"conn",
"=",
"init",
"(",
")",
"fields",
"=",
"(",
"'package'",
",",
"'version'",
",",
"'release'",
","... | List info for a package | [
"List",
"info",
"for",
"a",
"package"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/spm/pkgdb/sqlite3.py#L72-L107 | train | Returns a dictionary of information for a package | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/spm/pkgdb/sqlite3.py | list_packages | def list_packages(conn=None):
'''
List files for an installed package
'''
close = False
if conn is None:
close = True
conn = init()
ret = []
data = conn.execute('SELECT package FROM packages')
for pkg in data.fetchall():
ret.append(pkg)
if close:
con... | python | def list_packages(conn=None):
'''
List files for an installed package
'''
close = False
if conn is None:
close = True
conn = init()
ret = []
data = conn.execute('SELECT package FROM packages')
for pkg in data.fetchall():
ret.append(pkg)
if close:
con... | [
"def",
"list_packages",
"(",
"conn",
"=",
"None",
")",
":",
"close",
"=",
"False",
"if",
"conn",
"is",
"None",
":",
"close",
"=",
"True",
"conn",
"=",
"init",
"(",
")",
"ret",
"=",
"[",
"]",
"data",
"=",
"conn",
".",
"execute",
"(",
"'SELECT packag... | List files for an installed package | [
"List",
"files",
"for",
"an",
"installed",
"package"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/spm/pkgdb/sqlite3.py#L110-L126 | train | List all installed packages | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/spm/pkgdb/sqlite3.py | list_files | def list_files(package, conn=None):
'''
List files for an installed package
'''
close = False
if conn is None:
close = True
conn = init()
data = conn.execute('SELECT package FROM packages WHERE package=?', (package, ))
if not data.fetchone():
if close:
co... | python | def list_files(package, conn=None):
'''
List files for an installed package
'''
close = False
if conn is None:
close = True
conn = init()
data = conn.execute('SELECT package FROM packages WHERE package=?', (package, ))
if not data.fetchone():
if close:
co... | [
"def",
"list_files",
"(",
"package",
",",
"conn",
"=",
"None",
")",
":",
"close",
"=",
"False",
"if",
"conn",
"is",
"None",
":",
"close",
"=",
"True",
"conn",
"=",
"init",
"(",
")",
"data",
"=",
"conn",
".",
"execute",
"(",
"'SELECT package FROM packag... | List files for an installed package | [
"List",
"files",
"for",
"an",
"installed",
"package"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/spm/pkgdb/sqlite3.py#L129-L151 | train | List files for an installed package
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/spm/pkgdb/sqlite3.py | register_pkg | def register_pkg(name, formula_def, conn=None):
'''
Register a package in the package database
'''
close = False
if conn is None:
close = True
conn = init()
conn.execute('INSERT INTO packages VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', (
name,
formula_def['version... | python | def register_pkg(name, formula_def, conn=None):
'''
Register a package in the package database
'''
close = False
if conn is None:
close = True
conn = init()
conn.execute('INSERT INTO packages VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', (
name,
formula_def['version... | [
"def",
"register_pkg",
"(",
"name",
",",
"formula_def",
",",
"conn",
"=",
"None",
")",
":",
"close",
"=",
"False",
"if",
"conn",
"is",
"None",
":",
"close",
"=",
"True",
"conn",
"=",
"init",
"(",
")",
"conn",
".",
"execute",
"(",
"'INSERT INTO packages... | Register a package in the package database | [
"Register",
"a",
"package",
"in",
"the",
"package",
"database"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/spm/pkgdb/sqlite3.py#L154-L177 | train | Register a package in the database | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/spm/pkgdb/sqlite3.py | register_file | def register_file(name, member, path, digest='', conn=None):
'''
Register a file in the package database
'''
close = False
if conn is None:
close = True
conn = init()
conn.execute('INSERT INTO files VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', (
name,
'{0}/{1}'.... | python | def register_file(name, member, path, digest='', conn=None):
'''
Register a file in the package database
'''
close = False
if conn is None:
close = True
conn = init()
conn.execute('INSERT INTO files VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', (
name,
'{0}/{1}'.... | [
"def",
"register_file",
"(",
"name",
",",
"member",
",",
"path",
",",
"digest",
"=",
"''",
",",
"conn",
"=",
"None",
")",
":",
"close",
"=",
"False",
"if",
"conn",
"is",
"None",
":",
"close",
"=",
"True",
"conn",
"=",
"init",
"(",
")",
"conn",
".... | Register a file in the package database | [
"Register",
"a",
"file",
"in",
"the",
"package",
"database"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/spm/pkgdb/sqlite3.py#L180-L204 | train | Register a file in the database | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/spm/pkgdb/sqlite3.py | unregister_file | def unregister_file(path, pkg=None, conn=None): # pylint: disable=W0612
'''
Unregister a file from the package database
'''
close = False
if conn is None:
close = True
conn = init()
conn.execute('DELETE FROM files WHERE path=?', (path, ))
if close:
conn.close() | python | def unregister_file(path, pkg=None, conn=None): # pylint: disable=W0612
'''
Unregister a file from the package database
'''
close = False
if conn is None:
close = True
conn = init()
conn.execute('DELETE FROM files WHERE path=?', (path, ))
if close:
conn.close() | [
"def",
"unregister_file",
"(",
"path",
",",
"pkg",
"=",
"None",
",",
"conn",
"=",
"None",
")",
":",
"# pylint: disable=W0612",
"close",
"=",
"False",
"if",
"conn",
"is",
"None",
":",
"close",
"=",
"True",
"conn",
"=",
"init",
"(",
")",
"conn",
".",
"... | Unregister a file from the package database | [
"Unregister",
"a",
"file",
"from",
"the",
"package",
"database"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/spm/pkgdb/sqlite3.py#L217-L228 | train | Unregister a file from the package database | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/proxy/bluecoat_sslv.py | init | def init(opts):
'''
This function gets called when the proxy starts up.
'''
if 'host' not in opts['proxy']:
log.critical('No \'host\' key found in pillar for this proxy.')
return False
if 'username' not in opts['proxy']:
log.critical('No \'username\' key found in pillar for t... | python | def init(opts):
'''
This function gets called when the proxy starts up.
'''
if 'host' not in opts['proxy']:
log.critical('No \'host\' key found in pillar for this proxy.')
return False
if 'username' not in opts['proxy']:
log.critical('No \'username\' key found in pillar for t... | [
"def",
"init",
"(",
"opts",
")",
":",
"if",
"'host'",
"not",
"in",
"opts",
"[",
"'proxy'",
"]",
":",
"log",
".",
"critical",
"(",
"'No \\'host\\' key found in pillar for this proxy.'",
")",
"return",
"False",
"if",
"'username'",
"not",
"in",
"opts",
"[",
"'p... | This function gets called when the proxy starts up. | [
"This",
"function",
"gets",
"called",
"when",
"the",
"proxy",
"starts",
"up",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/bluecoat_sslv.py#L110-L142 | train | Initialize the object with the given options. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/proxy/bluecoat_sslv.py | call | def call(payload, apply_changes=False):
'''
Sends a post command to the device and returns the decoded data.
'''
session, cookies, csrf_token = logon()
response = _post_request(session, payload, cookies, csrf_token)
if apply_changes:
apply_payload = {"jsonrpc": "2.0",
... | python | def call(payload, apply_changes=False):
'''
Sends a post command to the device and returns the decoded data.
'''
session, cookies, csrf_token = logon()
response = _post_request(session, payload, cookies, csrf_token)
if apply_changes:
apply_payload = {"jsonrpc": "2.0",
... | [
"def",
"call",
"(",
"payload",
",",
"apply_changes",
"=",
"False",
")",
":",
"session",
",",
"cookies",
",",
"csrf_token",
"=",
"logon",
"(",
")",
"response",
"=",
"_post_request",
"(",
"session",
",",
"payload",
",",
"cookies",
",",
"csrf_token",
")",
"... | Sends a post command to the device and returns the decoded data. | [
"Sends",
"a",
"post",
"command",
"to",
"the",
"device",
"and",
"returns",
"the",
"decoded",
"data",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/bluecoat_sslv.py#L145-L158 | train | Send a post command to the device and returns the decoded 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/proxy/bluecoat_sslv.py | logon | def logon():
'''
Logs into the bluecoat_sslv device and returns the session cookies.
'''
session = requests.session()
payload = {"jsonrpc": "2.0",
"id": "ID0",
"method": "login",
"params": [DETAILS['username'], DETAILS['password'], DETAILS['auth'], True]
... | python | def logon():
'''
Logs into the bluecoat_sslv device and returns the session cookies.
'''
session = requests.session()
payload = {"jsonrpc": "2.0",
"id": "ID0",
"method": "login",
"params": [DETAILS['username'], DETAILS['password'], DETAILS['auth'], True]
... | [
"def",
"logon",
"(",
")",
":",
"session",
"=",
"requests",
".",
"session",
"(",
")",
"payload",
"=",
"{",
"\"jsonrpc\"",
":",
"\"2.0\"",
",",
"\"id\"",
":",
"\"ID0\"",
",",
"\"method\"",
":",
"\"login\"",
",",
"\"params\"",
":",
"[",
"DETAILS",
"[",
"'... | Logs into the bluecoat_sslv device and returns the session cookies. | [
"Logs",
"into",
"the",
"bluecoat_sslv",
"device",
"and",
"returns",
"the",
"session",
"cookies",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/bluecoat_sslv.py#L170-L198 | train | Logs into the bluecoat_sslv device and returns the session cookies and csrf_token. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/proxy/bluecoat_sslv.py | logout | def logout(session, cookies, csrf_token):
'''
Closes the session with the device.
'''
payload = {"jsonrpc": "2.0",
"id": "ID0",
"method": "logout",
"params": []
}
session.post(DETAILS['url'],
data=json.dumps(payload),
... | python | def logout(session, cookies, csrf_token):
'''
Closes the session with the device.
'''
payload = {"jsonrpc": "2.0",
"id": "ID0",
"method": "logout",
"params": []
}
session.post(DETAILS['url'],
data=json.dumps(payload),
... | [
"def",
"logout",
"(",
"session",
",",
"cookies",
",",
"csrf_token",
")",
":",
"payload",
"=",
"{",
"\"jsonrpc\"",
":",
"\"2.0\"",
",",
"\"id\"",
":",
"\"ID0\"",
",",
"\"method\"",
":",
"\"logout\"",
",",
"\"params\"",
":",
"[",
"]",
"}",
"session",
".",
... | Closes the session with the device. | [
"Closes",
"the",
"session",
"with",
"the",
"device",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/bluecoat_sslv.py#L201-L213 | train | Closes the session with the 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/proxy/bluecoat_sslv.py | grains | def grains():
'''
Get the grains from the proxied device
'''
if not DETAILS.get('grains_cache', {}):
DETAILS['grains_cache'] = GRAINS_CACHE
try:
DETAILS['grains_cache'] = _get_grain_information()
except salt.exceptions.CommandExecutionError:
pass
e... | python | def grains():
'''
Get the grains from the proxied device
'''
if not DETAILS.get('grains_cache', {}):
DETAILS['grains_cache'] = GRAINS_CACHE
try:
DETAILS['grains_cache'] = _get_grain_information()
except salt.exceptions.CommandExecutionError:
pass
e... | [
"def",
"grains",
"(",
")",
":",
"if",
"not",
"DETAILS",
".",
"get",
"(",
"'grains_cache'",
",",
"{",
"}",
")",
":",
"DETAILS",
"[",
"'grains_cache'",
"]",
"=",
"GRAINS_CACHE",
"try",
":",
"DETAILS",
"[",
"'grains_cache'",
"]",
"=",
"_get_grain_information"... | Get the grains from the proxied device | [
"Get",
"the",
"grains",
"from",
"the",
"proxied",
"device"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/bluecoat_sslv.py#L250-L262 | train | Get the grains from the proxied 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/proxy/bluecoat_sslv.py | ping | def ping():
'''
Returns true if the device is reachable, else false.
'''
try:
session, cookies, csrf_token = logon()
logout(session, cookies, csrf_token)
except salt.exceptions.CommandExecutionError:
return False
except Exception as err:
log.debug(err)
ret... | python | def ping():
'''
Returns true if the device is reachable, else false.
'''
try:
session, cookies, csrf_token = logon()
logout(session, cookies, csrf_token)
except salt.exceptions.CommandExecutionError:
return False
except Exception as err:
log.debug(err)
ret... | [
"def",
"ping",
"(",
")",
":",
"try",
":",
"session",
",",
"cookies",
",",
"csrf_token",
"=",
"logon",
"(",
")",
"logout",
"(",
"session",
",",
"cookies",
",",
"csrf_token",
")",
"except",
"salt",
".",
"exceptions",
".",
"CommandExecutionError",
":",
"ret... | Returns true if the device is reachable, else false. | [
"Returns",
"true",
"if",
"the",
"device",
"is",
"reachable",
"else",
"false",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/bluecoat_sslv.py#L273-L285 | train | Ping the device and return True if the device is reachable else 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/runners/ssh.py | cmd | def cmd(tgt,
fun,
arg=(),
timeout=None,
tgt_type='glob',
kwarg=None):
'''
.. versionadded:: 2015.5.0
.. versionchanged:: 2017.7.0
The ``expr_form`` argument has been renamed to ``tgt_type``, earlier
releases must use ``expr_form``.
Execute a singl... | python | def cmd(tgt,
fun,
arg=(),
timeout=None,
tgt_type='glob',
kwarg=None):
'''
.. versionadded:: 2015.5.0
.. versionchanged:: 2017.7.0
The ``expr_form`` argument has been renamed to ``tgt_type``, earlier
releases must use ``expr_form``.
Execute a singl... | [
"def",
"cmd",
"(",
"tgt",
",",
"fun",
",",
"arg",
"=",
"(",
")",
",",
"timeout",
"=",
"None",
",",
"tgt_type",
"=",
"'glob'",
",",
"kwarg",
"=",
"None",
")",
":",
"client",
"=",
"salt",
".",
"client",
".",
"ssh",
".",
"client",
".",
"SSHClient",
... | .. versionadded:: 2015.5.0
.. versionchanged:: 2017.7.0
The ``expr_form`` argument has been renamed to ``tgt_type``, earlier
releases must use ``expr_form``.
Execute a single command via the salt-ssh subsystem and return all
routines at once
A wrapper around the :py:meth:`SSHClient.cmd... | [
"..",
"versionadded",
"::",
"2015",
".",
"5",
".",
"0",
"..",
"versionchanged",
"::",
"2017",
".",
"7",
".",
"0",
"The",
"expr_form",
"argument",
"has",
"been",
"renamed",
"to",
"tgt_type",
"earlier",
"releases",
"must",
"use",
"expr_form",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/ssh.py#L15-L40 | train | Execute a single command via the salt - ssh subsystem and return the result. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/tokens/localfs.py | mk_token | def mk_token(opts, tdata):
'''
Mint a new token using the config option hash_type and store tdata with 'token' attribute set
to the token.
This module uses the hash of random 512 bytes as a token.
:param opts: Salt master config options
:param tdata: Token data to be stored with 'token' attirbu... | python | def mk_token(opts, tdata):
'''
Mint a new token using the config option hash_type and store tdata with 'token' attribute set
to the token.
This module uses the hash of random 512 bytes as a token.
:param opts: Salt master config options
:param tdata: Token data to be stored with 'token' attirbu... | [
"def",
"mk_token",
"(",
"opts",
",",
"tdata",
")",
":",
"hash_type",
"=",
"getattr",
"(",
"hashlib",
",",
"opts",
".",
"get",
"(",
"'hash_type'",
",",
"'md5'",
")",
")",
"tok",
"=",
"six",
".",
"text_type",
"(",
"hash_type",
"(",
"os",
".",
"urandom"... | Mint a new token using the config option hash_type and store tdata with 'token' attribute set
to the token.
This module uses the hash of random 512 bytes as a token.
:param opts: Salt master config options
:param tdata: Token data to be stored with 'token' attirbute of this dict set to the token.
:... | [
"Mint",
"a",
"new",
"token",
"using",
"the",
"config",
"option",
"hash_type",
"and",
"store",
"tdata",
"with",
"token",
"attribute",
"set",
"to",
"the",
"token",
".",
"This",
"module",
"uses",
"the",
"hash",
"of",
"random",
"512",
"bytes",
"as",
"a",
"to... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/tokens/localfs.py#L24-L50 | train | Mint a new token using the config option hash_type and store tdata with token attribute set
to the token. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/tokens/localfs.py | get_token | def get_token(opts, tok):
'''
Fetch the token data from the store.
:param opts: Salt master config options
:param tok: Token value to get
:returns: Token data if successful. Empty dict if failed.
'''
t_path = os.path.join(opts['token_dir'], tok)
if not os.path.isfile(t_path):
re... | python | def get_token(opts, tok):
'''
Fetch the token data from the store.
:param opts: Salt master config options
:param tok: Token value to get
:returns: Token data if successful. Empty dict if failed.
'''
t_path = os.path.join(opts['token_dir'], tok)
if not os.path.isfile(t_path):
re... | [
"def",
"get_token",
"(",
"opts",
",",
"tok",
")",
":",
"t_path",
"=",
"os",
".",
"path",
".",
"join",
"(",
"opts",
"[",
"'token_dir'",
"]",
",",
"tok",
")",
"if",
"not",
"os",
".",
"path",
".",
"isfile",
"(",
"t_path",
")",
":",
"return",
"{",
... | Fetch the token data from the store.
:param opts: Salt master config options
:param tok: Token value to get
:returns: Token data if successful. Empty dict if failed. | [
"Fetch",
"the",
"token",
"data",
"from",
"the",
"store",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/tokens/localfs.py#L53-L72 | train | Fetch the token data from the store. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/tokens/localfs.py | rm_token | def rm_token(opts, tok):
'''
Remove token from the store.
:param opts: Salt master config options
:param tok: Token to remove
:returns: Empty dict if successful. None if failed.
'''
t_path = os.path.join(opts['token_dir'], tok)
try:
os.remove(t_path)
return {}
except... | python | def rm_token(opts, tok):
'''
Remove token from the store.
:param opts: Salt master config options
:param tok: Token to remove
:returns: Empty dict if successful. None if failed.
'''
t_path = os.path.join(opts['token_dir'], tok)
try:
os.remove(t_path)
return {}
except... | [
"def",
"rm_token",
"(",
"opts",
",",
"tok",
")",
":",
"t_path",
"=",
"os",
".",
"path",
".",
"join",
"(",
"opts",
"[",
"'token_dir'",
"]",
",",
"tok",
")",
"try",
":",
"os",
".",
"remove",
"(",
"t_path",
")",
"return",
"{",
"}",
"except",
"(",
... | Remove token from the store.
:param opts: Salt master config options
:param tok: Token to remove
:returns: Empty dict if successful. None if failed. | [
"Remove",
"token",
"from",
"the",
"store",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/tokens/localfs.py#L75-L88 | train | Remove a token from the store. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/tokens/localfs.py | list_tokens | def list_tokens(opts):
'''
List all tokens in the store.
:param opts: Salt master config options
:returns: List of dicts (tokens)
'''
ret = []
for (dirpath, dirnames, filenames) in salt.utils.path.os_walk(opts['token_dir']):
for token in filenames:
ret.append(token)
... | python | def list_tokens(opts):
'''
List all tokens in the store.
:param opts: Salt master config options
:returns: List of dicts (tokens)
'''
ret = []
for (dirpath, dirnames, filenames) in salt.utils.path.os_walk(opts['token_dir']):
for token in filenames:
ret.append(token)
... | [
"def",
"list_tokens",
"(",
"opts",
")",
":",
"ret",
"=",
"[",
"]",
"for",
"(",
"dirpath",
",",
"dirnames",
",",
"filenames",
")",
"in",
"salt",
".",
"utils",
".",
"path",
".",
"os_walk",
"(",
"opts",
"[",
"'token_dir'",
"]",
")",
":",
"for",
"token... | List all tokens in the store.
:param opts: Salt master config options
:returns: List of dicts (tokens) | [
"List",
"all",
"tokens",
"in",
"the",
"store",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/tokens/localfs.py#L91-L102 | train | List all tokens in the store. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/path.py | islink | def islink(path):
'''
Equivalent to os.path.islink()
'''
if six.PY3 or not salt.utils.platform.is_windows():
return os.path.islink(path)
if not HAS_WIN32FILE:
log.error('Cannot check if %s is a link, missing required modules', path)
if not _is_reparse_point(path):
retur... | python | def islink(path):
'''
Equivalent to os.path.islink()
'''
if six.PY3 or not salt.utils.platform.is_windows():
return os.path.islink(path)
if not HAS_WIN32FILE:
log.error('Cannot check if %s is a link, missing required modules', path)
if not _is_reparse_point(path):
retur... | [
"def",
"islink",
"(",
"path",
")",
":",
"if",
"six",
".",
"PY3",
"or",
"not",
"salt",
".",
"utils",
".",
"platform",
".",
"is_windows",
"(",
")",
":",
"return",
"os",
".",
"path",
".",
"islink",
"(",
"path",
")",
"if",
"not",
"HAS_WIN32FILE",
":",
... | Equivalent to os.path.islink() | [
"Equivalent",
"to",
"os",
".",
"path",
".",
"islink",
"()"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/path.py#L41-L73 | train | Returns True if the path is a link. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/path.py | readlink | def readlink(path):
'''
Equivalent to os.readlink()
'''
if six.PY3 or not salt.utils.platform.is_windows():
return os.readlink(path)
if not HAS_WIN32FILE:
log.error('Cannot read %s, missing required modules', path)
reparse_data = _get_reparse_data(path)
if not reparse_data... | python | def readlink(path):
'''
Equivalent to os.readlink()
'''
if six.PY3 or not salt.utils.platform.is_windows():
return os.readlink(path)
if not HAS_WIN32FILE:
log.error('Cannot read %s, missing required modules', path)
reparse_data = _get_reparse_data(path)
if not reparse_data... | [
"def",
"readlink",
"(",
"path",
")",
":",
"if",
"six",
".",
"PY3",
"or",
"not",
"salt",
".",
"utils",
".",
"platform",
".",
"is_windows",
"(",
")",
":",
"return",
"os",
".",
"readlink",
"(",
"path",
")",
"if",
"not",
"HAS_WIN32FILE",
":",
"log",
".... | Equivalent to os.readlink() | [
"Equivalent",
"to",
"os",
".",
"readlink",
"()"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/path.py#L76-L136 | train | Reads a symbolic link into a new object. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/path.py | _is_reparse_point | def _is_reparse_point(path):
'''
Returns True if path is a reparse point; False otherwise.
'''
result = win32file.GetFileAttributesW(path)
if result == -1:
return False
return True if result & 0x400 else False | python | def _is_reparse_point(path):
'''
Returns True if path is a reparse point; False otherwise.
'''
result = win32file.GetFileAttributesW(path)
if result == -1:
return False
return True if result & 0x400 else False | [
"def",
"_is_reparse_point",
"(",
"path",
")",
":",
"result",
"=",
"win32file",
".",
"GetFileAttributesW",
"(",
"path",
")",
"if",
"result",
"==",
"-",
"1",
":",
"return",
"False",
"return",
"True",
"if",
"result",
"&",
"0x400",
"else",
"False"
] | Returns True if path is a reparse point; False otherwise. | [
"Returns",
"True",
"if",
"path",
"is",
"a",
"reparse",
"point",
";",
"False",
"otherwise",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/path.py#L139-L148 | train | Returns True if path is a reparse point ; False otherwise. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/path.py | _get_reparse_data | def _get_reparse_data(path):
'''
Retrieves the reparse point data structure for the given path.
If the path is not a reparse point, None is returned.
See http://msdn.microsoft.com/en-us/library/ff552012.aspx for details on the
REPARSE_DATA_BUFFER structure returned.
'''
# ensure paths are ... | python | def _get_reparse_data(path):
'''
Retrieves the reparse point data structure for the given path.
If the path is not a reparse point, None is returned.
See http://msdn.microsoft.com/en-us/library/ff552012.aspx for details on the
REPARSE_DATA_BUFFER structure returned.
'''
# ensure paths are ... | [
"def",
"_get_reparse_data",
"(",
"path",
")",
":",
"# ensure paths are using the right slashes",
"path",
"=",
"os",
".",
"path",
".",
"normpath",
"(",
"path",
")",
"if",
"not",
"_is_reparse_point",
"(",
"path",
")",
":",
"return",
"None",
"fileHandle",
"=",
"N... | Retrieves the reparse point data structure for the given path.
If the path is not a reparse point, None is returned.
See http://msdn.microsoft.com/en-us/library/ff552012.aspx for details on the
REPARSE_DATA_BUFFER structure returned. | [
"Retrieves",
"the",
"reparse",
"point",
"data",
"structure",
"for",
"the",
"given",
"path",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/path.py#L151-L188 | train | Retrieves the reparse point data structure for the given path. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/path.py | which | def which(exe=None):
'''
Python clone of /usr/bin/which
'''
if not exe:
log.error('No executable was passed to be searched by salt.utils.path.which()')
return None
## define some utilities (we use closures here because our predecessor used them)
def is_executable_common(path):
... | python | def which(exe=None):
'''
Python clone of /usr/bin/which
'''
if not exe:
log.error('No executable was passed to be searched by salt.utils.path.which()')
return None
## define some utilities (we use closures here because our predecessor used them)
def is_executable_common(path):
... | [
"def",
"which",
"(",
"exe",
"=",
"None",
")",
":",
"if",
"not",
"exe",
":",
"log",
".",
"error",
"(",
"'No executable was passed to be searched by salt.utils.path.which()'",
")",
"return",
"None",
"## define some utilities (we use closures here because our predecessor used th... | Python clone of /usr/bin/which | [
"Python",
"clone",
"of",
"/",
"usr",
"/",
"bin",
"/",
"which"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/path.py#L192-L300 | train | Return the path to the executable which is the one passed in. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/path.py | which_bin | def which_bin(exes):
'''
Scan over some possible executables and return the first one that is found
'''
if not isinstance(exes, Iterable):
return None
for exe in exes:
path = which(exe)
if not path:
continue
return path
return None | python | def which_bin(exes):
'''
Scan over some possible executables and return the first one that is found
'''
if not isinstance(exes, Iterable):
return None
for exe in exes:
path = which(exe)
if not path:
continue
return path
return None | [
"def",
"which_bin",
"(",
"exes",
")",
":",
"if",
"not",
"isinstance",
"(",
"exes",
",",
"Iterable",
")",
":",
"return",
"None",
"for",
"exe",
"in",
"exes",
":",
"path",
"=",
"which",
"(",
"exe",
")",
"if",
"not",
"path",
":",
"continue",
"return",
... | Scan over some possible executables and return the first one that is found | [
"Scan",
"over",
"some",
"possible",
"executables",
"and",
"return",
"the",
"first",
"one",
"that",
"is",
"found"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/path.py#L303-L314 | train | Scan over some possible executables and return the first one that is found
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/path.py | join | def join(*parts, **kwargs):
'''
This functions tries to solve some issues when joining multiple absolute
paths on both *nix and windows platforms.
See tests/unit/utils/path_join_test.py for some examples on what's being
talked about here.
The "use_posixpath" kwarg can be be used to force joini... | python | def join(*parts, **kwargs):
'''
This functions tries to solve some issues when joining multiple absolute
paths on both *nix and windows platforms.
See tests/unit/utils/path_join_test.py for some examples on what's being
talked about here.
The "use_posixpath" kwarg can be be used to force joini... | [
"def",
"join",
"(",
"*",
"parts",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"six",
".",
"PY3",
":",
"new_parts",
"=",
"[",
"]",
"for",
"part",
"in",
"parts",
":",
"new_parts",
".",
"append",
"(",
"salt",
".",
"utils",
".",
"stringutils",
".",
"to_... | This functions tries to solve some issues when joining multiple absolute
paths on both *nix and windows platforms.
See tests/unit/utils/path_join_test.py for some examples on what's being
talked about here.
The "use_posixpath" kwarg can be be used to force joining using poxixpath,
which is useful ... | [
"This",
"functions",
"tries",
"to",
"solve",
"some",
"issues",
"when",
"joining",
"multiple",
"absolute",
"paths",
"on",
"both",
"*",
"nix",
"and",
"windows",
"platforms",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/path.py#L318-L357 | train | This function joins multiple absolute path components on both nix and windows platforms. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/path.py | sanitize_win_path | def sanitize_win_path(winpath):
'''
Remove illegal path characters for windows
'''
intab = '<>:|?*'
if isinstance(winpath, six.text_type):
winpath = winpath.translate(dict((ord(c), '_') for c in intab))
elif isinstance(winpath, six.string_types):
outtab = '_' * len(intab)
... | python | def sanitize_win_path(winpath):
'''
Remove illegal path characters for windows
'''
intab = '<>:|?*'
if isinstance(winpath, six.text_type):
winpath = winpath.translate(dict((ord(c), '_') for c in intab))
elif isinstance(winpath, six.string_types):
outtab = '_' * len(intab)
... | [
"def",
"sanitize_win_path",
"(",
"winpath",
")",
":",
"intab",
"=",
"'<>:|?*'",
"if",
"isinstance",
"(",
"winpath",
",",
"six",
".",
"text_type",
")",
":",
"winpath",
"=",
"winpath",
".",
"translate",
"(",
"dict",
"(",
"(",
"ord",
"(",
"c",
")",
",",
... | Remove illegal path characters for windows | [
"Remove",
"illegal",
"path",
"characters",
"for",
"windows"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/path.py#L375-L386 | train | Remove illegal path characters for windows
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/path.py | safe_path | def safe_path(path, allow_path=None):
r'''
.. versionadded:: 2017.7.3
Checks that the path is safe for modification by Salt. For example, you
wouldn't want to have salt delete the contents of ``C:\Windows``. The
following directories are considered unsafe:
- C:\, D:\, E:\, etc.
- \
- C... | python | def safe_path(path, allow_path=None):
r'''
.. versionadded:: 2017.7.3
Checks that the path is safe for modification by Salt. For example, you
wouldn't want to have salt delete the contents of ``C:\Windows``. The
following directories are considered unsafe:
- C:\, D:\, E:\, etc.
- \
- C... | [
"def",
"safe_path",
"(",
"path",
",",
"allow_path",
"=",
"None",
")",
":",
"# Create regex definitions for directories that may be unsafe to modify",
"system_root",
"=",
"os",
".",
"environ",
".",
"get",
"(",
"'SystemRoot'",
",",
"'C:\\\\Windows'",
")",
"deny_paths",
... | r'''
.. versionadded:: 2017.7.3
Checks that the path is safe for modification by Salt. For example, you
wouldn't want to have salt delete the contents of ``C:\Windows``. The
following directories are considered unsafe:
- C:\, D:\, E:\, etc.
- \
- C:\Windows
Args:
path (str): ... | [
"r",
"..",
"versionadded",
"::",
"2017",
".",
"7",
".",
"3"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/path.py#L389-L443 | train | r Checks that the path is safe for modification by Salt. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/path.py | os_walk | def os_walk(top, *args, **kwargs):
'''
This is a helper than ensures that all paths returned from os.walk are
unicode.
'''
if six.PY2 and salt.utils.platform.is_windows():
top_query = top
else:
top_query = salt.utils.stringutils.to_str(top)
for item in os.walk(top_query, *arg... | python | def os_walk(top, *args, **kwargs):
'''
This is a helper than ensures that all paths returned from os.walk are
unicode.
'''
if six.PY2 and salt.utils.platform.is_windows():
top_query = top
else:
top_query = salt.utils.stringutils.to_str(top)
for item in os.walk(top_query, *arg... | [
"def",
"os_walk",
"(",
"top",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"six",
".",
"PY2",
"and",
"salt",
".",
"utils",
".",
"platform",
".",
"is_windows",
"(",
")",
":",
"top_query",
"=",
"top",
"else",
":",
"top_query",
"=",
"s... | This is a helper than ensures that all paths returned from os.walk are
unicode. | [
"This",
"is",
"a",
"helper",
"than",
"ensures",
"that",
"all",
"paths",
"returned",
"from",
"os",
".",
"walk",
"are",
"unicode",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/path.py#L446-L456 | train | This is a helper than ensures that all paths returned from os. walk are unicode. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/ebuildpkg.py | _process_emerge_err | def _process_emerge_err(stdout, stderr):
'''
Used to parse emerge output to provide meaningful output when emerge fails
'''
ret = {}
rexp = re.compile(r'^[<>=][^ ]+/[^ ]+ [^\n]+', re.M)
slot_conflicts = re.compile(r'^[^ \n]+/[^ ]+:[^ ]', re.M).findall(stderr)
if slot_conflicts:
ret[... | python | def _process_emerge_err(stdout, stderr):
'''
Used to parse emerge output to provide meaningful output when emerge fails
'''
ret = {}
rexp = re.compile(r'^[<>=][^ ]+/[^ ]+ [^\n]+', re.M)
slot_conflicts = re.compile(r'^[^ \n]+/[^ ]+:[^ ]', re.M).findall(stderr)
if slot_conflicts:
ret[... | [
"def",
"_process_emerge_err",
"(",
"stdout",
",",
"stderr",
")",
":",
"ret",
"=",
"{",
"}",
"rexp",
"=",
"re",
".",
"compile",
"(",
"r'^[<>=][^ ]+/[^ ]+ [^\\n]+'",
",",
"re",
".",
"M",
")",
"slot_conflicts",
"=",
"re",
".",
"compile",
"(",
"r'^[^ \\n]+/[^ ... | Used to parse emerge output to provide meaningful output when emerge fails | [
"Used",
"to",
"parse",
"emerge",
"output",
"to",
"provide",
"meaningful",
"output",
"when",
"emerge",
"fails"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/ebuildpkg.py#L138-L170 | train | Parses emerge output to provide meaningful output when emerge fails
Used to parse emerge output to provide meaningful output when emerge fails
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/ebuildpkg.py | check_db | def check_db(*names, **kwargs):
'''
.. versionadded:: 0.17.0
Returns a dict containing the following information for each specified
package:
1. A key ``found``, which will be a boolean value denoting if a match was
found in the package database.
2. If ``found`` is ``False``, then a seco... | python | def check_db(*names, **kwargs):
'''
.. versionadded:: 0.17.0
Returns a dict containing the following information for each specified
package:
1. A key ``found``, which will be a boolean value denoting if a match was
found in the package database.
2. If ``found`` is ``False``, then a seco... | [
"def",
"check_db",
"(",
"*",
"names",
",",
"*",
"*",
"kwargs",
")",
":",
"### NOTE: kwargs is not used here but needs to be present due to it being",
"### required in the check_db function in other package providers.",
"ret",
"=",
"{",
"}",
"for",
"name",
"in",
"names",
":"... | .. versionadded:: 0.17.0
Returns a dict containing the following information for each specified
package:
1. A key ``found``, which will be a boolean value denoting if a match was
found in the package database.
2. If ``found`` is ``False``, then a second key called ``suggestions`` will
be... | [
"..",
"versionadded",
"::",
"0",
".",
"17",
".",
"0"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/ebuildpkg.py#L173-L211 | train | Check the database for the specified package names. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/ebuildpkg.py | _get_upgradable | def _get_upgradable(backtrack=3):
'''
Utility function to get upgradable packages
Sample return data:
{ 'pkgname': '1.2.3-45', ... }
'''
cmd = ['emerge',
'--ask', 'n',
'--backtrack', '{0}'.format(backtrack),
'--pretend',
'--update',
'--new... | python | def _get_upgradable(backtrack=3):
'''
Utility function to get upgradable packages
Sample return data:
{ 'pkgname': '1.2.3-45', ... }
'''
cmd = ['emerge',
'--ask', 'n',
'--backtrack', '{0}'.format(backtrack),
'--pretend',
'--update',
'--new... | [
"def",
"_get_upgradable",
"(",
"backtrack",
"=",
"3",
")",
":",
"cmd",
"=",
"[",
"'emerge'",
",",
"'--ask'",
",",
"'n'",
",",
"'--backtrack'",
",",
"'{0}'",
".",
"format",
"(",
"backtrack",
")",
",",
"'--pretend'",
",",
"'--update'",
",",
"'--newuse'",
"... | Utility function to get upgradable packages
Sample return data:
{ 'pkgname': '1.2.3-45', ... } | [
"Utility",
"function",
"to",
"get",
"upgradable",
"packages"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/ebuildpkg.py#L288-L335 | train | Utility function to get upgradable packages | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/ebuildpkg.py | list_upgrades | def list_upgrades(refresh=True, backtrack=3, **kwargs): # pylint: disable=W0613
'''
List all available package upgrades.
refresh
Whether or not to sync the portage tree before checking for upgrades.
backtrack
Specifies an integer number of times to backtrack if dependency
calc... | python | def list_upgrades(refresh=True, backtrack=3, **kwargs): # pylint: disable=W0613
'''
List all available package upgrades.
refresh
Whether or not to sync the portage tree before checking for upgrades.
backtrack
Specifies an integer number of times to backtrack if dependency
calc... | [
"def",
"list_upgrades",
"(",
"refresh",
"=",
"True",
",",
"backtrack",
"=",
"3",
",",
"*",
"*",
"kwargs",
")",
":",
"# pylint: disable=W0613",
"if",
"salt",
".",
"utils",
".",
"data",
".",
"is_true",
"(",
"refresh",
")",
":",
"refresh_db",
"(",
")",
"r... | List all available package upgrades.
refresh
Whether or not to sync the portage tree before checking for upgrades.
backtrack
Specifies an integer number of times to backtrack if dependency
calculation fails due to a conflict or an unsatisfied dependency
(default: ´3´).
... | [
"List",
"all",
"available",
"package",
"upgrades",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/ebuildpkg.py#L338-L360 | train | List available package upgrades. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/ebuildpkg.py | porttree_matches | def porttree_matches(name):
'''
Returns a list containing the matches for a given package name from the
portage tree. Note that the specific version of the package will not be
provided for packages that have several versions in the portage tree, but
rather the name of the package (i.e. "dev-python/p... | python | def porttree_matches(name):
'''
Returns a list containing the matches for a given package name from the
portage tree. Note that the specific version of the package will not be
provided for packages that have several versions in the portage tree, but
rather the name of the package (i.e. "dev-python/p... | [
"def",
"porttree_matches",
"(",
"name",
")",
":",
"matches",
"=",
"[",
"]",
"for",
"category",
"in",
"_porttree",
"(",
")",
".",
"dbapi",
".",
"categories",
":",
"if",
"_porttree",
"(",
")",
".",
"dbapi",
".",
"cp_list",
"(",
"category",
"+",
"\"/\"",
... | Returns a list containing the matches for a given package name from the
portage tree. Note that the specific version of the package will not be
provided for packages that have several versions in the portage tree, but
rather the name of the package (i.e. "dev-python/paramiko"). | [
"Returns",
"a",
"list",
"containing",
"the",
"matches",
"for",
"a",
"given",
"package",
"name",
"from",
"the",
"portage",
"tree",
".",
"Note",
"that",
"the",
"specific",
"version",
"of",
"the",
"package",
"will",
"not",
"be",
"provided",
"for",
"packages",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/ebuildpkg.py#L392-L403 | train | Returns a list containing the matches for a given package name from the portage tree. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.