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/cloud/clouds/dimensiondata.py | start | def start(name, call=None):
'''
Stop a VM in DimensionData.
:param str name:
The name of the VM to stop.
CLI Example:
.. code-block:: bash
salt-cloud -a stop vm_name
'''
conn = get_conn()
node = get_node(conn, name) # pylint: disable=not-callable
log.debug('Node... | python | def start(name, call=None):
'''
Stop a VM in DimensionData.
:param str name:
The name of the VM to stop.
CLI Example:
.. code-block:: bash
salt-cloud -a stop vm_name
'''
conn = get_conn()
node = get_node(conn, name) # pylint: disable=not-callable
log.debug('Node... | [
"def",
"start",
"(",
"name",
",",
"call",
"=",
"None",
")",
":",
"conn",
"=",
"get_conn",
"(",
")",
"node",
"=",
"get_node",
"(",
"conn",
",",
"name",
")",
"# pylint: disable=not-callable",
"log",
".",
"debug",
"(",
"'Node of Cloud VM: %s'",
",",
"node",
... | Stop a VM in DimensionData.
:param str name:
The name of the VM to stop.
CLI Example:
.. code-block:: bash
salt-cloud -a stop vm_name | [
"Stop",
"a",
"VM",
"in",
"DimensionData",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/dimensiondata.py#L506-L527 | train | Stop a VM in DimensionData. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/dimensiondata.py | get_conn | def get_conn():
'''
Return a conn object for the passed VM data
'''
vm_ = get_configured_provider()
driver = get_driver(Provider.DIMENSIONDATA)
region = config.get_cloud_config_value(
'region', vm_, __opts__
)
user_id = config.get_cloud_config_value(
'user_id', vm_, __... | python | def get_conn():
'''
Return a conn object for the passed VM data
'''
vm_ = get_configured_provider()
driver = get_driver(Provider.DIMENSIONDATA)
region = config.get_cloud_config_value(
'region', vm_, __opts__
)
user_id = config.get_cloud_config_value(
'user_id', vm_, __... | [
"def",
"get_conn",
"(",
")",
":",
"vm_",
"=",
"get_configured_provider",
"(",
")",
"driver",
"=",
"get_driver",
"(",
"Provider",
".",
"DIMENSIONDATA",
")",
"region",
"=",
"config",
".",
"get_cloud_config_value",
"(",
"'region'",
",",
"vm_",
",",
"__opts__",
... | Return a conn object for the passed VM data | [
"Return",
"a",
"conn",
"object",
"for",
"the",
"passed",
"VM",
"data"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/dimensiondata.py#L530-L555 | train | Return a conn object for the passed VM data
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/dimensiondata.py | get_lb_conn | def get_lb_conn(dd_driver=None):
'''
Return a load-balancer conn object
'''
vm_ = get_configured_provider()
region = config.get_cloud_config_value(
'region', vm_, __opts__
)
user_id = config.get_cloud_config_value(
'user_id', vm_, __opts__
)
key = config.get_cloud_co... | python | def get_lb_conn(dd_driver=None):
'''
Return a load-balancer conn object
'''
vm_ = get_configured_provider()
region = config.get_cloud_config_value(
'region', vm_, __opts__
)
user_id = config.get_cloud_config_value(
'user_id', vm_, __opts__
)
key = config.get_cloud_co... | [
"def",
"get_lb_conn",
"(",
"dd_driver",
"=",
"None",
")",
":",
"vm_",
"=",
"get_configured_provider",
"(",
")",
"region",
"=",
"config",
".",
"get_cloud_config_value",
"(",
"'region'",
",",
"vm_",
",",
"__opts__",
")",
"user_id",
"=",
"config",
".",
"get_clo... | Return a load-balancer conn object | [
"Return",
"a",
"load",
"-",
"balancer",
"conn",
"object"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/dimensiondata.py#L558-L578 | train | Return a load - balancer conn object | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/dimensiondata.py | _to_event_data | def _to_event_data(obj):
'''
Convert the specified object into a form that can be serialised by msgpack as event data.
:param obj: The object to convert.
'''
if obj is None:
return None
if isinstance(obj, bool):
return obj
if isinstance(obj, int):
return obj
if ... | python | def _to_event_data(obj):
'''
Convert the specified object into a form that can be serialised by msgpack as event data.
:param obj: The object to convert.
'''
if obj is None:
return None
if isinstance(obj, bool):
return obj
if isinstance(obj, int):
return obj
if ... | [
"def",
"_to_event_data",
"(",
"obj",
")",
":",
"if",
"obj",
"is",
"None",
":",
"return",
"None",
"if",
"isinstance",
"(",
"obj",
",",
"bool",
")",
":",
"return",
"obj",
"if",
"isinstance",
"(",
"obj",
",",
"int",
")",
":",
"return",
"obj",
"if",
"i... | Convert the specified object into a form that can be serialised by msgpack as event data.
:param obj: The object to convert. | [
"Convert",
"the",
"specified",
"object",
"into",
"a",
"form",
"that",
"can",
"be",
"serialised",
"by",
"msgpack",
"as",
"event",
"data",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/dimensiondata.py#L581-L621 | train | Convert the specified object into a form that can be serialised by msgpack as event data. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/proxy/dummy.py | package_install | def package_install(name, **kwargs):
'''
Install a "package" on the REST server
'''
DETAILS = _load_state()
if kwargs.get('version', False):
version = kwargs['version']
else:
version = '1.0'
DETAILS['packages'][name] = version
_save_state(DETAILS)
return {name: versio... | python | def package_install(name, **kwargs):
'''
Install a "package" on the REST server
'''
DETAILS = _load_state()
if kwargs.get('version', False):
version = kwargs['version']
else:
version = '1.0'
DETAILS['packages'][name] = version
_save_state(DETAILS)
return {name: versio... | [
"def",
"package_install",
"(",
"name",
",",
"*",
"*",
"kwargs",
")",
":",
"DETAILS",
"=",
"_load_state",
"(",
")",
"if",
"kwargs",
".",
"get",
"(",
"'version'",
",",
"False",
")",
":",
"version",
"=",
"kwargs",
"[",
"'version'",
"]",
"else",
":",
"ve... | Install a "package" on the REST server | [
"Install",
"a",
"package",
"on",
"the",
"REST",
"server"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/dummy.py#L164-L175 | 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/dummy.py | upgrade | def upgrade():
'''
"Upgrade" packages
'''
DETAILS = _load_state()
pkgs = uptodate()
DETAILS['packages'] = pkgs
_save_state(DETAILS)
return pkgs | python | def upgrade():
'''
"Upgrade" packages
'''
DETAILS = _load_state()
pkgs = uptodate()
DETAILS['packages'] = pkgs
_save_state(DETAILS)
return pkgs | [
"def",
"upgrade",
"(",
")",
":",
"DETAILS",
"=",
"_load_state",
"(",
")",
"pkgs",
"=",
"uptodate",
"(",
")",
"DETAILS",
"[",
"'packages'",
"]",
"=",
"pkgs",
"_save_state",
"(",
"DETAILS",
")",
"return",
"pkgs"
] | "Upgrade" packages | [
"Upgrade",
"packages"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/dummy.py#L178-L186 | train | Upgrade packages | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/proxy/dummy.py | uptodate | def uptodate():
'''
Call the REST endpoint to see if the packages on the "server" are up to date.
'''
DETAILS = _load_state()
for p in DETAILS['packages']:
version_float = float(DETAILS['packages'][p])
version_float = version_float + 1.0
DETAILS['packages'][p] = six.text_type... | python | def uptodate():
'''
Call the REST endpoint to see if the packages on the "server" are up to date.
'''
DETAILS = _load_state()
for p in DETAILS['packages']:
version_float = float(DETAILS['packages'][p])
version_float = version_float + 1.0
DETAILS['packages'][p] = six.text_type... | [
"def",
"uptodate",
"(",
")",
":",
"DETAILS",
"=",
"_load_state",
"(",
")",
"for",
"p",
"in",
"DETAILS",
"[",
"'packages'",
"]",
":",
"version_float",
"=",
"float",
"(",
"DETAILS",
"[",
"'packages'",
"]",
"[",
"p",
"]",
")",
"version_float",
"=",
"versi... | Call the REST endpoint to see if the packages on the "server" are up to date. | [
"Call",
"the",
"REST",
"endpoint",
"to",
"see",
"if",
"the",
"packages",
"on",
"the",
"server",
"are",
"up",
"to",
"date",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/dummy.py#L189-L198 | train | Return a list of all packages that are up to date. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/proxy/dummy.py | package_remove | def package_remove(name):
'''
Remove a "package" on the REST server
'''
DETAILS = _load_state()
DETAILS['packages'].pop(name)
_save_state(DETAILS)
return DETAILS['packages'] | python | def package_remove(name):
'''
Remove a "package" on the REST server
'''
DETAILS = _load_state()
DETAILS['packages'].pop(name)
_save_state(DETAILS)
return DETAILS['packages'] | [
"def",
"package_remove",
"(",
"name",
")",
":",
"DETAILS",
"=",
"_load_state",
"(",
")",
"DETAILS",
"[",
"'packages'",
"]",
".",
"pop",
"(",
"name",
")",
"_save_state",
"(",
"DETAILS",
")",
"return",
"DETAILS",
"[",
"'packages'",
"]"
] | Remove a "package" on the REST server | [
"Remove",
"a",
"package",
"on",
"the",
"REST",
"server"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/dummy.py#L201-L208 | train | Remove 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/dummy.py | shutdown | def shutdown(opts):
'''
For this proxy shutdown is a no-op
'''
log.debug('dummy proxy shutdown() called...')
DETAILS = _load_state()
if 'filename' in DETAILS:
os.unlink(DETAILS['filename']) | python | def shutdown(opts):
'''
For this proxy shutdown is a no-op
'''
log.debug('dummy proxy shutdown() called...')
DETAILS = _load_state()
if 'filename' in DETAILS:
os.unlink(DETAILS['filename']) | [
"def",
"shutdown",
"(",
"opts",
")",
":",
"log",
".",
"debug",
"(",
"'dummy proxy shutdown() called...'",
")",
"DETAILS",
"=",
"_load_state",
"(",
")",
"if",
"'filename'",
"in",
"DETAILS",
":",
"os",
".",
"unlink",
"(",
"DETAILS",
"[",
"'filename'",
"]",
"... | For this proxy shutdown is a no-op | [
"For",
"this",
"proxy",
"shutdown",
"is",
"a",
"no",
"-",
"op"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/dummy.py#L228-L235 | train | This is a no - op for the proxy shutdown. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cli/support/collector.py | SupportDataCollector.open | def open(self):
'''
Opens archive.
:return:
'''
if self.__arch is not None:
raise salt.exceptions.SaltException('Archive already opened.')
self.__arch = tarfile.TarFile.bz2open(self.archive_path, 'w') | python | def open(self):
'''
Opens archive.
:return:
'''
if self.__arch is not None:
raise salt.exceptions.SaltException('Archive already opened.')
self.__arch = tarfile.TarFile.bz2open(self.archive_path, 'w') | [
"def",
"open",
"(",
"self",
")",
":",
"if",
"self",
".",
"__arch",
"is",
"not",
"None",
":",
"raise",
"salt",
".",
"exceptions",
".",
"SaltException",
"(",
"'Archive already opened.'",
")",
"self",
".",
"__arch",
"=",
"tarfile",
".",
"TarFile",
".",
"bz2... | Opens archive.
:return: | [
"Opens",
"archive",
".",
":",
"return",
":"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cli/support/collector.py#L63-L70 | train | Opens the archive. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cli/support/collector.py | SupportDataCollector.close | def close(self):
'''
Closes the archive.
:return:
'''
if self.__arch is None:
raise salt.exceptions.SaltException('Archive already closed')
self._flush_content()
self.__arch.close()
self.__arch = None | python | def close(self):
'''
Closes the archive.
:return:
'''
if self.__arch is None:
raise salt.exceptions.SaltException('Archive already closed')
self._flush_content()
self.__arch.close()
self.__arch = None | [
"def",
"close",
"(",
"self",
")",
":",
"if",
"self",
".",
"__arch",
"is",
"None",
":",
"raise",
"salt",
".",
"exceptions",
".",
"SaltException",
"(",
"'Archive already closed'",
")",
"self",
".",
"_flush_content",
"(",
")",
"self",
".",
"__arch",
".",
"c... | Closes the archive.
:return: | [
"Closes",
"the",
"archive",
".",
":",
"return",
":"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cli/support/collector.py#L72-L81 | train | Closes the archive. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cli/support/collector.py | SupportDataCollector._flush_content | def _flush_content(self):
'''
Flush content to the archive
:return:
'''
if self.__current_section is not None:
buff = BytesIO()
buff._dirty = False
for action_return in self.__current_section:
for title, ret_data in action_retur... | python | def _flush_content(self):
'''
Flush content to the archive
:return:
'''
if self.__current_section is not None:
buff = BytesIO()
buff._dirty = False
for action_return in self.__current_section:
for title, ret_data in action_retur... | [
"def",
"_flush_content",
"(",
"self",
")",
":",
"if",
"self",
".",
"__current_section",
"is",
"not",
"None",
":",
"buff",
"=",
"BytesIO",
"(",
")",
"buff",
".",
"_dirty",
"=",
"False",
"for",
"action_return",
"in",
"self",
".",
"__current_section",
":",
... | Flush content to the archive
:return: | [
"Flush",
"content",
"to",
"the",
"archive",
":",
"return",
":"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cli/support/collector.py#L83-L108 | train | Flush the content of the archive to the archive | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cli/support/collector.py | SupportDataCollector.add | def add(self, name):
'''
Start a new section.
:param name:
:return:
'''
if self.__current_section:
self._flush_content()
self.discard_current(name) | python | def add(self, name):
'''
Start a new section.
:param name:
:return:
'''
if self.__current_section:
self._flush_content()
self.discard_current(name) | [
"def",
"add",
"(",
"self",
",",
"name",
")",
":",
"if",
"self",
".",
"__current_section",
":",
"self",
".",
"_flush_content",
"(",
")",
"self",
".",
"discard_current",
"(",
"name",
")"
] | Start a new section.
:param name:
:return: | [
"Start",
"a",
"new",
"section",
".",
":",
"param",
"name",
":",
":",
"return",
":"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cli/support/collector.py#L110-L118 | train | Start a new section. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cli/support/collector.py | SupportDataCollector._printout | def _printout(self, data, output):
'''
Use salt outputter to printout content.
:return:
'''
opts = {'extension_modules': '', 'color': False}
try:
printout = salt.output.get_printout(output, opts)(data)
if printout is not None:
retu... | python | def _printout(self, data, output):
'''
Use salt outputter to printout content.
:return:
'''
opts = {'extension_modules': '', 'color': False}
try:
printout = salt.output.get_printout(output, opts)(data)
if printout is not None:
retu... | [
"def",
"_printout",
"(",
"self",
",",
"data",
",",
"output",
")",
":",
"opts",
"=",
"{",
"'extension_modules'",
":",
"''",
",",
"'color'",
":",
"False",
"}",
"try",
":",
"printout",
"=",
"salt",
".",
"output",
".",
"get_printout",
"(",
"output",
",",
... | Use salt outputter to printout content.
:return: | [
"Use",
"salt",
"outputter",
"to",
"printout",
"content",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cli/support/collector.py#L128-L151 | train | Use salt outputter to printout content. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cli/support/collector.py | SupportDataCollector.write | def write(self, title, data, output=None):
'''
Add a data to the current opened section.
:return:
'''
if not isinstance(data, (dict, list, tuple)):
data = {'raw-content': str(data)}
output = output or self.__default_outputter
if output != 'null':
... | python | def write(self, title, data, output=None):
'''
Add a data to the current opened section.
:return:
'''
if not isinstance(data, (dict, list, tuple)):
data = {'raw-content': str(data)}
output = output or self.__default_outputter
if output != 'null':
... | [
"def",
"write",
"(",
"self",
",",
"title",
",",
"data",
",",
"output",
"=",
"None",
")",
":",
"if",
"not",
"isinstance",
"(",
"data",
",",
"(",
"dict",
",",
"list",
",",
"tuple",
")",
")",
":",
"data",
"=",
"{",
"'raw-content'",
":",
"str",
"(",
... | Add a data to the current opened section.
:return: | [
"Add",
"a",
"data",
"to",
"the",
"current",
"opened",
"section",
".",
":",
"return",
":"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cli/support/collector.py#L153-L178 | train | Write a new entry to the current opened section. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cli/support/collector.py | SupportDataCollector.link | def link(self, title, path):
'''
Add a static file on the file system.
:param title:
:param path:
:return:
'''
# The filehandler needs to be explicitly passed here, so PyLint needs to accept that.
# pylint: disable=W8470
if not isinstance(path, fi... | python | def link(self, title, path):
'''
Add a static file on the file system.
:param title:
:param path:
:return:
'''
# The filehandler needs to be explicitly passed here, so PyLint needs to accept that.
# pylint: disable=W8470
if not isinstance(path, fi... | [
"def",
"link",
"(",
"self",
",",
"title",
",",
"path",
")",
":",
"# The filehandler needs to be explicitly passed here, so PyLint needs to accept that.",
"# pylint: disable=W8470",
"if",
"not",
"isinstance",
"(",
"path",
",",
"file",
")",
":",
"path",
"=",
"salt",
"."... | Add a static file on the file system.
:param title:
:param path:
:return: | [
"Add",
"a",
"static",
"file",
"on",
"the",
"file",
"system",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cli/support/collector.py#L180-L192 | train | Add a static file on the file system. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cli/support/collector.py | SaltSupport._setup_fun_config | def _setup_fun_config(self, fun_conf):
'''
Setup function configuration.
:param conf:
:return:
'''
conf = copy.deepcopy(self.config)
conf['file_client'] = 'local'
conf['fun'] = ''
conf['arg'] = []
conf['kwarg'] = {}
conf['cache_job... | python | def _setup_fun_config(self, fun_conf):
'''
Setup function configuration.
:param conf:
:return:
'''
conf = copy.deepcopy(self.config)
conf['file_client'] = 'local'
conf['fun'] = ''
conf['arg'] = []
conf['kwarg'] = {}
conf['cache_job... | [
"def",
"_setup_fun_config",
"(",
"self",
",",
"fun_conf",
")",
":",
"conf",
"=",
"copy",
".",
"deepcopy",
"(",
"self",
".",
"config",
")",
"conf",
"[",
"'file_client'",
"]",
"=",
"'local'",
"conf",
"[",
"'fun'",
"]",
"=",
"''",
"conf",
"[",
"'arg'",
... | Setup function configuration.
:param conf:
:return: | [
"Setup",
"function",
"configuration",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cli/support/collector.py#L203-L220 | train | Setup function configuration. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cli/support/collector.py | SaltSupport._get_runner | def _get_runner(self, conf):
'''
Get & setup runner.
:param conf:
:return:
'''
conf = self._setup_fun_config(copy.deepcopy(conf))
if not getattr(self, '_runner', None):
self._runner = salt.cli.support.localrunner.LocalRunner(conf)
else:
... | python | def _get_runner(self, conf):
'''
Get & setup runner.
:param conf:
:return:
'''
conf = self._setup_fun_config(copy.deepcopy(conf))
if not getattr(self, '_runner', None):
self._runner = salt.cli.support.localrunner.LocalRunner(conf)
else:
... | [
"def",
"_get_runner",
"(",
"self",
",",
"conf",
")",
":",
"conf",
"=",
"self",
".",
"_setup_fun_config",
"(",
"copy",
".",
"deepcopy",
"(",
"conf",
")",
")",
"if",
"not",
"getattr",
"(",
"self",
",",
"'_runner'",
",",
"None",
")",
":",
"self",
".",
... | Get & setup runner.
:param conf:
:return: | [
"Get",
"&",
"setup",
"runner",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cli/support/collector.py#L222-L234 | train | Get & setup runner. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cli/support/collector.py | SaltSupport._get_caller | def _get_caller(self, conf):
'''
Get & setup caller from the factory.
:param conf:
:return:
'''
conf = self._setup_fun_config(copy.deepcopy(conf))
if not getattr(self, '_caller', None):
self._caller = salt.cli.caller.Caller.factory(conf)
else:... | python | def _get_caller(self, conf):
'''
Get & setup caller from the factory.
:param conf:
:return:
'''
conf = self._setup_fun_config(copy.deepcopy(conf))
if not getattr(self, '_caller', None):
self._caller = salt.cli.caller.Caller.factory(conf)
else:... | [
"def",
"_get_caller",
"(",
"self",
",",
"conf",
")",
":",
"conf",
"=",
"self",
".",
"_setup_fun_config",
"(",
"copy",
".",
"deepcopy",
"(",
"conf",
")",
")",
"if",
"not",
"getattr",
"(",
"self",
",",
"'_caller'",
",",
"None",
")",
":",
"self",
".",
... | Get & setup caller from the factory.
:param conf:
:return: | [
"Get",
"&",
"setup",
"caller",
"from",
"the",
"factory",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cli/support/collector.py#L236-L248 | train | Get & setup caller from the factory. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cli/support/collector.py | SaltSupport._local_call | def _local_call(self, call_conf):
'''
Execute local call
'''
try:
ret = self._get_caller(call_conf).call()
except SystemExit:
ret = 'Data is not available at this moment'
self.out.error(ret)
except Exception as ex:
ret = 'Un... | python | def _local_call(self, call_conf):
'''
Execute local call
'''
try:
ret = self._get_caller(call_conf).call()
except SystemExit:
ret = 'Data is not available at this moment'
self.out.error(ret)
except Exception as ex:
ret = 'Un... | [
"def",
"_local_call",
"(",
"self",
",",
"call_conf",
")",
":",
"try",
":",
"ret",
"=",
"self",
".",
"_get_caller",
"(",
"call_conf",
")",
".",
"call",
"(",
")",
"except",
"SystemExit",
":",
"ret",
"=",
"'Data is not available at this moment'",
"self",
".",
... | Execute local call | [
"Execute",
"local",
"call"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cli/support/collector.py#L250-L264 | train | Execute local 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/cli/support/collector.py | SaltSupport._local_run | def _local_run(self, run_conf):
'''
Execute local runner
:param run_conf:
:return:
'''
try:
ret = self._get_runner(run_conf).run()
except SystemExit:
ret = 'Runner is not available at this moment'
self.out.error(ret)
ex... | python | def _local_run(self, run_conf):
'''
Execute local runner
:param run_conf:
:return:
'''
try:
ret = self._get_runner(run_conf).run()
except SystemExit:
ret = 'Runner is not available at this moment'
self.out.error(ret)
ex... | [
"def",
"_local_run",
"(",
"self",
",",
"run_conf",
")",
":",
"try",
":",
"ret",
"=",
"self",
".",
"_get_runner",
"(",
"run_conf",
")",
".",
"run",
"(",
")",
"except",
"SystemExit",
":",
"ret",
"=",
"'Runner is not available at this moment'",
"self",
".",
"... | Execute local runner
:param run_conf:
:return: | [
"Execute",
"local",
"runner"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cli/support/collector.py#L266-L282 | train | Execute local runner | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cli/support/collector.py | SaltSupport._internal_function_call | def _internal_function_call(self, call_conf):
'''
Call internal function.
:param call_conf:
:return:
'''
def stub(*args, **kwargs):
message = 'Function {} is not available'.format(call_conf['fun'])
self.out.error(message)
log.debug(
... | python | def _internal_function_call(self, call_conf):
'''
Call internal function.
:param call_conf:
:return:
'''
def stub(*args, **kwargs):
message = 'Function {} is not available'.format(call_conf['fun'])
self.out.error(message)
log.debug(
... | [
"def",
"_internal_function_call",
"(",
"self",
",",
"call_conf",
")",
":",
"def",
"stub",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"message",
"=",
"'Function {} is not available'",
".",
"format",
"(",
"call_conf",
"[",
"'fun'",
"]",
")",
"self"... | Call internal function.
:param call_conf:
:return: | [
"Call",
"internal",
"function",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cli/support/collector.py#L284-L303 | train | Internal function to call internal 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/cli/support/collector.py | SaltSupport._get_action | def _get_action(self, action_meta):
'''
Parse action and turn into a calling point.
:param action_meta:
:return:
'''
conf = {
'fun': list(action_meta.keys())[0],
'arg': [],
'kwargs': {},
}
if not len(conf['fun'].split('.... | python | def _get_action(self, action_meta):
'''
Parse action and turn into a calling point.
:param action_meta:
:return:
'''
conf = {
'fun': list(action_meta.keys())[0],
'arg': [],
'kwargs': {},
}
if not len(conf['fun'].split('.... | [
"def",
"_get_action",
"(",
"self",
",",
"action_meta",
")",
":",
"conf",
"=",
"{",
"'fun'",
":",
"list",
"(",
"action_meta",
".",
"keys",
"(",
")",
")",
"[",
"0",
"]",
",",
"'arg'",
":",
"[",
"]",
",",
"'kwargs'",
":",
"{",
"}",
",",
"}",
"if",... | Parse action and turn into a calling point.
:param action_meta:
:return: | [
"Parse",
"action",
"and",
"turn",
"into",
"a",
"calling",
"point",
".",
":",
"param",
"action_meta",
":",
":",
"return",
":"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cli/support/collector.py#L305-L327 | train | Parse action and turn into a calling point. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cli/support/collector.py | SaltSupport.collect_internal_data | def collect_internal_data(self):
'''
Dumps current running pillars, configuration etc.
:return:
'''
section = 'configuration'
self.out.put(section)
self.collector.add(section)
self.out.put('Saving config', indent=2)
self.collector.write('General Co... | python | def collect_internal_data(self):
'''
Dumps current running pillars, configuration etc.
:return:
'''
section = 'configuration'
self.out.put(section)
self.collector.add(section)
self.out.put('Saving config', indent=2)
self.collector.write('General Co... | [
"def",
"collect_internal_data",
"(",
"self",
")",
":",
"section",
"=",
"'configuration'",
"self",
".",
"out",
".",
"put",
"(",
"section",
")",
"self",
".",
"collector",
".",
"add",
"(",
"section",
")",
"self",
".",
"out",
".",
"put",
"(",
"'Saving config... | Dumps current running pillars, configuration etc.
:return: | [
"Dumps",
"current",
"running",
"pillars",
"configuration",
"etc",
".",
":",
"return",
":"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cli/support/collector.py#L329-L346 | train | Dumps current running pillars configuration etc. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cli/support/collector.py | SaltSupport._extract_return | def _extract_return(self, data):
'''
Extracts return data from the results.
:param data:
:return:
'''
if isinstance(data, dict):
data = data.get('return', data)
return data | python | def _extract_return(self, data):
'''
Extracts return data from the results.
:param data:
:return:
'''
if isinstance(data, dict):
data = data.get('return', data)
return data | [
"def",
"_extract_return",
"(",
"self",
",",
"data",
")",
":",
"if",
"isinstance",
"(",
"data",
",",
"dict",
")",
":",
"data",
"=",
"data",
".",
"get",
"(",
"'return'",
",",
"data",
")",
"return",
"data"
] | Extracts return data from the results.
:param data:
:return: | [
"Extracts",
"return",
"data",
"from",
"the",
"results",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cli/support/collector.py#L348-L358 | train | Extracts return data from the results. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cli/support/collector.py | SaltSupport.collect_local_data | def collect_local_data(self, profile=None, profile_source=None):
'''
Collects master system data.
:return:
'''
def call(func, *args, **kwargs):
'''
Call wrapper for templates
:param func:
:return:
'''
return ... | python | def collect_local_data(self, profile=None, profile_source=None):
'''
Collects master system data.
:return:
'''
def call(func, *args, **kwargs):
'''
Call wrapper for templates
:param func:
:return:
'''
return ... | [
"def",
"collect_local_data",
"(",
"self",
",",
"profile",
"=",
"None",
",",
"profile_source",
"=",
"None",
")",
":",
"def",
"call",
"(",
"func",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"'''\n Call wrapper for templates\n :param... | Collects master system data.
:return: | [
"Collects",
"master",
"system",
"data",
".",
":",
"return",
":"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cli/support/collector.py#L360-L407 | train | Collect master system 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/cli/support/collector.py | SaltSupport._get_action_type | def _get_action_type(self, action):
'''
Get action type.
:param action:
:return:
'''
action_name = next(iter(action or {'': None}))
if ':' not in action_name:
action_name = '{}:{}'.format(self.CALL_TYPE, action_name)
return action_name.split('... | python | def _get_action_type(self, action):
'''
Get action type.
:param action:
:return:
'''
action_name = next(iter(action or {'': None}))
if ':' not in action_name:
action_name = '{}:{}'.format(self.CALL_TYPE, action_name)
return action_name.split('... | [
"def",
"_get_action_type",
"(",
"self",
",",
"action",
")",
":",
"action_name",
"=",
"next",
"(",
"iter",
"(",
"action",
"or",
"{",
"''",
":",
"None",
"}",
")",
")",
"if",
"':'",
"not",
"in",
"action_name",
":",
"action_name",
"=",
"'{}:{}'",
".",
"f... | Get action type.
:param action:
:return: | [
"Get",
"action",
"type",
".",
":",
"param",
"action",
":",
":",
"return",
":"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cli/support/collector.py#L409-L419 | train | Get action 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/cli/support/collector.py | SaltSupport._cleanup | def _cleanup(self):
'''
Cleanup if crash/exception
:return:
'''
if (hasattr(self, 'config')
and self.config.get('support_archive')
and os.path.exists(self.config['support_archive'])):
self.out.warning('Terminated earlier, cleaning up')
... | python | def _cleanup(self):
'''
Cleanup if crash/exception
:return:
'''
if (hasattr(self, 'config')
and self.config.get('support_archive')
and os.path.exists(self.config['support_archive'])):
self.out.warning('Terminated earlier, cleaning up')
... | [
"def",
"_cleanup",
"(",
"self",
")",
":",
"if",
"(",
"hasattr",
"(",
"self",
",",
"'config'",
")",
"and",
"self",
".",
"config",
".",
"get",
"(",
"'support_archive'",
")",
"and",
"os",
".",
"path",
".",
"exists",
"(",
"self",
".",
"config",
"[",
"'... | Cleanup if crash/exception
:return: | [
"Cleanup",
"if",
"crash",
"/",
"exception",
":",
"return",
":"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cli/support/collector.py#L421-L434 | train | Cleanup the archive file if it exists. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cli/support/collector.py | SaltSupport._check_existing_archive | def _check_existing_archive(self):
'''
Check if archive exists or not. If exists and --force was not specified,
bail out. Otherwise remove it and move on.
:return:
'''
if os.path.exists(self.config['support_archive']):
if self.config['support_archive_force_ov... | python | def _check_existing_archive(self):
'''
Check if archive exists or not. If exists and --force was not specified,
bail out. Otherwise remove it and move on.
:return:
'''
if os.path.exists(self.config['support_archive']):
if self.config['support_archive_force_ov... | [
"def",
"_check_existing_archive",
"(",
"self",
")",
":",
"if",
"os",
".",
"path",
".",
"exists",
"(",
"self",
".",
"config",
"[",
"'support_archive'",
"]",
")",
":",
"if",
"self",
".",
"config",
"[",
"'support_archive_force_overwrite'",
"]",
":",
"self",
"... | Check if archive exists or not. If exists and --force was not specified,
bail out. Otherwise remove it and move on.
:return: | [
"Check",
"if",
"archive",
"exists",
"or",
"not",
".",
"If",
"exists",
"and",
"--",
"force",
"was",
"not",
"specified",
"bail",
"out",
".",
"Otherwise",
"remove",
"it",
"and",
"move",
"on",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cli/support/collector.py#L436-L458 | train | Check if an existing archive exists or not. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/spm/__init__.py | SPMClient.run | def run(self, args):
'''
Run the SPM command
'''
command = args[0]
try:
if command == 'install':
self._install(args)
elif command == 'local':
self._local(args)
elif command == 'repo':
self._repo(a... | python | def run(self, args):
'''
Run the SPM command
'''
command = args[0]
try:
if command == 'install':
self._install(args)
elif command == 'local':
self._local(args)
elif command == 'repo':
self._repo(a... | [
"def",
"run",
"(",
"self",
",",
"args",
")",
":",
"command",
"=",
"args",
"[",
"0",
"]",
"try",
":",
"if",
"command",
"==",
"'install'",
":",
"self",
".",
"_install",
"(",
"args",
")",
"elif",
"command",
"==",
"'local'",
":",
"self",
".",
"_local",... | Run the SPM command | [
"Run",
"the",
"SPM",
"command"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/spm/__init__.py#L118-L149 | train | Run the SPM 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/spm/__init__.py | SPMClient._list | def _list(self, args):
'''
Process local commands
'''
args.pop(0)
command = args[0]
if command == 'packages':
self._list_packages(args)
elif command == 'files':
self._list_files(args)
elif command == 'repos':
self._repo_... | python | def _list(self, args):
'''
Process local commands
'''
args.pop(0)
command = args[0]
if command == 'packages':
self._list_packages(args)
elif command == 'files':
self._list_files(args)
elif command == 'repos':
self._repo_... | [
"def",
"_list",
"(",
"self",
",",
"args",
")",
":",
"args",
".",
"pop",
"(",
"0",
")",
"command",
"=",
"args",
"[",
"0",
"]",
"if",
"command",
"==",
"'packages'",
":",
"self",
".",
"_list_packages",
"(",
"args",
")",
"elif",
"command",
"==",
"'file... | Process local commands | [
"Process",
"local",
"commands"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/spm/__init__.py#L163-L176 | train | List local files packages or repos | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/spm/__init__.py | SPMClient._local | def _local(self, args):
'''
Process local commands
'''
args.pop(0)
command = args[0]
if command == 'install':
self._local_install(args)
elif command == 'files':
self._local_list_files(args)
elif command == 'info':
self._... | python | def _local(self, args):
'''
Process local commands
'''
args.pop(0)
command = args[0]
if command == 'install':
self._local_install(args)
elif command == 'files':
self._local_list_files(args)
elif command == 'info':
self._... | [
"def",
"_local",
"(",
"self",
",",
"args",
")",
":",
"args",
".",
"pop",
"(",
"0",
")",
"command",
"=",
"args",
"[",
"0",
"]",
"if",
"command",
"==",
"'install'",
":",
"self",
".",
"_local_install",
"(",
"args",
")",
"elif",
"command",
"==",
"'file... | Process local commands | [
"Process",
"local",
"commands"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/spm/__init__.py#L178-L191 | train | Process local commands | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/spm/__init__.py | SPMClient._repo | def _repo(self, args):
'''
Process repo commands
'''
args.pop(0)
command = args[0]
if command == 'list':
self._repo_list(args)
elif command == 'packages':
self._repo_packages(args)
elif command == 'search':
self._repo_pa... | python | def _repo(self, args):
'''
Process repo commands
'''
args.pop(0)
command = args[0]
if command == 'list':
self._repo_list(args)
elif command == 'packages':
self._repo_packages(args)
elif command == 'search':
self._repo_pa... | [
"def",
"_repo",
"(",
"self",
",",
"args",
")",
":",
"args",
".",
"pop",
"(",
"0",
")",
"command",
"=",
"args",
"[",
"0",
"]",
"if",
"command",
"==",
"'list'",
":",
"self",
".",
"_repo_list",
"(",
"args",
")",
"elif",
"command",
"==",
"'packages'",
... | Process repo commands | [
"Process",
"repo",
"commands"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/spm/__init__.py#L193-L210 | train | Process repo commands
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/spm/__init__.py | SPMClient._repo_packages | def _repo_packages(self, args, search=False):
'''
List packages for one or more configured repos
'''
packages = []
repo_metadata = self._get_repo_metadata()
for repo in repo_metadata:
for pkg in repo_metadata[repo]['packages']:
if args[1] in pk... | python | def _repo_packages(self, args, search=False):
'''
List packages for one or more configured repos
'''
packages = []
repo_metadata = self._get_repo_metadata()
for repo in repo_metadata:
for pkg in repo_metadata[repo]['packages']:
if args[1] in pk... | [
"def",
"_repo_packages",
"(",
"self",
",",
"args",
",",
"search",
"=",
"False",
")",
":",
"packages",
"=",
"[",
"]",
"repo_metadata",
"=",
"self",
".",
"_get_repo_metadata",
"(",
")",
"for",
"repo",
"in",
"repo_metadata",
":",
"for",
"pkg",
"in",
"repo_m... | List packages for one or more configured repos | [
"List",
"packages",
"for",
"one",
"or",
"more",
"configured",
"repos"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/spm/__init__.py#L212-L228 | train | List packages for one or more configured repos
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/spm/__init__.py | SPMClient._repo_list | def _repo_list(self, args):
'''
List configured repos
This can be called either as a ``repo`` command or a ``list`` command
'''
repo_metadata = self._get_repo_metadata()
for repo in repo_metadata:
self.ui.status(repo) | python | def _repo_list(self, args):
'''
List configured repos
This can be called either as a ``repo`` command or a ``list`` command
'''
repo_metadata = self._get_repo_metadata()
for repo in repo_metadata:
self.ui.status(repo) | [
"def",
"_repo_list",
"(",
"self",
",",
"args",
")",
":",
"repo_metadata",
"=",
"self",
".",
"_get_repo_metadata",
"(",
")",
"for",
"repo",
"in",
"repo_metadata",
":",
"self",
".",
"ui",
".",
"status",
"(",
"repo",
")"
] | List configured repos
This can be called either as a ``repo`` command or a ``list`` command | [
"List",
"configured",
"repos"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/spm/__init__.py#L230-L238 | train | List configured repos
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/spm/__init__.py | SPMClient._install | def _install(self, args):
'''
Install a package from a repo
'''
if len(args) < 2:
raise SPMInvocationError('A package must be specified')
caller_opts = self.opts.copy()
caller_opts['file_client'] = 'local'
self.caller = salt.client.Caller(mopts=caller... | python | def _install(self, args):
'''
Install a package from a repo
'''
if len(args) < 2:
raise SPMInvocationError('A package must be specified')
caller_opts = self.opts.copy()
caller_opts['file_client'] = 'local'
self.caller = salt.client.Caller(mopts=caller... | [
"def",
"_install",
"(",
"self",
",",
"args",
")",
":",
"if",
"len",
"(",
"args",
")",
"<",
"2",
":",
"raise",
"SPMInvocationError",
"(",
"'A package must be specified'",
")",
"caller_opts",
"=",
"self",
".",
"opts",
".",
"copy",
"(",
")",
"caller_opts",
... | Install a package from a repo | [
"Install",
"a",
"package",
"from",
"a",
"repo"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/spm/__init__.py#L240-L380 | train | Install a package from a repo | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/spm/__init__.py | SPMClient._local_install | def _local_install(self, args, pkg_name=None):
'''
Install a package from a file
'''
if len(args) < 2:
raise SPMInvocationError('A package file must be specified')
self._install(args) | python | def _local_install(self, args, pkg_name=None):
'''
Install a package from a file
'''
if len(args) < 2:
raise SPMInvocationError('A package file must be specified')
self._install(args) | [
"def",
"_local_install",
"(",
"self",
",",
"args",
",",
"pkg_name",
"=",
"None",
")",
":",
"if",
"len",
"(",
"args",
")",
"<",
"2",
":",
"raise",
"SPMInvocationError",
"(",
"'A package file must be specified'",
")",
"self",
".",
"_install",
"(",
"args",
")... | Install a package from a file | [
"Install",
"a",
"package",
"from",
"a",
"file"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/spm/__init__.py#L382-L389 | train | Install a package from a file
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/spm/__init__.py | SPMClient._check_all_deps | def _check_all_deps(self, pkg_name=None, pkg_file=None, formula_def=None):
'''
Starting with one package, check all packages for dependencies
'''
if pkg_file and not os.path.exists(pkg_file):
raise SPMInvocationError('Package file {0} not found'.format(pkg_file))
sel... | python | def _check_all_deps(self, pkg_name=None, pkg_file=None, formula_def=None):
'''
Starting with one package, check all packages for dependencies
'''
if pkg_file and not os.path.exists(pkg_file):
raise SPMInvocationError('Package file {0} not found'.format(pkg_file))
sel... | [
"def",
"_check_all_deps",
"(",
"self",
",",
"pkg_name",
"=",
"None",
",",
"pkg_file",
"=",
"None",
",",
"formula_def",
"=",
"None",
")",
":",
"if",
"pkg_file",
"and",
"not",
"os",
".",
"path",
".",
"exists",
"(",
"pkg_file",
")",
":",
"raise",
"SPMInvo... | Starting with one package, check all packages for dependencies | [
"Starting",
"with",
"one",
"package",
"check",
"all",
"packages",
"for",
"dependencies"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/spm/__init__.py#L391-L463 | train | Checks to see if a package is installed and if so checks if all dependencies are needed. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/spm/__init__.py | SPMClient._install_indv_pkg | def _install_indv_pkg(self, pkg_name, pkg_file):
'''
Install one individual package
'''
self.ui.status('... installing {0}'.format(pkg_name))
formula_tar = tarfile.open(pkg_file, 'r:bz2')
formula_ref = formula_tar.extractfile('{0}/FORMULA'.format(pkg_name))
formul... | python | def _install_indv_pkg(self, pkg_name, pkg_file):
'''
Install one individual package
'''
self.ui.status('... installing {0}'.format(pkg_name))
formula_tar = tarfile.open(pkg_file, 'r:bz2')
formula_ref = formula_tar.extractfile('{0}/FORMULA'.format(pkg_name))
formul... | [
"def",
"_install_indv_pkg",
"(",
"self",
",",
"pkg_name",
",",
"pkg_file",
")",
":",
"self",
".",
"ui",
".",
"status",
"(",
"'... installing {0}'",
".",
"format",
"(",
"pkg_name",
")",
")",
"formula_tar",
"=",
"tarfile",
".",
"open",
"(",
"pkg_file",
",",
... | Install one individual package | [
"Install",
"one",
"individual",
"package"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/spm/__init__.py#L465-L567 | train | Install one individual package | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/spm/__init__.py | SPMClient._resolve_deps | def _resolve_deps(self, formula_def):
'''
Return a list of packages which need to be installed, to resolve all
dependencies
'''
pkg_info = self.pkgdb['{0}.info'.format(self.db_prov)](formula_def['name'])
if not isinstance(pkg_info, dict):
pkg_info = {}
... | python | def _resolve_deps(self, formula_def):
'''
Return a list of packages which need to be installed, to resolve all
dependencies
'''
pkg_info = self.pkgdb['{0}.info'.format(self.db_prov)](formula_def['name'])
if not isinstance(pkg_info, dict):
pkg_info = {}
... | [
"def",
"_resolve_deps",
"(",
"self",
",",
"formula_def",
")",
":",
"pkg_info",
"=",
"self",
".",
"pkgdb",
"[",
"'{0}.info'",
".",
"format",
"(",
"self",
".",
"db_prov",
")",
"]",
"(",
"formula_def",
"[",
"'name'",
"]",
")",
"if",
"not",
"isinstance",
"... | Return a list of packages which need to be installed, to resolve all
dependencies | [
"Return",
"a",
"list",
"of",
"packages",
"which",
"need",
"to",
"be",
"installed",
"to",
"resolve",
"all",
"dependencies"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/spm/__init__.py#L569-L618 | train | Returns a list of packages which need to be installed to resolve all
dependencies | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/spm/__init__.py | SPMClient._traverse_repos | def _traverse_repos(self, callback, repo_name=None):
'''
Traverse through all repo files and apply the functionality provided in
the callback to them
'''
repo_files = []
if os.path.exists(self.opts['spm_repos_config']):
repo_files.append(self.opts['spm_repos_c... | python | def _traverse_repos(self, callback, repo_name=None):
'''
Traverse through all repo files and apply the functionality provided in
the callback to them
'''
repo_files = []
if os.path.exists(self.opts['spm_repos_config']):
repo_files.append(self.opts['spm_repos_c... | [
"def",
"_traverse_repos",
"(",
"self",
",",
"callback",
",",
"repo_name",
"=",
"None",
")",
":",
"repo_files",
"=",
"[",
"]",
"if",
"os",
".",
"path",
".",
"exists",
"(",
"self",
".",
"opts",
"[",
"'spm_repos_config'",
"]",
")",
":",
"repo_files",
".",... | Traverse through all repo files and apply the functionality provided in
the callback to them | [
"Traverse",
"through",
"all",
"repo",
"files",
"and",
"apply",
"the",
"functionality",
"provided",
"in",
"the",
"callback",
"to",
"them"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/spm/__init__.py#L620-L644 | train | Traverse through all repo files and apply the functionality provided in
the callback to them | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/spm/__init__.py | SPMClient._query_http | def _query_http(self, dl_path, repo_info):
'''
Download files via http
'''
query = None
response = None
try:
if 'username' in repo_info:
try:
if 'password' in repo_info:
query = http.query(
... | python | def _query_http(self, dl_path, repo_info):
'''
Download files via http
'''
query = None
response = None
try:
if 'username' in repo_info:
try:
if 'password' in repo_info:
query = http.query(
... | [
"def",
"_query_http",
"(",
"self",
",",
"dl_path",
",",
"repo_info",
")",
":",
"query",
"=",
"None",
"response",
"=",
"None",
"try",
":",
"if",
"'username'",
"in",
"repo_info",
":",
"try",
":",
"if",
"'password'",
"in",
"repo_info",
":",
"query",
"=",
... | Download files via http | [
"Download",
"files",
"via",
"http"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/spm/__init__.py#L646-L683 | train | Download files via http and return the response. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/spm/__init__.py | SPMClient._download_repo_metadata | def _download_repo_metadata(self, args):
'''
Connect to all repos and download metadata
'''
cache = salt.cache.Cache(self.opts, self.opts['spm_cache_dir'])
def _update_metadata(repo, repo_info):
dl_path = '{0}/SPM-METADATA'.format(repo_info['url'])
if dl_... | python | def _download_repo_metadata(self, args):
'''
Connect to all repos and download metadata
'''
cache = salt.cache.Cache(self.opts, self.opts['spm_cache_dir'])
def _update_metadata(repo, repo_info):
dl_path = '{0}/SPM-METADATA'.format(repo_info['url'])
if dl_... | [
"def",
"_download_repo_metadata",
"(",
"self",
",",
"args",
")",
":",
"cache",
"=",
"salt",
".",
"cache",
".",
"Cache",
"(",
"self",
".",
"opts",
",",
"self",
".",
"opts",
"[",
"'spm_cache_dir'",
"]",
")",
"def",
"_update_metadata",
"(",
"repo",
",",
"... | Connect to all repos and download metadata | [
"Connect",
"to",
"all",
"repos",
"and",
"download",
"metadata"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/spm/__init__.py#L685-L703 | train | Connect to all repos and download metadata
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/spm/__init__.py | SPMClient._get_repo_metadata | def _get_repo_metadata(self):
'''
Return cached repo metadata
'''
cache = salt.cache.Cache(self.opts, self.opts['spm_cache_dir'])
metadata = {}
def _read_metadata(repo, repo_info):
if cache.updated('.', repo) is None:
log.warning('Updating rep... | python | def _get_repo_metadata(self):
'''
Return cached repo metadata
'''
cache = salt.cache.Cache(self.opts, self.opts['spm_cache_dir'])
metadata = {}
def _read_metadata(repo, repo_info):
if cache.updated('.', repo) is None:
log.warning('Updating rep... | [
"def",
"_get_repo_metadata",
"(",
"self",
")",
":",
"cache",
"=",
"salt",
".",
"cache",
".",
"Cache",
"(",
"self",
".",
"opts",
",",
"self",
".",
"opts",
"[",
"'spm_cache_dir'",
"]",
")",
"metadata",
"=",
"{",
"}",
"def",
"_read_metadata",
"(",
"repo",... | Return cached repo metadata | [
"Return",
"cached",
"repo",
"metadata"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/spm/__init__.py#L705-L723 | train | Get the repo metadata | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/spm/__init__.py | SPMClient._create_repo | def _create_repo(self, args):
'''
Scan a directory and create an SPM-METADATA file which describes
all of the SPM files in that directory.
'''
if len(args) < 2:
raise SPMInvocationError('A path to a directory must be specified')
if args[1] == '.':
... | python | def _create_repo(self, args):
'''
Scan a directory and create an SPM-METADATA file which describes
all of the SPM files in that directory.
'''
if len(args) < 2:
raise SPMInvocationError('A path to a directory must be specified')
if args[1] == '.':
... | [
"def",
"_create_repo",
"(",
"self",
",",
"args",
")",
":",
"if",
"len",
"(",
"args",
")",
"<",
"2",
":",
"raise",
"SPMInvocationError",
"(",
"'A path to a directory must be specified'",
")",
"if",
"args",
"[",
"1",
"]",
"==",
"'.'",
":",
"repo_path",
"=",
... | Scan a directory and create an SPM-METADATA file which describes
all of the SPM files in that directory. | [
"Scan",
"a",
"directory",
"and",
"create",
"an",
"SPM",
"-",
"METADATA",
"file",
"which",
"describes",
"all",
"of",
"the",
"SPM",
"files",
"in",
"that",
"directory",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/spm/__init__.py#L725-L832 | train | Create a repository for all the SPM files in that directory and create a list of all the SPM - METADATA files. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/spm/__init__.py | SPMClient._remove | def _remove(self, args):
'''
Remove a package
'''
if len(args) < 2:
raise SPMInvocationError('A package must be specified')
packages = args[1:]
msg = 'Removing packages:\n\t{0}'.format('\n\t'.join(packages))
if not self.opts['assume_yes']:
... | python | def _remove(self, args):
'''
Remove a package
'''
if len(args) < 2:
raise SPMInvocationError('A package must be specified')
packages = args[1:]
msg = 'Removing packages:\n\t{0}'.format('\n\t'.join(packages))
if not self.opts['assume_yes']:
... | [
"def",
"_remove",
"(",
"self",
",",
"args",
")",
":",
"if",
"len",
"(",
"args",
")",
"<",
"2",
":",
"raise",
"SPMInvocationError",
"(",
"'A package must be specified'",
")",
"packages",
"=",
"args",
"[",
"1",
":",
"]",
"msg",
"=",
"'Removing packages:\\n\\... | Remove a package | [
"Remove",
"a",
"package"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/spm/__init__.py#L834-L884 | train | Remove a package from the database. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/spm/__init__.py | SPMClient._verbose | def _verbose(self, msg, level=log.debug):
'''
Display verbose information
'''
if self.opts.get('verbose', False) is True:
self.ui.status(msg)
level(msg) | python | def _verbose(self, msg, level=log.debug):
'''
Display verbose information
'''
if self.opts.get('verbose', False) is True:
self.ui.status(msg)
level(msg) | [
"def",
"_verbose",
"(",
"self",
",",
"msg",
",",
"level",
"=",
"log",
".",
"debug",
")",
":",
"if",
"self",
".",
"opts",
".",
"get",
"(",
"'verbose'",
",",
"False",
")",
"is",
"True",
":",
"self",
".",
"ui",
".",
"status",
"(",
"msg",
")",
"lev... | Display verbose information | [
"Display",
"verbose",
"information"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/spm/__init__.py#L886-L892 | train | Display verbose information | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/spm/__init__.py | SPMClient._local_info | def _local_info(self, args):
'''
List info for a package file
'''
if len(args) < 2:
raise SPMInvocationError('A package filename must be specified')
pkg_file = args[1]
if not os.path.exists(pkg_file):
raise SPMInvocationError('Package file {0} no... | python | def _local_info(self, args):
'''
List info for a package file
'''
if len(args) < 2:
raise SPMInvocationError('A package filename must be specified')
pkg_file = args[1]
if not os.path.exists(pkg_file):
raise SPMInvocationError('Package file {0} no... | [
"def",
"_local_info",
"(",
"self",
",",
"args",
")",
":",
"if",
"len",
"(",
"args",
")",
"<",
"2",
":",
"raise",
"SPMInvocationError",
"(",
"'A package filename must be specified'",
")",
"pkg_file",
"=",
"args",
"[",
"1",
"]",
"if",
"not",
"os",
".",
"pa... | List info for a package file | [
"List",
"info",
"for",
"a",
"package",
"file"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/spm/__init__.py#L894-L915 | train | Get info for a local package 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/spm/__init__.py | SPMClient._info | def _info(self, args):
'''
List info for a package
'''
if len(args) < 2:
raise SPMInvocationError('A package must be specified')
package = args[1]
pkg_info = self._pkgdb_fun('info', package, self.db_conn)
if pkg_info is None:
raise SPMPac... | python | def _info(self, args):
'''
List info for a package
'''
if len(args) < 2:
raise SPMInvocationError('A package must be specified')
package = args[1]
pkg_info = self._pkgdb_fun('info', package, self.db_conn)
if pkg_info is None:
raise SPMPac... | [
"def",
"_info",
"(",
"self",
",",
"args",
")",
":",
"if",
"len",
"(",
"args",
")",
"<",
"2",
":",
"raise",
"SPMInvocationError",
"(",
"'A package must be specified'",
")",
"package",
"=",
"args",
"[",
"1",
"]",
"pkg_info",
"=",
"self",
".",
"_pkgdb_fun",... | List info for a package | [
"List",
"info",
"for",
"a",
"package"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/spm/__init__.py#L917-L929 | train | Show info for a package | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/spm/__init__.py | SPMClient._get_info | def _get_info(self, formula_def):
'''
Get package info
'''
fields = (
'name',
'os',
'os_family',
'release',
'version',
'dependencies',
'os_dependencies',
'os_family_dependencies',
... | python | def _get_info(self, formula_def):
'''
Get package info
'''
fields = (
'name',
'os',
'os_family',
'release',
'version',
'dependencies',
'os_dependencies',
'os_family_dependencies',
... | [
"def",
"_get_info",
"(",
"self",
",",
"formula_def",
")",
":",
"fields",
"=",
"(",
"'name'",
",",
"'os'",
",",
"'os_family'",
",",
"'release'",
",",
"'version'",
",",
"'dependencies'",
",",
"'os_dependencies'",
",",
"'os_family_dependencies'",
",",
"'summary'",
... | Get package info | [
"Get",
"package",
"info"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/spm/__init__.py#L931-L965 | train | Get package info | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/spm/__init__.py | SPMClient._local_list_files | def _local_list_files(self, args):
'''
List files for a package file
'''
if len(args) < 2:
raise SPMInvocationError('A package filename must be specified')
pkg_file = args[1]
if not os.path.exists(pkg_file):
raise SPMPackageError('Package file {0}... | python | def _local_list_files(self, args):
'''
List files for a package file
'''
if len(args) < 2:
raise SPMInvocationError('A package filename must be specified')
pkg_file = args[1]
if not os.path.exists(pkg_file):
raise SPMPackageError('Package file {0}... | [
"def",
"_local_list_files",
"(",
"self",
",",
"args",
")",
":",
"if",
"len",
"(",
"args",
")",
"<",
"2",
":",
"raise",
"SPMInvocationError",
"(",
"'A package filename must be specified'",
")",
"pkg_file",
"=",
"args",
"[",
"1",
"]",
"if",
"not",
"os",
".",... | List files for a package file | [
"List",
"files",
"for",
"a",
"package",
"file"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/spm/__init__.py#L967-L981 | train | List files for a package 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/spm/__init__.py | SPMClient._list_packages | def _list_packages(self, args):
'''
List files for an installed package
'''
packages = self._pkgdb_fun('list_packages', self.db_conn)
for package in packages:
if self.opts['verbose']:
status_msg = ','.join(package)
else:
sta... | python | def _list_packages(self, args):
'''
List files for an installed package
'''
packages = self._pkgdb_fun('list_packages', self.db_conn)
for package in packages:
if self.opts['verbose']:
status_msg = ','.join(package)
else:
sta... | [
"def",
"_list_packages",
"(",
"self",
",",
"args",
")",
":",
"packages",
"=",
"self",
".",
"_pkgdb_fun",
"(",
"'list_packages'",
",",
"self",
".",
"db_conn",
")",
"for",
"package",
"in",
"packages",
":",
"if",
"self",
".",
"opts",
"[",
"'verbose'",
"]",
... | List files for an installed package | [
"List",
"files",
"for",
"an",
"installed",
"package"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/spm/__init__.py#L983-L993 | train | List packages for an installed package
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/spm/__init__.py | SPMClient._list_files | def _list_files(self, args):
'''
List files for an installed package
'''
if len(args) < 2:
raise SPMInvocationError('A package name must be specified')
package = args[-1]
files = self._pkgdb_fun('list_files', package, self.db_conn)
if files is None:
... | python | def _list_files(self, args):
'''
List files for an installed package
'''
if len(args) < 2:
raise SPMInvocationError('A package name must be specified')
package = args[-1]
files = self._pkgdb_fun('list_files', package, self.db_conn)
if files is None:
... | [
"def",
"_list_files",
"(",
"self",
",",
"args",
")",
":",
"if",
"len",
"(",
"args",
")",
"<",
"2",
":",
"raise",
"SPMInvocationError",
"(",
"'A package name must be specified'",
")",
"package",
"=",
"args",
"[",
"-",
"1",
"]",
"files",
"=",
"self",
".",
... | List files for an installed package | [
"List",
"files",
"for",
"an",
"installed",
"package"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/spm/__init__.py#L995-L1013 | train | List files for an installed package | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/spm/__init__.py | SPMClient._build | def _build(self, args):
'''
Build a package
'''
if len(args) < 2:
raise SPMInvocationError('A path to a formula must be specified')
self.abspath = args[1].rstrip('/')
comps = self.abspath.split('/')
self.relpath = comps[-1]
formula_path = '{0... | python | def _build(self, args):
'''
Build a package
'''
if len(args) < 2:
raise SPMInvocationError('A path to a formula must be specified')
self.abspath = args[1].rstrip('/')
comps = self.abspath.split('/')
self.relpath = comps[-1]
formula_path = '{0... | [
"def",
"_build",
"(",
"self",
",",
"args",
")",
":",
"if",
"len",
"(",
"args",
")",
"<",
"2",
":",
"raise",
"SPMInvocationError",
"(",
"'A path to a formula must be specified'",
")",
"self",
".",
"abspath",
"=",
"args",
"[",
"1",
"]",
".",
"rstrip",
"(",... | Build a package | [
"Build",
"a",
"package"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/spm/__init__.py#L1015-L1077 | train | Build a package and return the object. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/spm/__init__.py | SPMClient._exclude | def _exclude(self, member):
'''
Exclude based on opts
'''
if isinstance(member, string_types):
return None
for item in self.opts['spm_build_exclude']:
if member.name.startswith('{0}/{1}'.format(self.formula_conf['name'], item)):
return Non... | python | def _exclude(self, member):
'''
Exclude based on opts
'''
if isinstance(member, string_types):
return None
for item in self.opts['spm_build_exclude']:
if member.name.startswith('{0}/{1}'.format(self.formula_conf['name'], item)):
return Non... | [
"def",
"_exclude",
"(",
"self",
",",
"member",
")",
":",
"if",
"isinstance",
"(",
"member",
",",
"string_types",
")",
":",
"return",
"None",
"for",
"item",
"in",
"self",
".",
"opts",
"[",
"'spm_build_exclude'",
"]",
":",
"if",
"member",
".",
"name",
".... | Exclude based on opts | [
"Exclude",
"based",
"on",
"opts"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/spm/__init__.py#L1079-L1091 | train | Exclude based on opts
Exclude based on opts
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/spm/__init__.py | SPMClient._render | def _render(self, data, formula_def):
'''
Render a [pre|post]_local_state or [pre|post]_tgt_state script
'''
# FORMULA can contain a renderer option
renderer = formula_def.get('renderer', self.opts.get('renderer', 'jinja|yaml'))
rend = salt.loader.render(self.opts, {})
... | python | def _render(self, data, formula_def):
'''
Render a [pre|post]_local_state or [pre|post]_tgt_state script
'''
# FORMULA can contain a renderer option
renderer = formula_def.get('renderer', self.opts.get('renderer', 'jinja|yaml'))
rend = salt.loader.render(self.opts, {})
... | [
"def",
"_render",
"(",
"self",
",",
"data",
",",
"formula_def",
")",
":",
"# FORMULA can contain a renderer option",
"renderer",
"=",
"formula_def",
".",
"get",
"(",
"'renderer'",
",",
"self",
".",
"opts",
".",
"get",
"(",
"'renderer'",
",",
"'jinja|yaml'",
")... | Render a [pre|post]_local_state or [pre|post]_tgt_state script | [
"Render",
"a",
"[",
"pre|post",
"]",
"_local_state",
"or",
"[",
"pre|post",
"]",
"_tgt_state",
"script"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/spm/__init__.py#L1093-L1112 | train | Render a formula_def | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/boto_sqs.py | _preprocess_attributes | def _preprocess_attributes(attributes):
'''
Pre-process incoming queue attributes before setting them
'''
if isinstance(attributes, six.string_types):
attributes = salt.utils.json.loads(attributes)
def stringified(val):
# Some attributes take full json policy documents, but they tak... | python | def _preprocess_attributes(attributes):
'''
Pre-process incoming queue attributes before setting them
'''
if isinstance(attributes, six.string_types):
attributes = salt.utils.json.loads(attributes)
def stringified(val):
# Some attributes take full json policy documents, but they tak... | [
"def",
"_preprocess_attributes",
"(",
"attributes",
")",
":",
"if",
"isinstance",
"(",
"attributes",
",",
"six",
".",
"string_types",
")",
":",
"attributes",
"=",
"salt",
".",
"utils",
".",
"json",
".",
"loads",
"(",
"attributes",
")",
"def",
"stringified",
... | Pre-process incoming queue attributes before setting them | [
"Pre",
"-",
"process",
"incoming",
"queue",
"attributes",
"before",
"setting",
"them"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_sqs.py#L88-L104 | train | Pre - process incoming queue attributes before setting them
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/boto_sqs.py | exists | def exists(name, region=None, key=None, keyid=None, profile=None):
'''
Check to see if a queue exists.
CLI Example:
.. code-block:: bash
salt myminion boto_sqs.exists myqueue region=us-east-1
'''
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
try:
... | python | def exists(name, region=None, key=None, keyid=None, profile=None):
'''
Check to see if a queue exists.
CLI Example:
.. code-block:: bash
salt myminion boto_sqs.exists myqueue region=us-east-1
'''
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
try:
... | [
"def",
"exists",
"(",
"name",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"conn",
"=",
"_get_conn",
"(",
"region",
"=",
"region",
",",
"key",
"=",
"key",
",",
"keyid",
"="... | Check to see if a queue exists.
CLI Example:
.. code-block:: bash
salt myminion boto_sqs.exists myqueue region=us-east-1 | [
"Check",
"to",
"see",
"if",
"a",
"queue",
"exists",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_sqs.py#L107-L126 | train | Check to see if a queue exists. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/boto_sqs.py | create | def create(
name,
attributes=None,
region=None,
key=None,
keyid=None,
profile=None,
):
'''
Create an SQS queue.
CLI Example:
.. code-block:: bash
salt myminion boto_sqs.create myqueue region=us-east-1
'''
conn = _get_conn(region=region, key=key, keyid=keyid, pr... | python | def create(
name,
attributes=None,
region=None,
key=None,
keyid=None,
profile=None,
):
'''
Create an SQS queue.
CLI Example:
.. code-block:: bash
salt myminion boto_sqs.create myqueue region=us-east-1
'''
conn = _get_conn(region=region, key=key, keyid=keyid, pr... | [
"def",
"create",
"(",
"name",
",",
"attributes",
"=",
"None",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
",",
")",
":",
"conn",
"=",
"_get_conn",
"(",
"region",
"=",
"region",
",",
... | Create an SQS queue.
CLI Example:
.. code-block:: bash
salt myminion boto_sqs.create myqueue region=us-east-1 | [
"Create",
"an",
"SQS",
"queue",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_sqs.py#L129-L156 | train | Create an SQS queue. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/boto_sqs.py | delete | def delete(name, region=None, key=None, keyid=None, profile=None):
'''
Delete an SQS queue.
CLI Example:
.. code-block:: bash
salt myminion boto_sqs.delete myqueue region=us-east-1
'''
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
try:
url = conn.... | python | def delete(name, region=None, key=None, keyid=None, profile=None):
'''
Delete an SQS queue.
CLI Example:
.. code-block:: bash
salt myminion boto_sqs.delete myqueue region=us-east-1
'''
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
try:
url = conn.... | [
"def",
"delete",
"(",
"name",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"conn",
"=",
"_get_conn",
"(",
"region",
"=",
"region",
",",
"key",
"=",
"key",
",",
"keyid",
"="... | Delete an SQS queue.
CLI Example:
.. code-block:: bash
salt myminion boto_sqs.delete myqueue region=us-east-1 | [
"Delete",
"an",
"SQS",
"queue",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_sqs.py#L159-L176 | train | Delete an SQS queue. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/boto_sqs.py | list_ | def list_(prefix='', region=None, key=None, keyid=None, profile=None):
'''
Return a list of the names of all visible queues.
.. versionadded:: 2016.11.0
CLI Example:
.. code-block:: bash
salt myminion boto_sqs.list region=us-east-1
'''
conn = _get_conn(region=region, key=key, key... | python | def list_(prefix='', region=None, key=None, keyid=None, profile=None):
'''
Return a list of the names of all visible queues.
.. versionadded:: 2016.11.0
CLI Example:
.. code-block:: bash
salt myminion boto_sqs.list region=us-east-1
'''
conn = _get_conn(region=region, key=key, key... | [
"def",
"list_",
"(",
"prefix",
"=",
"''",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"conn",
"=",
"_get_conn",
"(",
"region",
"=",
"region",
",",
"key",
"=",
"key",
",",
... | Return a list of the names of all visible queues.
.. versionadded:: 2016.11.0
CLI Example:
.. code-block:: bash
salt myminion boto_sqs.list region=us-east-1 | [
"Return",
"a",
"list",
"of",
"the",
"names",
"of",
"all",
"visible",
"queues",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_sqs.py#L179-L203 | train | Return a list of the names of all visible queues. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/boto_sqs.py | get_attributes | def get_attributes(name, region=None, key=None, keyid=None, profile=None):
'''
Return attributes currently set on an SQS queue.
CLI Example:
.. code-block:: bash
salt myminion boto_sqs.get_attributes myqueue
'''
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
... | python | def get_attributes(name, region=None, key=None, keyid=None, profile=None):
'''
Return attributes currently set on an SQS queue.
CLI Example:
.. code-block:: bash
salt myminion boto_sqs.get_attributes myqueue
'''
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
... | [
"def",
"get_attributes",
"(",
"name",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"conn",
"=",
"_get_conn",
"(",
"region",
"=",
"region",
",",
"key",
"=",
"key",
",",
"keyid... | Return attributes currently set on an SQS queue.
CLI Example:
.. code-block:: bash
salt myminion boto_sqs.get_attributes myqueue | [
"Return",
"attributes",
"currently",
"set",
"on",
"an",
"SQS",
"queue",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_sqs.py#L206-L223 | train | Get the attributes currently set on an SQS queue. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/boto_sqs.py | set_attributes | def set_attributes(
name,
attributes,
region=None,
key=None,
keyid=None,
profile=None,
):
'''
Set attributes on an SQS queue.
CLI Example:
.. code-block:: bash
salt myminion boto_sqs.set_attributes myqueue '{ReceiveMessageWaitTimeSeconds: 20}' region=us-east-1
'''
... | python | def set_attributes(
name,
attributes,
region=None,
key=None,
keyid=None,
profile=None,
):
'''
Set attributes on an SQS queue.
CLI Example:
.. code-block:: bash
salt myminion boto_sqs.set_attributes myqueue '{ReceiveMessageWaitTimeSeconds: 20}' region=us-east-1
'''
... | [
"def",
"set_attributes",
"(",
"name",
",",
"attributes",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
",",
")",
":",
"conn",
"=",
"_get_conn",
"(",
"region",
"=",
"region",
",",
"key",
... | Set attributes on an SQS queue.
CLI Example:
.. code-block:: bash
salt myminion boto_sqs.set_attributes myqueue '{ReceiveMessageWaitTimeSeconds: 20}' region=us-east-1 | [
"Set",
"attributes",
"on",
"an",
"SQS",
"queue",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_sqs.py#L226-L252 | train | Set attributes on an SQS queue. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/netconfig.py | _update_config | def _update_config(template_name,
template_source=None,
template_hash=None,
template_hash_name=None,
template_user='root',
template_group='root',
template_mode='755',
template_attrs='----... | python | def _update_config(template_name,
template_source=None,
template_hash=None,
template_hash_name=None,
template_user='root',
template_group='root',
template_mode='755',
template_attrs='----... | [
"def",
"_update_config",
"(",
"template_name",
",",
"template_source",
"=",
"None",
",",
"template_hash",
"=",
"None",
",",
"template_hash_name",
"=",
"None",
",",
"template_user",
"=",
"'root'",
",",
"template_group",
"=",
"'root'",
",",
"template_mode",
"=",
"... | Call the necessary functions in order to execute the state.
For the moment this only calls the ``net.load_template`` function from the
:mod:`Network-related basic features execution module <salt.modules.napalm_network>`, but this may change in time. | [
"Call",
"the",
"necessary",
"functions",
"in",
"order",
"to",
"execute",
"the",
"state",
".",
"For",
"the",
"moment",
"this",
"only",
"calls",
"the",
"net",
".",
"load_template",
"function",
"from",
"the",
":",
"mod",
":",
"Network",
"-",
"related",
"basic... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/netconfig.py#L56-L95 | train | Update the state of a template in the network. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/netconfig.py | replace_pattern | def replace_pattern(name,
pattern,
repl,
count=0,
flags=8,
bufsize=1,
append_if_not_found=False,
prepend_if_not_found=False,
not_found_content=None,
... | python | def replace_pattern(name,
pattern,
repl,
count=0,
flags=8,
bufsize=1,
append_if_not_found=False,
prepend_if_not_found=False,
not_found_content=None,
... | [
"def",
"replace_pattern",
"(",
"name",
",",
"pattern",
",",
"repl",
",",
"count",
"=",
"0",
",",
"flags",
"=",
"8",
",",
"bufsize",
"=",
"1",
",",
"append_if_not_found",
"=",
"False",
",",
"prepend_if_not_found",
"=",
"False",
",",
"not_found_content",
"="... | .. versionadded:: 2019.2.0
Replace occurrences of a pattern in the configuration source. If
``show_changes`` is ``True``, then a diff of what changed will be returned,
otherwise a ``True`` will be returned when changes are made, and ``False``
when no changes are made.
This is a pure Python implemen... | [
"..",
"versionadded",
"::",
"2019",
".",
"2",
".",
"0"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/netconfig.py#L102-L244 | train | Replace occurrences of a pattern in a configuration source. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/netconfig.py | saved | def saved(name,
source='running',
user=None,
group=None,
mode=None,
attrs=None,
makedirs=False,
dir_mode=None,
replace=True,
backup='',
show_changes=True,
create=True,
tmp_dir='',
tmp_ext=''... | python | def saved(name,
source='running',
user=None,
group=None,
mode=None,
attrs=None,
makedirs=False,
dir_mode=None,
replace=True,
backup='',
show_changes=True,
create=True,
tmp_dir='',
tmp_ext=''... | [
"def",
"saved",
"(",
"name",
",",
"source",
"=",
"'running'",
",",
"user",
"=",
"None",
",",
"group",
"=",
"None",
",",
"mode",
"=",
"None",
",",
"attrs",
"=",
"None",
",",
"makedirs",
"=",
"False",
",",
"dir_mode",
"=",
"None",
",",
"replace",
"="... | .. versionadded:: 2019.2.0
Save the configuration to a file on the local file system.
name
Absolute path to file where to save the configuration.
To push the files to the Master, use
:mod:`cp.push <salt.modules.cp.push>` Execution function.
source: ``running``
The configur... | [
"..",
"versionadded",
"::",
"2019",
".",
"2",
".",
"0"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/netconfig.py#L247-L451 | train | Save the configuration to a file on the local file system. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/netconfig.py | managed | def managed(name,
template_name=None,
template_source=None,
template_hash=None,
template_hash_name=None,
saltenv='base',
template_engine='jinja',
skip_verify=False,
context=None,
defaults=None,
test=F... | python | def managed(name,
template_name=None,
template_source=None,
template_hash=None,
template_hash_name=None,
saltenv='base',
template_engine='jinja',
skip_verify=False,
context=None,
defaults=None,
test=F... | [
"def",
"managed",
"(",
"name",
",",
"template_name",
"=",
"None",
",",
"template_source",
"=",
"None",
",",
"template_hash",
"=",
"None",
",",
"template_hash_name",
"=",
"None",
",",
"saltenv",
"=",
"'base'",
",",
"template_engine",
"=",
"'jinja'",
",",
"ski... | Manages the configuration on network devices.
By default this state will commit the changes on the device. If there are no changes required, it does not commit
and the field ``already_configured`` from the output dictionary will be set as ``True`` to notify that.
To avoid committing the configuration, set... | [
"Manages",
"the",
"configuration",
"on",
"network",
"devices",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/netconfig.py#L454-L848 | train | This state is used to manage the configuration of a single candidate on a network device. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/netconfig.py | commit_cancelled | def commit_cancelled(name):
'''
.. versionadded:: 2019.2.0
Cancel a commit scheduled to be executed via the ``commit_in`` and
``commit_at`` arguments from the
:py:func:`net.load_template <salt.modules.napalm_network.load_template>` or
:py:func:`net.load_config <salt.modules.napalm_network.load_... | python | def commit_cancelled(name):
'''
.. versionadded:: 2019.2.0
Cancel a commit scheduled to be executed via the ``commit_in`` and
``commit_at`` arguments from the
:py:func:`net.load_template <salt.modules.napalm_network.load_template>` or
:py:func:`net.load_config <salt.modules.napalm_network.load_... | [
"def",
"commit_cancelled",
"(",
"name",
")",
":",
"cancelled",
"=",
"{",
"'name'",
":",
"name",
",",
"'result'",
":",
"None",
",",
"'changes'",
":",
"{",
"}",
",",
"'comment'",
":",
"''",
"}",
"if",
"__opts__",
"[",
"'test'",
"]",
":",
"cancelled",
"... | .. versionadded:: 2019.2.0
Cancel a commit scheduled to be executed via the ``commit_in`` and
``commit_at`` arguments from the
:py:func:`net.load_template <salt.modules.napalm_network.load_template>` or
:py:func:`net.load_config <salt.modules.napalm_network.load_config>`
execution functions. The co... | [
"..",
"versionadded",
"::",
"2019",
".",
"2",
".",
"0"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/netconfig.py#L851-L880 | train | Cancel a scheduled commit on the specified node | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/netconfig.py | commit_confirmed | def commit_confirmed(name):
'''
.. versionadded:: 2019.2.0
Confirm a commit scheduled to be reverted via the ``revert_in`` and
``revert_at`` arguments from the
:mod:`net.load_template <salt.modules.napalm_network.load_template>` or
:mod:`net.load_config <salt.modules.napalm_network.load_config>... | python | def commit_confirmed(name):
'''
.. versionadded:: 2019.2.0
Confirm a commit scheduled to be reverted via the ``revert_in`` and
``revert_at`` arguments from the
:mod:`net.load_template <salt.modules.napalm_network.load_template>` or
:mod:`net.load_config <salt.modules.napalm_network.load_config>... | [
"def",
"commit_confirmed",
"(",
"name",
")",
":",
"confirmed",
"=",
"{",
"'name'",
":",
"name",
",",
"'result'",
":",
"None",
",",
"'changes'",
":",
"{",
"}",
",",
"'comment'",
":",
"''",
"}",
"if",
"__opts__",
"[",
"'test'",
"]",
":",
"confirmed",
"... | .. versionadded:: 2019.2.0
Confirm a commit scheduled to be reverted via the ``revert_in`` and
``revert_at`` arguments from the
:mod:`net.load_template <salt.modules.napalm_network.load_template>` or
:mod:`net.load_config <salt.modules.napalm_network.load_config>`
execution functions. The commit ID... | [
"..",
"versionadded",
"::",
"2019",
".",
"2",
".",
"0"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/netconfig.py#L883-L912 | train | Confirm a commit of a node | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/serializers/python.py | serialize | def serialize(obj, **options):
'''
Serialize Python data to a Python string representation (via pprint.format)
:param obj: the data structure to serialize
:param options: options given to pprint.format
'''
#round-trip this through JSON to avoid OrderedDict types
# there's probably a more p... | python | def serialize(obj, **options):
'''
Serialize Python data to a Python string representation (via pprint.format)
:param obj: the data structure to serialize
:param options: options given to pprint.format
'''
#round-trip this through JSON to avoid OrderedDict types
# there's probably a more p... | [
"def",
"serialize",
"(",
"obj",
",",
"*",
"*",
"options",
")",
":",
"#round-trip this through JSON to avoid OrderedDict types",
"# there's probably a more performant way to do this...",
"# TODO remove json round-trip when all dataset will use",
"# serializers",
"return",
"pprint",
".... | Serialize Python data to a Python string representation (via pprint.format)
:param obj: the data structure to serialize
:param options: options given to pprint.format | [
"Serialize",
"Python",
"data",
"to",
"a",
"Python",
"string",
"representation",
"(",
"via",
"pprint",
".",
"format",
")"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/serializers/python.py#L25-L43 | train | Serialize Python data to a Python string representation | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/ssh_sample.py | init | def init(opts):
'''
Required.
Can be used to initialize the server connection.
'''
try:
DETAILS['server'] = SSHConnection(host=__opts__['proxy']['host'],
username=__opts__['proxy']['username'],
password=__opt... | python | def init(opts):
'''
Required.
Can be used to initialize the server connection.
'''
try:
DETAILS['server'] = SSHConnection(host=__opts__['proxy']['host'],
username=__opts__['proxy']['username'],
password=__opt... | [
"def",
"init",
"(",
"opts",
")",
":",
"try",
":",
"DETAILS",
"[",
"'server'",
"]",
"=",
"SSHConnection",
"(",
"host",
"=",
"__opts__",
"[",
"'proxy'",
"]",
"[",
"'host'",
"]",
",",
"username",
"=",
"__opts__",
"[",
"'proxy'",
"]",
"[",
"'username'",
... | Required.
Can be used to initialize the server connection. | [
"Required",
".",
"Can",
"be",
"used",
"to",
"initialize",
"the",
"server",
"connection",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/ssh_sample.py#L38-L52 | train | Initialize the server connection | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/ssh_sample.py | grains | def grains():
'''
Get the grains from the proxied device
'''
if not DETAILS.get('grains_cache', {}):
cmd = 'info'
# Send the command to execute
out, err = DETAILS['server'].sendline(cmd)
# "scrape" the output and return the right fields as a dict
DETAILS['grain... | python | def grains():
'''
Get the grains from the proxied device
'''
if not DETAILS.get('grains_cache', {}):
cmd = 'info'
# Send the command to execute
out, err = DETAILS['server'].sendline(cmd)
# "scrape" the output and return the right fields as a dict
DETAILS['grain... | [
"def",
"grains",
"(",
")",
":",
"if",
"not",
"DETAILS",
".",
"get",
"(",
"'grains_cache'",
",",
"{",
"}",
")",
":",
"cmd",
"=",
"'info'",
"# Send the command to execute",
"out",
",",
"err",
"=",
"DETAILS",
"[",
"'server'",
"]",
".",
"sendline",
"(",
"c... | Get the grains from the proxied device | [
"Get",
"the",
"grains",
"from",
"the",
"proxied",
"device"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/ssh_sample.py#L64-L78 | 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/ssh_sample.py | ping | def ping():
'''
Required.
Ping the device on the other end of the connection
'''
try:
out, err = DETAILS['server'].sendline('help')
return True
except TerminalException as e:
log.error(e)
return False | python | def ping():
'''
Required.
Ping the device on the other end of the connection
'''
try:
out, err = DETAILS['server'].sendline('help')
return True
except TerminalException as e:
log.error(e)
return False | [
"def",
"ping",
"(",
")",
":",
"try",
":",
"out",
",",
"err",
"=",
"DETAILS",
"[",
"'server'",
"]",
".",
"sendline",
"(",
"'help'",
")",
"return",
"True",
"except",
"TerminalException",
"as",
"e",
":",
"log",
".",
"error",
"(",
"e",
")",
"return",
"... | Required.
Ping the device on the other end of the connection | [
"Required",
".",
"Ping",
"the",
"device",
"on",
"the",
"other",
"end",
"of",
"the",
"connection"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/ssh_sample.py#L94-L104 | train | Ping the device on the other end of the connection | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/ssh_sample.py | parse | def parse(out):
'''
Extract json from out.
Parameter
out: Type string. The data returned by the
ssh command.
'''
jsonret = []
in_json = False
for ln_ in out.split('\n'):
if '{' in ln_:
in_json = True
if in_json:
jsonret.append(ln_)
... | python | def parse(out):
'''
Extract json from out.
Parameter
out: Type string. The data returned by the
ssh command.
'''
jsonret = []
in_json = False
for ln_ in out.split('\n'):
if '{' in ln_:
in_json = True
if in_json:
jsonret.append(ln_)
... | [
"def",
"parse",
"(",
"out",
")",
":",
"jsonret",
"=",
"[",
"]",
"in_json",
"=",
"False",
"for",
"ln_",
"in",
"out",
".",
"split",
"(",
"'\\n'",
")",
":",
"if",
"'{'",
"in",
"ln_",
":",
"in_json",
"=",
"True",
"if",
"in_json",
":",
"jsonret",
".",... | Extract json from out.
Parameter
out: Type string. The data returned by the
ssh command. | [
"Extract",
"json",
"from",
"out",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/ssh_sample.py#L114-L131 | train | Extract json from out.
Parameter
AttributeNames out Type string. The data returned by the the
AttributeNames ssh 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/proxy/ssh_sample.py | package_install | def package_install(name, **kwargs):
'''
Install a "package" on the ssh server
'''
cmd = 'pkg_install ' + name
if kwargs.get('version', False):
cmd += ' ' + kwargs['version']
# Send the command to execute
out, err = DETAILS['server'].sendline(cmd)
# "scrape" the output and retu... | python | def package_install(name, **kwargs):
'''
Install a "package" on the ssh server
'''
cmd = 'pkg_install ' + name
if kwargs.get('version', False):
cmd += ' ' + kwargs['version']
# Send the command to execute
out, err = DETAILS['server'].sendline(cmd)
# "scrape" the output and retu... | [
"def",
"package_install",
"(",
"name",
",",
"*",
"*",
"kwargs",
")",
":",
"cmd",
"=",
"'pkg_install '",
"+",
"name",
"if",
"kwargs",
".",
"get",
"(",
"'version'",
",",
"False",
")",
":",
"cmd",
"+=",
"' '",
"+",
"kwargs",
"[",
"'version'",
"]",
"# Se... | Install a "package" on the ssh server | [
"Install",
"a",
"package",
"on",
"the",
"ssh",
"server"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/ssh_sample.py#L150-L162 | train | Install a package on the ssh 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/ssh_sample.py | package_remove | def package_remove(name):
'''
Remove a "package" on the ssh server
'''
cmd = 'pkg_remove ' + name
# Send the command to execute
out, err = DETAILS['server'].sendline(cmd)
# "scrape" the output and return the right fields as a dict
return parse(out) | python | def package_remove(name):
'''
Remove a "package" on the ssh server
'''
cmd = 'pkg_remove ' + name
# Send the command to execute
out, err = DETAILS['server'].sendline(cmd)
# "scrape" the output and return the right fields as a dict
return parse(out) | [
"def",
"package_remove",
"(",
"name",
")",
":",
"cmd",
"=",
"'pkg_remove '",
"+",
"name",
"# Send the command to execute",
"out",
",",
"err",
"=",
"DETAILS",
"[",
"'server'",
"]",
".",
"sendline",
"(",
"cmd",
")",
"# \"scrape\" the output and return the right fields... | Remove a "package" on the ssh server | [
"Remove",
"a",
"package",
"on",
"the",
"ssh",
"server"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/ssh_sample.py#L165-L175 | train | Remove a package on the ssh 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/ssh_sample.py | service_start | def service_start(name):
'''
Start a "service" on the ssh server
.. versionadded:: 2015.8.2
'''
cmd = 'start ' + name
# Send the command to execute
out, err = DETAILS['server'].sendline(cmd)
# "scrape" the output and return the right fields as a dict
return parse(out) | python | def service_start(name):
'''
Start a "service" on the ssh server
.. versionadded:: 2015.8.2
'''
cmd = 'start ' + name
# Send the command to execute
out, err = DETAILS['server'].sendline(cmd)
# "scrape" the output and return the right fields as a dict
return parse(out) | [
"def",
"service_start",
"(",
"name",
")",
":",
"cmd",
"=",
"'start '",
"+",
"name",
"# Send the command to execute",
"out",
",",
"err",
"=",
"DETAILS",
"[",
"'server'",
"]",
".",
"sendline",
"(",
"cmd",
")",
"# \"scrape\" the output and return the right fields as a ... | Start a "service" on the ssh server
.. versionadded:: 2015.8.2 | [
"Start",
"a",
"service",
"on",
"the",
"ssh",
"server"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/ssh_sample.py#L193-L205 | train | Start a service on the ssh 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/ssh_sample.py | service_stop | def service_stop(name):
'''
Stop a "service" on the ssh server
.. versionadded:: 2015.8.2
'''
cmd = 'stop ' + name
# Send the command to execute
out, err = DETAILS['server'].sendline(cmd)
# "scrape" the output and return the right fields as a dict
return parse(out) | python | def service_stop(name):
'''
Stop a "service" on the ssh server
.. versionadded:: 2015.8.2
'''
cmd = 'stop ' + name
# Send the command to execute
out, err = DETAILS['server'].sendline(cmd)
# "scrape" the output and return the right fields as a dict
return parse(out) | [
"def",
"service_stop",
"(",
"name",
")",
":",
"cmd",
"=",
"'stop '",
"+",
"name",
"# Send the command to execute",
"out",
",",
"err",
"=",
"DETAILS",
"[",
"'server'",
"]",
".",
"sendline",
"(",
"cmd",
")",
"# \"scrape\" the output and return the right fields as a di... | Stop a "service" on the ssh server
.. versionadded:: 2015.8.2 | [
"Stop",
"a",
"service",
"on",
"the",
"ssh",
"server"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/ssh_sample.py#L208-L220 | train | Stop a service on the ssh server and return the output as a dict | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/proxy/ssh_sample.py | service_restart | def service_restart(name):
'''
Restart a "service" on the ssh server
.. versionadded:: 2015.8.2
'''
cmd = 'restart ' + name
# Send the command to execute
out, err = DETAILS['server'].sendline(cmd)
# "scrape" the output and return the right fields as a dict
return parse(out) | python | def service_restart(name):
'''
Restart a "service" on the ssh server
.. versionadded:: 2015.8.2
'''
cmd = 'restart ' + name
# Send the command to execute
out, err = DETAILS['server'].sendline(cmd)
# "scrape" the output and return the right fields as a dict
return parse(out) | [
"def",
"service_restart",
"(",
"name",
")",
":",
"cmd",
"=",
"'restart '",
"+",
"name",
"# Send the command to execute",
"out",
",",
"err",
"=",
"DETAILS",
"[",
"'server'",
"]",
".",
"sendline",
"(",
"cmd",
")",
"# \"scrape\" the output and return the right fields a... | Restart a "service" on the ssh server
.. versionadded:: 2015.8.2 | [
"Restart",
"a",
"service",
"on",
"the",
"ssh",
"server"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/ssh_sample.py#L223-L235 | train | Restart a service on the ssh 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/jboss7_cli.py | run_command | def run_command(jboss_config, command, fail_on_error=True):
'''
Execute a command against jboss instance through the CLI interface.
jboss_config
Configuration dictionary with properties specified above.
command
Command to execute against jboss instance
fail_on_error (default=T... | python | def run_command(jboss_config, command, fail_on_error=True):
'''
Execute a command against jboss instance through the CLI interface.
jboss_config
Configuration dictionary with properties specified above.
command
Command to execute against jboss instance
fail_on_error (default=T... | [
"def",
"run_command",
"(",
"jboss_config",
",",
"command",
",",
"fail_on_error",
"=",
"True",
")",
":",
"cli_command_result",
"=",
"__call_cli",
"(",
"jboss_config",
",",
"command",
")",
"if",
"cli_command_result",
"[",
"'retcode'",
"]",
"==",
"0",
":",
"cli_c... | Execute a command against jboss instance through the CLI interface.
jboss_config
Configuration dictionary with properties specified above.
command
Command to execute against jboss instance
fail_on_error (default=True)
Is true, raise CommandExecutionError exception if execut... | [
"Execute",
"a",
"command",
"against",
"jboss",
"instance",
"through",
"the",
"CLI",
"interface",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/jboss7_cli.py#L55-L83 | train | Execute a command against the jboss 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/modules/jboss7_cli.py | run_operation | def run_operation(jboss_config, operation, fail_on_error=True, retries=1):
'''
Execute an operation against jboss instance through the CLI interface.
jboss_config
Configuration dictionary with properties specified above.
operation
An operation to execute against jboss instance
... | python | def run_operation(jboss_config, operation, fail_on_error=True, retries=1):
'''
Execute an operation against jboss instance through the CLI interface.
jboss_config
Configuration dictionary with properties specified above.
operation
An operation to execute against jboss instance
... | [
"def",
"run_operation",
"(",
"jboss_config",
",",
"operation",
",",
"fail_on_error",
"=",
"True",
",",
"retries",
"=",
"1",
")",
":",
"cli_command_result",
"=",
"__call_cli",
"(",
"jboss_config",
",",
"operation",
",",
"retries",
")",
"if",
"cli_command_result",... | Execute an operation against jboss instance through the CLI interface.
jboss_config
Configuration dictionary with properties specified above.
operation
An operation to execute against jboss instance
fail_on_error (default=True)
Is true, raise CommandExecutionError exceptio... | [
"Execute",
"an",
"operation",
"against",
"jboss",
"instance",
"through",
"the",
"CLI",
"interface",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/jboss7_cli.py#L86-L132 | train | Execute an operation against the jboss 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/modules/boto3_elasticache.py | _delete_resource | def _delete_resource(name, name_param, desc, res_type, wait=0, status_param=None,
status_gone='deleted', region=None, key=None, keyid=None, profile=None,
**args):
'''
Delete a generic Elasticache resource.
'''
try:
wait = int(wait)
except Exception:
... | python | def _delete_resource(name, name_param, desc, res_type, wait=0, status_param=None,
status_gone='deleted', region=None, key=None, keyid=None, profile=None,
**args):
'''
Delete a generic Elasticache resource.
'''
try:
wait = int(wait)
except Exception:
... | [
"def",
"_delete_resource",
"(",
"name",
",",
"name_param",
",",
"desc",
",",
"res_type",
",",
"wait",
"=",
"0",
",",
"status_param",
"=",
"None",
",",
"status_gone",
"=",
"'deleted'",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"... | Delete a generic Elasticache resource. | [
"Delete",
"a",
"generic",
"Elasticache",
"resource",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto3_elasticache.py#L123-L175 | train | Delete a generic Elasticache resource. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/boto3_elasticache.py | describe_cache_clusters | def describe_cache_clusters(name=None, conn=None, region=None, key=None,
keyid=None, profile=None, **args):
'''
Return details about all (or just one) Elasticache cache clusters.
Example:
.. code-block:: bash
salt myminion boto3_elasticache.describe_cache_clusters
... | python | def describe_cache_clusters(name=None, conn=None, region=None, key=None,
keyid=None, profile=None, **args):
'''
Return details about all (or just one) Elasticache cache clusters.
Example:
.. code-block:: bash
salt myminion boto3_elasticache.describe_cache_clusters
... | [
"def",
"describe_cache_clusters",
"(",
"name",
"=",
"None",
",",
"conn",
"=",
"None",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
",",
"*",
"*",
"args",
")",
":",
"return",
"_describe_r... | Return details about all (or just one) Elasticache cache clusters.
Example:
.. code-block:: bash
salt myminion boto3_elasticache.describe_cache_clusters
salt myminion boto3_elasticache.describe_cache_clusters myelasticache | [
"Return",
"details",
"about",
"all",
"(",
"or",
"just",
"one",
")",
"Elasticache",
"cache",
"clusters",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto3_elasticache.py#L284-L298 | train | Return details about all Elasticache cache clusters. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/boto3_elasticache.py | cache_cluster_exists | def cache_cluster_exists(name, conn=None, region=None, key=None, keyid=None, profile=None):
'''
Check to see if a cache cluster exists.
Example:
.. code-block:: bash
salt myminion boto3_elasticache.cache_cluster_exists myelasticache
'''
return bool(describe_cache_clusters(name=name, c... | python | def cache_cluster_exists(name, conn=None, region=None, key=None, keyid=None, profile=None):
'''
Check to see if a cache cluster exists.
Example:
.. code-block:: bash
salt myminion boto3_elasticache.cache_cluster_exists myelasticache
'''
return bool(describe_cache_clusters(name=name, c... | [
"def",
"cache_cluster_exists",
"(",
"name",
",",
"conn",
"=",
"None",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"return",
"bool",
"(",
"describe_cache_clusters",
"(",
"name",
... | Check to see if a cache cluster exists.
Example:
.. code-block:: bash
salt myminion boto3_elasticache.cache_cluster_exists myelasticache | [
"Check",
"to",
"see",
"if",
"a",
"cache",
"cluster",
"exists",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto3_elasticache.py#L301-L311 | train | Check to see if a cache cluster exists. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/boto3_elasticache.py | create_cache_cluster | def create_cache_cluster(name, wait=600, security_groups=None,
region=None, key=None, keyid=None, profile=None, **args):
'''
Create a cache cluster.
Example:
.. code-block:: bash
salt myminion boto3_elasticache.create_cache_cluster name=myCacheCluster \
... | python | def create_cache_cluster(name, wait=600, security_groups=None,
region=None, key=None, keyid=None, profile=None, **args):
'''
Create a cache cluster.
Example:
.. code-block:: bash
salt myminion boto3_elasticache.create_cache_cluster name=myCacheCluster \
... | [
"def",
"create_cache_cluster",
"(",
"name",
",",
"wait",
"=",
"600",
",",
"security_groups",
"=",
"None",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
",",
"*",
"*",
"args",
")",
":",
... | Create a cache cluster.
Example:
.. code-block:: bash
salt myminion boto3_elasticache.create_cache_cluster name=myCacheCluster \
Engine=redis \
CacheNodeType=cache.t2.micro \
... | [
"Create",
"a",
"cache",
"cluster",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto3_elasticache.py#L314-L341 | train | Create a cache cluster. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/boto3_elasticache.py | replication_group_exists | def replication_group_exists(name, region=None, key=None, keyid=None, profile=None):
'''
Check to see if a replication group exists.
Example:
.. code-block:: bash
salt myminion boto3_elasticache.replication_group_exists myelasticache
'''
return bool(describe_replication_groups(name=na... | python | def replication_group_exists(name, region=None, key=None, keyid=None, profile=None):
'''
Check to see if a replication group exists.
Example:
.. code-block:: bash
salt myminion boto3_elasticache.replication_group_exists myelasticache
'''
return bool(describe_replication_groups(name=na... | [
"def",
"replication_group_exists",
"(",
"name",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"return",
"bool",
"(",
"describe_replication_groups",
"(",
"name",
"=",
"name",
",",
"r... | Check to see if a replication group exists.
Example:
.. code-block:: bash
salt myminion boto3_elasticache.replication_group_exists myelasticache | [
"Check",
"to",
"see",
"if",
"a",
"replication",
"group",
"exists",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto3_elasticache.py#L411-L422 | train | Check to see if a replication group exists. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/boto3_elasticache.py | delete_replication_group | def delete_replication_group(name, wait=600, region=None, key=None, keyid=None, profile=None, **args):
'''
Delete an ElastiCache replication group, optionally taking a snapshot first.
Example:
.. code-block:: bash
salt myminion boto3_elasticache.delete_replication_group my-replication-group
... | python | def delete_replication_group(name, wait=600, region=None, key=None, keyid=None, profile=None, **args):
'''
Delete an ElastiCache replication group, optionally taking a snapshot first.
Example:
.. code-block:: bash
salt myminion boto3_elasticache.delete_replication_group my-replication-group
... | [
"def",
"delete_replication_group",
"(",
"name",
",",
"wait",
"=",
"600",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
",",
"*",
"*",
"args",
")",
":",
"return",
"_delete_resource",
"(",
... | Delete an ElastiCache replication group, optionally taking a snapshot first.
Example:
.. code-block:: bash
salt myminion boto3_elasticache.delete_replication_group my-replication-group | [
"Delete",
"an",
"ElastiCache",
"replication",
"group",
"optionally",
"taking",
"a",
"snapshot",
"first",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto3_elasticache.py#L482-L494 | train | Delete an ElastiCache replication group optionally taking a snapshot first. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/boto3_elasticache.py | cache_subnet_group_exists | def cache_subnet_group_exists(name, region=None, key=None, keyid=None, profile=None):
'''
Check to see if an ElastiCache subnet group exists.
Example:
.. code-block:: bash
salt myminion boto3_elasticache.cache_subnet_group_exists my-subnet-group
'''
return bool(describe_cache_subnet_g... | python | def cache_subnet_group_exists(name, region=None, key=None, keyid=None, profile=None):
'''
Check to see if an ElastiCache subnet group exists.
Example:
.. code-block:: bash
salt myminion boto3_elasticache.cache_subnet_group_exists my-subnet-group
'''
return bool(describe_cache_subnet_g... | [
"def",
"cache_subnet_group_exists",
"(",
"name",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"return",
"bool",
"(",
"describe_cache_subnet_groups",
"(",
"name",
"=",
"name",
",",
... | Check to see if an ElastiCache subnet group exists.
Example:
.. code-block:: bash
salt myminion boto3_elasticache.cache_subnet_group_exists my-subnet-group | [
"Check",
"to",
"see",
"if",
"an",
"ElastiCache",
"subnet",
"group",
"exists",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto3_elasticache.py#L512-L522 | train | Check to see if an ElastiCache subnet group exists. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/boto3_elasticache.py | list_cache_subnet_groups | def list_cache_subnet_groups(region=None, key=None, keyid=None, profile=None):
'''
Return a list of all cache subnet group names
Example:
.. code-block:: bash
salt myminion boto3_elasticache.list_cache_subnet_groups region=us-east-1
'''
return [g['CacheSubnetGroupName'] for g in
... | python | def list_cache_subnet_groups(region=None, key=None, keyid=None, profile=None):
'''
Return a list of all cache subnet group names
Example:
.. code-block:: bash
salt myminion boto3_elasticache.list_cache_subnet_groups region=us-east-1
'''
return [g['CacheSubnetGroupName'] for g in
... | [
"def",
"list_cache_subnet_groups",
"(",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"return",
"[",
"g",
"[",
"'CacheSubnetGroupName'",
"]",
"for",
"g",
"in",
"describe_cache_subnet_groups"... | Return a list of all cache subnet group names
Example:
.. code-block:: bash
salt myminion boto3_elasticache.list_cache_subnet_groups region=us-east-1 | [
"Return",
"a",
"list",
"of",
"all",
"cache",
"subnet",
"group",
"names"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto3_elasticache.py#L525-L536 | train | Return a list of all cache subnet groups in a region | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/boto3_elasticache.py | create_cache_subnet_group | def create_cache_subnet_group(name, subnets=None, region=None, key=None, keyid=None, profile=None, **args):
'''
Create an ElastiCache subnet group
Example:
.. code-block:: bash
salt myminion boto3_elasticache.create_cache_subnet_group name=my-subnet-group \
... | python | def create_cache_subnet_group(name, subnets=None, region=None, key=None, keyid=None, profile=None, **args):
'''
Create an ElastiCache subnet group
Example:
.. code-block:: bash
salt myminion boto3_elasticache.create_cache_subnet_group name=my-subnet-group \
... | [
"def",
"create_cache_subnet_group",
"(",
"name",
",",
"subnets",
"=",
"None",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
",",
"*",
"*",
"args",
")",
":",
"if",
"subnets",
":",
"if",
... | Create an ElastiCache subnet group
Example:
.. code-block:: bash
salt myminion boto3_elasticache.create_cache_subnet_group name=my-subnet-group \
CacheSubnetGroupDescription="description" \
subnets='[myVPCSubn... | [
"Create",
"an",
"ElastiCache",
"subnet",
"group"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto3_elasticache.py#L539-L574 | train | Create an ElastiCache subnet group. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/boto3_elasticache.py | cache_security_group_exists | def cache_security_group_exists(name, region=None, key=None, keyid=None, profile=None):
'''
Check to see if an ElastiCache security group exists.
Example:
.. code-block:: bash
salt myminion boto3_elasticache.cache_security_group_exists mysecuritygroup
'''
return bool(describe_cache_se... | python | def cache_security_group_exists(name, region=None, key=None, keyid=None, profile=None):
'''
Check to see if an ElastiCache security group exists.
Example:
.. code-block:: bash
salt myminion boto3_elasticache.cache_security_group_exists mysecuritygroup
'''
return bool(describe_cache_se... | [
"def",
"cache_security_group_exists",
"(",
"name",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"return",
"bool",
"(",
"describe_cache_security_groups",
"(",
"name",
"=",
"name",
","... | Check to see if an ElastiCache security group exists.
Example:
.. code-block:: bash
salt myminion boto3_elasticache.cache_security_group_exists mysecuritygroup | [
"Check",
"to",
"see",
"if",
"an",
"ElastiCache",
"security",
"group",
"exists",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto3_elasticache.py#L646-L657 | train | Check to see if an ElastiCache security group exists. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/boto3_elasticache.py | create_cache_security_group | def create_cache_security_group(name, region=None, key=None, keyid=None, profile=None, **args):
'''
Create a cache security group.
Example:
.. code-block:: bash
salt myminion boto3_elasticache.create_cache_security_group mycachesecgrp Description='My Cache Security Group'
'''
return _... | python | def create_cache_security_group(name, region=None, key=None, keyid=None, profile=None, **args):
'''
Create a cache security group.
Example:
.. code-block:: bash
salt myminion boto3_elasticache.create_cache_security_group mycachesecgrp Description='My Cache Security Group'
'''
return _... | [
"def",
"create_cache_security_group",
"(",
"name",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
",",
"*",
"*",
"args",
")",
":",
"return",
"_create_resource",
"(",
"name",
",",
"name_param",... | Create a cache security group.
Example:
.. code-block:: bash
salt myminion boto3_elasticache.create_cache_security_group mycachesecgrp Description='My Cache Security Group' | [
"Create",
"a",
"cache",
"security",
"group",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto3_elasticache.py#L660-L672 | train | Create a cache security group. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/boto3_elasticache.py | delete_cache_security_group | def delete_cache_security_group(name, region=None, key=None, keyid=None, profile=None, **args):
'''
Delete a cache security group.
Example:
.. code-block:: bash
salt myminion boto3_elasticache.delete_cache_security_group myelasticachesg
'''
return _delete_resource(name, name_param='Ca... | python | def delete_cache_security_group(name, region=None, key=None, keyid=None, profile=None, **args):
'''
Delete a cache security group.
Example:
.. code-block:: bash
salt myminion boto3_elasticache.delete_cache_security_group myelasticachesg
'''
return _delete_resource(name, name_param='Ca... | [
"def",
"delete_cache_security_group",
"(",
"name",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
",",
"*",
"*",
"args",
")",
":",
"return",
"_delete_resource",
"(",
"name",
",",
"name_param",... | Delete a cache security group.
Example:
.. code-block:: bash
salt myminion boto3_elasticache.delete_cache_security_group myelasticachesg | [
"Delete",
"a",
"cache",
"security",
"group",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto3_elasticache.py#L675-L687 | train | Delete a cache security group. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/boto3_elasticache.py | authorize_cache_security_group_ingress | def authorize_cache_security_group_ingress(name, region=None, key=None, keyid=None, profile=None, **args):
'''
Authorize network ingress from an ec2 security group to a cache security group.
Example:
.. code-block:: bash
salt myminion boto3_elasticache.authorize_cache_security_group_ingress \... | python | def authorize_cache_security_group_ingress(name, region=None, key=None, keyid=None, profile=None, **args):
'''
Authorize network ingress from an ec2 security group to a cache security group.
Example:
.. code-block:: bash
salt myminion boto3_elasticache.authorize_cache_security_group_ingress \... | [
"def",
"authorize_cache_security_group_ingress",
"(",
"name",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
",",
"*",
"*",
"args",
")",
":",
"conn",
"=",
"_get_conn",
"(",
"region",
"=",
"r... | Authorize network ingress from an ec2 security group to a cache security group.
Example:
.. code-block:: bash
salt myminion boto3_elasticache.authorize_cache_security_group_ingress \
mycachesecgrp \
EC2SecurityGroupName=s... | [
"Authorize",
"network",
"ingress",
"from",
"an",
"ec2",
"security",
"group",
"to",
"a",
"cache",
"security",
"group",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto3_elasticache.py#L690-L721 | train | Authorize network ingress from an ec2 security group to a cache security group. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/boto3_elasticache.py | describe_cache_parameter_groups | def describe_cache_parameter_groups(name=None, conn=None, region=None, key=None, keyid=None,
profile=None):
'''
Return details about all (or just one) Elasticache cache clusters.
Example:
.. code-block:: bash
salt myminion boto3_elasticache.describe_cache_p... | python | def describe_cache_parameter_groups(name=None, conn=None, region=None, key=None, keyid=None,
profile=None):
'''
Return details about all (or just one) Elasticache cache clusters.
Example:
.. code-block:: bash
salt myminion boto3_elasticache.describe_cache_p... | [
"def",
"describe_cache_parameter_groups",
"(",
"name",
"=",
"None",
",",
"conn",
"=",
"None",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"return",
"_describe_resource",
"(",
"nam... | Return details about all (or just one) Elasticache cache clusters.
Example:
.. code-block:: bash
salt myminion boto3_elasticache.describe_cache_parameter_groups
salt myminion boto3_elasticache.describe_cache_parameter_groups myParameterGroup | [
"Return",
"details",
"about",
"all",
"(",
"or",
"just",
"one",
")",
"Elasticache",
"cache",
"clusters",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto3_elasticache.py#L903-L917 | train | Return details about all Elasticache cache parameter groups. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/boto3_elasticache.py | describe_cache_parameters | def describe_cache_parameters(name=None, conn=None, region=None, key=None, keyid=None,
profile=None, **args):
'''
Returns the detailed parameter list for a particular cache parameter group.
name
The name of a specific cache parameter group to return details for.
C... | python | def describe_cache_parameters(name=None, conn=None, region=None, key=None, keyid=None,
profile=None, **args):
'''
Returns the detailed parameter list for a particular cache parameter group.
name
The name of a specific cache parameter group to return details for.
C... | [
"def",
"describe_cache_parameters",
"(",
"name",
"=",
"None",
",",
"conn",
"=",
"None",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
",",
"*",
"*",
"args",
")",
":",
"ret",
"=",
"{",
... | Returns the detailed parameter list for a particular cache parameter group.
name
The name of a specific cache parameter group to return details for.
CacheParameterGroupName
The name of a specific cache parameter group to return details for. Generally not
required, as `name` will be us... | [
"Returns",
"the",
"detailed",
"parameter",
"list",
"for",
"a",
"particular",
"cache",
"parameter",
"group",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto3_elasticache.py#L920-L956 | train | Returns the detailed parameter list for a specific cache parameter group. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/boto3_elasticache.py | modify_cache_parameter_group | def modify_cache_parameter_group(name, region=None, key=None, keyid=None, profile=None,
**args):
'''
Update a cache parameter group in place.
Note that due to a design limitation in AWS, this function is not atomic -- a maximum of 20
params may be modified in one underl... | python | def modify_cache_parameter_group(name, region=None, key=None, keyid=None, profile=None,
**args):
'''
Update a cache parameter group in place.
Note that due to a design limitation in AWS, this function is not atomic -- a maximum of 20
params may be modified in one underl... | [
"def",
"modify_cache_parameter_group",
"(",
"name",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
",",
"*",
"*",
"args",
")",
":",
"args",
"=",
"dict",
"(",
"[",
"(",
"k",
",",
"v",
"... | Update a cache parameter group in place.
Note that due to a design limitation in AWS, this function is not atomic -- a maximum of 20
params may be modified in one underlying boto call. This means that if more than 20 params
need to be changed, the update is performed in blocks of 20, which in turns means ... | [
"Update",
"a",
"cache",
"parameter",
"group",
"in",
"place",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto3_elasticache.py#L977-L1028 | train | Modify a cache parameter group in place. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/freebsdports.py | _check_portname | def _check_portname(name):
'''
Check if portname is valid and whether or not the directory exists in the
ports tree.
'''
if not isinstance(name, string_types) or '/' not in name:
raise SaltInvocationError(
'Invalid port name \'{0}\' (category required)'.format(name)
)
... | python | def _check_portname(name):
'''
Check if portname is valid and whether or not the directory exists in the
ports tree.
'''
if not isinstance(name, string_types) or '/' not in name:
raise SaltInvocationError(
'Invalid port name \'{0}\' (category required)'.format(name)
)
... | [
"def",
"_check_portname",
"(",
"name",
")",
":",
"if",
"not",
"isinstance",
"(",
"name",
",",
"string_types",
")",
"or",
"'/'",
"not",
"in",
"name",
":",
"raise",
"SaltInvocationError",
"(",
"'Invalid port name \\'{0}\\' (category required)'",
".",
"format",
"(",
... | Check if portname is valid and whether or not the directory exists in the
ports tree. | [
"Check",
"if",
"portname",
"is",
"valid",
"and",
"whether",
"or",
"not",
"the",
"directory",
"exists",
"in",
"the",
"ports",
"tree",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/freebsdports.py#L59-L73 | train | Check if portname is valid and whether or not the directory exists in the availabe ports tree. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/freebsdports.py | _options_dir | def _options_dir(name):
'''
Retrieve the path to the dir containing OPTIONS file for a given port
'''
_check_portname(name)
_root = '/var/db/ports'
# New path: /var/db/ports/category_portname
new_dir = os.path.join(_root, name.replace('/', '_'))
# Old path: /var/db/ports/portname
ol... | python | def _options_dir(name):
'''
Retrieve the path to the dir containing OPTIONS file for a given port
'''
_check_portname(name)
_root = '/var/db/ports'
# New path: /var/db/ports/category_portname
new_dir = os.path.join(_root, name.replace('/', '_'))
# Old path: /var/db/ports/portname
ol... | [
"def",
"_options_dir",
"(",
"name",
")",
":",
"_check_portname",
"(",
"name",
")",
"_root",
"=",
"'/var/db/ports'",
"# New path: /var/db/ports/category_portname",
"new_dir",
"=",
"os",
".",
"path",
".",
"join",
"(",
"_root",
",",
"name",
".",
"replace",
"(",
"... | Retrieve the path to the dir containing OPTIONS file for a given port | [
"Retrieve",
"the",
"path",
"to",
"the",
"dir",
"containing",
"OPTIONS",
"file",
"for",
"a",
"given",
"port"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/freebsdports.py#L76-L90 | train | Retrieve the path to the dir containing OPTIONS file for a given port
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/freebsdports.py | _options_file_exists | def _options_file_exists(name):
'''
Returns True/False based on whether or not the options file for the
specified port exists.
'''
return os.path.isfile(os.path.join(_options_dir(name), 'options')) | python | def _options_file_exists(name):
'''
Returns True/False based on whether or not the options file for the
specified port exists.
'''
return os.path.isfile(os.path.join(_options_dir(name), 'options')) | [
"def",
"_options_file_exists",
"(",
"name",
")",
":",
"return",
"os",
".",
"path",
".",
"isfile",
"(",
"os",
".",
"path",
".",
"join",
"(",
"_options_dir",
"(",
"name",
")",
",",
"'options'",
")",
")"
] | Returns True/False based on whether or not the options file for the
specified port exists. | [
"Returns",
"True",
"/",
"False",
"based",
"on",
"whether",
"or",
"not",
"the",
"options",
"file",
"for",
"the",
"specified",
"port",
"exists",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/freebsdports.py#L93-L98 | train | Returns True if the options file for the specified port exists. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.