repo stringlengths 7 54 | path stringlengths 4 223 | func_name stringlengths 1 134 | original_string stringlengths 75 104k | language stringclasses 1
value | code stringlengths 75 104k | code_tokens listlengths 20 28.4k | docstring stringlengths 1 46.3k | docstring_tokens listlengths 1 1.66k | sha stringlengths 40 40 | url stringlengths 87 315 | partition stringclasses 1
value | summary stringlengths 4 350 | obf_code stringlengths 7.85k 764k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
saltstack/salt | salt/modules/dockermod.py | push | def push(image,
insecure_registry=False,
api_response=False,
client_timeout=salt.utils.docker.CLIENT_TIMEOUT):
'''
.. versionchanged:: 2015.8.4
The ``Id`` and ``Image`` keys are no longer present in the return data.
This is due to changes in the Docker Remote API.
... | python | def push(image,
insecure_registry=False,
api_response=False,
client_timeout=salt.utils.docker.CLIENT_TIMEOUT):
'''
.. versionchanged:: 2015.8.4
The ``Id`` and ``Image`` keys are no longer present in the return data.
This is due to changes in the Docker Remote API.
... | [
"def",
"push",
"(",
"image",
",",
"insecure_registry",
"=",
"False",
",",
"api_response",
"=",
"False",
",",
"client_timeout",
"=",
"salt",
".",
"utils",
".",
"docker",
".",
"CLIENT_TIMEOUT",
")",
":",
"if",
"not",
"isinstance",
"(",
"image",
",",
"six",
... | .. versionchanged:: 2015.8.4
The ``Id`` and ``Image`` keys are no longer present in the return data.
This is due to changes in the Docker Remote API.
Pushes an image to a Docker registry. See the documentation at top of this
page to configure authentication credentials.
image
Image... | [
"..",
"versionchanged",
"::",
"2015",
".",
"8",
".",
"4",
"The",
"Id",
"and",
"Image",
"keys",
"are",
"no",
"longer",
"present",
"in",
"the",
"return",
"data",
".",
"This",
"is",
"due",
"to",
"changes",
"in",
"the",
"Docker",
"Remote",
"API",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/dockermod.py#L4596-L4688 | train | Push an image to a Docker registry. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/dockermod.py | rmi | def rmi(*names, **kwargs):
'''
Removes an image
name
Name (in ``repo:tag`` notation) or ID of image.
force : False
If ``True``, the image will be removed even if the Minion has
containers created from that image
prune : True
If ``True``, untagged parent image layer... | python | def rmi(*names, **kwargs):
'''
Removes an image
name
Name (in ``repo:tag`` notation) or ID of image.
force : False
If ``True``, the image will be removed even if the Minion has
containers created from that image
prune : True
If ``True``, untagged parent image layer... | [
"def",
"rmi",
"(",
"*",
"names",
",",
"*",
"*",
"kwargs",
")",
":",
"pre_images",
"=",
"images",
"(",
"all",
"=",
"True",
")",
"pre_tags",
"=",
"list_tags",
"(",
")",
"force",
"=",
"kwargs",
".",
"get",
"(",
"'force'",
",",
"False",
")",
"noprune",... | Removes an image
name
Name (in ``repo:tag`` notation) or ID of image.
force : False
If ``True``, the image will be removed even if the Minion has
containers created from that image
prune : True
If ``True``, untagged parent image layers will be removed as well, set
... | [
"Removes",
"an",
"image"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/dockermod.py#L4691-L4765 | train | Removes an image from the Minion. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/dockermod.py | tag_ | def tag_(name, repository, tag='latest', force=False):
'''
.. versionchanged:: 2018.3.0
The repository and tag must now be passed separately using the
``repository`` and ``tag`` arguments, rather than together in the (now
deprecated) ``image`` argument.
Tag an image into a repositor... | python | def tag_(name, repository, tag='latest', force=False):
'''
.. versionchanged:: 2018.3.0
The repository and tag must now be passed separately using the
``repository`` and ``tag`` arguments, rather than together in the (now
deprecated) ``image`` argument.
Tag an image into a repositor... | [
"def",
"tag_",
"(",
"name",
",",
"repository",
",",
"tag",
"=",
"'latest'",
",",
"force",
"=",
"False",
")",
":",
"if",
"not",
"isinstance",
"(",
"repository",
",",
"six",
".",
"string_types",
")",
":",
"repository",
"=",
"six",
".",
"text_type",
"(",
... | .. versionchanged:: 2018.3.0
The repository and tag must now be passed separately using the
``repository`` and ``tag`` arguments, rather than together in the (now
deprecated) ``image`` argument.
Tag an image into a repository and return ``True``. If the tag was
unsuccessful, an error wi... | [
"..",
"versionchanged",
"::",
"2018",
".",
"3",
".",
"0",
"The",
"repository",
"and",
"tag",
"must",
"now",
"be",
"passed",
"separately",
"using",
"the",
"repository",
"and",
"tag",
"arguments",
"rather",
"than",
"together",
"in",
"the",
"(",
"now",
"depre... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/dockermod.py#L4973-L5022 | train | Tag an image into a repository and return True. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/dockermod.py | networks | def networks(names=None, ids=None):
'''
.. versionchanged:: 2017.7.0
The ``names`` and ``ids`` can be passed as a comma-separated list now,
as well as a Python list.
.. versionchanged:: 2018.3.0
The ``Containers`` key for each network is no longer always empty.
List existing net... | python | def networks(names=None, ids=None):
'''
.. versionchanged:: 2017.7.0
The ``names`` and ``ids`` can be passed as a comma-separated list now,
as well as a Python list.
.. versionchanged:: 2018.3.0
The ``Containers`` key for each network is no longer always empty.
List existing net... | [
"def",
"networks",
"(",
"names",
"=",
"None",
",",
"ids",
"=",
"None",
")",
":",
"if",
"names",
"is",
"not",
"None",
":",
"names",
"=",
"__utils__",
"[",
"'args.split_input'",
"]",
"(",
"names",
")",
"if",
"ids",
"is",
"not",
"None",
":",
"ids",
"=... | .. versionchanged:: 2017.7.0
The ``names`` and ``ids`` can be passed as a comma-separated list now,
as well as a Python list.
.. versionchanged:: 2018.3.0
The ``Containers`` key for each network is no longer always empty.
List existing networks
names
Filter by name
ids... | [
"..",
"versionchanged",
"::",
"2017",
".",
"7",
".",
"0",
"The",
"names",
"and",
"ids",
"can",
"be",
"passed",
"as",
"a",
"comma",
"-",
"separated",
"list",
"now",
"as",
"well",
"as",
"a",
"Python",
"list",
".",
"..",
"versionchanged",
"::",
"2018",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/dockermod.py#L5026-L5065 | train | List existing networks. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/dockermod.py | create_network | def create_network(name,
skip_translate=None,
ignore_collisions=False,
validate_ip_addrs=True,
client_timeout=salt.utils.docker.CLIENT_TIMEOUT,
**kwargs):
'''
.. versionchanged:: 2018.3.0
Support added for net... | python | def create_network(name,
skip_translate=None,
ignore_collisions=False,
validate_ip_addrs=True,
client_timeout=salt.utils.docker.CLIENT_TIMEOUT,
**kwargs):
'''
.. versionchanged:: 2018.3.0
Support added for net... | [
"def",
"create_network",
"(",
"name",
",",
"skip_translate",
"=",
"None",
",",
"ignore_collisions",
"=",
"False",
",",
"validate_ip_addrs",
"=",
"True",
",",
"client_timeout",
"=",
"salt",
".",
"utils",
".",
"docker",
".",
"CLIENT_TIMEOUT",
",",
"*",
"*",
"k... | .. versionchanged:: 2018.3.0
Support added for network configuration options other than ``driver``
and ``driver_opts``, as well as IPAM configuration.
Create a new network
.. note::
This function supports all arguments for network and IPAM pool
configuration which are available... | [
"..",
"versionchanged",
"::",
"2018",
".",
"3",
".",
"0",
"Support",
"added",
"for",
"network",
"configuration",
"options",
"other",
"than",
"driver",
"and",
"driver_opts",
"as",
"well",
"as",
"IPAM",
"configuration",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/dockermod.py#L5068-L5335 | train | Create a network with the given name and optional IPAM configuration. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/dockermod.py | connect_container_to_network | def connect_container_to_network(container, net_id, **kwargs):
'''
.. versionadded:: 2015.8.3
.. versionchanged:: 2017.7.0
Support for ``ipv4_address`` argument added
.. versionchanged:: 2018.3.0
All arguments are now passed through to
`connect_container_to_network()`_, allowing ... | python | def connect_container_to_network(container, net_id, **kwargs):
'''
.. versionadded:: 2015.8.3
.. versionchanged:: 2017.7.0
Support for ``ipv4_address`` argument added
.. versionchanged:: 2018.3.0
All arguments are now passed through to
`connect_container_to_network()`_, allowing ... | [
"def",
"connect_container_to_network",
"(",
"container",
",",
"net_id",
",",
"*",
"*",
"kwargs",
")",
":",
"kwargs",
"=",
"__utils__",
"[",
"'args.clean_kwargs'",
"]",
"(",
"*",
"*",
"kwargs",
")",
"log",
".",
"debug",
"(",
"'Connecting container \\'%s\\' to net... | .. versionadded:: 2015.8.3
.. versionchanged:: 2017.7.0
Support for ``ipv4_address`` argument added
.. versionchanged:: 2018.3.0
All arguments are now passed through to
`connect_container_to_network()`_, allowing for any new arguments added
to this function to be supported automa... | [
"..",
"versionadded",
"::",
"2015",
".",
"8",
".",
"3",
"..",
"versionchanged",
"::",
"2017",
".",
"7",
".",
"0",
"Support",
"for",
"ipv4_address",
"argument",
"added",
"..",
"versionchanged",
"::",
"2018",
".",
"3",
".",
"0",
"All",
"arguments",
"are",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/dockermod.py#L5376-L5417 | train | Connect a container to a 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/modules/dockermod.py | disconnect_container_from_network | def disconnect_container_from_network(container, network_id):
'''
.. versionadded:: 2015.8.3
Disconnect container from network
container
Container name or ID
network_id
Network name or ID
CLI Examples:
.. code-block:: bash
salt myminion docker.disconnect_contain... | python | def disconnect_container_from_network(container, network_id):
'''
.. versionadded:: 2015.8.3
Disconnect container from network
container
Container name or ID
network_id
Network name or ID
CLI Examples:
.. code-block:: bash
salt myminion docker.disconnect_contain... | [
"def",
"disconnect_container_from_network",
"(",
"container",
",",
"network_id",
")",
":",
"log",
".",
"debug",
"(",
"'Disconnecting container \\'%s\\' from network \\'%s\\''",
",",
"container",
",",
"network_id",
")",
"response",
"=",
"_client_wrapper",
"(",
"'disconnect... | .. versionadded:: 2015.8.3
Disconnect container from network
container
Container name or ID
network_id
Network name or ID
CLI Examples:
.. code-block:: bash
salt myminion docker.disconnect_container_from_network web-1 mynet
salt myminion docker.disconnect_contai... | [
"..",
"versionadded",
"::",
"2015",
".",
"8",
".",
"3"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/dockermod.py#L5420-L5451 | train | Disconnect a container from a 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/modules/dockermod.py | disconnect_all_containers_from_network | def disconnect_all_containers_from_network(network_id):
'''
.. versionadded:: 2018.3.0
Runs :py:func:`docker.disconnect_container_from_network
<salt.modules.dockermod.disconnect_container_from_network>` on all
containers connected to the specified network, and returns the names of all
container... | python | def disconnect_all_containers_from_network(network_id):
'''
.. versionadded:: 2018.3.0
Runs :py:func:`docker.disconnect_container_from_network
<salt.modules.dockermod.disconnect_container_from_network>` on all
containers connected to the specified network, and returns the names of all
container... | [
"def",
"disconnect_all_containers_from_network",
"(",
"network_id",
")",
":",
"connected_containers",
"=",
"connected",
"(",
"network_id",
")",
"ret",
"=",
"[",
"]",
"failed",
"=",
"[",
"]",
"for",
"cname",
"in",
"connected_containers",
":",
"try",
":",
"disconn... | .. versionadded:: 2018.3.0
Runs :py:func:`docker.disconnect_container_from_network
<salt.modules.dockermod.disconnect_container_from_network>` on all
containers connected to the specified network, and returns the names of all
containers that were disconnected.
network_id
Network name or ID... | [
"..",
"versionadded",
"::",
"2018",
".",
"3",
".",
"0"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/dockermod.py#L5454-L5492 | train | Disconnects all containers from a 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/modules/dockermod.py | create_volume | def create_volume(name, driver=None, driver_opts=None):
'''
Create a new volume
.. versionadded:: 2015.8.4
name
name of volume
driver
Driver of the volume
driver_opts
Options for the driver volume
CLI Example:
.. code-block:: bash
salt myminion dock... | python | def create_volume(name, driver=None, driver_opts=None):
'''
Create a new volume
.. versionadded:: 2015.8.4
name
name of volume
driver
Driver of the volume
driver_opts
Options for the driver volume
CLI Example:
.. code-block:: bash
salt myminion dock... | [
"def",
"create_volume",
"(",
"name",
",",
"driver",
"=",
"None",
",",
"driver_opts",
"=",
"None",
")",
":",
"response",
"=",
"_client_wrapper",
"(",
"'create_volume'",
",",
"name",
",",
"driver",
"=",
"driver",
",",
"driver_opts",
"=",
"driver_opts",
")",
... | Create a new volume
.. versionadded:: 2015.8.4
name
name of volume
driver
Driver of the volume
driver_opts
Options for the driver volume
CLI Example:
.. code-block:: bash
salt myminion docker.create_volume my_volume driver=local | [
"Create",
"a",
"new",
"volume"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/dockermod.py#L5516-L5541 | train | Create a new volume in a specific driver | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/dockermod.py | pause | def pause(name):
'''
Pauses a container
name
Container name or ID
**RETURN DATA**
A dictionary will be returned, containing the following keys:
- ``status`` - A dictionary showing the prior state of the container as
well as the new state
- ``result`` - A boolean noting whe... | python | def pause(name):
'''
Pauses a container
name
Container name or ID
**RETURN DATA**
A dictionary will be returned, containing the following keys:
- ``status`` - A dictionary showing the prior state of the container as
well as the new state
- ``result`` - A boolean noting whe... | [
"def",
"pause",
"(",
"name",
")",
":",
"orig_state",
"=",
"state",
"(",
"name",
")",
"if",
"orig_state",
"==",
"'stopped'",
":",
"return",
"{",
"'result'",
":",
"False",
",",
"'state'",
":",
"{",
"'old'",
":",
"orig_state",
",",
"'new'",
":",
"orig_sta... | Pauses a container
name
Container name or ID
**RETURN DATA**
A dictionary will be returned, containing the following keys:
- ``status`` - A dictionary showing the prior state of the container as
well as the new state
- ``result`` - A boolean noting whether or not the action was su... | [
"Pauses",
"a",
"container"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/dockermod.py#L5615-L5645 | train | Pauses a container with the specified name. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/dockermod.py | restart | def restart(name, timeout=10):
'''
Restarts a container
name
Container name or ID
timeout : 10
Timeout in seconds after which the container will be killed (if it has
not yet gracefully shut down)
**RETURN DATA**
A dictionary will be returned, containing the following... | python | def restart(name, timeout=10):
'''
Restarts a container
name
Container name or ID
timeout : 10
Timeout in seconds after which the container will be killed (if it has
not yet gracefully shut down)
**RETURN DATA**
A dictionary will be returned, containing the following... | [
"def",
"restart",
"(",
"name",
",",
"timeout",
"=",
"10",
")",
":",
"ret",
"=",
"_change_state",
"(",
"name",
",",
"'restart'",
",",
"'running'",
",",
"timeout",
"=",
"timeout",
")",
"if",
"ret",
"[",
"'result'",
"]",
":",
"ret",
"[",
"'restarted'",
... | Restarts a container
name
Container name or ID
timeout : 10
Timeout in seconds after which the container will be killed (if it has
not yet gracefully shut down)
**RETURN DATA**
A dictionary will be returned, containing the following keys:
- ``status`` - A dictionary sho... | [
"Restarts",
"a",
"container"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/dockermod.py#L5651-L5684 | train | Restarts a container with the given name. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/dockermod.py | start_ | def start_(name):
'''
Start a container
name
Container name or ID
**RETURN DATA**
A dictionary will be returned, containing the following keys:
- ``status`` - A dictionary showing the prior state of the container as
well as the new state
- ``result`` - A boolean noting whet... | python | def start_(name):
'''
Start a container
name
Container name or ID
**RETURN DATA**
A dictionary will be returned, containing the following keys:
- ``status`` - A dictionary showing the prior state of the container as
well as the new state
- ``result`` - A boolean noting whet... | [
"def",
"start_",
"(",
"name",
")",
":",
"orig_state",
"=",
"state",
"(",
"name",
")",
"if",
"orig_state",
"==",
"'paused'",
":",
"return",
"{",
"'result'",
":",
"False",
",",
"'state'",
":",
"{",
"'old'",
":",
"orig_state",
",",
"'new'",
":",
"orig_sta... | Start a container
name
Container name or ID
**RETURN DATA**
A dictionary will be returned, containing the following keys:
- ``status`` - A dictionary showing the prior state of the container as
well as the new state
- ``result`` - A boolean noting whether or not the action was succ... | [
"Start",
"a",
"container"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/dockermod.py#L5716-L5746 | train | Start a container with the given name | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/dockermod.py | stop | def stop(name, timeout=None, **kwargs):
'''
Stops a running container
name
Container name or ID
unpause : False
If ``True`` and the container is paused, it will be unpaused before
attempting to stop the container.
timeout
Timeout in seconds after which the containe... | python | def stop(name, timeout=None, **kwargs):
'''
Stops a running container
name
Container name or ID
unpause : False
If ``True`` and the container is paused, it will be unpaused before
attempting to stop the container.
timeout
Timeout in seconds after which the containe... | [
"def",
"stop",
"(",
"name",
",",
"timeout",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"timeout",
"is",
"None",
":",
"try",
":",
"# Get timeout from container config",
"timeout",
"=",
"inspect_container",
"(",
"name",
")",
"[",
"'Config'",
"]",
... | Stops a running container
name
Container name or ID
unpause : False
If ``True`` and the container is paused, it will be unpaused before
attempting to stop the container.
timeout
Timeout in seconds after which the container will be killed (if it has
not yet graceful... | [
"Stops",
"a",
"running",
"container"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/dockermod.py#L5750-L5814 | train | Stops a running container and returns a dictionary with the state of the container as well as the state of the container. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/dockermod.py | unpause | def unpause(name):
'''
Unpauses a container
name
Container name or ID
**RETURN DATA**
A dictionary will be returned, containing the following keys:
- ``status`` - A dictionary showing the prior state of the container as
well as the new state
- ``result`` - A boolean noting... | python | def unpause(name):
'''
Unpauses a container
name
Container name or ID
**RETURN DATA**
A dictionary will be returned, containing the following keys:
- ``status`` - A dictionary showing the prior state of the container as
well as the new state
- ``result`` - A boolean noting... | [
"def",
"unpause",
"(",
"name",
")",
":",
"orig_state",
"=",
"state",
"(",
"name",
")",
"if",
"orig_state",
"==",
"'stopped'",
":",
"return",
"{",
"'result'",
":",
"False",
",",
"'state'",
":",
"{",
"'old'",
":",
"orig_state",
",",
"'new'",
":",
"orig_s... | Unpauses a container
name
Container name or ID
**RETURN DATA**
A dictionary will be returned, containing the following keys:
- ``status`` - A dictionary showing the prior state of the container as
well as the new state
- ``result`` - A boolean noting whether or not the action was ... | [
"Unpauses",
"a",
"container"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/dockermod.py#L5818-L5848 | train | Unpause a container and return a new ID
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/dockermod.py | wait | def wait(name, ignore_already_stopped=False, fail_on_exit_status=False):
'''
Wait for the container to exit gracefully, and return its exit code
.. note::
This function will block until the container is stopped.
name
Container name or ID
ignore_already_stopped
Boolean fla... | python | def wait(name, ignore_already_stopped=False, fail_on_exit_status=False):
'''
Wait for the container to exit gracefully, and return its exit code
.. note::
This function will block until the container is stopped.
name
Container name or ID
ignore_already_stopped
Boolean fla... | [
"def",
"wait",
"(",
"name",
",",
"ignore_already_stopped",
"=",
"False",
",",
"fail_on_exit_status",
"=",
"False",
")",
":",
"try",
":",
"pre",
"=",
"state",
"(",
"name",
")",
"except",
"CommandExecutionError",
":",
"# Container doesn't exist anymore",
"return",
... | Wait for the container to exit gracefully, and return its exit code
.. note::
This function will block until the container is stopped.
name
Container name or ID
ignore_already_stopped
Boolean flag that prevents execution to fail, if a container
is already stopped.
fa... | [
"Wait",
"for",
"the",
"container",
"to",
"exit",
"gracefully",
"and",
"return",
"its",
"exit",
"code"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/dockermod.py#L5854-L5919 | train | Wait for a container to exit gracefully and return its exit code. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/dockermod.py | prune | def prune(containers=False, networks=False, images=False,
build=False, volumes=False, system=None, **filters):
'''
.. versionadded:: 2019.2.0
Prune Docker's various subsystems
.. note::
This requires docker-py version 2.1.0 or later.
containers : False
If ``True``, prune... | python | def prune(containers=False, networks=False, images=False,
build=False, volumes=False, system=None, **filters):
'''
.. versionadded:: 2019.2.0
Prune Docker's various subsystems
.. note::
This requires docker-py version 2.1.0 or later.
containers : False
If ``True``, prune... | [
"def",
"prune",
"(",
"containers",
"=",
"False",
",",
"networks",
"=",
"False",
",",
"images",
"=",
"False",
",",
"build",
"=",
"False",
",",
"volumes",
"=",
"False",
",",
"system",
"=",
"None",
",",
"*",
"*",
"filters",
")",
":",
"if",
"system",
"... | .. versionadded:: 2019.2.0
Prune Docker's various subsystems
.. note::
This requires docker-py version 2.1.0 or later.
containers : False
If ``True``, prunes stopped containers (documentation__)
.. __: https://docs.docker.com/engine/reference/commandline/container_prune/#filterin... | [
"..",
"versionadded",
"::",
"2019",
".",
"2",
".",
"0"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/dockermod.py#L5922-L6020 | train | Prune the given set of containers networks images and build. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/dockermod.py | _run | def _run(name,
cmd,
exec_driver=None,
output=None,
stdin=None,
python_shell=True,
output_loglevel='debug',
ignore_retcode=False,
use_vt=False,
keep_env=None):
'''
Common logic for docker.run functions
'''
if exec_driver is ... | python | def _run(name,
cmd,
exec_driver=None,
output=None,
stdin=None,
python_shell=True,
output_loglevel='debug',
ignore_retcode=False,
use_vt=False,
keep_env=None):
'''
Common logic for docker.run functions
'''
if exec_driver is ... | [
"def",
"_run",
"(",
"name",
",",
"cmd",
",",
"exec_driver",
"=",
"None",
",",
"output",
"=",
"None",
",",
"stdin",
"=",
"None",
",",
"python_shell",
"=",
"True",
",",
"output_loglevel",
"=",
"'debug'",
",",
"ignore_retcode",
"=",
"False",
",",
"use_vt",
... | Common logic for docker.run functions | [
"Common",
"logic",
"for",
"docker",
".",
"run",
"functions"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/dockermod.py#L6025-L6056 | train | Common logic for docker. run functions | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/dockermod.py | _script | def _script(name,
source,
saltenv='base',
args=None,
template=None,
exec_driver=None,
stdin=None,
python_shell=True,
output_loglevel='debug',
ignore_retcode=False,
use_vt=False,
keep_env=N... | python | def _script(name,
source,
saltenv='base',
args=None,
template=None,
exec_driver=None,
stdin=None,
python_shell=True,
output_loglevel='debug',
ignore_retcode=False,
use_vt=False,
keep_env=N... | [
"def",
"_script",
"(",
"name",
",",
"source",
",",
"saltenv",
"=",
"'base'",
",",
"args",
"=",
"None",
",",
"template",
"=",
"None",
",",
"exec_driver",
"=",
"None",
",",
"stdin",
"=",
"None",
",",
"python_shell",
"=",
"True",
",",
"output_loglevel",
"... | Common logic to run a script on a container | [
"Common",
"logic",
"to",
"run",
"a",
"script",
"on",
"a",
"container"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/dockermod.py#L6060-L6128 | train | Common logic to run a script on a container | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/dockermod.py | script | def script(name,
source,
saltenv='base',
args=None,
template=None,
exec_driver=None,
stdin=None,
python_shell=True,
output_loglevel='debug',
ignore_retcode=False,
use_vt=False,
keep_env=None):
''... | python | def script(name,
source,
saltenv='base',
args=None,
template=None,
exec_driver=None,
stdin=None,
python_shell=True,
output_loglevel='debug',
ignore_retcode=False,
use_vt=False,
keep_env=None):
''... | [
"def",
"script",
"(",
"name",
",",
"source",
",",
"saltenv",
"=",
"'base'",
",",
"args",
"=",
"None",
",",
"template",
"=",
"None",
",",
"exec_driver",
"=",
"None",
",",
"stdin",
"=",
"None",
",",
"python_shell",
"=",
"True",
",",
"output_loglevel",
"=... | Run :py:func:`cmd.script <salt.modules.cmdmod.script>` within a container
.. note::
While the command is run within the container, it is initiated from the
host. Therefore, the PID in the return dict is from the host, not from
the container.
name
Container name or ID
sour... | [
"Run",
":",
"py",
":",
"func",
":",
"cmd",
".",
"script",
"<salt",
".",
"modules",
".",
"cmdmod",
".",
"script",
">",
"within",
"a",
"container"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/dockermod.py#L6424-L6499 | train | This function runs a command within a container. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/dockermod.py | _prepare_trans_tar | def _prepare_trans_tar(name, sls_opts, mods=None,
pillar=None, extra_filerefs=''):
'''
Prepares a self contained tarball that has the state
to be applied in the container
'''
chunks = _compile_state(sls_opts, mods)
# reuse it from salt.ssh, however this function should
... | python | def _prepare_trans_tar(name, sls_opts, mods=None,
pillar=None, extra_filerefs=''):
'''
Prepares a self contained tarball that has the state
to be applied in the container
'''
chunks = _compile_state(sls_opts, mods)
# reuse it from salt.ssh, however this function should
... | [
"def",
"_prepare_trans_tar",
"(",
"name",
",",
"sls_opts",
",",
"mods",
"=",
"None",
",",
"pillar",
"=",
"None",
",",
"extra_filerefs",
"=",
"''",
")",
":",
"chunks",
"=",
"_compile_state",
"(",
"sls_opts",
",",
"mods",
")",
"# reuse it from salt.ssh, however ... | Prepares a self contained tarball that has the state
to be applied in the container | [
"Prepares",
"a",
"self",
"contained",
"tarball",
"that",
"has",
"the",
"state",
"to",
"be",
"applied",
"in",
"the",
"container"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/dockermod.py#L6590-L6604 | train | Prepare a tarball that has the state
to be applied in the container | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/dockermod.py | _compile_state | def _compile_state(sls_opts, mods=None):
'''
Generates the chunks of lowdata from the list of modules
'''
st_ = HighState(sls_opts)
if not mods:
return st_.compile_low_chunks()
high_data, errors = st_.render_highstate({sls_opts['saltenv']: mods})
high_data, ext_errors = st_.state.r... | python | def _compile_state(sls_opts, mods=None):
'''
Generates the chunks of lowdata from the list of modules
'''
st_ = HighState(sls_opts)
if not mods:
return st_.compile_low_chunks()
high_data, errors = st_.render_highstate({sls_opts['saltenv']: mods})
high_data, ext_errors = st_.state.r... | [
"def",
"_compile_state",
"(",
"sls_opts",
",",
"mods",
"=",
"None",
")",
":",
"st_",
"=",
"HighState",
"(",
"sls_opts",
")",
"if",
"not",
"mods",
":",
"return",
"st_",
".",
"compile_low_chunks",
"(",
")",
"high_data",
",",
"errors",
"=",
"st_",
".",
"r... | Generates the chunks of lowdata from the list of modules | [
"Generates",
"the",
"chunks",
"of",
"lowdata",
"from",
"the",
"list",
"of",
"modules"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/dockermod.py#L6607-L6631 | train | Generates the lowdata from the modules and returns the highdata as a string. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/dockermod.py | call | def call(name, function, *args, **kwargs):
'''
Executes a Salt function inside a running container
.. versionadded:: 2016.11.0
The container does not need to have Salt installed, but Python is required.
name
Container name or ID
function
Salt execution module function
CL... | python | def call(name, function, *args, **kwargs):
'''
Executes a Salt function inside a running container
.. versionadded:: 2016.11.0
The container does not need to have Salt installed, but Python is required.
name
Container name or ID
function
Salt execution module function
CL... | [
"def",
"call",
"(",
"name",
",",
"function",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"# where to put the salt-thin",
"thin_dest_path",
"=",
"_generate_tmp_path",
"(",
")",
"mkdirp_thin_argv",
"=",
"[",
"'mkdir'",
",",
"'-p'",
",",
"thin_dest_path"... | Executes a Salt function inside a running container
.. versionadded:: 2016.11.0
The container does not need to have Salt installed, but Python is required.
name
Container name or ID
function
Salt execution module function
CLI Example:
.. code-block:: bash
salt mymi... | [
"Executes",
"a",
"Salt",
"function",
"inside",
"a",
"running",
"container"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/dockermod.py#L6634-L6720 | train | Executes a Salt function inside a running container. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/dockermod.py | apply_ | def apply_(name, mods=None, **kwargs):
'''
.. versionadded:: 2019.2.0
Apply states! This function will call highstate or state.sls based on the
arguments passed in, ``apply`` is intended to be the main gateway for
all state executions.
CLI Example:
.. code-block:: bash
salt 'dock... | python | def apply_(name, mods=None, **kwargs):
'''
.. versionadded:: 2019.2.0
Apply states! This function will call highstate or state.sls based on the
arguments passed in, ``apply`` is intended to be the main gateway for
all state executions.
CLI Example:
.. code-block:: bash
salt 'dock... | [
"def",
"apply_",
"(",
"name",
",",
"mods",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"mods",
":",
"return",
"sls",
"(",
"name",
",",
"mods",
",",
"*",
"*",
"kwargs",
")",
"return",
"highstate",
"(",
"name",
",",
"*",
"*",
"kwargs",
... | .. versionadded:: 2019.2.0
Apply states! This function will call highstate or state.sls based on the
arguments passed in, ``apply`` is intended to be the main gateway for
all state executions.
CLI Example:
.. code-block:: bash
salt 'docker' docker.apply web01
salt 'docker' docker... | [
"..",
"versionadded",
"::",
"2019",
".",
"2",
".",
"0"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/dockermod.py#L6723-L6741 | train | This function is used to apply states to a single object. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/dockermod.py | sls | def sls(name, mods=None, **kwargs):
'''
Apply the states defined by the specified SLS modules to the running
container
.. versionadded:: 2016.11.0
The container does not need to have Salt installed, but Python is required.
name
Container name or ID
mods : None
A string co... | python | def sls(name, mods=None, **kwargs):
'''
Apply the states defined by the specified SLS modules to the running
container
.. versionadded:: 2016.11.0
The container does not need to have Salt installed, but Python is required.
name
Container name or ID
mods : None
A string co... | [
"def",
"sls",
"(",
"name",
",",
"mods",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"mods",
"=",
"[",
"item",
".",
"strip",
"(",
")",
"for",
"item",
"in",
"mods",
".",
"split",
"(",
"','",
")",
"]",
"if",
"mods",
"else",
"[",
"]",
"# Figu... | Apply the states defined by the specified SLS modules to the running
container
.. versionadded:: 2016.11.0
The container does not need to have Salt installed, but Python is required.
name
Container name or ID
mods : None
A string containing comma-separated list of SLS with define... | [
"Apply",
"the",
"states",
"defined",
"by",
"the",
"specified",
"SLS",
"modules",
"to",
"the",
"running",
"container"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/dockermod.py#L6744-L6858 | train | Return a running SLS container with the specified states defined by the specified modules. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/dockermod.py | sls_build | def sls_build(repository,
tag='latest',
base='opensuse/python',
mods=None,
dryrun=False,
**kwargs):
'''
.. versionchanged:: 2018.3.0
The repository and tag must now be passed separately using the
``repository`` and ``tag`` arg... | python | def sls_build(repository,
tag='latest',
base='opensuse/python',
mods=None,
dryrun=False,
**kwargs):
'''
.. versionchanged:: 2018.3.0
The repository and tag must now be passed separately using the
``repository`` and ``tag`` arg... | [
"def",
"sls_build",
"(",
"repository",
",",
"tag",
"=",
"'latest'",
",",
"base",
"=",
"'opensuse/python'",
",",
"mods",
"=",
"None",
",",
"dryrun",
"=",
"False",
",",
"*",
"*",
"kwargs",
")",
":",
"create_kwargs",
"=",
"__utils__",
"[",
"'args.clean_kwargs... | .. versionchanged:: 2018.3.0
The repository and tag must now be passed separately using the
``repository`` and ``tag`` arguments, rather than together in the (now
deprecated) ``image`` argument.
Build a Docker image using the specified SLS modules on top of base image
.. versionadded::... | [
"..",
"versionchanged",
"::",
"2018",
".",
"3",
".",
"0",
"The",
"repository",
"and",
"tag",
"must",
"now",
"be",
"passed",
"separately",
"using",
"the",
"repository",
"and",
"tag",
"arguments",
"rather",
"than",
"together",
"in",
"the",
"(",
"now",
"depre... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/dockermod.py#L6886-L6991 | train | Build a new SLS image using the specified repository and tag. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/netntp.py | _check | def _check(peers):
'''Checks whether the input is a valid list of peers and transforms domain names into IP Addresses'''
if not isinstance(peers, list):
return False
for peer in peers:
if not isinstance(peer, six.string_types):
return False
if not HAS_NETADDR: # if does ... | python | def _check(peers):
'''Checks whether the input is a valid list of peers and transforms domain names into IP Addresses'''
if not isinstance(peers, list):
return False
for peer in peers:
if not isinstance(peer, six.string_types):
return False
if not HAS_NETADDR: # if does ... | [
"def",
"_check",
"(",
"peers",
")",
":",
"if",
"not",
"isinstance",
"(",
"peers",
",",
"list",
")",
":",
"return",
"False",
"for",
"peer",
"in",
"peers",
":",
"if",
"not",
"isinstance",
"(",
"peer",
",",
"six",
".",
"string_types",
")",
":",
"return"... | Checks whether the input is a valid list of peers and transforms domain names into IP Addresses | [
"Checks",
"whether",
"the",
"input",
"is",
"a",
"valid",
"list",
"of",
"peers",
"and",
"transforms",
"domain",
"names",
"into",
"IP",
"Addresses"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/netntp.py#L105-L142 | train | Checks whether the input is a valid list of peers and transforms domain names into IP Addresses | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/netntp.py | managed | def managed(name, peers=None, servers=None):
'''
Manages the configuration of NTP peers and servers on the device, as specified in the state SLS file.
NTP entities not specified in these lists will be removed whilst entities not configured on the device will be set.
SLS Example:
.. code-block:: y... | python | def managed(name, peers=None, servers=None):
'''
Manages the configuration of NTP peers and servers on the device, as specified in the state SLS file.
NTP entities not specified in these lists will be removed whilst entities not configured on the device will be set.
SLS Example:
.. code-block:: y... | [
"def",
"managed",
"(",
"name",
",",
"peers",
"=",
"None",
",",
"servers",
"=",
"None",
")",
":",
"ret",
"=",
"_default_ret",
"(",
"name",
")",
"result",
"=",
"ret",
".",
"get",
"(",
"'result'",
",",
"False",
")",
"comment",
"=",
"ret",
".",
"get",
... | Manages the configuration of NTP peers and servers on the device, as specified in the state SLS file.
NTP entities not specified in these lists will be removed whilst entities not configured on the device will be set.
SLS Example:
.. code-block:: yaml
netntp_example:
netntp.managed:
... | [
"Manages",
"the",
"configuration",
"of",
"NTP",
"peers",
"and",
"servers",
"on",
"the",
"device",
"as",
"specified",
"in",
"the",
"state",
"SLS",
"file",
".",
"NTP",
"entities",
"not",
"specified",
"in",
"these",
"lists",
"will",
"be",
"removed",
"whilst",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/netntp.py#L287-L409 | train | Manage the configuration of NTP peers and servers on the device. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/lvs.py | add_service | def add_service(protocol=None, service_address=None, scheduler='wlc'):
'''
Add a virtual service.
protocol
The service protocol(only support tcp, udp and fwmark service).
service_address
The LVS service address.
scheduler
Algorithm for allocating TCP connections and UDP da... | python | def add_service(protocol=None, service_address=None, scheduler='wlc'):
'''
Add a virtual service.
protocol
The service protocol(only support tcp, udp and fwmark service).
service_address
The LVS service address.
scheduler
Algorithm for allocating TCP connections and UDP da... | [
"def",
"add_service",
"(",
"protocol",
"=",
"None",
",",
"service_address",
"=",
"None",
",",
"scheduler",
"=",
"'wlc'",
")",
":",
"cmd",
"=",
"'{0} -A {1}'",
".",
"format",
"(",
"__detect_os",
"(",
")",
",",
"_build_cmd",
"(",
"protocol",
"=",
"protocol",... | Add a virtual service.
protocol
The service protocol(only support tcp, udp and fwmark service).
service_address
The LVS service address.
scheduler
Algorithm for allocating TCP connections and UDP datagrams to real servers.
CLI Example:
.. code-block:: bash
salt... | [
"Add",
"a",
"virtual",
"service",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lvs.py#L88-L120 | train | Add a virtual service to the LVS. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/boto_kinesis.py | present | def present(name,
retention_hours=None,
enhanced_monitoring=None,
num_shards=None,
do_reshard=True,
region=None,
key=None,
keyid=None,
profile=None):
'''
Ensure the kinesis stream is properly configured and scaled.
... | python | def present(name,
retention_hours=None,
enhanced_monitoring=None,
num_shards=None,
do_reshard=True,
region=None,
key=None,
keyid=None,
profile=None):
'''
Ensure the kinesis stream is properly configured and scaled.
... | [
"def",
"present",
"(",
"name",
",",
"retention_hours",
"=",
"None",
",",
"enhanced_monitoring",
"=",
"None",
",",
"num_shards",
"=",
"None",
",",
"do_reshard",
"=",
"True",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
... | Ensure the kinesis stream is properly configured and scaled.
name (string)
Stream name
retention_hours (int)
Retain data for this many hours.
AWS allows minimum 24 hours, maximum 168 hours.
enhanced_monitoring (list of string)
Turn on enhanced monitoring for the specified ... | [
"Ensure",
"the",
"kinesis",
"stream",
"is",
"properly",
"configured",
"and",
"scaled",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_kinesis.py#L78-L384 | train | Ensure the kinesis stream exists and contains data for the specified 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/bsd_shadow.py | info | def info(name):
'''
Return information for the specified user
CLI Example:
.. code-block:: bash
salt '*' shadow.info someuser
'''
try:
data = pwd.getpwnam(name)
ret = {
'name': data.pw_name,
'passwd': data.pw_passwd}
except KeyError:
... | python | def info(name):
'''
Return information for the specified user
CLI Example:
.. code-block:: bash
salt '*' shadow.info someuser
'''
try:
data = pwd.getpwnam(name)
ret = {
'name': data.pw_name,
'passwd': data.pw_passwd}
except KeyError:
... | [
"def",
"info",
"(",
"name",
")",
":",
"try",
":",
"data",
"=",
"pwd",
".",
"getpwnam",
"(",
"name",
")",
"ret",
"=",
"{",
"'name'",
":",
"data",
".",
"pw_name",
",",
"'passwd'",
":",
"data",
".",
"pw_passwd",
"}",
"except",
"KeyError",
":",
"return... | Return information for the specified user
CLI Example:
.. code-block:: bash
salt '*' shadow.info someuser | [
"Return",
"information",
"for",
"the",
"specified",
"user"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bsd_shadow.py#L49-L103 | train | Return information for the specified user
CLI Example : bash
salt '*' shadow. info someuser
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/bsd_shadow.py | set_change | def set_change(name, change):
'''
Sets the time at which the password expires (in seconds since the UNIX
epoch). See ``man 8 usermod`` on NetBSD and OpenBSD or ``man 8 pw`` on
FreeBSD.
A value of ``0`` sets the password to never expire.
CLI Example:
.. code-block:: bash
salt '*' ... | python | def set_change(name, change):
'''
Sets the time at which the password expires (in seconds since the UNIX
epoch). See ``man 8 usermod`` on NetBSD and OpenBSD or ``man 8 pw`` on
FreeBSD.
A value of ``0`` sets the password to never expire.
CLI Example:
.. code-block:: bash
salt '*' ... | [
"def",
"set_change",
"(",
"name",
",",
"change",
")",
":",
"pre_info",
"=",
"info",
"(",
"name",
")",
"if",
"change",
"==",
"pre_info",
"[",
"'change'",
"]",
":",
"return",
"True",
"if",
"__grains__",
"[",
"'kernel'",
"]",
"==",
"'FreeBSD'",
":",
"cmd"... | Sets the time at which the password expires (in seconds since the UNIX
epoch). See ``man 8 usermod`` on NetBSD and OpenBSD or ``man 8 pw`` on
FreeBSD.
A value of ``0`` sets the password to never expire.
CLI Example:
.. code-block:: bash
salt '*' shadow.set_change username 1419980400 | [
"Sets",
"the",
"time",
"at",
"which",
"the",
"password",
"expires",
"(",
"in",
"seconds",
"since",
"the",
"UNIX",
"epoch",
")",
".",
"See",
"man",
"8",
"usermod",
"on",
"NetBSD",
"and",
"OpenBSD",
"or",
"man",
"8",
"pw",
"on",
"FreeBSD",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bsd_shadow.py#L106-L130 | train | Sets the time at which the password expires in the UNIX
epoch. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/bsd_shadow.py | set_expire | def set_expire(name, expire):
'''
Sets the time at which the account expires (in seconds since the UNIX
epoch). See ``man 8 usermod`` on NetBSD and OpenBSD or ``man 8 pw`` on
FreeBSD.
A value of ``0`` sets the account to never expire.
CLI Example:
.. code-block:: bash
salt '*' sh... | python | def set_expire(name, expire):
'''
Sets the time at which the account expires (in seconds since the UNIX
epoch). See ``man 8 usermod`` on NetBSD and OpenBSD or ``man 8 pw`` on
FreeBSD.
A value of ``0`` sets the account to never expire.
CLI Example:
.. code-block:: bash
salt '*' sh... | [
"def",
"set_expire",
"(",
"name",
",",
"expire",
")",
":",
"pre_info",
"=",
"info",
"(",
"name",
")",
"if",
"expire",
"==",
"pre_info",
"[",
"'expire'",
"]",
":",
"return",
"True",
"if",
"__grains__",
"[",
"'kernel'",
"]",
"==",
"'FreeBSD'",
":",
"cmd"... | Sets the time at which the account expires (in seconds since the UNIX
epoch). See ``man 8 usermod`` on NetBSD and OpenBSD or ``man 8 pw`` on
FreeBSD.
A value of ``0`` sets the account to never expire.
CLI Example:
.. code-block:: bash
salt '*' shadow.set_expire username 1419980400 | [
"Sets",
"the",
"time",
"at",
"which",
"the",
"account",
"expires",
"(",
"in",
"seconds",
"since",
"the",
"UNIX",
"epoch",
")",
".",
"See",
"man",
"8",
"usermod",
"on",
"NetBSD",
"and",
"OpenBSD",
"or",
"man",
"8",
"pw",
"on",
"FreeBSD",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bsd_shadow.py#L133-L157 | train | Sets the time at which the account expires in seconds since the UNIX
epoch. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/bsd_shadow.py | set_password | def set_password(name, password):
'''
Set the password for a named user. The password must be a properly defined
hash. The password hash can be generated with this command:
``python -c "import crypt; print crypt.crypt('password', ciphersalt)"``
.. note::
When constructing the ``ciphersalt`... | python | def set_password(name, password):
'''
Set the password for a named user. The password must be a properly defined
hash. The password hash can be generated with this command:
``python -c "import crypt; print crypt.crypt('password', ciphersalt)"``
.. note::
When constructing the ``ciphersalt`... | [
"def",
"set_password",
"(",
"name",
",",
"password",
")",
":",
"if",
"__grains__",
".",
"get",
"(",
"'os'",
",",
"''",
")",
"==",
"'FreeBSD'",
":",
"cmd",
"=",
"[",
"'pw'",
",",
"'user'",
",",
"'mod'",
",",
"name",
",",
"'-H'",
",",
"'0'",
"]",
"... | Set the password for a named user. The password must be a properly defined
hash. The password hash can be generated with this command:
``python -c "import crypt; print crypt.crypt('password', ciphersalt)"``
.. note::
When constructing the ``ciphersalt`` string, you must escape any dollar
s... | [
"Set",
"the",
"password",
"for",
"a",
"named",
"user",
".",
"The",
"password",
"must",
"be",
"a",
"properly",
"defined",
"hash",
".",
"The",
"password",
"hash",
"can",
"be",
"generated",
"with",
"this",
"command",
":"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bsd_shadow.py#L178-L216 | train | Sets the password for a named user. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/netapi/rest_tornado/saltnado_websockets.py | AllEventsHandler.get | def get(self, token):
'''
Check the token, returns a 401 if the token is invalid.
Else open the websocket connection
'''
log.debug('In the websocket get method')
self.token = token
# close the connection, if not authenticated
if not self.application.auth.... | python | def get(self, token):
'''
Check the token, returns a 401 if the token is invalid.
Else open the websocket connection
'''
log.debug('In the websocket get method')
self.token = token
# close the connection, if not authenticated
if not self.application.auth.... | [
"def",
"get",
"(",
"self",
",",
"token",
")",
":",
"log",
".",
"debug",
"(",
"'In the websocket get method'",
")",
"self",
".",
"token",
"=",
"token",
"# close the connection, if not authenticated",
"if",
"not",
"self",
".",
"application",
".",
"auth",
".",
"g... | Check the token, returns a 401 if the token is invalid.
Else open the websocket connection | [
"Check",
"the",
"token",
"returns",
"a",
"401",
"if",
"the",
"token",
"is",
"invalid",
".",
"Else",
"open",
"the",
"websocket",
"connection"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/netapi/rest_tornado/saltnado_websockets.py#L315-L328 | train | Check the token returns a 401 if the token is invalid. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/netapi/rest_tornado/saltnado_websockets.py | AllEventsHandler.on_message | def on_message(self, message):
"""Listens for a "websocket client ready" message.
Once that message is received an asynchronous job
is stated that yields messages to the client.
These messages make up salt's
"real time" event stream.
"""
log.debug('Got websocket m... | python | def on_message(self, message):
"""Listens for a "websocket client ready" message.
Once that message is received an asynchronous job
is stated that yields messages to the client.
These messages make up salt's
"real time" event stream.
"""
log.debug('Got websocket m... | [
"def",
"on_message",
"(",
"self",
",",
"message",
")",
":",
"log",
".",
"debug",
"(",
"'Got websocket message %s'",
",",
"message",
")",
"if",
"message",
"==",
"'websocket client ready'",
":",
"if",
"self",
".",
"connected",
":",
"# TBD: Add ability to run command... | Listens for a "websocket client ready" message.
Once that message is received an asynchronous job
is stated that yields messages to the client.
These messages make up salt's
"real time" event stream. | [
"Listens",
"for",
"a",
"websocket",
"client",
"ready",
"message",
".",
"Once",
"that",
"message",
"is",
"received",
"an",
"asynchronous",
"job",
"is",
"stated",
"that",
"yields",
"messages",
"to",
"the",
"client",
".",
"These",
"messages",
"make",
"up",
"sal... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/netapi/rest_tornado/saltnado_websockets.py#L338-L366 | train | Called when a message is received from the server side websocket. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/netapi/rest_tornado/saltnado_websockets.py | AllEventsHandler.check_origin | def check_origin(self, origin):
"""
If cors is enabled, check that the origin is allowed
"""
mod_opts = self.application.mod_opts
if mod_opts.get('cors_origin'):
return bool(_check_cors_origin(origin, mod_opts['cors_origin']))
else:
return super(... | python | def check_origin(self, origin):
"""
If cors is enabled, check that the origin is allowed
"""
mod_opts = self.application.mod_opts
if mod_opts.get('cors_origin'):
return bool(_check_cors_origin(origin, mod_opts['cors_origin']))
else:
return super(... | [
"def",
"check_origin",
"(",
"self",
",",
"origin",
")",
":",
"mod_opts",
"=",
"self",
".",
"application",
".",
"mod_opts",
"if",
"mod_opts",
".",
"get",
"(",
"'cors_origin'",
")",
":",
"return",
"bool",
"(",
"_check_cors_origin",
"(",
"origin",
",",
"mod_o... | If cors is enabled, check that the origin is allowed | [
"If",
"cors",
"is",
"enabled",
"check",
"that",
"the",
"origin",
"is",
"allowed"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/netapi/rest_tornado/saltnado_websockets.py#L375-L385 | train | Check that the origin is allowed by the All Events Handler. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/netapi/rest_tornado/saltnado_websockets.py | FormattedEventsHandler.on_message | def on_message(self, message):
"""Listens for a "websocket client ready" message.
Once that message is received an asynchronous job
is stated that yields messages to the client.
These messages make up salt's
"real time" event stream.
"""
log.debug('Got websocket m... | python | def on_message(self, message):
"""Listens for a "websocket client ready" message.
Once that message is received an asynchronous job
is stated that yields messages to the client.
These messages make up salt's
"real time" event stream.
"""
log.debug('Got websocket m... | [
"def",
"on_message",
"(",
"self",
",",
"message",
")",
":",
"log",
".",
"debug",
"(",
"'Got websocket message %s'",
",",
"message",
")",
"if",
"message",
"==",
"'websocket client ready'",
":",
"if",
"self",
".",
"connected",
":",
"# TBD: Add ability to run command... | Listens for a "websocket client ready" message.
Once that message is received an asynchronous job
is stated that yields messages to the client.
These messages make up salt's
"real time" event stream. | [
"Listens",
"for",
"a",
"websocket",
"client",
"ready",
"message",
".",
"Once",
"that",
"message",
"is",
"received",
"an",
"asynchronous",
"job",
"is",
"stated",
"that",
"yields",
"messages",
"to",
"the",
"client",
".",
"These",
"messages",
"make",
"up",
"sal... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/netapi/rest_tornado/saltnado_websockets.py#L391-L429 | train | Handle a message received from the server side websocket. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/supervisord.py | _get_supervisorctl_bin | def _get_supervisorctl_bin(bin_env):
'''
Return supervisorctl command to call, either from a virtualenv, an argument
passed in, or from the global modules options
'''
cmd = 'supervisorctl'
if not bin_env:
which_result = __salt__['cmd.which_bin']([cmd])
if which_result is None:
... | python | def _get_supervisorctl_bin(bin_env):
'''
Return supervisorctl command to call, either from a virtualenv, an argument
passed in, or from the global modules options
'''
cmd = 'supervisorctl'
if not bin_env:
which_result = __salt__['cmd.which_bin']([cmd])
if which_result is None:
... | [
"def",
"_get_supervisorctl_bin",
"(",
"bin_env",
")",
":",
"cmd",
"=",
"'supervisorctl'",
"if",
"not",
"bin_env",
":",
"which_result",
"=",
"__salt__",
"[",
"'cmd.which_bin'",
"]",
"(",
"[",
"cmd",
"]",
")",
"if",
"which_result",
"is",
"None",
":",
"raise",
... | Return supervisorctl command to call, either from a virtualenv, an argument
passed in, or from the global modules options | [
"Return",
"supervisorctl",
"command",
"to",
"call",
"either",
"from",
"a",
"virtualenv",
"an",
"argument",
"passed",
"in",
"or",
"from",
"the",
"global",
"modules",
"options"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/supervisord.py#L28-L49 | train | Return supervisorctl command to call either from a virtualenv an argument
passed in or from the global modules options
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/supervisord.py | _ctl_cmd | def _ctl_cmd(cmd, name, conf_file, bin_env):
'''
Return the command list to use
'''
ret = [_get_supervisorctl_bin(bin_env)]
if conf_file is not None:
ret += ['-c', conf_file]
ret.append(cmd)
if name:
ret.append(name)
return ret | python | def _ctl_cmd(cmd, name, conf_file, bin_env):
'''
Return the command list to use
'''
ret = [_get_supervisorctl_bin(bin_env)]
if conf_file is not None:
ret += ['-c', conf_file]
ret.append(cmd)
if name:
ret.append(name)
return ret | [
"def",
"_ctl_cmd",
"(",
"cmd",
",",
"name",
",",
"conf_file",
",",
"bin_env",
")",
":",
"ret",
"=",
"[",
"_get_supervisorctl_bin",
"(",
"bin_env",
")",
"]",
"if",
"conf_file",
"is",
"not",
"None",
":",
"ret",
"+=",
"[",
"'-c'",
",",
"conf_file",
"]",
... | Return the command list to use | [
"Return",
"the",
"command",
"list",
"to",
"use"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/supervisord.py#L52-L62 | train | Return the command list to use for controlling the current environment | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/supervisord.py | start | def start(name='all', user=None, conf_file=None, bin_env=None):
'''
Start the named service.
Process group names should not include a trailing asterisk.
user
user to run supervisorctl as
conf_file
path to supervisord config file
bin_env
path to supervisorctl bin or path ... | python | def start(name='all', user=None, conf_file=None, bin_env=None):
'''
Start the named service.
Process group names should not include a trailing asterisk.
user
user to run supervisorctl as
conf_file
path to supervisord config file
bin_env
path to supervisorctl bin or path ... | [
"def",
"start",
"(",
"name",
"=",
"'all'",
",",
"user",
"=",
"None",
",",
"conf_file",
"=",
"None",
",",
"bin_env",
"=",
"None",
")",
":",
"if",
"name",
".",
"endswith",
"(",
"':*'",
")",
":",
"name",
"=",
"name",
"[",
":",
"-",
"1",
"]",
"ret"... | Start the named service.
Process group names should not include a trailing asterisk.
user
user to run supervisorctl as
conf_file
path to supervisord config file
bin_env
path to supervisorctl bin or path to virtualenv with supervisor
installed
CLI Example:
.. co... | [
"Start",
"the",
"named",
"service",
".",
"Process",
"group",
"names",
"should",
"not",
"include",
"a",
"trailing",
"asterisk",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/supervisord.py#L72-L99 | train | Start the named service. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/supervisord.py | reread | def reread(user=None, conf_file=None, bin_env=None):
'''
Reload the daemon's configuration files
user
user to run supervisorctl as
conf_file
path to supervisord config file
bin_env
path to supervisorctl bin or path to virtualenv with supervisor
installed
CLI Exa... | python | def reread(user=None, conf_file=None, bin_env=None):
'''
Reload the daemon's configuration files
user
user to run supervisorctl as
conf_file
path to supervisord config file
bin_env
path to supervisorctl bin or path to virtualenv with supervisor
installed
CLI Exa... | [
"def",
"reread",
"(",
"user",
"=",
"None",
",",
"conf_file",
"=",
"None",
",",
"bin_env",
"=",
"None",
")",
":",
"ret",
"=",
"__salt__",
"[",
"'cmd.run_all'",
"]",
"(",
"_ctl_cmd",
"(",
"'reread'",
",",
"None",
",",
"conf_file",
",",
"bin_env",
")",
... | Reload the daemon's configuration files
user
user to run supervisorctl as
conf_file
path to supervisord config file
bin_env
path to supervisorctl bin or path to virtualenv with supervisor
installed
CLI Example:
.. code-block:: bash
salt '*' supervisord.rer... | [
"Reload",
"the",
"daemon",
"s",
"configuration",
"files"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/supervisord.py#L222-L245 | train | Reload the daemon s configuration files and run the supervisorctl reread command | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/supervisord.py | update | def update(user=None, conf_file=None, bin_env=None, name=None):
'''
Reload config and add/remove/update as necessary
user
user to run supervisorctl as
conf_file
path to supervisord config file
bin_env
path to supervisorctl bin or path to virtualenv with supervisor
in... | python | def update(user=None, conf_file=None, bin_env=None, name=None):
'''
Reload config and add/remove/update as necessary
user
user to run supervisorctl as
conf_file
path to supervisord config file
bin_env
path to supervisorctl bin or path to virtualenv with supervisor
in... | [
"def",
"update",
"(",
"user",
"=",
"None",
",",
"conf_file",
"=",
"None",
",",
"bin_env",
"=",
"None",
",",
"name",
"=",
"None",
")",
":",
"if",
"isinstance",
"(",
"name",
",",
"string_types",
")",
":",
"if",
"name",
".",
"endswith",
"(",
"':'",
")... | Reload config and add/remove/update as necessary
user
user to run supervisorctl as
conf_file
path to supervisord config file
bin_env
path to supervisorctl bin or path to virtualenv with supervisor
installed
name
name of the process group to update. if none then u... | [
"Reload",
"config",
"and",
"add",
"/",
"remove",
"/",
"update",
"as",
"necessary"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/supervisord.py#L248-L281 | train | Reload config and add or remove update as necessary
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/supervisord.py | status | def status(name=None, user=None, conf_file=None, bin_env=None):
'''
List programs and its state
user
user to run supervisorctl as
conf_file
path to supervisord config file
bin_env
path to supervisorctl bin or path to virtualenv with supervisor
installed
CLI Exam... | python | def status(name=None, user=None, conf_file=None, bin_env=None):
'''
List programs and its state
user
user to run supervisorctl as
conf_file
path to supervisord config file
bin_env
path to supervisorctl bin or path to virtualenv with supervisor
installed
CLI Exam... | [
"def",
"status",
"(",
"name",
"=",
"None",
",",
"user",
"=",
"None",
",",
"conf_file",
"=",
"None",
",",
"bin_env",
"=",
"None",
")",
":",
"all_process",
"=",
"{",
"}",
"for",
"line",
"in",
"status_raw",
"(",
"name",
",",
"user",
",",
"conf_file",
... | List programs and its state
user
user to run supervisorctl as
conf_file
path to supervisord config file
bin_env
path to supervisorctl bin or path to virtualenv with supervisor
installed
CLI Example:
.. code-block:: bash
salt '*' supervisord.status | [
"List",
"programs",
"and",
"its",
"state"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/supervisord.py#L284-L309 | train | Return a dict of all programs and its state | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/supervisord.py | status_raw | def status_raw(name=None, user=None, conf_file=None, bin_env=None):
'''
Display the raw output of status
user
user to run supervisorctl as
conf_file
path to supervisord config file
bin_env
path to supervisorctl bin or path to virtualenv with supervisor
installed
... | python | def status_raw(name=None, user=None, conf_file=None, bin_env=None):
'''
Display the raw output of status
user
user to run supervisorctl as
conf_file
path to supervisord config file
bin_env
path to supervisorctl bin or path to virtualenv with supervisor
installed
... | [
"def",
"status_raw",
"(",
"name",
"=",
"None",
",",
"user",
"=",
"None",
",",
"conf_file",
"=",
"None",
",",
"bin_env",
"=",
"None",
")",
":",
"ret",
"=",
"__salt__",
"[",
"'cmd.run_all'",
"]",
"(",
"_ctl_cmd",
"(",
"'status'",
",",
"name",
",",
"con... | Display the raw output of status
user
user to run supervisorctl as
conf_file
path to supervisord config file
bin_env
path to supervisorctl bin or path to virtualenv with supervisor
installed
CLI Example:
.. code-block:: bash
salt '*' supervisord.status_raw | [
"Display",
"the",
"raw",
"output",
"of",
"status"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/supervisord.py#L312-L335 | train | Display the raw output of supervisorctl status | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/supervisord.py | custom | def custom(command, user=None, conf_file=None, bin_env=None):
'''
Run any custom supervisord command
user
user to run supervisorctl as
conf_file
path to supervisord config file
bin_env
path to supervisorctl bin or path to virtualenv with supervisor
installed
CLI... | python | def custom(command, user=None, conf_file=None, bin_env=None):
'''
Run any custom supervisord command
user
user to run supervisorctl as
conf_file
path to supervisord config file
bin_env
path to supervisorctl bin or path to virtualenv with supervisor
installed
CLI... | [
"def",
"custom",
"(",
"command",
",",
"user",
"=",
"None",
",",
"conf_file",
"=",
"None",
",",
"bin_env",
"=",
"None",
")",
":",
"ret",
"=",
"__salt__",
"[",
"'cmd.run_all'",
"]",
"(",
"_ctl_cmd",
"(",
"command",
",",
"None",
",",
"conf_file",
",",
"... | Run any custom supervisord command
user
user to run supervisorctl as
conf_file
path to supervisord config file
bin_env
path to supervisorctl bin or path to virtualenv with supervisor
installed
CLI Example:
.. code-block:: bash
salt '*' supervisord.custom "... | [
"Run",
"any",
"custom",
"supervisord",
"command"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/supervisord.py#L338-L361 | train | Run any custom supervisord command | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/supervisord.py | _read_config | def _read_config(conf_file=None):
'''
Reads the config file using configparser
'''
if conf_file is None:
paths = ('/etc/supervisor/supervisord.conf', '/etc/supervisord.conf')
for path in paths:
if os.path.exists(path):
conf_file = path
break
... | python | def _read_config(conf_file=None):
'''
Reads the config file using configparser
'''
if conf_file is None:
paths = ('/etc/supervisor/supervisord.conf', '/etc/supervisord.conf')
for path in paths:
if os.path.exists(path):
conf_file = path
break
... | [
"def",
"_read_config",
"(",
"conf_file",
"=",
"None",
")",
":",
"if",
"conf_file",
"is",
"None",
":",
"paths",
"=",
"(",
"'/etc/supervisor/supervisord.conf'",
",",
"'/etc/supervisord.conf'",
")",
"for",
"path",
"in",
"paths",
":",
"if",
"os",
".",
"path",
".... | Reads the config file using configparser | [
"Reads",
"the",
"config",
"file",
"using",
"configparser"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/supervisord.py#L366-L385 | train | Reads the config file using configparser
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/supervisord.py | options | def options(name, conf_file=None):
'''
.. versionadded:: 2014.1.0
Read the config file and return the config options for a given process
name
Name of the configured process
conf_file
path to supervisord config file
CLI Example:
.. code-block:: bash
salt '*' super... | python | def options(name, conf_file=None):
'''
.. versionadded:: 2014.1.0
Read the config file and return the config options for a given process
name
Name of the configured process
conf_file
path to supervisord config file
CLI Example:
.. code-block:: bash
salt '*' super... | [
"def",
"options",
"(",
"name",
",",
"conf_file",
"=",
"None",
")",
":",
"config",
"=",
"_read_config",
"(",
"conf_file",
")",
"section_name",
"=",
"'program:{0}'",
".",
"format",
"(",
"name",
")",
"if",
"section_name",
"not",
"in",
"config",
".",
"sections... | .. versionadded:: 2014.1.0
Read the config file and return the config options for a given process
name
Name of the configured process
conf_file
path to supervisord config file
CLI Example:
.. code-block:: bash
salt '*' supervisord.options foo | [
"..",
"versionadded",
"::",
"2014",
".",
"1",
".",
"0"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/supervisord.py#L388-L420 | train | Return the options for a given process | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/logadm.py | rotate | def rotate(name, **kwargs):
'''
Add a log to the logadm configuration
name : string
alias for entryname
kwargs : boolean|string|int
optional additional flags and parameters
'''
ret = {'name': name,
'changes': {},
'result': None,
'comment': ''}
... | python | def rotate(name, **kwargs):
'''
Add a log to the logadm configuration
name : string
alias for entryname
kwargs : boolean|string|int
optional additional flags and parameters
'''
ret = {'name': name,
'changes': {},
'result': None,
'comment': ''}
... | [
"def",
"rotate",
"(",
"name",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":",
"{",
"}",
",",
"'result'",
":",
"None",
",",
"'comment'",
":",
"''",
"}",
"# cleanup kwargs",
"kwargs",
"=",
"salt",
"."... | Add a log to the logadm configuration
name : string
alias for entryname
kwargs : boolean|string|int
optional additional flags and parameters | [
"Add",
"a",
"log",
"to",
"the",
"logadm",
"configuration"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/logadm.py#L48-L114 | train | Rotate a log from the logadm configuration to the logadm 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/states/logadm.py | remove | def remove(name, log_file=None):
'''
Remove a log from the logadm configuration
name : string
entryname
log_file : string
(optional) log file path
.. note::
If log_file is specified it will be used instead of the entry name.
'''
ret = {'name': name,
'cha... | python | def remove(name, log_file=None):
'''
Remove a log from the logadm configuration
name : string
entryname
log_file : string
(optional) log file path
.. note::
If log_file is specified it will be used instead of the entry name.
'''
ret = {'name': name,
'cha... | [
"def",
"remove",
"(",
"name",
",",
"log_file",
"=",
"None",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":",
"{",
"}",
",",
"'result'",
":",
"None",
",",
"'comment'",
":",
"''",
"}",
"# retrieve all log configuration",
"config",
... | Remove a log from the logadm configuration
name : string
entryname
log_file : string
(optional) log file path
.. note::
If log_file is specified it will be used instead of the entry name. | [
"Remove",
"a",
"log",
"from",
"the",
"logadm",
"configuration"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/logadm.py#L117-L168 | train | Remove a log from the logadm 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/states/win_firewall.py | add_rule | def add_rule(name,
localport,
protocol='tcp',
action='allow',
dir='in',
remoteip='any'):
'''
Add a new inbound or outbound rule to the firewall policy
Args:
name (str): The name of the rule. Must be unique and cannot be "all".
... | python | def add_rule(name,
localport,
protocol='tcp',
action='allow',
dir='in',
remoteip='any'):
'''
Add a new inbound or outbound rule to the firewall policy
Args:
name (str): The name of the rule. Must be unique and cannot be "all".
... | [
"def",
"add_rule",
"(",
"name",
",",
"localport",
",",
"protocol",
"=",
"'tcp'",
",",
"action",
"=",
"'allow'",
",",
"dir",
"=",
"'in'",
",",
"remoteip",
"=",
"'any'",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'result'",
":",
"True",
... | Add a new inbound or outbound rule to the firewall policy
Args:
name (str): The name of the rule. Must be unique and cannot be "all".
Required.
localport (int): The port the rule applies to. Must be a number between
0 and 65535. Can be a range. Can specify multiple ports s... | [
"Add",
"a",
"new",
"inbound",
"or",
"outbound",
"rule",
"to",
"the",
"firewall",
"policy"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/win_firewall.py#L94-L184 | train | Adds a new rule to the firewall policy. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/win_firewall.py | delete_rule | def delete_rule(name,
localport=None,
protocol=None,
dir=None,
remoteip=None):
'''
Delete an existing firewall rule identified by name and optionally by ports,
protocols, direction, and remote IP.
.. versionadded:: Neon
Args:
name (str):... | python | def delete_rule(name,
localport=None,
protocol=None,
dir=None,
remoteip=None):
'''
Delete an existing firewall rule identified by name and optionally by ports,
protocols, direction, and remote IP.
.. versionadded:: Neon
Args:
name (str):... | [
"def",
"delete_rule",
"(",
"name",
",",
"localport",
"=",
"None",
",",
"protocol",
"=",
"None",
",",
"dir",
"=",
"None",
",",
"remoteip",
"=",
"None",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'result'",
":",
"True",
",",
"'changes'",
... | Delete an existing firewall rule identified by name and optionally by ports,
protocols, direction, and remote IP.
.. versionadded:: Neon
Args:
name (str): The name of the rule to delete. If the name ``all`` is used
you must specify additional parameters.
localport (Optional[s... | [
"Delete",
"an",
"existing",
"firewall",
"rule",
"identified",
"by",
"name",
"and",
"optionally",
"by",
"ports",
"protocols",
"direction",
"and",
"remote",
"IP",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/win_firewall.py#L187-L246 | train | Delete an existing firewall rule identified by name optionally by ports protocol direction and remote IP. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/win_firewall.py | enabled | def enabled(name='allprofiles'):
'''
Enable all the firewall profiles (Windows only)
Args:
profile (Optional[str]): The name of the profile to enable. Default is
``allprofiles``. Valid options are:
- allprofiles
- domainprofile
- privateprofile
... | python | def enabled(name='allprofiles'):
'''
Enable all the firewall profiles (Windows only)
Args:
profile (Optional[str]): The name of the profile to enable. Default is
``allprofiles``. Valid options are:
- allprofiles
- domainprofile
- privateprofile
... | [
"def",
"enabled",
"(",
"name",
"=",
"'allprofiles'",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'result'",
":",
"True",
",",
"'changes'",
":",
"{",
"}",
",",
"'comment'",
":",
"''",
"}",
"profile_map",
"=",
"{",
"'domainprofile'",
":",
"... | Enable all the firewall profiles (Windows only)
Args:
profile (Optional[str]): The name of the profile to enable. Default is
``allprofiles``. Valid options are:
- allprofiles
- domainprofile
- privateprofile
- publicprofile
Example:
.. ... | [
"Enable",
"all",
"the",
"firewall",
"profiles",
"(",
"Windows",
"only",
")"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/win_firewall.py#L249-L322 | train | Enable the is
. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/runners/mattermost.py | post_message | def post_message(message,
channel=None,
username=None,
api_url=None,
hook=None):
'''
Send a message to a Mattermost channel.
:param channel: The channel name, either will work.
:param username: The username of the poster.
:pa... | python | def post_message(message,
channel=None,
username=None,
api_url=None,
hook=None):
'''
Send a message to a Mattermost channel.
:param channel: The channel name, either will work.
:param username: The username of the poster.
:pa... | [
"def",
"post_message",
"(",
"message",
",",
"channel",
"=",
"None",
",",
"username",
"=",
"None",
",",
"api_url",
"=",
"None",
",",
"hook",
"=",
"None",
")",
":",
"if",
"not",
"api_url",
":",
"api_url",
"=",
"_get_api_url",
"(",
")",
"if",
"not",
"ho... | Send a message to a Mattermost channel.
:param channel: The channel name, either will work.
:param username: The username of the poster.
:param message: The message to send to the Mattermost channel.
:param api_url: The Mattermost api url, if not specified in the configuration.
:param... | [
"Send",
"a",
"message",
"to",
"a",
"Mattermost",
"channel",
".",
":",
"param",
"channel",
":",
"The",
"channel",
"name",
"either",
"will",
"work",
".",
":",
"param",
"username",
":",
"The",
"username",
"of",
"the",
"poster",
".",
":",
"param",
"message",... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/mattermost.py#L95-L146 | train | Send a message to a Mattermost channel. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/runners/mattermost.py | post_event | def post_event(event,
channel=None,
username=None,
api_url=None,
hook=None):
'''
Send an event to a Mattermost channel.
:param channel: The channel name, either will work.
:param username: The username of the poster.
:param event: ... | python | def post_event(event,
channel=None,
username=None,
api_url=None,
hook=None):
'''
Send an event to a Mattermost channel.
:param channel: The channel name, either will work.
:param username: The username of the poster.
:param event: ... | [
"def",
"post_event",
"(",
"event",
",",
"channel",
"=",
"None",
",",
"username",
"=",
"None",
",",
"api_url",
"=",
"None",
",",
"hook",
"=",
"None",
")",
":",
"if",
"not",
"api_url",
":",
"api_url",
"=",
"_get_api_url",
"(",
")",
"if",
"not",
"hook",... | Send an event to a Mattermost channel.
:param channel: The channel name, either will work.
:param username: The username of the poster.
:param event: The event to send to the Mattermost channel.
:param api_url: The Mattermost api url, if not specified in the configuration.
:param ho... | [
"Send",
"an",
"event",
"to",
"a",
"Mattermost",
"channel",
".",
":",
"param",
"channel",
":",
"The",
"channel",
"name",
"either",
"will",
"work",
".",
":",
"param",
"username",
":",
"The",
"username",
"of",
"the",
"poster",
".",
":",
"param",
"event",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/mattermost.py#L149-L188 | train | Send an event to a Mattermost channel. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/vault.py | read_secret | def read_secret(path, key=None):
'''
Return the value of key at path in vault, or entire secret
Jinja Example:
.. code-block:: jinja
my-secret: {{ salt['vault'].read_secret('secret/my/secret', 'some-key') }}
.. code-block:: jinja
{% set supersecret = salt['vault'].read_secret('s... | python | def read_secret(path, key=None):
'''
Return the value of key at path in vault, or entire secret
Jinja Example:
.. code-block:: jinja
my-secret: {{ salt['vault'].read_secret('secret/my/secret', 'some-key') }}
.. code-block:: jinja
{% set supersecret = salt['vault'].read_secret('s... | [
"def",
"read_secret",
"(",
"path",
",",
"key",
"=",
"None",
")",
":",
"log",
".",
"debug",
"(",
"'Reading Vault secret for %s at %s'",
",",
"__grains__",
"[",
"'id'",
"]",
",",
"path",
")",
"try",
":",
"url",
"=",
"'v1/{0}'",
".",
"format",
"(",
"path",
... | Return the value of key at path in vault, or entire secret
Jinja Example:
.. code-block:: jinja
my-secret: {{ salt['vault'].read_secret('secret/my/secret', 'some-key') }}
.. code-block:: jinja
{% set supersecret = salt['vault'].read_secret('secret/my/secret') %}
secrets:
... | [
"Return",
"the",
"value",
"of",
"key",
"at",
"path",
"in",
"vault",
"or",
"entire",
"secret"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vault.py#L142-L172 | train | Read a vault secret at a given path. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/vault.py | write_secret | def write_secret(path, **kwargs):
'''
Set secret at the path in vault. The vault policy used must allow this.
CLI Example:
.. code-block:: bash
salt '*' vault.write_secret "secret/my/secret" user="foo" password="bar"
'''
log.debug('Writing vault secrets for %s at %s', __grains__['... | python | def write_secret(path, **kwargs):
'''
Set secret at the path in vault. The vault policy used must allow this.
CLI Example:
.. code-block:: bash
salt '*' vault.write_secret "secret/my/secret" user="foo" password="bar"
'''
log.debug('Writing vault secrets for %s at %s', __grains__['... | [
"def",
"write_secret",
"(",
"path",
",",
"*",
"*",
"kwargs",
")",
":",
"log",
".",
"debug",
"(",
"'Writing vault secrets for %s at %s'",
",",
"__grains__",
"[",
"'id'",
"]",
",",
"path",
")",
"data",
"=",
"dict",
"(",
"[",
"(",
"x",
",",
"y",
")",
"f... | Set secret at the path in vault. The vault policy used must allow this.
CLI Example:
.. code-block:: bash
salt '*' vault.write_secret "secret/my/secret" user="foo" password="bar" | [
"Set",
"secret",
"at",
"the",
"path",
"in",
"vault",
".",
"The",
"vault",
"policy",
"used",
"must",
"allow",
"this",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vault.py#L175-L197 | train | Write secret at the path in vault. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/vault.py | write_raw | def write_raw(path, raw):
'''
Set raw data at the path in vault. The vault policy used must allow this.
CLI Example:
.. code-block:: bash
salt '*' vault.write_raw "secret/my/secret" '{"user":"foo","password": "bar"}'
'''
log.debug('Writing vault secrets for %s at %s', __grains__['... | python | def write_raw(path, raw):
'''
Set raw data at the path in vault. The vault policy used must allow this.
CLI Example:
.. code-block:: bash
salt '*' vault.write_raw "secret/my/secret" '{"user":"foo","password": "bar"}'
'''
log.debug('Writing vault secrets for %s at %s', __grains__['... | [
"def",
"write_raw",
"(",
"path",
",",
"raw",
")",
":",
"log",
".",
"debug",
"(",
"'Writing vault secrets for %s at %s'",
",",
"__grains__",
"[",
"'id'",
"]",
",",
"path",
")",
"try",
":",
"url",
"=",
"'v1/{0}'",
".",
"format",
"(",
"path",
")",
"response... | Set raw data at the path in vault. The vault policy used must allow this.
CLI Example:
.. code-block:: bash
salt '*' vault.write_raw "secret/my/secret" '{"user":"foo","password": "bar"}' | [
"Set",
"raw",
"data",
"at",
"the",
"path",
"in",
"vault",
".",
"The",
"vault",
"policy",
"used",
"must",
"allow",
"this",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vault.py#L200-L221 | train | Write raw data at the path in vault | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/mdadm_raid.py | present | def present(name,
level,
devices,
**kwargs):
'''
Verify that the raid is present
.. versionchanged:: 2014.7.0
name
The name of raid device to be created
level
The RAID level to use when creating the raid.
devices
A list of d... | python | def present(name,
level,
devices,
**kwargs):
'''
Verify that the raid is present
.. versionchanged:: 2014.7.0
name
The name of raid device to be created
level
The RAID level to use when creating the raid.
devices
A list of d... | [
"def",
"present",
"(",
"name",
",",
"level",
",",
"devices",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"{",
"'changes'",
":",
"{",
"}",
",",
"'comment'",
":",
"''",
",",
"'name'",
":",
"name",
",",
"'result'",
":",
"True",
"}",
"# Device exist... | Verify that the raid is present
.. versionchanged:: 2014.7.0
name
The name of raid device to be created
level
The RAID level to use when creating the raid.
devices
A list of devices used to build the array.
kwargs
Optional arguments to be passed to mdadm.... | [
"Verify",
"that",
"the",
"raid",
"is",
"present"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/mdadm_raid.py#L48-L212 | train | Verify that the RAID is present. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/renderers/hjson.py | render | def render(hjson_data, saltenv='base', sls='', **kws):
'''
Accepts HJSON as a string or as a file object and runs it through the HJSON
parser.
:rtype: A Python data structure
'''
if not isinstance(hjson_data, six.string_types):
hjson_data = hjson_data.read()
if hjson_data.startswit... | python | def render(hjson_data, saltenv='base', sls='', **kws):
'''
Accepts HJSON as a string or as a file object and runs it through the HJSON
parser.
:rtype: A Python data structure
'''
if not isinstance(hjson_data, six.string_types):
hjson_data = hjson_data.read()
if hjson_data.startswit... | [
"def",
"render",
"(",
"hjson_data",
",",
"saltenv",
"=",
"'base'",
",",
"sls",
"=",
"''",
",",
"*",
"*",
"kws",
")",
":",
"if",
"not",
"isinstance",
"(",
"hjson_data",
",",
"six",
".",
"string_types",
")",
":",
"hjson_data",
"=",
"hjson_data",
".",
"... | Accepts HJSON as a string or as a file object and runs it through the HJSON
parser.
:rtype: A Python data structure | [
"Accepts",
"HJSON",
"as",
"a",
"string",
"or",
"as",
"a",
"file",
"object",
"and",
"runs",
"it",
"through",
"the",
"HJSON",
"parser",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/renderers/hjson.py#L23-L37 | train | Takes a HJSON string or as a file object and runs it through the HJSON
parser. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/boto_lambda.py | function_present | def function_present(name, FunctionName, Runtime, Role, Handler, ZipFile=None,
S3Bucket=None, S3Key=None, S3ObjectVersion=None,
Description='', Timeout=3, MemorySize=128,
Permissions=None, RoleRetries=5, region=None, key=None,
keyid=Non... | python | def function_present(name, FunctionName, Runtime, Role, Handler, ZipFile=None,
S3Bucket=None, S3Key=None, S3ObjectVersion=None,
Description='', Timeout=3, MemorySize=128,
Permissions=None, RoleRetries=5, region=None, key=None,
keyid=Non... | [
"def",
"function_present",
"(",
"name",
",",
"FunctionName",
",",
"Runtime",
",",
"Role",
",",
"Handler",
",",
"ZipFile",
"=",
"None",
",",
"S3Bucket",
"=",
"None",
",",
"S3Key",
"=",
"None",
",",
"S3ObjectVersion",
"=",
"None",
",",
"Description",
"=",
... | Ensure function exists.
name
The name of the state definition
FunctionName
Name of the Function.
Runtime
The Runtime environment for the function. One of
'nodejs', 'java8', or 'python2.7'
Role
The name or ARN of the IAM role that the function assumes when it e... | [
"Ensure",
"function",
"exists",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_lambda.py#L87-L311 | train | Ensures that a function exists in the state of the given name Runtime Role and Handler are present in the state of the given name. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/boto_lambda.py | alias_present | def alias_present(name, FunctionName, Name, FunctionVersion, Description='',
region=None, key=None, keyid=None, profile=None):
'''
Ensure alias exists.
name
The name of the state definition.
FunctionName
Name of the function for which you want to create an alias.
... | python | def alias_present(name, FunctionName, Name, FunctionVersion, Description='',
region=None, key=None, keyid=None, profile=None):
'''
Ensure alias exists.
name
The name of the state definition.
FunctionName
Name of the function for which you want to create an alias.
... | [
"def",
"alias_present",
"(",
"name",
",",
"FunctionName",
",",
"Name",
",",
"FunctionVersion",
",",
"Description",
"=",
"''",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"ret",
... | Ensure alias exists.
name
The name of the state definition.
FunctionName
Name of the function for which you want to create an alias.
Name
The name of the alias to be created.
FunctionVersion
Function version for which you are creating the alias.
Description
... | [
"Ensure",
"alias",
"exists",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_lambda.py#L572-L675 | train | Ensure an alias exists. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/boto_lambda.py | event_source_mapping_present | def event_source_mapping_present(name, EventSourceArn, FunctionName,
StartingPosition, Enabled=True, BatchSize=100,
region=None, key=None, keyid=None,
profile=None):
'''
Ensure event source mapping exists.
na... | python | def event_source_mapping_present(name, EventSourceArn, FunctionName,
StartingPosition, Enabled=True, BatchSize=100,
region=None, key=None, keyid=None,
profile=None):
'''
Ensure event source mapping exists.
na... | [
"def",
"event_source_mapping_present",
"(",
"name",
",",
"EventSourceArn",
",",
"FunctionName",
",",
"StartingPosition",
",",
"Enabled",
"=",
"True",
",",
"BatchSize",
"=",
"100",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None"... | Ensure event source mapping exists.
name
The name of the state definition.
EventSourceArn
The Amazon Resource Name (ARN) of the Amazon Kinesis or the Amazon
DynamoDB stream that is the event source.
FunctionName
The Lambda function to invoke when AWS Lambda detects an even... | [
"Ensure",
"event",
"source",
"mapping",
"exists",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_lambda.py#L756-L897 | train | Ensure that the event source mapping exists for the given event source and function name. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/boto_lambda.py | event_source_mapping_absent | def event_source_mapping_absent(name, EventSourceArn, FunctionName,
region=None, key=None, keyid=None, profile=None):
'''
Ensure event source mapping with passed properties is absent.
name
The name of the state definition.
EventSourceArn
ARN of the event... | python | def event_source_mapping_absent(name, EventSourceArn, FunctionName,
region=None, key=None, keyid=None, profile=None):
'''
Ensure event source mapping with passed properties is absent.
name
The name of the state definition.
EventSourceArn
ARN of the event... | [
"def",
"event_source_mapping_absent",
"(",
"name",
",",
"EventSourceArn",
",",
"FunctionName",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"None",
... | Ensure event source mapping with passed properties is absent.
name
The name of the state definition.
EventSourceArn
ARN of the event source.
FunctionName
Name of the lambda function.
region
Region to connect to.
key
Secret key to be used.
keyid
... | [
"Ensure",
"event",
"source",
"mapping",
"with",
"passed",
"properties",
"is",
"absent",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_lambda.py#L900-L963 | train | Ensure that the event source mapping with passed properties is absent. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/libcloud_loadbalancer.py | list_balancers | def list_balancers(profile, **libcloud_kwargs):
'''
Return a list of load balancers.
:param profile: The profile key
:type profile: ``str``
:param libcloud_kwargs: Extra arguments for the driver's list_balancers method
:type libcloud_kwargs: ``dict``
CLI Example:
.. code-block:: ba... | python | def list_balancers(profile, **libcloud_kwargs):
'''
Return a list of load balancers.
:param profile: The profile key
:type profile: ``str``
:param libcloud_kwargs: Extra arguments for the driver's list_balancers method
:type libcloud_kwargs: ``dict``
CLI Example:
.. code-block:: ba... | [
"def",
"list_balancers",
"(",
"profile",
",",
"*",
"*",
"libcloud_kwargs",
")",
":",
"conn",
"=",
"_get_driver",
"(",
"profile",
"=",
"profile",
")",
"libcloud_kwargs",
"=",
"salt",
".",
"utils",
".",
"args",
".",
"clean_kwargs",
"(",
"*",
"*",
"libcloud_k... | Return a list of load balancers.
:param profile: The profile key
:type profile: ``str``
:param libcloud_kwargs: Extra arguments for the driver's list_balancers method
:type libcloud_kwargs: ``dict``
CLI Example:
.. code-block:: bash
salt myminion libcloud_storage.list_balancers pr... | [
"Return",
"a",
"list",
"of",
"load",
"balancers",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/libcloud_loadbalancer.py#L104-L126 | train | Return a list of load balancers. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/libcloud_loadbalancer.py | list_protocols | def list_protocols(profile, **libcloud_kwargs):
'''
Return a list of supported protocols.
:param profile: The profile key
:type profile: ``str``
:param libcloud_kwargs: Extra arguments for the driver's list_protocols method
:type libcloud_kwargs: ``dict``
:return: a list of supported pr... | python | def list_protocols(profile, **libcloud_kwargs):
'''
Return a list of supported protocols.
:param profile: The profile key
:type profile: ``str``
:param libcloud_kwargs: Extra arguments for the driver's list_protocols method
:type libcloud_kwargs: ``dict``
:return: a list of supported pr... | [
"def",
"list_protocols",
"(",
"profile",
",",
"*",
"*",
"libcloud_kwargs",
")",
":",
"conn",
"=",
"_get_driver",
"(",
"profile",
"=",
"profile",
")",
"libcloud_kwargs",
"=",
"salt",
".",
"utils",
".",
"args",
".",
"clean_kwargs",
"(",
"*",
"*",
"libcloud_k... | Return a list of supported protocols.
:param profile: The profile key
:type profile: ``str``
:param libcloud_kwargs: Extra arguments for the driver's list_protocols method
:type libcloud_kwargs: ``dict``
:return: a list of supported protocols
:rtype: ``list`` of ``str``
CLI Example:
... | [
"Return",
"a",
"list",
"of",
"supported",
"protocols",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/libcloud_loadbalancer.py#L129-L150 | train | Return a list of supported protocols. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/libcloud_loadbalancer.py | create_balancer | def create_balancer(name, port, protocol, profile, algorithm=None, members=None, **libcloud_kwargs):
'''
Create a new load balancer instance
:param name: Name of the new load balancer (required)
:type name: ``str``
:param port: Port the load balancer should listen on, defaults to 80
:type po... | python | def create_balancer(name, port, protocol, profile, algorithm=None, members=None, **libcloud_kwargs):
'''
Create a new load balancer instance
:param name: Name of the new load balancer (required)
:type name: ``str``
:param port: Port the load balancer should listen on, defaults to 80
:type po... | [
"def",
"create_balancer",
"(",
"name",
",",
"port",
",",
"protocol",
",",
"profile",
",",
"algorithm",
"=",
"None",
",",
"members",
"=",
"None",
",",
"*",
"*",
"libcloud_kwargs",
")",
":",
"if",
"algorithm",
"is",
"None",
":",
"algorithm",
"=",
"Algorith... | Create a new load balancer instance
:param name: Name of the new load balancer (required)
:type name: ``str``
:param port: Port the load balancer should listen on, defaults to 80
:type port: ``str``
:param protocol: Loadbalancer protocol, defaults to http.
:type protocol: ``str``
:par... | [
"Create",
"a",
"new",
"load",
"balancer",
"instance"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/libcloud_loadbalancer.py#L153-L200 | train | Create a new load balancer | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/libcloud_loadbalancer.py | destroy_balancer | def destroy_balancer(balancer_id, profile, **libcloud_kwargs):
'''
Destroy a load balancer
:param balancer_id: LoadBalancer ID which should be used
:type balancer_id: ``str``
:param profile: The profile key
:type profile: ``str``
:param libcloud_kwargs: Extra arguments for the driver's ... | python | def destroy_balancer(balancer_id, profile, **libcloud_kwargs):
'''
Destroy a load balancer
:param balancer_id: LoadBalancer ID which should be used
:type balancer_id: ``str``
:param profile: The profile key
:type profile: ``str``
:param libcloud_kwargs: Extra arguments for the driver's ... | [
"def",
"destroy_balancer",
"(",
"balancer_id",
",",
"profile",
",",
"*",
"*",
"libcloud_kwargs",
")",
":",
"conn",
"=",
"_get_driver",
"(",
"profile",
"=",
"profile",
")",
"libcloud_kwargs",
"=",
"salt",
".",
"utils",
".",
"args",
".",
"clean_kwargs",
"(",
... | Destroy a load balancer
:param balancer_id: LoadBalancer ID which should be used
:type balancer_id: ``str``
:param profile: The profile key
:type profile: ``str``
:param libcloud_kwargs: Extra arguments for the driver's destroy_balancer method
:type libcloud_kwargs: ``dict``
:return: ... | [
"Destroy",
"a",
"load",
"balancer"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/libcloud_loadbalancer.py#L203-L228 | train | Destroy a load balancer | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/libcloud_loadbalancer.py | get_balancer_by_name | def get_balancer_by_name(name, profile, **libcloud_kwargs):
'''
Get the details for a load balancer by name
:param name: Name of a load balancer you want to fetch
:type name: ``str``
:param profile: The profile key
:type profile: ``str``
:param libcloud_kwargs: Extra arguments for the d... | python | def get_balancer_by_name(name, profile, **libcloud_kwargs):
'''
Get the details for a load balancer by name
:param name: Name of a load balancer you want to fetch
:type name: ``str``
:param profile: The profile key
:type profile: ``str``
:param libcloud_kwargs: Extra arguments for the d... | [
"def",
"get_balancer_by_name",
"(",
"name",
",",
"profile",
",",
"*",
"*",
"libcloud_kwargs",
")",
":",
"conn",
"=",
"_get_driver",
"(",
"profile",
"=",
"profile",
")",
"libcloud_kwargs",
"=",
"salt",
".",
"utils",
".",
"args",
".",
"clean_kwargs",
"(",
"*... | Get the details for a load balancer by name
:param name: Name of a load balancer you want to fetch
:type name: ``str``
:param profile: The profile key
:type profile: ``str``
:param libcloud_kwargs: Extra arguments for the driver's list_balancers method
:type libcloud_kwargs: ``dict``
... | [
"Get",
"the",
"details",
"for",
"a",
"load",
"balancer",
"by",
"name"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/libcloud_loadbalancer.py#L231-L261 | train | Get the details for a load balancer by name | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/libcloud_loadbalancer.py | balancer_attach_member | def balancer_attach_member(balancer_id, ip, port, profile, extra=None, **libcloud_kwargs):
'''
Add a new member to the load balancer
:param balancer_id: id of a load balancer you want to fetch
:type balancer_id: ``str``
:param ip: IP address for the new member
:type ip: ``str``
:param p... | python | def balancer_attach_member(balancer_id, ip, port, profile, extra=None, **libcloud_kwargs):
'''
Add a new member to the load balancer
:param balancer_id: id of a load balancer you want to fetch
:type balancer_id: ``str``
:param ip: IP address for the new member
:type ip: ``str``
:param p... | [
"def",
"balancer_attach_member",
"(",
"balancer_id",
",",
"ip",
",",
"port",
",",
"profile",
",",
"extra",
"=",
"None",
",",
"*",
"*",
"libcloud_kwargs",
")",
":",
"conn",
"=",
"_get_driver",
"(",
"profile",
"=",
"profile",
")",
"libcloud_kwargs",
"=",
"sa... | Add a new member to the load balancer
:param balancer_id: id of a load balancer you want to fetch
:type balancer_id: ``str``
:param ip: IP address for the new member
:type ip: ``str``
:param port: Port for the new member
:type port: ``int``
:param profile: The profile key
:type p... | [
"Add",
"a",
"new",
"member",
"to",
"the",
"load",
"balancer"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/libcloud_loadbalancer.py#L314-L344 | train | Adds a new member to the load balancer | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/libcloud_loadbalancer.py | balancer_detach_member | def balancer_detach_member(balancer_id, member_id, profile, **libcloud_kwargs):
'''
Add a new member to the load balancer
:param balancer_id: id of a load balancer you want to fetch
:type balancer_id: ``str``
:param ip: IP address for the new member
:type ip: ``str``
:param port: Port f... | python | def balancer_detach_member(balancer_id, member_id, profile, **libcloud_kwargs):
'''
Add a new member to the load balancer
:param balancer_id: id of a load balancer you want to fetch
:type balancer_id: ``str``
:param ip: IP address for the new member
:type ip: ``str``
:param port: Port f... | [
"def",
"balancer_detach_member",
"(",
"balancer_id",
",",
"member_id",
",",
"profile",
",",
"*",
"*",
"libcloud_kwargs",
")",
":",
"conn",
"=",
"_get_driver",
"(",
"profile",
"=",
"profile",
")",
"balancer",
"=",
"conn",
".",
"get_balancer",
"(",
"balancer_id"... | Add a new member to the load balancer
:param balancer_id: id of a load balancer you want to fetch
:type balancer_id: ``str``
:param ip: IP address for the new member
:type ip: ``str``
:param port: Port for the new member
:type port: ``int``
:param profile: The profile key
:type p... | [
"Add",
"a",
"new",
"member",
"to",
"the",
"load",
"balancer"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/libcloud_loadbalancer.py#L347-L383 | train | Detach a load balancer member | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/libcloud_loadbalancer.py | list_balancer_members | def list_balancer_members(balancer_id, profile, **libcloud_kwargs):
'''
List the members of a load balancer
:param balancer_id: id of a load balancer you want to fetch
:type balancer_id: ``str``
:param profile: The profile key
:type profile: ``str``
:param libcloud_kwargs: Extra argumen... | python | def list_balancer_members(balancer_id, profile, **libcloud_kwargs):
'''
List the members of a load balancer
:param balancer_id: id of a load balancer you want to fetch
:type balancer_id: ``str``
:param profile: The profile key
:type profile: ``str``
:param libcloud_kwargs: Extra argumen... | [
"def",
"list_balancer_members",
"(",
"balancer_id",
",",
"profile",
",",
"*",
"*",
"libcloud_kwargs",
")",
":",
"conn",
"=",
"_get_driver",
"(",
"profile",
"=",
"profile",
")",
"balancer",
"=",
"conn",
".",
"get_balancer",
"(",
"balancer_id",
")",
"libcloud_kw... | List the members of a load balancer
:param balancer_id: id of a load balancer you want to fetch
:type balancer_id: ``str``
:param profile: The profile key
:type profile: ``str``
:param libcloud_kwargs: Extra arguments for the driver's list_balancer_members method
:type libcloud_kwargs: ``d... | [
"List",
"the",
"members",
"of",
"a",
"load",
"balancer"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/libcloud_loadbalancer.py#L386-L409 | train | List the members of a load balancer | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/libcloud_loadbalancer.py | extra | def extra(method, profile, **libcloud_kwargs):
'''
Call an extended method on the driver
:param method: Driver's method name
:type method: ``str``
:param profile: The profile key
:type profile: ``str``
:param libcloud_kwargs: Extra arguments for the driver's method
:type libcloud_k... | python | def extra(method, profile, **libcloud_kwargs):
'''
Call an extended method on the driver
:param method: Driver's method name
:type method: ``str``
:param profile: The profile key
:type profile: ``str``
:param libcloud_kwargs: Extra arguments for the driver's method
:type libcloud_k... | [
"def",
"extra",
"(",
"method",
",",
"profile",
",",
"*",
"*",
"libcloud_kwargs",
")",
":",
"libcloud_kwargs",
"=",
"salt",
".",
"utils",
".",
"args",
".",
"clean_kwargs",
"(",
"*",
"*",
"libcloud_kwargs",
")",
"conn",
"=",
"_get_driver",
"(",
"profile",
... | Call an extended method on the driver
:param method: Driver's method name
:type method: ``str``
:param profile: The profile key
:type profile: ``str``
:param libcloud_kwargs: Extra arguments for the driver's method
:type libcloud_kwargs: ``dict``
CLI Example:
.. code-block:: bash... | [
"Call",
"an",
"extended",
"method",
"on",
"the",
"driver"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/libcloud_loadbalancer.py#L412-L434 | train | A method that returns a value from the driver s extra method | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/alternatives.py | install | def install(name, link, path, priority):
'''
Install new alternative for defined <name>
name
is the master name for this link group
(e.g. pager)
link
is the symlink pointing to /etc/alternatives/<name>.
(e.g. /usr/bin/pager)
path
is the location of the new ... | python | def install(name, link, path, priority):
'''
Install new alternative for defined <name>
name
is the master name for this link group
(e.g. pager)
link
is the symlink pointing to /etc/alternatives/<name>.
(e.g. /usr/bin/pager)
path
is the location of the new ... | [
"def",
"install",
"(",
"name",
",",
"link",
",",
"path",
",",
"priority",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'link'",
":",
"link",
",",
"'path'",
":",
"path",
",",
"'priority'",
":",
"priority",
",",
"'result'",
":",
"True",
",... | Install new alternative for defined <name>
name
is the master name for this link group
(e.g. pager)
link
is the symlink pointing to /etc/alternatives/<name>.
(e.g. /usr/bin/pager)
path
is the location of the new alternative target.
NB: This file / directory... | [
"Install",
"new",
"alternative",
"for",
"defined",
"<name",
">"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/alternatives.py#L44-L103 | train | Install new alternative for the specified master and link. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/alternatives.py | remove | def remove(name, path):
'''
Removes installed alternative for defined <name> and <path>
or fallback to default alternative, if some defined before.
name
is the master name for this link group
(e.g. pager)
path
is the location of one of the alternative target files.
... | python | def remove(name, path):
'''
Removes installed alternative for defined <name> and <path>
or fallback to default alternative, if some defined before.
name
is the master name for this link group
(e.g. pager)
path
is the location of one of the alternative target files.
... | [
"def",
"remove",
"(",
"name",
",",
"path",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'path'",
":",
"path",
",",
"'result'",
":",
"True",
",",
"'changes'",
":",
"{",
"}",
",",
"'comment'",
":",
"''",
"}",
"isinstalled",
"=",
"__salt__"... | Removes installed alternative for defined <name> and <path>
or fallback to default alternative, if some defined before.
name
is the master name for this link group
(e.g. pager)
path
is the location of one of the alternative target files.
(e.g. /usr/bin/less) | [
"Removes",
"installed",
"alternative",
"for",
"defined",
"<name",
">",
"and",
"<path",
">",
"or",
"fallback",
"to",
"default",
"alternative",
"if",
"some",
"defined",
"before",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/alternatives.py#L106-L159 | train | Removes an alternative from the master | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/alternatives.py | auto | def auto(name):
'''
.. versionadded:: 0.17.0
Instruct alternatives to use the highest priority
path for <name>
name
is the master name for this link group
(e.g. pager)
'''
ret = {'name': name,
'result': True,
'comment': '',
'changes': {}}
... | python | def auto(name):
'''
.. versionadded:: 0.17.0
Instruct alternatives to use the highest priority
path for <name>
name
is the master name for this link group
(e.g. pager)
'''
ret = {'name': name,
'result': True,
'comment': '',
'changes': {}}
... | [
"def",
"auto",
"(",
"name",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'result'",
":",
"True",
",",
"'comment'",
":",
"''",
",",
"'changes'",
":",
"{",
"}",
"}",
"display",
"=",
"__salt__",
"[",
"'alternatives.display'",
"]",
"(",
"name"... | .. versionadded:: 0.17.0
Instruct alternatives to use the highest priority
path for <name>
name
is the master name for this link group
(e.g. pager) | [
"..",
"versionadded",
"::",
"0",
".",
"17",
".",
"0"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/alternatives.py#L162-L190 | train | Ensure that the link group is in auto mode. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/alternatives.py | set_ | def set_(name, path):
'''
.. versionadded:: 0.17.0
Sets alternative for <name> to <path>, if <path> is defined
as an alternative for <name>.
name
is the master name for this link group
(e.g. pager)
path
is the location of one of the alternative target files.
(e... | python | def set_(name, path):
'''
.. versionadded:: 0.17.0
Sets alternative for <name> to <path>, if <path> is defined
as an alternative for <name>.
name
is the master name for this link group
(e.g. pager)
path
is the location of one of the alternative target files.
(e... | [
"def",
"set_",
"(",
"name",
",",
"path",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'path'",
":",
"path",
",",
"'result'",
":",
"True",
",",
"'changes'",
":",
"{",
"}",
",",
"'comment'",
":",
"''",
"}",
"current",
"=",
"__salt__",
"[... | .. versionadded:: 0.17.0
Sets alternative for <name> to <path>, if <path> is defined
as an alternative for <name>.
name
is the master name for this link group
(e.g. pager)
path
is the location of one of the alternative target files.
(e.g. /usr/bin/less)
.. code-bl... | [
"..",
"versionadded",
"::",
"0",
".",
"17",
".",
"0"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/alternatives.py#L193-L257 | train | Set the name of the link group to the path. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/grafana4_datasource.py | present | def present(name,
type,
url,
access=None,
user=None,
password=None,
database=None,
basic_auth=None,
basic_auth_user=None,
basic_auth_password=None,
tls_auth=None,
json_data=None,
... | python | def present(name,
type,
url,
access=None,
user=None,
password=None,
database=None,
basic_auth=None,
basic_auth_user=None,
basic_auth_password=None,
tls_auth=None,
json_data=None,
... | [
"def",
"present",
"(",
"name",
",",
"type",
",",
"url",
",",
"access",
"=",
"None",
",",
"user",
"=",
"None",
",",
"password",
"=",
"None",
",",
"database",
"=",
"None",
",",
"basic_auth",
"=",
"None",
",",
"basic_auth_user",
"=",
"None",
",",
"basic... | Ensure that a data source is present.
name
Name of the data source.
type
Type of the datasource ('graphite', 'influxdb' etc.).
access
Use proxy or direct. Default: proxy
url
The URL to the data source API.
user
Optional - user to authenticate with the dat... | [
"Ensure",
"that",
"a",
"data",
"source",
"is",
"present",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/grafana4_datasource.py#L57-L180 | train | Ensure that a data source is present. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/grafana4_datasource.py | absent | def absent(name, orgname=None, profile='grafana'):
'''
Ensure that a data source is present.
name
Name of the data source to remove.
orgname
Name of the organization from which the data source should be absent.
profile
Configuration profile used to connect to the Grafana i... | python | def absent(name, orgname=None, profile='grafana'):
'''
Ensure that a data source is present.
name
Name of the data source to remove.
orgname
Name of the organization from which the data source should be absent.
profile
Configuration profile used to connect to the Grafana i... | [
"def",
"absent",
"(",
"name",
",",
"orgname",
"=",
"None",
",",
"profile",
"=",
"'grafana'",
")",
":",
"if",
"isinstance",
"(",
"profile",
",",
"string_types",
")",
":",
"profile",
"=",
"__salt__",
"[",
"'config.option'",
"]",
"(",
"profile",
")",
"ret",... | Ensure that a data source is present.
name
Name of the data source to remove.
orgname
Name of the organization from which the data source should be absent.
profile
Configuration profile used to connect to the Grafana instance.
Default is 'grafana'. | [
"Ensure",
"that",
"a",
"data",
"source",
"is",
"present",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/grafana4_datasource.py#L183-L217 | train | Ensure that a data source is absent. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/auth/__init__.py | LoadAuth.load_name | def load_name(self, load):
'''
Return the primary name associate with the load, if an empty string
is returned then the load does not match the function
'''
if 'eauth' not in load:
return ''
fstr = '{0}.auth'.format(load['eauth'])
if fstr not in self.a... | python | def load_name(self, load):
'''
Return the primary name associate with the load, if an empty string
is returned then the load does not match the function
'''
if 'eauth' not in load:
return ''
fstr = '{0}.auth'.format(load['eauth'])
if fstr not in self.a... | [
"def",
"load_name",
"(",
"self",
",",
"load",
")",
":",
"if",
"'eauth'",
"not",
"in",
"load",
":",
"return",
"''",
"fstr",
"=",
"'{0}.auth'",
".",
"format",
"(",
"load",
"[",
"'eauth'",
"]",
")",
"if",
"fstr",
"not",
"in",
"self",
".",
"auth",
":",... | Return the primary name associate with the load, if an empty string
is returned then the load does not match the function | [
"Return",
"the",
"primary",
"name",
"associate",
"with",
"the",
"load",
"if",
"an",
"empty",
"string",
"is",
"returned",
"then",
"the",
"load",
"does",
"not",
"match",
"the",
"function"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/auth/__init__.py#L70-L84 | train | Return the primary name associate with the load | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/auth/__init__.py | LoadAuth.__auth_call | def __auth_call(self, load):
'''
Return the token and set the cache data for use
Do not call this directly! Use the time_auth method to overcome timing
attacks
'''
if 'eauth' not in load:
return False
fstr = '{0}.auth'.format(load['eauth'])
if... | python | def __auth_call(self, load):
'''
Return the token and set the cache data for use
Do not call this directly! Use the time_auth method to overcome timing
attacks
'''
if 'eauth' not in load:
return False
fstr = '{0}.auth'.format(load['eauth'])
if... | [
"def",
"__auth_call",
"(",
"self",
",",
"load",
")",
":",
"if",
"'eauth'",
"not",
"in",
"load",
":",
"return",
"False",
"fstr",
"=",
"'{0}.auth'",
".",
"format",
"(",
"load",
"[",
"'eauth'",
"]",
")",
"if",
"fstr",
"not",
"in",
"self",
".",
"auth",
... | Return the token and set the cache data for use
Do not call this directly! Use the time_auth method to overcome timing
attacks | [
"Return",
"the",
"token",
"and",
"set",
"the",
"cache",
"data",
"for",
"use"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/auth/__init__.py#L86-L114 | train | Return the token and set the cache data for use
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/auth/__init__.py | LoadAuth.time_auth | def time_auth(self, load):
'''
Make sure that all failures happen in the same amount of time
'''
start = time.time()
ret = self.__auth_call(load)
if ret:
return ret
f_time = time.time() - start
if f_time > self.max_fail:
self.max_fa... | python | def time_auth(self, load):
'''
Make sure that all failures happen in the same amount of time
'''
start = time.time()
ret = self.__auth_call(load)
if ret:
return ret
f_time = time.time() - start
if f_time > self.max_fail:
self.max_fa... | [
"def",
"time_auth",
"(",
"self",
",",
"load",
")",
":",
"start",
"=",
"time",
".",
"time",
"(",
")",
"ret",
"=",
"self",
".",
"__auth_call",
"(",
"load",
")",
"if",
"ret",
":",
"return",
"ret",
"f_time",
"=",
"time",
".",
"time",
"(",
")",
"-",
... | Make sure that all failures happen in the same amount of time | [
"Make",
"sure",
"that",
"all",
"failures",
"happen",
"in",
"the",
"same",
"amount",
"of",
"time"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/auth/__init__.py#L116-L134 | train | Time auth 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/auth/__init__.py | LoadAuth.__get_acl | def __get_acl(self, load):
'''
Returns ACL for a specific user.
Returns None if eauth doesn't provide any for the user. I. e. None means: use acl declared
in master config.
'''
if 'eauth' not in load:
return None
mod = self.opts['eauth_acl_module']
... | python | def __get_acl(self, load):
'''
Returns ACL for a specific user.
Returns None if eauth doesn't provide any for the user. I. e. None means: use acl declared
in master config.
'''
if 'eauth' not in load:
return None
mod = self.opts['eauth_acl_module']
... | [
"def",
"__get_acl",
"(",
"self",
",",
"load",
")",
":",
"if",
"'eauth'",
"not",
"in",
"load",
":",
"return",
"None",
"mod",
"=",
"self",
".",
"opts",
"[",
"'eauth_acl_module'",
"]",
"if",
"not",
"mod",
":",
"mod",
"=",
"load",
"[",
"'eauth'",
"]",
... | Returns ACL for a specific user.
Returns None if eauth doesn't provide any for the user. I. e. None means: use acl declared
in master config. | [
"Returns",
"ACL",
"for",
"a",
"specific",
"user",
".",
"Returns",
"None",
"if",
"eauth",
"doesn",
"t",
"provide",
"any",
"for",
"the",
"user",
".",
"I",
".",
"e",
".",
"None",
"means",
":",
"use",
"acl",
"declared",
"in",
"master",
"config",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/auth/__init__.py#L136-L158 | train | Returns the ACL for a specific user. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/auth/__init__.py | LoadAuth.__process_acl | def __process_acl(self, load, auth_list):
'''
Allows eauth module to modify the access list right before it'll be applied to the request.
For example ldap auth module expands entries
'''
if 'eauth' not in load:
return auth_list
fstr = '{0}.process_acl'.format(... | python | def __process_acl(self, load, auth_list):
'''
Allows eauth module to modify the access list right before it'll be applied to the request.
For example ldap auth module expands entries
'''
if 'eauth' not in load:
return auth_list
fstr = '{0}.process_acl'.format(... | [
"def",
"__process_acl",
"(",
"self",
",",
"load",
",",
"auth_list",
")",
":",
"if",
"'eauth'",
"not",
"in",
"load",
":",
"return",
"auth_list",
"fstr",
"=",
"'{0}.process_acl'",
".",
"format",
"(",
"load",
"[",
"'eauth'",
"]",
")",
"if",
"fstr",
"not",
... | Allows eauth module to modify the access list right before it'll be applied to the request.
For example ldap auth module expands entries | [
"Allows",
"eauth",
"module",
"to",
"modify",
"the",
"access",
"list",
"right",
"before",
"it",
"ll",
"be",
"applied",
"to",
"the",
"request",
".",
"For",
"example",
"ldap",
"auth",
"module",
"expands",
"entries"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/auth/__init__.py#L160-L174 | train | Process the acl list | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/auth/__init__.py | LoadAuth.mk_token | def mk_token(self, load):
'''
Run time_auth and create a token. Return False or the token
'''
if not self.authenticate_eauth(load):
return {}
if self._allow_custom_expire(load):
token_expire = load.pop('token_expire', self.opts['token_expire'])
el... | python | def mk_token(self, load):
'''
Run time_auth and create a token. Return False or the token
'''
if not self.authenticate_eauth(load):
return {}
if self._allow_custom_expire(load):
token_expire = load.pop('token_expire', self.opts['token_expire'])
el... | [
"def",
"mk_token",
"(",
"self",
",",
"load",
")",
":",
"if",
"not",
"self",
".",
"authenticate_eauth",
"(",
"load",
")",
":",
"return",
"{",
"}",
"if",
"self",
".",
"_allow_custom_expire",
"(",
"load",
")",
":",
"token_expire",
"=",
"load",
".",
"pop",... | Run time_auth and create a token. Return False or the token | [
"Run",
"time_auth",
"and",
"create",
"a",
"token",
".",
"Return",
"False",
"or",
"the",
"token"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/auth/__init__.py#L214-L240 | train | Run time_auth and create a token. Return False or the token
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/auth/__init__.py | LoadAuth.get_tok | def get_tok(self, tok):
'''
Return the name associated with the token, or False if the token is
not valid
'''
tdata = self.tokens["{0}.get_token".format(self.opts['eauth_tokens'])](self.opts, tok)
if not tdata:
return {}
rm_tok = False
if 'exp... | python | def get_tok(self, tok):
'''
Return the name associated with the token, or False if the token is
not valid
'''
tdata = self.tokens["{0}.get_token".format(self.opts['eauth_tokens'])](self.opts, tok)
if not tdata:
return {}
rm_tok = False
if 'exp... | [
"def",
"get_tok",
"(",
"self",
",",
"tok",
")",
":",
"tdata",
"=",
"self",
".",
"tokens",
"[",
"\"{0}.get_token\"",
".",
"format",
"(",
"self",
".",
"opts",
"[",
"'eauth_tokens'",
"]",
")",
"]",
"(",
"self",
".",
"opts",
",",
"tok",
")",
"if",
"not... | Return the name associated with the token, or False if the token is
not valid | [
"Return",
"the",
"name",
"associated",
"with",
"the",
"token",
"or",
"False",
"if",
"the",
"token",
"is",
"not",
"valid"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/auth/__init__.py#L242-L260 | train | Return the name associated with the token or False if the token is not valid
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/auth/__init__.py | LoadAuth.rm_token | def rm_token(self, tok):
'''
Remove the given token from token storage.
'''
self.tokens["{0}.rm_token".format(self.opts['eauth_tokens'])](self.opts, tok) | python | def rm_token(self, tok):
'''
Remove the given token from token storage.
'''
self.tokens["{0}.rm_token".format(self.opts['eauth_tokens'])](self.opts, tok) | [
"def",
"rm_token",
"(",
"self",
",",
"tok",
")",
":",
"self",
".",
"tokens",
"[",
"\"{0}.rm_token\"",
".",
"format",
"(",
"self",
".",
"opts",
"[",
"'eauth_tokens'",
"]",
")",
"]",
"(",
"self",
".",
"opts",
",",
"tok",
")"
] | Remove the given token from token storage. | [
"Remove",
"the",
"given",
"token",
"from",
"token",
"storage",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/auth/__init__.py#L268-L272 | train | Remove the given token from token storage. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/auth/__init__.py | LoadAuth.authenticate_token | def authenticate_token(self, load):
'''
Authenticate a user by the token specified in load.
Return the token object or False if auth failed.
'''
token = self.get_tok(load['token'])
# Bail if the token is empty or if the eauth type specified is not allowed
if not ... | python | def authenticate_token(self, load):
'''
Authenticate a user by the token specified in load.
Return the token object or False if auth failed.
'''
token = self.get_tok(load['token'])
# Bail if the token is empty or if the eauth type specified is not allowed
if not ... | [
"def",
"authenticate_token",
"(",
"self",
",",
"load",
")",
":",
"token",
"=",
"self",
".",
"get_tok",
"(",
"load",
"[",
"'token'",
"]",
")",
"# Bail if the token is empty or if the eauth type specified is not allowed",
"if",
"not",
"token",
"or",
"token",
"[",
"'... | Authenticate a user by the token specified in load.
Return the token object or False if auth failed. | [
"Authenticate",
"a",
"user",
"by",
"the",
"token",
"specified",
"in",
"load",
".",
"Return",
"the",
"token",
"object",
"or",
"False",
"if",
"auth",
"failed",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/auth/__init__.py#L274-L286 | train | Authenticate a user by the token specified in load. Return the token object or False if auth failed. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/auth/__init__.py | LoadAuth.authenticate_eauth | def authenticate_eauth(self, load):
'''
Authenticate a user by the external auth module specified in load.
Return True on success or False on failure.
'''
if 'eauth' not in load:
log.warning('Authentication failure of type "eauth" occurred.')
return False
... | python | def authenticate_eauth(self, load):
'''
Authenticate a user by the external auth module specified in load.
Return True on success or False on failure.
'''
if 'eauth' not in load:
log.warning('Authentication failure of type "eauth" occurred.')
return False
... | [
"def",
"authenticate_eauth",
"(",
"self",
",",
"load",
")",
":",
"if",
"'eauth'",
"not",
"in",
"load",
":",
"log",
".",
"warning",
"(",
"'Authentication failure of type \"eauth\" occurred.'",
")",
"return",
"False",
"if",
"load",
"[",
"'eauth'",
"]",
"not",
"i... | Authenticate a user by the external auth module specified in load.
Return True on success or False on failure. | [
"Authenticate",
"a",
"user",
"by",
"the",
"external",
"auth",
"module",
"specified",
"in",
"load",
".",
"Return",
"True",
"on",
"success",
"or",
"False",
"on",
"failure",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/auth/__init__.py#L288-L308 | train | Authenticate a user by external auth module specified in load. Return True on success Return False on failure. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/auth/__init__.py | LoadAuth.authenticate_key | def authenticate_key(self, load, key):
'''
Authenticate a user by the key passed in load.
Return the effective user id (name) if it's different from the specified one (for sudo).
If the effective user id is the same as the passed one, return True on success or False on
failure.
... | python | def authenticate_key(self, load, key):
'''
Authenticate a user by the key passed in load.
Return the effective user id (name) if it's different from the specified one (for sudo).
If the effective user id is the same as the passed one, return True on success or False on
failure.
... | [
"def",
"authenticate_key",
"(",
"self",
",",
"load",
",",
"key",
")",
":",
"error_msg",
"=",
"'Authentication failure of type \"user\" occurred.'",
"auth_key",
"=",
"load",
".",
"pop",
"(",
"'key'",
",",
"None",
")",
"if",
"auth_key",
"is",
"None",
":",
"log",... | Authenticate a user by the key passed in load.
Return the effective user id (name) if it's different from the specified one (for sudo).
If the effective user id is the same as the passed one, return True on success or False on
failure. | [
"Authenticate",
"a",
"user",
"by",
"the",
"key",
"passed",
"in",
"load",
".",
"Return",
"the",
"effective",
"user",
"id",
"(",
"name",
")",
"if",
"it",
"s",
"different",
"from",
"the",
"specified",
"one",
"(",
"for",
"sudo",
")",
".",
"If",
"the",
"e... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/auth/__init__.py#L310-L355 | train | Authenticate a user by the passed in load. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/auth/__init__.py | LoadAuth.get_auth_list | def get_auth_list(self, load, token=None):
'''
Retrieve access list for the user specified in load.
The list is built by eauth module or from master eauth configuration.
Return None if current configuration doesn't provide any ACL for the user. Return an empty
list if the user ha... | python | def get_auth_list(self, load, token=None):
'''
Retrieve access list for the user specified in load.
The list is built by eauth module or from master eauth configuration.
Return None if current configuration doesn't provide any ACL for the user. Return an empty
list if the user ha... | [
"def",
"get_auth_list",
"(",
"self",
",",
"load",
",",
"token",
"=",
"None",
")",
":",
"# Get auth list from token",
"if",
"token",
"and",
"self",
".",
"opts",
"[",
"'keep_acl_in_token'",
"]",
"and",
"'auth_list'",
"in",
"token",
":",
"return",
"token",
"[",... | Retrieve access list for the user specified in load.
The list is built by eauth module or from master eauth configuration.
Return None if current configuration doesn't provide any ACL for the user. Return an empty
list if the user has no rights to execute anything on this master and returns non-... | [
"Retrieve",
"access",
"list",
"for",
"the",
"user",
"specified",
"in",
"load",
".",
"The",
"list",
"is",
"built",
"by",
"eauth",
"module",
"or",
"from",
"master",
"eauth",
"configuration",
".",
"Return",
"None",
"if",
"current",
"configuration",
"doesn",
"t"... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/auth/__init__.py#L357-L404 | train | Get the list of access items for the user specified in load. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/auth/__init__.py | LoadAuth.check_authentication | def check_authentication(self, load, auth_type, key=None, show_username=False):
'''
.. versionadded:: 2018.3.0
Go through various checks to see if the token/eauth/user can be authenticated.
Returns a dictionary containing the following keys:
- auth_list
- username
... | python | def check_authentication(self, load, auth_type, key=None, show_username=False):
'''
.. versionadded:: 2018.3.0
Go through various checks to see if the token/eauth/user can be authenticated.
Returns a dictionary containing the following keys:
- auth_list
- username
... | [
"def",
"check_authentication",
"(",
"self",
",",
"load",
",",
"auth_type",
",",
"key",
"=",
"None",
",",
"show_username",
"=",
"False",
")",
":",
"auth_list",
"=",
"[",
"]",
"username",
"=",
"load",
".",
"get",
"(",
"'username'",
",",
"'UNKNOWN'",
")",
... | .. versionadded:: 2018.3.0
Go through various checks to see if the token/eauth/user can be authenticated.
Returns a dictionary containing the following keys:
- auth_list
- username
- error
If an error is encountered, return immediately with the relevant error dictiona... | [
"..",
"versionadded",
"::",
"2018",
".",
"3",
".",
"0"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/auth/__init__.py#L406-L477 | train | Checks if the user is authenticated for the token and eauth. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/auth/__init__.py | Authorize.auth_data | def auth_data(self):
'''
Gather and create the authorization data sets
We're looking at several constructs here.
Standard eauth: allow jsmith to auth via pam, and execute any command
on server web1
external_auth:
pam:
jsmith:
- web1:
... | python | def auth_data(self):
'''
Gather and create the authorization data sets
We're looking at several constructs here.
Standard eauth: allow jsmith to auth via pam, and execute any command
on server web1
external_auth:
pam:
jsmith:
- web1:
... | [
"def",
"auth_data",
"(",
"self",
")",
":",
"auth_data",
"=",
"self",
".",
"opts",
"[",
"'external_auth'",
"]",
"merge_lists",
"=",
"self",
".",
"opts",
"[",
"'pillar_merge_lists'",
"]",
"if",
"'django'",
"in",
"auth_data",
"and",
"'^model'",
"in",
"auth_data... | Gather and create the authorization data sets
We're looking at several constructs here.
Standard eauth: allow jsmith to auth via pam, and execute any command
on server web1
external_auth:
pam:
jsmith:
- web1:
- .*
Django eaut... | [
"Gather",
"and",
"create",
"the",
"authorization",
"data",
"sets"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/auth/__init__.py#L501-L560 | train | Gather and create the authorization data sets | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/auth/__init__.py | Authorize.token | def token(self, adata, load):
'''
Determine if token auth is valid and yield the adata
'''
try:
token = self.loadauth.get_tok(load['token'])
except Exception as exc:
log.error('Exception occurred when generating auth token: %s', exc)
yield {}
... | python | def token(self, adata, load):
'''
Determine if token auth is valid and yield the adata
'''
try:
token = self.loadauth.get_tok(load['token'])
except Exception as exc:
log.error('Exception occurred when generating auth token: %s', exc)
yield {}
... | [
"def",
"token",
"(",
"self",
",",
"adata",
",",
"load",
")",
":",
"try",
":",
"token",
"=",
"self",
".",
"loadauth",
".",
"get_tok",
"(",
"load",
"[",
"'token'",
"]",
")",
"except",
"Exception",
"as",
"exc",
":",
"log",
".",
"error",
"(",
"'Excepti... | Determine if token auth is valid and yield the adata | [
"Determine",
"if",
"token",
"auth",
"is",
"valid",
"and",
"yield",
"the",
"adata"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/auth/__init__.py#L562-L582 | train | Yields the token from the loadauth. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/auth/__init__.py | Authorize.eauth | def eauth(self, adata, load):
'''
Determine if the given eauth is valid and yield the adata
'''
for sub_auth in [adata]:
if load['eauth'] not in sub_auth:
continue
try:
name = self.loadauth.load_name(load)
if not ((n... | python | def eauth(self, adata, load):
'''
Determine if the given eauth is valid and yield the adata
'''
for sub_auth in [adata]:
if load['eauth'] not in sub_auth:
continue
try:
name = self.loadauth.load_name(load)
if not ((n... | [
"def",
"eauth",
"(",
"self",
",",
"adata",
",",
"load",
")",
":",
"for",
"sub_auth",
"in",
"[",
"adata",
"]",
":",
"if",
"load",
"[",
"'eauth'",
"]",
"not",
"in",
"sub_auth",
":",
"continue",
"try",
":",
"name",
"=",
"self",
".",
"loadauth",
".",
... | Determine if the given eauth is valid and yield the adata | [
"Determine",
"if",
"the",
"given",
"eauth",
"is",
"valid",
"and",
"yield",
"the",
"adata"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/auth/__init__.py#L584-L602 | train | Determine if the given eauth is valid and yield the adata
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/auth/__init__.py | Authorize.rights_check | def rights_check(self, form, sub_auth, name, load, eauth=None):
'''
Read in the access system to determine if the validated user has
requested rights
'''
if load.get('eauth'):
sub_auth = sub_auth[load['eauth']]
good = self.ckminions.any_auth(
f... | python | def rights_check(self, form, sub_auth, name, load, eauth=None):
'''
Read in the access system to determine if the validated user has
requested rights
'''
if load.get('eauth'):
sub_auth = sub_auth[load['eauth']]
good = self.ckminions.any_auth(
f... | [
"def",
"rights_check",
"(",
"self",
",",
"form",
",",
"sub_auth",
",",
"name",
",",
"load",
",",
"eauth",
"=",
"None",
")",
":",
"if",
"load",
".",
"get",
"(",
"'eauth'",
")",
":",
"sub_auth",
"=",
"sub_auth",
"[",
"load",
"[",
"'eauth'",
"]",
"]",... | Read in the access system to determine if the validated user has
requested rights | [
"Read",
"in",
"the",
"access",
"system",
"to",
"determine",
"if",
"the",
"validated",
"user",
"has",
"requested",
"rights"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/auth/__init__.py#L604-L631 | train | Check if the user has the requested rights | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/auth/__init__.py | Authorize.rights | def rights(self, form, load):
'''
Determine what type of authentication is being requested and pass
authorization
Note: this will check that the user has at least one right that will let
the user execute "load", this does not deal with conflicting rules
'''
adat... | python | def rights(self, form, load):
'''
Determine what type of authentication is being requested and pass
authorization
Note: this will check that the user has at least one right that will let
the user execute "load", this does not deal with conflicting rules
'''
adat... | [
"def",
"rights",
"(",
"self",
",",
"form",
",",
"load",
")",
":",
"adata",
"=",
"self",
".",
"auth_data",
"good",
"=",
"False",
"if",
"load",
".",
"get",
"(",
"'token'",
",",
"False",
")",
":",
"for",
"sub_auth",
"in",
"self",
".",
"token",
"(",
... | Determine what type of authentication is being requested and pass
authorization
Note: this will check that the user has at least one right that will let
the user execute "load", this does not deal with conflicting rules | [
"Determine",
"what",
"type",
"of",
"authentication",
"is",
"being",
"requested",
"and",
"pass",
"authorization"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/auth/__init__.py#L633-L670 | train | Checks if the user has at least one right that will let the user execute the load. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/auth/__init__.py | Resolver.cli | def cli(self, eauth):
'''
Execute the CLI options to fill in the extra data needed for the
defined eauth system
'''
ret = {}
if not eauth:
print('External authentication system has not been specified')
return ret
fstr = '{0}.auth'.format(ea... | python | def cli(self, eauth):
'''
Execute the CLI options to fill in the extra data needed for the
defined eauth system
'''
ret = {}
if not eauth:
print('External authentication system has not been specified')
return ret
fstr = '{0}.auth'.format(ea... | [
"def",
"cli",
"(",
"self",
",",
"eauth",
")",
":",
"ret",
"=",
"{",
"}",
"if",
"not",
"eauth",
":",
"print",
"(",
"'External authentication system has not been specified'",
")",
"return",
"ret",
"fstr",
"=",
"'{0}.auth'",
".",
"format",
"(",
"eauth",
")",
... | Execute the CLI options to fill in the extra data needed for the
defined eauth system | [
"Execute",
"the",
"CLI",
"options",
"to",
"fill",
"in",
"the",
"extra",
"data",
"needed",
"for",
"the",
"defined",
"eauth",
"system"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/auth/__init__.py#L690-L724 | train | Execute the CLI options to fill in the extra data needed for the system the user is the user | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/auth/__init__.py | Resolver.token_cli | def token_cli(self, eauth, load):
'''
Create the token from the CLI and request the correct data to
authenticate via the passed authentication mechanism
'''
load['cmd'] = 'mk_token'
load['eauth'] = eauth
tdata = self._send_token_request(load)
if 'token' no... | python | def token_cli(self, eauth, load):
'''
Create the token from the CLI and request the correct data to
authenticate via the passed authentication mechanism
'''
load['cmd'] = 'mk_token'
load['eauth'] = eauth
tdata = self._send_token_request(load)
if 'token' no... | [
"def",
"token_cli",
"(",
"self",
",",
"eauth",
",",
"load",
")",
":",
"load",
"[",
"'cmd'",
"]",
"=",
"'mk_token'",
"load",
"[",
"'eauth'",
"]",
"=",
"eauth",
"tdata",
"=",
"self",
".",
"_send_token_request",
"(",
"load",
")",
"if",
"'token'",
"not",
... | Create the token from the CLI and request the correct data to
authenticate via the passed authentication mechanism | [
"Create",
"the",
"token",
"from",
"the",
"CLI",
"and",
"request",
"the",
"correct",
"data",
"to",
"authenticate",
"via",
"the",
"passed",
"authentication",
"mechanism"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/auth/__init__.py#L726-L742 | train | Create the token from the CLI and request the correct data to
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/auth/__init__.py | Resolver.get_token | def get_token(self, token):
'''
Request a token from the master
'''
load = {}
load['token'] = token
load['cmd'] = 'get_token'
tdata = self._send_token_request(load)
return tdata | python | def get_token(self, token):
'''
Request a token from the master
'''
load = {}
load['token'] = token
load['cmd'] = 'get_token'
tdata = self._send_token_request(load)
return tdata | [
"def",
"get_token",
"(",
"self",
",",
"token",
")",
":",
"load",
"=",
"{",
"}",
"load",
"[",
"'token'",
"]",
"=",
"token",
"load",
"[",
"'cmd'",
"]",
"=",
"'get_token'",
"tdata",
"=",
"self",
".",
"_send_token_request",
"(",
"load",
")",
"return",
"t... | Request a token from the master | [
"Request",
"a",
"token",
"from",
"the",
"master"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/auth/__init__.py#L752-L760 | train | Request a token from the master | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/boto3_sns.py | describe_topic | def describe_topic(name, region=None, key=None, keyid=None, profile=None):
'''
Returns details about a specific SNS topic, specified by name or ARN.
CLI example::
salt my_favorite_client boto3_sns.describe_topic a_sns_topic_of_my_choice
'''
topics = list_topics(region=region, key=key, keyi... | python | def describe_topic(name, region=None, key=None, keyid=None, profile=None):
'''
Returns details about a specific SNS topic, specified by name or ARN.
CLI example::
salt my_favorite_client boto3_sns.describe_topic a_sns_topic_of_my_choice
'''
topics = list_topics(region=region, key=key, keyi... | [
"def",
"describe_topic",
"(",
"name",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"topics",
"=",
"list_topics",
"(",
"region",
"=",
"region",
",",
"key",
"=",
"key",
",",
"k... | Returns details about a specific SNS topic, specified by name or ARN.
CLI example::
salt my_favorite_client boto3_sns.describe_topic a_sns_topic_of_my_choice | [
"Returns",
"details",
"about",
"a",
"specific",
"SNS",
"topic",
"specified",
"by",
"name",
"or",
"ARN",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto3_sns.py#L99-L127 | train | Returns details about a specific SNS topic. | Pu7Z6IJCgH3a,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.