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/consul.py
session_destroy
def session_destroy(consul_url=None, token=None, session=None, **kwargs): ''' Destroy session :param consul_url: The Consul server URL. :param session: The ID of the session to destroy. :param dc: By default, the datacenter of the agent is queried; however, the dc can be provided usi...
python
def session_destroy(consul_url=None, token=None, session=None, **kwargs): ''' Destroy session :param consul_url: The Consul server URL. :param session: The ID of the session to destroy. :param dc: By default, the datacenter of the agent is queried; however, the dc can be provided usi...
[ "def", "session_destroy", "(", "consul_url", "=", "None", ",", "token", "=", "None", ",", "session", "=", "None", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "}", "if", "not", "consul_url", ":", "consul_url", "=", "_get_config", "(", ")", "if...
Destroy session :param consul_url: The Consul server URL. :param session: The ID of the session to destroy. :param dc: By default, the datacenter of the agent is queried; however, the dc can be provided using the "dc" parameter. :return: Boolean & message of success or failure. CLI ...
[ "Destroy", "session" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/consul.py#L1316-L1361
train
Destroy a session.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/consul.py
session_info
def session_info(consul_url=None, token=None, session=None, **kwargs): ''' Information about a session :param consul_url: The Consul server URL. :param session: The ID of the session to return information about. :param dc: By default, the datacenter of the agent is queried; however, ...
python
def session_info(consul_url=None, token=None, session=None, **kwargs): ''' Information about a session :param consul_url: The Consul server URL. :param session: The ID of the session to return information about. :param dc: By default, the datacenter of the agent is queried; however, ...
[ "def", "session_info", "(", "consul_url", "=", "None", ",", "token", "=", "None", ",", "session", "=", "None", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "}", "if", "not", "consul_url", ":", "consul_url", "=", "_get_config", "(", ")", "if", ...
Information about a session :param consul_url: The Consul server URL. :param session: The ID of the session to return information about. :param dc: By default, the datacenter of the agent is queried; however, the dc can be provided using the "dc" parameter. :return: Boolean & message of ...
[ "Information", "about", "a", "session" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/consul.py#L1364-L1403
train
Return information about a session.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/consul.py
catalog_register
def catalog_register(consul_url=None, token=None, **kwargs): ''' Registers a new node, service, or check :param consul_url: The Consul server URL. :param dc: By default, the datacenter of the agent is queried; however, the dc can be provided using the "dc" parameter. :param node: The...
python
def catalog_register(consul_url=None, token=None, **kwargs): ''' Registers a new node, service, or check :param consul_url: The Consul server URL. :param dc: By default, the datacenter of the agent is queried; however, the dc can be provided using the "dc" parameter. :param node: The...
[ "def", "catalog_register", "(", "consul_url", "=", "None", ",", "token", "=", "None", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "}", "data", "=", "{", "}", "data", "[", "'NodeMeta'", "]", "=", "{", "}", "if", "not", "consul_url", ":", "...
Registers a new node, service, or check :param consul_url: The Consul server URL. :param dc: By default, the datacenter of the agent is queried; however, the dc can be provided using the "dc" parameter. :param node: The node to register. :param address: The address of the node. :para...
[ "Registers", "a", "new", "node", "service", "or", "check" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/consul.py#L1406-L1564
train
This function registers a new node service or check with the Redis server.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/consul.py
catalog_datacenters
def catalog_datacenters(consul_url=None, token=None): ''' Return list of available datacenters from catalog. :param consul_url: The Consul server URL. :return: The list of available datacenters. CLI Example: .. code-block:: bash salt '*' consul.catalog_datacenters ''' ret = ...
python
def catalog_datacenters(consul_url=None, token=None): ''' Return list of available datacenters from catalog. :param consul_url: The Consul server URL. :return: The list of available datacenters. CLI Example: .. code-block:: bash salt '*' consul.catalog_datacenters ''' ret = ...
[ "def", "catalog_datacenters", "(", "consul_url", "=", "None", ",", "token", "=", "None", ")", ":", "ret", "=", "{", "}", "if", "not", "consul_url", ":", "consul_url", "=", "_get_config", "(", ")", "if", "not", "consul_url", ":", "log", ".", "error", "(...
Return list of available datacenters from catalog. :param consul_url: The Consul server URL. :return: The list of available datacenters. CLI Example: .. code-block:: bash salt '*' consul.catalog_datacenters
[ "Return", "list", "of", "available", "datacenters", "from", "catalog", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/consul.py#L1629-L1656
train
Return list of available datacenters from catalog.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/consul.py
catalog_nodes
def catalog_nodes(consul_url=None, token=None, **kwargs): ''' Return list of available nodes from catalog. :param consul_url: The Consul server URL. :param dc: By default, the datacenter of the agent is queried; however, the dc can be provided using the "dc" parameter. :return: The l...
python
def catalog_nodes(consul_url=None, token=None, **kwargs): ''' Return list of available nodes from catalog. :param consul_url: The Consul server URL. :param dc: By default, the datacenter of the agent is queried; however, the dc can be provided using the "dc" parameter. :return: The l...
[ "def", "catalog_nodes", "(", "consul_url", "=", "None", ",", "token", "=", "None", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "}", "query_params", "=", "{", "}", "if", "not", "consul_url", ":", "consul_url", "=", "_get_config", "(", ")", "if...
Return list of available nodes from catalog. :param consul_url: The Consul server URL. :param dc: By default, the datacenter of the agent is queried; however, the dc can be provided using the "dc" parameter. :return: The list of available nodes. CLI Example: .. code-block:: bash ...
[ "Return", "list", "of", "available", "nodes", "from", "catalog", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/consul.py#L1659-L1693
train
Return list of available nodes from catalog.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/consul.py
health_node
def health_node(consul_url=None, token=None, node=None, **kwargs): ''' Health information about the registered node. :param consul_url: The Consul server URL. :param node: The node to request health information about. :param dc: By default, the datacenter of the agent is queried; how...
python
def health_node(consul_url=None, token=None, node=None, **kwargs): ''' Health information about the registered node. :param consul_url: The Consul server URL. :param node: The node to request health information about. :param dc: By default, the datacenter of the agent is queried; how...
[ "def", "health_node", "(", "consul_url", "=", "None", ",", "token", "=", "None", ",", "node", "=", "None", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "}", "query_params", "=", "{", "}", "if", "not", "consul_url", ":", "consul_url", "=", "_...
Health information about the registered node. :param consul_url: The Consul server URL. :param node: The node to request health information about. :param dc: By default, the datacenter of the agent is queried; however, the dc can be provided using the "dc" parameter. :return: Health info...
[ "Health", "information", "about", "the", "registered", "node", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/consul.py#L1818-L1856
train
Get health information about a node.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/consul.py
health_checks
def health_checks(consul_url=None, token=None, service=None, **kwargs): ''' Health information about the registered service. :param consul_url: The Consul server URL. :param service: The service to request health information about. :param dc: By default, the datacenter of the agent is queried; ...
python
def health_checks(consul_url=None, token=None, service=None, **kwargs): ''' Health information about the registered service. :param consul_url: The Consul server URL. :param service: The service to request health information about. :param dc: By default, the datacenter of the agent is queried; ...
[ "def", "health_checks", "(", "consul_url", "=", "None", ",", "token", "=", "None", ",", "service", "=", "None", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "}", "query_params", "=", "{", "}", "if", "not", "consul_url", ":", "consul_url", "=",...
Health information about the registered service. :param consul_url: The Consul server URL. :param service: The service to request health information about. :param dc: By default, the datacenter of the agent is queried; however, the dc can be provided using the "dc" parameter. :return: He...
[ "Health", "information", "about", "the", "registered", "service", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/consul.py#L1859-L1897
train
Get health information about a node.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/consul.py
health_state
def health_state(consul_url=None, token=None, state=None, **kwargs): ''' Returns the checks in the state provided on the path. :param consul_url: The Consul server URL. :param state: The state to show checks for. The supported states are any, unknown, passing, warning, or critical. ...
python
def health_state(consul_url=None, token=None, state=None, **kwargs): ''' Returns the checks in the state provided on the path. :param consul_url: The Consul server URL. :param state: The state to show checks for. The supported states are any, unknown, passing, warning, or critical. ...
[ "def", "health_state", "(", "consul_url", "=", "None", ",", "token", "=", "None", ",", "state", "=", "None", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "}", "query_params", "=", "{", "}", "if", "not", "consul_url", ":", "consul_url", "=", ...
Returns the checks in the state provided on the path. :param consul_url: The Consul server URL. :param state: The state to show checks for. The supported states are any, unknown, passing, warning, or critical. The any state is a wildcard that can be used to ...
[ "Returns", "the", "checks", "in", "the", "state", "provided", "on", "the", "path", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/consul.py#L1952-L2000
train
Return the checks in the provided state on 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/modules/consul.py
acl_delete
def acl_delete(consul_url=None, token=None, **kwargs): ''' Delete an ACL token. :param consul_url: The Consul server URL. :param id: Unique identifier for the ACL to update. :return: Boolean & message of success or failure. CLI Example: .. code-block:: bash salt '*' consul.acl_de...
python
def acl_delete(consul_url=None, token=None, **kwargs): ''' Delete an ACL token. :param consul_url: The Consul server URL. :param id: Unique identifier for the ACL to update. :return: Boolean & message of success or failure. CLI Example: .. code-block:: bash salt '*' consul.acl_de...
[ "def", "acl_delete", "(", "consul_url", "=", "None", ",", "token", "=", "None", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "}", "data", "=", "{", "}", "if", "not", "consul_url", ":", "consul_url", "=", "_get_config", "(", ")", "if", "not",...
Delete an ACL token. :param consul_url: The Consul server URL. :param id: Unique identifier for the ACL to update. :return: Boolean & message of success or failure. CLI Example: .. code-block:: bash salt '*' consul.acl_delete id='c1c4d223-91cb-3d1f-1ee8-f2af9e7b6716'
[ "Delete", "an", "ACL", "token", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/consul.py#L2189-L2234
train
Delete an ACL 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/modules/consul.py
acl_info
def acl_info(consul_url=None, **kwargs): ''' Information about an ACL token. :param consul_url: The Consul server URL. :param id: Unique identifier for the ACL to update. :return: Information about the ACL requested. CLI Example: .. code-block:: bash salt '*' consul.acl_info id='...
python
def acl_info(consul_url=None, **kwargs): ''' Information about an ACL token. :param consul_url: The Consul server URL. :param id: Unique identifier for the ACL to update. :return: Information about the ACL requested. CLI Example: .. code-block:: bash salt '*' consul.acl_info id='...
[ "def", "acl_info", "(", "consul_url", "=", "None", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "}", "data", "=", "{", "}", "if", "not", "consul_url", ":", "consul_url", "=", "_get_config", "(", ")", "if", "not", "consul_url", ":", "log", "....
Information about an ACL token. :param consul_url: The Consul server URL. :param id: Unique identifier for the ACL to update. :return: Information about the ACL requested. CLI Example: .. code-block:: bash salt '*' consul.acl_info id='c1c4d223-91cb-3d1f-1ee8-f2af9e7b6716'
[ "Information", "about", "an", "ACL", "token", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/consul.py#L2237-L2272
train
Return information about an ACL 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/modules/consul.py
acl_list
def acl_list(consul_url=None, token=None, **kwargs): ''' List the ACL tokens. :param consul_url: The Consul server URL. :return: List of ACLs CLI Example: .. code-block:: bash salt '*' consul.acl_list ''' ret = {} data = {} if not consul_url: consul_url = _ge...
python
def acl_list(consul_url=None, token=None, **kwargs): ''' List the ACL tokens. :param consul_url: The Consul server URL. :return: List of ACLs CLI Example: .. code-block:: bash salt '*' consul.acl_list ''' ret = {} data = {} if not consul_url: consul_url = _ge...
[ "def", "acl_list", "(", "consul_url", "=", "None", ",", "token", "=", "None", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "}", "data", "=", "{", "}", "if", "not", "consul_url", ":", "consul_url", "=", "_get_config", "(", ")", "if", "not", ...
List the ACL tokens. :param consul_url: The Consul server URL. :return: List of ACLs CLI Example: .. code-block:: bash salt '*' consul.acl_list
[ "List", "the", "ACL", "tokens", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/consul.py#L2323-L2358
train
List the ACL tokens.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/consul.py
event_fire
def event_fire(consul_url=None, token=None, name=None, **kwargs): ''' List the ACL tokens. :param consul_url: The Consul server URL. :param name: The name of the event to fire. :param dc: By default, the datacenter of the agent is queried; however, the dc can be provided using the "d...
python
def event_fire(consul_url=None, token=None, name=None, **kwargs): ''' List the ACL tokens. :param consul_url: The Consul server URL. :param name: The name of the event to fire. :param dc: By default, the datacenter of the agent is queried; however, the dc can be provided using the "d...
[ "def", "event_fire", "(", "consul_url", "=", "None", ",", "token", "=", "None", ",", "name", "=", "None", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "}", "query_params", "=", "{", "}", "if", "not", "consul_url", ":", "consul_url", "=", "_g...
List the ACL tokens. :param consul_url: The Consul server URL. :param name: The name of the event to fire. :param dc: By default, the datacenter of the agent is queried; however, the dc can be provided using the "dc" parameter. :param node: Filter by node name. :param service: Filter...
[ "List", "the", "ACL", "tokens", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/consul.py#L2361-L2421
train
Fire an event.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/consul.py
event_list
def event_list(consul_url=None, token=None, **kwargs): ''' List the recent events. :param consul_url: The Consul server URL. :param name: The name of the event to fire. :return: List of ACLs CLI Example: .. code-block:: bash salt '*' consul.event_list ''' ret = {} qu...
python
def event_list(consul_url=None, token=None, **kwargs): ''' List the recent events. :param consul_url: The Consul server URL. :param name: The name of the event to fire. :return: List of ACLs CLI Example: .. code-block:: bash salt '*' consul.event_list ''' ret = {} qu...
[ "def", "event_list", "(", "consul_url", "=", "None", ",", "token", "=", "None", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "}", "query_params", "=", "{", "}", "if", "not", "consul_url", ":", "consul_url", "=", "_get_config", "(", ")", "if", ...
List the recent events. :param consul_url: The Consul server URL. :param name: The name of the event to fire. :return: List of ACLs CLI Example: .. code-block:: bash salt '*' consul.event_list
[ "List", "the", "recent", "events", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/consul.py#L2424-L2459
train
List the recent events.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/sysrc.py
managed
def managed(name, value, **kwargs): ''' Ensure a sysrc variable is set to a specific value. name The variable name to set value Value to set the variable to file (optional) The rc file to add the variable to. jail (option) the name or JID of the jail to set the v...
python
def managed(name, value, **kwargs): ''' Ensure a sysrc variable is set to a specific value. name The variable name to set value Value to set the variable to file (optional) The rc file to add the variable to. jail (option) the name or JID of the jail to set the v...
[ "def", "managed", "(", "name", ",", "value", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'result'", ":", "False", ",", "'comment'", ":", "''", "}", "# Check the current state", "cu...
Ensure a sysrc variable is set to a specific value. name The variable name to set value Value to set the variable to file (optional) The rc file to add the variable to. jail (option) the name or JID of the jail to set the value in. Example: .. code-block:: yaml...
[ "Ensure", "a", "sysrc", "variable", "is", "set", "to", "a", "specific", "value", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/sysrc.py#L24-L81
train
Ensure a sysrc variable is set to a specific value.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/client/ssh/wrapper/pillar.py
item
def item(*args): ''' .. versionadded:: 0.16.2 Return one or more pillar entries CLI Examples: .. code-block:: bash salt '*' pillar.item foo salt '*' pillar.item foo bar baz ''' ret = {} for arg in args: try: ret[arg] = __pillar__[arg] excep...
python
def item(*args): ''' .. versionadded:: 0.16.2 Return one or more pillar entries CLI Examples: .. code-block:: bash salt '*' pillar.item foo salt '*' pillar.item foo bar baz ''' ret = {} for arg in args: try: ret[arg] = __pillar__[arg] excep...
[ "def", "item", "(", "*", "args", ")", ":", "ret", "=", "{", "}", "for", "arg", "in", "args", ":", "try", ":", "ret", "[", "arg", "]", "=", "__pillar__", "[", "arg", "]", "except", "KeyError", ":", "pass", "return", "ret" ]
.. versionadded:: 0.16.2 Return one or more pillar entries CLI Examples: .. code-block:: bash salt '*' pillar.item foo salt '*' pillar.item foo bar baz
[ "..", "versionadded", "::", "0", ".", "16", ".", "2" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/ssh/wrapper/pillar.py#L67-L86
train
Return one or more pillar entries
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/client/ssh/wrapper/pillar.py
raw
def raw(key=None): ''' Return the raw pillar data that is available in the module. This will show the pillar as it is loaded as the __pillar__ dict. CLI Example: .. code-block:: bash salt '*' pillar.raw With the optional key argument, you can select a subtree of the pillar raw da...
python
def raw(key=None): ''' Return the raw pillar data that is available in the module. This will show the pillar as it is loaded as the __pillar__ dict. CLI Example: .. code-block:: bash salt '*' pillar.raw With the optional key argument, you can select a subtree of the pillar raw da...
[ "def", "raw", "(", "key", "=", "None", ")", ":", "if", "key", ":", "ret", "=", "__pillar__", ".", "get", "(", "key", ",", "{", "}", ")", "else", ":", "ret", "=", "__pillar__", "return", "ret" ]
Return the raw pillar data that is available in the module. This will show the pillar as it is loaded as the __pillar__ dict. CLI Example: .. code-block:: bash salt '*' pillar.raw With the optional key argument, you can select a subtree of the pillar raw data.:: salt '*' pillar....
[ "Return", "the", "raw", "pillar", "data", "that", "is", "available", "in", "the", "module", ".", "This", "will", "show", "the", "pillar", "as", "it", "is", "loaded", "as", "the", "__pillar__", "dict", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/ssh/wrapper/pillar.py#L89-L110
train
Return the raw pillar data that is available in the module.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/client/ssh/wrapper/pillar.py
keys
def keys(key, delimiter=DEFAULT_TARGET_DELIM): ''' .. versionadded:: 2015.8.0 Attempt to retrieve a list of keys from the named value from the pillar. The value can also represent a value in a nested dict using a ":" delimiter for the dict, similar to how pillar.get works. delimiter S...
python
def keys(key, delimiter=DEFAULT_TARGET_DELIM): ''' .. versionadded:: 2015.8.0 Attempt to retrieve a list of keys from the named value from the pillar. The value can also represent a value in a nested dict using a ":" delimiter for the dict, similar to how pillar.get works. delimiter S...
[ "def", "keys", "(", "key", ",", "delimiter", "=", "DEFAULT_TARGET_DELIM", ")", ":", "ret", "=", "salt", ".", "utils", ".", "data", ".", "traverse_dict_and_list", "(", "__pillar__", ",", "key", ",", "KeyError", ",", "delimiter", ")", "if", "ret", "is", "K...
.. versionadded:: 2015.8.0 Attempt to retrieve a list of keys from the named value from the pillar. The value can also represent a value in a nested dict using a ":" delimiter for the dict, similar to how pillar.get works. delimiter Specify an alternate delimiter to use when traversing a nest...
[ "..", "versionadded", "::", "2015", ".", "8", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/ssh/wrapper/pillar.py#L113-L140
train
Return a list of keys from the named value in the pillar
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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_elasticsearch_domain.py
present
def present(name, DomainName, ElasticsearchClusterConfig=None, EBSOptions=None, AccessPolicies=None, SnapshotOptions=None, AdvancedOptions=None, Tags=None, region=None, key=None, keyid=None, profile=None, ElasticsearchVersio...
python
def present(name, DomainName, ElasticsearchClusterConfig=None, EBSOptions=None, AccessPolicies=None, SnapshotOptions=None, AdvancedOptions=None, Tags=None, region=None, key=None, keyid=None, profile=None, ElasticsearchVersio...
[ "def", "present", "(", "name", ",", "DomainName", ",", "ElasticsearchClusterConfig", "=", "None", ",", "EBSOptions", "=", "None", ",", "AccessPolicies", "=", "None", ",", "SnapshotOptions", "=", "None", ",", "AdvancedOptions", "=", "None", ",", "Tags", "=", ...
Ensure domain exists. name The name of the state definition DomainName Name of the domain. ElasticsearchClusterConfig Configuration options for an Elasticsearch domain. Specifies the instance type and number of instances in the domain cluster. InstanceType (string...
[ "Ensure", "domain", "exists", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_elasticsearch_domain.py#L106-L325
train
Ensure a domain exists in the specified state definition.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/inspectlib/dbhandle.py
DBHandleBase.open
def open(self, new=False): ''' Init the database, if required. ''' self._db.new() if new else self._db.open() # pylint: disable=W0106 self._run_init_queries()
python
def open(self, new=False): ''' Init the database, if required. ''' self._db.new() if new else self._db.open() # pylint: disable=W0106 self._run_init_queries()
[ "def", "open", "(", "self", ",", "new", "=", "False", ")", ":", "self", ".", "_db", ".", "new", "(", ")", "if", "new", "else", "self", ".", "_db", ".", "open", "(", ")", "# pylint: disable=W0106", "self", ".", "_run_init_queries", "(", ")" ]
Init the database, if required.
[ "Init", "the", "database", "if", "required", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/inspectlib/dbhandle.py#L39-L44
train
Open the database if required.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/inspectlib/dbhandle.py
DBHandleBase._run_init_queries
def _run_init_queries(self): ''' Initialization queries ''' for obj in (Package, PackageCfgFile, PayloadFile, IgnoredDir, AllowedDir): self._db.create_table_from_object(obj())
python
def _run_init_queries(self): ''' Initialization queries ''' for obj in (Package, PackageCfgFile, PayloadFile, IgnoredDir, AllowedDir): self._db.create_table_from_object(obj())
[ "def", "_run_init_queries", "(", "self", ")", ":", "for", "obj", "in", "(", "Package", ",", "PackageCfgFile", ",", "PayloadFile", ",", "IgnoredDir", ",", "AllowedDir", ")", ":", "self", ".", "_db", ".", "create_table_from_object", "(", "obj", "(", ")", ")"...
Initialization queries
[ "Initialization", "queries" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/inspectlib/dbhandle.py#L46-L51
train
Initialize the tables in the database.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/inspectlib/dbhandle.py
DBHandleBase.purge
def purge(self): ''' Purge whole database. ''' for table_name in self._db.list_tables(): self._db.flush(table_name) self._run_init_queries()
python
def purge(self): ''' Purge whole database. ''' for table_name in self._db.list_tables(): self._db.flush(table_name) self._run_init_queries()
[ "def", "purge", "(", "self", ")", ":", "for", "table_name", "in", "self", ".", "_db", ".", "list_tables", "(", ")", ":", "self", ".", "_db", ".", "flush", "(", "table_name", ")", "self", ".", "_run_init_queries", "(", ")" ]
Purge whole database.
[ "Purge", "whole", "database", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/inspectlib/dbhandle.py#L53-L60
train
Purge all the data in the database.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/github.py
_get_config_value
def _get_config_value(profile, config_name): ''' Helper function that returns a profile's configuration value based on the supplied configuration name. profile The profile name that contains configuration information. config_name The configuration item's name to use to return confi...
python
def _get_config_value(profile, config_name): ''' Helper function that returns a profile's configuration value based on the supplied configuration name. profile The profile name that contains configuration information. config_name The configuration item's name to use to return confi...
[ "def", "_get_config_value", "(", "profile", ",", "config_name", ")", ":", "config", "=", "__salt__", "[", "'config.option'", "]", "(", "profile", ")", "if", "not", "config", ":", "raise", "CommandExecutionError", "(", "'Authentication information could not be found fo...
Helper function that returns a profile's configuration value based on the supplied configuration name. profile The profile name that contains configuration information. config_name The configuration item's name to use to return configuration values.
[ "Helper", "function", "that", "returns", "a", "profile", "s", "configuration", "value", "based", "on", "the", "supplied", "configuration", "name", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/github.py#L69-L97
train
Helper function that returns a profile s configuration value based on the supplied configuration 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/github.py
_get_client
def _get_client(profile): ''' Return the GitHub client, cached into __context__ for performance ''' token = _get_config_value(profile, 'token') key = 'github.{0}:{1}'.format( token, _get_config_value(profile, 'org_name') ) if key not in __context__: __context__[key] ...
python
def _get_client(profile): ''' Return the GitHub client, cached into __context__ for performance ''' token = _get_config_value(profile, 'token') key = 'github.{0}:{1}'.format( token, _get_config_value(profile, 'org_name') ) if key not in __context__: __context__[key] ...
[ "def", "_get_client", "(", "profile", ")", ":", "token", "=", "_get_config_value", "(", "profile", ",", "'token'", ")", "key", "=", "'github.{0}:{1}'", ".", "format", "(", "token", ",", "_get_config_value", "(", "profile", ",", "'org_name'", ")", ")", "if", ...
Return the GitHub client, cached into __context__ for performance
[ "Return", "the", "GitHub", "client", "cached", "into", "__context__", "for", "performance" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/github.py#L100-L115
train
Return the GitHub client cached into __context__ for performance
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/github.py
list_users
def list_users(profile="github", ignore_cache=False): ''' List all users within the organization. profile The name of the profile configuration to use. Defaults to ``github``. ignore_cache Bypasses the use of cached users. .. versionadded:: 2016.11.0 CLI Example: .. ...
python
def list_users(profile="github", ignore_cache=False): ''' List all users within the organization. profile The name of the profile configuration to use. Defaults to ``github``. ignore_cache Bypasses the use of cached users. .. versionadded:: 2016.11.0 CLI Example: .. ...
[ "def", "list_users", "(", "profile", "=", "\"github\"", ",", "ignore_cache", "=", "False", ")", ":", "org_name", "=", "_get_config_value", "(", "profile", ",", "'org_name'", ")", "key", "=", "\"github.{0}:users\"", ".", "format", "(", "org_name", ")", "if", ...
List all users within the organization. profile The name of the profile configuration to use. Defaults to ``github``. ignore_cache Bypasses the use of cached users. .. versionadded:: 2016.11.0 CLI Example: .. code-block:: bash salt myminion github.list_users ...
[ "List", "all", "users", "within", "the", "organization", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/github.py#L162-L189
train
List all users within the organization.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/github.py
get_user
def get_user(name, profile='github', user_details=False): ''' Get a GitHub user by name. name The user for which to obtain information. profile The name of the profile configuration to use. Defaults to ``github``. user_details Prints user information details. Defaults to `...
python
def get_user(name, profile='github', user_details=False): ''' Get a GitHub user by name. name The user for which to obtain information. profile The name of the profile configuration to use. Defaults to ``github``. user_details Prints user information details. Defaults to `...
[ "def", "get_user", "(", "name", ",", "profile", "=", "'github'", ",", "user_details", "=", "False", ")", ":", "if", "not", "user_details", "and", "name", "in", "list_users", "(", "profile", ")", ":", "# User is in the org, no need for additional Data", "return", ...
Get a GitHub user by name. name The user for which to obtain information. profile The name of the profile configuration to use. Defaults to ``github``. user_details Prints user information details. Defaults to ``False``. If the user is already in the organization and user_...
[ "Get", "a", "GitHub", "user", "by", "name", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/github.py#L192-L256
train
Get a GitHub user 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/github.py
add_user
def add_user(name, profile='github'): ''' Add a GitHub user. name The user for which to obtain information. profile The name of the profile configuration to use. Defaults to ``github``. CLI Example: .. code-block:: bash salt myminion github.add_user github-handle ...
python
def add_user(name, profile='github'): ''' Add a GitHub user. name The user for which to obtain information. profile The name of the profile configuration to use. Defaults to ``github``. CLI Example: .. code-block:: bash salt myminion github.add_user github-handle ...
[ "def", "add_user", "(", "name", ",", "profile", "=", "'github'", ")", ":", "client", "=", "_get_client", "(", "profile", ")", "organization", "=", "client", ".", "get_organization", "(", "_get_config_value", "(", "profile", ",", "'org_name'", ")", ")", "try"...
Add a GitHub user. name The user for which to obtain information. profile The name of the profile configuration to use. Defaults to ``github``. CLI Example: .. code-block:: bash salt myminion github.add_user github-handle
[ "Add", "a", "GitHub", "user", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/github.py#L259-L292
train
Adds a GitHub user to the list of users.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/github.py
remove_user
def remove_user(name, profile='github'): ''' Remove a Github user by name. name The user for which to obtain information. profile The name of the profile configuration to use. Defaults to ``github``. CLI Example: .. code-block:: bash salt myminion github.remove_user ...
python
def remove_user(name, profile='github'): ''' Remove a Github user by name. name The user for which to obtain information. profile The name of the profile configuration to use. Defaults to ``github``. CLI Example: .. code-block:: bash salt myminion github.remove_user ...
[ "def", "remove_user", "(", "name", ",", "profile", "=", "'github'", ")", ":", "client", "=", "_get_client", "(", "profile", ")", "organization", "=", "client", ".", "get_organization", "(", "_get_config_value", "(", "profile", ",", "'org_name'", ")", ")", "t...
Remove a Github user by name. name The user for which to obtain information. profile The name of the profile configuration to use. Defaults to ``github``. CLI Example: .. code-block:: bash salt myminion github.remove_user github-handle
[ "Remove", "a", "Github", "user", "by", "name", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/github.py#L295-L326
train
Remove a Github user 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/github.py
get_issue
def get_issue(issue_number, repo_name=None, profile='github', output='min'): ''' Return information about a single issue in a named repository. .. versionadded:: 2016.11.0 issue_number The number of the issue to retrieve. repo_name The name of the repository from which to get the ...
python
def get_issue(issue_number, repo_name=None, profile='github', output='min'): ''' Return information about a single issue in a named repository. .. versionadded:: 2016.11.0 issue_number The number of the issue to retrieve. repo_name The name of the repository from which to get the ...
[ "def", "get_issue", "(", "issue_number", ",", "repo_name", "=", "None", ",", "profile", "=", "'github'", ",", "output", "=", "'min'", ")", ":", "org_name", "=", "_get_config_value", "(", "profile", ",", "'org_name'", ")", "if", "repo_name", "is", "None", "...
Return information about a single issue in a named repository. .. versionadded:: 2016.11.0 issue_number The number of the issue to retrieve. repo_name The name of the repository from which to get the issue. This argument is required, either passed via the CLI, or defined in the co...
[ "Return", "information", "about", "a", "single", "issue", "in", "a", "named", "repository", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/github.py#L329-L374
train
Get information about a single issue in a named repository.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/github.py
get_issue_comments
def get_issue_comments(issue_number, repo_name=None, profile='github', since=None, output='min'): ''' Return information about the comments for a given issue in a named repository. .. versionadded:: 2016.11.0 i...
python
def get_issue_comments(issue_number, repo_name=None, profile='github', since=None, output='min'): ''' Return information about the comments for a given issue in a named repository. .. versionadded:: 2016.11.0 i...
[ "def", "get_issue_comments", "(", "issue_number", ",", "repo_name", "=", "None", ",", "profile", "=", "'github'", ",", "since", "=", "None", ",", "output", "=", "'min'", ")", ":", "org_name", "=", "_get_config_value", "(", "profile", ",", "'org_name'", ")", ...
Return information about the comments for a given issue in a named repository. .. versionadded:: 2016.11.0 issue_number The number of the issue for which to retrieve comments. repo_name The name of the repository to which the issue belongs. This argument is required, either passed...
[ "Return", "information", "about", "the", "comments", "for", "a", "given", "issue", "in", "a", "named", "repository", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/github.py#L377-L437
train
Get the comments for a given issue in a named repository.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/github.py
get_issues
def get_issues(repo_name=None, profile='github', milestone=None, state='open', assignee=None, creator=None, mentioned=None, labels=None, sort='created', direction='desc', ...
python
def get_issues(repo_name=None, profile='github', milestone=None, state='open', assignee=None, creator=None, mentioned=None, labels=None, sort='created', direction='desc', ...
[ "def", "get_issues", "(", "repo_name", "=", "None", ",", "profile", "=", "'github'", ",", "milestone", "=", "None", ",", "state", "=", "'open'", ",", "assignee", "=", "None", ",", "creator", "=", "None", ",", "mentioned", "=", "None", ",", "labels", "=...
Returns information for all issues in a given repository, based on the search options. .. versionadded:: 2016.11.0 repo_name The name of the repository for which to list issues. This argument is required, either passed via the CLI, or defined in the configured profile. A ``repo_name`` ...
[ "Returns", "information", "for", "all", "issues", "in", "a", "given", "repository", "based", "on", "the", "search", "options", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/github.py#L440-L568
train
Returns a new tree of issues in a given repository.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/github.py
get_milestones
def get_milestones(repo_name=None, profile='github', state='open', sort='due_on', direction='asc', output='min', per_page=None): ''' Return information about milestones for a given repository. ...
python
def get_milestones(repo_name=None, profile='github', state='open', sort='due_on', direction='asc', output='min', per_page=None): ''' Return information about milestones for a given repository. ...
[ "def", "get_milestones", "(", "repo_name", "=", "None", ",", "profile", "=", "'github'", ",", "state", "=", "'open'", ",", "sort", "=", "'due_on'", ",", "direction", "=", "'asc'", ",", "output", "=", "'min'", ",", "per_page", "=", "None", ")", ":", "or...
Return information about milestones for a given repository. .. versionadded:: 2016.11.0 repo_name The name of the repository for which to list issues. This argument is required, either passed via the CLI, or defined in the configured profile. A ``repo_name`` passed as a CLI argument wi...
[ "Return", "information", "about", "milestones", "for", "a", "given", "repository", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/github.py#L571-L650
train
Return information about milestones for a given repository.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/github.py
get_milestone
def get_milestone(number=None, name=None, repo_name=None, profile='github', output='min'): ''' Return information about a single milestone in a named repository. .. versionadded:: 2016.11.0 number The number of the milesto...
python
def get_milestone(number=None, name=None, repo_name=None, profile='github', output='min'): ''' Return information about a single milestone in a named repository. .. versionadded:: 2016.11.0 number The number of the milesto...
[ "def", "get_milestone", "(", "number", "=", "None", ",", "name", "=", "None", ",", "repo_name", "=", "None", ",", "profile", "=", "'github'", ",", "output", "=", "'min'", ")", ":", "ret", "=", "{", "}", "if", "not", "any", "(", "[", "number", ",", ...
Return information about a single milestone in a named repository. .. versionadded:: 2016.11.0 number The number of the milestone to retrieve. If provided, this option will be favored over ``name``. name The name of the milestone to retrieve. repo_name The name of the...
[ "Return", "information", "about", "a", "single", "milestone", "in", "a", "named", "repository", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/github.py#L653-L723
train
Return information about a single milestone in a named repository.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/github.py
get_repo_info
def get_repo_info(repo_name, profile='github', ignore_cache=False): ''' Return information for a given repo. .. versionadded:: 2016.11.0 repo_name The name of the repository. profile The name of the profile configuration to use. Defaults to ``github``. CLI Example: .. co...
python
def get_repo_info(repo_name, profile='github', ignore_cache=False): ''' Return information for a given repo. .. versionadded:: 2016.11.0 repo_name The name of the repository. profile The name of the profile configuration to use. Defaults to ``github``. CLI Example: .. co...
[ "def", "get_repo_info", "(", "repo_name", ",", "profile", "=", "'github'", ",", "ignore_cache", "=", "False", ")", ":", "org_name", "=", "_get_config_value", "(", "profile", ",", "'org_name'", ")", "key", "=", "\"github.{0}:{1}:repo_info\"", ".", "format", "(", ...
Return information for a given repo. .. versionadded:: 2016.11.0 repo_name The name of the repository. profile The name of the profile configuration to use. Defaults to ``github``. CLI Example: .. code-block:: bash salt myminion github.get_repo_info salt salt my...
[ "Return", "information", "for", "a", "given", "repo", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/github.py#L752-L800
train
Return information for a given repository.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/github.py
get_repo_teams
def get_repo_teams(repo_name, profile='github'): ''' Return teams belonging to a repository. .. versionadded:: 2017.7.0 repo_name The name of the repository from which to retrieve teams. profile The name of the profile configuration to use. Defaults to ``github``. CLI Example...
python
def get_repo_teams(repo_name, profile='github'): ''' Return teams belonging to a repository. .. versionadded:: 2017.7.0 repo_name The name of the repository from which to retrieve teams. profile The name of the profile configuration to use. Defaults to ``github``. CLI Example...
[ "def", "get_repo_teams", "(", "repo_name", ",", "profile", "=", "'github'", ")", ":", "ret", "=", "[", "]", "org_name", "=", "_get_config_value", "(", "profile", ",", "'org_name'", ")", "client", "=", "_get_client", "(", "profile", ")", "try", ":", "repo",...
Return teams belonging to a repository. .. versionadded:: 2017.7.0 repo_name The name of the repository from which to retrieve teams. profile The name of the profile configuration to use. Defaults to ``github``. CLI Example: .. code-block:: bash salt myminion github.get...
[ "Return", "teams", "belonging", "to", "a", "repository", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/github.py#L803-L846
train
Returns a list of teams belonging to a repository.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/github.py
list_private_repos
def list_private_repos(profile='github'): ''' List private repositories within the organization. Dependent upon the access rights of the profile token. .. versionadded:: 2016.11.0 profile The name of the profile configuration to use. Defaults to ``github``. CLI Example: .. code-b...
python
def list_private_repos(profile='github'): ''' List private repositories within the organization. Dependent upon the access rights of the profile token. .. versionadded:: 2016.11.0 profile The name of the profile configuration to use. Defaults to ``github``. CLI Example: .. code-b...
[ "def", "list_private_repos", "(", "profile", "=", "'github'", ")", ":", "repos", "=", "[", "]", "for", "repo", "in", "_get_repos", "(", "profile", ")", ":", "if", "repo", ".", "private", "is", "True", ":", "repos", ".", "append", "(", "repo", ".", "n...
List private repositories within the organization. Dependent upon the access rights of the profile token. .. versionadded:: 2016.11.0 profile The name of the profile configuration to use. Defaults to ``github``. CLI Example: .. code-block:: bash salt myminion github.list_private...
[ "List", "private", "repositories", "within", "the", "organization", ".", "Dependent", "upon", "the", "access", "rights", "of", "the", "profile", "token", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/github.py#L870-L891
train
List private repositories within the organization.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/github.py
list_public_repos
def list_public_repos(profile='github'): ''' List public repositories within the organization. .. versionadded:: 2016.11.0 profile The name of the profile configuration to use. Defaults to ``github``. CLI Example: .. code-block:: bash salt myminion github.list_public_repos ...
python
def list_public_repos(profile='github'): ''' List public repositories within the organization. .. versionadded:: 2016.11.0 profile The name of the profile configuration to use. Defaults to ``github``. CLI Example: .. code-block:: bash salt myminion github.list_public_repos ...
[ "def", "list_public_repos", "(", "profile", "=", "'github'", ")", ":", "repos", "=", "[", "]", "for", "repo", "in", "_get_repos", "(", "profile", ")", ":", "if", "repo", ".", "private", "is", "False", ":", "repos", ".", "append", "(", "repo", ".", "n...
List public repositories within the organization. .. versionadded:: 2016.11.0 profile The name of the profile configuration to use. Defaults to ``github``. CLI Example: .. code-block:: bash salt myminion github.list_public_repos salt myminion github.list_public_repos profile...
[ "List", "public", "repositories", "within", "the", "organization", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/github.py#L894-L914
train
List public repositories within the organization.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/github.py
add_repo
def add_repo(name, description=None, homepage=None, private=None, has_issues=None, has_wiki=None, has_downloads=None, auto_init=None, gitignore_template=None, license_template=None, profile=...
python
def add_repo(name, description=None, homepage=None, private=None, has_issues=None, has_wiki=None, has_downloads=None, auto_init=None, gitignore_template=None, license_template=None, profile=...
[ "def", "add_repo", "(", "name", ",", "description", "=", "None", ",", "homepage", "=", "None", ",", "private", "=", "None", ",", "has_issues", "=", "None", ",", "has_wiki", "=", "None", ",", "has_downloads", "=", "None", ",", "auto_init", "=", "None", ...
Create a new github repository. name The name of the team to be created. description The description of the repository. homepage The URL with more information about the repository. private The visiblity of the repository. Note that private repositories require ...
[ "Create", "a", "new", "github", "repository", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/github.py#L917-L1002
train
Creates a new github repository.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/github.py
edit_repo
def edit_repo(name, description=None, homepage=None, private=None, has_issues=None, has_wiki=None, has_downloads=None, profile="github"): ''' Updates an existing Github repository. name The name of the...
python
def edit_repo(name, description=None, homepage=None, private=None, has_issues=None, has_wiki=None, has_downloads=None, profile="github"): ''' Updates an existing Github repository. name The name of the...
[ "def", "edit_repo", "(", "name", ",", "description", "=", "None", ",", "homepage", "=", "None", ",", "private", "=", "None", ",", "has_issues", "=", "None", ",", "has_wiki", "=", "None", ",", "has_downloads", "=", "None", ",", "profile", "=", "\"github\"...
Updates an existing Github repository. name The name of the team to be created. description The description of the repository. homepage The URL with more information about the repository. private The visiblity of the repository. Note that private repositories require ...
[ "Updates", "an", "existing", "Github", "repository", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/github.py#L1005-L1089
train
Edit an existing Github repository.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/github.py
remove_repo
def remove_repo(name, profile="github"): ''' Remove a Github repository. name The name of the repository to be removed. profile The name of the profile configuration to use. Defaults to ``github``. CLI Example: .. code-block:: bash salt myminion github.remove_repo 'm...
python
def remove_repo(name, profile="github"): ''' Remove a Github repository. name The name of the repository to be removed. profile The name of the profile configuration to use. Defaults to ``github``. CLI Example: .. code-block:: bash salt myminion github.remove_repo 'm...
[ "def", "remove_repo", "(", "name", ",", "profile", "=", "\"github\"", ")", ":", "repo_info", "=", "get_repo_info", "(", "name", ",", "profile", "=", "profile", ")", "if", "not", "repo_info", ":", "log", ".", "error", "(", "'Repo %s to be removed does not exist...
Remove a Github repository. name The name of the repository to be removed. profile The name of the profile configuration to use. Defaults to ``github``. CLI Example: .. code-block:: bash salt myminion github.remove_repo 'my-repo' .. versionadded:: 2016.11.0
[ "Remove", "a", "Github", "repository", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/github.py#L1092-L1125
train
Removes a Github repository.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/github.py
add_team
def add_team(name, description=None, repo_names=None, privacy=None, permission=None, profile="github"): ''' Create a new Github team within an organization. name The name of the team to be created. description The descrip...
python
def add_team(name, description=None, repo_names=None, privacy=None, permission=None, profile="github"): ''' Create a new Github team within an organization. name The name of the team to be created. description The descrip...
[ "def", "add_team", "(", "name", ",", "description", "=", "None", ",", "repo_names", "=", "None", ",", "privacy", "=", "None", ",", "permission", "=", "None", ",", "profile", "=", "\"github\"", ")", ":", "try", ":", "client", "=", "_get_client", "(", "p...
Create a new Github team within an organization. name The name of the team to be created. description The description of the team. repo_names The names of repositories to add the team to. privacy The level of privacy for the team, can be 'secret' or 'closed'. per...
[ "Create", "a", "new", "Github", "team", "within", "an", "organization", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/github.py#L1148-L1210
train
Creates a new Github team within an organization.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/github.py
edit_team
def edit_team(name, description=None, privacy=None, permission=None, profile="github"): ''' Updates an existing Github team. name The name of the team to be edited. description The description of the team. privacy The...
python
def edit_team(name, description=None, privacy=None, permission=None, profile="github"): ''' Updates an existing Github team. name The name of the team to be edited. description The description of the team. privacy The...
[ "def", "edit_team", "(", "name", ",", "description", "=", "None", ",", "privacy", "=", "None", ",", "permission", "=", "None", ",", "profile", "=", "\"github\"", ")", ":", "team", "=", "get_team", "(", "name", ",", "profile", "=", "profile", ")", "if",...
Updates an existing Github team. name The name of the team to be edited. description The description of the team. privacy The level of privacy for the team, can be 'secret' or 'closed'. permission The default permission for new repositories added to the team, can be ...
[ "Updates", "an", "existing", "Github", "team", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/github.py#L1213-L1274
train
Edit an existing Github team.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/github.py
remove_team
def remove_team(name, profile="github"): ''' Remove a github team. name The name of the team to be removed. profile The name of the profile configuration to use. Defaults to ``github``. CLI Example: .. code-block:: bash salt myminion github.remove_team 'team_name' ...
python
def remove_team(name, profile="github"): ''' Remove a github team. name The name of the team to be removed. profile The name of the profile configuration to use. Defaults to ``github``. CLI Example: .. code-block:: bash salt myminion github.remove_team 'team_name' ...
[ "def", "remove_team", "(", "name", ",", "profile", "=", "\"github\"", ")", ":", "team_info", "=", "get_team", "(", "name", ",", "profile", "=", "profile", ")", "if", "not", "team_info", ":", "log", ".", "error", "(", "'Team %s to be removed does not exist.'", ...
Remove a github team. name The name of the team to be removed. profile The name of the profile configuration to use. Defaults to ``github``. CLI Example: .. code-block:: bash salt myminion github.remove_team 'team_name' .. versionadded:: 2016.11.0
[ "Remove", "a", "github", "team", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/github.py#L1277-L1309
train
Removes a github team.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/github.py
list_team_repos
def list_team_repos(team_name, profile="github", ignore_cache=False): ''' Gets the repo details for a given team as a dict from repo_name to repo details. Note that repo names are always in lower case. team_name The name of the team from which to list repos. profile The name of the...
python
def list_team_repos(team_name, profile="github", ignore_cache=False): ''' Gets the repo details for a given team as a dict from repo_name to repo details. Note that repo names are always in lower case. team_name The name of the team from which to list repos. profile The name of the...
[ "def", "list_team_repos", "(", "team_name", ",", "profile", "=", "\"github\"", ",", "ignore_cache", "=", "False", ")", ":", "cached_team", "=", "get_team", "(", "team_name", ",", "profile", "=", "profile", ")", "if", "not", "cached_team", ":", "log", ".", ...
Gets the repo details for a given team as a dict from repo_name to repo details. Note that repo names are always in lower case. team_name The name of the team from which to list repos. profile The name of the profile configuration to use. Defaults to ``github``. ignore_cache B...
[ "Gets", "the", "repo", "details", "for", "a", "given", "team", "as", "a", "dict", "from", "repo_name", "to", "repo", "details", ".", "Note", "that", "repo", "names", "are", "always", "in", "lower", "case", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/github.py#L1312-L1367
train
Returns the list of repos for a given team.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/github.py
add_team_repo
def add_team_repo(repo_name, team_name, profile="github", permission=None): ''' Adds a repository to a team with team_name. repo_name The name of the repository to add. team_name The name of the team of which to add the repository. profile The name of the profile configura...
python
def add_team_repo(repo_name, team_name, profile="github", permission=None): ''' Adds a repository to a team with team_name. repo_name The name of the repository to add. team_name The name of the team of which to add the repository. profile The name of the profile configura...
[ "def", "add_team_repo", "(", "repo_name", ",", "team_name", ",", "profile", "=", "\"github\"", ",", "permission", "=", "None", ")", ":", "team", "=", "get_team", "(", "team_name", ",", "profile", "=", "profile", ")", "if", "not", "team", ":", "log", ".",...
Adds a repository to a team with team_name. repo_name The name of the repository to add. team_name The name of the team of which to add the repository. profile The name of the profile configuration to use. Defaults to ``github``. permission The permission for team mem...
[ "Adds", "a", "repository", "to", "a", "team", "with", "team_name", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/github.py#L1370-L1423
train
Adds a repository to a team with team_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/github.py
remove_team_repo
def remove_team_repo(repo_name, team_name, profile="github"): ''' Removes a repository from a team with team_name. repo_name The name of the repository to remove. team_name The name of the team of which to remove the repository. profile The name of the profile configuratio...
python
def remove_team_repo(repo_name, team_name, profile="github"): ''' Removes a repository from a team with team_name. repo_name The name of the repository to remove. team_name The name of the team of which to remove the repository. profile The name of the profile configuratio...
[ "def", "remove_team_repo", "(", "repo_name", ",", "team_name", ",", "profile", "=", "\"github\"", ")", ":", "team", "=", "get_team", "(", "team_name", ",", "profile", "=", "profile", ")", "if", "not", "team", ":", "log", ".", "error", "(", "'Team %s does n...
Removes a repository from a team with team_name. repo_name The name of the repository to remove. team_name The name of the team of which to remove the repository. profile The name of the profile configuration to use. Defaults to ``github``. CLI Example: .. code-block:: b...
[ "Removes", "a", "repository", "from", "a", "team", "with", "team_name", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/github.py#L1426-L1462
train
Removes a repository from a team with team_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/github.py
list_team_members
def list_team_members(team_name, profile="github", ignore_cache=False): ''' Gets the names of team members in lower case. team_name The name of the team from which to list members. profile The name of the profile configuration to use. Defaults to ``github``. ignore_cache B...
python
def list_team_members(team_name, profile="github", ignore_cache=False): ''' Gets the names of team members in lower case. team_name The name of the team from which to list members. profile The name of the profile configuration to use. Defaults to ``github``. ignore_cache B...
[ "def", "list_team_members", "(", "team_name", ",", "profile", "=", "\"github\"", ",", "ignore_cache", "=", "False", ")", ":", "cached_team", "=", "get_team", "(", "team_name", ",", "profile", "=", "profile", ")", "if", "not", "cached_team", ":", "log", ".", ...
Gets the names of team members in lower case. team_name The name of the team from which to list members. profile The name of the profile configuration to use. Defaults to ``github``. ignore_cache Bypasses the use of cached team members. CLI Example: .. code-block:: bash ...
[ "Gets", "the", "names", "of", "team", "members", "in", "lower", "case", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/github.py#L1465-L1508
train
Returns a list of team members in lower case.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/github.py
list_members_without_mfa
def list_members_without_mfa(profile="github", ignore_cache=False): ''' List all members (in lower case) without MFA turned on. profile The name of the profile configuration to use. Defaults to ``github``. ignore_cache Bypasses the use of cached team repos. CLI Example: .. co...
python
def list_members_without_mfa(profile="github", ignore_cache=False): ''' List all members (in lower case) without MFA turned on. profile The name of the profile configuration to use. Defaults to ``github``. ignore_cache Bypasses the use of cached team repos. CLI Example: .. co...
[ "def", "list_members_without_mfa", "(", "profile", "=", "\"github\"", ",", "ignore_cache", "=", "False", ")", ":", "key", "=", "\"github.{0}:non_mfa_users\"", ".", "format", "(", "_get_config_value", "(", "profile", ",", "'org_name'", ")", ")", "if", "key", "not...
List all members (in lower case) without MFA turned on. profile The name of the profile configuration to use. Defaults to ``github``. ignore_cache Bypasses the use of cached team repos. CLI Example: .. code-block:: bash salt myminion github.list_members_without_mfa .. v...
[ "List", "all", "members", "(", "in", "lower", "case", ")", "without", "MFA", "turned", "on", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/github.py#L1511-L1547
train
Return a list of members that are not MFA enabled.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/github.py
is_team_member
def is_team_member(name, team_name, profile="github"): ''' Returns True if the github user is in the team with team_name, or False otherwise. name The name of the user whose membership to check. team_name The name of the team to check membership in. profile The name of...
python
def is_team_member(name, team_name, profile="github"): ''' Returns True if the github user is in the team with team_name, or False otherwise. name The name of the user whose membership to check. team_name The name of the team to check membership in. profile The name of...
[ "def", "is_team_member", "(", "name", ",", "team_name", ",", "profile", "=", "\"github\"", ")", ":", "return", "name", ".", "lower", "(", ")", "in", "list_team_members", "(", "team_name", ",", "profile", "=", "profile", ")" ]
Returns True if the github user is in the team with team_name, or False otherwise. name The name of the user whose membership to check. team_name The name of the team to check membership in. profile The name of the profile configuration to use. Defaults to ``github``. CLI...
[ "Returns", "True", "if", "the", "github", "user", "is", "in", "the", "team", "with", "team_name", "or", "False", "otherwise", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/github.py#L1550-L1572
train
Returns True if the github user is in the team with team_name False otherwise.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/github.py
add_team_member
def add_team_member(name, team_name, profile="github"): ''' Adds a team member to a team with team_name. name The name of the team member to add. team_name The name of the team of which to add the user. profile The name of the profile configuration to use. Defaults to ``gi...
python
def add_team_member(name, team_name, profile="github"): ''' Adds a team member to a team with team_name. name The name of the team member to add. team_name The name of the team of which to add the user. profile The name of the profile configuration to use. Defaults to ``gi...
[ "def", "add_team_member", "(", "name", ",", "team_name", ",", "profile", "=", "\"github\"", ")", ":", "team", "=", "get_team", "(", "team_name", ",", "profile", "=", "profile", ")", "if", "not", "team", ":", "log", ".", "error", "(", "'Team %s does not exi...
Adds a team member to a team with team_name. name The name of the team member to add. team_name The name of the team of which to add the user. profile The name of the profile configuration to use. Defaults to ``github``. CLI Example: .. code-block:: bash salt my...
[ "Adds", "a", "team", "member", "to", "a", "team", "with", "team_name", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/github.py#L1575-L1623
train
Adds a team member to a team with team_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/github.py
remove_team_member
def remove_team_member(name, team_name, profile="github"): ''' Removes a team member from a team with team_name. name The name of the team member to remove. team_name The name of the team from which to remove the user. profile The name of the profile configuration to use. ...
python
def remove_team_member(name, team_name, profile="github"): ''' Removes a team member from a team with team_name. name The name of the team member to remove. team_name The name of the team from which to remove the user. profile The name of the profile configuration to use. ...
[ "def", "remove_team_member", "(", "name", ",", "team_name", ",", "profile", "=", "\"github\"", ")", ":", "team", "=", "get_team", "(", "team_name", ",", "profile", "=", "profile", ")", "if", "not", "team", ":", "log", ".", "error", "(", "'Team %s does not ...
Removes a team member from a team with team_name. name The name of the team member to remove. team_name The name of the team from which to remove the user. profile The name of the profile configuration to use. Defaults to ``github``. CLI Example: .. code-block:: bash ...
[ "Removes", "a", "team", "member", "from", "a", "team", "with", "team_name", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/github.py#L1626-L1668
train
Removes a team member from a team with team_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/github.py
list_teams
def list_teams(profile="github", ignore_cache=False): ''' Lists all teams with the organization. profile The name of the profile configuration to use. Defaults to ``github``. ignore_cache Bypasses the use of cached teams. CLI Example: .. code-block:: bash salt mymini...
python
def list_teams(profile="github", ignore_cache=False): ''' Lists all teams with the organization. profile The name of the profile configuration to use. Defaults to ``github``. ignore_cache Bypasses the use of cached teams. CLI Example: .. code-block:: bash salt mymini...
[ "def", "list_teams", "(", "profile", "=", "\"github\"", ",", "ignore_cache", "=", "False", ")", ":", "key", "=", "'github.{0}:teams'", ".", "format", "(", "_get_config_value", "(", "profile", ",", "'org_name'", ")", ")", "if", "key", "not", "in", "__context_...
Lists all teams with the organization. profile The name of the profile configuration to use. Defaults to ``github``. ignore_cache Bypasses the use of cached teams. CLI Example: .. code-block:: bash salt myminion github.list_teams .. versionadded:: 2016.11.0
[ "Lists", "all", "teams", "with", "the", "organization", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/github.py#L1671-L1714
train
Lists all teams with the organization.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/github.py
get_prs
def get_prs(repo_name=None, profile='github', state='open', head=None, base=None, sort='created', direction='desc', output='min', per_page=None): ''' Returns information for all pull requests in a given repository, b...
python
def get_prs(repo_name=None, profile='github', state='open', head=None, base=None, sort='created', direction='desc', output='min', per_page=None): ''' Returns information for all pull requests in a given repository, b...
[ "def", "get_prs", "(", "repo_name", "=", "None", ",", "profile", "=", "'github'", ",", "state", "=", "'open'", ",", "head", "=", "None", ",", "base", "=", "None", ",", "sort", "=", "'created'", ",", "direction", "=", "'desc'", ",", "output", "=", "'m...
Returns information for all pull requests in a given repository, based on the search options provided. .. versionadded:: 2017.7.0 repo_name The name of the repository for which to list pull requests. This argument is required, either passed via the CLI, or defined in the configured...
[ "Returns", "information", "for", "all", "pull", "requests", "in", "a", "given", "repository", "based", "on", "the", "search", "options", "provided", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/github.py#L1717-L1813
train
Return a list of pull requests in a given repository.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/github.py
_format_pr
def _format_pr(pr_): ''' Helper function to format API return information into a more manageable and useful dictionary for pull request information. pr_ The pull request to format. ''' ret = {'id': pr_.get('id'), 'pr_number': pr_.get('number'), 'state': pr_.get('st...
python
def _format_pr(pr_): ''' Helper function to format API return information into a more manageable and useful dictionary for pull request information. pr_ The pull request to format. ''' ret = {'id': pr_.get('id'), 'pr_number': pr_.get('number'), 'state': pr_.get('st...
[ "def", "_format_pr", "(", "pr_", ")", ":", "ret", "=", "{", "'id'", ":", "pr_", ".", "get", "(", "'id'", ")", ",", "'pr_number'", ":", "pr_", ".", "get", "(", "'number'", ")", ",", "'state'", ":", "pr_", ".", "get", "(", "'state'", ")", ",", "'...
Helper function to format API return information into a more manageable and useful dictionary for pull request information. pr_ The pull request to format.
[ "Helper", "function", "to", "format", "API", "return", "information", "into", "a", "more", "manageable", "and", "useful", "dictionary", "for", "pull", "request", "information", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/github.py#L1816-L1832
train
Helper function to format pull request information into a more manageable and useful dictionary for pull request information.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/github.py
_format_issue
def _format_issue(issue): ''' Helper function to format API return information into a more manageable and useful dictionary for issue information. issue The issue to format. ''' ret = {'id': issue.get('id'), 'issue_number': issue.get('number'), 'state': issue.get('...
python
def _format_issue(issue): ''' Helper function to format API return information into a more manageable and useful dictionary for issue information. issue The issue to format. ''' ret = {'id': issue.get('id'), 'issue_number': issue.get('number'), 'state': issue.get('...
[ "def", "_format_issue", "(", "issue", ")", ":", "ret", "=", "{", "'id'", ":", "issue", ".", "get", "(", "'id'", ")", ",", "'issue_number'", ":", "issue", ".", "get", "(", "'number'", ")", ",", "'state'", ":", "issue", ".", "get", "(", "'state'", ")...
Helper function to format API return information into a more manageable and useful dictionary for issue information. issue The issue to format.
[ "Helper", "function", "to", "format", "API", "return", "information", "into", "a", "more", "manageable", "and", "useful", "dictionary", "for", "issue", "information", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/github.py#L1835-L1867
train
Helper function to format an issue into a more manageable and useful dictionary for issue information.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/github.py
_query
def _query(profile, action=None, command=None, args=None, method='GET', header_dict=None, data=None, url='https://api.github.com/', per_page=None): ''' Make a web call to the GitHub API and deal with paginated results. '...
python
def _query(profile, action=None, command=None, args=None, method='GET', header_dict=None, data=None, url='https://api.github.com/', per_page=None): ''' Make a web call to the GitHub API and deal with paginated results. '...
[ "def", "_query", "(", "profile", ",", "action", "=", "None", ",", "command", "=", "None", ",", "args", "=", "None", ",", "method", "=", "'GET'", ",", "header_dict", "=", "None", ",", "data", "=", "None", ",", "url", "=", "'https://api.github.com/'", ",...
Make a web call to the GitHub API and deal with paginated results.
[ "Make", "a", "web", "call", "to", "the", "GitHub", "API", "and", "deal", "with", "paginated", "results", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/github.py#L1870-L1959
train
Query the GitHub API.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/snapper.py
_get_baseline_from_tag
def _get_baseline_from_tag(config, tag): ''' Returns the last created baseline snapshot marked with `tag` ''' last_snapshot = None for snapshot in __salt__['snapper.list_snapshots'](config): if tag == snapshot['userdata'].get("baseline_tag"): if not last_snapshot or last_snapshot...
python
def _get_baseline_from_tag(config, tag): ''' Returns the last created baseline snapshot marked with `tag` ''' last_snapshot = None for snapshot in __salt__['snapper.list_snapshots'](config): if tag == snapshot['userdata'].get("baseline_tag"): if not last_snapshot or last_snapshot...
[ "def", "_get_baseline_from_tag", "(", "config", ",", "tag", ")", ":", "last_snapshot", "=", "None", "for", "snapshot", "in", "__salt__", "[", "'snapper.list_snapshots'", "]", "(", "config", ")", ":", "if", "tag", "==", "snapshot", "[", "'userdata'", "]", "."...
Returns the last created baseline snapshot marked with `tag`
[ "Returns", "the", "last", "created", "baseline", "snapshot", "marked", "with", "tag" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/snapper.py#L122-L131
train
Returns the last created baseline snapshot marked with 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/snapper.py
baseline_snapshot
def baseline_snapshot(name, number=None, tag=None, include_diff=True, config='root', ignore=None): ''' Enforces that no file is modified comparing against a previously defined snapshot identified by number. number Number of selected baseline snapshot. tag Tag of the selected baseli...
python
def baseline_snapshot(name, number=None, tag=None, include_diff=True, config='root', ignore=None): ''' Enforces that no file is modified comparing against a previously defined snapshot identified by number. number Number of selected baseline snapshot. tag Tag of the selected baseli...
[ "def", "baseline_snapshot", "(", "name", ",", "number", "=", "None", ",", "tag", "=", "None", ",", "include_diff", "=", "True", ",", "config", "=", "'root'", ",", "ignore", "=", "None", ")", ":", "if", "not", "ignore", ":", "ignore", "=", "[", "]", ...
Enforces that no file is modified comparing against a previously defined snapshot identified by number. number Number of selected baseline snapshot. tag Tag of the selected baseline snapshot. Most recent baseline baseline snapshot is used in case of multiple snapshots with the same...
[ "Enforces", "that", "no", "file", "is", "modified", "comparing", "against", "a", "previously", "defined", "snapshot", "identified", "by", "number", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/snapper.py#L134-L219
train
Return a new base language tree that is used to compare a previously - defined baseline snapshot.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/fsutils.py
_verify_run
def _verify_run(out, cmd=None): ''' Crash to the log if command execution was not successful. ''' if out.get('retcode', 0) and out['stderr']: if cmd: log.debug('Command: \'%s\'', cmd) log.debug('Return code: %s', out.get('retcode')) log.debug('Error output:\n%s', out...
python
def _verify_run(out, cmd=None): ''' Crash to the log if command execution was not successful. ''' if out.get('retcode', 0) and out['stderr']: if cmd: log.debug('Command: \'%s\'', cmd) log.debug('Return code: %s', out.get('retcode')) log.debug('Error output:\n%s', out...
[ "def", "_verify_run", "(", "out", ",", "cmd", "=", "None", ")", ":", "if", "out", ".", "get", "(", "'retcode'", ",", "0", ")", "and", "out", "[", "'stderr'", "]", ":", "if", "cmd", ":", "log", ".", "debug", "(", "'Command: \\'%s\\''", ",", "cmd", ...
Crash to the log if command execution was not successful.
[ "Crash", "to", "the", "log", "if", "command", "execution", "was", "not", "successful", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/fsutils.py#L25-L36
train
Verify that the command was successful.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/fsutils.py
_get_mounts
def _get_mounts(fs_type=None): ''' List mounted filesystems. ''' mounts = {} with salt.utils.files.fopen('/proc/mounts') as fhr: for line in fhr.readlines(): line = salt.utils.stringutils.to_unicode(line) device, mntpnt, fstype, options, fs_freq, fs_passno = line.stri...
python
def _get_mounts(fs_type=None): ''' List mounted filesystems. ''' mounts = {} with salt.utils.files.fopen('/proc/mounts') as fhr: for line in fhr.readlines(): line = salt.utils.stringutils.to_unicode(line) device, mntpnt, fstype, options, fs_freq, fs_passno = line.stri...
[ "def", "_get_mounts", "(", "fs_type", "=", "None", ")", ":", "mounts", "=", "{", "}", "with", "salt", ".", "utils", ".", "files", ".", "fopen", "(", "'/proc/mounts'", ")", "as", "fhr", ":", "for", "line", "in", "fhr", ".", "readlines", "(", ")", ":...
List mounted filesystems.
[ "List", "mounted", "filesystems", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/fsutils.py#L39-L60
train
Return a list of mounted filesystems.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/fsutils.py
_blkid_output
def _blkid_output(out, fs_type=None): ''' Parse blkid output. ''' flt = lambda data: [el for el in data if el.strip()] data = {} for dev_meta in flt(out.split('\n\n')): dev = {} for items in flt(dev_meta.strip().split('\n')): key, val = items.split('=', 1) ...
python
def _blkid_output(out, fs_type=None): ''' Parse blkid output. ''' flt = lambda data: [el for el in data if el.strip()] data = {} for dev_meta in flt(out.split('\n\n')): dev = {} for items in flt(dev_meta.strip().split('\n')): key, val = items.split('=', 1) ...
[ "def", "_blkid_output", "(", "out", ",", "fs_type", "=", "None", ")", ":", "flt", "=", "lambda", "data", ":", "[", "el", "for", "el", "in", "data", "if", "el", ".", "strip", "(", ")", "]", "data", "=", "{", "}", "for", "dev_meta", "in", "flt", ...
Parse blkid output.
[ "Parse", "blkid", "output", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/fsutils.py#L64-L86
train
Parse blkid output.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/fsutils.py
_blkid
def _blkid(fs_type=None): ''' Return available media devices. :param fs_type: Filter only devices that are formatted by that file system. ''' flt = lambda data: [el for el in data if el.strip()] data = dict() for dev_meta in flt(os.popen("blkid -o full").read().split(os.linesep)): # No __s...
python
def _blkid(fs_type=None): ''' Return available media devices. :param fs_type: Filter only devices that are formatted by that file system. ''' flt = lambda data: [el for el in data if el.strip()] data = dict() for dev_meta in flt(os.popen("blkid -o full").read().split(os.linesep)): # No __s...
[ "def", "_blkid", "(", "fs_type", "=", "None", ")", ":", "flt", "=", "lambda", "data", ":", "[", "el", "for", "el", "in", "data", "if", "el", ".", "strip", "(", ")", "]", "data", "=", "dict", "(", ")", "for", "dev_meta", "in", "flt", "(", "os", ...
Return available media devices. :param fs_type: Filter only devices that are formatted by that file system.
[ "Return", "available", "media", "devices", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/fsutils.py#L89-L114
train
Return available media devices.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/fsutils.py
_is_device
def _is_device(path): ''' Return True if path is a physical device. ''' out = __salt__['cmd.run_all']('file -i {0}'.format(path)) _verify_run(out) # Always [device, mime, charset]. See (file --help) return re.split(r'\s+', out['stdout'])[1][:-1] == 'inode/blockdevice'
python
def _is_device(path): ''' Return True if path is a physical device. ''' out = __salt__['cmd.run_all']('file -i {0}'.format(path)) _verify_run(out) # Always [device, mime, charset]. See (file --help) return re.split(r'\s+', out['stdout'])[1][:-1] == 'inode/blockdevice'
[ "def", "_is_device", "(", "path", ")", ":", "out", "=", "__salt__", "[", "'cmd.run_all'", "]", "(", "'file -i {0}'", ".", "format", "(", "path", ")", ")", "_verify_run", "(", "out", ")", "# Always [device, mime, charset]. See (file --help)", "return", "re", ".",...
Return True if path is a physical device.
[ "Return", "True", "if", "path", "is", "a", "physical", "device", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/fsutils.py#L117-L125
train
Return True if path is a physical 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/returners/mattermost_returner.py
returner
def returner(ret): ''' Send an mattermost message with the data ''' _options = _get_options(ret) api_url = _options.get('api_url') channel = _options.get('channel') username = _options.get('username') hook = _options.get('hook') if not hook: log.error('mattermost.hook not ...
python
def returner(ret): ''' Send an mattermost message with the data ''' _options = _get_options(ret) api_url = _options.get('api_url') channel = _options.get('channel') username = _options.get('username') hook = _options.get('hook') if not hook: log.error('mattermost.hook not ...
[ "def", "returner", "(", "ret", ")", ":", "_options", "=", "_get_options", "(", "ret", ")", "api_url", "=", "_options", ".", "get", "(", "'api_url'", ")", "channel", "=", "_options", ".", "get", "(", "'channel'", ")", "username", "=", "_options", ".", "...
Send an mattermost message with the data
[ "Send", "an", "mattermost", "message", "with", "the", "data" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/mattermost_returner.py#L96-L130
train
Send a mattermost message with the data
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/returners/mattermost_returner.py
event_return
def event_return(events): ''' Send the events to a mattermost room. :param events: List of events :return: Boolean if messages were sent successfully. ''' _options = _get_options() api_url = _options.get('api_url') channel = _options.get('channel') username = _optio...
python
def event_return(events): ''' Send the events to a mattermost room. :param events: List of events :return: Boolean if messages were sent successfully. ''' _options = _get_options() api_url = _options.get('api_url') channel = _options.get('channel') username = _optio...
[ "def", "event_return", "(", "events", ")", ":", "_options", "=", "_get_options", "(", ")", "api_url", "=", "_options", ".", "get", "(", "'api_url'", ")", "channel", "=", "_options", ".", "get", "(", "'channel'", ")", "username", "=", "_options", ".", "ge...
Send the events to a mattermost room. :param events: List of events :return: Boolean if messages were sent successfully.
[ "Send", "the", "events", "to", "a", "mattermost", "room", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/mattermost_returner.py#L133-L162
train
Send the events to a mattermost room.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/returners/mattermost_returner.py
post_message
def post_message(channel, message, username, api_url, hook): ''' Send a message to a mattermost room. :param channel: The room name. :param message: The message to send to the mattermost room. :param username: Specify wh...
python
def post_message(channel, message, username, api_url, hook): ''' Send a message to a mattermost room. :param channel: The room name. :param message: The message to send to the mattermost room. :param username: Specify wh...
[ "def", "post_message", "(", "channel", ",", "message", ",", "username", ",", "api_url", ",", "hook", ")", ":", "parameters", "=", "dict", "(", ")", "if", "channel", ":", "parameters", "[", "'channel'", "]", "=", "channel", "if", "username", ":", "paramet...
Send a message to a mattermost room. :param channel: The room name. :param message: The message to send to the mattermost room. :param username: Specify who the message is from. :param hook: The mattermost hook, if not specified in the configuration. :return: Boolean if...
[ "Send", "a", "message", "to", "a", "mattermost", "room", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/mattermost_returner.py#L165-L193
train
Send a message to a mattermost room.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/zookeeper.py
create
def create(path, value='', acls=None, ephemeral=False, sequence=False, makepath=False, profile=None, hosts=None, scheme=None, username=None, password=None, default_acl=None): ''' Create Znode path path of znode to create value value to assign to znode (Default: '') acls...
python
def create(path, value='', acls=None, ephemeral=False, sequence=False, makepath=False, profile=None, hosts=None, scheme=None, username=None, password=None, default_acl=None): ''' Create Znode path path of znode to create value value to assign to znode (Default: '') acls...
[ "def", "create", "(", "path", ",", "value", "=", "''", ",", "acls", "=", "None", ",", "ephemeral", "=", "False", ",", "sequence", "=", "False", ",", "makepath", "=", "False", ",", "profile", "=", "None", ",", "hosts", "=", "None", ",", "scheme", "=...
Create Znode path path of znode to create value value to assign to znode (Default: '') acls list of acl dictionaries to be assigned (Default: None) ephemeral indicate node is ephemeral (Default: False) sequence indicate node is suffixed with a unique inde...
[ "Create", "Znode" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zookeeper.py#L134-L187
train
Create a new node in Zookeeper
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/zookeeper.py
ensure_path
def ensure_path(path, acls=None, profile=None, hosts=None, scheme=None, username=None, password=None, default_acl=None): ''' Ensure Znode path exists path Parent path to create acls list of acls dictionaries to be assigned (Default: None) profile Configured...
python
def ensure_path(path, acls=None, profile=None, hosts=None, scheme=None, username=None, password=None, default_acl=None): ''' Ensure Znode path exists path Parent path to create acls list of acls dictionaries to be assigned (Default: None) profile Configured...
[ "def", "ensure_path", "(", "path", ",", "acls", "=", "None", ",", "profile", "=", "None", ",", "hosts", "=", "None", ",", "scheme", "=", "None", ",", "username", "=", "None", ",", "password", "=", "None", ",", "default_acl", "=", "None", ")", ":", ...
Ensure Znode path exists path Parent path to create acls list of acls dictionaries to be assigned (Default: None) profile Configured Zookeeper profile to authenticate with (Default: None) hosts Lists of Zookeeper Hosts (Default: '127.0.0.1:2181) scheme Sc...
[ "Ensure", "Znode", "path", "exists" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zookeeper.py#L190-L231
train
Ensures a Znode path exists
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/zookeeper.py
exists
def exists(path, profile=None, hosts=None, scheme=None, username=None, password=None, default_acl=None): ''' Check if path exists path path to check profile Configured Zookeeper profile to authenticate with (Default: None) hosts Lists of Zookeeper Hosts (Default: '127.0.0....
python
def exists(path, profile=None, hosts=None, scheme=None, username=None, password=None, default_acl=None): ''' Check if path exists path path to check profile Configured Zookeeper profile to authenticate with (Default: None) hosts Lists of Zookeeper Hosts (Default: '127.0.0....
[ "def", "exists", "(", "path", ",", "profile", "=", "None", ",", "hosts", "=", "None", ",", "scheme", "=", "None", ",", "username", "=", "None", ",", "password", "=", "None", ",", "default_acl", "=", "None", ")", ":", "conn", "=", "_get_zk_conn", "(",...
Check if path exists path path to check profile Configured Zookeeper profile to authenticate with (Default: None) hosts Lists of Zookeeper Hosts (Default: '127.0.0.1:2181) scheme Scheme to authenticate with (Default: 'digest') username Username to authent...
[ "Check", "if", "path", "exists" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zookeeper.py#L234-L268
train
Check if a path exists in Zookeeper
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/zookeeper.py
get
def get(path, profile=None, hosts=None, scheme=None, username=None, password=None, default_acl=None): ''' Get value saved in znode path path to check profile Configured Zookeeper profile to authenticate with (Default: None) hosts Lists of Zookeeper Hosts (Default: '127.0.0...
python
def get(path, profile=None, hosts=None, scheme=None, username=None, password=None, default_acl=None): ''' Get value saved in znode path path to check profile Configured Zookeeper profile to authenticate with (Default: None) hosts Lists of Zookeeper Hosts (Default: '127.0.0...
[ "def", "get", "(", "path", ",", "profile", "=", "None", ",", "hosts", "=", "None", ",", "scheme", "=", "None", ",", "username", "=", "None", ",", "password", "=", "None", ",", "default_acl", "=", "None", ")", ":", "conn", "=", "_get_zk_conn", "(", ...
Get value saved in znode path path to check profile Configured Zookeeper profile to authenticate with (Default: None) hosts Lists of Zookeeper Hosts (Default: '127.0.0.1:2181) scheme Scheme to authenticate with (Default: 'digest') username Username to aut...
[ "Get", "value", "saved", "in", "znode" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zookeeper.py#L271-L306
train
Get value saved in znode
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/zookeeper.py
get_children
def get_children(path, profile=None, hosts=None, scheme=None, username=None, password=None, default_acl=None): ''' Get children in znode path path path to check profile Configured Zookeeper profile to authenticate with (Default: None) hosts Lists of Zookeeper Hosts (Defaul...
python
def get_children(path, profile=None, hosts=None, scheme=None, username=None, password=None, default_acl=None): ''' Get children in znode path path path to check profile Configured Zookeeper profile to authenticate with (Default: None) hosts Lists of Zookeeper Hosts (Defaul...
[ "def", "get_children", "(", "path", ",", "profile", "=", "None", ",", "hosts", "=", "None", ",", "scheme", "=", "None", ",", "username", "=", "None", ",", "password", "=", "None", ",", "default_acl", "=", "None", ")", ":", "conn", "=", "_get_zk_conn", ...
Get children in znode path path path to check profile Configured Zookeeper profile to authenticate with (Default: None) hosts Lists of Zookeeper Hosts (Default: '127.0.0.1:2181) scheme Scheme to authenticate with (Default: 'digest') username Username to a...
[ "Get", "children", "in", "znode", "path" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zookeeper.py#L309-L344
train
Get children of a znode
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/zookeeper.py
set
def set(path, value, version=-1, profile=None, hosts=None, scheme=None, username=None, password=None, default_acl=None): ''' Update znode with new value path znode to update value value to set in znode version only update znode if version matches (Default: -1 (alwa...
python
def set(path, value, version=-1, profile=None, hosts=None, scheme=None, username=None, password=None, default_acl=None): ''' Update znode with new value path znode to update value value to set in znode version only update znode if version matches (Default: -1 (alwa...
[ "def", "set", "(", "path", ",", "value", ",", "version", "=", "-", "1", ",", "profile", "=", "None", ",", "hosts", "=", "None", ",", "scheme", "=", "None", ",", "username", "=", "None", ",", "password", "=", "None", ",", "default_acl", "=", "None",...
Update znode with new value path znode to update value value to set in znode version only update znode if version matches (Default: -1 (always matches)) profile Configured Zookeeper profile to authenticate with (Default: None) hosts Lists of Zookeeper Hos...
[ "Update", "znode", "with", "new", "value" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zookeeper.py#L347-L388
train
Set the value of a znode in a Zookeeper node
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/zookeeper.py
get_acls
def get_acls(path, profile=None, hosts=None, scheme=None, username=None, password=None, default_acl=None): ''' Get acls on a znode path path to znode profile Configured Zookeeper profile to authenticate with (Default: None) hosts Lists of Zookeeper Hosts (Default: '127.0.0...
python
def get_acls(path, profile=None, hosts=None, scheme=None, username=None, password=None, default_acl=None): ''' Get acls on a znode path path to znode profile Configured Zookeeper profile to authenticate with (Default: None) hosts Lists of Zookeeper Hosts (Default: '127.0.0...
[ "def", "get_acls", "(", "path", ",", "profile", "=", "None", ",", "hosts", "=", "None", ",", "scheme", "=", "None", ",", "username", "=", "None", ",", "password", "=", "None", ",", "default_acl", "=", "None", ")", ":", "conn", "=", "_get_zk_conn", "(...
Get acls on a znode path path to znode profile Configured Zookeeper profile to authenticate with (Default: None) hosts Lists of Zookeeper Hosts (Default: '127.0.0.1:2181) scheme Scheme to authenticate with (Default: 'digest') username Username to authenti...
[ "Get", "acls", "on", "a", "znode" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zookeeper.py#L391-L425
train
Get acls on a znode
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/zookeeper.py
set_acls
def set_acls(path, acls, version=-1, profile=None, hosts=None, scheme=None, username=None, password=None, default_acl=None): ''' Set acls on a znode path path to znode acls list of acl dictionaries to set on the znode version only set acls if version matches (...
python
def set_acls(path, acls, version=-1, profile=None, hosts=None, scheme=None, username=None, password=None, default_acl=None): ''' Set acls on a znode path path to znode acls list of acl dictionaries to set on the znode version only set acls if version matches (...
[ "def", "set_acls", "(", "path", ",", "acls", ",", "version", "=", "-", "1", ",", "profile", "=", "None", ",", "hosts", "=", "None", ",", "scheme", "=", "None", ",", "username", "=", "None", ",", "password", "=", "None", ",", "default_acl", "=", "No...
Set acls on a znode path path to znode acls list of acl dictionaries to set on the znode version only set acls if version matches (Default: -1 (always matches)) profile Configured Zookeeper profile to authenticate with (Default: None) hosts Lists of Zooke...
[ "Set", "acls", "on", "a", "znode" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zookeeper.py#L428-L474
train
Set acls on a znode
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/zookeeper.py
delete
def delete(path, version=-1, recursive=False, profile=None, hosts=None, scheme=None, username=None, password=None, default_acl=None): ''' Delete znode path path to znode version only delete if version matches (Default: -1 (always matches)) profile Configured Zoo...
python
def delete(path, version=-1, recursive=False, profile=None, hosts=None, scheme=None, username=None, password=None, default_acl=None): ''' Delete znode path path to znode version only delete if version matches (Default: -1 (always matches)) profile Configured Zoo...
[ "def", "delete", "(", "path", ",", "version", "=", "-", "1", ",", "recursive", "=", "False", ",", "profile", "=", "None", ",", "hosts", "=", "None", ",", "scheme", "=", "None", ",", "username", "=", "None", ",", "password", "=", "None", ",", "defau...
Delete znode path path to znode version only delete if version matches (Default: -1 (always matches)) profile Configured Zookeeper profile to authenticate with (Default: None) hosts Lists of Zookeeper Hosts (Default: '127.0.0.1:2181) scheme Scheme to auth...
[ "Delete", "znode" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zookeeper.py#L477-L515
train
Delete a znode
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/zookeeper.py
make_digest_acl
def make_digest_acl(username, password, read=False, write=False, create=False, delete=False, admin=False, allperms=False): ''' Generate acl object .. note:: This is heavily used in the zookeeper state and probably is not useful as a cli module username username of acl ...
python
def make_digest_acl(username, password, read=False, write=False, create=False, delete=False, admin=False, allperms=False): ''' Generate acl object .. note:: This is heavily used in the zookeeper state and probably is not useful as a cli module username username of acl ...
[ "def", "make_digest_acl", "(", "username", ",", "password", ",", "read", "=", "False", ",", "write", "=", "False", ",", "create", "=", "False", ",", "delete", "=", "False", ",", "admin", "=", "False", ",", "allperms", "=", "False", ")", ":", "return", ...
Generate acl object .. note:: This is heavily used in the zookeeper state and probably is not useful as a cli module username username of acl password plain text password of acl read read acl write write acl create create acl delete dele...
[ "Generate", "acl", "object" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zookeeper.py#L518-L555
train
Generate a new acl for a digest
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/mattermost.py
query
def query(hook=None, api_url=None, data=None): ''' Mattermost object method function to construct and execute on the API URL. :param api_url: The Mattermost API URL :param hook: The Mattermost hook. :param data: The data to be sent for POST method. :return: ...
python
def query(hook=None, api_url=None, data=None): ''' Mattermost object method function to construct and execute on the API URL. :param api_url: The Mattermost API URL :param hook: The Mattermost hook. :param data: The data to be sent for POST method. :return: ...
[ "def", "query", "(", "hook", "=", "None", ",", "api_url", "=", "None", ",", "data", "=", "None", ")", ":", "method", "=", "'POST'", "ret", "=", "{", "'message'", ":", "''", ",", "'res'", ":", "True", "}", "base_url", "=", "_urljoin", "(", "api_url"...
Mattermost object method function to construct and execute on the API URL. :param api_url: The Mattermost API URL :param hook: The Mattermost hook. :param data: The data to be sent for POST method. :return: The json response from the API call or False.
[ "Mattermost", "object", "method", "function", "to", "construct", "and", "execute", "on", "the", "API", "URL", ".", ":", "param", "api_url", ":", "The", "Mattermost", "API", "URL", ":", "param", "hook", ":", "The", "Mattermost", "hook", ".", ":", "param", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/mattermost.py#L29-L72
train
Query Mattermost API URL and return the json response.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/pillar/confidant.py
ext_pillar
def ext_pillar(minion_id, pillar, profile=None): ''' Read pillar data from Confidant via its API. ''' if profile is None: profile = {} # default to returning failure ret = { 'credentials_result': False, 'credentials': None, 'credentials_metadata': None } p...
python
def ext_pillar(minion_id, pillar, profile=None): ''' Read pillar data from Confidant via its API. ''' if profile is None: profile = {} # default to returning failure ret = { 'credentials_result': False, 'credentials': None, 'credentials_metadata': None } p...
[ "def", "ext_pillar", "(", "minion_id", ",", "pillar", ",", "profile", "=", "None", ")", ":", "if", "profile", "is", "None", ":", "profile", "=", "{", "}", "# default to returning failure", "ret", "=", "{", "'credentials_result'", ":", "False", ",", "'credent...
Read pillar data from Confidant via its API.
[ "Read", "pillar", "data", "from", "Confidant", "via", "its", "API", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/confidant.py#L70-L123
train
Read pillar data from Confidant via API.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/log/setup.py
setup_temp_logger
def setup_temp_logger(log_level='error'): ''' Setup the temporary console logger ''' if is_temp_logging_configured(): logging.getLogger(__name__).warning( 'Temporary logging is already configured' ) return if log_level is None: log_level = 'warning' ...
python
def setup_temp_logger(log_level='error'): ''' Setup the temporary console logger ''' if is_temp_logging_configured(): logging.getLogger(__name__).warning( 'Temporary logging is already configured' ) return if log_level is None: log_level = 'warning' ...
[ "def", "setup_temp_logger", "(", "log_level", "=", "'error'", ")", ":", "if", "is_temp_logging_configured", "(", ")", ":", "logging", ".", "getLogger", "(", "__name__", ")", ".", "warning", "(", "'Temporary logging is already configured'", ")", "return", "if", "lo...
Setup the temporary console logger
[ "Setup", "the", "temporary", "console", "logger" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/log/setup.py#L457-L508
train
Setup the temporary console logger.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/log/setup.py
setup_console_logger
def setup_console_logger(log_level='error', log_format=None, date_format=None): ''' Setup the console logger ''' if is_console_configured(): logging.getLogger(__name__).warning('Console logging already configured') return # Remove the temporary logging handler __remove_temp_logg...
python
def setup_console_logger(log_level='error', log_format=None, date_format=None): ''' Setup the console logger ''' if is_console_configured(): logging.getLogger(__name__).warning('Console logging already configured') return # Remove the temporary logging handler __remove_temp_logg...
[ "def", "setup_console_logger", "(", "log_level", "=", "'error'", ",", "log_format", "=", "None", ",", "date_format", "=", "None", ")", ":", "if", "is_console_configured", "(", ")", ":", "logging", ".", "getLogger", "(", "__name__", ")", ".", "warning", "(", ...
Setup the console logger
[ "Setup", "the", "console", "logger" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/log/setup.py#L511-L559
train
Setup the console logger.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/log/setup.py
setup_logfile_logger
def setup_logfile_logger(log_path, log_level='error', log_format=None, date_format=None, max_bytes=0, backup_count=0): ''' Setup the logfile logger Since version 0.10.6 we support logging to syslog, some examples: tcp://localhost:514/LOG_USER tcp://localhost/LOG_DA...
python
def setup_logfile_logger(log_path, log_level='error', log_format=None, date_format=None, max_bytes=0, backup_count=0): ''' Setup the logfile logger Since version 0.10.6 we support logging to syslog, some examples: tcp://localhost:514/LOG_USER tcp://localhost/LOG_DA...
[ "def", "setup_logfile_logger", "(", "log_path", ",", "log_level", "=", "'error'", ",", "log_format", "=", "None", ",", "date_format", "=", "None", ",", "max_bytes", "=", "0", ",", "backup_count", "=", "0", ")", ":", "if", "is_logfile_configured", "(", ")", ...
Setup the logfile logger Since version 0.10.6 we support logging to syslog, some examples: tcp://localhost:514/LOG_USER tcp://localhost/LOG_DAEMON udp://localhost:5145/LOG_KERN udp://localhost file:///dev/log file:///dev/log/LOG_SYSLOG file:///dev/log/LOG_DA...
[ "Setup", "the", "logfile", "logger" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/log/setup.py#L562-L739
train
Setup the logfile logger.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/log/setup.py
setup_extended_logging
def setup_extended_logging(opts): ''' Setup any additional logging handlers, internal or external ''' if is_extended_logging_configured() is True: # Don't re-configure external loggers return # Explicit late import of salt's loader import salt.loader # Let's keep a referenc...
python
def setup_extended_logging(opts): ''' Setup any additional logging handlers, internal or external ''' if is_extended_logging_configured() is True: # Don't re-configure external loggers return # Explicit late import of salt's loader import salt.loader # Let's keep a referenc...
[ "def", "setup_extended_logging", "(", "opts", ")", ":", "if", "is_extended_logging_configured", "(", ")", "is", "True", ":", "# Don't re-configure external loggers", "return", "# Explicit late import of salt's loader", "import", "salt", ".", "loader", "# Let's keep a referenc...
Setup any additional logging handlers, internal or external
[ "Setup", "any", "additional", "logging", "handlers", "internal", "or", "external" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/log/setup.py#L742-L824
train
Setup any additional logging handlers internal or external loggers.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/log/setup.py
set_multiprocessing_logging_level_by_opts
def set_multiprocessing_logging_level_by_opts(opts): ''' This will set the multiprocessing logging level to the lowest logging level of all the types of logging that are configured. ''' global __MP_LOGGING_LEVEL log_levels = [ LOG_LEVELS.get(opts.get('log_level', '').lower(), logging.ER...
python
def set_multiprocessing_logging_level_by_opts(opts): ''' This will set the multiprocessing logging level to the lowest logging level of all the types of logging that are configured. ''' global __MP_LOGGING_LEVEL log_levels = [ LOG_LEVELS.get(opts.get('log_level', '').lower(), logging.ER...
[ "def", "set_multiprocessing_logging_level_by_opts", "(", "opts", ")", ":", "global", "__MP_LOGGING_LEVEL", "log_levels", "=", "[", "LOG_LEVELS", ".", "get", "(", "opts", ".", "get", "(", "'log_level'", ",", "''", ")", ".", "lower", "(", ")", ",", "logging", ...
This will set the multiprocessing logging level to the lowest logging level of all the types of logging that are configured.
[ "This", "will", "set", "the", "multiprocessing", "logging", "level", "to", "the", "lowest", "logging", "level", "of", "all", "the", "types", "of", "logging", "that", "are", "configured", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/log/setup.py#L854-L870
train
This will set the multiprocessing logging level by the given options.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/log/setup.py
setup_multiprocessing_logging
def setup_multiprocessing_logging(queue=None): ''' This code should be called from within a running multiprocessing process instance. ''' from salt.utils.platform import is_windows global __MP_LOGGING_CONFIGURED global __MP_LOGGING_QUEUE_HANDLER if __MP_IN_MAINPROCESS is True and not i...
python
def setup_multiprocessing_logging(queue=None): ''' This code should be called from within a running multiprocessing process instance. ''' from salt.utils.platform import is_windows global __MP_LOGGING_CONFIGURED global __MP_LOGGING_QUEUE_HANDLER if __MP_IN_MAINPROCESS is True and not i...
[ "def", "setup_multiprocessing_logging", "(", "queue", "=", "None", ")", ":", "from", "salt", ".", "utils", ".", "platform", "import", "is_windows", "global", "__MP_LOGGING_CONFIGURED", "global", "__MP_LOGGING_QUEUE_HANDLER", "if", "__MP_IN_MAINPROCESS", "is", "True", ...
This code should be called from within a running multiprocessing process instance.
[ "This", "code", "should", "be", "called", "from", "within", "a", "running", "multiprocessing", "process", "instance", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/log/setup.py#L899-L950
train
This function is called by the multiprocessing process to setup the logging for the process running in the main 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/log/setup.py
set_logger_level
def set_logger_level(logger_name, log_level='error'): ''' Tweak a specific logger's logging level ''' logging.getLogger(logger_name).setLevel( LOG_LEVELS.get(log_level.lower(), logging.ERROR) )
python
def set_logger_level(logger_name, log_level='error'): ''' Tweak a specific logger's logging level ''' logging.getLogger(logger_name).setLevel( LOG_LEVELS.get(log_level.lower(), logging.ERROR) )
[ "def", "set_logger_level", "(", "logger_name", ",", "log_level", "=", "'error'", ")", ":", "logging", ".", "getLogger", "(", "logger_name", ")", ".", "setLevel", "(", "LOG_LEVELS", ".", "get", "(", "log_level", ".", "lower", "(", ")", ",", "logging", ".", ...
Tweak a specific logger's logging level
[ "Tweak", "a", "specific", "logger", "s", "logging", "level" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/log/setup.py#L1060-L1066
train
Tweak a specific logger s logging level
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/log/setup.py
patch_python_logging_handlers
def patch_python_logging_handlers(): ''' Patch the python logging handlers with out mixed-in classes ''' logging.StreamHandler = StreamHandler logging.FileHandler = FileHandler logging.handlers.SysLogHandler = SysLogHandler logging.handlers.WatchedFileHandler = WatchedFileHandler logging...
python
def patch_python_logging_handlers(): ''' Patch the python logging handlers with out mixed-in classes ''' logging.StreamHandler = StreamHandler logging.FileHandler = FileHandler logging.handlers.SysLogHandler = SysLogHandler logging.handlers.WatchedFileHandler = WatchedFileHandler logging...
[ "def", "patch_python_logging_handlers", "(", ")", ":", "logging", ".", "StreamHandler", "=", "StreamHandler", "logging", ".", "FileHandler", "=", "FileHandler", "logging", ".", "handlers", ".", "SysLogHandler", "=", "SysLogHandler", "logging", ".", "handlers", ".", ...
Patch the python logging handlers with out mixed-in classes
[ "Patch", "the", "python", "logging", "handlers", "with", "out", "mixed", "-", "in", "classes" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/log/setup.py#L1069-L1079
train
Patch the python logging handlers with out mixed - in classes
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/log/setup.py
__remove_null_logging_handler
def __remove_null_logging_handler(): ''' This function will run once the temporary logging has been configured. It just removes the NullHandler from the logging handlers. ''' global LOGGING_NULL_HANDLER if LOGGING_NULL_HANDLER is None: # Already removed return root_logger = ...
python
def __remove_null_logging_handler(): ''' This function will run once the temporary logging has been configured. It just removes the NullHandler from the logging handlers. ''' global LOGGING_NULL_HANDLER if LOGGING_NULL_HANDLER is None: # Already removed return root_logger = ...
[ "def", "__remove_null_logging_handler", "(", ")", ":", "global", "LOGGING_NULL_HANDLER", "if", "LOGGING_NULL_HANDLER", "is", "None", ":", "# Already removed", "return", "root_logger", "=", "logging", ".", "getLogger", "(", ")", "for", "handler", "in", "root_logger", ...
This function will run once the temporary logging has been configured. It just removes the NullHandler from the logging handlers.
[ "This", "function", "will", "run", "once", "the", "temporary", "logging", "has", "been", "configured", ".", "It", "just", "removes", "the", "NullHandler", "from", "the", "logging", "handlers", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/log/setup.py#L1132-L1149
train
This function will run once the temporary logging has been configured and removes the NullHandler from the logging handlers. It will run once the temporary logging has been configured and returns the original log element.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/log/setup.py
__remove_queue_logging_handler
def __remove_queue_logging_handler(): ''' This function will run once the additional loggers have been synchronized. It just removes the QueueLoggingHandler from the logging handlers. ''' global LOGGING_STORE_HANDLER if LOGGING_STORE_HANDLER is None: # Already removed return ...
python
def __remove_queue_logging_handler(): ''' This function will run once the additional loggers have been synchronized. It just removes the QueueLoggingHandler from the logging handlers. ''' global LOGGING_STORE_HANDLER if LOGGING_STORE_HANDLER is None: # Already removed return ...
[ "def", "__remove_queue_logging_handler", "(", ")", ":", "global", "LOGGING_STORE_HANDLER", "if", "LOGGING_STORE_HANDLER", "is", "None", ":", "# Already removed", "return", "root_logger", "=", "logging", ".", "getLogger", "(", ")", "for", "handler", "in", "root_logger"...
This function will run once the additional loggers have been synchronized. It just removes the QueueLoggingHandler from the logging handlers.
[ "This", "function", "will", "run", "once", "the", "additional", "loggers", "have", "been", "synchronized", ".", "It", "just", "removes", "the", "QueueLoggingHandler", "from", "the", "logging", "handlers", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/log/setup.py#L1152-L1169
train
This function will run once the additional loggers have been synchronized. It will remove the QueueLoggingHandler from the logging handlers.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/log/setup.py
__remove_temp_logging_handler
def __remove_temp_logging_handler(): ''' This function will run once logging has been configured. It just removes the temporary stream Handler from the logging handlers. ''' if is_logging_configured(): # In this case, the temporary logging handler has been removed, return! return ...
python
def __remove_temp_logging_handler(): ''' This function will run once logging has been configured. It just removes the temporary stream Handler from the logging handlers. ''' if is_logging_configured(): # In this case, the temporary logging handler has been removed, return! return ...
[ "def", "__remove_temp_logging_handler", "(", ")", ":", "if", "is_logging_configured", "(", ")", ":", "# In this case, the temporary logging handler has been removed, return!", "return", "# This should already be done, but...", "__remove_null_logging_handler", "(", ")", "root_logger",...
This function will run once logging has been configured. It just removes the temporary stream Handler from the logging handlers.
[ "This", "function", "will", "run", "once", "logging", "has", "been", "configured", ".", "It", "just", "removes", "the", "temporary", "stream", "Handler", "from", "the", "logging", "handlers", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/log/setup.py#L1172-L1197
train
This function will run once logging has been configured and removes the temporary stream Handler from the logging handlers.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/log/setup.py
__global_logging_exception_handler
def __global_logging_exception_handler(exc_type, exc_value, exc_traceback): ''' This function will log all un-handled python exceptions. ''' if exc_type.__name__ == "KeyboardInterrupt": # Do not log the exception or display the traceback on Keyboard Interrupt # Stop the logging queue lis...
python
def __global_logging_exception_handler(exc_type, exc_value, exc_traceback): ''' This function will log all un-handled python exceptions. ''' if exc_type.__name__ == "KeyboardInterrupt": # Do not log the exception or display the traceback on Keyboard Interrupt # Stop the logging queue lis...
[ "def", "__global_logging_exception_handler", "(", "exc_type", ",", "exc_value", ",", "exc_traceback", ")", ":", "if", "exc_type", ".", "__name__", "==", "\"KeyboardInterrupt\"", ":", "# Do not log the exception or display the traceback on Keyboard Interrupt", "# Stop the logging ...
This function will log all un-handled python exceptions.
[ "This", "function", "will", "log", "all", "un", "-", "handled", "python", "exceptions", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/log/setup.py#L1200-L1221
train
This function will log all un - handled python exceptions and display the traceback on the main thread.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/grub_legacy.py
conf
def conf(): ''' Parse GRUB conf file CLI Example: .. code-block:: bash salt '*' grub.conf ''' stanza = '' stanzas = [] in_stanza = False ret = {} pos = 0 try: with salt.utils.files.fopen(_detect_conf(), 'r') as _fp: for line in _fp: ...
python
def conf(): ''' Parse GRUB conf file CLI Example: .. code-block:: bash salt '*' grub.conf ''' stanza = '' stanzas = [] in_stanza = False ret = {} pos = 0 try: with salt.utils.files.fopen(_detect_conf(), 'r') as _fp: for line in _fp: ...
[ "def", "conf", "(", ")", ":", "stanza", "=", "''", "stanzas", "=", "[", "]", "in_stanza", "=", "False", "ret", "=", "{", "}", "pos", "=", "0", "try", ":", "with", "salt", ".", "utils", ".", "files", ".", "fopen", "(", "_detect_conf", "(", ")", ...
Parse GRUB conf file CLI Example: .. code-block:: bash salt '*' grub.conf
[ "Parse", "GRUB", "conf", "file" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/grub_legacy.py#L55-L115
train
Parse GRUB conf file and return a list of all the neccessary items in the order of the current 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/grub_legacy.py
_parse_line
def _parse_line(line=''): ''' Used by conf() to break config lines into name/value pairs ''' parts = line.split() key = parts.pop(0) value = ' '.join(parts) return key, value
python
def _parse_line(line=''): ''' Used by conf() to break config lines into name/value pairs ''' parts = line.split() key = parts.pop(0) value = ' '.join(parts) return key, value
[ "def", "_parse_line", "(", "line", "=", "''", ")", ":", "parts", "=", "line", ".", "split", "(", ")", "key", "=", "parts", ".", "pop", "(", "0", ")", "value", "=", "' '", ".", "join", "(", "parts", ")", "return", "key", ",", "value" ]
Used by conf() to break config lines into name/value pairs
[ "Used", "by", "conf", "()", "to", "break", "config", "lines", "into", "name", "/", "value", "pairs" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/grub_legacy.py#L118-L126
train
Parses a line into a key value pair.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/nxos_upgrade.py
check_upgrade_impact
def check_upgrade_impact(system_image, kickstart_image=None, issu=True, **kwargs): ''' Display upgrade impact information without actually upgrading the device. system_image (Mandatory Option) Path on bootflash: to system image upgrade file. kickstart_image Path on bootflash: to kickst...
python
def check_upgrade_impact(system_image, kickstart_image=None, issu=True, **kwargs): ''' Display upgrade impact information without actually upgrading the device. system_image (Mandatory Option) Path on bootflash: to system image upgrade file. kickstart_image Path on bootflash: to kickst...
[ "def", "check_upgrade_impact", "(", "system_image", ",", "kickstart_image", "=", "None", ",", "issu", "=", "True", ",", "*", "*", "kwargs", ")", ":", "# Input Validation", "if", "not", "isinstance", "(", "issu", ",", "bool", ")", ":", "return", "'Input Error...
Display upgrade impact information without actually upgrading the device. system_image (Mandatory Option) Path on bootflash: to system image upgrade file. kickstart_image Path on bootflash: to kickstart image upgrade file. (Not required if using combined system/kickstart image file) ...
[ "Display", "upgrade", "impact", "information", "without", "actually", "upgrading", "the", "device", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/nxos_upgrade.py#L77-L139
train
Check upgrade impact information.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/nxos_upgrade.py
upgrade
def upgrade(system_image, kickstart_image=None, issu=True, **kwargs): ''' Upgrade NX-OS switch. system_image (Mandatory Option) Path on bootflash: to system image upgrade file. kickstart_image Path on bootflash: to kickstart image upgrade file. (Not required if using combined s...
python
def upgrade(system_image, kickstart_image=None, issu=True, **kwargs): ''' Upgrade NX-OS switch. system_image (Mandatory Option) Path on bootflash: to system image upgrade file. kickstart_image Path on bootflash: to kickstart image upgrade file. (Not required if using combined s...
[ "def", "upgrade", "(", "system_image", ",", "kickstart_image", "=", "None", ",", "issu", "=", "True", ",", "*", "*", "kwargs", ")", ":", "# Input Validation", "if", "not", "isinstance", "(", "issu", ",", "bool", ")", ":", "return", "'Input Error: The [issu] ...
Upgrade NX-OS switch. system_image (Mandatory Option) Path on bootflash: to system image upgrade file. kickstart_image Path on bootflash: to kickstart image upgrade file. (Not required if using combined system/kickstart image file) Default: None issu Set this optio...
[ "Upgrade", "NX", "-", "OS", "switch", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/nxos_upgrade.py#L142-L248
train
This function is used to upgrade NX - OS switch.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/nxos_upgrade.py
_upgrade
def _upgrade(system_image, kickstart_image, issu, **kwargs): ''' Helper method that does the heavy lifting for upgrades. ''' si = system_image ki = kickstart_image dev = 'bootflash' cmd = 'terminal dont-ask ; install all' if ki is None: logmsg = 'Upgrading device using combined ...
python
def _upgrade(system_image, kickstart_image, issu, **kwargs): ''' Helper method that does the heavy lifting for upgrades. ''' si = system_image ki = kickstart_image dev = 'bootflash' cmd = 'terminal dont-ask ; install all' if ki is None: logmsg = 'Upgrading device using combined ...
[ "def", "_upgrade", "(", "system_image", ",", "kickstart_image", ",", "issu", ",", "*", "*", "kwargs", ")", ":", "si", "=", "system_image", "ki", "=", "kickstart_image", "dev", "=", "'bootflash'", "cmd", "=", "'terminal dont-ask ; install all'", "if", "ki", "is...
Helper method that does the heavy lifting for upgrades.
[ "Helper", "method", "that", "does", "the", "heavy", "lifting", "for", "upgrades", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/nxos_upgrade.py#L251-L297
train
Helper method that does the heavy lifting for upgrades.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/nxos_upgrade.py
_parse_upgrade_data
def _parse_upgrade_data(data): ''' Helper method to parse upgrade data from the NX-OS device. ''' upgrade_result = {} upgrade_result['upgrade_data'] = None upgrade_result['succeeded'] = False upgrade_result['upgrade_required'] = False upgrade_result['upgrade_non_disruptive'] = False ...
python
def _parse_upgrade_data(data): ''' Helper method to parse upgrade data from the NX-OS device. ''' upgrade_result = {} upgrade_result['upgrade_data'] = None upgrade_result['succeeded'] = False upgrade_result['upgrade_required'] = False upgrade_result['upgrade_non_disruptive'] = False ...
[ "def", "_parse_upgrade_data", "(", "data", ")", ":", "upgrade_result", "=", "{", "}", "upgrade_result", "[", "'upgrade_data'", "]", "=", "None", "upgrade_result", "[", "'succeeded'", "]", "=", "False", "upgrade_result", "[", "'upgrade_required'", "]", "=", "Fals...
Helper method to parse upgrade data from the NX-OS device.
[ "Helper", "method", "to", "parse", "upgrade", "data", "from", "the", "NX", "-", "OS", "device", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/nxos_upgrade.py#L300-L405
train
Helper method to parse upgrade data from NX - OS 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/dockercompose.py
__standardize_result
def __standardize_result(status, message, data=None, debug_msg=None): ''' Standardizes all responses :param status: :param message: :param data: :param debug_msg: :return: ''' result = { 'status': status, 'message': message } if data is not None: res...
python
def __standardize_result(status, message, data=None, debug_msg=None): ''' Standardizes all responses :param status: :param message: :param data: :param debug_msg: :return: ''' result = { 'status': status, 'message': message } if data is not None: res...
[ "def", "__standardize_result", "(", "status", ",", "message", ",", "data", "=", "None", ",", "debug_msg", "=", "None", ")", ":", "result", "=", "{", "'status'", ":", "status", ",", "'message'", ":", "message", "}", "if", "data", "is", "not", "None", ":...
Standardizes all responses :param status: :param message: :param data: :param debug_msg: :return:
[ "Standardizes", "all", "responses" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/dockercompose.py#L160-L181
train
Standardizes the response of a request.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/dockercompose.py
__get_docker_file_path
def __get_docker_file_path(path): ''' Determines the filepath to use :param path: :return: ''' if os.path.isfile(path): return path for dc_filename in DEFAULT_DC_FILENAMES: file_path = os.path.join(path, dc_filename) if os.path.isfile(file_path): return f...
python
def __get_docker_file_path(path): ''' Determines the filepath to use :param path: :return: ''' if os.path.isfile(path): return path for dc_filename in DEFAULT_DC_FILENAMES: file_path = os.path.join(path, dc_filename) if os.path.isfile(file_path): return f...
[ "def", "__get_docker_file_path", "(", "path", ")", ":", "if", "os", ".", "path", ".", "isfile", "(", "path", ")", ":", "return", "path", "for", "dc_filename", "in", "DEFAULT_DC_FILENAMES", ":", "file_path", "=", "os", ".", "path", ".", "join", "(", "path...
Determines the filepath to use :param path: :return:
[ "Determines", "the", "filepath", "to", "use" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/dockercompose.py#L184-L196
train
Determines the filepath to use
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/dockercompose.py
__read_docker_compose_file
def __read_docker_compose_file(file_path): ''' Read the compose file if it exists in the directory :param file_path: :return: ''' if not os.path.isfile(file_path): return __standardize_result(False, 'Path {} is not present'.format(file_path), ...
python
def __read_docker_compose_file(file_path): ''' Read the compose file if it exists in the directory :param file_path: :return: ''' if not os.path.isfile(file_path): return __standardize_result(False, 'Path {} is not present'.format(file_path), ...
[ "def", "__read_docker_compose_file", "(", "file_path", ")", ":", "if", "not", "os", ".", "path", ".", "isfile", "(", "file_path", ")", ":", "return", "__standardize_result", "(", "False", ",", "'Path {} is not present'", ".", "format", "(", "file_path", ")", "...
Read the compose file if it exists in the directory :param file_path: :return:
[ "Read", "the", "compose", "file", "if", "it", "exists", "in", "the", "directory" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/dockercompose.py#L200-L223
train
Read the compose file if it exists in the directory
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/dockercompose.py
__load_docker_compose
def __load_docker_compose(path): ''' Read the compose file and load its' contents :param path: :return: ''' file_path = __get_docker_file_path(path) if file_path is None: msg = 'Could not find docker-compose file at {0}'.format(path) return None, __standardize_result(False, ...
python
def __load_docker_compose(path): ''' Read the compose file and load its' contents :param path: :return: ''' file_path = __get_docker_file_path(path) if file_path is None: msg = 'Could not find docker-compose file at {0}'.format(path) return None, __standardize_result(False, ...
[ "def", "__load_docker_compose", "(", "path", ")", ":", "file_path", "=", "__get_docker_file_path", "(", "path", ")", "if", "file_path", "is", "None", ":", "msg", "=", "'Could not find docker-compose file at {0}'", ".", "format", "(", "path", ")", "return", "None",...
Read the compose file and load its' contents :param path: :return:
[ "Read", "the", "compose", "file", "and", "load", "its", "contents" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/dockercompose.py#L226-L263
train
Read the compose file and load its contents
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/dockercompose.py
__dump_docker_compose
def __dump_docker_compose(path, content, already_existed): ''' Dumps :param path: :param content: the not-yet dumped content :return: ''' try: dumped = yaml.safe_dump(content, indent=2, default_flow_style=False) return __write_docker_compose(path, dumped, already_existed) ...
python
def __dump_docker_compose(path, content, already_existed): ''' Dumps :param path: :param content: the not-yet dumped content :return: ''' try: dumped = yaml.safe_dump(content, indent=2, default_flow_style=False) return __write_docker_compose(path, dumped, already_existed) ...
[ "def", "__dump_docker_compose", "(", "path", ",", "content", ",", "already_existed", ")", ":", "try", ":", "dumped", "=", "yaml", ".", "safe_dump", "(", "content", ",", "indent", "=", "2", ",", "default_flow_style", "=", "False", ")", "return", "__write_dock...
Dumps :param path: :param content: the not-yet dumped content :return:
[ "Dumps" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/dockercompose.py#L266-L280
train
Dumps the content of the object to a file.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...