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/scripts.py | salt_call | def salt_call():
'''
Directly call a salt command in the modules, does not require a running
salt minion to run.
'''
import salt.cli.call
if '' in sys.path:
sys.path.remove('')
client = salt.cli.call.SaltCall()
_install_signal_handlers(client)
client.run() | python | def salt_call():
'''
Directly call a salt command in the modules, does not require a running
salt minion to run.
'''
import salt.cli.call
if '' in sys.path:
sys.path.remove('')
client = salt.cli.call.SaltCall()
_install_signal_handlers(client)
client.run() | [
"def",
"salt_call",
"(",
")",
":",
"import",
"salt",
".",
"cli",
".",
"call",
"if",
"''",
"in",
"sys",
".",
"path",
":",
"sys",
".",
"path",
".",
"remove",
"(",
"''",
")",
"client",
"=",
"salt",
".",
"cli",
".",
"call",
".",
"SaltCall",
"(",
")... | Directly call a salt command in the modules, does not require a running
salt minion to run. | [
"Directly",
"call",
"a",
"salt",
"command",
"in",
"the",
"modules",
"does",
"not",
"require",
"a",
"running",
"salt",
"minion",
"to",
"run",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/scripts.py#L429-L439 | train | A simple salt - call wrapper for the salt - call module | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/scripts.py | salt_run | def salt_run():
'''
Execute a salt convenience routine.
'''
import salt.cli.run
if '' in sys.path:
sys.path.remove('')
client = salt.cli.run.SaltRun()
_install_signal_handlers(client)
client.run() | python | def salt_run():
'''
Execute a salt convenience routine.
'''
import salt.cli.run
if '' in sys.path:
sys.path.remove('')
client = salt.cli.run.SaltRun()
_install_signal_handlers(client)
client.run() | [
"def",
"salt_run",
"(",
")",
":",
"import",
"salt",
".",
"cli",
".",
"run",
"if",
"''",
"in",
"sys",
".",
"path",
":",
"sys",
".",
"path",
".",
"remove",
"(",
"''",
")",
"client",
"=",
"salt",
".",
"cli",
".",
"run",
".",
"SaltRun",
"(",
")",
... | Execute a salt convenience routine. | [
"Execute",
"a",
"salt",
"convenience",
"routine",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/scripts.py#L442-L451 | train | Execute a salt convenience routine. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/scripts.py | salt_ssh | def salt_ssh():
'''
Execute the salt-ssh system
'''
import salt.cli.ssh
if '' in sys.path:
sys.path.remove('')
try:
client = salt.cli.ssh.SaltSSH()
_install_signal_handlers(client)
client.run()
except SaltClientError as err:
trace = traceback.format_ex... | python | def salt_ssh():
'''
Execute the salt-ssh system
'''
import salt.cli.ssh
if '' in sys.path:
sys.path.remove('')
try:
client = salt.cli.ssh.SaltSSH()
_install_signal_handlers(client)
client.run()
except SaltClientError as err:
trace = traceback.format_ex... | [
"def",
"salt_ssh",
"(",
")",
":",
"import",
"salt",
".",
"cli",
".",
"ssh",
"if",
"''",
"in",
"sys",
".",
"path",
":",
"sys",
".",
"path",
".",
"remove",
"(",
"''",
")",
"try",
":",
"client",
"=",
"salt",
".",
"cli",
".",
"ssh",
".",
"SaltSSH",... | Execute the salt-ssh system | [
"Execute",
"the",
"salt",
"-",
"ssh",
"system"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/scripts.py#L454-L474 | train | Execute the salt - ssh 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/scripts.py | salt_cloud | def salt_cloud():
'''
The main function for salt-cloud
'''
# Define 'salt' global so we may use it after ImportError. Otherwise,
# UnboundLocalError will be raised.
global salt # pylint: disable=W0602
try:
# Late-imports for CLI performance
import salt.cloud
import ... | python | def salt_cloud():
'''
The main function for salt-cloud
'''
# Define 'salt' global so we may use it after ImportError. Otherwise,
# UnboundLocalError will be raised.
global salt # pylint: disable=W0602
try:
# Late-imports for CLI performance
import salt.cloud
import ... | [
"def",
"salt_cloud",
"(",
")",
":",
"# Define 'salt' global so we may use it after ImportError. Otherwise,",
"# UnboundLocalError will be raised.",
"global",
"salt",
"# pylint: disable=W0602",
"try",
":",
"# Late-imports for CLI performance",
"import",
"salt",
".",
"cloud",
"import... | The main function for salt-cloud | [
"The",
"main",
"function",
"for",
"salt",
"-",
"cloud"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/scripts.py#L477-L499 | train | The main function for salt - cloud | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/scripts.py | salt_api | def salt_api():
'''
The main function for salt-api
'''
import salt.utils.process
salt.utils.process.notify_systemd()
import salt.cli.api
sapi = salt.cli.api.SaltAPI() # pylint: disable=E1120
sapi.start() | python | def salt_api():
'''
The main function for salt-api
'''
import salt.utils.process
salt.utils.process.notify_systemd()
import salt.cli.api
sapi = salt.cli.api.SaltAPI() # pylint: disable=E1120
sapi.start() | [
"def",
"salt_api",
"(",
")",
":",
"import",
"salt",
".",
"utils",
".",
"process",
"salt",
".",
"utils",
".",
"process",
".",
"notify_systemd",
"(",
")",
"import",
"salt",
".",
"cli",
".",
"api",
"sapi",
"=",
"salt",
".",
"cli",
".",
"api",
".",
"Sa... | The main function for salt-api | [
"The",
"main",
"function",
"for",
"salt",
"-",
"api"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/scripts.py#L502-L511 | train | The main function for salt - api
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/scripts.py | salt_main | def salt_main():
'''
Publish commands to the salt system from the command line on the
master.
'''
import salt.cli.salt
if '' in sys.path:
sys.path.remove('')
client = salt.cli.salt.SaltCMD()
_install_signal_handlers(client)
client.run() | python | def salt_main():
'''
Publish commands to the salt system from the command line on the
master.
'''
import salt.cli.salt
if '' in sys.path:
sys.path.remove('')
client = salt.cli.salt.SaltCMD()
_install_signal_handlers(client)
client.run() | [
"def",
"salt_main",
"(",
")",
":",
"import",
"salt",
".",
"cli",
".",
"salt",
"if",
"''",
"in",
"sys",
".",
"path",
":",
"sys",
".",
"path",
".",
"remove",
"(",
"''",
")",
"client",
"=",
"salt",
".",
"cli",
".",
"salt",
".",
"SaltCMD",
"(",
")"... | Publish commands to the salt system from the command line on the
master. | [
"Publish",
"commands",
"to",
"the",
"salt",
"system",
"from",
"the",
"command",
"line",
"on",
"the",
"master",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/scripts.py#L514-L524 | train | The salt_main 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/scripts.py | salt_spm | def salt_spm():
'''
The main function for spm, the Salt Package Manager
.. versionadded:: 2015.8.0
'''
import salt.cli.spm
spm = salt.cli.spm.SPM() # pylint: disable=E1120
spm.run() | python | def salt_spm():
'''
The main function for spm, the Salt Package Manager
.. versionadded:: 2015.8.0
'''
import salt.cli.spm
spm = salt.cli.spm.SPM() # pylint: disable=E1120
spm.run() | [
"def",
"salt_spm",
"(",
")",
":",
"import",
"salt",
".",
"cli",
".",
"spm",
"spm",
"=",
"salt",
".",
"cli",
".",
"spm",
".",
"SPM",
"(",
")",
"# pylint: disable=E1120",
"spm",
".",
"run",
"(",
")"
] | The main function for spm, the Salt Package Manager
.. versionadded:: 2015.8.0 | [
"The",
"main",
"function",
"for",
"spm",
"the",
"Salt",
"Package",
"Manager"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/scripts.py#L527-L535 | train | The main function for spm the Salt Package Manager
.. versionadded:: 2015. 8. 0 | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/scripts.py | salt_extend | def salt_extend(extension, name, description, salt_dir, merge):
'''
Quickstart for developing on the saltstack installation
.. versionadded:: 2016.11.0
'''
import salt.utils.extend
salt.utils.extend.run(extension=extension,
name=name,
descript... | python | def salt_extend(extension, name, description, salt_dir, merge):
'''
Quickstart for developing on the saltstack installation
.. versionadded:: 2016.11.0
'''
import salt.utils.extend
salt.utils.extend.run(extension=extension,
name=name,
descript... | [
"def",
"salt_extend",
"(",
"extension",
",",
"name",
",",
"description",
",",
"salt_dir",
",",
"merge",
")",
":",
"import",
"salt",
".",
"utils",
".",
"extend",
"salt",
".",
"utils",
".",
"extend",
".",
"run",
"(",
"extension",
"=",
"extension",
",",
"... | Quickstart for developing on the saltstack installation
.. versionadded:: 2016.11.0 | [
"Quickstart",
"for",
"developing",
"on",
"the",
"saltstack",
"installation"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/scripts.py#L538-L549 | train | Extend a salt - style node with a salt - style extension | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/scripts.py | salt_support | def salt_support():
'''
Run Salt Support that collects system data, logs etc for debug and support purposes.
:return:
'''
import salt.cli.support.collector
if '' in sys.path:
sys.path.remove('')
client = salt.cli.support.collector.SaltSupport()
_install_signal_handlers(client)
... | python | def salt_support():
'''
Run Salt Support that collects system data, logs etc for debug and support purposes.
:return:
'''
import salt.cli.support.collector
if '' in sys.path:
sys.path.remove('')
client = salt.cli.support.collector.SaltSupport()
_install_signal_handlers(client)
... | [
"def",
"salt_support",
"(",
")",
":",
"import",
"salt",
".",
"cli",
".",
"support",
".",
"collector",
"if",
"''",
"in",
"sys",
".",
"path",
":",
"sys",
".",
"path",
".",
"remove",
"(",
"''",
")",
"client",
"=",
"salt",
".",
"cli",
".",
"support",
... | Run Salt Support that collects system data, logs etc for debug and support purposes.
:return: | [
"Run",
"Salt",
"Support",
"that",
"collects",
"system",
"data",
"logs",
"etc",
"for",
"debug",
"and",
"support",
"purposes",
".",
":",
"return",
":"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/scripts.py#L552-L563 | train | Run Salt Support that collects system data logs etc for debug and support purposes. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/pillar/puppet.py | ext_pillar | def ext_pillar(minion_id,
pillar, # pylint: disable=W0613
command):
'''
Execute an unmodified puppet_node_classifier and read the output as YAML
'''
try:
data = salt.utils.yaml.safe_load(__salt__['cmd.run']('{0} {1}'.format(command, minion_id)))
return data... | python | def ext_pillar(minion_id,
pillar, # pylint: disable=W0613
command):
'''
Execute an unmodified puppet_node_classifier and read the output as YAML
'''
try:
data = salt.utils.yaml.safe_load(__salt__['cmd.run']('{0} {1}'.format(command, minion_id)))
return data... | [
"def",
"ext_pillar",
"(",
"minion_id",
",",
"pillar",
",",
"# pylint: disable=W0613",
"command",
")",
":",
"try",
":",
"data",
"=",
"salt",
".",
"utils",
".",
"yaml",
".",
"safe_load",
"(",
"__salt__",
"[",
"'cmd.run'",
"]",
"(",
"'{0} {1}'",
".",
"format"... | Execute an unmodified puppet_node_classifier and read the output as YAML | [
"Execute",
"an",
"unmodified",
"puppet_node_classifier",
"and",
"read",
"the",
"output",
"as",
"YAML"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/puppet.py#L20-L31 | train | Execute an unmodified puppet_node_classifier and read the output as YAML
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/win_wusa.py | _pshell_json | def _pshell_json(cmd, cwd=None):
'''
Execute the desired powershell command and ensure that it returns data
in JSON format and load that into python
'''
if 'convertto-json' not in cmd.lower():
cmd = '{0} | ConvertTo-Json'.format(cmd)
log.debug('PowerShell: %s', cmd)
ret = __salt__['c... | python | def _pshell_json(cmd, cwd=None):
'''
Execute the desired powershell command and ensure that it returns data
in JSON format and load that into python
'''
if 'convertto-json' not in cmd.lower():
cmd = '{0} | ConvertTo-Json'.format(cmd)
log.debug('PowerShell: %s', cmd)
ret = __salt__['c... | [
"def",
"_pshell_json",
"(",
"cmd",
",",
"cwd",
"=",
"None",
")",
":",
"if",
"'convertto-json'",
"not",
"in",
"cmd",
".",
"lower",
"(",
")",
":",
"cmd",
"=",
"'{0} | ConvertTo-Json'",
".",
"format",
"(",
"cmd",
")",
"log",
".",
"debug",
"(",
"'PowerShel... | Execute the desired powershell command and ensure that it returns data
in JSON format and load that into python | [
"Execute",
"the",
"desired",
"powershell",
"command",
"and",
"ensure",
"that",
"it",
"returns",
"data",
"in",
"JSON",
"format",
"and",
"load",
"that",
"into",
"python"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_wusa.py#L41-L73 | train | Execute the desired powershell command and ensure that it returns data
in JSON format and load that into python
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/win_wusa.py | install | def install(path, restart=False):
'''
Install a KB from a .msu file.
Args:
path (str):
The full path to the msu file to install
restart (bool):
``True`` to force a restart if required by the installation. Adds
the ``/forcerestart`` switch to the ``wusa.... | python | def install(path, restart=False):
'''
Install a KB from a .msu file.
Args:
path (str):
The full path to the msu file to install
restart (bool):
``True`` to force a restart if required by the installation. Adds
the ``/forcerestart`` switch to the ``wusa.... | [
"def",
"install",
"(",
"path",
",",
"restart",
"=",
"False",
")",
":",
"# Build the command",
"cmd",
"=",
"[",
"'wusa.exe'",
",",
"path",
",",
"'/quiet'",
"]",
"if",
"restart",
":",
"cmd",
".",
"append",
"(",
"'/forcerestart'",
")",
"else",
":",
"cmd",
... | Install a KB from a .msu file.
Args:
path (str):
The full path to the msu file to install
restart (bool):
``True`` to force a restart if required by the installation. Adds
the ``/forcerestart`` switch to the ``wusa.exe`` command. ``False``
will add ... | [
"Install",
"a",
"KB",
"from",
"a",
".",
"msu",
"file",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_wusa.py#L99-L145 | train | Install a KB from a. msu file. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/win_wusa.py | uninstall | def uninstall(path, restart=False):
'''
Uninstall a specific KB.
Args:
path (str):
The full path to the msu file to uninstall. This can also be just
the name of the KB to uninstall
restart (bool):
``True`` to force a restart if required by the installat... | python | def uninstall(path, restart=False):
'''
Uninstall a specific KB.
Args:
path (str):
The full path to the msu file to uninstall. This can also be just
the name of the KB to uninstall
restart (bool):
``True`` to force a restart if required by the installat... | [
"def",
"uninstall",
"(",
"path",
",",
"restart",
"=",
"False",
")",
":",
"# Build the command",
"cmd",
"=",
"[",
"'wusa.exe'",
",",
"'/uninstall'",
",",
"'/quiet'",
"]",
"kb",
"=",
"os",
".",
"path",
".",
"splitext",
"(",
"os",
".",
"path",
".",
"basen... | Uninstall a specific KB.
Args:
path (str):
The full path to the msu file to uninstall. This can also be just
the name of the KB to uninstall
restart (bool):
``True`` to force a restart if required by the installation. Adds
the ``/forcerestart`` swit... | [
"Uninstall",
"a",
"specific",
"KB",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_wusa.py#L148-L206 | train | Uninstall a specific KB from the specified path. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/win_wusa.py | list | def list():
'''
Get a list of updates installed on the machine
Returns:
list: A list of installed updates
CLI Example:
.. code-block:: bash
salt '*' wusa.list
'''
kbs = []
ret = _pshell_json('Get-HotFix | Select HotFixID')
for item in ret:
kbs.append(item[... | python | def list():
'''
Get a list of updates installed on the machine
Returns:
list: A list of installed updates
CLI Example:
.. code-block:: bash
salt '*' wusa.list
'''
kbs = []
ret = _pshell_json('Get-HotFix | Select HotFixID')
for item in ret:
kbs.append(item[... | [
"def",
"list",
"(",
")",
":",
"kbs",
"=",
"[",
"]",
"ret",
"=",
"_pshell_json",
"(",
"'Get-HotFix | Select HotFixID'",
")",
"for",
"item",
"in",
"ret",
":",
"kbs",
".",
"append",
"(",
"item",
"[",
"'HotFixID'",
"]",
")",
"return",
"kbs"
] | Get a list of updates installed on the machine
Returns:
list: A list of installed updates
CLI Example:
.. code-block:: bash
salt '*' wusa.list | [
"Get",
"a",
"list",
"of",
"updates",
"installed",
"on",
"the",
"machine"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_wusa.py#L209-L226 | train | Get a list of updates installed on the 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/states/net_napalm_yang.py | managed | def managed(name,
data,
**kwargs):
'''
Manage the device configuration given the input data structured
according to the YANG models.
data
YANG structured data.
models
A list of models to be used when generating the config.
profiles: ``None``
Us... | python | def managed(name,
data,
**kwargs):
'''
Manage the device configuration given the input data structured
according to the YANG models.
data
YANG structured data.
models
A list of models to be used when generating the config.
profiles: ``None``
Us... | [
"def",
"managed",
"(",
"name",
",",
"data",
",",
"*",
"*",
"kwargs",
")",
":",
"models",
"=",
"kwargs",
".",
"get",
"(",
"'models'",
",",
"None",
")",
"if",
"isinstance",
"(",
"models",
",",
"tuple",
")",
"and",
"isinstance",
"(",
"models",
"[",
"0... | Manage the device configuration given the input data structured
according to the YANG models.
data
YANG structured data.
models
A list of models to be used when generating the config.
profiles: ``None``
Use certain profiles to generate the config.
If not specified, wi... | [
"Manage",
"the",
"device",
"configuration",
"given",
"the",
"input",
"data",
"structured",
"according",
"to",
"the",
"YANG",
"models",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/net_napalm_yang.py#L78-L202 | train | Manage the device configuration given the input data and the YANG 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/states/net_napalm_yang.py | configured | def configured(name,
data,
**kwargs):
'''
Configure the network device, given the input data structured
according to the YANG models.
.. note::
The main difference between this function and ``managed``
is that the later generates and loads the configuration... | python | def configured(name,
data,
**kwargs):
'''
Configure the network device, given the input data structured
according to the YANG models.
.. note::
The main difference between this function and ``managed``
is that the later generates and loads the configuration... | [
"def",
"configured",
"(",
"name",
",",
"data",
",",
"*",
"*",
"kwargs",
")",
":",
"models",
"=",
"kwargs",
".",
"get",
"(",
"'models'",
",",
"None",
")",
"if",
"isinstance",
"(",
"models",
",",
"tuple",
")",
"and",
"isinstance",
"(",
"models",
"[",
... | Configure the network device, given the input data structured
according to the YANG models.
.. note::
The main difference between this function and ``managed``
is that the later generates and loads the configuration
only when there are differences between the existing
configurat... | [
"Configure",
"the",
"network",
"device",
"given",
"the",
"input",
"data",
"structured",
"according",
"to",
"the",
"YANG",
"models",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/net_napalm_yang.py#L205-L294 | train | Configure the network 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/states/dvs.py | _get_datacenter_name | def _get_datacenter_name():
'''
Returns the datacenter name configured on the proxy
Supported proxies: esxcluster, esxdatacenter
'''
proxy_type = __salt__['vsphere.get_proxy_type']()
details = None
if proxy_type == 'esxcluster':
details = __salt__['esxcluster.get_details']()
el... | python | def _get_datacenter_name():
'''
Returns the datacenter name configured on the proxy
Supported proxies: esxcluster, esxdatacenter
'''
proxy_type = __salt__['vsphere.get_proxy_type']()
details = None
if proxy_type == 'esxcluster':
details = __salt__['esxcluster.get_details']()
el... | [
"def",
"_get_datacenter_name",
"(",
")",
":",
"proxy_type",
"=",
"__salt__",
"[",
"'vsphere.get_proxy_type'",
"]",
"(",
")",
"details",
"=",
"None",
"if",
"proxy_type",
"==",
"'esxcluster'",
":",
"details",
"=",
"__salt__",
"[",
"'esxcluster.get_details'",
"]",
... | Returns the datacenter name configured on the proxy
Supported proxies: esxcluster, esxdatacenter | [
"Returns",
"the",
"datacenter",
"name",
"configured",
"on",
"the",
"proxy"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/dvs.py#L245-L261 | train | Returns the datacenter name configured on the proxy
Supported proxies are esxcluster esxdatacenter | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/dvs.py | dvs_configured | def dvs_configured(name, dvs):
'''
Configures a DVS.
Creates a new DVS, if it doesn't exist in the provided datacenter or
reconfigures it if configured differently.
dvs
DVS dict representations (see module sysdocs)
'''
datacenter_name = _get_datacenter_name()
dvs_name = dvs['na... | python | def dvs_configured(name, dvs):
'''
Configures a DVS.
Creates a new DVS, if it doesn't exist in the provided datacenter or
reconfigures it if configured differently.
dvs
DVS dict representations (see module sysdocs)
'''
datacenter_name = _get_datacenter_name()
dvs_name = dvs['na... | [
"def",
"dvs_configured",
"(",
"name",
",",
"dvs",
")",
":",
"datacenter_name",
"=",
"_get_datacenter_name",
"(",
")",
"dvs_name",
"=",
"dvs",
"[",
"'name'",
"]",
"if",
"dvs",
".",
"get",
"(",
"'name'",
")",
"else",
"name",
"log",
".",
"info",
"(",
"'Ru... | Configures a DVS.
Creates a new DVS, if it doesn't exist in the provided datacenter or
reconfigures it if configured differently.
dvs
DVS dict representations (see module sysdocs) | [
"Configures",
"a",
"DVS",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/dvs.py#L264-L407 | train | Configures a DVS in the provided datacenter. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/dvs.py | _get_diff_dict | def _get_diff_dict(dict1, dict2):
'''
Returns a dictionary with the diffs between two dictionaries
It will ignore any key that doesn't exist in dict2
'''
ret_dict = {}
for p in dict2.keys():
if p not in dict1:
ret_dict.update({p: {'val1': None, 'val2': dict2[p]}})
el... | python | def _get_diff_dict(dict1, dict2):
'''
Returns a dictionary with the diffs between two dictionaries
It will ignore any key that doesn't exist in dict2
'''
ret_dict = {}
for p in dict2.keys():
if p not in dict1:
ret_dict.update({p: {'val1': None, 'val2': dict2[p]}})
el... | [
"def",
"_get_diff_dict",
"(",
"dict1",
",",
"dict2",
")",
":",
"ret_dict",
"=",
"{",
"}",
"for",
"p",
"in",
"dict2",
".",
"keys",
"(",
")",
":",
"if",
"p",
"not",
"in",
"dict1",
":",
"ret_dict",
".",
"update",
"(",
"{",
"p",
":",
"{",
"'val1'",
... | Returns a dictionary with the diffs between two dictionaries
It will ignore any key that doesn't exist in dict2 | [
"Returns",
"a",
"dictionary",
"with",
"the",
"diffs",
"between",
"two",
"dictionaries"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/dvs.py#L410-L427 | train | Returns a dictionary with the diffs between two dictionaries
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/dvs.py | _get_val2_dict_from_diff_dict | def _get_val2_dict_from_diff_dict(diff_dict):
'''
Returns a dictionaries with the values stored in val2 of a diff dict.
'''
ret_dict = {}
for p in diff_dict.keys():
if not isinstance(diff_dict[p], dict):
raise ValueError('Unexpected diff difct \'{0}\''.format(diff_dict))
... | python | def _get_val2_dict_from_diff_dict(diff_dict):
'''
Returns a dictionaries with the values stored in val2 of a diff dict.
'''
ret_dict = {}
for p in diff_dict.keys():
if not isinstance(diff_dict[p], dict):
raise ValueError('Unexpected diff difct \'{0}\''.format(diff_dict))
... | [
"def",
"_get_val2_dict_from_diff_dict",
"(",
"diff_dict",
")",
":",
"ret_dict",
"=",
"{",
"}",
"for",
"p",
"in",
"diff_dict",
".",
"keys",
"(",
")",
":",
"if",
"not",
"isinstance",
"(",
"diff_dict",
"[",
"p",
"]",
",",
"dict",
")",
":",
"raise",
"Value... | Returns a dictionaries with the values stored in val2 of a diff dict. | [
"Returns",
"a",
"dictionaries",
"with",
"the",
"values",
"stored",
"in",
"val2",
"of",
"a",
"diff",
"dict",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/dvs.py#L430-L443 | train | Returns a dictionary with the values stored in val2 of a diff dict. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/dvs.py | portgroups_configured | def portgroups_configured(name, dvs, portgroups):
'''
Configures portgroups on a DVS.
Creates/updates/removes portgroups in a provided DVS
dvs
Name of the DVS
portgroups
Portgroup dict representations (see module sysdocs)
'''
datacenter = _get_datacenter_name()
log.inf... | python | def portgroups_configured(name, dvs, portgroups):
'''
Configures portgroups on a DVS.
Creates/updates/removes portgroups in a provided DVS
dvs
Name of the DVS
portgroups
Portgroup dict representations (see module sysdocs)
'''
datacenter = _get_datacenter_name()
log.inf... | [
"def",
"portgroups_configured",
"(",
"name",
",",
"dvs",
",",
"portgroups",
")",
":",
"datacenter",
"=",
"_get_datacenter_name",
"(",
")",
"log",
".",
"info",
"(",
"'Running state %s on DVS \\'%s\\', datacenter \\'%s\\''",
",",
"name",
",",
"dvs",
",",
"datacenter",... | Configures portgroups on a DVS.
Creates/updates/removes portgroups in a provided DVS
dvs
Name of the DVS
portgroups
Portgroup dict representations (see module sysdocs) | [
"Configures",
"portgroups",
"on",
"a",
"DVS",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/dvs.py#L495-L628 | train | Configure the portgroups on a DVS | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/dvs.py | uplink_portgroup_configured | def uplink_portgroup_configured(name, dvs, uplink_portgroup):
'''
Configures the uplink portgroup on a DVS. The state assumes there is only
one uplink portgroup.
dvs
Name of the DVS
upling_portgroup
Uplink portgroup dict representations (see module sysdocs)
'''
datacenter ... | python | def uplink_portgroup_configured(name, dvs, uplink_portgroup):
'''
Configures the uplink portgroup on a DVS. The state assumes there is only
one uplink portgroup.
dvs
Name of the DVS
upling_portgroup
Uplink portgroup dict representations (see module sysdocs)
'''
datacenter ... | [
"def",
"uplink_portgroup_configured",
"(",
"name",
",",
"dvs",
",",
"uplink_portgroup",
")",
":",
"datacenter",
"=",
"_get_datacenter_name",
"(",
")",
"log",
".",
"info",
"(",
"'Running %s on DVS \\'%s\\', datacenter \\'%s\\''",
",",
"name",
",",
"dvs",
",",
"datace... | Configures the uplink portgroup on a DVS. The state assumes there is only
one uplink portgroup.
dvs
Name of the DVS
upling_portgroup
Uplink portgroup dict representations (see module sysdocs) | [
"Configures",
"the",
"uplink",
"portgroup",
"on",
"a",
"DVS",
".",
"The",
"state",
"assumes",
"there",
"is",
"only",
"one",
"uplink",
"portgroup",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/dvs.py#L631-L710 | train | Configure the uplink portgroup on a DVS. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/postgres_user.py | present | def present(name,
createdb=None,
createroles=None,
encrypted=None,
superuser=None,
replication=None,
inherit=None,
login=None,
password=None,
default_password=None,
refresh_password=None,
... | python | def present(name,
createdb=None,
createroles=None,
encrypted=None,
superuser=None,
replication=None,
inherit=None,
login=None,
password=None,
default_password=None,
refresh_password=None,
... | [
"def",
"present",
"(",
"name",
",",
"createdb",
"=",
"None",
",",
"createroles",
"=",
"None",
",",
"encrypted",
"=",
"None",
",",
"superuser",
"=",
"None",
",",
"replication",
"=",
"None",
",",
"inherit",
"=",
"None",
",",
"login",
"=",
"None",
",",
... | Ensure that the named user is present with the specified privileges
Please note that the user/group notion in postgresql is just abstract, we
have roles, where users can be seens as roles with the LOGIN privilege
and groups the others.
name
The name of the system user to manage.
createdb
... | [
"Ensure",
"that",
"the",
"named",
"user",
"is",
"present",
"with",
"the",
"specified",
"privileges",
"Please",
"note",
"that",
"the",
"user",
"/",
"group",
"notion",
"in",
"postgresql",
"is",
"just",
"abstract",
"we",
"have",
"roles",
"where",
"users",
"can"... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/postgres_user.py#L37-L259 | train | Ensures that the named user is present with the specified privileges. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/zone.py | property_present | def property_present(name, property, value):
'''
Ensure property has a certain value
name : string
name of the zone
property : string
name of property
value : string
value of property
'''
ret = {'name': name,
'changes': {},
'result': None,
... | python | def property_present(name, property, value):
'''
Ensure property has a certain value
name : string
name of the zone
property : string
name of property
value : string
value of property
'''
ret = {'name': name,
'changes': {},
'result': None,
... | [
"def",
"property_present",
"(",
"name",
",",
"property",
",",
"value",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":",
"{",
"}",
",",
"'result'",
":",
"None",
",",
"'comment'",
":",
"''",
"}",
"## sanitize input",
"value",
"=",... | Ensure property has a certain value
name : string
name of the zone
property : string
name of property
value : string
value of property | [
"Ensure",
"property",
"has",
"a",
"certain",
"value"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/zone.py#L151-L199 | train | Ensure that the named property is present in the specified zone. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/zone.py | property_absent | def property_absent(name, property):
'''
Ensure property is absent
name : string
name of the zone
property : string
name of property
.. note::
This does a zoneacfg clear call. So the property may be reset to a default value!
Does has the side effect of always having... | python | def property_absent(name, property):
'''
Ensure property is absent
name : string
name of the zone
property : string
name of property
.. note::
This does a zoneacfg clear call. So the property may be reset to a default value!
Does has the side effect of always having... | [
"def",
"property_absent",
"(",
"name",
",",
"property",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":",
"{",
"}",
",",
"'result'",
":",
"None",
",",
"'comment'",
":",
"''",
"}",
"zones",
"=",
"__salt__",
"[",
"'zoneadm.list'",
... | Ensure property is absent
name : string
name of the zone
property : string
name of property
.. note::
This does a zoneacfg clear call. So the property may be reset to a default value!
Does has the side effect of always having to be called. | [
"Ensure",
"property",
"is",
"absent"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/zone.py#L202-L253 | train | Ensure the specified property is absent in the specified resource tree. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/zone.py | resource_present | def resource_present(name, resource_type, resource_selector_property, resource_selector_value, **kwargs):
'''
Ensure resource exists with provided properties
name : string
name of the zone
resource_type : string
type of resource
resource_selector_property : string
unique res... | python | def resource_present(name, resource_type, resource_selector_property, resource_selector_value, **kwargs):
'''
Ensure resource exists with provided properties
name : string
name of the zone
resource_type : string
type of resource
resource_selector_property : string
unique res... | [
"def",
"resource_present",
"(",
"name",
",",
"resource_type",
",",
"resource_selector_property",
",",
"resource_selector_value",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":",
"{",
"}",
",",
"'result'",
":",... | Ensure resource exists with provided properties
name : string
name of the zone
resource_type : string
type of resource
resource_selector_property : string
unique resource identifier
resource_selector_value : string
value for resource selection
kwargs : string|int|...... | [
"Ensure",
"resource",
"exists",
"with",
"provided",
"properties"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/zone.py#L256-L414 | train | Ensure a resource exists with provided 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/states/zone.py | resource_absent | def resource_absent(name, resource_type, resource_selector_property, resource_selector_value):
'''
Ensure resource is absent
name : string
name of the zone
resource_type : string
type of resource
resource_selector_property : string
unique resource identifier
resource_sel... | python | def resource_absent(name, resource_type, resource_selector_property, resource_selector_value):
'''
Ensure resource is absent
name : string
name of the zone
resource_type : string
type of resource
resource_selector_property : string
unique resource identifier
resource_sel... | [
"def",
"resource_absent",
"(",
"name",
",",
"resource_type",
",",
"resource_selector_property",
",",
"resource_selector_value",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":",
"{",
"}",
",",
"'result'",
":",
"None",
",",
"'comment'",
... | Ensure resource is absent
name : string
name of the zone
resource_type : string
type of resource
resource_selector_property : string
unique resource identifier
resource_selector_value : string
value for resource selection
.. warning::
Both resource_selector_... | [
"Ensure",
"resource",
"is",
"absent"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/zone.py#L417-L514 | train | Ensure a resource is absent in the specified zone. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/zone.py | booted | def booted(name, single=False):
'''
Ensure zone is booted
name : string
name of the zone
single : boolean
boot in single usermode
'''
ret = {'name': name,
'changes': {},
'result': None,
'comment': ''}
zones = __salt__['zoneadm.list'](instal... | python | def booted(name, single=False):
'''
Ensure zone is booted
name : string
name of the zone
single : boolean
boot in single usermode
'''
ret = {'name': name,
'changes': {},
'result': None,
'comment': ''}
zones = __salt__['zoneadm.list'](instal... | [
"def",
"booted",
"(",
"name",
",",
"single",
"=",
"False",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":",
"{",
"}",
",",
"'result'",
":",
"None",
",",
"'comment'",
":",
"''",
"}",
"zones",
"=",
"__salt__",
"[",
"'zoneadm.l... | Ensure zone is booted
name : string
name of the zone
single : boolean
boot in single usermode | [
"Ensure",
"zone",
"is",
"booted"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/zone.py#L517-L568 | train | Ensure the zone is booted in a single usermode | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/zone.py | halted | def halted(name, graceful=True):
'''
Ensure zone is halted
name : string
name of the zone
graceful : boolean
use shutdown instead of halt if true
'''
ret = {'name': name,
'changes': {},
'result': None,
'comment': ''}
zones = __salt__['zonea... | python | def halted(name, graceful=True):
'''
Ensure zone is halted
name : string
name of the zone
graceful : boolean
use shutdown instead of halt if true
'''
ret = {'name': name,
'changes': {},
'result': None,
'comment': ''}
zones = __salt__['zonea... | [
"def",
"halted",
"(",
"name",
",",
"graceful",
"=",
"True",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":",
"{",
"}",
",",
"'result'",
":",
"None",
",",
"'comment'",
":",
"''",
"}",
"zones",
"=",
"__salt__",
"[",
"'zoneadm.... | Ensure zone is halted
name : string
name of the zone
graceful : boolean
use shutdown instead of halt if true | [
"Ensure",
"zone",
"is",
"halted"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/zone.py#L571-L622 | train | Ensure the zone is halted | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/zone.py | export | def export(name, path, replace=False):
'''
Export a zones configuration
name : string
name of the zone
path : string
path of file to export too.
replace : boolean
replace the file if it exists
'''
ret = {'name': name,
'changes': {},
'result': N... | python | def export(name, path, replace=False):
'''
Export a zones configuration
name : string
name of the zone
path : string
path of file to export too.
replace : boolean
replace the file if it exists
'''
ret = {'name': name,
'changes': {},
'result': N... | [
"def",
"export",
"(",
"name",
",",
"path",
",",
"replace",
"=",
"False",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":",
"{",
"}",
",",
"'result'",
":",
"None",
",",
"'comment'",
":",
"''",
"}",
"zones",
"=",
"__salt__",
... | Export a zones configuration
name : string
name of the zone
path : string
path of file to export too.
replace : boolean
replace the file if it exists | [
"Export",
"a",
"zones",
"configuration"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/zone.py#L625-L738 | train | Exports a zone configuration to a file | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/zone.py | import_ | def import_(name, path, mode='import', nodataset=False, brand_opts=None):
'''
Import a zones configuration
name : string
name of the zone
path : string
path of the configuration file to import
mode : string
either import, install, or attach
nodataset : boolean
do... | python | def import_(name, path, mode='import', nodataset=False, brand_opts=None):
'''
Import a zones configuration
name : string
name of the zone
path : string
path of the configuration file to import
mode : string
either import, install, or attach
nodataset : boolean
do... | [
"def",
"import_",
"(",
"name",
",",
"path",
",",
"mode",
"=",
"'import'",
",",
"nodataset",
"=",
"False",
",",
"brand_opts",
"=",
"None",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":",
"{",
"}",
",",
"'result'",
":",
"None... | Import a zones configuration
name : string
name of the zone
path : string
path of the configuration file to import
mode : string
either import, install, or attach
nodataset : boolean
do not create a ZFS file system
brand_opts : boolean
brand specific options ... | [
"Import",
"a",
"zones",
"configuration"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/zone.py#L741-L839 | train | Import a zone from a configuration file | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/zone.py | present | def present(name, brand, zonepath, properties=None, resources=None):
'''
Ensure a zone with certain properties and resources
name : string
name of the zone
brand : string
brand of the zone
zonepath : string
path of the zone
properties : list of key-value pairs
di... | python | def present(name, brand, zonepath, properties=None, resources=None):
'''
Ensure a zone with certain properties and resources
name : string
name of the zone
brand : string
brand of the zone
zonepath : string
path of the zone
properties : list of key-value pairs
di... | [
"def",
"present",
"(",
"name",
",",
"brand",
",",
"zonepath",
",",
"properties",
"=",
"None",
",",
"resources",
"=",
"None",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":",
"{",
"}",
",",
"'result'",
":",
"None",
",",
"'com... | Ensure a zone with certain properties and resources
name : string
name of the zone
brand : string
brand of the zone
zonepath : string
path of the zone
properties : list of key-value pairs
dict of properties
resources : list of key-value pairs
dict of resource... | [
"Ensure",
"a",
"zone",
"with",
"certain",
"properties",
"and",
"resources"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/zone.py#L842-L988 | train | Ensure a zone with certain properties and resources exists. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/zone.py | absent | def absent(name, uninstall=False):
'''
Ensure a zone is absent
name : string
name of the zone
uninstall : boolean
when true, uninstall instead of detaching the zone first.
'''
ret = {'name': name,
'changes': {},
'result': None,
'comment': ''}
... | python | def absent(name, uninstall=False):
'''
Ensure a zone is absent
name : string
name of the zone
uninstall : boolean
when true, uninstall instead of detaching the zone first.
'''
ret = {'name': name,
'changes': {},
'result': None,
'comment': ''}
... | [
"def",
"absent",
"(",
"name",
",",
"uninstall",
"=",
"False",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":",
"{",
"}",
",",
"'result'",
":",
"None",
",",
"'comment'",
":",
"''",
"}",
"zones",
"=",
"__salt__",
"[",
"'zonead... | Ensure a zone is absent
name : string
name of the zone
uninstall : boolean
when true, uninstall instead of detaching the zone first. | [
"Ensure",
"a",
"zone",
"is",
"absent"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/zone.py#L991-L1055 | train | Ensure a zone is absent. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/zone.py | attached | def attached(name, force=False):
'''
Ensure zone is attached
name : string
name of the zone
force : boolean
force attach the zone
'''
ret = {'name': name,
'changes': {},
'result': None,
'comment': ''}
zones = __salt__['zoneadm.list'](instal... | python | def attached(name, force=False):
'''
Ensure zone is attached
name : string
name of the zone
force : boolean
force attach the zone
'''
ret = {'name': name,
'changes': {},
'result': None,
'comment': ''}
zones = __salt__['zoneadm.list'](instal... | [
"def",
"attached",
"(",
"name",
",",
"force",
"=",
"False",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":",
"{",
"}",
",",
"'result'",
":",
"None",
",",
"'comment'",
":",
"''",
"}",
"zones",
"=",
"__salt__",
"[",
"'zoneadm.... | Ensure zone is attached
name : string
name of the zone
force : boolean
force attach the zone | [
"Ensure",
"zone",
"is",
"attached"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/zone.py#L1058-L1097 | train | Ensure zone is attached to the
WorkItem | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/zone.py | detached | def detached(name):
'''
Ensure zone is detached
name : string
name of the zone
'''
ret = {'name': name,
'changes': {},
'result': None,
'comment': ''}
zones = __salt__['zoneadm.list'](installed=True, configured=True)
if name in zones:
if zon... | python | def detached(name):
'''
Ensure zone is detached
name : string
name of the zone
'''
ret = {'name': name,
'changes': {},
'result': None,
'comment': ''}
zones = __salt__['zoneadm.list'](installed=True, configured=True)
if name in zones:
if zon... | [
"def",
"detached",
"(",
"name",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":",
"{",
"}",
",",
"'result'",
":",
"None",
",",
"'comment'",
":",
"''",
"}",
"zones",
"=",
"__salt__",
"[",
"'zoneadm.list'",
"]",
"(",
"installed",... | Ensure zone is detached
name : string
name of the zone | [
"Ensure",
"zone",
"is",
"detached"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/zone.py#L1100-L1138 | train | Ensure zone is detached | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/zone.py | installed | def installed(name, nodataset=False, brand_opts=None):
'''
Ensure zone is installed
name : string
name of the zone
nodataset : boolean
do not create a ZFS file system
brand_opts : boolean
brand specific options to pass
'''
ret = {'name': name,
'changes': ... | python | def installed(name, nodataset=False, brand_opts=None):
'''
Ensure zone is installed
name : string
name of the zone
nodataset : boolean
do not create a ZFS file system
brand_opts : boolean
brand specific options to pass
'''
ret = {'name': name,
'changes': ... | [
"def",
"installed",
"(",
"name",
",",
"nodataset",
"=",
"False",
",",
"brand_opts",
"=",
"None",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":",
"{",
"}",
",",
"'result'",
":",
"None",
",",
"'comment'",
":",
"''",
"}",
"zon... | Ensure zone is installed
name : string
name of the zone
nodataset : boolean
do not create a ZFS file system
brand_opts : boolean
brand specific options to pass | [
"Ensure",
"zone",
"is",
"installed"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/zone.py#L1141-L1182 | train | Ensure zone is installed | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/zone.py | uninstalled | def uninstalled(name):
'''
Ensure zone is uninstalled
name : string
name of the zone
'''
ret = {'name': name,
'changes': {},
'result': None,
'comment': ''}
zones = __salt__['zoneadm.list'](installed=True, configured=True)
if name in zones:
... | python | def uninstalled(name):
'''
Ensure zone is uninstalled
name : string
name of the zone
'''
ret = {'name': name,
'changes': {},
'result': None,
'comment': ''}
zones = __salt__['zoneadm.list'](installed=True, configured=True)
if name in zones:
... | [
"def",
"uninstalled",
"(",
"name",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":",
"{",
"}",
",",
"'result'",
":",
"None",
",",
"'comment'",
":",
"''",
"}",
"zones",
"=",
"__salt__",
"[",
"'zoneadm.list'",
"]",
"(",
"installe... | Ensure zone is uninstalled
name : string
name of the zone | [
"Ensure",
"zone",
"is",
"uninstalled"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/zone.py#L1185-L1223 | train | Ensure zone is uninstalled | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/beacons/avahi_announce.py | validate | def validate(config):
'''
Validate the beacon configuration
'''
_config = {}
list(map(_config.update, config))
if not isinstance(config, list):
return False, ('Configuration for avahi_announce '
'beacon must be a list.')
elif not all(x in _config for x in ('s... | python | def validate(config):
'''
Validate the beacon configuration
'''
_config = {}
list(map(_config.update, config))
if not isinstance(config, list):
return False, ('Configuration for avahi_announce '
'beacon must be a list.')
elif not all(x in _config for x in ('s... | [
"def",
"validate",
"(",
"config",
")",
":",
"_config",
"=",
"{",
"}",
"list",
"(",
"map",
"(",
"_config",
".",
"update",
",",
"config",
")",
")",
"if",
"not",
"isinstance",
"(",
"config",
",",
"list",
")",
":",
"return",
"False",
",",
"(",
"'Config... | Validate the beacon configuration | [
"Validate",
"the",
"beacon",
"configuration"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/beacons/avahi_announce.py#L60-L76 | train | Validate the beacon 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/beacons/avahi_announce.py | beacon | def beacon(config):
'''
Broadcast values via zeroconf
If the announced values are static, it is advised to set run_once: True
(do not poll) on the beacon configuration.
The following are required configuration settings:
- ``servicetype`` - The service type to announce
- ``port`` - The por... | python | def beacon(config):
'''
Broadcast values via zeroconf
If the announced values are static, it is advised to set run_once: True
(do not poll) on the beacon configuration.
The following are required configuration settings:
- ``servicetype`` - The service type to announce
- ``port`` - The por... | [
"def",
"beacon",
"(",
"config",
")",
":",
"ret",
"=",
"[",
"]",
"changes",
"=",
"{",
"}",
"txt",
"=",
"{",
"}",
"global",
"LAST_GRAINS",
"_config",
"=",
"{",
"}",
"list",
"(",
"map",
"(",
"_config",
".",
"update",
",",
"config",
")",
")",
"if",
... | Broadcast values via zeroconf
If the announced values are static, it is advised to set run_once: True
(do not poll) on the beacon configuration.
The following are required configuration settings:
- ``servicetype`` - The service type to announce
- ``port`` - The port of the service to announce
... | [
"Broadcast",
"values",
"via",
"zeroconf"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/beacons/avahi_announce.py#L99-L236 | train | This function is used to announce the beacon values via zeroconf
. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/tomcat.py | war_deployed | def war_deployed(name,
war,
force=False,
url='http://localhost:8080/manager',
timeout=180,
temp_war_location=None,
version=True):
'''
Enforce that the WAR will be deployed and started in the context path,
w... | python | def war_deployed(name,
war,
force=False,
url='http://localhost:8080/manager',
timeout=180,
temp_war_location=None,
version=True):
'''
Enforce that the WAR will be deployed and started in the context path,
w... | [
"def",
"war_deployed",
"(",
"name",
",",
"war",
",",
"force",
"=",
"False",
",",
"url",
"=",
"'http://localhost:8080/manager'",
",",
"timeout",
"=",
"180",
",",
"temp_war_location",
"=",
"None",
",",
"version",
"=",
"True",
")",
":",
"# Prepare",
"ret",
"=... | Enforce that the WAR will be deployed and started in the context path,
while making use of WAR versions in the filename.
.. note::
For more info about Tomcats file paths and context naming, please see
http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Naming
name
The cont... | [
"Enforce",
"that",
"the",
"WAR",
"will",
"be",
"deployed",
"and",
"started",
"in",
"the",
"context",
"path",
"while",
"making",
"use",
"of",
"WAR",
"versions",
"in",
"the",
"filename",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/tomcat.py#L73-L222 | train | This function is used to check if a WAR file is deployed to the context path and if it is not already deployed then the WAR file will be deployed to the context path and will be deployed to the context 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/states/tomcat.py | wait | def wait(name, url='http://localhost:8080/manager', timeout=180):
'''
Wait for the Tomcat Manager to load.
Notice that if tomcat is not running we won't wait for it start and the
state will fail. This state can be required in the tomcat.war_deployed
state to make sure tomcat is running and that the... | python | def wait(name, url='http://localhost:8080/manager', timeout=180):
'''
Wait for the Tomcat Manager to load.
Notice that if tomcat is not running we won't wait for it start and the
state will fail. This state can be required in the tomcat.war_deployed
state to make sure tomcat is running and that the... | [
"def",
"wait",
"(",
"name",
",",
"url",
"=",
"'http://localhost:8080/manager'",
",",
"timeout",
"=",
"180",
")",
":",
"result",
"=",
"__salt__",
"[",
"'tomcat.status'",
"]",
"(",
"url",
",",
"timeout",
")",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
... | Wait for the Tomcat Manager to load.
Notice that if tomcat is not running we won't wait for it start and the
state will fail. This state can be required in the tomcat.war_deployed
state to make sure tomcat is running and that the manager is running as
well and ready for deployment.
url : http://lo... | [
"Wait",
"for",
"the",
"Tomcat",
"Manager",
"to",
"load",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/tomcat.py#L225-L270 | train | Wait for the Tomcat Manager to load. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/tomcat.py | mod_watch | def mod_watch(name, url='http://localhost:8080/manager', timeout=180):
'''
The tomcat watcher, called to invoke the watch command.
When called, it will reload the webapp in question
.. note::
This state exists to support special handling of the ``watch``
:ref:`requisite <requisites>`. I... | python | def mod_watch(name, url='http://localhost:8080/manager', timeout=180):
'''
The tomcat watcher, called to invoke the watch command.
When called, it will reload the webapp in question
.. note::
This state exists to support special handling of the ``watch``
:ref:`requisite <requisites>`. I... | [
"def",
"mod_watch",
"(",
"name",
",",
"url",
"=",
"'http://localhost:8080/manager'",
",",
"timeout",
"=",
"180",
")",
":",
"msg",
"=",
"__salt__",
"[",
"'tomcat.reload'",
"]",
"(",
"name",
",",
"url",
",",
"timeout",
")",
"result",
"=",
"msg",
".",
"star... | The tomcat watcher, called to invoke the watch command.
When called, it will reload the webapp in question
.. note::
This state exists to support special handling of the ``watch``
:ref:`requisite <requisites>`. It should not be called directly.
Parameters for this function should be se... | [
"The",
"tomcat",
"watcher",
"called",
"to",
"invoke",
"the",
"watch",
"command",
".",
"When",
"called",
"it",
"will",
"reload",
"the",
"webapp",
"in",
"question"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/tomcat.py#L273-L294 | train | The tomcat watch command called to invoke the watch 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/states/tomcat.py | undeployed | def undeployed(name,
url='http://localhost:8080/manager',
timeout=180):
'''
Enforce that the WAR will be undeployed from the server
name
The context path to undeploy.
url : http://localhost:8080/manager
The URL of the server with the Tomcat Manager webapp.
... | python | def undeployed(name,
url='http://localhost:8080/manager',
timeout=180):
'''
Enforce that the WAR will be undeployed from the server
name
The context path to undeploy.
url : http://localhost:8080/manager
The URL of the server with the Tomcat Manager webapp.
... | [
"def",
"undeployed",
"(",
"name",
",",
"url",
"=",
"'http://localhost:8080/manager'",
",",
"timeout",
"=",
"180",
")",
":",
"# Prepare",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'result'",
":",
"True",
",",
"'changes'",
":",
"{",
"}",
",",
"'comment... | Enforce that the WAR will be undeployed from the server
name
The context path to undeploy.
url : http://localhost:8080/manager
The URL of the server with the Tomcat Manager webapp.
timeout : 180
Timeout for HTTP request to the Tomcat Manager.
Example:
.. code-block:: yaml
... | [
"Enforce",
"that",
"the",
"WAR",
"will",
"be",
"undeployed",
"from",
"the",
"server"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/tomcat.py#L297-L349 | train | Enforce that the WAR is undeployed from the Tomcat Manager webapp. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/xmpp.py | send_msg | def send_msg(recipient, message, jid=None, password=None, profile=None):
'''
Send a message to an XMPP recipient. Designed for use in states.
CLI Examples:
.. code-block:: bash
xmpp.send_msg 'admins@xmpp.example.com' 'This is a salt module test' \
profile='my-xmpp-account'
... | python | def send_msg(recipient, message, jid=None, password=None, profile=None):
'''
Send a message to an XMPP recipient. Designed for use in states.
CLI Examples:
.. code-block:: bash
xmpp.send_msg 'admins@xmpp.example.com' 'This is a salt module test' \
profile='my-xmpp-account'
... | [
"def",
"send_msg",
"(",
"recipient",
",",
"message",
",",
"jid",
"=",
"None",
",",
"password",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"if",
"profile",
":",
"creds",
"=",
"__salt__",
"[",
"'config.option'",
"]",
"(",
"profile",
")",
"jid",
... | Send a message to an XMPP recipient. Designed for use in states.
CLI Examples:
.. code-block:: bash
xmpp.send_msg 'admins@xmpp.example.com' 'This is a salt module test' \
profile='my-xmpp-account'
xmpp.send_msg 'admins@xmpp.example.com' 'This is a salt module test' \
j... | [
"Send",
"a",
"message",
"to",
"an",
"XMPP",
"recipient",
".",
"Designed",
"for",
"use",
"in",
"states",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/xmpp.py#L121-L146 | train | Send a message to an XMPP recipient. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/xmpp.py | send_msg_multi | def send_msg_multi(message,
recipients=None,
rooms=None,
jid=None,
password=None,
nick="SaltStack Bot",
profile=None):
'''
Send a message to an XMPP recipient, support send message to
multiple r... | python | def send_msg_multi(message,
recipients=None,
rooms=None,
jid=None,
password=None,
nick="SaltStack Bot",
profile=None):
'''
Send a message to an XMPP recipient, support send message to
multiple r... | [
"def",
"send_msg_multi",
"(",
"message",
",",
"recipients",
"=",
"None",
",",
"rooms",
"=",
"None",
",",
"jid",
"=",
"None",
",",
"password",
"=",
"None",
",",
"nick",
"=",
"\"SaltStack Bot\"",
",",
"profile",
"=",
"None",
")",
":",
"# Remove: [WARNING ] U... | Send a message to an XMPP recipient, support send message to
multiple recipients or chat room.
CLI Examples:
.. code-block:: bash
xmpp.send_msg recipients=['admins@xmpp.example.com'] \
rooms=['secret@conference.xmpp.example.com'] \
'This is a salt module test' \
... | [
"Send",
"a",
"message",
"to",
"an",
"XMPP",
"recipient",
"support",
"send",
"message",
"to",
"multiple",
"recipients",
"or",
"chat",
"room",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/xmpp.py#L149-L197 | train | Send a message to an XMPP recipient or chat room. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/xmpp.py | SendMsgBot.create_multi | def create_multi(cls, jid, password, msg, recipients=None, rooms=None,
nick="SaltStack Bot"):
'''
Alternate constructor that accept multiple recipients and rooms
'''
obj = SendMsgBot(jid, password, None, msg)
obj.recipients = [] if recipients is None else rec... | python | def create_multi(cls, jid, password, msg, recipients=None, rooms=None,
nick="SaltStack Bot"):
'''
Alternate constructor that accept multiple recipients and rooms
'''
obj = SendMsgBot(jid, password, None, msg)
obj.recipients = [] if recipients is None else rec... | [
"def",
"create_multi",
"(",
"cls",
",",
"jid",
",",
"password",
",",
"msg",
",",
"recipients",
"=",
"None",
",",
"rooms",
"=",
"None",
",",
"nick",
"=",
"\"SaltStack Bot\"",
")",
":",
"obj",
"=",
"SendMsgBot",
"(",
"jid",
",",
"password",
",",
"None",
... | Alternate constructor that accept multiple recipients and rooms | [
"Alternate",
"constructor",
"that",
"accept",
"multiple",
"recipients",
"and",
"rooms"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/xmpp.py#L90-L99 | train | Create a SendMsgBot object that accepts multiple recipients and rooms. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/beacons/twilio_txt_msg.py | beacon | def beacon(config):
'''
Emit a dict name "texts" whose value is a list
of texts.
.. code-block:: yaml
beacons:
twilio_txt_msg:
- account_sid: "<account sid>"
- auth_token: "<auth token>"
- twilio_number: "+15555555555"
- interval: 10
... | python | def beacon(config):
'''
Emit a dict name "texts" whose value is a list
of texts.
.. code-block:: yaml
beacons:
twilio_txt_msg:
- account_sid: "<account sid>"
- auth_token: "<auth token>"
- twilio_number: "+15555555555"
- interval: 10
... | [
"def",
"beacon",
"(",
"config",
")",
":",
"log",
".",
"trace",
"(",
"'twilio_txt_msg beacon starting'",
")",
"_config",
"=",
"{",
"}",
"list",
"(",
"map",
"(",
"_config",
".",
"update",
",",
"config",
")",
")",
"ret",
"=",
"[",
"]",
"if",
"not",
"all... | Emit a dict name "texts" whose value is a list
of texts.
.. code-block:: yaml
beacons:
twilio_txt_msg:
- account_sid: "<account sid>"
- auth_token: "<auth token>"
- twilio_number: "+15555555555"
- interval: 10 | [
"Emit",
"a",
"dict",
"name",
"texts",
"whose",
"value",
"is",
"a",
"list",
"of",
"texts",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/beacons/twilio_txt_msg.py#L60-L111 | train | Twilio beacon 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/modules/boto_cloudwatch_event.py | exists | def exists(Name, region=None, key=None, keyid=None, profile=None):
'''
Given a rule name, check to see if the given rule exists.
Returns True if the given rule exists and returns False if the given
rule does not exist.
CLI example::
salt myminion boto_cloudwatch_event.exists myevent regio... | python | def exists(Name, region=None, key=None, keyid=None, profile=None):
'''
Given a rule name, check to see if the given rule exists.
Returns True if the given rule exists and returns False if the given
rule does not exist.
CLI example::
salt myminion boto_cloudwatch_event.exists myevent regio... | [
"def",
"exists",
"(",
"Name",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"conn",
"=",
"_get_conn",
"(",
"region",
"=",
"region",
",",
"key",
"=",
"key",
",",
"keyid",
"="... | Given a rule name, check to see if the given rule exists.
Returns True if the given rule exists and returns False if the given
rule does not exist.
CLI example::
salt myminion boto_cloudwatch_event.exists myevent region=us-east-1 | [
"Given",
"a",
"rule",
"name",
"check",
"to",
"see",
"if",
"the",
"given",
"rule",
"exists",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_cloudwatch_event.py#L89-L112 | train | Check to see if the given rule exists. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/boto_cloudwatch_event.py | create_or_update | def create_or_update(Name,
ScheduleExpression=None,
EventPattern=None,
Description=None,
RoleArn=None,
State=None,
region=None, key=None, keyid=None, profile=None):
'''
Given a valid config, create an event rule.
Returns {created: true} if t... | python | def create_or_update(Name,
ScheduleExpression=None,
EventPattern=None,
Description=None,
RoleArn=None,
State=None,
region=None, key=None, keyid=None, profile=None):
'''
Given a valid config, create an event rule.
Returns {created: true} if t... | [
"def",
"create_or_update",
"(",
"Name",
",",
"ScheduleExpression",
"=",
"None",
",",
"EventPattern",
"=",
"None",
",",
"Description",
"=",
"None",
",",
"RoleArn",
"=",
"None",
",",
"State",
"=",
"None",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None"... | Given a valid config, create an event rule.
Returns {created: true} if the rule was created and returns
{created: False} if the rule was not created.
CLI Example:
.. code-block:: bash
salt myminion boto_cloudwatch_event.create_or_update my_rule | [
"Given",
"a",
"valid",
"config",
"create",
"an",
"event",
"rule",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_cloudwatch_event.py#L115-L153 | train | Given a valid config create an event rule. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/boto_cloudwatch_event.py | describe | def describe(Name,
region=None, key=None, keyid=None, profile=None):
'''
Given a rule name describe its properties.
Returns a dictionary of interesting properties.
CLI Example:
.. code-block:: bash
salt myminion boto_cloudwatch_event.describe myrule
'''
try:
... | python | def describe(Name,
region=None, key=None, keyid=None, profile=None):
'''
Given a rule name describe its properties.
Returns a dictionary of interesting properties.
CLI Example:
.. code-block:: bash
salt myminion boto_cloudwatch_event.describe myrule
'''
try:
... | [
"def",
"describe",
"(",
"Name",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"try",
":",
"conn",
"=",
"_get_conn",
"(",
"region",
"=",
"region",
",",
"key",
"=",
"key",
","... | Given a rule name describe its properties.
Returns a dictionary of interesting properties.
CLI Example:
.. code-block:: bash
salt myminion boto_cloudwatch_event.describe myrule | [
"Given",
"a",
"rule",
"name",
"describe",
"its",
"properties",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_cloudwatch_event.py#L180-L210 | train | Given a rule name describe its 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/boto_cloudwatch_event.py | list_rules | def list_rules(region=None, key=None, keyid=None, profile=None):
'''
List, with details, all Cloudwatch Event rules visible in the current scope.
CLI example::
salt myminion boto_cloudwatch_event.list_rules region=us-east-1
'''
conn = _get_conn(region=region, key=key, keyid=keyid, profile=... | python | def list_rules(region=None, key=None, keyid=None, profile=None):
'''
List, with details, all Cloudwatch Event rules visible in the current scope.
CLI example::
salt myminion boto_cloudwatch_event.list_rules region=us-east-1
'''
conn = _get_conn(region=region, key=key, keyid=keyid, profile=... | [
"def",
"list_rules",
"(",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"conn",
"=",
"_get_conn",
"(",
"region",
"=",
"region",
",",
"key",
"=",
"key",
",",
"keyid",
"=",
"keyid",
... | List, with details, all Cloudwatch Event rules visible in the current scope.
CLI example::
salt myminion boto_cloudwatch_event.list_rules region=us-east-1 | [
"List",
"with",
"details",
"all",
"Cloudwatch",
"Event",
"rules",
"visible",
"in",
"the",
"current",
"scope",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_cloudwatch_event.py#L213-L233 | train | List all Cloudwatch Event rules visible in the current scope. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/boto_cloudwatch_event.py | list_targets | def list_targets(Rule,
region=None, key=None, keyid=None, profile=None):
'''
Given a rule name list the targets of that rule.
Returns a dictionary of interesting properties.
CLI Example:
.. code-block:: bash
salt myminion boto_cloudwatch_event.list_targets myrule
'''
... | python | def list_targets(Rule,
region=None, key=None, keyid=None, profile=None):
'''
Given a rule name list the targets of that rule.
Returns a dictionary of interesting properties.
CLI Example:
.. code-block:: bash
salt myminion boto_cloudwatch_event.list_targets myrule
'''
... | [
"def",
"list_targets",
"(",
"Rule",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"try",
":",
"conn",
"=",
"_get_conn",
"(",
"region",
"=",
"region",
",",
"key",
"=",
"key",
... | Given a rule name list the targets of that rule.
Returns a dictionary of interesting properties.
CLI Example:
.. code-block:: bash
salt myminion boto_cloudwatch_event.list_targets myrule | [
"Given",
"a",
"rule",
"name",
"list",
"the",
"targets",
"of",
"that",
"rule",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_cloudwatch_event.py#L236-L266 | train | Given a rule name list the targets of that rule. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/boto_cloudwatch_event.py | put_targets | def put_targets(Rule, Targets,
region=None, key=None, keyid=None, profile=None):
'''
Add the given targets to the given rule
Returns a dictionary describing any failures.
CLI Example:
.. code-block:: bash
salt myminion boto_cloudwatch_event.put_targets myrule [{'Id': 'target... | python | def put_targets(Rule, Targets,
region=None, key=None, keyid=None, profile=None):
'''
Add the given targets to the given rule
Returns a dictionary describing any failures.
CLI Example:
.. code-block:: bash
salt myminion boto_cloudwatch_event.put_targets myrule [{'Id': 'target... | [
"def",
"put_targets",
"(",
"Rule",
",",
"Targets",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"try",
":",
"conn",
"=",
"_get_conn",
"(",
"region",
"=",
"region",
",",
"key"... | Add the given targets to the given rule
Returns a dictionary describing any failures.
CLI Example:
.. code-block:: bash
salt myminion boto_cloudwatch_event.put_targets myrule [{'Id': 'target1', 'Arn': 'arn:***'}] | [
"Add",
"the",
"given",
"targets",
"to",
"the",
"given",
"rule"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_cloudwatch_event.py#L269-L296 | train | Adds the given targets to the given rule returning a dictionary describing any failures. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/smf_service.py | _get_enabled_disabled | def _get_enabled_disabled(enabled_prop="true"):
'''
DRY: Get all service FMRIs and their enabled property
'''
ret = set()
cmd = '/usr/bin/svcprop -c -p general/enabled "*"'
lines = __salt__['cmd.run_stdout'](cmd, python_shell=False).splitlines()
for line in lines:
comps = line.split(... | python | def _get_enabled_disabled(enabled_prop="true"):
'''
DRY: Get all service FMRIs and their enabled property
'''
ret = set()
cmd = '/usr/bin/svcprop -c -p general/enabled "*"'
lines = __salt__['cmd.run_stdout'](cmd, python_shell=False).splitlines()
for line in lines:
comps = line.split(... | [
"def",
"_get_enabled_disabled",
"(",
"enabled_prop",
"=",
"\"true\"",
")",
":",
"ret",
"=",
"set",
"(",
")",
"cmd",
"=",
"'/usr/bin/svcprop -c -p general/enabled \"*\"'",
"lines",
"=",
"__salt__",
"[",
"'cmd.run_stdout'",
"]",
"(",
"cmd",
",",
"python_shell",
"=",... | DRY: Get all service FMRIs and their enabled property | [
"DRY",
":",
"Get",
"all",
"service",
"FMRIs",
"and",
"their",
"enabled",
"property"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smf_service.py#L38-L51 | train | Get all service FMRIs and their disabled 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/smf_service.py | available | def available(name):
'''
Returns ``True`` if the specified service is available, otherwise returns
``False``.
We look up the name with the svcs command to get back the FMRI
This allows users to use simpler service names
CLI Example:
.. code-block:: bash
salt '*' service.available... | python | def available(name):
'''
Returns ``True`` if the specified service is available, otherwise returns
``False``.
We look up the name with the svcs command to get back the FMRI
This allows users to use simpler service names
CLI Example:
.. code-block:: bash
salt '*' service.available... | [
"def",
"available",
"(",
"name",
")",
":",
"cmd",
"=",
"'/usr/bin/svcs -H -o FMRI {0}'",
".",
"format",
"(",
"name",
")",
"name",
"=",
"__salt__",
"[",
"'cmd.run'",
"]",
"(",
"cmd",
",",
"python_shell",
"=",
"False",
")",
"return",
"name",
"in",
"get_all",... | Returns ``True`` if the specified service is available, otherwise returns
``False``.
We look up the name with the svcs command to get back the FMRI
This allows users to use simpler service names
CLI Example:
.. code-block:: bash
salt '*' service.available net-snmp | [
"Returns",
"True",
"if",
"the",
"specified",
"service",
"is",
"available",
"otherwise",
"returns",
"False",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smf_service.py#L98-L114 | train | Returns True if the specified service is available otherwise returns False | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/smf_service.py | missing | def missing(name):
'''
The inverse of service.available.
Returns ``True`` if the specified service is not available, otherwise returns
``False``.
CLI Example:
.. code-block:: bash
salt '*' service.missing net-snmp
'''
cmd = '/usr/bin/svcs -H -o FMRI {0}'.format(name)
name ... | python | def missing(name):
'''
The inverse of service.available.
Returns ``True`` if the specified service is not available, otherwise returns
``False``.
CLI Example:
.. code-block:: bash
salt '*' service.missing net-snmp
'''
cmd = '/usr/bin/svcs -H -o FMRI {0}'.format(name)
name ... | [
"def",
"missing",
"(",
"name",
")",
":",
"cmd",
"=",
"'/usr/bin/svcs -H -o FMRI {0}'",
".",
"format",
"(",
"name",
")",
"name",
"=",
"__salt__",
"[",
"'cmd.run'",
"]",
"(",
"cmd",
",",
"python_shell",
"=",
"False",
")",
"return",
"name",
"not",
"in",
"ge... | The inverse of service.available.
Returns ``True`` if the specified service is not available, otherwise returns
``False``.
CLI Example:
.. code-block:: bash
salt '*' service.missing net-snmp | [
"The",
"inverse",
"of",
"service",
".",
"available",
".",
"Returns",
"True",
"if",
"the",
"specified",
"service",
"is",
"not",
"available",
"otherwise",
"returns",
"False",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smf_service.py#L117-L131 | train | Returns True if the specified service is not available. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/smf_service.py | get_all | def get_all():
'''
Return all installed services
CLI Example:
.. code-block:: bash
salt '*' service.get_all
'''
ret = set()
cmd = '/usr/bin/svcs -aH -o FMRI,STATE -s FMRI'
lines = __salt__['cmd.run'](cmd).splitlines()
for line in lines:
comps = line.split()
... | python | def get_all():
'''
Return all installed services
CLI Example:
.. code-block:: bash
salt '*' service.get_all
'''
ret = set()
cmd = '/usr/bin/svcs -aH -o FMRI,STATE -s FMRI'
lines = __salt__['cmd.run'](cmd).splitlines()
for line in lines:
comps = line.split()
... | [
"def",
"get_all",
"(",
")",
":",
"ret",
"=",
"set",
"(",
")",
"cmd",
"=",
"'/usr/bin/svcs -aH -o FMRI,STATE -s FMRI'",
"lines",
"=",
"__salt__",
"[",
"'cmd.run'",
"]",
"(",
"cmd",
")",
".",
"splitlines",
"(",
")",
"for",
"line",
"in",
"lines",
":",
"comp... | Return all installed services
CLI Example:
.. code-block:: bash
salt '*' service.get_all | [
"Return",
"all",
"installed",
"services"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smf_service.py#L134-L152 | train | Return all installed services
CLI Example :
Return all installed services
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/smf_service.py | restart | def restart(name):
'''
Restart the named service
CLI Example:
.. code-block:: bash
salt '*' service.restart <service name>
'''
cmd = '/usr/sbin/svcadm restart {0}'.format(name)
if not __salt__['cmd.retcode'](cmd, python_shell=False):
# calling restart doesn't clear mainten... | python | def restart(name):
'''
Restart the named service
CLI Example:
.. code-block:: bash
salt '*' service.restart <service name>
'''
cmd = '/usr/sbin/svcadm restart {0}'.format(name)
if not __salt__['cmd.retcode'](cmd, python_shell=False):
# calling restart doesn't clear mainten... | [
"def",
"restart",
"(",
"name",
")",
":",
"cmd",
"=",
"'/usr/sbin/svcadm restart {0}'",
".",
"format",
"(",
"name",
")",
"if",
"not",
"__salt__",
"[",
"'cmd.retcode'",
"]",
"(",
"cmd",
",",
"python_shell",
"=",
"False",
")",
":",
"# calling restart doesn't clea... | Restart the named service
CLI Example:
.. code-block:: bash
salt '*' service.restart <service name> | [
"Restart",
"the",
"named",
"service"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smf_service.py#L193-L208 | train | Restart the named service
CLI Example : bash
restart service 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/smf_service.py | reload_ | def reload_(name):
'''
Reload the named service
CLI Example:
.. code-block:: bash
salt '*' service.reload <service name>
'''
cmd = '/usr/sbin/svcadm refresh {0}'.format(name)
if not __salt__['cmd.retcode'](cmd, python_shell=False):
# calling reload doesn't clear maintenanc... | python | def reload_(name):
'''
Reload the named service
CLI Example:
.. code-block:: bash
salt '*' service.reload <service name>
'''
cmd = '/usr/sbin/svcadm refresh {0}'.format(name)
if not __salt__['cmd.retcode'](cmd, python_shell=False):
# calling reload doesn't clear maintenanc... | [
"def",
"reload_",
"(",
"name",
")",
":",
"cmd",
"=",
"'/usr/sbin/svcadm refresh {0}'",
".",
"format",
"(",
"name",
")",
"if",
"not",
"__salt__",
"[",
"'cmd.retcode'",
"]",
"(",
"cmd",
",",
"python_shell",
"=",
"False",
")",
":",
"# calling reload doesn't clear... | Reload the named service
CLI Example:
.. code-block:: bash
salt '*' service.reload <service name> | [
"Reload",
"the",
"named",
"service"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smf_service.py#L211-L226 | train | Reload the named service
CLI Example : bash
reload service
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/smf_service.py | status | def status(name, sig=None):
'''
Return the status for a service.
If the name contains globbing, a dict mapping service name to True/False
values is returned.
.. versionchanged:: 2018.3.0
The service name can now be a glob (e.g. ``salt*``)
Args:
name (str): The name of the servi... | python | def status(name, sig=None):
'''
Return the status for a service.
If the name contains globbing, a dict mapping service name to True/False
values is returned.
.. versionchanged:: 2018.3.0
The service name can now be a glob (e.g. ``salt*``)
Args:
name (str): The name of the servi... | [
"def",
"status",
"(",
"name",
",",
"sig",
"=",
"None",
")",
":",
"contains_globbing",
"=",
"bool",
"(",
"re",
".",
"search",
"(",
"r'\\*|\\?|\\[.+\\]'",
",",
"name",
")",
")",
"if",
"contains_globbing",
":",
"services",
"=",
"fnmatch",
".",
"filter",
"("... | Return the status for a service.
If the name contains globbing, a dict mapping service name to True/False
values is returned.
.. versionchanged:: 2018.3.0
The service name can now be a glob (e.g. ``salt*``)
Args:
name (str): The name of the service to check
sig (str): Not imple... | [
"Return",
"the",
"status",
"for",
"a",
"service",
".",
"If",
"the",
"name",
"contains",
"globbing",
"a",
"dict",
"mapping",
"service",
"name",
"to",
"True",
"/",
"False",
"values",
"is",
"returned",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smf_service.py#L229-L264 | train | Return the status of a service. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/smf_service.py | enable | def enable(name, **kwargs):
'''
Enable the named service to start at boot
CLI Example:
.. code-block:: bash
salt '*' service.enable <service name>
'''
cmd = '/usr/sbin/svcadm enable {0}'.format(name)
return not __salt__['cmd.retcode'](cmd, python_shell=False) | python | def enable(name, **kwargs):
'''
Enable the named service to start at boot
CLI Example:
.. code-block:: bash
salt '*' service.enable <service name>
'''
cmd = '/usr/sbin/svcadm enable {0}'.format(name)
return not __salt__['cmd.retcode'](cmd, python_shell=False) | [
"def",
"enable",
"(",
"name",
",",
"*",
"*",
"kwargs",
")",
":",
"cmd",
"=",
"'/usr/sbin/svcadm enable {0}'",
".",
"format",
"(",
"name",
")",
"return",
"not",
"__salt__",
"[",
"'cmd.retcode'",
"]",
"(",
"cmd",
",",
"python_shell",
"=",
"False",
")"
] | Enable the named service to start at boot
CLI Example:
.. code-block:: bash
salt '*' service.enable <service name> | [
"Enable",
"the",
"named",
"service",
"to",
"start",
"at",
"boot"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smf_service.py#L267-L278 | train | Enable the named service to start at boot
CLI Example : bash
service. enable | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/smf_service.py | disable | def disable(name, **kwargs):
'''
Disable the named service to start at boot
CLI Example:
.. code-block:: bash
salt '*' service.disable <service name>
'''
cmd = '/usr/sbin/svcadm disable {0}'.format(name)
return not __salt__['cmd.retcode'](cmd, python_shell=False) | python | def disable(name, **kwargs):
'''
Disable the named service to start at boot
CLI Example:
.. code-block:: bash
salt '*' service.disable <service name>
'''
cmd = '/usr/sbin/svcadm disable {0}'.format(name)
return not __salt__['cmd.retcode'](cmd, python_shell=False) | [
"def",
"disable",
"(",
"name",
",",
"*",
"*",
"kwargs",
")",
":",
"cmd",
"=",
"'/usr/sbin/svcadm disable {0}'",
".",
"format",
"(",
"name",
")",
"return",
"not",
"__salt__",
"[",
"'cmd.retcode'",
"]",
"(",
"cmd",
",",
"python_shell",
"=",
"False",
")"
] | Disable the named service to start at boot
CLI Example:
.. code-block:: bash
salt '*' service.disable <service name> | [
"Disable",
"the",
"named",
"service",
"to",
"start",
"at",
"boot"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smf_service.py#L281-L292 | train | Disable the named service to start at boot
CLI Example : bash
service. disable | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/smf_service.py | enabled | def enabled(name, **kwargs):
'''
Check to see if the named service is enabled to start on boot
CLI Example:
.. code-block:: bash
salt '*' service.enabled <service name>
'''
# The property that reveals whether a service is enabled
# can only be queried using the full FMRI
# We ... | python | def enabled(name, **kwargs):
'''
Check to see if the named service is enabled to start on boot
CLI Example:
.. code-block:: bash
salt '*' service.enabled <service name>
'''
# The property that reveals whether a service is enabled
# can only be queried using the full FMRI
# We ... | [
"def",
"enabled",
"(",
"name",
",",
"*",
"*",
"kwargs",
")",
":",
"# The property that reveals whether a service is enabled",
"# can only be queried using the full FMRI",
"# We extract the FMRI and then do the query",
"fmri_cmd",
"=",
"'/usr/bin/svcs -H -o FMRI {0}'",
".",
"format"... | Check to see if the named service is enabled to start on boot
CLI Example:
.. code-block:: bash
salt '*' service.enabled <service name> | [
"Check",
"to",
"see",
"if",
"the",
"named",
"service",
"is",
"enabled",
"to",
"start",
"on",
"boot"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smf_service.py#L295-L315 | train | Check to see if the named service is enabled to start on boot
CLI Example : bash
service. enabled <service 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/win_pkg.py | upgrade_available | def upgrade_available(name, **kwargs):
'''
Check whether or not an upgrade is available for a given package
Args:
name (str): The name of a single package
Kwargs:
refresh (bool): Refresh package metadata. Default ``True``
saltenv (str): The salt environment. Default ``base``
... | python | def upgrade_available(name, **kwargs):
'''
Check whether or not an upgrade is available for a given package
Args:
name (str): The name of a single package
Kwargs:
refresh (bool): Refresh package metadata. Default ``True``
saltenv (str): The salt environment. Default ``base``
... | [
"def",
"upgrade_available",
"(",
"name",
",",
"*",
"*",
"kwargs",
")",
":",
"saltenv",
"=",
"kwargs",
".",
"get",
"(",
"'saltenv'",
",",
"'base'",
")",
"# Refresh before looking for the latest version available,",
"# same default as latest_version",
"refresh",
"=",
"s... | Check whether or not an upgrade is available for a given package
Args:
name (str): The name of a single package
Kwargs:
refresh (bool): Refresh package metadata. Default ``True``
saltenv (str): The salt environment. Default ``base``
Returns:
bool: True if new version avail... | [
"Check",
"whether",
"or",
"not",
"an",
"upgrade",
"is",
"available",
"for",
"a",
"given",
"package"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_pkg.py#L187-L214 | train | Check whether or not an upgrade is available for a given 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_pkg.py | list_upgrades | def list_upgrades(refresh=True, **kwargs):
'''
List all available package upgrades on this system
Args:
refresh (bool): Refresh package metadata. Default ``True``
Kwargs:
saltenv (str): Salt environment. Default ``base``
Returns:
dict: A dictionary of packages with availab... | python | def list_upgrades(refresh=True, **kwargs):
'''
List all available package upgrades on this system
Args:
refresh (bool): Refresh package metadata. Default ``True``
Kwargs:
saltenv (str): Salt environment. Default ``base``
Returns:
dict: A dictionary of packages with availab... | [
"def",
"list_upgrades",
"(",
"refresh",
"=",
"True",
",",
"*",
"*",
"kwargs",
")",
":",
"saltenv",
"=",
"kwargs",
".",
"get",
"(",
"'saltenv'",
",",
"'base'",
")",
"refresh",
"=",
"salt",
".",
"utils",
".",
"data",
".",
"is_true",
"(",
"refresh",
")"... | List all available package upgrades on this system
Args:
refresh (bool): Refresh package metadata. Default ``True``
Kwargs:
saltenv (str): Salt environment. Default ``base``
Returns:
dict: A dictionary of packages with available upgrades
CLI Example:
.. code-block:: bash... | [
"List",
"all",
"available",
"package",
"upgrades",
"on",
"this",
"system"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_pkg.py#L217-L254 | train | List all available upgrades on this 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_pkg.py | list_available | def list_available(*names, **kwargs):
'''
Return a list of available versions of the specified package.
Args:
names (str): One or more package names
Kwargs:
saltenv (str): The salt environment to use. Default ``base``.
refresh (bool): Refresh package metadata. Default ``False... | python | def list_available(*names, **kwargs):
'''
Return a list of available versions of the specified package.
Args:
names (str): One or more package names
Kwargs:
saltenv (str): The salt environment to use. Default ``base``.
refresh (bool): Refresh package metadata. Default ``False... | [
"def",
"list_available",
"(",
"*",
"names",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"not",
"names",
":",
"return",
"''",
"saltenv",
"=",
"kwargs",
".",
"get",
"(",
"'saltenv'",
",",
"'base'",
")",
"refresh",
"=",
"salt",
".",
"utils",
".",
"data",
... | Return a list of available versions of the specified package.
Args:
names (str): One or more package names
Kwargs:
saltenv (str): The salt environment to use. Default ``base``.
refresh (bool): Refresh package metadata. Default ``False``.
return_dict_always (bool):
... | [
"Return",
"a",
"list",
"of",
"available",
"versions",
"of",
"the",
"specified",
"package",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_pkg.py#L257-L314 | train | Return a list of available versions of the specified 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_pkg.py | version | def version(*names, **kwargs):
'''
Returns a string representing the package version or an empty string if not
installed. If more than one package name is specified, a dict of
name/version pairs is returned.
Args:
name (str): One or more package names
Kwargs:
saltenv (str): The... | python | def version(*names, **kwargs):
'''
Returns a string representing the package version or an empty string if not
installed. If more than one package name is specified, a dict of
name/version pairs is returned.
Args:
name (str): One or more package names
Kwargs:
saltenv (str): The... | [
"def",
"version",
"(",
"*",
"names",
",",
"*",
"*",
"kwargs",
")",
":",
"# Standard is return empty string even if not a valid name",
"# TODO: Look at returning an error across all platforms with",
"# CommandExecutionError(msg,info={'errors': errors })",
"# available_pkgs = get_repo_data... | Returns a string representing the package version or an empty string if not
installed. If more than one package name is specified, a dict of
name/version pairs is returned.
Args:
name (str): One or more package names
Kwargs:
saltenv (str): The salt environment to use. Default ``base``.... | [
"Returns",
"a",
"string",
"representing",
"the",
"package",
"version",
"or",
"an",
"empty",
"string",
"if",
"not",
"installed",
".",
"If",
"more",
"than",
"one",
"package",
"name",
"is",
"specified",
"a",
"dict",
"of",
"name",
"/",
"version",
"pairs",
"is"... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_pkg.py#L317-L364 | train | Returns a string representing the version of the specified 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/win_pkg.py | list_pkgs | def list_pkgs(versions_as_list=False,
include_components=True,
include_updates=True,
**kwargs):
'''
List the packages currently installed.
.. note::
To view installed software as displayed in the Add/Remove Programs, set
``include_components`` and `... | python | def list_pkgs(versions_as_list=False,
include_components=True,
include_updates=True,
**kwargs):
'''
List the packages currently installed.
.. note::
To view installed software as displayed in the Add/Remove Programs, set
``include_components`` and `... | [
"def",
"list_pkgs",
"(",
"versions_as_list",
"=",
"False",
",",
"include_components",
"=",
"True",
",",
"include_updates",
"=",
"True",
",",
"*",
"*",
"kwargs",
")",
":",
"versions_as_list",
"=",
"salt",
".",
"utils",
".",
"data",
".",
"is_true",
"(",
"ver... | List the packages currently installed.
.. note::
To view installed software as displayed in the Add/Remove Programs, set
``include_components`` and ``include_updates`` to False.
Args:
versions_as_list (bool):
Returns the versions as a list
include_components (bool... | [
"List",
"the",
"packages",
"currently",
"installed",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_pkg.py#L367-L445 | train | List the packages currently installed on the master. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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_pkg.py | _get_reg_software | def _get_reg_software(include_components=True,
include_updates=True):
'''
This searches the uninstall keys in the registry to find a match in the sub
keys, it will return a dict with the display name as the key and the
version as the value
Args:
include_components (bo... | python | def _get_reg_software(include_components=True,
include_updates=True):
'''
This searches the uninstall keys in the registry to find a match in the sub
keys, it will return a dict with the display name as the key and the
version as the value
Args:
include_components (bo... | [
"def",
"_get_reg_software",
"(",
"include_components",
"=",
"True",
",",
"include_updates",
"=",
"True",
")",
":",
"# Logic for this can be found in this question:",
"# https://social.technet.microsoft.com/Forums/windows/en-US/d913471a-d7fb-448d-869b-da9025dcc943/where-does-addremove-progr... | This searches the uninstall keys in the registry to find a match in the sub
keys, it will return a dict with the display name as the key and the
version as the value
Args:
include_components (bool):
Include sub components of installed software. Default is ``True``
include_upda... | [
"This",
"searches",
"the",
"uninstall",
"keys",
"in",
"the",
"registry",
"to",
"find",
"a",
"match",
"in",
"the",
"sub",
"keys",
"it",
"will",
"return",
"a",
"dict",
"with",
"the",
"display",
"name",
"as",
"the",
"key",
"and",
"the",
"version",
"as",
"... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_pkg.py#L448-L763 | train | This function searches the registry to find a match in the installed software and returns a dict with the display name as the key and the version as the value. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/win_pkg.py | _refresh_db_conditional | def _refresh_db_conditional(saltenv, **kwargs):
'''
Internal use only in this module, has a different set of defaults and
returns True or False. And supports checking the age of the existing
generated metadata db, as well as ensure metadata db exists to begin with
Args:
saltenv (str): Salt ... | python | def _refresh_db_conditional(saltenv, **kwargs):
'''
Internal use only in this module, has a different set of defaults and
returns True or False. And supports checking the age of the existing
generated metadata db, as well as ensure metadata db exists to begin with
Args:
saltenv (str): Salt ... | [
"def",
"_refresh_db_conditional",
"(",
"saltenv",
",",
"*",
"*",
"kwargs",
")",
":",
"force",
"=",
"salt",
".",
"utils",
".",
"data",
".",
"is_true",
"(",
"kwargs",
".",
"pop",
"(",
"'force'",
",",
"False",
")",
")",
"failhard",
"=",
"salt",
".",
"ut... | Internal use only in this module, has a different set of defaults and
returns True or False. And supports checking the age of the existing
generated metadata db, as well as ensure metadata db exists to begin with
Args:
saltenv (str): Salt environment
Kwargs:
force (bool):
... | [
"Internal",
"use",
"only",
"in",
"this",
"module",
"has",
"a",
"different",
"set",
"of",
"defaults",
"and",
"returns",
"True",
"or",
"False",
".",
"And",
"supports",
"checking",
"the",
"age",
"of",
"the",
"existing",
"generated",
"metadata",
"db",
"as",
"w... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_pkg.py#L766-L832 | train | Internal function to refresh the existing pkg metadata db for a specific environment | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/win_pkg.py | refresh_db | def refresh_db(**kwargs):
r'''
Generates the local software metadata database (`winrepo.p`) on the minion.
The database is stored in a serialized format located by default at the
following location:
``C:\salt\var\cache\salt\minion\files\base\win\repo-ng\winrepo.p``
This module performs the fol... | python | def refresh_db(**kwargs):
r'''
Generates the local software metadata database (`winrepo.p`) on the minion.
The database is stored in a serialized format located by default at the
following location:
``C:\salt\var\cache\salt\minion\files\base\win\repo-ng\winrepo.p``
This module performs the fol... | [
"def",
"refresh_db",
"(",
"*",
"*",
"kwargs",
")",
":",
"# Remove rtag file to keep multiple refreshes from happening in pkg states",
"salt",
".",
"utils",
".",
"pkg",
".",
"clear_rtag",
"(",
"__opts__",
")",
"saltenv",
"=",
"kwargs",
".",
"pop",
"(",
"'saltenv'",
... | r'''
Generates the local software metadata database (`winrepo.p`) on the minion.
The database is stored in a serialized format located by default at the
following location:
``C:\salt\var\cache\salt\minion\files\base\win\repo-ng\winrepo.p``
This module performs the following steps to generate the s... | [
"r",
"Generates",
"the",
"local",
"software",
"metadata",
"database",
"(",
"winrepo",
".",
"p",
")",
"on",
"the",
"minion",
".",
"The",
"database",
"is",
"stored",
"in",
"a",
"serialized",
"format",
"located",
"by",
"default",
"at",
"the",
"following",
"lo... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_pkg.py#L835-L961 | train | r A function that generates the local software metadata database on the master and returns the updated version of the database. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/win_pkg.py | _get_repo_details | def _get_repo_details(saltenv):
'''
Return repo details for the specified saltenv as a namedtuple
'''
contextkey = 'winrepo._get_repo_details.{0}'.format(saltenv)
if contextkey in __context__:
(winrepo_source_dir, local_dest, winrepo_file) = __context__[contextkey]
else:
winrepo... | python | def _get_repo_details(saltenv):
'''
Return repo details for the specified saltenv as a namedtuple
'''
contextkey = 'winrepo._get_repo_details.{0}'.format(saltenv)
if contextkey in __context__:
(winrepo_source_dir, local_dest, winrepo_file) = __context__[contextkey]
else:
winrepo... | [
"def",
"_get_repo_details",
"(",
"saltenv",
")",
":",
"contextkey",
"=",
"'winrepo._get_repo_details.{0}'",
".",
"format",
"(",
"saltenv",
")",
"if",
"contextkey",
"in",
"__context__",
":",
"(",
"winrepo_source_dir",
",",
"local_dest",
",",
"winrepo_file",
")",
"=... | Return repo details for the specified saltenv as a namedtuple | [
"Return",
"repo",
"details",
"for",
"the",
"specified",
"saltenv",
"as",
"a",
"namedtuple"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_pkg.py#L964-L1040 | train | Return the repo details for the specified saltenv as a namedtuple | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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_pkg.py | genrepo | def genrepo(**kwargs):
'''
Generate package metadata db based on files within the winrepo_source_dir
Kwargs:
saltenv (str): Salt environment. Default: ``base``
verbose (bool):
Return verbose data structure which includes 'success_list', a list
of all sls files and ... | python | def genrepo(**kwargs):
'''
Generate package metadata db based on files within the winrepo_source_dir
Kwargs:
saltenv (str): Salt environment. Default: ``base``
verbose (bool):
Return verbose data structure which includes 'success_list', a list
of all sls files and ... | [
"def",
"genrepo",
"(",
"*",
"*",
"kwargs",
")",
":",
"saltenv",
"=",
"kwargs",
".",
"pop",
"(",
"'saltenv'",
",",
"'base'",
")",
"verbose",
"=",
"salt",
".",
"utils",
".",
"data",
".",
"is_true",
"(",
"kwargs",
".",
"pop",
"(",
"'verbose'",
",",
"F... | Generate package metadata db based on files within the winrepo_source_dir
Kwargs:
saltenv (str): Salt environment. Default: ``base``
verbose (bool):
Return verbose data structure which includes 'success_list', a list
of all sls files and the package names contained within.... | [
"Generate",
"package",
"metadata",
"db",
"based",
"on",
"files",
"within",
"the",
"winrepo_source_dir"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_pkg.py#L1043-L1143 | train | Generate package metadata db based on files within the winrepo_source_dir | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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_pkg.py | _get_source_sum | def _get_source_sum(source_hash, file_path, saltenv):
'''
Extract the hash sum, whether it is in a remote hash file, or just a string.
'''
ret = dict()
schemes = ('salt', 'http', 'https', 'ftp', 'swift', 's3', 'file')
invalid_hash_msg = ("Source hash '{0}' format is invalid. It must be in "
... | python | def _get_source_sum(source_hash, file_path, saltenv):
'''
Extract the hash sum, whether it is in a remote hash file, or just a string.
'''
ret = dict()
schemes = ('salt', 'http', 'https', 'ftp', 'swift', 's3', 'file')
invalid_hash_msg = ("Source hash '{0}' format is invalid. It must be in "
... | [
"def",
"_get_source_sum",
"(",
"source_hash",
",",
"file_path",
",",
"saltenv",
")",
":",
"ret",
"=",
"dict",
"(",
")",
"schemes",
"=",
"(",
"'salt'",
",",
"'http'",
",",
"'https'",
",",
"'ftp'",
",",
"'swift'",
",",
"'s3'",
",",
"'file'",
")",
"invali... | Extract the hash sum, whether it is in a remote hash file, or just a string. | [
"Extract",
"the",
"hash",
"sum",
"whether",
"it",
"is",
"in",
"a",
"remote",
"hash",
"file",
"or",
"just",
"a",
"string",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_pkg.py#L1218-L1252 | train | Extract the hash sum whether it is in a remote hash file or just a string. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/win_pkg.py | _get_msiexec | def _get_msiexec(use_msiexec):
'''
Return if msiexec.exe will be used and the command to invoke it.
'''
if use_msiexec is False:
return False, ''
if isinstance(use_msiexec, six.string_types):
if os.path.isfile(use_msiexec):
return True, use_msiexec
else:
... | python | def _get_msiexec(use_msiexec):
'''
Return if msiexec.exe will be used and the command to invoke it.
'''
if use_msiexec is False:
return False, ''
if isinstance(use_msiexec, six.string_types):
if os.path.isfile(use_msiexec):
return True, use_msiexec
else:
... | [
"def",
"_get_msiexec",
"(",
"use_msiexec",
")",
":",
"if",
"use_msiexec",
"is",
"False",
":",
"return",
"False",
",",
"''",
"if",
"isinstance",
"(",
"use_msiexec",
",",
"six",
".",
"string_types",
")",
":",
"if",
"os",
".",
"path",
".",
"isfile",
"(",
... | Return if msiexec.exe will be used and the command to invoke it. | [
"Return",
"if",
"msiexec",
".",
"exe",
"will",
"be",
"used",
"and",
"the",
"command",
"to",
"invoke",
"it",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_pkg.py#L1255-L1271 | train | Return if msiexec. exe will be used and the command to invoke it. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/win_pkg.py | install | def install(name=None, refresh=False, pkgs=None, **kwargs):
r'''
Install the passed package(s) on the system using winrepo
Args:
name (str):
The name of a single package, or a comma-separated list of packages
to install. (no spaces after the commas)
refresh (bool):... | python | def install(name=None, refresh=False, pkgs=None, **kwargs):
r'''
Install the passed package(s) on the system using winrepo
Args:
name (str):
The name of a single package, or a comma-separated list of packages
to install. (no spaces after the commas)
refresh (bool):... | [
"def",
"install",
"(",
"name",
"=",
"None",
",",
"refresh",
"=",
"False",
",",
"pkgs",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"{",
"}",
"saltenv",
"=",
"kwargs",
".",
"pop",
"(",
"'saltenv'",
",",
"'base'",
")",
"refresh",
"=... | r'''
Install the passed package(s) on the system using winrepo
Args:
name (str):
The name of a single package, or a comma-separated list of packages
to install. (no spaces after the commas)
refresh (bool):
Boolean value representing whether or not to refres... | [
"r",
"Install",
"the",
"passed",
"package",
"(",
"s",
")",
"on",
"the",
"system",
"using",
"winrepo"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_pkg.py#L1274-L1723 | train | r Installs the passed packages on the system using the winrepo package 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_pkg.py | upgrade | def upgrade(**kwargs):
'''
Upgrade all software. Currently not implemented
Kwargs:
saltenv (str): The salt environment to use. Default ``base``.
refresh (bool): Refresh package metadata. Default ``True``.
.. note::
This feature is not yet implemented for Windows.
Returns:
... | python | def upgrade(**kwargs):
'''
Upgrade all software. Currently not implemented
Kwargs:
saltenv (str): The salt environment to use. Default ``base``.
refresh (bool): Refresh package metadata. Default ``True``.
.. note::
This feature is not yet implemented for Windows.
Returns:
... | [
"def",
"upgrade",
"(",
"*",
"*",
"kwargs",
")",
":",
"log",
".",
"warning",
"(",
"'pkg.upgrade not implemented on Windows yet'",
")",
"refresh",
"=",
"salt",
".",
"utils",
".",
"data",
".",
"is_true",
"(",
"kwargs",
".",
"get",
"(",
"'refresh'",
",",
"True... | Upgrade all software. Currently not implemented
Kwargs:
saltenv (str): The salt environment to use. Default ``base``.
refresh (bool): Refresh package metadata. Default ``True``.
.. note::
This feature is not yet implemented for Windows.
Returns:
dict: Empty dict, until imp... | [
"Upgrade",
"all",
"software",
".",
"Currently",
"not",
"implemented"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_pkg.py#L1726-L1754 | train | Upgrade all software. Currently not implemented on Windows yet. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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_pkg.py | remove | def remove(name=None, pkgs=None, **kwargs):
'''
Remove the passed package(s) from the system using winrepo
.. versionadded:: 0.16.0
Args:
name (str):
The name(s) of the package(s) to be uninstalled. Can be a
single package or a comma delimited list of packages, no space... | python | def remove(name=None, pkgs=None, **kwargs):
'''
Remove the passed package(s) from the system using winrepo
.. versionadded:: 0.16.0
Args:
name (str):
The name(s) of the package(s) to be uninstalled. Can be a
single package or a comma delimited list of packages, no space... | [
"def",
"remove",
"(",
"name",
"=",
"None",
",",
"pkgs",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"saltenv",
"=",
"kwargs",
".",
"get",
"(",
"'saltenv'",
",",
"'base'",
")",
"refresh",
"=",
"salt",
".",
"utils",
".",
"data",
".",
"is_true",
... | Remove the passed package(s) from the system using winrepo
.. versionadded:: 0.16.0
Args:
name (str):
The name(s) of the package(s) to be uninstalled. Can be a
single package or a comma delimited list of packages, no spaces.
pkgs (list):
A list of packages ... | [
"Remove",
"the",
"passed",
"package",
"(",
"s",
")",
"from",
"the",
"system",
"using",
"winrepo"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_pkg.py#L1757-L2044 | train | Remove the passed package from the specified package list or all packages in 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_pkg.py | get_repo_data | def get_repo_data(saltenv='base'):
'''
Returns the existing package metadata db. Will create it, if it does not
exist, however will not refresh it.
Args:
saltenv (str): Salt environment. Default ``base``
Returns:
dict: A dict containing contents of metadata db.
CLI Example:
... | python | def get_repo_data(saltenv='base'):
'''
Returns the existing package metadata db. Will create it, if it does not
exist, however will not refresh it.
Args:
saltenv (str): Salt environment. Default ``base``
Returns:
dict: A dict containing contents of metadata db.
CLI Example:
... | [
"def",
"get_repo_data",
"(",
"saltenv",
"=",
"'base'",
")",
":",
"# we only call refresh_db if it does not exist, as we want to return",
"# the existing data even if its old, other parts of the code call this,",
"# but they will call refresh if they need too.",
"repo_details",
"=",
"_get_r... | Returns the existing package metadata db. Will create it, if it does not
exist, however will not refresh it.
Args:
saltenv (str): Salt environment. Default ``base``
Returns:
dict: A dict containing contents of metadata db.
CLI Example:
.. code-block:: bash
salt '*' pkg.g... | [
"Returns",
"the",
"existing",
"package",
"metadata",
"db",
".",
"Will",
"create",
"it",
"if",
"it",
"does",
"not",
"exist",
"however",
"will",
"not",
"refresh",
"it",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_pkg.py#L2088-L2134 | train | Returns the existing package metadata db. Will create it if it does not exist. Will refresh it if it does not exist. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/win_pkg.py | _get_name_map | def _get_name_map(saltenv='base'):
'''
Return a reverse map of full pkg names to the names recognized by winrepo.
'''
u_name_map = {}
name_map = get_repo_data(saltenv).get('name_map', {})
if not six.PY2:
return name_map
for k in name_map:
u_name_map[k] = name_map[k]
ret... | python | def _get_name_map(saltenv='base'):
'''
Return a reverse map of full pkg names to the names recognized by winrepo.
'''
u_name_map = {}
name_map = get_repo_data(saltenv).get('name_map', {})
if not six.PY2:
return name_map
for k in name_map:
u_name_map[k] = name_map[k]
ret... | [
"def",
"_get_name_map",
"(",
"saltenv",
"=",
"'base'",
")",
":",
"u_name_map",
"=",
"{",
"}",
"name_map",
"=",
"get_repo_data",
"(",
"saltenv",
")",
".",
"get",
"(",
"'name_map'",
",",
"{",
"}",
")",
"if",
"not",
"six",
".",
"PY2",
":",
"return",
"na... | Return a reverse map of full pkg names to the names recognized by winrepo. | [
"Return",
"a",
"reverse",
"map",
"of",
"full",
"pkg",
"names",
"to",
"the",
"names",
"recognized",
"by",
"winrepo",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_pkg.py#L2137-L2149 | train | Return a reverse map of full pkg names to the names recognized by winrepo. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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_pkg.py | compare_versions | def compare_versions(ver1='', oper='==', ver2=''):
'''
Compare software package versions
Args:
ver1 (str): A software version to compare
oper (str): The operand to use to compare
ver2 (str): A software version to compare
Returns:
bool: True if the comparison is valid, o... | python | def compare_versions(ver1='', oper='==', ver2=''):
'''
Compare software package versions
Args:
ver1 (str): A software version to compare
oper (str): The operand to use to compare
ver2 (str): A software version to compare
Returns:
bool: True if the comparison is valid, o... | [
"def",
"compare_versions",
"(",
"ver1",
"=",
"''",
",",
"oper",
"=",
"'=='",
",",
"ver2",
"=",
"''",
")",
":",
"if",
"not",
"ver1",
":",
"raise",
"SaltInvocationError",
"(",
"'compare_version, ver1 is blank'",
")",
"if",
"not",
"ver2",
":",
"raise",
"SaltI... | Compare software package versions
Args:
ver1 (str): A software version to compare
oper (str): The operand to use to compare
ver2 (str): A software version to compare
Returns:
bool: True if the comparison is valid, otherwise False
CLI Example:
.. code-block:: bash
... | [
"Compare",
"software",
"package",
"versions"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_pkg.py#L2184-L2218 | train | Compare two software package versions | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/configparser.py | GitConfigParser._read | def _read(self, fp, fpname):
'''
Makes the following changes from the RawConfigParser:
1. Strip leading tabs from non-section-header lines.
2. Treat 8 spaces at the beginning of a line as a tab.
3. Treat lines beginning with a tab as options.
4. Drops support for continu... | python | def _read(self, fp, fpname):
'''
Makes the following changes from the RawConfigParser:
1. Strip leading tabs from non-section-header lines.
2. Treat 8 spaces at the beginning of a line as a tab.
3. Treat lines beginning with a tab as options.
4. Drops support for continu... | [
"def",
"_read",
"(",
"self",
",",
"fp",
",",
"fpname",
")",
":",
"cursect",
"=",
"None",
"# None, or a dictionary",
"optname",
"=",
"None",
"lineno",
"=",
"0",
"e",
"=",
"None",
"# None, or an exception",
"while",
"True",
":",
"line",
"=",
"salt",
".",
"... | Makes the following changes from the RawConfigParser:
1. Strip leading tabs from non-section-header lines.
2. Treat 8 spaces at the beginning of a line as a tab.
3. Treat lines beginning with a tab as options.
4. Drops support for continuation lines.
5. Multiple values for a giv... | [
"Makes",
"the",
"following",
"changes",
"from",
"the",
"RawConfigParser",
":"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/configparser.py#L57-L137 | train | Reads the contents of the file and returns the object. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/configparser.py | GitConfigParser._string_check | def _string_check(self, value, allow_list=False):
'''
Based on the string-checking code from the SafeConfigParser's set()
function, this enforces string values for config options.
'''
if self._optcre is self.OPTCRE or value:
is_list = isinstance(value, list)
... | python | def _string_check(self, value, allow_list=False):
'''
Based on the string-checking code from the SafeConfigParser's set()
function, this enforces string values for config options.
'''
if self._optcre is self.OPTCRE or value:
is_list = isinstance(value, list)
... | [
"def",
"_string_check",
"(",
"self",
",",
"value",
",",
"allow_list",
"=",
"False",
")",
":",
"if",
"self",
".",
"_optcre",
"is",
"self",
".",
"OPTCRE",
"or",
"value",
":",
"is_list",
"=",
"isinstance",
"(",
"value",
",",
"list",
")",
"if",
"is_list",
... | Based on the string-checking code from the SafeConfigParser's set()
function, this enforces string values for config options. | [
"Based",
"on",
"the",
"string",
"-",
"checking",
"code",
"from",
"the",
"SafeConfigParser",
"s",
"set",
"()",
"function",
"this",
"enforces",
"string",
"values",
"for",
"config",
"options",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/configparser.py#L139-L151 | train | Checks that the option value is a string. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/configparser.py | GitConfigParser.get | def get(self, section, option, as_list=False):
'''
Adds an optional "as_list" argument to ensure a list is returned. This
is helpful when iterating over an option which may or may not be a
multivar.
'''
ret = super(GitConfigParser, self).get(section, option)
if as... | python | def get(self, section, option, as_list=False):
'''
Adds an optional "as_list" argument to ensure a list is returned. This
is helpful when iterating over an option which may or may not be a
multivar.
'''
ret = super(GitConfigParser, self).get(section, option)
if as... | [
"def",
"get",
"(",
"self",
",",
"section",
",",
"option",
",",
"as_list",
"=",
"False",
")",
":",
"ret",
"=",
"super",
"(",
"GitConfigParser",
",",
"self",
")",
".",
"get",
"(",
"section",
",",
"option",
")",
"if",
"as_list",
"and",
"not",
"isinstanc... | Adds an optional "as_list" argument to ensure a list is returned. This
is helpful when iterating over an option which may or may not be a
multivar. | [
"Adds",
"an",
"optional",
"as_list",
"argument",
"to",
"ensure",
"a",
"list",
"is",
"returned",
".",
"This",
"is",
"helpful",
"when",
"iterating",
"over",
"an",
"option",
"which",
"may",
"or",
"may",
"not",
"be",
"a",
"multivar",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/configparser.py#L153-L162 | train | Returns the value of a
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/utils/configparser.py | GitConfigParser.set | def set(self, section, option, value=''):
'''
This is overridden from the RawConfigParser merely to change the
default value for the 'value' argument.
'''
self._string_check(value)
super(GitConfigParser, self).set(section, option, value) | python | def set(self, section, option, value=''):
'''
This is overridden from the RawConfigParser merely to change the
default value for the 'value' argument.
'''
self._string_check(value)
super(GitConfigParser, self).set(section, option, value) | [
"def",
"set",
"(",
"self",
",",
"section",
",",
"option",
",",
"value",
"=",
"''",
")",
":",
"self",
".",
"_string_check",
"(",
"value",
")",
"super",
"(",
"GitConfigParser",
",",
"self",
")",
".",
"set",
"(",
"section",
",",
"option",
",",
"value",
... | This is overridden from the RawConfigParser merely to change the
default value for the 'value' argument. | [
"This",
"is",
"overridden",
"from",
"the",
"RawConfigParser",
"merely",
"to",
"change",
"the",
"default",
"value",
"for",
"the",
"value",
"argument",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/configparser.py#L164-L170 | train | Override the default set method to change the
default value for the 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/utils/configparser.py | GitConfigParser.set_multivar | def set_multivar(self, section, option, value=''):
'''
This function is unique to the GitConfigParser. It will add another
value for the option if it already exists, converting the option's
value to a list if applicable.
If "value" is a list, then any existing values for the spe... | python | def set_multivar(self, section, option, value=''):
'''
This function is unique to the GitConfigParser. It will add another
value for the option if it already exists, converting the option's
value to a list if applicable.
If "value" is a list, then any existing values for the spe... | [
"def",
"set_multivar",
"(",
"self",
",",
"section",
",",
"option",
",",
"value",
"=",
"''",
")",
":",
"self",
".",
"_string_check",
"(",
"value",
",",
"allow_list",
"=",
"True",
")",
"if",
"not",
"section",
"or",
"section",
"==",
"self",
".",
"DEFAULTS... | This function is unique to the GitConfigParser. It will add another
value for the option if it already exists, converting the option's
value to a list if applicable.
If "value" is a list, then any existing values for the specified
section and option will be replaced with the list being ... | [
"This",
"function",
"is",
"unique",
"to",
"the",
"GitConfigParser",
".",
"It",
"will",
"add",
"another",
"value",
"for",
"the",
"option",
"if",
"it",
"already",
"exists",
"converting",
"the",
"option",
"s",
"value",
"to",
"a",
"list",
"if",
"applicable",
"... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/configparser.py#L189-L208 | train | This function will set the value of an option in a specified section. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/configparser.py | GitConfigParser.remove_option_regexp | def remove_option_regexp(self, section, option, expr):
'''
Remove an option with a value matching the expression. Works on single
values and multivars.
'''
if not section or section == self.DEFAULTSECT:
sectdict = self._defaults
else:
try:
... | python | def remove_option_regexp(self, section, option, expr):
'''
Remove an option with a value matching the expression. Works on single
values and multivars.
'''
if not section or section == self.DEFAULTSECT:
sectdict = self._defaults
else:
try:
... | [
"def",
"remove_option_regexp",
"(",
"self",
",",
"section",
",",
"option",
",",
"expr",
")",
":",
"if",
"not",
"section",
"or",
"section",
"==",
"self",
".",
"DEFAULTSECT",
":",
"sectdict",
"=",
"self",
".",
"_defaults",
"else",
":",
"try",
":",
"sectdic... | Remove an option with a value matching the expression. Works on single
values and multivars. | [
"Remove",
"an",
"option",
"with",
"a",
"value",
"matching",
"the",
"expression",
".",
"Works",
"on",
"single",
"values",
"and",
"multivars",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/configparser.py#L210-L241 | train | Removes an option with a value matching the expression. Works on single - level items and multivars. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/configparser.py | GitConfigParser.write | def write(self, fp_):
'''
Makes the following changes from the RawConfigParser:
1. Prepends options with a tab character.
2. Does not write a blank line between sections.
3. When an option's value is a list, a line for each option is written.
This allows us to support... | python | def write(self, fp_):
'''
Makes the following changes from the RawConfigParser:
1. Prepends options with a tab character.
2. Does not write a blank line between sections.
3. When an option's value is a list, a line for each option is written.
This allows us to support... | [
"def",
"write",
"(",
"self",
",",
"fp_",
")",
":",
"convert",
"=",
"salt",
".",
"utils",
".",
"stringutils",
".",
"to_bytes",
"if",
"'b'",
"in",
"fp_",
".",
"mode",
"else",
"salt",
".",
"utils",
".",
"stringutils",
".",
"to_str",
"if",
"self",
".",
... | Makes the following changes from the RawConfigParser:
1. Prepends options with a tab character.
2. Does not write a blank line between sections.
3. When an option's value is a list, a line for each option is written.
This allows us to support multivars like a remote's "fetch" option.... | [
"Makes",
"the",
"following",
"changes",
"from",
"the",
"RawConfigParser",
":"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/configparser.py#L243-L268 | train | Writes the contents of the raw config file to the file - like object fp_. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/pillar/csvpillar.py | ext_pillar | def ext_pillar(
mid,
pillar,
path,
idkey='id',
namespace=None,
fieldnames=None,
restkey=None,
restval=None,
dialect='excel'):
'''
Read a CSV into Pillar
:param str path: Absolute path to a CSV file.
:param str idkey: (Optional) The... | python | def ext_pillar(
mid,
pillar,
path,
idkey='id',
namespace=None,
fieldnames=None,
restkey=None,
restval=None,
dialect='excel'):
'''
Read a CSV into Pillar
:param str path: Absolute path to a CSV file.
:param str idkey: (Optional) The... | [
"def",
"ext_pillar",
"(",
"mid",
",",
"pillar",
",",
"path",
",",
"idkey",
"=",
"'id'",
",",
"namespace",
"=",
"None",
",",
"fieldnames",
"=",
"None",
",",
"restkey",
"=",
"None",
",",
"restval",
"=",
"None",
",",
"dialect",
"=",
"'excel'",
")",
":",... | Read a CSV into Pillar
:param str path: Absolute path to a CSV file.
:param str idkey: (Optional) The column name of minion IDs.
:param str namespace: (Optional) A pillar key to namespace the values under.
:param list fieldnames: (Optional) if the first row of the CSV is not
column names they m... | [
"Read",
"a",
"CSV",
"into",
"Pillar"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/csvpillar.py#L60-L90 | train | Read a single pillar file into a Pillar 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/openstack_config.py | set_ | def set_(filename, section, parameter, value):
'''
Set a value in an OpenStack configuration file.
filename
The full path to the configuration file
section
The section in which the parameter will be set
parameter
The parameter to change
value
The value to set
... | python | def set_(filename, section, parameter, value):
'''
Set a value in an OpenStack configuration file.
filename
The full path to the configuration file
section
The section in which the parameter will be set
parameter
The parameter to change
value
The value to set
... | [
"def",
"set_",
"(",
"filename",
",",
"section",
",",
"parameter",
",",
"value",
")",
":",
"filename",
"=",
"_quote",
"(",
"filename",
")",
"section",
"=",
"_quote",
"(",
"section",
")",
"parameter",
"=",
"_quote",
"(",
"parameter",
")",
"value",
"=",
"... | Set a value in an OpenStack configuration file.
filename
The full path to the configuration file
section
The section in which the parameter will be set
parameter
The parameter to change
value
The value to set
CLI Example:
.. code-block:: bash
salt-c... | [
"Set",
"a",
"value",
"in",
"an",
"OpenStack",
"configuration",
"file",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/openstack_config.py#L50-L88 | train | Set a value in an OpenStack configuration file. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/openstack_config.py | get | def get(filename, section, parameter):
'''
Get a value from an OpenStack configuration file.
filename
The full path to the configuration file
section
The section from which to search for the parameter
parameter
The parameter to return
CLI Example:
.. code-block::... | python | def get(filename, section, parameter):
'''
Get a value from an OpenStack configuration file.
filename
The full path to the configuration file
section
The section from which to search for the parameter
parameter
The parameter to return
CLI Example:
.. code-block::... | [
"def",
"get",
"(",
"filename",
",",
"section",
",",
"parameter",
")",
":",
"filename",
"=",
"_quote",
"(",
"filename",
")",
"section",
"=",
"_quote",
"(",
"section",
")",
"parameter",
"=",
"_quote",
"(",
"parameter",
")",
"result",
"=",
"__salt__",
"[",
... | Get a value from an OpenStack configuration file.
filename
The full path to the configuration file
section
The section from which to search for the parameter
parameter
The parameter to return
CLI Example:
.. code-block:: bash
salt-call openstack_config.get /etc/... | [
"Get",
"a",
"value",
"from",
"an",
"OpenStack",
"configuration",
"file",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/openstack_config.py#L92-L127 | train | Get a value from an OpenStack configuration file. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/win_dacl.py | present | def present(name, objectType, user, permission, acetype, propagation):
'''
Ensure an ACE is present
'''
ret = {'name': name,
'result': True,
'changes': {},
'comment': ''}
tRet = __salt__['win_dacl.check_ace'](name, objectType, user, permission, acetype, propagation, ... | python | def present(name, objectType, user, permission, acetype, propagation):
'''
Ensure an ACE is present
'''
ret = {'name': name,
'result': True,
'changes': {},
'comment': ''}
tRet = __salt__['win_dacl.check_ace'](name, objectType, user, permission, acetype, propagation, ... | [
"def",
"present",
"(",
"name",
",",
"objectType",
",",
"user",
",",
"permission",
",",
"acetype",
",",
"propagation",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'result'",
":",
"True",
",",
"'changes'",
":",
"{",
"}",
",",
"'comment'",
"... | Ensure an ACE is present | [
"Ensure",
"an",
"ACE",
"is",
"present"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/win_dacl.py#L86-L118 | train | Ensure an ACE is present in the ACEs folder. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/win_dacl.py | inherit | def inherit(name, objectType, clear_existing_acl=False):
'''
Ensure an object is inheriting ACLs from its parent
'''
ret = {'name': name,
'result': True,
'changes': {},
'comment': ''}
tRet = __salt__['win_dacl.check_inheritance'](name, objectType)
if tRet['result... | python | def inherit(name, objectType, clear_existing_acl=False):
'''
Ensure an object is inheriting ACLs from its parent
'''
ret = {'name': name,
'result': True,
'changes': {},
'comment': ''}
tRet = __salt__['win_dacl.check_inheritance'](name, objectType)
if tRet['result... | [
"def",
"inherit",
"(",
"name",
",",
"objectType",
",",
"clear_existing_acl",
"=",
"False",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'result'",
":",
"True",
",",
"'changes'",
":",
"{",
"}",
",",
"'comment'",
":",
"''",
"}",
"tRet",
"=",... | Ensure an object is inheriting ACLs from its parent | [
"Ensure",
"an",
"object",
"is",
"inheriting",
"ACLs",
"from",
"its",
"parent"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/win_dacl.py#L156-L188 | train | Ensure an object is inheriting ACLs from its parent
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/win_dacl.py | disinherit | def disinherit(name, objectType, copy_inherited_acl=True):
'''
Ensure an object is not inheriting ACLs from its parent
'''
ret = {'name': name,
'result': True,
'changes': {},
'comment': ''}
tRet = __salt__['win_dacl.check_inheritance'](name, objectType)
if tRet['... | python | def disinherit(name, objectType, copy_inherited_acl=True):
'''
Ensure an object is not inheriting ACLs from its parent
'''
ret = {'name': name,
'result': True,
'changes': {},
'comment': ''}
tRet = __salt__['win_dacl.check_inheritance'](name, objectType)
if tRet['... | [
"def",
"disinherit",
"(",
"name",
",",
"objectType",
",",
"copy_inherited_acl",
"=",
"True",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'result'",
":",
"True",
",",
"'changes'",
":",
"{",
"}",
",",
"'comment'",
":",
"''",
"}",
"tRet",
"=... | Ensure an object is not inheriting ACLs from its parent | [
"Ensure",
"an",
"object",
"is",
"not",
"inheriting",
"ACLs",
"from",
"its",
"parent"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/win_dacl.py#L191-L222 | train | Ensure an object is not inheriting ACLs from its parent
ubes. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/output/progress.py | output | def output(ret, bar, **kwargs): # pylint: disable=unused-argument
'''
Update the progress bar
'''
if 'return_count' in ret:
val = ret['return_count']
# Avoid to fail if targets are behind a syndic. In this case actual return count will be
# higher than targeted by MoM itself.
... | python | def output(ret, bar, **kwargs): # pylint: disable=unused-argument
'''
Update the progress bar
'''
if 'return_count' in ret:
val = ret['return_count']
# Avoid to fail if targets are behind a syndic. In this case actual return count will be
# higher than targeted by MoM itself.
... | [
"def",
"output",
"(",
"ret",
",",
"bar",
",",
"*",
"*",
"kwargs",
")",
":",
"# pylint: disable=unused-argument",
"if",
"'return_count'",
"in",
"ret",
":",
"val",
"=",
"ret",
"[",
"'return_count'",
"]",
"# Avoid to fail if targets are behind a syndic. In this case actu... | Update the progress bar | [
"Update",
"the",
"progress",
"bar"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/output/progress.py#L21-L34 | train | Update the progress bar with the return count. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/output/progress.py | progress_iter | def progress_iter(progress):
'''
Initialize and return a progress bar iter
'''
widgets = [progressbar.Percentage(), ' ', progressbar.Bar(), ' ', progressbar.Timer(), ' Returns: [', progressbar.Counter(), '/{0}]'.format(progress['minion_count'])]
bar = progressbar.ProgressBar(widgets=widgets, maxval=... | python | def progress_iter(progress):
'''
Initialize and return a progress bar iter
'''
widgets = [progressbar.Percentage(), ' ', progressbar.Bar(), ' ', progressbar.Timer(), ' Returns: [', progressbar.Counter(), '/{0}]'.format(progress['minion_count'])]
bar = progressbar.ProgressBar(widgets=widgets, maxval=... | [
"def",
"progress_iter",
"(",
"progress",
")",
":",
"widgets",
"=",
"[",
"progressbar",
".",
"Percentage",
"(",
")",
",",
"' '",
",",
"progressbar",
".",
"Bar",
"(",
")",
",",
"' '",
",",
"progressbar",
".",
"Timer",
"(",
")",
",",
"' Returns: ['",
",",... | Initialize and return a progress bar iter | [
"Initialize",
"and",
"return",
"a",
"progress",
"bar",
"iter"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/output/progress.py#L37-L44 | train | Initialize and return a progress bar iter
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/preseed.py | mksls | def mksls(src, dst=None):
'''
Convert a preseed file to an SLS file
'''
ps_opts = {}
with salt.utils.files.fopen(src, 'r') as fh_:
for line in fh_:
line = salt.utils.stringutils.to_unicode(line)
if line.startswith('#'):
continue
if not line... | python | def mksls(src, dst=None):
'''
Convert a preseed file to an SLS file
'''
ps_opts = {}
with salt.utils.files.fopen(src, 'r') as fh_:
for line in fh_:
line = salt.utils.stringutils.to_unicode(line)
if line.startswith('#'):
continue
if not line... | [
"def",
"mksls",
"(",
"src",
",",
"dst",
"=",
"None",
")",
":",
"ps_opts",
"=",
"{",
"}",
"with",
"salt",
".",
"utils",
".",
"files",
".",
"fopen",
"(",
"src",
",",
"'r'",
")",
"as",
"fh_",
":",
"for",
"line",
"in",
"fh_",
":",
"line",
"=",
"s... | Convert a preseed file to an SLS file | [
"Convert",
"a",
"preseed",
"file",
"to",
"an",
"SLS",
"file"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/preseed.py#L14-L80 | train | Convert a preseed file to an SLS file | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/win_lgpo.py | _updateNamespace | def _updateNamespace(item, new_namespace):
'''
helper function to recursively update the namespaces of an item
'''
temp_item = ''
i = item.tag.find('}')
if i >= 0:
temp_item = item.tag[i+1:]
else:
temp_item = item.tag
item.tag = '{{{0}}}{1}'.format(new_namespace, temp_ite... | python | def _updateNamespace(item, new_namespace):
'''
helper function to recursively update the namespaces of an item
'''
temp_item = ''
i = item.tag.find('}')
if i >= 0:
temp_item = item.tag[i+1:]
else:
temp_item = item.tag
item.tag = '{{{0}}}{1}'.format(new_namespace, temp_ite... | [
"def",
"_updateNamespace",
"(",
"item",
",",
"new_namespace",
")",
":",
"temp_item",
"=",
"''",
"i",
"=",
"item",
".",
"tag",
".",
"find",
"(",
"'}'",
")",
"if",
"i",
">=",
"0",
":",
"temp_item",
"=",
"item",
".",
"tag",
"[",
"i",
"+",
"1",
":",
... | helper function to recursively update the namespaces of an item | [
"helper",
"function",
"to",
"recursively",
"update",
"the",
"namespaces",
"of",
"an",
"item"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_lgpo.py#L4750-L4770 | train | helper function to recursively update the namespaces of an item | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/win_lgpo.py | _updatePolicyElements | def _updatePolicyElements(policy_item, regkey):
'''
helper function to add the reg key to each policies element definitions if
the key attribute is not defined to make xpath searching easier for each
child in the policy <elements> item
'''
for child in policy_item.getiterator():
if 'valu... | python | def _updatePolicyElements(policy_item, regkey):
'''
helper function to add the reg key to each policies element definitions if
the key attribute is not defined to make xpath searching easier for each
child in the policy <elements> item
'''
for child in policy_item.getiterator():
if 'valu... | [
"def",
"_updatePolicyElements",
"(",
"policy_item",
",",
"regkey",
")",
":",
"for",
"child",
"in",
"policy_item",
".",
"getiterator",
"(",
")",
":",
"if",
"'valueName'",
"in",
"child",
".",
"attrib",
":",
"if",
"'key'",
"not",
"in",
"child",
".",
"attrib",... | helper function to add the reg key to each policies element definitions if
the key attribute is not defined to make xpath searching easier for each
child in the policy <elements> item | [
"helper",
"function",
"to",
"add",
"the",
"reg",
"key",
"to",
"each",
"policies",
"element",
"definitions",
"if",
"the",
"key",
"attribute",
"is",
"not",
"defined",
"to",
"make",
"xpath",
"searching",
"easier",
"for",
"each",
"child",
"in",
"the",
"policy",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_lgpo.py#L4773-L4783 | train | helper function to update the policy elements in the xml element definitions | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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_lgpo.py | _remove_unicode_encoding | def _remove_unicode_encoding(xml_file):
'''
attempts to remove the "encoding='unicode'" from an xml file
as lxml does not support that on a windows node currently
see issue #38100
'''
with salt.utils.files.fopen(xml_file, 'rb') as f:
xml_content = f.read()
modified_xml = re.sub(r' en... | python | def _remove_unicode_encoding(xml_file):
'''
attempts to remove the "encoding='unicode'" from an xml file
as lxml does not support that on a windows node currently
see issue #38100
'''
with salt.utils.files.fopen(xml_file, 'rb') as f:
xml_content = f.read()
modified_xml = re.sub(r' en... | [
"def",
"_remove_unicode_encoding",
"(",
"xml_file",
")",
":",
"with",
"salt",
".",
"utils",
".",
"files",
".",
"fopen",
"(",
"xml_file",
",",
"'rb'",
")",
"as",
"f",
":",
"xml_content",
"=",
"f",
".",
"read",
"(",
")",
"modified_xml",
"=",
"re",
".",
... | attempts to remove the "encoding='unicode'" from an xml file
as lxml does not support that on a windows node currently
see issue #38100 | [
"attempts",
"to",
"remove",
"the",
"encoding",
"=",
"unicode",
"from",
"an",
"xml",
"file",
"as",
"lxml",
"does",
"not",
"support",
"that",
"on",
"a",
"windows",
"node",
"currently",
"see",
"issue",
"#38100"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_lgpo.py#L4786-L4796 | train | Remove the encoding = unicode from an xml 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.