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/utils/win_pdh.py | Counter.get_info | def get_info(self):
'''
Get information about the counter
.. note::
GetCounterInfo sometimes crashes in the wrapper code. Fewer crashes
if this is called after sampling data.
'''
if not self.info:
ci = win32pdh.GetCounterInfo(self.handle, 0)
... | python | def get_info(self):
'''
Get information about the counter
.. note::
GetCounterInfo sometimes crashes in the wrapper code. Fewer crashes
if this is called after sampling data.
'''
if not self.info:
ci = win32pdh.GetCounterInfo(self.handle, 0)
... | [
"def",
"get_info",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"info",
":",
"ci",
"=",
"win32pdh",
".",
"GetCounterInfo",
"(",
"self",
".",
"handle",
",",
"0",
")",
"self",
".",
"info",
"=",
"{",
"'type'",
":",
"ci",
"[",
"0",
"]",
",",
"'... | Get information about the counter
.. note::
GetCounterInfo sometimes crashes in the wrapper code. Fewer crashes
if this is called after sampling data. | [
"Get",
"information",
"about",
"the",
"counter"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/win_pdh.py#L193-L219 | train | Get information about the counter. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/win_pdh.py | Counter.value | def value(self):
'''
Return the counter value
Returns:
long: The counter value
'''
(counter_type, value) = win32pdh.GetFormattedCounterValue(
self.handle, win32pdh.PDH_FMT_DOUBLE)
self.type = counter_type
return value | python | def value(self):
'''
Return the counter value
Returns:
long: The counter value
'''
(counter_type, value) = win32pdh.GetFormattedCounterValue(
self.handle, win32pdh.PDH_FMT_DOUBLE)
self.type = counter_type
return value | [
"def",
"value",
"(",
"self",
")",
":",
"(",
"counter_type",
",",
"value",
")",
"=",
"win32pdh",
".",
"GetFormattedCounterValue",
"(",
"self",
".",
"handle",
",",
"win32pdh",
".",
"PDH_FMT_DOUBLE",
")",
"self",
".",
"type",
"=",
"counter_type",
"return",
"v... | Return the counter value
Returns:
long: The counter value | [
"Return",
"the",
"counter",
"value"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/win_pdh.py#L221-L231 | train | Return the counter value of the current object | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/win_pdh.py | Counter.type_string | def type_string(self):
'''
Returns the names of the flags that are set in the Type field
It can be used to format the counter.
'''
type = self.get_info()['type']
type_list = []
for member in dir(self):
if member.startswith("PERF_"):
bi... | python | def type_string(self):
'''
Returns the names of the flags that are set in the Type field
It can be used to format the counter.
'''
type = self.get_info()['type']
type_list = []
for member in dir(self):
if member.startswith("PERF_"):
bi... | [
"def",
"type_string",
"(",
"self",
")",
":",
"type",
"=",
"self",
".",
"get_info",
"(",
")",
"[",
"'type'",
"]",
"type_list",
"=",
"[",
"]",
"for",
"member",
"in",
"dir",
"(",
"self",
")",
":",
"if",
"member",
".",
"startswith",
"(",
"\"PERF_\"",
"... | Returns the names of the flags that are set in the Type field
It can be used to format the counter. | [
"Returns",
"the",
"names",
"of",
"the",
"flags",
"that",
"are",
"set",
"in",
"the",
"Type",
"field"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/win_pdh.py#L233-L246 | train | Returns the names of the flags that are set in the Type field
It can be used to format the counter. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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_path.py | exists | def exists(name, index=None):
'''
Add the directory to the system PATH at index location
index
Position where the directory should be placed in the PATH. This is
0-indexed, so 0 means to prepend at the very start of the PATH.
.. note::
If the index is not specified, and... | python | def exists(name, index=None):
'''
Add the directory to the system PATH at index location
index
Position where the directory should be placed in the PATH. This is
0-indexed, so 0 means to prepend at the very start of the PATH.
.. note::
If the index is not specified, and... | [
"def",
"exists",
"(",
"name",
",",
"index",
"=",
"None",
")",
":",
"try",
":",
"name",
"=",
"os",
".",
"path",
".",
"normpath",
"(",
"salt",
".",
"utils",
".",
"stringutils",
".",
"to_unicode",
"(",
"name",
")",
")",
"except",
"TypeError",
":",
"na... | Add the directory to the system PATH at index location
index
Position where the directory should be placed in the PATH. This is
0-indexed, so 0 means to prepend at the very start of the PATH.
.. note::
If the index is not specified, and the directory needs to be added
... | [
"Add",
"the",
"directory",
"to",
"the",
"system",
"PATH",
"at",
"index",
"location"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/win_path.py#L66-L234 | train | Return a list of the names of the named file in the system 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/proxy/rest_sample.py | id | def id(opts):
'''
Return a unique ID for this proxy minion. This ID MUST NOT CHANGE.
If it changes while the proxy is running the salt-master will get
really confused and may stop talking to this minion
'''
r = salt.utils.http.query(opts['proxy']['url']+'id', decode_type='json', decode=True)
... | python | def id(opts):
'''
Return a unique ID for this proxy minion. This ID MUST NOT CHANGE.
If it changes while the proxy is running the salt-master will get
really confused and may stop talking to this minion
'''
r = salt.utils.http.query(opts['proxy']['url']+'id', decode_type='json', decode=True)
... | [
"def",
"id",
"(",
"opts",
")",
":",
"r",
"=",
"salt",
".",
"utils",
".",
"http",
".",
"query",
"(",
"opts",
"[",
"'proxy'",
"]",
"[",
"'url'",
"]",
"+",
"'id'",
",",
"decode_type",
"=",
"'json'",
",",
"decode",
"=",
"True",
")",
"return",
"r",
... | Return a unique ID for this proxy minion. This ID MUST NOT CHANGE.
If it changes while the proxy is running the salt-master will get
really confused and may stop talking to this minion | [
"Return",
"a",
"unique",
"ID",
"for",
"this",
"proxy",
"minion",
".",
"This",
"ID",
"MUST",
"NOT",
"CHANGE",
".",
"If",
"it",
"changes",
"while",
"the",
"proxy",
"is",
"running",
"the",
"salt",
"-",
"master",
"will",
"get",
"really",
"confused",
"and",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/rest_sample.py#L69-L76 | train | Return a unique ID for this proxy minion | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/proxy/rest_sample.py | grains | def grains():
'''
Get the grains from the proxied device
'''
if not DETAILS.get('grains_cache', {}):
r = salt.utils.http.query(DETAILS['url']+'info', decode_type='json', decode=True)
DETAILS['grains_cache'] = r['dict']
return DETAILS['grains_cache'] | python | def grains():
'''
Get the grains from the proxied device
'''
if not DETAILS.get('grains_cache', {}):
r = salt.utils.http.query(DETAILS['url']+'info', decode_type='json', decode=True)
DETAILS['grains_cache'] = r['dict']
return DETAILS['grains_cache'] | [
"def",
"grains",
"(",
")",
":",
"if",
"not",
"DETAILS",
".",
"get",
"(",
"'grains_cache'",
",",
"{",
"}",
")",
":",
"r",
"=",
"salt",
".",
"utils",
".",
"http",
".",
"query",
"(",
"DETAILS",
"[",
"'url'",
"]",
"+",
"'info'",
",",
"decode_type",
"... | Get the grains from the proxied device | [
"Get",
"the",
"grains",
"from",
"the",
"proxied",
"device"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/rest_sample.py#L79-L86 | train | Get the grains from the proxied device
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/proxy/rest_sample.py | service_start | def service_start(name):
'''
Start a "service" on the REST server
'''
r = salt.utils.http.query(DETAILS['url']+'service/start/'+name, decode_type='json', decode=True)
return r['dict'] | python | def service_start(name):
'''
Start a "service" on the REST server
'''
r = salt.utils.http.query(DETAILS['url']+'service/start/'+name, decode_type='json', decode=True)
return r['dict'] | [
"def",
"service_start",
"(",
"name",
")",
":",
"r",
"=",
"salt",
".",
"utils",
".",
"http",
".",
"query",
"(",
"DETAILS",
"[",
"'url'",
"]",
"+",
"'service/start/'",
"+",
"name",
",",
"decode_type",
"=",
"'json'",
",",
"decode",
"=",
"True",
")",
"re... | Start a "service" on the REST server | [
"Start",
"a",
"service",
"on",
"the",
"REST",
"server"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/rest_sample.py#L102-L107 | train | Start a service on the REST server
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/proxy/rest_sample.py | service_list | def service_list():
'''
List "services" on the REST server
'''
r = salt.utils.http.query(DETAILS['url']+'service/list', decode_type='json', decode=True)
return r['dict'] | python | def service_list():
'''
List "services" on the REST server
'''
r = salt.utils.http.query(DETAILS['url']+'service/list', decode_type='json', decode=True)
return r['dict'] | [
"def",
"service_list",
"(",
")",
":",
"r",
"=",
"salt",
".",
"utils",
".",
"http",
".",
"query",
"(",
"DETAILS",
"[",
"'url'",
"]",
"+",
"'service/list'",
",",
"decode_type",
"=",
"'json'",
",",
"decode",
"=",
"True",
")",
"return",
"r",
"[",
"'dict'... | List "services" on the REST server | [
"List",
"services",
"on",
"the",
"REST",
"server"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/rest_sample.py#L126-L131 | train | List services on the REST server | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/proxy/rest_sample.py | package_install | def package_install(name, **kwargs):
'''
Install a "package" on the REST server
'''
cmd = DETAILS['url']+'package/install/'+name
if kwargs.get('version', False):
cmd += '/'+kwargs['version']
else:
cmd += '/1.0'
r = salt.utils.http.query(cmd, decode_type='json', decode=True)
... | python | def package_install(name, **kwargs):
'''
Install a "package" on the REST server
'''
cmd = DETAILS['url']+'package/install/'+name
if kwargs.get('version', False):
cmd += '/'+kwargs['version']
else:
cmd += '/1.0'
r = salt.utils.http.query(cmd, decode_type='json', decode=True)
... | [
"def",
"package_install",
"(",
"name",
",",
"*",
"*",
"kwargs",
")",
":",
"cmd",
"=",
"DETAILS",
"[",
"'url'",
"]",
"+",
"'package/install/'",
"+",
"name",
"if",
"kwargs",
".",
"get",
"(",
"'version'",
",",
"False",
")",
":",
"cmd",
"+=",
"'/'",
"+",... | Install a "package" on the REST server | [
"Install",
"a",
"package",
"on",
"the",
"REST",
"server"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/rest_sample.py#L150-L160 | train | Install a package on the REST server | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/proxy/rest_sample.py | ping | def ping():
'''
Is the REST server up?
'''
r = salt.utils.http.query(DETAILS['url']+'ping', decode_type='json', decode=True)
try:
return r['dict'].get('ret', False)
except Exception:
return False | python | def ping():
'''
Is the REST server up?
'''
r = salt.utils.http.query(DETAILS['url']+'ping', decode_type='json', decode=True)
try:
return r['dict'].get('ret', False)
except Exception:
return False | [
"def",
"ping",
"(",
")",
":",
"r",
"=",
"salt",
".",
"utils",
".",
"http",
".",
"query",
"(",
"DETAILS",
"[",
"'url'",
"]",
"+",
"'ping'",
",",
"decode_type",
"=",
"'json'",
",",
"decode",
"=",
"True",
")",
"try",
":",
"return",
"r",
"[",
"'dict'... | Is the REST server up? | [
"Is",
"the",
"REST",
"server",
"up?"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/rest_sample.py#L194-L202 | train | Check if the server is up and return the object ID | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/mac_xattr.py | exists | def exists(name, attributes):
'''
Make sure the given attributes exist on the file/directory
name
The path to the file/directory
attributes
The attributes that should exist on the file/directory, this is accepted as
an array, with key and value split with an equals sign, if you... | python | def exists(name, attributes):
'''
Make sure the given attributes exist on the file/directory
name
The path to the file/directory
attributes
The attributes that should exist on the file/directory, this is accepted as
an array, with key and value split with an equals sign, if you... | [
"def",
"exists",
"(",
"name",
",",
"attributes",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'result'",
":",
"True",
",",
"'comment'",
":",
"''",
",",
"'changes'",
":",
"{",
"}",
"}",
"if",
"not",
"os",
".",
"path",
".",
"exists",
"("... | Make sure the given attributes exist on the file/directory
name
The path to the file/directory
attributes
The attributes that should exist on the file/directory, this is accepted as
an array, with key and value split with an equals sign, if you want to specify
a hex value then ... | [
"Make",
"sure",
"the",
"given",
"attributes",
"exist",
"on",
"the",
"file",
"/",
"directory"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/mac_xattr.py#L35-L85 | train | Make sure the given attributes exist on the file or directory. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/mac_xattr.py | delete | def delete(name, attributes):
'''
Make sure the given attributes are deleted from the file/directory
name
The path to the file/directory
attributes
The attributes that should be removed from the file/directory, this is accepted as
an array.
'''
ret = {'name': name,
... | python | def delete(name, attributes):
'''
Make sure the given attributes are deleted from the file/directory
name
The path to the file/directory
attributes
The attributes that should be removed from the file/directory, this is accepted as
an array.
'''
ret = {'name': name,
... | [
"def",
"delete",
"(",
"name",
",",
"attributes",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'result'",
":",
"True",
",",
"'comment'",
":",
"''",
",",
"'changes'",
":",
"{",
"}",
"}",
"if",
"not",
"os",
".",
"path",
".",
"exists",
"("... | Make sure the given attributes are deleted from the file/directory
name
The path to the file/directory
attributes
The attributes that should be removed from the file/directory, this is accepted as
an array. | [
"Make",
"sure",
"the",
"given",
"attributes",
"are",
"deleted",
"from",
"the",
"file",
"/",
"directory"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/mac_xattr.py#L88-L121 | train | Delete the given attributes from the given file or directory. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/validate/path.py | is_writeable | def is_writeable(path, check_parent=False):
'''
Check if a given path is writeable by the current user.
:param path: The path to check
:param check_parent: If the path to check does not exist, check for the
ability to write to the parent directory instead
:returns: True or False
'''
... | python | def is_writeable(path, check_parent=False):
'''
Check if a given path is writeable by the current user.
:param path: The path to check
:param check_parent: If the path to check does not exist, check for the
ability to write to the parent directory instead
:returns: True or False
'''
... | [
"def",
"is_writeable",
"(",
"path",
",",
"check_parent",
"=",
"False",
")",
":",
"if",
"os",
".",
"access",
"(",
"path",
",",
"os",
".",
"F_OK",
")",
"and",
"os",
".",
"access",
"(",
"path",
",",
"os",
".",
"W_OK",
")",
":",
"# The path exists and is... | Check if a given path is writeable by the current user.
:param path: The path to check
:param check_parent: If the path to check does not exist, check for the
ability to write to the parent directory instead
:returns: True or False | [
"Check",
"if",
"a",
"given",
"path",
"is",
"writeable",
"by",
"the",
"current",
"user",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/validate/path.py#L17-L50 | train | Check if a given path is writeable by the current user. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/validate/path.py | is_readable | def is_readable(path):
'''
Check if a given path is readable by the current user.
:param path: The path to check
:returns: True or False
'''
if os.access(path, os.F_OK) and os.access(path, os.R_OK):
# The path exists and is readable
return True
# The path does not exist
... | python | def is_readable(path):
'''
Check if a given path is readable by the current user.
:param path: The path to check
:returns: True or False
'''
if os.access(path, os.F_OK) and os.access(path, os.R_OK):
# The path exists and is readable
return True
# The path does not exist
... | [
"def",
"is_readable",
"(",
"path",
")",
":",
"if",
"os",
".",
"access",
"(",
"path",
",",
"os",
".",
"F_OK",
")",
"and",
"os",
".",
"access",
"(",
"path",
",",
"os",
".",
"R_OK",
")",
":",
"# The path exists and is readable",
"return",
"True",
"# The p... | Check if a given path is readable by the current user.
:param path: The path to check
:returns: True or False | [
"Check",
"if",
"a",
"given",
"path",
"is",
"readable",
"by",
"the",
"current",
"user",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/validate/path.py#L53-L66 | train | Check if a given path is readable by the current user. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/engines/junos_syslog.py | _SyslogServerFactory.parseData | def parseData(self, data, host, port, options):
'''
This function will parse the raw syslog data, dynamically create the
topic according to the topic specified by the user (if specified) and
decide whether to send the syslog data as an event on the master bus,
based on the constr... | python | def parseData(self, data, host, port, options):
'''
This function will parse the raw syslog data, dynamically create the
topic according to the topic specified by the user (if specified) and
decide whether to send the syslog data as an event on the master bus,
based on the constr... | [
"def",
"parseData",
"(",
"self",
",",
"data",
",",
"host",
",",
"port",
",",
"options",
")",
":",
"data",
"=",
"self",
".",
"obj",
".",
"parse",
"(",
"data",
")",
"data",
"[",
"'hostip'",
"]",
"=",
"host",
"log",
".",
"debug",
"(",
"'Junos Syslog -... | This function will parse the raw syslog data, dynamically create the
topic according to the topic specified by the user (if specified) and
decide whether to send the syslog data as an event on the master bus,
based on the constraints given by the user.
:param data: The raw syslog event ... | [
"This",
"function",
"will",
"parse",
"the",
"raw",
"syslog",
"data",
"dynamically",
"create",
"the",
"topic",
"according",
"to",
"the",
"topic",
"specified",
"by",
"the",
"user",
"(",
"if",
"specified",
")",
"and",
"decide",
"whether",
"to",
"send",
"the",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/junos_syslog.py#L289-L350 | train | This function will parse the raw syslog data and create the topic according to the topic specified by the user. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/engines/junos_syslog.py | _SyslogServerFactory.send_event_to_salt | def send_event_to_salt(self, result):
'''
This function identifies whether the engine is running on the master
or the minion and sends the data to the master event bus accordingly.
:param result: It's a dictionary which has the final data and topic.
'''
if result['send'... | python | def send_event_to_salt(self, result):
'''
This function identifies whether the engine is running on the master
or the minion and sends the data to the master event bus accordingly.
:param result: It's a dictionary which has the final data and topic.
'''
if result['send'... | [
"def",
"send_event_to_salt",
"(",
"self",
",",
"result",
")",
":",
"if",
"result",
"[",
"'send'",
"]",
":",
"data",
"=",
"result",
"[",
"'data'",
"]",
"topic",
"=",
"result",
"[",
"'topic'",
"]",
"# If the engine is run on master, get the event bus and send the",
... | This function identifies whether the engine is running on the master
or the minion and sends the data to the master event bus accordingly.
:param result: It's a dictionary which has the final data and topic. | [
"This",
"function",
"identifies",
"whether",
"the",
"engine",
"is",
"running",
"on",
"the",
"master",
"or",
"the",
"minion",
"and",
"sends",
"the",
"data",
"to",
"the",
"master",
"event",
"bus",
"accordingly",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/junos_syslog.py#L352-L372 | train | Send the data to the master event bus according to the result. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/sdb.py | sdb_get | def sdb_get(uri, opts, utils=None):
'''
Get a value from a db, using a uri in the form of ``sdb://<profile>/<key>``. If
the uri provided does not start with ``sdb://``, then it will be returned as-is.
'''
if not isinstance(uri, string_types) or not uri.startswith('sdb://'):
return uri
i... | python | def sdb_get(uri, opts, utils=None):
'''
Get a value from a db, using a uri in the form of ``sdb://<profile>/<key>``. If
the uri provided does not start with ``sdb://``, then it will be returned as-is.
'''
if not isinstance(uri, string_types) or not uri.startswith('sdb://'):
return uri
i... | [
"def",
"sdb_get",
"(",
"uri",
",",
"opts",
",",
"utils",
"=",
"None",
")",
":",
"if",
"not",
"isinstance",
"(",
"uri",
",",
"string_types",
")",
"or",
"not",
"uri",
".",
"startswith",
"(",
"'sdb://'",
")",
":",
"return",
"uri",
"if",
"utils",
"is",
... | Get a value from a db, using a uri in the form of ``sdb://<profile>/<key>``. If
the uri provided does not start with ``sdb://``, then it will be returned as-is. | [
"Get",
"a",
"value",
"from",
"a",
"db",
"using",
"a",
"uri",
"in",
"the",
"form",
"of",
"sdb",
":",
"//",
"<profile",
">",
"/",
"<key",
">",
".",
"If",
"the",
"uri",
"provided",
"does",
"not",
"start",
"with",
"sdb",
":",
"//",
"then",
"it",
"wil... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/sdb.py#L19-L46 | train | Get a value from a db using a uri in the form of sdb://<profile>/<key >. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/sdb.py | sdb_get_or_set_hash | def sdb_get_or_set_hash(uri,
opts,
length=8,
chars='abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)',
utils=None):
'''
Check if value exists in sdb. If it does, return, otherwise generate a
random string and ... | python | def sdb_get_or_set_hash(uri,
opts,
length=8,
chars='abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)',
utils=None):
'''
Check if value exists in sdb. If it does, return, otherwise generate a
random string and ... | [
"def",
"sdb_get_or_set_hash",
"(",
"uri",
",",
"opts",
",",
"length",
"=",
"8",
",",
"chars",
"=",
"'abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)'",
",",
"utils",
"=",
"None",
")",
":",
"if",
"not",
"isinstance",
"(",
"uri",
",",
"string_types",
")",
"or... | Check if value exists in sdb. If it does, return, otherwise generate a
random string and store it. This can be used for storing secrets in a
centralized place. | [
"Check",
"if",
"value",
"exists",
"in",
"sdb",
".",
"If",
"it",
"does",
"return",
"otherwise",
"generate",
"a",
"random",
"string",
"and",
"store",
"it",
".",
"This",
"can",
"be",
"used",
"for",
"storing",
"secrets",
"in",
"a",
"centralized",
"place",
".... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/sdb.py#L111-L133 | train | Get or set the hash of the given uri. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/grafana4.py | get_users | def get_users(profile='grafana'):
'''
List all users.
profile
Configuration profile used to connect to the Grafana instance.
Default is 'grafana'.
CLI Example:
.. code-block:: bash
salt '*' grafana4.get_users
'''
if isinstance(profile, string_types):
profi... | python | def get_users(profile='grafana'):
'''
List all users.
profile
Configuration profile used to connect to the Grafana instance.
Default is 'grafana'.
CLI Example:
.. code-block:: bash
salt '*' grafana4.get_users
'''
if isinstance(profile, string_types):
profi... | [
"def",
"get_users",
"(",
"profile",
"=",
"'grafana'",
")",
":",
"if",
"isinstance",
"(",
"profile",
",",
"string_types",
")",
":",
"profile",
"=",
"__salt__",
"[",
"'config.option'",
"]",
"(",
"profile",
")",
"response",
"=",
"requests",
".",
"get",
"(",
... | List all users.
profile
Configuration profile used to connect to the Grafana instance.
Default is 'grafana'.
CLI Example:
.. code-block:: bash
salt '*' grafana4.get_users | [
"List",
"all",
"users",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/grafana4.py#L65-L89 | train | Get all users. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/grafana4.py | get_user | def get_user(login, profile='grafana'):
'''
Show a single user.
login
Login of the user.
profile
Configuration profile used to connect to the Grafana instance.
Default is 'grafana'.
CLI Example:
.. code-block:: bash
salt '*' grafana4.get_user <login>
'''
... | python | def get_user(login, profile='grafana'):
'''
Show a single user.
login
Login of the user.
profile
Configuration profile used to connect to the Grafana instance.
Default is 'grafana'.
CLI Example:
.. code-block:: bash
salt '*' grafana4.get_user <login>
'''
... | [
"def",
"get_user",
"(",
"login",
",",
"profile",
"=",
"'grafana'",
")",
":",
"data",
"=",
"get_users",
"(",
"profile",
")",
"for",
"user",
"in",
"data",
":",
"if",
"user",
"[",
"'login'",
"]",
"==",
"login",
":",
"return",
"user",
"return",
"None"
] | Show a single user.
login
Login of the user.
profile
Configuration profile used to connect to the Grafana instance.
Default is 'grafana'.
CLI Example:
.. code-block:: bash
salt '*' grafana4.get_user <login> | [
"Show",
"a",
"single",
"user",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/grafana4.py#L92-L113 | train | Get a single user. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/grafana4.py | update_user | def update_user(userid, profile='grafana', orgid=None, **kwargs):
'''
Update an existing user.
userid
Id of the user.
login
Optional - Login of the user.
email
Optional - Email of the user.
name
Optional - Full name of the user.
orgid
Optional - D... | python | def update_user(userid, profile='grafana', orgid=None, **kwargs):
'''
Update an existing user.
userid
Id of the user.
login
Optional - Login of the user.
email
Optional - Email of the user.
name
Optional - Full name of the user.
orgid
Optional - D... | [
"def",
"update_user",
"(",
"userid",
",",
"profile",
"=",
"'grafana'",
",",
"orgid",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"isinstance",
"(",
"profile",
",",
"string_types",
")",
":",
"profile",
"=",
"__salt__",
"[",
"'config.option'",
"]... | Update an existing user.
userid
Id of the user.
login
Optional - Login of the user.
email
Optional - Email of the user.
name
Optional - Full name of the user.
orgid
Optional - Default Organization of the user.
profile
Configuration profile us... | [
"Update",
"an",
"existing",
"user",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/grafana4.py#L186-L235 | train | Update an existing user. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/grafana4.py | switch_org | def switch_org(orgname, profile='grafana'):
'''
Switch the current organization.
name
Name of the organization to switch to.
profile
Configuration profile used to connect to the Grafana instance.
Default is 'grafana'.
CLI Example:
.. code-block:: bash
salt '*... | python | def switch_org(orgname, profile='grafana'):
'''
Switch the current organization.
name
Name of the organization to switch to.
profile
Configuration profile used to connect to the Grafana instance.
Default is 'grafana'.
CLI Example:
.. code-block:: bash
salt '*... | [
"def",
"switch_org",
"(",
"orgname",
",",
"profile",
"=",
"'grafana'",
")",
":",
"if",
"isinstance",
"(",
"profile",
",",
"string_types",
")",
":",
"profile",
"=",
"__salt__",
"[",
"'config.option'",
"]",
"(",
"profile",
")",
"org",
"=",
"get_org",
"(",
... | Switch the current organization.
name
Name of the organization to switch to.
profile
Configuration profile used to connect to the Grafana instance.
Default is 'grafana'.
CLI Example:
.. code-block:: bash
salt '*' grafana4.switch_org <name> | [
"Switch",
"the",
"current",
"organization",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/grafana4.py#L459-L487 | train | Switch the current organization. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/grafana4.py | update_org_user | def update_org_user(userid, orgname=None, profile='grafana', **kwargs):
'''
Update user role in the organization.
userid
Id of the user.
loginOrEmail
Login or email of the user.
role
Role of the user for this organization. Should be one of:
- Admin
... | python | def update_org_user(userid, orgname=None, profile='grafana', **kwargs):
'''
Update user role in the organization.
userid
Id of the user.
loginOrEmail
Login or email of the user.
role
Role of the user for this organization. Should be one of:
- Admin
... | [
"def",
"update_org_user",
"(",
"userid",
",",
"orgname",
"=",
"None",
",",
"profile",
"=",
"'grafana'",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"isinstance",
"(",
"profile",
",",
"string_types",
")",
":",
"profile",
"=",
"__salt__",
"[",
"'config.option'"... | Update user role in the organization.
userid
Id of the user.
loginOrEmail
Login or email of the user.
role
Role of the user for this organization. Should be one of:
- Admin
- Editor
- Read Only Editor
- Viewer
orgname
Na... | [
"Update",
"user",
"role",
"in",
"the",
"organization",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/grafana4.py#L565-L608 | train | Update user role in the organization. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/grafana4.py | get_datasource | def get_datasource(name, orgname=None, profile='grafana'):
'''
Show a single datasource in an organisation.
name
Name of the datasource.
orgname
Name of the organization.
profile
Configuration profile used to connect to the Grafana instance.
Default is 'grafana'.
... | python | def get_datasource(name, orgname=None, profile='grafana'):
'''
Show a single datasource in an organisation.
name
Name of the datasource.
orgname
Name of the organization.
profile
Configuration profile used to connect to the Grafana instance.
Default is 'grafana'.
... | [
"def",
"get_datasource",
"(",
"name",
",",
"orgname",
"=",
"None",
",",
"profile",
"=",
"'grafana'",
")",
":",
"data",
"=",
"get_datasources",
"(",
"orgname",
"=",
"orgname",
",",
"profile",
"=",
"profile",
")",
"for",
"datasource",
"in",
"data",
":",
"i... | Show a single datasource in an organisation.
name
Name of the datasource.
orgname
Name of the organization.
profile
Configuration profile used to connect to the Grafana instance.
Default is 'grafana'.
CLI Example:
.. code-block:: bash
salt '*' grafana4.g... | [
"Show",
"a",
"single",
"datasource",
"in",
"an",
"organisation",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/grafana4.py#L930-L954 | train | Get a single datasource in an organisation. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/grafana4.py | delete_datasource | def delete_datasource(datasourceid, orgname=None, profile='grafana'):
'''
Delete a datasource.
datasourceid
Id of the datasource.
profile
Configuration profile used to connect to the Grafana instance.
Default is 'grafana'.
CLI Example:
.. code-block:: bash
sa... | python | def delete_datasource(datasourceid, orgname=None, profile='grafana'):
'''
Delete a datasource.
datasourceid
Id of the datasource.
profile
Configuration profile used to connect to the Grafana instance.
Default is 'grafana'.
CLI Example:
.. code-block:: bash
sa... | [
"def",
"delete_datasource",
"(",
"datasourceid",
",",
"orgname",
"=",
"None",
",",
"profile",
"=",
"'grafana'",
")",
":",
"if",
"isinstance",
"(",
"profile",
",",
"string_types",
")",
":",
"profile",
"=",
"__salt__",
"[",
"'config.option'",
"]",
"(",
"profil... | Delete a datasource.
datasourceid
Id of the datasource.
profile
Configuration profile used to connect to the Grafana instance.
Default is 'grafana'.
CLI Example:
.. code-block:: bash
salt '*' grafana4.delete_datasource <datasource_id> | [
"Delete",
"a",
"datasource",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/grafana4.py#L1113-L1140 | train | Delete a datasource. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/libvirt.py | ext_pillar | def ext_pillar(minion_id,
pillar, # pylint: disable=W0613
command): # pylint: disable=W0613
'''
Read in the generated libvirt keys
'''
key_dir = os.path.join(
__opts__['pki_dir'],
'libvirt',
minion_id)
cacert = os.path.join(__opts__... | python | def ext_pillar(minion_id,
pillar, # pylint: disable=W0613
command): # pylint: disable=W0613
'''
Read in the generated libvirt keys
'''
key_dir = os.path.join(
__opts__['pki_dir'],
'libvirt',
minion_id)
cacert = os.path.join(__opts__... | [
"def",
"ext_pillar",
"(",
"minion_id",
",",
"pillar",
",",
"# pylint: disable=W0613",
"command",
")",
":",
"# pylint: disable=W0613",
"key_dir",
"=",
"os",
".",
"path",
".",
"join",
"(",
"__opts__",
"[",
"'pki_dir'",
"]",
",",
"'libvirt'",
",",
"minion_id",
")... | Read in the generated libvirt keys | [
"Read",
"in",
"the",
"generated",
"libvirt",
"keys"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/libvirt.py#L27-L61 | train | Read in the libvirt keys and return the new ones | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/libvirt.py | gen_hyper_keys | def gen_hyper_keys(minion_id,
country='US',
state='Utah',
locality='Salt Lake City',
organization='Salted',
expiration_days='365'):
'''
Generate the keys to be used by libvirt hypervisors, this routine gens
the ke... | python | def gen_hyper_keys(minion_id,
country='US',
state='Utah',
locality='Salt Lake City',
organization='Salted',
expiration_days='365'):
'''
Generate the keys to be used by libvirt hypervisors, this routine gens
the ke... | [
"def",
"gen_hyper_keys",
"(",
"minion_id",
",",
"country",
"=",
"'US'",
",",
"state",
"=",
"'Utah'",
",",
"locality",
"=",
"'Salt Lake City'",
",",
"organization",
"=",
"'Salted'",
",",
"expiration_days",
"=",
"'365'",
")",
":",
"key_dir",
"=",
"os",
".",
... | Generate the keys to be used by libvirt hypervisors, this routine gens
the keys and applies them to the pillar for the hypervisor minions | [
"Generate",
"the",
"keys",
"to",
"be",
"used",
"by",
"libvirt",
"hypervisors",
"this",
"routine",
"gens",
"the",
"keys",
"and",
"applies",
"them",
"to",
"the",
"pillar",
"for",
"the",
"hypervisor",
"minions"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/libvirt.py#L64-L146 | train | Generate the keys to be used by libvirt hypervisors | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/boto_ec2.py | key_present | def key_present(name, save_private=None, upload_public=None, region=None,
key=None, keyid=None, profile=None):
'''
Ensure key pair is present.
'''
ret = {'name': name,
'result': True,
'comment': '',
'changes': {}
}
exists = __salt__['boto_e... | python | def key_present(name, save_private=None, upload_public=None, region=None,
key=None, keyid=None, profile=None):
'''
Ensure key pair is present.
'''
ret = {'name': name,
'result': True,
'comment': '',
'changes': {}
}
exists = __salt__['boto_e... | [
"def",
"key_present",
"(",
"name",
",",
"save_private",
"=",
"None",
",",
"upload_public",
"=",
"None",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"ret",
"=",
"{",
"'name'",
... | Ensure key pair is present. | [
"Ensure",
"key",
"pair",
"is",
"present",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_ec2.py#L79-L133 | train | Ensure a key pair is present. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/boto_ec2.py | key_absent | def key_absent(name, region=None, key=None, keyid=None, profile=None):
'''
Deletes a key pair
'''
ret = {'name': name,
'result': True,
'comment': '',
'changes': {}
}
exists = __salt__['boto_ec2.get_key'](name, region, key, keyid, profile)
if exists:
... | python | def key_absent(name, region=None, key=None, keyid=None, profile=None):
'''
Deletes a key pair
'''
ret = {'name': name,
'result': True,
'comment': '',
'changes': {}
}
exists = __salt__['boto_ec2.get_key'](name, region, key, keyid, profile)
if exists:
... | [
"def",
"key_absent",
"(",
"name",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'result'",
":",
"True",
",",
"'comment'",
":",
... | Deletes a key pair | [
"Deletes",
"a",
"key",
"pair"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_ec2.py#L136-L165 | train | Ensures that the named key pair is absent. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/boto_ec2.py | eni_present | def eni_present(
name,
subnet_id=None,
subnet_name=None,
private_ip_address=None,
description=None,
groups=None,
source_dest_check=True,
allocate_eip=None,
arecords=None,
region=None,
key=None,
keyid=None,
profile=No... | python | def eni_present(
name,
subnet_id=None,
subnet_name=None,
private_ip_address=None,
description=None,
groups=None,
source_dest_check=True,
allocate_eip=None,
arecords=None,
region=None,
key=None,
keyid=None,
profile=No... | [
"def",
"eni_present",
"(",
"name",
",",
"subnet_id",
"=",
"None",
",",
"subnet_name",
"=",
"None",
",",
"private_ip_address",
"=",
"None",
",",
"description",
"=",
"None",
",",
"groups",
"=",
"None",
",",
"source_dest_check",
"=",
"True",
",",
"allocate_eip"... | Ensure the EC2 ENI exists.
.. versionadded:: 2016.3.0
name
Name tag associated with the ENI.
subnet_id
The VPC subnet ID the ENI will exist within.
subnet_name
The VPC subnet name the ENI will exist within.
private_ip_address
The private ip address to use for thi... | [
"Ensure",
"the",
"EC2",
"ENI",
"exists",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_ec2.py#L168-L393 | train | Ensure the ENI is present within the VPC. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/boto_ec2.py | eni_absent | def eni_absent(
name,
release_eip=False,
region=None,
key=None,
keyid=None,
profile=None):
'''
Ensure the EC2 ENI is absent.
.. versionadded:: 2016.3.0
name
Name tag associated with the ENI.
release_eip
True/False - release any EIP a... | python | def eni_absent(
name,
release_eip=False,
region=None,
key=None,
keyid=None,
profile=None):
'''
Ensure the EC2 ENI is absent.
.. versionadded:: 2016.3.0
name
Name tag associated with the ENI.
release_eip
True/False - release any EIP a... | [
"def",
"eni_absent",
"(",
"name",
",",
"release_eip",
"=",
"False",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'result'",
":",... | Ensure the EC2 ENI is absent.
.. versionadded:: 2016.3.0
name
Name tag associated with the ENI.
release_eip
True/False - release any EIP associated with the ENI
region
Region to connect to.
key
Secret key to be used.
keyid
Access key to be used.
... | [
"Ensure",
"the",
"EC2",
"ENI",
"is",
"absent",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_ec2.py#L456-L547 | train | Ensure the ENI is absent. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/boto_ec2.py | snapshot_created | def snapshot_created(name, ami_name, instance_name, wait_until_available=True, wait_timeout_seconds=300, **kwargs):
'''
Create a snapshot from the given instance
.. versionadded:: 2016.3.0
'''
ret = {'name': name,
'result': True,
'comment': '',
'changes': {}
... | python | def snapshot_created(name, ami_name, instance_name, wait_until_available=True, wait_timeout_seconds=300, **kwargs):
'''
Create a snapshot from the given instance
.. versionadded:: 2016.3.0
'''
ret = {'name': name,
'result': True,
'comment': '',
'changes': {}
... | [
"def",
"snapshot_created",
"(",
"name",
",",
"ami_name",
",",
"instance_name",
",",
"wait_until_available",
"=",
"True",
",",
"wait_timeout_seconds",
"=",
"300",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'result'",
":... | Create a snapshot from the given instance
.. versionadded:: 2016.3.0 | [
"Create",
"a",
"snapshot",
"from",
"the",
"given",
"instance"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_ec2.py#L550-L586 | train | Create a snapshot from the given instance | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/boto_ec2.py | instance_present | def instance_present(name, instance_name=None, instance_id=None, image_id=None,
image_name=None, tags=None, key_name=None,
security_groups=None, user_data=None, instance_type=None,
placement=None, kernel_id=None, ramdisk_id=None,
vpc_id... | python | def instance_present(name, instance_name=None, instance_id=None, image_id=None,
image_name=None, tags=None, key_name=None,
security_groups=None, user_data=None, instance_type=None,
placement=None, kernel_id=None, ramdisk_id=None,
vpc_id... | [
"def",
"instance_present",
"(",
"name",
",",
"instance_name",
"=",
"None",
",",
"instance_id",
"=",
"None",
",",
"image_id",
"=",
"None",
",",
"image_name",
"=",
"None",
",",
"tags",
"=",
"None",
",",
"key_name",
"=",
"None",
",",
"security_groups",
"=",
... | Ensure an EC2 instance is running with the given attributes and state.
name
(string) - The name of the state definition. Recommended that this
match the instance_name attribute (generally the FQDN of the instance).
instance_name
(string) - The name of the instance, generally its FQDN. ... | [
"Ensure",
"an",
"EC2",
"instance",
"is",
"running",
"with",
"the",
"given",
"attributes",
"and",
"state",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_ec2.py#L589-L988 | train | Ensures an EC2 instance is present in the given state. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/boto_ec2.py | instance_absent | def instance_absent(name, instance_name=None, instance_id=None,
release_eip=False, region=None, key=None, keyid=None,
profile=None, filters=None):
'''
Ensure an EC2 instance does not exist (is stopped and removed).
.. versionchanged:: 2016.11.0
name
(str... | python | def instance_absent(name, instance_name=None, instance_id=None,
release_eip=False, region=None, key=None, keyid=None,
profile=None, filters=None):
'''
Ensure an EC2 instance does not exist (is stopped and removed).
.. versionchanged:: 2016.11.0
name
(str... | [
"def",
"instance_absent",
"(",
"name",
",",
"instance_name",
"=",
"None",
",",
"instance_id",
"=",
"None",
",",
"release_eip",
"=",
"False",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
",... | Ensure an EC2 instance does not exist (is stopped and removed).
.. versionchanged:: 2016.11.0
name
(string) - The name of the state definition.
instance_name
(string) - The name of the instance.
instance_id
(string) - The ID of the instance.
release_eip
(bool) - R... | [
"Ensure",
"an",
"EC2",
"instance",
"does",
"not",
"exist",
"(",
"is",
"stopped",
"and",
"removed",
")",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_ec2.py#L991-L1115 | train | Ensure an EC2 instance is absent. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/boto_ec2.py | volume_absent | def volume_absent(name, volume_name=None, volume_id=None, instance_name=None,
instance_id=None, device=None, region=None, key=None, keyid=None, profile=None):
'''
Ensure the EC2 volume is detached and absent.
.. versionadded:: 2016.11.0
name
State definition name.
volume... | python | def volume_absent(name, volume_name=None, volume_id=None, instance_name=None,
instance_id=None, device=None, region=None, key=None, keyid=None, profile=None):
'''
Ensure the EC2 volume is detached and absent.
.. versionadded:: 2016.11.0
name
State definition name.
volume... | [
"def",
"volume_absent",
"(",
"name",
",",
"volume_name",
"=",
"None",
",",
"volume_id",
"=",
"None",
",",
"instance_name",
"=",
"None",
",",
"instance_id",
"=",
"None",
",",
"device",
"=",
"None",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",... | Ensure the EC2 volume is detached and absent.
.. versionadded:: 2016.11.0
name
State definition name.
volume_name
Name tag associated with the volume. For safety, if this matches more than
one volume, the state will refuse to apply.
volume_id
Resource ID of the volum... | [
"Ensure",
"the",
"EC2",
"volume",
"is",
"detached",
"and",
"absent",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_ec2.py#L1118-L1218 | train | Ensure the EC2 volume is detached and absent. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/boto_ec2.py | volumes_tagged | def volumes_tagged(name, tag_maps, authoritative=False, region=None, key=None,
keyid=None, profile=None):
'''
Ensure EC2 volume(s) matching the given filters have the defined tags.
.. versionadded:: 2016.11.0
name
State definition name.
tag_maps
List of dicts of... | python | def volumes_tagged(name, tag_maps, authoritative=False, region=None, key=None,
keyid=None, profile=None):
'''
Ensure EC2 volume(s) matching the given filters have the defined tags.
.. versionadded:: 2016.11.0
name
State definition name.
tag_maps
List of dicts of... | [
"def",
"volumes_tagged",
"(",
"name",
",",
"tag_maps",
",",
"authoritative",
"=",
"False",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
... | Ensure EC2 volume(s) matching the given filters have the defined tags.
.. versionadded:: 2016.11.0
name
State definition name.
tag_maps
List of dicts of filters and tags, where 'filters' is a dict suitable for passing
to the 'filters' argument of boto_ec2.get_all_volumes(), and 't... | [
"Ensure",
"EC2",
"volume",
"(",
"s",
")",
"matching",
"the",
"given",
"filters",
"have",
"the",
"defined",
"tags",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_ec2.py#L1221-L1309 | train | Return a new state definition with the EC2 volumes tagged by the given filters. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/boto_ec2.py | volume_present | def volume_present(name, volume_name=None, volume_id=None, instance_name=None,
instance_id=None, device=None, size=None, snapshot_id=None,
volume_type=None, iops=None, encrypted=False, kms_key_id=None,
region=None, key=None, keyid=None, profile=None):
'''
... | python | def volume_present(name, volume_name=None, volume_id=None, instance_name=None,
instance_id=None, device=None, size=None, snapshot_id=None,
volume_type=None, iops=None, encrypted=False, kms_key_id=None,
region=None, key=None, keyid=None, profile=None):
'''
... | [
"def",
"volume_present",
"(",
"name",
",",
"volume_name",
"=",
"None",
",",
"volume_id",
"=",
"None",
",",
"instance_name",
"=",
"None",
",",
"instance_id",
"=",
"None",
",",
"device",
"=",
"None",
",",
"size",
"=",
"None",
",",
"snapshot_id",
"=",
"None... | Ensure the EC2 volume is present and attached.
..
name
State definition name.
volume_name
The Name tag value for the volume. If no volume with that matching name tag is found,
a new volume will be created. If multiple volumes are matched, the state will fail.
volume_id
... | [
"Ensure",
"the",
"EC2",
"volume",
"is",
"present",
"and",
"attached",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_ec2.py#L1312-L1509 | train | Ensure the EC2 volume is present and attached. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/boto_ec2.py | private_ips_present | def private_ips_present(name, network_interface_name=None, network_interface_id=None,
private_ip_addresses=None, allow_reassignment=False, region=None, key=None,
keyid=None, profile=None):
'''
Ensure an ENI has secondary private ip addresses associated with it
... | python | def private_ips_present(name, network_interface_name=None, network_interface_id=None,
private_ip_addresses=None, allow_reassignment=False, region=None, key=None,
keyid=None, profile=None):
'''
Ensure an ENI has secondary private ip addresses associated with it
... | [
"def",
"private_ips_present",
"(",
"name",
",",
"network_interface_name",
"=",
"None",
",",
"network_interface_id",
"=",
"None",
",",
"private_ip_addresses",
"=",
"None",
",",
"allow_reassignment",
"=",
"False",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None... | Ensure an ENI has secondary private ip addresses associated with it
name
(String) - State definition name
network_interface_id
(String) - The EC2 network interface id, example eni-123456789
private_ip_addresses
(List or String) - The secondary private ip address(es) that should be p... | [
"Ensure",
"an",
"ENI",
"has",
"secondary",
"private",
"ip",
"addresses",
"associated",
"with",
"it"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_ec2.py#L1512-L1634 | train | Ensure a secondary private ip address is present on the ENI. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/boto_ec2.py | private_ips_absent | def private_ips_absent(name, network_interface_name=None, network_interface_id=None,
private_ip_addresses=None, region=None, key=None, keyid=None, profile=None):
'''
Ensure an ENI does not have secondary private ip addresses associated with it
name
(String) - State definitio... | python | def private_ips_absent(name, network_interface_name=None, network_interface_id=None,
private_ip_addresses=None, region=None, key=None, keyid=None, profile=None):
'''
Ensure an ENI does not have secondary private ip addresses associated with it
name
(String) - State definitio... | [
"def",
"private_ips_absent",
"(",
"name",
",",
"network_interface_name",
"=",
"None",
",",
"network_interface_id",
"=",
"None",
",",
"private_ip_addresses",
"=",
"None",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"pr... | Ensure an ENI does not have secondary private ip addresses associated with it
name
(String) - State definition name
network_interface_id
(String) - The EC2 network interface id, example eni-123456789
private_ip_addresses
(List or String) - The secondary private ip address(es) that s... | [
"Ensure",
"an",
"ENI",
"does",
"not",
"have",
"secondary",
"private",
"ip",
"addresses",
"associated",
"with",
"it"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_ec2.py#L1637-L1767 | train | Ensure that the secondary private ips are absent on the ENI. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/docker/translate/network.py | _post_processing | def _post_processing(kwargs, skip_translate, invalid): # pylint: disable=unused-argument
'''
Additional network-specific post-translation processing
'''
# If any defaults were not expicitly passed, add them
for item in DEFAULTS:
if item not in kwargs:
kwargs[item] = DEFAULTS[ite... | python | def _post_processing(kwargs, skip_translate, invalid): # pylint: disable=unused-argument
'''
Additional network-specific post-translation processing
'''
# If any defaults were not expicitly passed, add them
for item in DEFAULTS:
if item not in kwargs:
kwargs[item] = DEFAULTS[ite... | [
"def",
"_post_processing",
"(",
"kwargs",
",",
"skip_translate",
",",
"invalid",
")",
":",
"# pylint: disable=unused-argument",
"# If any defaults were not expicitly passed, add them",
"for",
"item",
"in",
"DEFAULTS",
":",
"if",
"item",
"not",
"in",
"kwargs",
":",
"kwar... | Additional network-specific post-translation processing | [
"Additional",
"network",
"-",
"specific",
"post",
"-",
"translation",
"processing"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/docker/translate/network.py#L33-L40 | train | Add default values to the kwargs if they are not already set. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/client/__init__.py | get_local_client | def get_local_client(
c_path=os.path.join(syspaths.CONFIG_DIR, 'master'),
mopts=None,
skip_perm_errors=False,
io_loop=None,
auto_reconnect=False):
'''
.. versionadded:: 2014.7.0
Read in the config and return the correct LocalClient object based on
the configured ... | python | def get_local_client(
c_path=os.path.join(syspaths.CONFIG_DIR, 'master'),
mopts=None,
skip_perm_errors=False,
io_loop=None,
auto_reconnect=False):
'''
.. versionadded:: 2014.7.0
Read in the config and return the correct LocalClient object based on
the configured ... | [
"def",
"get_local_client",
"(",
"c_path",
"=",
"os",
".",
"path",
".",
"join",
"(",
"syspaths",
".",
"CONFIG_DIR",
",",
"'master'",
")",
",",
"mopts",
"=",
"None",
",",
"skip_perm_errors",
"=",
"False",
",",
"io_loop",
"=",
"None",
",",
"auto_reconnect",
... | .. versionadded:: 2014.7.0
Read in the config and return the correct LocalClient object based on
the configured transport
:param IOLoop io_loop: io_loop used for events.
Pass in an io_loop if you want asynchronous
operation for obtaining events. Eg use... | [
"..",
"versionadded",
"::",
"2014",
".",
"7",
".",
"0"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/__init__.py#L76-L106 | train | Get a LocalClient object based on the config 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/client/__init__.py | LocalClient.__read_master_key | def __read_master_key(self):
'''
Read in the rotating master authentication key
'''
key_user = self.salt_user
if key_user == 'root':
if self.opts.get('user', 'root') != 'root':
key_user = self.opts.get('user', 'root')
if key_user.startswith('su... | python | def __read_master_key(self):
'''
Read in the rotating master authentication key
'''
key_user = self.salt_user
if key_user == 'root':
if self.opts.get('user', 'root') != 'root':
key_user = self.opts.get('user', 'root')
if key_user.startswith('su... | [
"def",
"__read_master_key",
"(",
"self",
")",
":",
"key_user",
"=",
"self",
".",
"salt_user",
"if",
"key_user",
"==",
"'root'",
":",
"if",
"self",
".",
"opts",
".",
"get",
"(",
"'user'",
",",
"'root'",
")",
"!=",
"'root'",
":",
"key_user",
"=",
"self",... | Read in the rotating master authentication key | [
"Read",
"in",
"the",
"rotating",
"master",
"authentication",
"key"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/__init__.py#L175-L200 | train | Read in the rotating master authentication key | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/client/__init__.py | LocalClient._convert_range_to_list | def _convert_range_to_list(self, tgt):
'''
convert a seco.range range into a list target
'''
range_ = seco.range.Range(self.opts['range_server'])
try:
return range_.expand(tgt)
except seco.range.RangeException as err:
print('Range server exception:... | python | def _convert_range_to_list(self, tgt):
'''
convert a seco.range range into a list target
'''
range_ = seco.range.Range(self.opts['range_server'])
try:
return range_.expand(tgt)
except seco.range.RangeException as err:
print('Range server exception:... | [
"def",
"_convert_range_to_list",
"(",
"self",
",",
"tgt",
")",
":",
"range_",
"=",
"seco",
".",
"range",
".",
"Range",
"(",
"self",
".",
"opts",
"[",
"'range_server'",
"]",
")",
"try",
":",
"return",
"range_",
".",
"expand",
"(",
"tgt",
")",
"except",
... | convert a seco.range range into a list target | [
"convert",
"a",
"seco",
".",
"range",
"range",
"into",
"a",
"list",
"target"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/__init__.py#L202-L211 | train | convert a seco. range into a list target
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/client/__init__.py | LocalClient._get_timeout | def _get_timeout(self, timeout):
'''
Return the timeout to use
'''
if timeout is None:
return self.opts['timeout']
if isinstance(timeout, int):
return timeout
if isinstance(timeout, six.string_types):
try:
return int(tim... | python | def _get_timeout(self, timeout):
'''
Return the timeout to use
'''
if timeout is None:
return self.opts['timeout']
if isinstance(timeout, int):
return timeout
if isinstance(timeout, six.string_types):
try:
return int(tim... | [
"def",
"_get_timeout",
"(",
"self",
",",
"timeout",
")",
":",
"if",
"timeout",
"is",
"None",
":",
"return",
"self",
".",
"opts",
"[",
"'timeout'",
"]",
"if",
"isinstance",
"(",
"timeout",
",",
"int",
")",
":",
"return",
"timeout",
"if",
"isinstance",
"... | Return the timeout to use | [
"Return",
"the",
"timeout",
"to",
"use"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/__init__.py#L213-L227 | train | Return the timeout to use
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/client/__init__.py | LocalClient.gather_job_info | def gather_job_info(self, jid, tgt, tgt_type, listen=True, **kwargs):
'''
Return the information about a given job
'''
log.debug('Checking whether jid %s is still running', jid)
timeout = int(kwargs.get('gather_job_timeout', self.opts['gather_job_timeout']))
pub_data = s... | python | def gather_job_info(self, jid, tgt, tgt_type, listen=True, **kwargs):
'''
Return the information about a given job
'''
log.debug('Checking whether jid %s is still running', jid)
timeout = int(kwargs.get('gather_job_timeout', self.opts['gather_job_timeout']))
pub_data = s... | [
"def",
"gather_job_info",
"(",
"self",
",",
"jid",
",",
"tgt",
",",
"tgt_type",
",",
"listen",
"=",
"True",
",",
"*",
"*",
"kwargs",
")",
":",
"log",
".",
"debug",
"(",
"'Checking whether jid %s is still running'",
",",
"jid",
")",
"timeout",
"=",
"int",
... | Return the information about a given job | [
"Return",
"the",
"information",
"about",
"a",
"given",
"job"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/__init__.py#L229-L248 | train | Return the information about a given job | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/client/__init__.py | LocalClient._check_pub_data | def _check_pub_data(self, pub_data, listen=True):
'''
Common checks on the pub_data data structure returned from running pub
'''
if pub_data == '':
# Failed to authenticate, this could be a bunch of things
raise EauthAuthenticationError(
'Failed to... | python | def _check_pub_data(self, pub_data, listen=True):
'''
Common checks on the pub_data data structure returned from running pub
'''
if pub_data == '':
# Failed to authenticate, this could be a bunch of things
raise EauthAuthenticationError(
'Failed to... | [
"def",
"_check_pub_data",
"(",
"self",
",",
"pub_data",
",",
"listen",
"=",
"True",
")",
":",
"if",
"pub_data",
"==",
"''",
":",
"# Failed to authenticate, this could be a bunch of things",
"raise",
"EauthAuthenticationError",
"(",
"'Failed to authenticate! This is most lik... | Common checks on the pub_data data structure returned from running pub | [
"Common",
"checks",
"on",
"the",
"pub_data",
"data",
"structure",
"returned",
"from",
"running",
"pub"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/__init__.py#L250-L294 | train | Common checks on the pub_data structure returned from running pub_data and sends the pub_data to the master and returns the pub_data structure. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/client/__init__.py | LocalClient.run_job | def run_job(
self,
tgt,
fun,
arg=(),
tgt_type='glob',
ret='',
timeout=None,
jid='',
kwarg=None,
listen=False,
**kwargs):
'''
Asynchronously send a command to connected mini... | python | def run_job(
self,
tgt,
fun,
arg=(),
tgt_type='glob',
ret='',
timeout=None,
jid='',
kwarg=None,
listen=False,
**kwargs):
'''
Asynchronously send a command to connected mini... | [
"def",
"run_job",
"(",
"self",
",",
"tgt",
",",
"fun",
",",
"arg",
"=",
"(",
")",
",",
"tgt_type",
"=",
"'glob'",
",",
"ret",
"=",
"''",
",",
"timeout",
"=",
"None",
",",
"jid",
"=",
"''",
",",
"kwarg",
"=",
"None",
",",
"listen",
"=",
"False",... | Asynchronously send a command to connected minions
Prep the job directory and publish a command to any targeted minions.
:return: A dictionary of (validated) ``pub_data`` or an empty
dictionary on failure. The ``pub_data`` contains the job ID and a
list of all minions that are ... | [
"Asynchronously",
"send",
"a",
"command",
"to",
"connected",
"minions"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/__init__.py#L296-L348 | train | Asynchronously send a command to the master and publish a command to any targeted minions. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/client/__init__.py | LocalClient.run_job_async | def run_job_async(
self,
tgt,
fun,
arg=(),
tgt_type='glob',
ret='',
timeout=None,
jid='',
kwarg=None,
listen=True,
io_loop=None,
**kwargs):
'''
Asynchronously s... | python | def run_job_async(
self,
tgt,
fun,
arg=(),
tgt_type='glob',
ret='',
timeout=None,
jid='',
kwarg=None,
listen=True,
io_loop=None,
**kwargs):
'''
Asynchronously s... | [
"def",
"run_job_async",
"(",
"self",
",",
"tgt",
",",
"fun",
",",
"arg",
"=",
"(",
")",
",",
"tgt_type",
"=",
"'glob'",
",",
"ret",
"=",
"''",
",",
"timeout",
"=",
"None",
",",
"jid",
"=",
"''",
",",
"kwarg",
"=",
"None",
",",
"listen",
"=",
"T... | Asynchronously send a command to connected minions
Prep the job directory and publish a command to any targeted minions.
:return: A dictionary of (validated) ``pub_data`` or an empty
dictionary on failure. The ``pub_data`` contains the job ID and a
list of all minions that are ... | [
"Asynchronously",
"send",
"a",
"command",
"to",
"connected",
"minions"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/__init__.py#L355-L409 | train | Asynchronously send a command to any targeted minions and publish a command to any targeted minions and return the 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/client/__init__.py | LocalClient.cmd_async | def cmd_async(
self,
tgt,
fun,
arg=(),
tgt_type='glob',
ret='',
jid='',
kwarg=None,
**kwargs):
'''
Asynchronously send a command to connected minions
The function signature is the same as... | python | def cmd_async(
self,
tgt,
fun,
arg=(),
tgt_type='glob',
ret='',
jid='',
kwarg=None,
**kwargs):
'''
Asynchronously send a command to connected minions
The function signature is the same as... | [
"def",
"cmd_async",
"(",
"self",
",",
"tgt",
",",
"fun",
",",
"arg",
"=",
"(",
")",
",",
"tgt_type",
"=",
"'glob'",
",",
"ret",
"=",
"''",
",",
"jid",
"=",
"''",
",",
"kwarg",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"pub_data",
"=",
"... | Asynchronously send a command to connected minions
The function signature is the same as :py:meth:`cmd` with the
following exceptions.
:returns: A job ID or 0 on failure.
.. code-block:: python
>>> local.cmd_async('*', 'test.sleep', [300])
'2013121921592185771... | [
"Asynchronously",
"send",
"a",
"command",
"to",
"connected",
"minions"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/__init__.py#L411-L446 | train | Asynchronously send a command to connected minions | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/client/__init__.py | LocalClient.cmd_subset | def cmd_subset(
self,
tgt,
fun,
arg=(),
tgt_type='glob',
ret='',
kwarg=None,
sub=3,
cli=False,
progress=False,
full_return=False,
**kwargs):
'''
Execute a comma... | python | def cmd_subset(
self,
tgt,
fun,
arg=(),
tgt_type='glob',
ret='',
kwarg=None,
sub=3,
cli=False,
progress=False,
full_return=False,
**kwargs):
'''
Execute a comma... | [
"def",
"cmd_subset",
"(",
"self",
",",
"tgt",
",",
"fun",
",",
"arg",
"=",
"(",
")",
",",
"tgt_type",
"=",
"'glob'",
",",
"ret",
"=",
"''",
",",
"kwarg",
"=",
"None",
",",
"sub",
"=",
"3",
",",
"cli",
"=",
"False",
",",
"progress",
"=",
"False"... | Execute a command on a random subset of the targeted systems
The function signature is the same as :py:meth:`cmd` with the
following exceptions.
:param sub: The number of systems to execute on
:param cli: When this is set to True, a generator is returned,
otherwise ... | [
"Execute",
"a",
"command",
"on",
"a",
"random",
"subset",
"of",
"the",
"targeted",
"systems"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/__init__.py#L448-L500 | train | Execute a command on a random subset of the targeted systems. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/client/__init__.py | LocalClient.cmd_batch | def cmd_batch(
self,
tgt,
fun,
arg=(),
tgt_type='glob',
ret='',
kwarg=None,
batch='10%',
**kwargs):
'''
Iteratively execute a command on subsets of minions at a time
The function signatur... | python | def cmd_batch(
self,
tgt,
fun,
arg=(),
tgt_type='glob',
ret='',
kwarg=None,
batch='10%',
**kwargs):
'''
Iteratively execute a command on subsets of minions at a time
The function signatur... | [
"def",
"cmd_batch",
"(",
"self",
",",
"tgt",
",",
"fun",
",",
"arg",
"=",
"(",
")",
",",
"tgt_type",
"=",
"'glob'",
",",
"ret",
"=",
"''",
",",
"kwarg",
"=",
"None",
",",
"batch",
"=",
"'10%'",
",",
"*",
"*",
"kwargs",
")",
":",
"# Late import - ... | Iteratively execute a command on subsets of minions at a time
The function signature is the same as :py:meth:`cmd` with the
following exceptions.
:param batch: The batch identifier of systems to execute on
:returns: A generator of minion returns
.. code-block:: python
... | [
"Iteratively",
"execute",
"a",
"command",
"on",
"subsets",
"of",
"minions",
"at",
"a",
"time"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/__init__.py#L502-L572 | train | Execute a command on subsets of minions at a time | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/client/__init__.py | LocalClient.cmd | def cmd(self,
tgt,
fun,
arg=(),
timeout=None,
tgt_type='glob',
ret='',
jid='',
full_return=False,
kwarg=None,
**kwargs):
'''
Synchronously execute a command on targeted minions
... | python | def cmd(self,
tgt,
fun,
arg=(),
timeout=None,
tgt_type='glob',
ret='',
jid='',
full_return=False,
kwarg=None,
**kwargs):
'''
Synchronously execute a command on targeted minions
... | [
"def",
"cmd",
"(",
"self",
",",
"tgt",
",",
"fun",
",",
"arg",
"=",
"(",
")",
",",
"timeout",
"=",
"None",
",",
"tgt_type",
"=",
"'glob'",
",",
"ret",
"=",
"''",
",",
"jid",
"=",
"''",
",",
"full_return",
"=",
"False",
",",
"kwarg",
"=",
"None"... | Synchronously execute a command on targeted minions
The cmd method will execute and wait for the timeout period for all
minions to reply, then it will return all minion data at once.
.. code-block:: python
>>> import salt.client
>>> local = salt.client.LocalClient()
... | [
"Synchronously",
"execute",
"a",
"command",
"on",
"targeted",
"minions"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/__init__.py#L574-L724 | train | Execute a command on the specified minions of a specific type. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/client/__init__.py | LocalClient.cmd_cli | def cmd_cli(
self,
tgt,
fun,
arg=(),
timeout=None,
tgt_type='glob',
ret='',
verbose=False,
kwarg=None,
progress=False,
**kwargs):
'''
Used by the :command:`salt` CLI. This ... | python | def cmd_cli(
self,
tgt,
fun,
arg=(),
timeout=None,
tgt_type='glob',
ret='',
verbose=False,
kwarg=None,
progress=False,
**kwargs):
'''
Used by the :command:`salt` CLI. This ... | [
"def",
"cmd_cli",
"(",
"self",
",",
"tgt",
",",
"fun",
",",
"arg",
"=",
"(",
")",
",",
"timeout",
"=",
"None",
",",
"tgt_type",
"=",
"'glob'",
",",
"ret",
"=",
"''",
",",
"verbose",
"=",
"False",
",",
"kwarg",
"=",
"None",
",",
"progress",
"=",
... | Used by the :command:`salt` CLI. This method returns minion returns as
they come back and attempts to block until all minions return.
The function signature is the same as :py:meth:`cmd` with the
following exceptions.
:param verbose: Print extra information about the running command
... | [
"Used",
"by",
"the",
":",
"command",
":",
"salt",
"CLI",
".",
"This",
"method",
"returns",
"minion",
"returns",
"as",
"they",
"come",
"back",
"and",
"attempts",
"to",
"block",
"until",
"all",
"minions",
"return",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/__init__.py#L726-L820 | train | This method is used by the CLI to run the command and return the output of the command. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/client/__init__.py | LocalClient.cmd_iter | def cmd_iter(
self,
tgt,
fun,
arg=(),
timeout=None,
tgt_type='glob',
ret='',
kwarg=None,
**kwargs):
'''
Yields the individual minion returns as they come in
The function signature is the ... | python | def cmd_iter(
self,
tgt,
fun,
arg=(),
timeout=None,
tgt_type='glob',
ret='',
kwarg=None,
**kwargs):
'''
Yields the individual minion returns as they come in
The function signature is the ... | [
"def",
"cmd_iter",
"(",
"self",
",",
"tgt",
",",
"fun",
",",
"arg",
"=",
"(",
")",
",",
"timeout",
"=",
"None",
",",
"tgt_type",
"=",
"'glob'",
",",
"ret",
"=",
"''",
",",
"kwarg",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"was_listening",
... | Yields the individual minion returns as they come in
The function signature is the same as :py:meth:`cmd` with the
following exceptions.
Normally :py:meth:`cmd_iter` does not yield results for minions that
are not connected. If you want it to return results for disconnected
min... | [
"Yields",
"the",
"individual",
"minion",
"returns",
"as",
"they",
"come",
"in"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/__init__.py#L822-L884 | train | A generator that yields the individual minion returns as they come in. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/client/__init__.py | LocalClient.cmd_iter_no_block | def cmd_iter_no_block(
self,
tgt,
fun,
arg=(),
timeout=None,
tgt_type='glob',
ret='',
kwarg=None,
show_jid=False,
verbose=False,
**kwargs):
'''
Yields the individual minion... | python | def cmd_iter_no_block(
self,
tgt,
fun,
arg=(),
timeout=None,
tgt_type='glob',
ret='',
kwarg=None,
show_jid=False,
verbose=False,
**kwargs):
'''
Yields the individual minion... | [
"def",
"cmd_iter_no_block",
"(",
"self",
",",
"tgt",
",",
"fun",
",",
"arg",
"=",
"(",
")",
",",
"timeout",
"=",
"None",
",",
"tgt_type",
"=",
"'glob'",
",",
"ret",
"=",
"''",
",",
"kwarg",
"=",
"None",
",",
"show_jid",
"=",
"False",
",",
"verbose"... | Yields the individual minion returns as they come in, or None
when no returns are available.
The function signature is the same as :py:meth:`cmd` with the
following exceptions.
:returns: A generator yielding the individual minion returns, or None
when no returns are ava... | [
"Yields",
"the",
"individual",
"minion",
"returns",
"as",
"they",
"come",
"in",
"or",
"None",
"when",
"no",
"returns",
"are",
"available",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/__init__.py#L886-L952 | train | A generator that yields the individual minion returns as they come in or None when no returns are 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/client/__init__.py | LocalClient.cmd_full_return | def cmd_full_return(
self,
tgt,
fun,
arg=(),
timeout=None,
tgt_type='glob',
ret='',
verbose=False,
kwarg=None,
**kwargs):
'''
Execute a salt command and return
'''
was_... | python | def cmd_full_return(
self,
tgt,
fun,
arg=(),
timeout=None,
tgt_type='glob',
ret='',
verbose=False,
kwarg=None,
**kwargs):
'''
Execute a salt command and return
'''
was_... | [
"def",
"cmd_full_return",
"(",
"self",
",",
"tgt",
",",
"fun",
",",
"arg",
"=",
"(",
")",
",",
"timeout",
"=",
"None",
",",
"tgt_type",
"=",
"'glob'",
",",
"ret",
"=",
"''",
",",
"verbose",
"=",
"False",
",",
"kwarg",
"=",
"None",
",",
"*",
"*",
... | Execute a salt command and return | [
"Execute",
"a",
"salt",
"command",
"and",
"return"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/__init__.py#L954-L993 | train | Execute a salt command and return a dict of 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/client/__init__.py | LocalClient.get_cli_returns | def get_cli_returns(
self,
jid,
minions,
timeout=None,
tgt='*',
tgt_type='glob',
verbose=False,
show_jid=False,
**kwargs):
'''
Starts a watcher looking at the return data for a specified JID
... | python | def get_cli_returns(
self,
jid,
minions,
timeout=None,
tgt='*',
tgt_type='glob',
verbose=False,
show_jid=False,
**kwargs):
'''
Starts a watcher looking at the return data for a specified JID
... | [
"def",
"get_cli_returns",
"(",
"self",
",",
"jid",
",",
"minions",
",",
"timeout",
"=",
"None",
",",
"tgt",
"=",
"'*'",
",",
"tgt_type",
"=",
"'glob'",
",",
"verbose",
"=",
"False",
",",
"show_jid",
"=",
"False",
",",
"*",
"*",
"kwargs",
")",
":",
... | Starts a watcher looking at the return data for a specified JID
:returns: all of the information for the JID | [
"Starts",
"a",
"watcher",
"looking",
"at",
"the",
"return",
"data",
"for",
"a",
"specified",
"JID"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/__init__.py#L995-L1043 | train | Get the return data for a specified job | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/client/__init__.py | LocalClient.get_returns_no_block | def get_returns_no_block(
self,
tag,
match_type=None):
'''
Raw function to just return events of jid excluding timeout logic
Yield either the raw event data or None
Pass a list of additional regular expressions as `tags_regex` to search
the e... | python | def get_returns_no_block(
self,
tag,
match_type=None):
'''
Raw function to just return events of jid excluding timeout logic
Yield either the raw event data or None
Pass a list of additional regular expressions as `tags_regex` to search
the e... | [
"def",
"get_returns_no_block",
"(",
"self",
",",
"tag",
",",
"match_type",
"=",
"None",
")",
":",
"while",
"True",
":",
"raw",
"=",
"self",
".",
"event",
".",
"get_event",
"(",
"wait",
"=",
"0.01",
",",
"tag",
"=",
"tag",
",",
"match_type",
"=",
"mat... | Raw function to just return events of jid excluding timeout logic
Yield either the raw event data or None
Pass a list of additional regular expressions as `tags_regex` to search
the event bus for non-return data, such as minion lists returned from
syndics. | [
"Raw",
"function",
"to",
"just",
"return",
"events",
"of",
"jid",
"excluding",
"timeout",
"logic"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/__init__.py#L1046-L1063 | train | Get the raw event data of a specific tag and block until it is 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/client/__init__.py | LocalClient.get_iter_returns | def get_iter_returns(
self,
jid,
minions,
timeout=None,
tgt='*',
tgt_type='glob',
expect_minions=False,
block=True,
**kwargs):
'''
Watch the event system and return job data as it comes in
... | python | def get_iter_returns(
self,
jid,
minions,
timeout=None,
tgt='*',
tgt_type='glob',
expect_minions=False,
block=True,
**kwargs):
'''
Watch the event system and return job data as it comes in
... | [
"def",
"get_iter_returns",
"(",
"self",
",",
"jid",
",",
"minions",
",",
"timeout",
"=",
"None",
",",
"tgt",
"=",
"'*'",
",",
"tgt_type",
"=",
"'glob'",
",",
"expect_minions",
"=",
"False",
",",
"block",
"=",
"True",
",",
"*",
"*",
"kwargs",
")",
":"... | Watch the event system and return job data as it comes in
:returns: all of the information for the JID | [
"Watch",
"the",
"event",
"system",
"and",
"return",
"job",
"data",
"as",
"it",
"comes",
"in"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/__init__.py#L1065-L1292 | train | Get the return data for a specific job | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/client/__init__.py | LocalClient.get_returns | def get_returns(
self,
jid,
minions,
timeout=None):
'''
Get the returns for the command line interface via the event system
'''
minions = set(minions)
if timeout is None:
timeout = self.opts['timeout']
start = in... | python | def get_returns(
self,
jid,
minions,
timeout=None):
'''
Get the returns for the command line interface via the event system
'''
minions = set(minions)
if timeout is None:
timeout = self.opts['timeout']
start = in... | [
"def",
"get_returns",
"(",
"self",
",",
"jid",
",",
"minions",
",",
"timeout",
"=",
"None",
")",
":",
"minions",
"=",
"set",
"(",
"minions",
")",
"if",
"timeout",
"is",
"None",
":",
"timeout",
"=",
"self",
".",
"opts",
"[",
"'timeout'",
"]",
"start",... | Get the returns for the command line interface via the event system | [
"Get",
"the",
"returns",
"for",
"the",
"command",
"line",
"interface",
"via",
"the",
"event",
"system"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/__init__.py#L1294-L1348 | train | Get the returns for the command line interface via the event 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/client/__init__.py | LocalClient.get_full_returns | def get_full_returns(self, jid, minions, timeout=None):
'''
This method starts off a watcher looking at the return data for
a specified jid, it returns all of the information for the jid
'''
# TODO: change this from ret to return... or the other way.
# Its inconsist... | python | def get_full_returns(self, jid, minions, timeout=None):
'''
This method starts off a watcher looking at the return data for
a specified jid, it returns all of the information for the jid
'''
# TODO: change this from ret to return... or the other way.
# Its inconsist... | [
"def",
"get_full_returns",
"(",
"self",
",",
"jid",
",",
"minions",
",",
"timeout",
"=",
"None",
")",
":",
"# TODO: change this from ret to return... or the other way.",
"# Its inconsistent, we should pick one",
"ret",
"=",
"{",
"}",
"# create the iterator-- since we wa... | This method starts off a watcher looking at the return data for
a specified jid, it returns all of the information for the jid | [
"This",
"method",
"starts",
"off",
"a",
"watcher",
"looking",
"at",
"the",
"return",
"data",
"for",
"a",
"specified",
"jid",
"it",
"returns",
"all",
"of",
"the",
"information",
"for",
"the",
"jid"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/__init__.py#L1350-L1403 | train | This method returns all of the information for a specific jid | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/client/__init__.py | LocalClient.get_cache_returns | def get_cache_returns(self, jid):
'''
Execute a single pass to gather the contents of the job cache
'''
ret = {}
try:
data = self.returners['{0}.get_jid'.format(self.opts['master_job_cache'])](jid)
except Exception as exc:
raise SaltClientError('C... | python | def get_cache_returns(self, jid):
'''
Execute a single pass to gather the contents of the job cache
'''
ret = {}
try:
data = self.returners['{0}.get_jid'.format(self.opts['master_job_cache'])](jid)
except Exception as exc:
raise SaltClientError('C... | [
"def",
"get_cache_returns",
"(",
"self",
",",
"jid",
")",
":",
"ret",
"=",
"{",
"}",
"try",
":",
"data",
"=",
"self",
".",
"returners",
"[",
"'{0}.get_jid'",
".",
"format",
"(",
"self",
".",
"opts",
"[",
"'master_job_cache'",
"]",
")",
"]",
"(",
"jid... | Execute a single pass to gather the contents of the job cache | [
"Execute",
"a",
"single",
"pass",
"to",
"gather",
"the",
"contents",
"of",
"the",
"job",
"cache"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/__init__.py#L1405-L1431 | train | Execute a single pass to gather the contents of the job cache | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/client/__init__.py | LocalClient.get_cli_static_event_returns | def get_cli_static_event_returns(
self,
jid,
minions,
timeout=None,
tgt='*',
tgt_type='glob',
verbose=False,
show_timeout=False,
show_jid=False):
'''
Get the returns for the command line interface... | python | def get_cli_static_event_returns(
self,
jid,
minions,
timeout=None,
tgt='*',
tgt_type='glob',
verbose=False,
show_timeout=False,
show_jid=False):
'''
Get the returns for the command line interface... | [
"def",
"get_cli_static_event_returns",
"(",
"self",
",",
"jid",
",",
"minions",
",",
"timeout",
"=",
"None",
",",
"tgt",
"=",
"'*'",
",",
"tgt_type",
"=",
"'glob'",
",",
"verbose",
"=",
"False",
",",
"show_timeout",
"=",
"False",
",",
"show_jid",
"=",
"F... | Get the returns for the command line interface via the event system | [
"Get",
"the",
"returns",
"for",
"the",
"command",
"line",
"interface",
"via",
"the",
"event",
"system"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/__init__.py#L1433-L1512 | train | Get the returns for the command line interface via the event 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/client/__init__.py | LocalClient.get_cli_event_returns | def get_cli_event_returns(
self,
jid,
minions,
timeout=None,
tgt='*',
tgt_type='glob',
verbose=False,
progress=False,
show_timeout=False,
show_jid=False,
**kwargs):
'''
Get... | python | def get_cli_event_returns(
self,
jid,
minions,
timeout=None,
tgt='*',
tgt_type='glob',
verbose=False,
progress=False,
show_timeout=False,
show_jid=False,
**kwargs):
'''
Get... | [
"def",
"get_cli_event_returns",
"(",
"self",
",",
"jid",
",",
"minions",
",",
"timeout",
"=",
"None",
",",
"tgt",
"=",
"'*'",
",",
"tgt_type",
"=",
"'glob'",
",",
"verbose",
"=",
"False",
",",
"progress",
"=",
"False",
",",
"show_timeout",
"=",
"False",
... | Get the returns for the command line interface via the event system | [
"Get",
"the",
"returns",
"for",
"the",
"command",
"line",
"interface",
"via",
"the",
"event",
"system"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/__init__.py#L1514-L1594 | train | Get the returns for the command line interface via the event 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/client/__init__.py | LocalClient.get_event_iter_returns | def get_event_iter_returns(self, jid, minions, timeout=None):
'''
Gather the return data from the event system, break hard when timeout
is reached.
'''
log.trace('entered - function get_event_iter_returns()')
if timeout is None:
timeout = self.opts['timeout']
... | python | def get_event_iter_returns(self, jid, minions, timeout=None):
'''
Gather the return data from the event system, break hard when timeout
is reached.
'''
log.trace('entered - function get_event_iter_returns()')
if timeout is None:
timeout = self.opts['timeout']
... | [
"def",
"get_event_iter_returns",
"(",
"self",
",",
"jid",
",",
"minions",
",",
"timeout",
"=",
"None",
")",
":",
"log",
".",
"trace",
"(",
"'entered - function get_event_iter_returns()'",
")",
"if",
"timeout",
"is",
"None",
":",
"timeout",
"=",
"self",
".",
... | Gather the return data from the event system, break hard when timeout
is reached. | [
"Gather",
"the",
"return",
"data",
"from",
"the",
"event",
"system",
"break",
"hard",
"when",
"timeout",
"is",
"reached",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/__init__.py#L1596-L1631 | train | Get the return data from the event system for the specified jid | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/client/__init__.py | LocalClient._prep_pub | def _prep_pub(self,
tgt,
fun,
arg,
tgt_type,
ret,
jid,
timeout,
**kwargs):
'''
Set up the payload_kwargs to be sent down to the master
'''
if tg... | python | def _prep_pub(self,
tgt,
fun,
arg,
tgt_type,
ret,
jid,
timeout,
**kwargs):
'''
Set up the payload_kwargs to be sent down to the master
'''
if tg... | [
"def",
"_prep_pub",
"(",
"self",
",",
"tgt",
",",
"fun",
",",
"arg",
",",
"tgt_type",
",",
"ret",
",",
"jid",
",",
"timeout",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"tgt_type",
"==",
"'nodegroup'",
":",
"if",
"tgt",
"not",
"in",
"self",
".",
"o... | Set up the payload_kwargs to be sent down to the master | [
"Set",
"up",
"the",
"payload_kwargs",
"to",
"be",
"sent",
"down",
"to",
"the",
"master"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/__init__.py#L1633-L1699 | train | Prepare the payload for the pub 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/client/__init__.py | LocalClient.pub_async | def pub_async(self,
tgt,
fun,
arg=(),
tgt_type='glob',
ret='',
jid='',
timeout=5,
io_loop=None,
listen=True,
**kwargs):
'''
... | python | def pub_async(self,
tgt,
fun,
arg=(),
tgt_type='glob',
ret='',
jid='',
timeout=5,
io_loop=None,
listen=True,
**kwargs):
'''
... | [
"def",
"pub_async",
"(",
"self",
",",
"tgt",
",",
"fun",
",",
"arg",
"=",
"(",
")",
",",
"tgt_type",
"=",
"'glob'",
",",
"ret",
"=",
"''",
",",
"jid",
"=",
"''",
",",
"timeout",
"=",
"5",
",",
"io_loop",
"=",
"None",
",",
"listen",
"=",
"True",... | Take the required arguments and publish the given command.
Arguments:
tgt:
The tgt is a regex or a glob used to match up the ids on
the minions. Salt works by always publishing every command
to all of the minions and then the minions determine if
... | [
"Take",
"the",
"required",
"arguments",
"and",
"publish",
"the",
"given",
"command",
".",
"Arguments",
":",
"tgt",
":",
"The",
"tgt",
"is",
"a",
"regex",
"or",
"a",
"glob",
"used",
"to",
"match",
"up",
"the",
"ids",
"on",
"the",
"minions",
".",
"Salt",... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/__init__.py#L1808-L1913 | train | Publish a command to all of the minions 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/client/__init__.py | FunctionWrapper.__load_functions | def __load_functions(self):
'''
Find out what functions are available on the minion
'''
return set(self.local.cmd(self.minion,
'sys.list_functions').get(self.minion, [])) | python | def __load_functions(self):
'''
Find out what functions are available on the minion
'''
return set(self.local.cmd(self.minion,
'sys.list_functions').get(self.minion, [])) | [
"def",
"__load_functions",
"(",
"self",
")",
":",
"return",
"set",
"(",
"self",
".",
"local",
".",
"cmd",
"(",
"self",
".",
"minion",
",",
"'sys.list_functions'",
")",
".",
"get",
"(",
"self",
".",
"minion",
",",
"[",
"]",
")",
")"
] | Find out what functions are available on the minion | [
"Find",
"out",
"what",
"functions",
"are",
"available",
"on",
"the",
"minion"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/__init__.py#L1953-L1958 | train | Load the functions available on the minion | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/client/__init__.py | FunctionWrapper.run_key | def run_key(self, key):
'''
Return a function that executes the arguments passed via the local
client
'''
def func(*args, **kwargs):
'''
Run a remote call
'''
args = list(args)
for _key, _val in kwargs:
a... | python | def run_key(self, key):
'''
Return a function that executes the arguments passed via the local
client
'''
def func(*args, **kwargs):
'''
Run a remote call
'''
args = list(args)
for _key, _val in kwargs:
a... | [
"def",
"run_key",
"(",
"self",
",",
"key",
")",
":",
"def",
"func",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"'''\n Run a remote call\n '''",
"args",
"=",
"list",
"(",
"args",
")",
"for",
"_key",
",",
"_val",
"in",
"kwar... | Return a function that executes the arguments passed via the local
client | [
"Return",
"a",
"function",
"that",
"executes",
"the",
"arguments",
"passed",
"via",
"the",
"local",
"client"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/__init__.py#L1960-L1973 | train | Returns a function that executes the arguments passed via the local
client and returns the result of the remote call. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/client/__init__.py | Caller.cmd | def cmd(self, fun, *args, **kwargs):
'''
Call an execution module with the given arguments and keyword arguments
.. versionchanged:: 2015.8.0
Added the ``cmd`` method for consistency with the other Salt clients.
The existing ``function`` and ``sminion.functions`` interfa... | python | def cmd(self, fun, *args, **kwargs):
'''
Call an execution module with the given arguments and keyword arguments
.. versionchanged:: 2015.8.0
Added the ``cmd`` method for consistency with the other Salt clients.
The existing ``function`` and ``sminion.functions`` interfa... | [
"def",
"cmd",
"(",
"self",
",",
"fun",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"sminion",
".",
"functions",
"[",
"fun",
"]",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] | Call an execution module with the given arguments and keyword arguments
.. versionchanged:: 2015.8.0
Added the ``cmd`` method for consistency with the other Salt clients.
The existing ``function`` and ``sminion.functions`` interfaces still
exist but have been removed from th... | [
"Call",
"an",
"execution",
"module",
"with",
"the",
"given",
"arguments",
"and",
"keyword",
"arguments"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/__init__.py#L2024-L2040 | train | Call an execution module with the given arguments and keyword arguments and return the result. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/client/__init__.py | Caller.function | def function(self, fun, *args, **kwargs):
'''
Call a single salt function
'''
func = self.sminion.functions[fun]
args, kwargs = salt.minion.load_args_and_kwargs(
func,
salt.utils.args.parse_input(args, kwargs=kwargs),)
return func(*args, **kwargs) | python | def function(self, fun, *args, **kwargs):
'''
Call a single salt function
'''
func = self.sminion.functions[fun]
args, kwargs = salt.minion.load_args_and_kwargs(
func,
salt.utils.args.parse_input(args, kwargs=kwargs),)
return func(*args, **kwargs) | [
"def",
"function",
"(",
"self",
",",
"fun",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"func",
"=",
"self",
".",
"sminion",
".",
"functions",
"[",
"fun",
"]",
"args",
",",
"kwargs",
"=",
"salt",
".",
"minion",
".",
"load_args_and_kwargs",
... | Call a single salt function | [
"Call",
"a",
"single",
"salt",
"function"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/__init__.py#L2042-L2050 | train | Call a single salt 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/client/__init__.py | ProxyCaller.cmd | def cmd(self, fun, *args, **kwargs):
'''
Call an execution module with the given arguments and keyword arguments
.. code-block:: python
caller.cmd('test.arg', 'Foo', 'Bar', baz='Baz')
caller.cmd('event.send', 'myco/myevent/something',
data={'foo': 'Foo'... | python | def cmd(self, fun, *args, **kwargs):
'''
Call an execution module with the given arguments and keyword arguments
.. code-block:: python
caller.cmd('test.arg', 'Foo', 'Bar', baz='Baz')
caller.cmd('event.send', 'myco/myevent/something',
data={'foo': 'Foo'... | [
"def",
"cmd",
"(",
"self",
",",
"fun",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"func",
"=",
"self",
".",
"sminion",
".",
"functions",
"[",
"fun",
"]",
"data",
"=",
"{",
"'arg'",
":",
"args",
",",
"'fun'",
":",
"fun",
"}",
"data",
... | Call an execution module with the given arguments and keyword arguments
.. code-block:: python
caller.cmd('test.arg', 'Foo', 'Bar', baz='Baz')
caller.cmd('event.send', 'myco/myevent/something',
data={'foo': 'Foo'}, with_env=['GIT_COMMIT'], with_grains=True) | [
"Call",
"an",
"execution",
"module",
"with",
"the",
"given",
"arguments",
"and",
"keyword",
"arguments"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/__init__.py#L2097-L2125 | train | Execute a function on the specified module | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/win_smtp_server.py | _get_wmi_setting | def _get_wmi_setting(wmi_class_name, setting, server):
'''
Get the value of the setting for the provided class.
'''
with salt.utils.winapi.Com():
try:
connection = wmi.WMI(namespace=_WMI_NAMESPACE)
wmi_class = getattr(connection, wmi_class_name)
objs = wmi_cl... | python | def _get_wmi_setting(wmi_class_name, setting, server):
'''
Get the value of the setting for the provided class.
'''
with salt.utils.winapi.Com():
try:
connection = wmi.WMI(namespace=_WMI_NAMESPACE)
wmi_class = getattr(connection, wmi_class_name)
objs = wmi_cl... | [
"def",
"_get_wmi_setting",
"(",
"wmi_class_name",
",",
"setting",
",",
"server",
")",
":",
"with",
"salt",
".",
"utils",
".",
"winapi",
".",
"Com",
"(",
")",
":",
"try",
":",
"connection",
"=",
"wmi",
".",
"WMI",
"(",
"namespace",
"=",
"_WMI_NAMESPACE",
... | Get the value of the setting for the provided class. | [
"Get",
"the",
"value",
"of",
"the",
"setting",
"for",
"the",
"provided",
"class",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_smtp_server.py#L58-L73 | train | Get the value of the setting for the provided class. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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_smtp_server.py | _set_wmi_setting | def _set_wmi_setting(wmi_class_name, setting, value, server):
'''
Set the value of the setting for the provided class.
'''
with salt.utils.winapi.Com():
try:
connection = wmi.WMI(namespace=_WMI_NAMESPACE)
wmi_class = getattr(connection, wmi_class_name)
objs =... | python | def _set_wmi_setting(wmi_class_name, setting, value, server):
'''
Set the value of the setting for the provided class.
'''
with salt.utils.winapi.Com():
try:
connection = wmi.WMI(namespace=_WMI_NAMESPACE)
wmi_class = getattr(connection, wmi_class_name)
objs =... | [
"def",
"_set_wmi_setting",
"(",
"wmi_class_name",
",",
"setting",
",",
"value",
",",
"server",
")",
":",
"with",
"salt",
".",
"utils",
".",
"winapi",
".",
"Com",
"(",
")",
":",
"try",
":",
"connection",
"=",
"wmi",
".",
"WMI",
"(",
"namespace",
"=",
... | Set the value of the setting for the provided class. | [
"Set",
"the",
"value",
"of",
"the",
"setting",
"for",
"the",
"provided",
"class",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_smtp_server.py#L76-L98 | train | Set the value of the setting for the provided class. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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_smtp_server.py | get_log_format_types | def get_log_format_types():
'''
Get all available log format names and ids.
:return: A dictionary of the log format names and ids.
:rtype: dict
CLI Example:
.. code-block:: bash
salt '*' win_smtp_server.get_log_format_types
'''
ret = dict()
prefix = 'logging/'
with s... | python | def get_log_format_types():
'''
Get all available log format names and ids.
:return: A dictionary of the log format names and ids.
:rtype: dict
CLI Example:
.. code-block:: bash
salt '*' win_smtp_server.get_log_format_types
'''
ret = dict()
prefix = 'logging/'
with s... | [
"def",
"get_log_format_types",
"(",
")",
":",
"ret",
"=",
"dict",
"(",
")",
"prefix",
"=",
"'logging/'",
"with",
"salt",
".",
"utils",
".",
"winapi",
".",
"Com",
"(",
")",
":",
"try",
":",
"connection",
"=",
"wmi",
".",
"WMI",
"(",
"namespace",
"=",
... | Get all available log format names and ids.
:return: A dictionary of the log format names and ids.
:rtype: dict
CLI Example:
.. code-block:: bash
salt '*' win_smtp_server.get_log_format_types | [
"Get",
"all",
"available",
"log",
"format",
"names",
"and",
"ids",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_smtp_server.py#L119-L151 | train | Get all available log format names and ids. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/win_smtp_server.py | get_servers | def get_servers():
'''
Get the SMTP virtual server names.
:return: A list of the SMTP virtual servers.
:rtype: list
CLI Example:
.. code-block:: bash
salt '*' win_smtp_server.get_servers
'''
ret = list()
with salt.utils.winapi.Com():
try:
connection =... | python | def get_servers():
'''
Get the SMTP virtual server names.
:return: A list of the SMTP virtual servers.
:rtype: list
CLI Example:
.. code-block:: bash
salt '*' win_smtp_server.get_servers
'''
ret = list()
with salt.utils.winapi.Com():
try:
connection =... | [
"def",
"get_servers",
"(",
")",
":",
"ret",
"=",
"list",
"(",
")",
"with",
"salt",
".",
"utils",
".",
"winapi",
".",
"Com",
"(",
")",
":",
"try",
":",
"connection",
"=",
"wmi",
".",
"WMI",
"(",
"namespace",
"=",
"_WMI_NAMESPACE",
")",
"objs",
"=",
... | Get the SMTP virtual server names.
:return: A list of the SMTP virtual servers.
:rtype: list
CLI Example:
.. code-block:: bash
salt '*' win_smtp_server.get_servers | [
"Get",
"the",
"SMTP",
"virtual",
"server",
"names",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_smtp_server.py#L154-L182 | train | Get the SMTP virtual server names. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/win_smtp_server.py | get_server_setting | def get_server_setting(settings, server=_DEFAULT_SERVER):
'''
Get the value of the setting for the SMTP virtual server.
:param str settings: A list of the setting names.
:param str server: The SMTP server name.
:return: A dictionary of the provided settings and their values.
:rtype: dict
... | python | def get_server_setting(settings, server=_DEFAULT_SERVER):
'''
Get the value of the setting for the SMTP virtual server.
:param str settings: A list of the setting names.
:param str server: The SMTP server name.
:return: A dictionary of the provided settings and their values.
:rtype: dict
... | [
"def",
"get_server_setting",
"(",
"settings",
",",
"server",
"=",
"_DEFAULT_SERVER",
")",
":",
"ret",
"=",
"dict",
"(",
")",
"if",
"not",
"settings",
":",
"_LOG",
".",
"warning",
"(",
"'No settings provided.'",
")",
"return",
"ret",
"with",
"salt",
".",
"u... | Get the value of the setting for the SMTP virtual server.
:param str settings: A list of the setting names.
:param str server: The SMTP server name.
:return: A dictionary of the provided settings and their values.
:rtype: dict
CLI Example:
.. code-block:: bash
salt '*' win_smtp_serv... | [
"Get",
"the",
"value",
"of",
"the",
"setting",
"for",
"the",
"SMTP",
"virtual",
"server",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_smtp_server.py#L185-L218 | train | Get the value of the setting for the SMTP virtual server. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/win_smtp_server.py | set_server_setting | def set_server_setting(settings, server=_DEFAULT_SERVER):
'''
Set the value of the setting for the SMTP virtual server.
.. note::
The setting names are case-sensitive.
:param str settings: A dictionary of the setting names and their values.
:param str server: The SMTP server name.
:r... | python | def set_server_setting(settings, server=_DEFAULT_SERVER):
'''
Set the value of the setting for the SMTP virtual server.
.. note::
The setting names are case-sensitive.
:param str settings: A dictionary of the setting names and their values.
:param str server: The SMTP server name.
:r... | [
"def",
"set_server_setting",
"(",
"settings",
",",
"server",
"=",
"_DEFAULT_SERVER",
")",
":",
"if",
"not",
"settings",
":",
"_LOG",
".",
"warning",
"(",
"'No settings provided'",
")",
"return",
"False",
"# Some fields are formatted like '{data}'. Salt tries to convert th... | Set the value of the setting for the SMTP virtual server.
.. note::
The setting names are case-sensitive.
:param str settings: A dictionary of the setting names and their values.
:param str server: The SMTP server name.
:return: A boolean representing whether all changes succeeded.
:rtyp... | [
"Set",
"the",
"value",
"of",
"the",
"setting",
"for",
"the",
"SMTP",
"virtual",
"server",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_smtp_server.py#L221-L289 | train | Set the value of the SMTP virtual server setting for the SMTP virtual server. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/win_smtp_server.py | get_log_format | def get_log_format(server=_DEFAULT_SERVER):
'''
Get the active log format for the SMTP virtual server.
:param str server: The SMTP server name.
:return: A string of the log format name.
:rtype: str
CLI Example:
.. code-block:: bash
salt '*' win_smtp_server.get_log_format
'''... | python | def get_log_format(server=_DEFAULT_SERVER):
'''
Get the active log format for the SMTP virtual server.
:param str server: The SMTP server name.
:return: A string of the log format name.
:rtype: str
CLI Example:
.. code-block:: bash
salt '*' win_smtp_server.get_log_format
'''... | [
"def",
"get_log_format",
"(",
"server",
"=",
"_DEFAULT_SERVER",
")",
":",
"log_format_types",
"=",
"get_log_format_types",
"(",
")",
"format_id",
"=",
"_get_wmi_setting",
"(",
"'IIsSmtpServerSetting'",
",",
"'LogPluginClsid'",
",",
"server",
")",
"# Since IIsSmtpServerS... | Get the active log format for the SMTP virtual server.
:param str server: The SMTP server name.
:return: A string of the log format name.
:rtype: str
CLI Example:
.. code-block:: bash
salt '*' win_smtp_server.get_log_format | [
"Get",
"the",
"active",
"log",
"format",
"for",
"the",
"SMTP",
"virtual",
"server",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_smtp_server.py#L292-L316 | train | Get the active log format for the SMTP virtual server. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/win_smtp_server.py | set_log_format | def set_log_format(log_format, server=_DEFAULT_SERVER):
'''
Set the active log format for the SMTP virtual server.
:param str log_format: The log format name.
:param str server: The SMTP server name.
:return: A boolean representing whether the change succeeded.
:rtype: bool
CLI Example:
... | python | def set_log_format(log_format, server=_DEFAULT_SERVER):
'''
Set the active log format for the SMTP virtual server.
:param str log_format: The log format name.
:param str server: The SMTP server name.
:return: A boolean representing whether the change succeeded.
:rtype: bool
CLI Example:
... | [
"def",
"set_log_format",
"(",
"log_format",
",",
"server",
"=",
"_DEFAULT_SERVER",
")",
":",
"setting",
"=",
"'LogPluginClsid'",
"log_format_types",
"=",
"get_log_format_types",
"(",
")",
"format_id",
"=",
"log_format_types",
".",
"get",
"(",
"log_format",
",",
"N... | Set the active log format for the SMTP virtual server.
:param str log_format: The log format name.
:param str server: The SMTP server name.
:return: A boolean representing whether the change succeeded.
:rtype: bool
CLI Example:
.. code-block:: bash
salt '*' win_smtp_server.set_log_f... | [
"Set",
"the",
"active",
"log",
"format",
"for",
"the",
"SMTP",
"virtual",
"server",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_smtp_server.py#L319-L361 | train | Set the active log format for the SMTP virtual server. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/win_smtp_server.py | get_connection_ip_list | def get_connection_ip_list(as_wmi_format=False, server=_DEFAULT_SERVER):
'''
Get the IPGrant list for the SMTP virtual server.
:param bool as_wmi_format: Returns the connection IPs as a list in the format WMI expects.
:param str server: The SMTP server name.
:return: A dictionary of the IP and sub... | python | def get_connection_ip_list(as_wmi_format=False, server=_DEFAULT_SERVER):
'''
Get the IPGrant list for the SMTP virtual server.
:param bool as_wmi_format: Returns the connection IPs as a list in the format WMI expects.
:param str server: The SMTP server name.
:return: A dictionary of the IP and sub... | [
"def",
"get_connection_ip_list",
"(",
"as_wmi_format",
"=",
"False",
",",
"server",
"=",
"_DEFAULT_SERVER",
")",
":",
"ret",
"=",
"dict",
"(",
")",
"setting",
"=",
"'IPGrant'",
"reg_separator",
"=",
"r',\\s*'",
"if",
"as_wmi_format",
":",
"ret",
"=",
"list",
... | Get the IPGrant list for the SMTP virtual server.
:param bool as_wmi_format: Returns the connection IPs as a list in the format WMI expects.
:param str server: The SMTP server name.
:return: A dictionary of the IP and subnet pairs.
:rtype: dict
CLI Example:
.. code-block:: bash
salt... | [
"Get",
"the",
"IPGrant",
"list",
"for",
"the",
"SMTP",
"virtual",
"server",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_smtp_server.py#L364-L400 | train | Get the IPGrant list for the SMTP virtual server. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/win_smtp_server.py | set_connection_ip_list | def set_connection_ip_list(addresses=None, grant_by_default=False, server=_DEFAULT_SERVER):
'''
Set the IPGrant list for the SMTP virtual server.
:param str addresses: A dictionary of IP + subnet pairs.
:param bool grant_by_default: Whether the addresses should be a blacklist or whitelist.
:param s... | python | def set_connection_ip_list(addresses=None, grant_by_default=False, server=_DEFAULT_SERVER):
'''
Set the IPGrant list for the SMTP virtual server.
:param str addresses: A dictionary of IP + subnet pairs.
:param bool grant_by_default: Whether the addresses should be a blacklist or whitelist.
:param s... | [
"def",
"set_connection_ip_list",
"(",
"addresses",
"=",
"None",
",",
"grant_by_default",
"=",
"False",
",",
"server",
"=",
"_DEFAULT_SERVER",
")",
":",
"setting",
"=",
"'IPGrant'",
"formatted_addresses",
"=",
"list",
"(",
")",
"# It's okay to accept an empty list for ... | Set the IPGrant list for the SMTP virtual server.
:param str addresses: A dictionary of IP + subnet pairs.
:param bool grant_by_default: Whether the addresses should be a blacklist or whitelist.
:param str server: The SMTP server name.
:return: A boolean representing whether the change succeeded.
... | [
"Set",
"the",
"IPGrant",
"list",
"for",
"the",
"SMTP",
"virtual",
"server",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_smtp_server.py#L403-L458 | train | Set the IPGrant list for the SMTP virtual server. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/win_smtp_server.py | get_relay_ip_list | def get_relay_ip_list(server=_DEFAULT_SERVER):
'''
Get the RelayIpList list for the SMTP virtual server.
:param str server: The SMTP server name.
:return: A list of the relay IPs.
:rtype: list
.. note::
A return value of None corresponds to the restrictive 'Only the list below' GUI p... | python | def get_relay_ip_list(server=_DEFAULT_SERVER):
'''
Get the RelayIpList list for the SMTP virtual server.
:param str server: The SMTP server name.
:return: A list of the relay IPs.
:rtype: list
.. note::
A return value of None corresponds to the restrictive 'Only the list below' GUI p... | [
"def",
"get_relay_ip_list",
"(",
"server",
"=",
"_DEFAULT_SERVER",
")",
":",
"ret",
"=",
"list",
"(",
")",
"setting",
"=",
"'RelayIpList'",
"lines",
"=",
"_get_wmi_setting",
"(",
"'IIsSmtpServerSetting'",
",",
"setting",
",",
"server",
")",
"if",
"not",
"lines... | Get the RelayIpList list for the SMTP virtual server.
:param str server: The SMTP server name.
:return: A list of the relay IPs.
:rtype: list
.. note::
A return value of None corresponds to the restrictive 'Only the list below' GUI parameter
with an empty access list, and setting an ... | [
"Get",
"the",
"RelayIpList",
"list",
"for",
"the",
"SMTP",
"virtual",
"server",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_smtp_server.py#L461-L501 | train | Get the RelayIpList list for the SMTP virtual server. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/win_smtp_server.py | set_relay_ip_list | def set_relay_ip_list(addresses=None, server=_DEFAULT_SERVER):
'''
Set the RelayIpList list for the SMTP virtual server.
Due to the unusual way that Windows stores the relay IPs, it is advisable to retrieve
the existing list you wish to set from a pre-configured server.
For example, setting '127.0... | python | def set_relay_ip_list(addresses=None, server=_DEFAULT_SERVER):
'''
Set the RelayIpList list for the SMTP virtual server.
Due to the unusual way that Windows stores the relay IPs, it is advisable to retrieve
the existing list you wish to set from a pre-configured server.
For example, setting '127.0... | [
"def",
"set_relay_ip_list",
"(",
"addresses",
"=",
"None",
",",
"server",
"=",
"_DEFAULT_SERVER",
")",
":",
"setting",
"=",
"'RelayIpList'",
"formatted_addresses",
"=",
"list",
"(",
")",
"current_addresses",
"=",
"get_relay_ip_list",
"(",
"server",
")",
"if",
"l... | Set the RelayIpList list for the SMTP virtual server.
Due to the unusual way that Windows stores the relay IPs, it is advisable to retrieve
the existing list you wish to set from a pre-configured server.
For example, setting '127.0.0.1' as an allowed relay IP through the GUI would generate
an actual r... | [
"Set",
"the",
"RelayIpList",
"list",
"for",
"the",
"SMTP",
"virtual",
"server",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_smtp_server.py#L504-L571 | train | Sets the RelayIpList list for the SMTP virtual server. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/netmiko_mod.py | _prepare_connection | def _prepare_connection(**kwargs):
'''
Prepare the connection with the remote network device, and clean up the key
value pairs, removing the args used for the connection init.
'''
init_args = {}
fun_kwargs = {}
netmiko_kwargs = __salt__['config.get']('netmiko', {})
netmiko_kwargs.update(... | python | def _prepare_connection(**kwargs):
'''
Prepare the connection with the remote network device, and clean up the key
value pairs, removing the args used for the connection init.
'''
init_args = {}
fun_kwargs = {}
netmiko_kwargs = __salt__['config.get']('netmiko', {})
netmiko_kwargs.update(... | [
"def",
"_prepare_connection",
"(",
"*",
"*",
"kwargs",
")",
":",
"init_args",
"=",
"{",
"}",
"fun_kwargs",
"=",
"{",
"}",
"netmiko_kwargs",
"=",
"__salt__",
"[",
"'config.get'",
"]",
"(",
"'netmiko'",
",",
"{",
"}",
")",
"netmiko_kwargs",
".",
"update",
... | Prepare the connection with the remote network device, and clean up the key
value pairs, removing the args used for the connection init. | [
"Prepare",
"the",
"connection",
"with",
"the",
"remote",
"network",
"device",
"and",
"clean",
"up",
"the",
"key",
"value",
"pairs",
"removing",
"the",
"args",
"used",
"for",
"the",
"connection",
"init",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/netmiko_mod.py#L241-L260 | train | Prepare the connection with the remote network device and clean up the key
value pairs removing the args used for the connection cleanup. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/netmiko_mod.py | multi_call | def multi_call(*methods, **kwargs):
'''
Invoke multiple Netmiko methods at once, and return their output, as list.
methods
A list of dictionaries with the following keys:
- ``name``: the name of the Netmiko method to be executed.
- ``args``: list of arguments to be sent to the Netm... | python | def multi_call(*methods, **kwargs):
'''
Invoke multiple Netmiko methods at once, and return their output, as list.
methods
A list of dictionaries with the following keys:
- ``name``: the name of the Netmiko method to be executed.
- ``args``: list of arguments to be sent to the Netm... | [
"def",
"multi_call",
"(",
"*",
"methods",
",",
"*",
"*",
"kwargs",
")",
":",
"kwargs",
"=",
"clean_kwargs",
"(",
"*",
"*",
"kwargs",
")",
"if",
"'netmiko.conn'",
"in",
"__proxy__",
":",
"conn",
"=",
"__proxy__",
"[",
"'netmiko.conn'",
"]",
"(",
")",
"e... | Invoke multiple Netmiko methods at once, and return their output, as list.
methods
A list of dictionaries with the following keys:
- ``name``: the name of the Netmiko method to be executed.
- ``args``: list of arguments to be sent to the Netmiko method.
- ``kwargs``: dictionary of ... | [
"Invoke",
"multiple",
"Netmiko",
"methods",
"at",
"once",
"and",
"return",
"their",
"output",
"as",
"list",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/netmiko_mod.py#L319-L348 | train | Invoke multiple Netmiko methods at once and return their output as list. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/netmiko_mod.py | send_config | def send_config(config_file=None,
config_commands=None,
template_engine='jinja',
commit=False,
context=None,
defaults=None,
saltenv='base',
**kwargs):
'''
Send configuration commands down the SSH chan... | python | def send_config(config_file=None,
config_commands=None,
template_engine='jinja',
commit=False,
context=None,
defaults=None,
saltenv='base',
**kwargs):
'''
Send configuration commands down the SSH chan... | [
"def",
"send_config",
"(",
"config_file",
"=",
"None",
",",
"config_commands",
"=",
"None",
",",
"template_engine",
"=",
"'jinja'",
",",
"commit",
"=",
"False",
",",
"context",
"=",
"None",
",",
"defaults",
"=",
"None",
",",
"saltenv",
"=",
"'base'",
",",
... | Send configuration commands down the SSH channel.
Return the configuration lines sent to the device.
The function is flexible to send the configuration from a local or remote
file, or simply the commands as list.
config_file
The source file with the configuration commands to be sent to the
... | [
"Send",
"configuration",
"commands",
"down",
"the",
"SSH",
"channel",
".",
"Return",
"the",
"configuration",
"lines",
"sent",
"to",
"the",
"device",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/netmiko_mod.py#L474-L583 | train | Sends a configuration command to the SSH channel. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/qemu_nbd.py | connect | def connect(image):
'''
Activate nbd for an image file.
CLI Example:
.. code-block:: bash
salt '*' qemu_nbd.connect /tmp/image.raw
'''
if not os.path.isfile(image):
log.warning('Could not connect image: %s does not exist', image)
return ''
if salt.utils.path.which... | python | def connect(image):
'''
Activate nbd for an image file.
CLI Example:
.. code-block:: bash
salt '*' qemu_nbd.connect /tmp/image.raw
'''
if not os.path.isfile(image):
log.warning('Could not connect image: %s does not exist', image)
return ''
if salt.utils.path.which... | [
"def",
"connect",
"(",
"image",
")",
":",
"if",
"not",
"os",
".",
"path",
".",
"isfile",
"(",
"image",
")",
":",
"log",
".",
"warning",
"(",
"'Could not connect image: %s does not exist'",
",",
"image",
")",
"return",
"''",
"if",
"salt",
".",
"utils",
".... | Activate nbd for an image file.
CLI Example:
.. code-block:: bash
salt '*' qemu_nbd.connect /tmp/image.raw | [
"Activate",
"nbd",
"for",
"an",
"image",
"file",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/qemu_nbd.py#L37-L68 | train | Activate nbd for an image 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/qemu_nbd.py | mount | def mount(nbd, root=None):
'''
Pass in the nbd connection device location, mount all partitions and return
a dict of mount points
CLI Example:
.. code-block:: bash
salt '*' qemu_nbd.mount /dev/nbd0
'''
__salt__['cmd.run'](
'partprobe {0}'.format(nbd),
pytho... | python | def mount(nbd, root=None):
'''
Pass in the nbd connection device location, mount all partitions and return
a dict of mount points
CLI Example:
.. code-block:: bash
salt '*' qemu_nbd.mount /dev/nbd0
'''
__salt__['cmd.run'](
'partprobe {0}'.format(nbd),
pytho... | [
"def",
"mount",
"(",
"nbd",
",",
"root",
"=",
"None",
")",
":",
"__salt__",
"[",
"'cmd.run'",
"]",
"(",
"'partprobe {0}'",
".",
"format",
"(",
"nbd",
")",
",",
"python_shell",
"=",
"False",
",",
")",
"ret",
"=",
"{",
"}",
"if",
"root",
"is",
"None"... | Pass in the nbd connection device location, mount all partitions and return
a dict of mount points
CLI Example:
.. code-block:: bash
salt '*' qemu_nbd.mount /dev/nbd0 | [
"Pass",
"in",
"the",
"nbd",
"connection",
"device",
"location",
"mount",
"all",
"partitions",
"and",
"return",
"a",
"dict",
"of",
"mount",
"points"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/qemu_nbd.py#L71-L100 | train | Mount all partitions of the nbd device and return a dict of mount points | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/qemu_nbd.py | init | def init(image, root=None):
'''
Mount the named image via qemu-nbd and return the mounted roots
CLI Example:
.. code-block:: bash
salt '*' qemu_nbd.init /srv/image.qcow2
'''
nbd = connect(image)
if not nbd:
return ''
return mount(nbd, root) | python | def init(image, root=None):
'''
Mount the named image via qemu-nbd and return the mounted roots
CLI Example:
.. code-block:: bash
salt '*' qemu_nbd.init /srv/image.qcow2
'''
nbd = connect(image)
if not nbd:
return ''
return mount(nbd, root) | [
"def",
"init",
"(",
"image",
",",
"root",
"=",
"None",
")",
":",
"nbd",
"=",
"connect",
"(",
"image",
")",
"if",
"not",
"nbd",
":",
"return",
"''",
"return",
"mount",
"(",
"nbd",
",",
"root",
")"
] | Mount the named image via qemu-nbd and return the mounted roots
CLI Example:
.. code-block:: bash
salt '*' qemu_nbd.init /srv/image.qcow2 | [
"Mount",
"the",
"named",
"image",
"via",
"qemu",
"-",
"nbd",
"and",
"return",
"the",
"mounted",
"roots"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/qemu_nbd.py#L103-L116 | train | Mount the named image via qemu - nbd and return the mounted roots | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/qemu_nbd.py | clear | def clear(mnt):
'''
Pass in the mnt dict returned from nbd_mount to unmount and disconnect
the image from nbd. If all of the partitions are unmounted return an
empty dict, otherwise return a dict containing the still mounted
partitions
CLI Example:
.. code-block:: bash
salt '*' qe... | python | def clear(mnt):
'''
Pass in the mnt dict returned from nbd_mount to unmount and disconnect
the image from nbd. If all of the partitions are unmounted return an
empty dict, otherwise return a dict containing the still mounted
partitions
CLI Example:
.. code-block:: bash
salt '*' qe... | [
"def",
"clear",
"(",
"mnt",
")",
":",
"ret",
"=",
"{",
"}",
"nbds",
"=",
"set",
"(",
")",
"for",
"m_pt",
",",
"dev",
"in",
"six",
".",
"iteritems",
"(",
"mnt",
")",
":",
"mnt_ret",
"=",
"__salt__",
"[",
"'mount.umount'",
"]",
"(",
"m_pt",
")",
... | Pass in the mnt dict returned from nbd_mount to unmount and disconnect
the image from nbd. If all of the partitions are unmounted return an
empty dict, otherwise return a dict containing the still mounted
partitions
CLI Example:
.. code-block:: bash
salt '*' qemu_nbd.clear '{"/mnt/foo": "... | [
"Pass",
"in",
"the",
"mnt",
"dict",
"returned",
"from",
"nbd_mount",
"to",
"unmount",
"and",
"disconnect",
"the",
"image",
"from",
"nbd",
".",
"If",
"all",
"of",
"the",
"partitions",
"are",
"unmounted",
"return",
"an",
"empty",
"dict",
"otherwise",
"return",... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/qemu_nbd.py#L119-L143 | train | Clear the image from nbd | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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 | _handle_interrupt | def _handle_interrupt(exc, original_exc, hardfail=False, trace=''):
'''
if hardfailing:
If we got the original stacktrace, log it
If all cases, raise the original exception
but this is logically part the initial
stack.
else just let salt exit gracefully
'''
if hardfa... | python | def _handle_interrupt(exc, original_exc, hardfail=False, trace=''):
'''
if hardfailing:
If we got the original stacktrace, log it
If all cases, raise the original exception
but this is logically part the initial
stack.
else just let salt exit gracefully
'''
if hardfa... | [
"def",
"_handle_interrupt",
"(",
"exc",
",",
"original_exc",
",",
"hardfail",
"=",
"False",
",",
"trace",
"=",
"''",
")",
":",
"if",
"hardfail",
":",
"if",
"trace",
":",
"log",
".",
"error",
"(",
"trace",
")",
"raise",
"original_exc",
"else",
":",
"rai... | if hardfailing:
If we got the original stacktrace, log it
If all cases, raise the original exception
but this is logically part the initial
stack.
else just let salt exit gracefully | [
"if",
"hardfailing",
":",
"If",
"we",
"got",
"the",
"original",
"stacktrace",
"log",
"it",
"If",
"all",
"cases",
"raise",
"the",
"original",
"exception",
"but",
"this",
"is",
"logically",
"part",
"the",
"initial",
"stack",
".",
"else",
"just",
"let",
"salt... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/scripts.py#L28-L43 | train | Handle an interrupt from the salt 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/scripts.py | salt_master | def salt_master():
'''
Start the salt master.
'''
import salt.cli.daemons
# REMOVEME after Python 2.7 support is dropped (also the six import)
if six.PY2:
from salt.utils.versions import warn_until
# Message borrowed from pip's deprecation warning
warn_until('Sodium',
... | python | def salt_master():
'''
Start the salt master.
'''
import salt.cli.daemons
# REMOVEME after Python 2.7 support is dropped (also the six import)
if six.PY2:
from salt.utils.versions import warn_until
# Message borrowed from pip's deprecation warning
warn_until('Sodium',
... | [
"def",
"salt_master",
"(",
")",
":",
"import",
"salt",
".",
"cli",
".",
"daemons",
"# REMOVEME after Python 2.7 support is dropped (also the six import)",
"if",
"six",
".",
"PY2",
":",
"from",
"salt",
".",
"utils",
".",
"versions",
"import",
"warn_until",
"# Message... | Start the salt master. | [
"Start",
"the",
"salt",
"master",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/scripts.py#L100-L116 | train | Start the salt 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/scripts.py | minion_process | def minion_process():
'''
Start a minion process
'''
import salt.utils.platform
import salt.utils.process
import salt.cli.daemons
# salt_minion spawns this function in a new process
salt.utils.process.appendproctitle('KeepAlive')
def handle_hup(manager, sig, frame):
manage... | python | def minion_process():
'''
Start a minion process
'''
import salt.utils.platform
import salt.utils.process
import salt.cli.daemons
# salt_minion spawns this function in a new process
salt.utils.process.appendproctitle('KeepAlive')
def handle_hup(manager, sig, frame):
manage... | [
"def",
"minion_process",
"(",
")",
":",
"import",
"salt",
".",
"utils",
".",
"platform",
"import",
"salt",
".",
"utils",
".",
"process",
"import",
"salt",
".",
"cli",
".",
"daemons",
"# salt_minion spawns this function in a new process",
"salt",
".",
"utils",
".... | Start a minion process | [
"Start",
"a",
"minion",
"process"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/scripts.py#L119-L178 | train | Start a minion process | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/scripts.py | salt_minion | def salt_minion():
'''
Start the salt minion in a subprocess.
Auto restart minion on error.
'''
import signal
import salt.utils.platform
import salt.utils.process
salt.utils.process.notify_systemd()
import salt.cli.daemons
import multiprocessing
if '' in sys.path:
s... | python | def salt_minion():
'''
Start the salt minion in a subprocess.
Auto restart minion on error.
'''
import signal
import salt.utils.platform
import salt.utils.process
salt.utils.process.notify_systemd()
import salt.cli.daemons
import multiprocessing
if '' in sys.path:
s... | [
"def",
"salt_minion",
"(",
")",
":",
"import",
"signal",
"import",
"salt",
".",
"utils",
".",
"platform",
"import",
"salt",
".",
"utils",
".",
"process",
"salt",
".",
"utils",
".",
"process",
".",
"notify_systemd",
"(",
")",
"import",
"salt",
".",
"cli",... | Start the salt minion in a subprocess.
Auto restart minion on error. | [
"Start",
"the",
"salt",
"minion",
"in",
"a",
"subprocess",
".",
"Auto",
"restart",
"minion",
"on",
"error",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/scripts.py#L181-L266 | train | Start a salt minion in a subprocess. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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 | proxy_minion_process | def proxy_minion_process(queue):
'''
Start a proxy minion process
'''
import salt.cli.daemons
import salt.utils.platform
# salt_minion spawns this function in a new process
lock = threading.RLock()
def suicide_when_without_parent(parent_pid):
'''
Have the minion suicide... | python | def proxy_minion_process(queue):
'''
Start a proxy minion process
'''
import salt.cli.daemons
import salt.utils.platform
# salt_minion spawns this function in a new process
lock = threading.RLock()
def suicide_when_without_parent(parent_pid):
'''
Have the minion suicide... | [
"def",
"proxy_minion_process",
"(",
"queue",
")",
":",
"import",
"salt",
".",
"cli",
".",
"daemons",
"import",
"salt",
".",
"utils",
".",
"platform",
"# salt_minion spawns this function in a new process",
"lock",
"=",
"threading",
".",
"RLock",
"(",
")",
"def",
... | Start a proxy minion process | [
"Start",
"a",
"proxy",
"minion",
"process"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/scripts.py#L269-L330 | train | Start a proxy minion process | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/scripts.py | salt_proxy | def salt_proxy():
'''
Start a proxy minion.
'''
import salt.cli.daemons
import salt.utils.platform
import multiprocessing
if '' in sys.path:
sys.path.remove('')
if salt.utils.platform.is_windows():
proxyminion = salt.cli.daemons.ProxyMinion()
proxyminion.start()
... | python | def salt_proxy():
'''
Start a proxy minion.
'''
import salt.cli.daemons
import salt.utils.platform
import multiprocessing
if '' in sys.path:
sys.path.remove('')
if salt.utils.platform.is_windows():
proxyminion = salt.cli.daemons.ProxyMinion()
proxyminion.start()
... | [
"def",
"salt_proxy",
"(",
")",
":",
"import",
"salt",
".",
"cli",
".",
"daemons",
"import",
"salt",
".",
"utils",
".",
"platform",
"import",
"multiprocessing",
"if",
"''",
"in",
"sys",
".",
"path",
":",
"sys",
".",
"path",
".",
"remove",
"(",
"''",
"... | Start a proxy minion. | [
"Start",
"a",
"proxy",
"minion",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/scripts.py#L333-L386 | train | Start a proxy minion. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/scripts.py | salt_syndic | def salt_syndic():
'''
Start the salt syndic.
'''
import salt.utils.process
salt.utils.process.notify_systemd()
import salt.cli.daemons
pid = os.getpid()
try:
syndic = salt.cli.daemons.Syndic()
syndic.start()
except KeyboardInterrupt:
os.kill(pid, 15) | python | def salt_syndic():
'''
Start the salt syndic.
'''
import salt.utils.process
salt.utils.process.notify_systemd()
import salt.cli.daemons
pid = os.getpid()
try:
syndic = salt.cli.daemons.Syndic()
syndic.start()
except KeyboardInterrupt:
os.kill(pid, 15) | [
"def",
"salt_syndic",
"(",
")",
":",
"import",
"salt",
".",
"utils",
".",
"process",
"salt",
".",
"utils",
".",
"process",
".",
"notify_systemd",
"(",
")",
"import",
"salt",
".",
"cli",
".",
"daemons",
"pid",
"=",
"os",
".",
"getpid",
"(",
")",
"try"... | Start the salt syndic. | [
"Start",
"the",
"salt",
"syndic",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/scripts.py#L389-L402 | train | Start the salt syndic. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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_key | def salt_key():
'''
Manage the authentication keys with salt-key.
'''
import salt.cli.key
try:
client = salt.cli.key.SaltKey()
_install_signal_handlers(client)
client.run()
except Exception as err:
sys.stderr.write("Error: {0}\n".format(err)) | python | def salt_key():
'''
Manage the authentication keys with salt-key.
'''
import salt.cli.key
try:
client = salt.cli.key.SaltKey()
_install_signal_handlers(client)
client.run()
except Exception as err:
sys.stderr.write("Error: {0}\n".format(err)) | [
"def",
"salt_key",
"(",
")",
":",
"import",
"salt",
".",
"cli",
".",
"key",
"try",
":",
"client",
"=",
"salt",
".",
"cli",
".",
"key",
".",
"SaltKey",
"(",
")",
"_install_signal_handlers",
"(",
"client",
")",
"client",
".",
"run",
"(",
")",
"except",... | Manage the authentication keys with salt-key. | [
"Manage",
"the",
"authentication",
"keys",
"with",
"salt",
"-",
"key",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/scripts.py#L405-L415 | train | Manage the authentication keys with salt - key.
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/scripts.py | salt_cp | def salt_cp():
'''
Publish commands to the salt system from the command line on the
master.
'''
import salt.cli.cp
client = salt.cli.cp.SaltCPCli()
_install_signal_handlers(client)
client.run() | python | def salt_cp():
'''
Publish commands to the salt system from the command line on the
master.
'''
import salt.cli.cp
client = salt.cli.cp.SaltCPCli()
_install_signal_handlers(client)
client.run() | [
"def",
"salt_cp",
"(",
")",
":",
"import",
"salt",
".",
"cli",
".",
"cp",
"client",
"=",
"salt",
".",
"cli",
".",
"cp",
".",
"SaltCPCli",
"(",
")",
"_install_signal_handlers",
"(",
"client",
")",
"client",
".",
"run",
"(",
")"
] | 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#L418-L426 | train | Publish commands to the salt system from the command line 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.