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/returners/couchdb_return.py | _get_options | def _get_options(ret=None):
'''
Get the couchdb options from salt.
'''
attrs = {'url': 'url',
'db': 'db',
'user': 'user',
'passwd': 'passwd',
'redact_pws': 'redact_pws',
'minimum_return': 'minimum_return'}
_options = salt.returners.ge... | python | def _get_options(ret=None):
'''
Get the couchdb options from salt.
'''
attrs = {'url': 'url',
'db': 'db',
'user': 'user',
'passwd': 'passwd',
'redact_pws': 'redact_pws',
'minimum_return': 'minimum_return'}
_options = salt.returners.ge... | [
"def",
"_get_options",
"(",
"ret",
"=",
"None",
")",
":",
"attrs",
"=",
"{",
"'url'",
":",
"'url'",
",",
"'db'",
":",
"'db'",
",",
"'user'",
":",
"'user'",
",",
"'passwd'",
":",
"'passwd'",
",",
"'redact_pws'",
":",
"'redact_pws'",
",",
"'minimum_return'... | Get the couchdb options from salt. | [
"Get",
"the",
"couchdb",
"options",
"from",
"salt",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/couchdb_return.py#L96-L136 | train | Get the couchdb options from salt. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/couchdb_return.py | _generate_doc | def _generate_doc(ret):
'''
Create a object that will be saved into the database based on
options.
'''
# Create a copy of the object that we will return.
retc = ret.copy()
# Set the ID of the document to be the JID.
retc["_id"] = ret["jid"]
# Add a timestamp field to the document
... | python | def _generate_doc(ret):
'''
Create a object that will be saved into the database based on
options.
'''
# Create a copy of the object that we will return.
retc = ret.copy()
# Set the ID of the document to be the JID.
retc["_id"] = ret["jid"]
# Add a timestamp field to the document
... | [
"def",
"_generate_doc",
"(",
"ret",
")",
":",
"# Create a copy of the object that we will return.",
"retc",
"=",
"ret",
".",
"copy",
"(",
")",
"# Set the ID of the document to be the JID.",
"retc",
"[",
"\"_id\"",
"]",
"=",
"ret",
"[",
"\"jid\"",
"]",
"# Add a timesta... | Create a object that will be saved into the database based on
options. | [
"Create",
"a",
"object",
"that",
"will",
"be",
"saved",
"into",
"the",
"database",
"based",
"on",
"options",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/couchdb_return.py#L151-L166 | train | Generate a document that will be saved into the database based on the options passed in. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/returners/couchdb_return.py | _request | def _request(method, url, content_type=None, _data=None, user=None, passwd=None):
'''
Makes a HTTP request. Returns the JSON parse, or an obj with an error.
'''
opener = _build_opener(_HTTPHandler)
request = _Request(url, data=_data)
if content_type:
request.add_header('Content-Type', co... | python | def _request(method, url, content_type=None, _data=None, user=None, passwd=None):
'''
Makes a HTTP request. Returns the JSON parse, or an obj with an error.
'''
opener = _build_opener(_HTTPHandler)
request = _Request(url, data=_data)
if content_type:
request.add_header('Content-Type', co... | [
"def",
"_request",
"(",
"method",
",",
"url",
",",
"content_type",
"=",
"None",
",",
"_data",
"=",
"None",
",",
"user",
"=",
"None",
",",
"passwd",
"=",
"None",
")",
":",
"opener",
"=",
"_build_opener",
"(",
"_HTTPHandler",
")",
"request",
"=",
"_Reque... | Makes a HTTP request. Returns the JSON parse, or an obj with an error. | [
"Makes",
"a",
"HTTP",
"request",
".",
"Returns",
"the",
"JSON",
"parse",
"or",
"an",
"obj",
"with",
"an",
"error",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/couchdb_return.py#L169-L187 | train | Makes a HTTP request. Returns the JSON parse or an error. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/couchdb_return.py | _generate_event_doc | def _generate_event_doc(event):
'''
Create a object that will be saved into the database based in
options.
'''
# Create a copy of the object that we will return.
eventc = event.copy()
# Set the ID of the document to be the JID.
eventc["_id"] = '{}-{}'.format(
... | python | def _generate_event_doc(event):
'''
Create a object that will be saved into the database based in
options.
'''
# Create a copy of the object that we will return.
eventc = event.copy()
# Set the ID of the document to be the JID.
eventc["_id"] = '{}-{}'.format(
... | [
"def",
"_generate_event_doc",
"(",
"event",
")",
":",
"# Create a copy of the object that we will return.",
"eventc",
"=",
"event",
".",
"copy",
"(",
")",
"# Set the ID of the document to be the JID.",
"eventc",
"[",
"\"_id\"",
"]",
"=",
"'{}-{}'",
".",
"format",
"(",
... | Create a object that will be saved into the database based in
options. | [
"Create",
"a",
"object",
"that",
"will",
"be",
"saved",
"into",
"the",
"database",
"based",
"in",
"options",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/couchdb_return.py#L190-L212 | train | Generate the document that will be returned by the 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/returners/couchdb_return.py | returner | def returner(ret):
'''
Take in the return and shove it into the couchdb database.
'''
options = _get_options(ret)
# Check to see if the database exists.
_response = _request("GET",
options['url'] + "_all_dbs",
user=options['user'],
... | python | def returner(ret):
'''
Take in the return and shove it into the couchdb database.
'''
options = _get_options(ret)
# Check to see if the database exists.
_response = _request("GET",
options['url'] + "_all_dbs",
user=options['user'],
... | [
"def",
"returner",
"(",
"ret",
")",
":",
"options",
"=",
"_get_options",
"(",
"ret",
")",
"# Check to see if the database exists.",
"_response",
"=",
"_request",
"(",
"\"GET\"",
",",
"options",
"[",
"'url'",
"]",
"+",
"\"_all_dbs\"",
",",
"user",
"=",
"options... | Take in the return and shove it into the couchdb database. | [
"Take",
"in",
"the",
"return",
"and",
"shove",
"it",
"into",
"the",
"couchdb",
"database",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/couchdb_return.py#L215-L269 | train | Take in the return and shove it into the couchdb 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/returners/couchdb_return.py | event_return | def event_return(events):
'''
Return event to CouchDB server
Requires that configuration be enabled via 'event_return'
option in master config.
Example:
event_return:
- couchdb
'''
log.debug('events data is: %s', events)
options = _get_options()
# Check to see if the d... | python | def event_return(events):
'''
Return event to CouchDB server
Requires that configuration be enabled via 'event_return'
option in master config.
Example:
event_return:
- couchdb
'''
log.debug('events data is: %s', events)
options = _get_options()
# Check to see if the d... | [
"def",
"event_return",
"(",
"events",
")",
":",
"log",
".",
"debug",
"(",
"'events data is: %s'",
",",
"events",
")",
"options",
"=",
"_get_options",
"(",
")",
"# Check to see if the database exists.",
"_response",
"=",
"_request",
"(",
"\"GET\"",
",",
"options",
... | Return event to CouchDB server
Requires that configuration be enabled via 'event_return'
option in master config.
Example:
event_return:
- couchdb | [
"Return",
"event",
"to",
"CouchDB",
"server",
"Requires",
"that",
"configuration",
"be",
"enabled",
"via",
"event_return",
"option",
"in",
"master",
"config",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/couchdb_return.py#L272-L318 | train | Return a list of events to CouchDB 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/returners/couchdb_return.py | get_jids | def get_jids():
'''
List all the jobs that we have..
'''
options = _get_options(ret=None)
_response = _request("GET", options['url'] + options['db'] + "/_all_docs?include_docs=true")
# Make sure the 'total_rows' is returned.. if not error out.
if 'total_rows' not in _response:
log.e... | python | def get_jids():
'''
List all the jobs that we have..
'''
options = _get_options(ret=None)
_response = _request("GET", options['url'] + options['db'] + "/_all_docs?include_docs=true")
# Make sure the 'total_rows' is returned.. if not error out.
if 'total_rows' not in _response:
log.e... | [
"def",
"get_jids",
"(",
")",
":",
"options",
"=",
"_get_options",
"(",
"ret",
"=",
"None",
")",
"_response",
"=",
"_request",
"(",
"\"GET\"",
",",
"options",
"[",
"'url'",
"]",
"+",
"options",
"[",
"'db'",
"]",
"+",
"\"/_all_docs?include_docs=true\"",
")",... | List all the jobs that we have.. | [
"List",
"all",
"the",
"jobs",
"that",
"we",
"have",
".."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/couchdb_return.py#L333-L356 | train | Get all the jobs that we have | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/couchdb_return.py | get_fun | def get_fun(fun):
'''
Return a dict with key being minion and value
being the job details of the last run of function 'fun'.
'''
# Get the options..
options = _get_options(ret=None)
# Define a simple return object.
_ret = {}
# get_minions takes care of calling ensure_views for us.... | python | def get_fun(fun):
'''
Return a dict with key being minion and value
being the job details of the last run of function 'fun'.
'''
# Get the options..
options = _get_options(ret=None)
# Define a simple return object.
_ret = {}
# get_minions takes care of calling ensure_views for us.... | [
"def",
"get_fun",
"(",
"fun",
")",
":",
"# Get the options..",
"options",
"=",
"_get_options",
"(",
"ret",
"=",
"None",
")",
"# Define a simple return object.",
"_ret",
"=",
"{",
"}",
"# get_minions takes care of calling ensure_views for us. For each minion we know about",
... | Return a dict with key being minion and value
being the job details of the last run of function 'fun'. | [
"Return",
"a",
"dict",
"with",
"key",
"being",
"minion",
"and",
"value",
"being",
"the",
"job",
"details",
"of",
"the",
"last",
"run",
"of",
"function",
"fun",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/couchdb_return.py#L359-L399 | train | Return a dict with key being minion and value being the job details of the last run of function fun. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/couchdb_return.py | get_minions | def get_minions():
'''
Return a list of minion identifiers from a request of the view.
'''
options = _get_options(ret=None)
# Make sure the views are valid, which includes the minions..
if not ensure_views():
return []
# Make the request for the view..
_response = _request("GET... | python | def get_minions():
'''
Return a list of minion identifiers from a request of the view.
'''
options = _get_options(ret=None)
# Make sure the views are valid, which includes the minions..
if not ensure_views():
return []
# Make the request for the view..
_response = _request("GET... | [
"def",
"get_minions",
"(",
")",
":",
"options",
"=",
"_get_options",
"(",
"ret",
"=",
"None",
")",
"# Make sure the views are valid, which includes the minions..",
"if",
"not",
"ensure_views",
"(",
")",
":",
"return",
"[",
"]",
"# Make the request for the view..",
"_r... | Return a list of minion identifiers from a request of the view. | [
"Return",
"a",
"list",
"of",
"minion",
"identifiers",
"from",
"a",
"request",
"of",
"the",
"view",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/couchdb_return.py#L402-L427 | train | Return a list of minion identifiers from a request of the view. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/couchdb_return.py | ensure_views | def ensure_views():
'''
This function makes sure that all the views that should
exist in the design document do exist.
'''
# Get the options so we have the URL and DB..
options = _get_options(ret=None)
# Make a request to check if the design document exists.
_response = _request("GET",... | python | def ensure_views():
'''
This function makes sure that all the views that should
exist in the design document do exist.
'''
# Get the options so we have the URL and DB..
options = _get_options(ret=None)
# Make a request to check if the design document exists.
_response = _request("GET",... | [
"def",
"ensure_views",
"(",
")",
":",
"# Get the options so we have the URL and DB..",
"options",
"=",
"_get_options",
"(",
"ret",
"=",
"None",
")",
"# Make a request to check if the design document exists.",
"_response",
"=",
"_request",
"(",
"\"GET\"",
",",
"options",
"... | This function makes sure that all the views that should
exist in the design document do exist. | [
"This",
"function",
"makes",
"sure",
"that",
"all",
"the",
"views",
"that",
"should",
"exist",
"in",
"the",
"design",
"document",
"do",
"exist",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/couchdb_return.py#L430-L456 | train | This function makes sure that all the views that should
exist in the design document do exist. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/returners/couchdb_return.py | set_salt_view | def set_salt_view():
'''
Helper function that sets the salt design
document. Uses get_valid_salt_views and some hardcoded values.
'''
options = _get_options(ret=None)
# Create the new object that we will shove in as the design doc.
new_doc = {}
new_doc['views'] = get_valid_salt_views()... | python | def set_salt_view():
'''
Helper function that sets the salt design
document. Uses get_valid_salt_views and some hardcoded values.
'''
options = _get_options(ret=None)
# Create the new object that we will shove in as the design doc.
new_doc = {}
new_doc['views'] = get_valid_salt_views()... | [
"def",
"set_salt_view",
"(",
")",
":",
"options",
"=",
"_get_options",
"(",
"ret",
"=",
"None",
")",
"# Create the new object that we will shove in as the design doc.",
"new_doc",
"=",
"{",
"}",
"new_doc",
"[",
"'views'",
"]",
"=",
"get_valid_salt_views",
"(",
")",
... | Helper function that sets the salt design
document. Uses get_valid_salt_views and some hardcoded values. | [
"Helper",
"function",
"that",
"sets",
"the",
"salt",
"design",
"document",
".",
"Uses",
"get_valid_salt_views",
"and",
"some",
"hardcoded",
"values",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/couchdb_return.py#L477-L497 | train | Helper function that sets the salt design document. Uses get_valid_salt_views and some hardcoded values. Returns True if successful 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/returners/couchdb_return.py | get_load | def get_load(jid):
'''
Included for API consistency
'''
options = _get_options(ret=None)
_response = _request("GET", options['url'] + options['db'] + '/' + jid)
if 'error' in _response:
log.error('Unable to get JID "%s" : "%s"', jid, _response)
return {}
return {_response['id... | python | def get_load(jid):
'''
Included for API consistency
'''
options = _get_options(ret=None)
_response = _request("GET", options['url'] + options['db'] + '/' + jid)
if 'error' in _response:
log.error('Unable to get JID "%s" : "%s"', jid, _response)
return {}
return {_response['id... | [
"def",
"get_load",
"(",
"jid",
")",
":",
"options",
"=",
"_get_options",
"(",
"ret",
"=",
"None",
")",
"_response",
"=",
"_request",
"(",
"\"GET\"",
",",
"options",
"[",
"'url'",
"]",
"+",
"options",
"[",
"'db'",
"]",
"+",
"'/'",
"+",
"jid",
")",
"... | Included for API consistency | [
"Included",
"for",
"API",
"consistency"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/couchdb_return.py#L521-L530 | train | Get the load of a resource | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/heat.py | _auth | def _auth(profile=None, api_version=1, **connection_args):
'''
Set up heat credentials, returns
`heatclient.client.Client`. Optional parameter
"api_version" defaults to 1.
Only intended to be used within heat-enabled modules
'''
if profile:
prefix = profile + ':keystone.'
else:... | python | def _auth(profile=None, api_version=1, **connection_args):
'''
Set up heat credentials, returns
`heatclient.client.Client`. Optional parameter
"api_version" defaults to 1.
Only intended to be used within heat-enabled modules
'''
if profile:
prefix = profile + ':keystone.'
else:... | [
"def",
"_auth",
"(",
"profile",
"=",
"None",
",",
"api_version",
"=",
"1",
",",
"*",
"*",
"connection_args",
")",
":",
"if",
"profile",
":",
"prefix",
"=",
"profile",
"+",
"':keystone.'",
"else",
":",
"prefix",
"=",
"'keystone.'",
"def",
"get",
"(",
"k... | Set up heat credentials, returns
`heatclient.client.Client`. Optional parameter
"api_version" defaults to 1.
Only intended to be used within heat-enabled modules | [
"Set",
"up",
"heat",
"credentials",
"returns",
"heatclient",
".",
"client",
".",
"Client",
".",
"Optional",
"parameter",
"api_version",
"defaults",
"to",
"1",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/heat.py#L102-L171 | train | Return a keystone client. Client object for authentication | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/heat.py | _parse_environment | def _parse_environment(env_str):
'''
Parsing template
'''
try:
env = salt.utils.yaml.safe_load(env_str)
except salt.utils.yaml.YAMLError as exc:
raise ValueError(six.text_type(exc))
else:
if env is None:
env = {}
elif not isinstance(env, dict):
... | python | def _parse_environment(env_str):
'''
Parsing template
'''
try:
env = salt.utils.yaml.safe_load(env_str)
except salt.utils.yaml.YAMLError as exc:
raise ValueError(six.text_type(exc))
else:
if env is None:
env = {}
elif not isinstance(env, dict):
... | [
"def",
"_parse_environment",
"(",
"env_str",
")",
":",
"try",
":",
"env",
"=",
"salt",
".",
"utils",
".",
"yaml",
".",
"safe_load",
"(",
"env_str",
")",
"except",
"salt",
".",
"utils",
".",
"yaml",
".",
"YAMLError",
"as",
"exc",
":",
"raise",
"ValueErr... | Parsing template | [
"Parsing",
"template"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/heat.py#L196-L216 | train | Parses the environment string into a dictionary of key - value pairs. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/heat.py | _get_stack_events | def _get_stack_events(h_client, stack_id, event_args):
'''
Get event for stack
'''
event_args['stack_id'] = stack_id
event_args['resource_name'] = None
try:
events = h_client.events.list(**event_args)
except heatclient.exc.HTTPNotFound as exc:
raise heatclient.exc.CommandErro... | python | def _get_stack_events(h_client, stack_id, event_args):
'''
Get event for stack
'''
event_args['stack_id'] = stack_id
event_args['resource_name'] = None
try:
events = h_client.events.list(**event_args)
except heatclient.exc.HTTPNotFound as exc:
raise heatclient.exc.CommandErro... | [
"def",
"_get_stack_events",
"(",
"h_client",
",",
"stack_id",
",",
"event_args",
")",
":",
"event_args",
"[",
"'stack_id'",
"]",
"=",
"stack_id",
"event_args",
"[",
"'resource_name'",
"]",
"=",
"None",
"try",
":",
"events",
"=",
"h_client",
".",
"events",
".... | Get event for stack | [
"Get",
"event",
"for",
"stack"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/heat.py#L219-L232 | train | Get events for a given stack. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/heat.py | _poll_for_events | def _poll_for_events(h_client, stack_name, action=None, poll_period=5,
timeout=60, marker=None):
'''
Polling stack events
'''
if action:
stop_status = ('{0}_FAILED'.format(action), '{0}_COMPLETE'.format(action))
stop_check = lambda a: a in stop_status
else:
... | python | def _poll_for_events(h_client, stack_name, action=None, poll_period=5,
timeout=60, marker=None):
'''
Polling stack events
'''
if action:
stop_status = ('{0}_FAILED'.format(action), '{0}_COMPLETE'.format(action))
stop_check = lambda a: a in stop_status
else:
... | [
"def",
"_poll_for_events",
"(",
"h_client",
",",
"stack_name",
",",
"action",
"=",
"None",
",",
"poll_period",
"=",
"5",
",",
"timeout",
"=",
"60",
",",
"marker",
"=",
"None",
")",
":",
"if",
"action",
":",
"stop_status",
"=",
"(",
"'{0}_FAILED'",
".",
... | Polling stack events | [
"Polling",
"stack",
"events"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/heat.py#L235-L283 | train | Poll for events from a stack. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/heat.py | list_stack | def list_stack(profile=None):
'''
Return a list of available stack (heat stack-list)
profile
Profile to use
CLI Example:
.. code-block:: bash
salt '*' heat.list_stack profile=openstack1
'''
ret = {}
h_client = _auth(profile)
for stack in h_client.stacks.list():
... | python | def list_stack(profile=None):
'''
Return a list of available stack (heat stack-list)
profile
Profile to use
CLI Example:
.. code-block:: bash
salt '*' heat.list_stack profile=openstack1
'''
ret = {}
h_client = _auth(profile)
for stack in h_client.stacks.list():
... | [
"def",
"list_stack",
"(",
"profile",
"=",
"None",
")",
":",
"ret",
"=",
"{",
"}",
"h_client",
"=",
"_auth",
"(",
"profile",
")",
"for",
"stack",
"in",
"h_client",
".",
"stacks",
".",
"list",
"(",
")",
":",
"links",
"=",
"{",
"}",
"for",
"link",
"... | Return a list of available stack (heat stack-list)
profile
Profile to use
CLI Example:
.. code-block:: bash
salt '*' heat.list_stack profile=openstack1 | [
"Return",
"a",
"list",
"of",
"available",
"stack",
"(",
"heat",
"stack",
"-",
"list",
")"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/heat.py#L286-L314 | train | Return a list of available stack | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/heat.py | show_stack | def show_stack(name=None, profile=None):
'''
Return details about a specific stack (heat stack-show)
name
Name of the stack
profile
Profile to use
CLI Example:
.. code-block:: bash
salt '*' heat.show_stack name=mystack profile=openstack1
'''
h_client = _auth(... | python | def show_stack(name=None, profile=None):
'''
Return details about a specific stack (heat stack-show)
name
Name of the stack
profile
Profile to use
CLI Example:
.. code-block:: bash
salt '*' heat.show_stack name=mystack profile=openstack1
'''
h_client = _auth(... | [
"def",
"show_stack",
"(",
"name",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"h_client",
"=",
"_auth",
"(",
"profile",
")",
"if",
"not",
"name",
":",
"return",
"{",
"'result'",
":",
"False",
",",
"'comment'",
":",
"'Parameter name missing or None'... | Return details about a specific stack (heat stack-show)
name
Name of the stack
profile
Profile to use
CLI Example:
.. code-block:: bash
salt '*' heat.show_stack name=mystack profile=openstack1 | [
"Return",
"details",
"about",
"a",
"specific",
"stack",
"(",
"heat",
"stack",
"-",
"show",
")"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/heat.py#L317-L362 | train | Return details about a specific stack | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/heat.py | delete_stack | def delete_stack(name=None, poll=0, timeout=60, profile=None):
'''
Delete a stack (heat stack-delete)
name
Name of the stack
poll
Poll and report events until stack complete
timeout
Stack creation timeout in minute
profile
Profile to use
CLI Examples:
... | python | def delete_stack(name=None, poll=0, timeout=60, profile=None):
'''
Delete a stack (heat stack-delete)
name
Name of the stack
poll
Poll and report events until stack complete
timeout
Stack creation timeout in minute
profile
Profile to use
CLI Examples:
... | [
"def",
"delete_stack",
"(",
"name",
"=",
"None",
",",
"poll",
"=",
"0",
",",
"timeout",
"=",
"60",
",",
"profile",
"=",
"None",
")",
":",
"h_client",
"=",
"_auth",
"(",
"profile",
")",
"ret",
"=",
"{",
"'result'",
":",
"True",
",",
"'comment'",
":"... | Delete a stack (heat stack-delete)
name
Name of the stack
poll
Poll and report events until stack complete
timeout
Stack creation timeout in minute
profile
Profile to use
CLI Examples:
.. code-block:: bash
salt '*' heat.delete_stack name=mystack po... | [
"Delete",
"a",
"stack",
"(",
"heat",
"stack",
"-",
"delete",
")"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/heat.py#L365-L428 | train | Delete a stack in a single resource. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/heat.py | create_stack | def create_stack(name=None, template_file=None, environment=None,
parameters=None, poll=0, rollback=False, timeout=60,
profile=None, enviroment=None):
'''
Create a stack (heat stack-create)
name
Name of the new stack
template_file
File of template
... | python | def create_stack(name=None, template_file=None, environment=None,
parameters=None, poll=0, rollback=False, timeout=60,
profile=None, enviroment=None):
'''
Create a stack (heat stack-create)
name
Name of the new stack
template_file
File of template
... | [
"def",
"create_stack",
"(",
"name",
"=",
"None",
",",
"template_file",
"=",
"None",
",",
"environment",
"=",
"None",
",",
"parameters",
"=",
"None",
",",
"poll",
"=",
"0",
",",
"rollback",
"=",
"False",
",",
"timeout",
"=",
"60",
",",
"profile",
"=",
... | Create a stack (heat stack-create)
name
Name of the new stack
template_file
File of template
environment
File of environment
parameters
Parameter dict used to create the stack
poll
Poll and report events until stack complete
rollback
Enable r... | [
"Create",
"a",
"stack",
"(",
"heat",
"stack",
"-",
"create",
")"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/heat.py#L431-L623 | train | Create a new stack in a given environment | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/heat.py | template_stack | def template_stack(name=None, profile=None):
'''
Return template a specific stack (heat stack-template)
name
Name of the stack
profile
Profile to use
CLI Example:
.. code-block:: bash
salt '*' heat.template_stack name=mystack profile=openstack1
'''
h_client =... | python | def template_stack(name=None, profile=None):
'''
Return template a specific stack (heat stack-template)
name
Name of the stack
profile
Profile to use
CLI Example:
.. code-block:: bash
salt '*' heat.template_stack name=mystack profile=openstack1
'''
h_client =... | [
"def",
"template_stack",
"(",
"name",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"h_client",
"=",
"_auth",
"(",
"profile",
")",
"if",
"not",
"name",
":",
"return",
"{",
"'result'",
":",
"False",
",",
"'comment'",
":",
"'Parameter name missing or N... | Return template a specific stack (heat stack-template)
name
Name of the stack
profile
Profile to use
CLI Example:
.. code-block:: bash
salt '*' heat.template_stack name=mystack profile=openstack1 | [
"Return",
"template",
"a",
"specific",
"stack",
"(",
"heat",
"stack",
"-",
"template",
")"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/heat.py#L824-L871 | train | Return a specific stack | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/uptime.py | monitored | def monitored(name, **params):
'''
Makes sure an URL is monitored by uptime. Checks if URL is already
monitored, and if not, adds it.
'''
ret = {'name': name, 'changes': {}, 'result': None, 'comment': ''}
if __salt__['uptime.check_exists'](name=name):
ret['result'] = True
ret['... | python | def monitored(name, **params):
'''
Makes sure an URL is monitored by uptime. Checks if URL is already
monitored, and if not, adds it.
'''
ret = {'name': name, 'changes': {}, 'result': None, 'comment': ''}
if __salt__['uptime.check_exists'](name=name):
ret['result'] = True
ret['... | [
"def",
"monitored",
"(",
"name",
",",
"*",
"*",
"params",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":",
"{",
"}",
",",
"'result'",
":",
"None",
",",
"'comment'",
":",
"''",
"}",
"if",
"__salt__",
"[",
"'uptime.check_exists'... | Makes sure an URL is monitored by uptime. Checks if URL is already
monitored, and if not, adds it. | [
"Makes",
"sure",
"an",
"URL",
"is",
"monitored",
"by",
"uptime",
".",
"Checks",
"if",
"URL",
"is",
"already",
"monitored",
"and",
"if",
"not",
"adds",
"it",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/uptime.py#L47-L75 | train | Makes sure an URL is monitored by uptime. Checks if URL is already monitored and adds it. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/zk_concurrency.py | lock_holders | def lock_holders(path,
zk_hosts=None,
identifier=None,
max_concurrency=1,
timeout=None,
ephemeral_lease=False,
profile=None,
scheme=None,
username=None,
password=None,... | python | def lock_holders(path,
zk_hosts=None,
identifier=None,
max_concurrency=1,
timeout=None,
ephemeral_lease=False,
profile=None,
scheme=None,
username=None,
password=None,... | [
"def",
"lock_holders",
"(",
"path",
",",
"zk_hosts",
"=",
"None",
",",
"identifier",
"=",
"None",
",",
"max_concurrency",
"=",
"1",
",",
"timeout",
"=",
"None",
",",
"ephemeral_lease",
"=",
"False",
",",
"profile",
"=",
"None",
",",
"scheme",
"=",
"None"... | Return an un-ordered list of lock holders
path
The path in zookeeper where the lock is
zk_hosts
zookeeper connect string
identifier
Name to identify this minion, if unspecified defaults to hostname
max_concurrency
Maximum number of lock holders
timeout
ti... | [
"Return",
"an",
"un",
"-",
"ordered",
"list",
"of",
"lock",
"holders"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zk_concurrency.py#L154-L198 | train | Return a list of lock holders for a specific path in a specific 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/zk_concurrency.py | lock | def lock(path,
zk_hosts=None,
identifier=None,
max_concurrency=1,
timeout=None,
ephemeral_lease=False,
force=False, # foricble get the lock regardless of open slots
profile=None,
scheme=None,
username=None,
password=None,
... | python | def lock(path,
zk_hosts=None,
identifier=None,
max_concurrency=1,
timeout=None,
ephemeral_lease=False,
force=False, # foricble get the lock regardless of open slots
profile=None,
scheme=None,
username=None,
password=None,
... | [
"def",
"lock",
"(",
"path",
",",
"zk_hosts",
"=",
"None",
",",
"identifier",
"=",
"None",
",",
"max_concurrency",
"=",
"1",
",",
"timeout",
"=",
"None",
",",
"ephemeral_lease",
"=",
"False",
",",
"force",
"=",
"False",
",",
"# foricble get the lock regardles... | Get lock (with optional timeout)
path
The path in zookeeper where the lock is
zk_hosts
zookeeper connect string
identifier
Name to identify this minion, if unspecified defaults to the hostname
max_concurrency
Maximum number of lock holders
timeout
timeout... | [
"Get",
"lock",
"(",
"with",
"optional",
"timeout",
")"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zk_concurrency.py#L201-L264 | train | Forcibly acquire a lock on the given path | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/zk_concurrency.py | unlock | def unlock(path,
zk_hosts=None, # in case you need to unlock without having run lock (failed execution for example)
identifier=None,
max_concurrency=1,
ephemeral_lease=False,
scheme=None,
profile=None,
username=None,
password=None,... | python | def unlock(path,
zk_hosts=None, # in case you need to unlock without having run lock (failed execution for example)
identifier=None,
max_concurrency=1,
ephemeral_lease=False,
scheme=None,
profile=None,
username=None,
password=None,... | [
"def",
"unlock",
"(",
"path",
",",
"zk_hosts",
"=",
"None",
",",
"# in case you need to unlock without having run lock (failed execution for example)",
"identifier",
"=",
"None",
",",
"max_concurrency",
"=",
"1",
",",
"ephemeral_lease",
"=",
"False",
",",
"scheme",
"=",... | Remove lease from semaphore
path
The path in zookeeper where the lock is
zk_hosts
zookeeper connect string
identifier
Name to identify this minion, if unspecified defaults to hostname
max_concurrency
Maximum number of lock holders
timeout
timeout to wait ... | [
"Remove",
"lease",
"from",
"semaphore"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zk_concurrency.py#L267-L320 | train | Unlock a lock on a specific 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/zk_concurrency.py | party_members | def party_members(path,
zk_hosts=None,
min_nodes=1,
blocking=False,
profile=None,
scheme=None,
username=None,
password=None,
default_acl=None,
):
'''
... | python | def party_members(path,
zk_hosts=None,
min_nodes=1,
blocking=False,
profile=None,
scheme=None,
username=None,
password=None,
default_acl=None,
):
'''
... | [
"def",
"party_members",
"(",
"path",
",",
"zk_hosts",
"=",
"None",
",",
"min_nodes",
"=",
"1",
",",
"blocking",
"=",
"False",
",",
"profile",
"=",
"None",
",",
"scheme",
"=",
"None",
",",
"username",
"=",
"None",
",",
"password",
"=",
"None",
",",
"d... | Get the List of identifiers in a particular party, optionally waiting for the
specified minimum number of nodes (min_nodes) to appear
path
The path in zookeeper where the lock is
zk_hosts
zookeeper connect string
min_nodes
The minimum number of nodes expected to be present in ... | [
"Get",
"the",
"List",
"of",
"identifiers",
"in",
"a",
"particular",
"party",
"optionally",
"waiting",
"for",
"the",
"specified",
"minimum",
"number",
"of",
"nodes",
"(",
"min_nodes",
")",
"to",
"appear"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zk_concurrency.py#L323-L364 | train | Get the list of identifiers in a particular party | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/chef.py | _default_logfile | def _default_logfile(exe_name):
'''
Retrieve the logfile name
'''
if salt.utils.platform.is_windows():
tmp_dir = os.path.join(__opts__['cachedir'], 'tmp')
if not os.path.isdir(tmp_dir):
os.mkdir(tmp_dir)
logfile_tmp = tempfile.NamedTemporaryFile(dir=tmp_dir,
... | python | def _default_logfile(exe_name):
'''
Retrieve the logfile name
'''
if salt.utils.platform.is_windows():
tmp_dir = os.path.join(__opts__['cachedir'], 'tmp')
if not os.path.isdir(tmp_dir):
os.mkdir(tmp_dir)
logfile_tmp = tempfile.NamedTemporaryFile(dir=tmp_dir,
... | [
"def",
"_default_logfile",
"(",
"exe_name",
")",
":",
"if",
"salt",
".",
"utils",
".",
"platform",
".",
"is_windows",
"(",
")",
":",
"tmp_dir",
"=",
"os",
".",
"path",
".",
"join",
"(",
"__opts__",
"[",
"'cachedir'",
"]",
",",
"'tmp'",
")",
"if",
"no... | Retrieve the logfile name | [
"Retrieve",
"the",
"logfile",
"name"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/chef.py#L32-L52 | train | Retrieve the logfile 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/chef.py | client | def client(whyrun=False,
localmode=False,
logfile=None,
**kwargs):
'''
Execute a chef client run and return a dict with the stderr, stdout,
return code, and pid.
CLI Example:
.. code-block:: bash
salt '*' chef.client server=https://localhost
server
... | python | def client(whyrun=False,
localmode=False,
logfile=None,
**kwargs):
'''
Execute a chef client run and return a dict with the stderr, stdout,
return code, and pid.
CLI Example:
.. code-block:: bash
salt '*' chef.client server=https://localhost
server
... | [
"def",
"client",
"(",
"whyrun",
"=",
"False",
",",
"localmode",
"=",
"False",
",",
"logfile",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"logfile",
"is",
"None",
":",
"logfile",
"=",
"_default_logfile",
"(",
"'chef-client'",
")",
"args",
"="... | Execute a chef client run and return a dict with the stderr, stdout,
return code, and pid.
CLI Example:
.. code-block:: bash
salt '*' chef.client server=https://localhost
server
The chef server URL
client_key
Set the client key file location
config
The confi... | [
"Execute",
"a",
"chef",
"client",
"run",
"and",
"return",
"a",
"dict",
"with",
"the",
"stderr",
"stdout",
"return",
"code",
"and",
"pid",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/chef.py#L56-L141 | train | Execute a chef. client run and return a dict with the stderr stdout and pid. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/chef.py | solo | def solo(whyrun=False,
logfile=None,
**kwargs):
'''
Execute a chef solo run and return a dict with the stderr, stdout,
return code, and pid.
CLI Example:
.. code-block:: bash
salt '*' chef.solo override-runlist=test
config
The configuration file to use
... | python | def solo(whyrun=False,
logfile=None,
**kwargs):
'''
Execute a chef solo run and return a dict with the stderr, stdout,
return code, and pid.
CLI Example:
.. code-block:: bash
salt '*' chef.solo override-runlist=test
config
The configuration file to use
... | [
"def",
"solo",
"(",
"whyrun",
"=",
"False",
",",
"logfile",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"logfile",
"is",
"None",
":",
"logfile",
"=",
"_default_logfile",
"(",
"'chef-solo'",
")",
"args",
"=",
"[",
"'chef-solo'",
",",
"'--no-co... | Execute a chef solo run and return a dict with the stderr, stdout,
return code, and pid.
CLI Example:
.. code-block:: bash
salt '*' chef.solo override-runlist=test
config
The configuration file to use
environment
Set the Chef Environment on the node
group
Gr... | [
"Execute",
"a",
"chef",
"solo",
"run",
"and",
"return",
"a",
"dict",
"with",
"the",
"stderr",
"stdout",
"return",
"code",
"and",
"pid",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/chef.py#L145-L206 | train | Execute a chef. solo run and return a dict with stderr stdout and pid | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/transport/frame.py | frame_msg | def frame_msg(body, header=None, raw_body=False): # pylint: disable=unused-argument
'''
Frame the given message with our wire protocol
'''
framed_msg = {}
if header is None:
header = {}
framed_msg['head'] = header
framed_msg['body'] = body
return salt.utils.msgpack.dumps(framed... | python | def frame_msg(body, header=None, raw_body=False): # pylint: disable=unused-argument
'''
Frame the given message with our wire protocol
'''
framed_msg = {}
if header is None:
header = {}
framed_msg['head'] = header
framed_msg['body'] = body
return salt.utils.msgpack.dumps(framed... | [
"def",
"frame_msg",
"(",
"body",
",",
"header",
"=",
"None",
",",
"raw_body",
"=",
"False",
")",
":",
"# pylint: disable=unused-argument",
"framed_msg",
"=",
"{",
"}",
"if",
"header",
"is",
"None",
":",
"header",
"=",
"{",
"}",
"framed_msg",
"[",
"'head'",... | Frame the given message with our wire protocol | [
"Frame",
"the",
"given",
"message",
"with",
"our",
"wire",
"protocol"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/transport/frame.py#L11-L21 | train | Frame the given message with our wire protocol | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/transport/frame.py | frame_msg_ipc | def frame_msg_ipc(body, header=None, raw_body=False): # pylint: disable=unused-argument
'''
Frame the given message with our wire protocol for IPC
For IPC, we don't need to be backwards compatible, so
use the more efficient "use_bin_type=True" on Python 3.
'''
framed_msg = {}
if header is ... | python | def frame_msg_ipc(body, header=None, raw_body=False): # pylint: disable=unused-argument
'''
Frame the given message with our wire protocol for IPC
For IPC, we don't need to be backwards compatible, so
use the more efficient "use_bin_type=True" on Python 3.
'''
framed_msg = {}
if header is ... | [
"def",
"frame_msg_ipc",
"(",
"body",
",",
"header",
"=",
"None",
",",
"raw_body",
"=",
"False",
")",
":",
"# pylint: disable=unused-argument",
"framed_msg",
"=",
"{",
"}",
"if",
"header",
"is",
"None",
":",
"header",
"=",
"{",
"}",
"framed_msg",
"[",
"'hea... | Frame the given message with our wire protocol for IPC
For IPC, we don't need to be backwards compatible, so
use the more efficient "use_bin_type=True" on Python 3. | [
"Frame",
"the",
"given",
"message",
"with",
"our",
"wire",
"protocol",
"for",
"IPC"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/transport/frame.py#L24-L40 | train | Frame the given message with our wire protocol for IPC. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/transport/frame.py | _decode_embedded_list | def _decode_embedded_list(src):
'''
Convert enbedded bytes to strings if possible.
List helper.
'''
output = []
for elem in src:
if isinstance(elem, dict):
elem = _decode_embedded_dict(elem)
elif isinstance(elem, list):
elem = _decode_embedded_list(elem) ... | python | def _decode_embedded_list(src):
'''
Convert enbedded bytes to strings if possible.
List helper.
'''
output = []
for elem in src:
if isinstance(elem, dict):
elem = _decode_embedded_dict(elem)
elif isinstance(elem, list):
elem = _decode_embedded_list(elem) ... | [
"def",
"_decode_embedded_list",
"(",
"src",
")",
":",
"output",
"=",
"[",
"]",
"for",
"elem",
"in",
"src",
":",
"if",
"isinstance",
"(",
"elem",
",",
"dict",
")",
":",
"elem",
"=",
"_decode_embedded_dict",
"(",
"elem",
")",
"elif",
"isinstance",
"(",
"... | Convert enbedded bytes to strings if possible.
List helper. | [
"Convert",
"enbedded",
"bytes",
"to",
"strings",
"if",
"possible",
".",
"List",
"helper",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/transport/frame.py#L43-L60 | train | Convert enbedded bytes to strings if possible.
List helper. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/transport/frame.py | _decode_embedded_dict | def _decode_embedded_dict(src):
'''
Convert enbedded bytes to strings if possible.
Dict helper.
'''
output = {}
for key, val in six.iteritems(src):
if isinstance(val, dict):
val = _decode_embedded_dict(val)
elif isinstance(val, list):
val = _decode_embedde... | python | def _decode_embedded_dict(src):
'''
Convert enbedded bytes to strings if possible.
Dict helper.
'''
output = {}
for key, val in six.iteritems(src):
if isinstance(val, dict):
val = _decode_embedded_dict(val)
elif isinstance(val, list):
val = _decode_embedde... | [
"def",
"_decode_embedded_dict",
"(",
"src",
")",
":",
"output",
"=",
"{",
"}",
"for",
"key",
",",
"val",
"in",
"six",
".",
"iteritems",
"(",
"src",
")",
":",
"if",
"isinstance",
"(",
"val",
",",
"dict",
")",
":",
"val",
"=",
"_decode_embedded_dict",
... | Convert enbedded bytes to strings if possible.
Dict helper. | [
"Convert",
"enbedded",
"bytes",
"to",
"strings",
"if",
"possible",
".",
"Dict",
"helper",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/transport/frame.py#L63-L85 | train | Convert enbedded bytes to strings if possible.
Dict helper. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/transport/frame.py | decode_embedded_strs | def decode_embedded_strs(src):
'''
Convert enbedded bytes to strings if possible.
This is necessary because Python 3 makes a distinction
between these types.
This wouldn't be needed if we used "use_bin_type=True" when encoding
and "encoding='utf-8'" when decoding. Unfortunately, this would brea... | python | def decode_embedded_strs(src):
'''
Convert enbedded bytes to strings if possible.
This is necessary because Python 3 makes a distinction
between these types.
This wouldn't be needed if we used "use_bin_type=True" when encoding
and "encoding='utf-8'" when decoding. Unfortunately, this would brea... | [
"def",
"decode_embedded_strs",
"(",
"src",
")",
":",
"if",
"not",
"six",
".",
"PY3",
":",
"return",
"src",
"if",
"isinstance",
"(",
"src",
",",
"dict",
")",
":",
"return",
"_decode_embedded_dict",
"(",
"src",
")",
"elif",
"isinstance",
"(",
"src",
",",
... | Convert enbedded bytes to strings if possible.
This is necessary because Python 3 makes a distinction
between these types.
This wouldn't be needed if we used "use_bin_type=True" when encoding
and "encoding='utf-8'" when decoding. Unfortunately, this would break
backwards compatibility due to a chan... | [
"Convert",
"enbedded",
"bytes",
"to",
"strings",
"if",
"possible",
".",
"This",
"is",
"necessary",
"because",
"Python",
"3",
"makes",
"a",
"distinction",
"between",
"these",
"types",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/transport/frame.py#L88-L112 | train | Convert enbedded bytes to strings if possible. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/disk.py | _validate_int | def _validate_int(name, value, limits=(), strip='%'):
'''
Validate the named integer within the supplied limits inclusive and
strip supplied unit characters
'''
comment = ''
# Must be integral
try:
if isinstance(value, string_types):
value = value.strip(' ' + strip)
... | python | def _validate_int(name, value, limits=(), strip='%'):
'''
Validate the named integer within the supplied limits inclusive and
strip supplied unit characters
'''
comment = ''
# Must be integral
try:
if isinstance(value, string_types):
value = value.strip(' ' + strip)
... | [
"def",
"_validate_int",
"(",
"name",
",",
"value",
",",
"limits",
"=",
"(",
")",
",",
"strip",
"=",
"'%'",
")",
":",
"comment",
"=",
"''",
"# Must be integral",
"try",
":",
"if",
"isinstance",
"(",
"value",
",",
"string_types",
")",
":",
"value",
"=",
... | Validate the named integer within the supplied limits inclusive and
strip supplied unit characters | [
"Validate",
"the",
"named",
"integer",
"within",
"the",
"supplied",
"limits",
"inclusive",
"and",
"strip",
"supplied",
"unit",
"characters"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/disk.py#L57-L75 | train | Validate the named integer within the supplied limits inclusive and return the integer value and comment | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/disk.py | status | def status(name, maximum=None, minimum=None, absolute=False, free=False):
'''
Return the current disk usage stats for the named mount point
name
Disk mount or directory for which to check used space
maximum
The maximum disk utilization
minimum
The minimum disk utilization
... | python | def status(name, maximum=None, minimum=None, absolute=False, free=False):
'''
Return the current disk usage stats for the named mount point
name
Disk mount or directory for which to check used space
maximum
The maximum disk utilization
minimum
The minimum disk utilization
... | [
"def",
"status",
"(",
"name",
",",
"maximum",
"=",
"None",
",",
"minimum",
"=",
"None",
",",
"absolute",
"=",
"False",
",",
"free",
"=",
"False",
")",
":",
"# Monitoring state, no changes will be made so no test interface needed",
"ret",
"=",
"{",
"'name'",
":",... | Return the current disk usage stats for the named mount point
name
Disk mount or directory for which to check used space
maximum
The maximum disk utilization
minimum
The minimum disk utilization
absolute
By default, the utilization is measured in percentage. Set
... | [
"Return",
"the",
"current",
"disk",
"usage",
"stats",
"for",
"the",
"named",
"mount",
"point"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/disk.py#L154-L210 | train | Return the current disk usage stats for the named mount point. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/ssh_known_hosts.py | present | def present(
name,
user=None,
fingerprint=None,
key=None,
port=None,
enc=None,
config=None,
hash_known_hosts=True,
timeout=5,
fingerprint_hash_type=None):
'''
Verifies that the specified host is known by the specified user
On m... | python | def present(
name,
user=None,
fingerprint=None,
key=None,
port=None,
enc=None,
config=None,
hash_known_hosts=True,
timeout=5,
fingerprint_hash_type=None):
'''
Verifies that the specified host is known by the specified user
On m... | [
"def",
"present",
"(",
"name",
",",
"user",
"=",
"None",
",",
"fingerprint",
"=",
"None",
",",
"key",
"=",
"None",
",",
"port",
"=",
"None",
",",
"enc",
"=",
"None",
",",
"config",
"=",
"None",
",",
"hash_known_hosts",
"=",
"True",
",",
"timeout",
... | Verifies that the specified host is known by the specified user
On many systems, specifically those running with openssh 4 or older, the
``enc`` option must be set, only openssh 5 and above can detect the key
type.
name
The name of the remote host (e.g. "github.com")
Note that only a s... | [
"Verifies",
"that",
"the",
"specified",
"host",
"is",
"known",
"by",
"the",
"specified",
"user"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/ssh_known_hosts.py#L45-L191 | train | Returns a new key - level entry for the specified host in the specified user s known_hosts file. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/ssh_known_hosts.py | absent | def absent(name, user=None, config=None):
'''
Verifies that the specified host is not known by the given user
name
The host name
Note that only single host names are supported. If foo.example.com
and bar.example.com are the same machine and you need to exclude both,
you wil... | python | def absent(name, user=None, config=None):
'''
Verifies that the specified host is not known by the given user
name
The host name
Note that only single host names are supported. If foo.example.com
and bar.example.com are the same machine and you need to exclude both,
you wil... | [
"def",
"absent",
"(",
"name",
",",
"user",
"=",
"None",
",",
"config",
"=",
"None",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":",
"{",
"}",
",",
"'result'",
":",
"True",
",",
"'comment'",
":",
"''",
"}",
"if",
"not",
... | Verifies that the specified host is not known by the given user
name
The host name
Note that only single host names are supported. If foo.example.com
and bar.example.com are the same machine and you need to exclude both,
you will need one Salt state for each.
user
The ... | [
"Verifies",
"that",
"the",
"specified",
"host",
"is",
"not",
"known",
"by",
"the",
"given",
"user"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/ssh_known_hosts.py#L194-L245 | train | Ensures that the specified host is not known by the given user. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/engines/__init__.py | start_engines | def start_engines(opts, proc_mgr, proxy=None):
'''
Fire up the configured engines!
'''
utils = salt.loader.utils(opts, proxy=proxy)
if opts['__role'] == 'master':
runners = salt.loader.runner(opts, utils=utils)
else:
runners = []
funcs = salt.loader.minion_mods(opts, utils=ut... | python | def start_engines(opts, proc_mgr, proxy=None):
'''
Fire up the configured engines!
'''
utils = salt.loader.utils(opts, proxy=proxy)
if opts['__role'] == 'master':
runners = salt.loader.runner(opts, utils=utils)
else:
runners = []
funcs = salt.loader.minion_mods(opts, utils=ut... | [
"def",
"start_engines",
"(",
"opts",
",",
"proc_mgr",
",",
"proxy",
"=",
"None",
")",
":",
"utils",
"=",
"salt",
".",
"loader",
".",
"utils",
"(",
"opts",
",",
"proxy",
"=",
"proxy",
")",
"if",
"opts",
"[",
"'__role'",
"]",
"==",
"'master'",
":",
"... | Fire up the configured engines! | [
"Fire",
"up",
"the",
"configured",
"engines!"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/__init__.py#L20-L77 | train | Start the configured engines. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/engines/__init__.py | Engine.run | def run(self):
'''
Run the master service!
'''
self.utils = salt.loader.utils(self.opts, proxy=self.proxy)
if salt.utils.platform.is_windows():
# Calculate function references since they can't be pickled.
if self.opts['__role'] == 'master':
... | python | def run(self):
'''
Run the master service!
'''
self.utils = salt.loader.utils(self.opts, proxy=self.proxy)
if salt.utils.platform.is_windows():
# Calculate function references since they can't be pickled.
if self.opts['__role'] == 'master':
... | [
"def",
"run",
"(",
"self",
")",
":",
"self",
".",
"utils",
"=",
"salt",
".",
"loader",
".",
"utils",
"(",
"self",
".",
"opts",
",",
"proxy",
"=",
"self",
".",
"proxy",
")",
"if",
"salt",
".",
"utils",
".",
"platform",
".",
"is_windows",
"(",
")",... | Run the master service! | [
"Run",
"the",
"master",
"service!"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/__init__.py#L124-L149 | train | Run the master service! | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/roster/range.py | targets | def targets(tgt, tgt_type='range', **kwargs):
'''
Return the targets from a range query
'''
r = seco.range.Range(__opts__['range_server'])
log.debug('Range connection to \'%s\' established', __opts__['range_server'])
hosts = []
try:
log.debug('Querying range for \'%s\'', tgt)
... | python | def targets(tgt, tgt_type='range', **kwargs):
'''
Return the targets from a range query
'''
r = seco.range.Range(__opts__['range_server'])
log.debug('Range connection to \'%s\' established', __opts__['range_server'])
hosts = []
try:
log.debug('Querying range for \'%s\'', tgt)
... | [
"def",
"targets",
"(",
"tgt",
",",
"tgt_type",
"=",
"'range'",
",",
"*",
"*",
"kwargs",
")",
":",
"r",
"=",
"seco",
".",
"range",
".",
"Range",
"(",
"__opts__",
"[",
"'range_server'",
"]",
")",
"log",
".",
"debug",
"(",
"'Range connection to \\'%s\\' est... | Return the targets from a range query | [
"Return",
"the",
"targets",
"from",
"a",
"range",
"query"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/roster/range.py#L35-L66 | train | Return the targets from a range query | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/modjk.py | _auth | def _auth(url, user, passwd, realm):
'''
returns a authentication handler.
'''
basic = _HTTPBasicAuthHandler()
basic.add_password(realm=realm, uri=url, user=user, passwd=passwd)
digest = _HTTPDigestAuthHandler()
digest.add_password(realm=realm, uri=url, user=user, passwd=passwd)
return ... | python | def _auth(url, user, passwd, realm):
'''
returns a authentication handler.
'''
basic = _HTTPBasicAuthHandler()
basic.add_password(realm=realm, uri=url, user=user, passwd=passwd)
digest = _HTTPDigestAuthHandler()
digest.add_password(realm=realm, uri=url, user=user, passwd=passwd)
return ... | [
"def",
"_auth",
"(",
"url",
",",
"user",
",",
"passwd",
",",
"realm",
")",
":",
"basic",
"=",
"_HTTPBasicAuthHandler",
"(",
")",
"basic",
".",
"add_password",
"(",
"realm",
"=",
"realm",
",",
"uri",
"=",
"url",
",",
"user",
"=",
"user",
",",
"passwd"... | returns a authentication handler. | [
"returns",
"a",
"authentication",
"handler",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/modjk.py#L56-L65 | train | Creates an authentication handler. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/modjk.py | _do_http | def _do_http(opts, profile='default'):
'''
Make the http request and return the data
'''
ret = {}
url = __salt__['config.get']('modjk:{0}:url'.format(profile), '')
user = __salt__['config.get']('modjk:{0}:user'.format(profile), '')
passwd = __salt__['config.get']('modjk:{0}:pass'.format(pr... | python | def _do_http(opts, profile='default'):
'''
Make the http request and return the data
'''
ret = {}
url = __salt__['config.get']('modjk:{0}:url'.format(profile), '')
user = __salt__['config.get']('modjk:{0}:user'.format(profile), '')
passwd = __salt__['config.get']('modjk:{0}:pass'.format(pr... | [
"def",
"_do_http",
"(",
"opts",
",",
"profile",
"=",
"'default'",
")",
":",
"ret",
"=",
"{",
"}",
"url",
"=",
"__salt__",
"[",
"'config.get'",
"]",
"(",
"'modjk:{0}:url'",
".",
"format",
"(",
"profile",
")",
",",
"''",
")",
"user",
"=",
"__salt__",
"... | Make the http request and return the data | [
"Make",
"the",
"http",
"request",
"and",
"return",
"the",
"data"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/modjk.py#L68-L97 | train | Make the http request and return the data
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/modjk.py | _worker_ctl | def _worker_ctl(worker, lbn, vwa, profile='default'):
'''
enable/disable/stop a worker
'''
cmd = {
'cmd': 'update',
'mime': 'prop',
'w': lbn,
'sw': worker,
'vwa': vwa,
}
return _do_http(cmd, profile)['worker.result.type'] == 'OK' | python | def _worker_ctl(worker, lbn, vwa, profile='default'):
'''
enable/disable/stop a worker
'''
cmd = {
'cmd': 'update',
'mime': 'prop',
'w': lbn,
'sw': worker,
'vwa': vwa,
}
return _do_http(cmd, profile)['worker.result.type'] == 'OK' | [
"def",
"_worker_ctl",
"(",
"worker",
",",
"lbn",
",",
"vwa",
",",
"profile",
"=",
"'default'",
")",
":",
"cmd",
"=",
"{",
"'cmd'",
":",
"'update'",
",",
"'mime'",
":",
"'prop'",
",",
"'w'",
":",
"lbn",
",",
"'sw'",
":",
"worker",
",",
"'vwa'",
":",... | enable/disable/stop a worker | [
"enable",
"/",
"disable",
"/",
"stop",
"a",
"worker"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/modjk.py#L100-L112 | train | Enable or disable a worker | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/modjk.py | list_configured_members | def list_configured_members(lbn, profile='default'):
'''
Return a list of member workers from the configuration files
CLI Examples:
.. code-block:: bash
salt '*' modjk.list_configured_members loadbalancer1
salt '*' modjk.list_configured_members loadbalancer1 other-profile
'''
... | python | def list_configured_members(lbn, profile='default'):
'''
Return a list of member workers from the configuration files
CLI Examples:
.. code-block:: bash
salt '*' modjk.list_configured_members loadbalancer1
salt '*' modjk.list_configured_members loadbalancer1 other-profile
'''
... | [
"def",
"list_configured_members",
"(",
"lbn",
",",
"profile",
"=",
"'default'",
")",
":",
"config",
"=",
"dump_config",
"(",
"profile",
")",
"try",
":",
"ret",
"=",
"config",
"[",
"'worker.{0}.balance_workers'",
".",
"format",
"(",
"lbn",
")",
"]",
"except",... | Return a list of member workers from the configuration files
CLI Examples:
.. code-block:: bash
salt '*' modjk.list_configured_members loadbalancer1
salt '*' modjk.list_configured_members loadbalancer1 other-profile | [
"Return",
"a",
"list",
"of",
"member",
"workers",
"from",
"the",
"configuration",
"files"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/modjk.py#L172-L191 | train | Return a list of member workers from the configuration files
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/modjk.py | workers | def workers(profile='default'):
'''
Return a list of member workers and their status
CLI Examples:
.. code-block:: bash
salt '*' modjk.workers
salt '*' modjk.workers other-profile
'''
config = get_running(profile)
lbn = config['worker.list'].split(',')
worker_list = [... | python | def workers(profile='default'):
'''
Return a list of member workers and their status
CLI Examples:
.. code-block:: bash
salt '*' modjk.workers
salt '*' modjk.workers other-profile
'''
config = get_running(profile)
lbn = config['worker.list'].split(',')
worker_list = [... | [
"def",
"workers",
"(",
"profile",
"=",
"'default'",
")",
":",
"config",
"=",
"get_running",
"(",
"profile",
")",
"lbn",
"=",
"config",
"[",
"'worker.list'",
"]",
".",
"split",
"(",
"','",
")",
"worker_list",
"=",
"[",
"]",
"ret",
"=",
"{",
"}",
"for"... | Return a list of member workers and their status
CLI Examples:
.. code-block:: bash
salt '*' modjk.workers
salt '*' modjk.workers other-profile | [
"Return",
"a",
"list",
"of",
"member",
"workers",
"and",
"their",
"status"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/modjk.py#L194-L227 | train | Return a list of member workers and their status | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/modjk.py | recover_all | def recover_all(lbn, profile='default'):
'''
Set the all the workers in lbn to recover and activate them if they are not
CLI Examples:
.. code-block:: bash
salt '*' modjk.recover_all loadbalancer1
salt '*' modjk.recover_all loadbalancer1 other-profile
'''
ret = {}
config ... | python | def recover_all(lbn, profile='default'):
'''
Set the all the workers in lbn to recover and activate them if they are not
CLI Examples:
.. code-block:: bash
salt '*' modjk.recover_all loadbalancer1
salt '*' modjk.recover_all loadbalancer1 other-profile
'''
ret = {}
config ... | [
"def",
"recover_all",
"(",
"lbn",
",",
"profile",
"=",
"'default'",
")",
":",
"ret",
"=",
"{",
"}",
"config",
"=",
"get_running",
"(",
"profile",
")",
"try",
":",
"workers_",
"=",
"config",
"[",
"'worker.{0}.balance_workers'",
".",
"format",
"(",
"lbn",
... | Set the all the workers in lbn to recover and activate them if they are not
CLI Examples:
.. code-block:: bash
salt '*' modjk.recover_all loadbalancer1
salt '*' modjk.recover_all loadbalancer1 other-profile | [
"Set",
"the",
"all",
"the",
"workers",
"in",
"lbn",
"to",
"recover",
"and",
"activate",
"them",
"if",
"they",
"are",
"not"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/modjk.py#L230-L257 | train | Return all the workers in lbn to recover and activate them if they are not | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/modjk.py | lb_edit | def lb_edit(lbn, settings, profile='default'):
'''
Edit the loadbalancer settings
Note: http://tomcat.apache.org/connectors-doc/reference/status.html
Data Parameters for the standard Update Action
CLI Examples:
.. code-block:: bash
salt '*' modjk.lb_edit loadbalancer1 "{'vlr': 1, 'vl... | python | def lb_edit(lbn, settings, profile='default'):
'''
Edit the loadbalancer settings
Note: http://tomcat.apache.org/connectors-doc/reference/status.html
Data Parameters for the standard Update Action
CLI Examples:
.. code-block:: bash
salt '*' modjk.lb_edit loadbalancer1 "{'vlr': 1, 'vl... | [
"def",
"lb_edit",
"(",
"lbn",
",",
"settings",
",",
"profile",
"=",
"'default'",
")",
":",
"settings",
"[",
"'cmd'",
"]",
"=",
"'update'",
"settings",
"[",
"'mime'",
"]",
"=",
"'prop'",
"settings",
"[",
"'w'",
"]",
"=",
"lbn",
"return",
"_do_http",
"("... | Edit the loadbalancer settings
Note: http://tomcat.apache.org/connectors-doc/reference/status.html
Data Parameters for the standard Update Action
CLI Examples:
.. code-block:: bash
salt '*' modjk.lb_edit loadbalancer1 "{'vlr': 1, 'vlt': 60}"
salt '*' modjk.lb_edit loadbalancer1 "{'vl... | [
"Edit",
"the",
"loadbalancer",
"settings"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/modjk.py#L280-L299 | train | Edit the loadbalancer settings | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/modjk.py | bulk_stop | def bulk_stop(workers, lbn, profile='default'):
'''
Stop all the given workers in the specific load balancer
CLI Examples:
.. code-block:: bash
salt '*' modjk.bulk_stop node1,node2,node3 loadbalancer1
salt '*' modjk.bulk_stop node1,node2,node3 loadbalancer1 other-profile
salt... | python | def bulk_stop(workers, lbn, profile='default'):
'''
Stop all the given workers in the specific load balancer
CLI Examples:
.. code-block:: bash
salt '*' modjk.bulk_stop node1,node2,node3 loadbalancer1
salt '*' modjk.bulk_stop node1,node2,node3 loadbalancer1 other-profile
salt... | [
"def",
"bulk_stop",
"(",
"workers",
",",
"lbn",
",",
"profile",
"=",
"'default'",
")",
":",
"ret",
"=",
"{",
"}",
"if",
"isinstance",
"(",
"workers",
",",
"six",
".",
"string_types",
")",
":",
"workers",
"=",
"workers",
".",
"split",
"(",
"','",
")",... | Stop all the given workers in the specific load balancer
CLI Examples:
.. code-block:: bash
salt '*' modjk.bulk_stop node1,node2,node3 loadbalancer1
salt '*' modjk.bulk_stop node1,node2,node3 loadbalancer1 other-profile
salt '*' modjk.bulk_stop ["node1","node2","node3"] loadbalancer1... | [
"Stop",
"all",
"the",
"given",
"workers",
"in",
"the",
"specific",
"load",
"balancer"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/modjk.py#L302-L328 | train | Stop all the given workers in the specific load balancer | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/modjk.py | bulk_activate | def bulk_activate(workers, lbn, profile='default'):
'''
Activate all the given workers in the specific load balancer
CLI Examples:
.. code-block:: bash
salt '*' modjk.bulk_activate node1,node2,node3 loadbalancer1
salt '*' modjk.bulk_activate node1,node2,node3 loadbalancer1 other-profi... | python | def bulk_activate(workers, lbn, profile='default'):
'''
Activate all the given workers in the specific load balancer
CLI Examples:
.. code-block:: bash
salt '*' modjk.bulk_activate node1,node2,node3 loadbalancer1
salt '*' modjk.bulk_activate node1,node2,node3 loadbalancer1 other-profi... | [
"def",
"bulk_activate",
"(",
"workers",
",",
"lbn",
",",
"profile",
"=",
"'default'",
")",
":",
"ret",
"=",
"{",
"}",
"if",
"isinstance",
"(",
"workers",
",",
"six",
".",
"string_types",
")",
":",
"workers",
"=",
"workers",
".",
"split",
"(",
"','",
... | Activate all the given workers in the specific load balancer
CLI Examples:
.. code-block:: bash
salt '*' modjk.bulk_activate node1,node2,node3 loadbalancer1
salt '*' modjk.bulk_activate node1,node2,node3 loadbalancer1 other-profile
salt '*' modjk.bulk_activate ["node1","node2","node3... | [
"Activate",
"all",
"the",
"given",
"workers",
"in",
"the",
"specific",
"load",
"balancer"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/modjk.py#L331-L357 | train | Activate all the given workers in the specific load balancer | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/modjk.py | bulk_disable | def bulk_disable(workers, lbn, profile='default'):
'''
Disable all the given workers in the specific load balancer
CLI Examples:
.. code-block:: bash
salt '*' modjk.bulk_disable node1,node2,node3 loadbalancer1
salt '*' modjk.bulk_disable node1,node2,node3 loadbalancer1 other-profile
... | python | def bulk_disable(workers, lbn, profile='default'):
'''
Disable all the given workers in the specific load balancer
CLI Examples:
.. code-block:: bash
salt '*' modjk.bulk_disable node1,node2,node3 loadbalancer1
salt '*' modjk.bulk_disable node1,node2,node3 loadbalancer1 other-profile
... | [
"def",
"bulk_disable",
"(",
"workers",
",",
"lbn",
",",
"profile",
"=",
"'default'",
")",
":",
"ret",
"=",
"{",
"}",
"if",
"isinstance",
"(",
"workers",
",",
"six",
".",
"string_types",
")",
":",
"workers",
"=",
"workers",
".",
"split",
"(",
"','",
"... | Disable all the given workers in the specific load balancer
CLI Examples:
.. code-block:: bash
salt '*' modjk.bulk_disable node1,node2,node3 loadbalancer1
salt '*' modjk.bulk_disable node1,node2,node3 loadbalancer1 other-profile
salt '*' modjk.bulk_disable ["node1","node2","node3"] l... | [
"Disable",
"all",
"the",
"given",
"workers",
"in",
"the",
"specific",
"load",
"balancer"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/modjk.py#L360-L386 | train | Disable all the given workers in the specific load balancer | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/modjk.py | bulk_recover | def bulk_recover(workers, lbn, profile='default'):
'''
Recover all the given workers in the specific load balancer
CLI Examples:
.. code-block:: bash
salt '*' modjk.bulk_recover node1,node2,node3 loadbalancer1
salt '*' modjk.bulk_recover node1,node2,node3 loadbalancer1 other-profile
... | python | def bulk_recover(workers, lbn, profile='default'):
'''
Recover all the given workers in the specific load balancer
CLI Examples:
.. code-block:: bash
salt '*' modjk.bulk_recover node1,node2,node3 loadbalancer1
salt '*' modjk.bulk_recover node1,node2,node3 loadbalancer1 other-profile
... | [
"def",
"bulk_recover",
"(",
"workers",
",",
"lbn",
",",
"profile",
"=",
"'default'",
")",
":",
"ret",
"=",
"{",
"}",
"if",
"isinstance",
"(",
"workers",
",",
"six",
".",
"string_types",
")",
":",
"workers",
"=",
"workers",
".",
"split",
"(",
"','",
"... | Recover all the given workers in the specific load balancer
CLI Examples:
.. code-block:: bash
salt '*' modjk.bulk_recover node1,node2,node3 loadbalancer1
salt '*' modjk.bulk_recover node1,node2,node3 loadbalancer1 other-profile
salt '*' modjk.bulk_recover ["node1","node2","node3"] l... | [
"Recover",
"all",
"the",
"given",
"workers",
"in",
"the",
"specific",
"load",
"balancer"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/modjk.py#L389-L415 | train | Bulk recovery of the given workers in the specific load balancer | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/modjk.py | worker_status | def worker_status(worker, profile='default'):
'''
Return the state of the worker
CLI Examples:
.. code-block:: bash
salt '*' modjk.worker_status node1
salt '*' modjk.worker_status node1 other-profile
'''
config = get_running(profile)
try:
return {
'act... | python | def worker_status(worker, profile='default'):
'''
Return the state of the worker
CLI Examples:
.. code-block:: bash
salt '*' modjk.worker_status node1
salt '*' modjk.worker_status node1 other-profile
'''
config = get_running(profile)
try:
return {
'act... | [
"def",
"worker_status",
"(",
"worker",
",",
"profile",
"=",
"'default'",
")",
":",
"config",
"=",
"get_running",
"(",
"profile",
")",
"try",
":",
"return",
"{",
"'activation'",
":",
"config",
"[",
"'worker.{0}.activation'",
".",
"format",
"(",
"worker",
")",... | Return the state of the worker
CLI Examples:
.. code-block:: bash
salt '*' modjk.worker_status node1
salt '*' modjk.worker_status node1 other-profile | [
"Return",
"the",
"state",
"of",
"the",
"worker"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/modjk.py#L418-L437 | train | Return the state of the worker | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/modjk.py | worker_recover | def worker_recover(worker, lbn, profile='default'):
'''
Set the worker to recover
this module will fail if it is in OK state
CLI Examples:
.. code-block:: bash
salt '*' modjk.worker_recover node1 loadbalancer1
salt '*' modjk.worker_recover node1 loadbalancer1 other-profile
'''... | python | def worker_recover(worker, lbn, profile='default'):
'''
Set the worker to recover
this module will fail if it is in OK state
CLI Examples:
.. code-block:: bash
salt '*' modjk.worker_recover node1 loadbalancer1
salt '*' modjk.worker_recover node1 loadbalancer1 other-profile
'''... | [
"def",
"worker_recover",
"(",
"worker",
",",
"lbn",
",",
"profile",
"=",
"'default'",
")",
":",
"cmd",
"=",
"{",
"'cmd'",
":",
"'recover'",
",",
"'mime'",
":",
"'prop'",
",",
"'w'",
":",
"lbn",
",",
"'sw'",
":",
"worker",
",",
"}",
"return",
"_do_htt... | Set the worker to recover
this module will fail if it is in OK state
CLI Examples:
.. code-block:: bash
salt '*' modjk.worker_recover node1 loadbalancer1
salt '*' modjk.worker_recover node1 loadbalancer1 other-profile | [
"Set",
"the",
"worker",
"to",
"recover",
"this",
"module",
"will",
"fail",
"if",
"it",
"is",
"in",
"OK",
"state"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/modjk.py#L440-L459 | train | This function will recover the worker from the loadbalancer | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/modjk.py | worker_edit | def worker_edit(worker, lbn, settings, profile='default'):
'''
Edit the worker settings
Note: http://tomcat.apache.org/connectors-doc/reference/status.html
Data Parameters for the standard Update Action
CLI Examples:
.. code-block:: bash
salt '*' modjk.worker_edit node1 loadbalancer1... | python | def worker_edit(worker, lbn, settings, profile='default'):
'''
Edit the worker settings
Note: http://tomcat.apache.org/connectors-doc/reference/status.html
Data Parameters for the standard Update Action
CLI Examples:
.. code-block:: bash
salt '*' modjk.worker_edit node1 loadbalancer1... | [
"def",
"worker_edit",
"(",
"worker",
",",
"lbn",
",",
"settings",
",",
"profile",
"=",
"'default'",
")",
":",
"settings",
"[",
"'cmd'",
"]",
"=",
"'update'",
"settings",
"[",
"'mime'",
"]",
"=",
"'prop'",
"settings",
"[",
"'w'",
"]",
"=",
"lbn",
"setti... | Edit the worker settings
Note: http://tomcat.apache.org/connectors-doc/reference/status.html
Data Parameters for the standard Update Action
CLI Examples:
.. code-block:: bash
salt '*' modjk.worker_edit node1 loadbalancer1 "{'vwf': 500, 'vwd': 60}"
salt '*' modjk.worker_edit node1 loa... | [
"Edit",
"the",
"worker",
"settings"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/modjk.py#L507-L527 | train | Edit the worker settings | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/nginx.py | build_info | def build_info():
'''
Return server and build arguments
CLI Example:
.. code-block:: bash
salt '*' nginx.build_info
'''
ret = {'info': []}
out = __salt__['cmd.run']('{0} -V'.format(__detect_os()))
for i in out.splitlines():
if i.startswith('configure argument'):
... | python | def build_info():
'''
Return server and build arguments
CLI Example:
.. code-block:: bash
salt '*' nginx.build_info
'''
ret = {'info': []}
out = __salt__['cmd.run']('{0} -V'.format(__detect_os()))
for i in out.splitlines():
if i.startswith('configure argument'):
... | [
"def",
"build_info",
"(",
")",
":",
"ret",
"=",
"{",
"'info'",
":",
"[",
"]",
"}",
"out",
"=",
"__salt__",
"[",
"'cmd.run'",
"]",
"(",
"'{0} -V'",
".",
"format",
"(",
"__detect_os",
"(",
")",
")",
")",
"for",
"i",
"in",
"out",
".",
"splitlines",
... | Return server and build arguments
CLI Example:
.. code-block:: bash
salt '*' nginx.build_info | [
"Return",
"server",
"and",
"build",
"arguments"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/nginx.py#L50-L70 | train | Return server and build arguments
CLI Example : bash
salt '*' nginx. build_info
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/nginx.py | signal | def signal(signal=None):
'''
Signals nginx to start, reload, reopen or stop.
CLI Example:
.. code-block:: bash
salt '*' nginx.signal reload
'''
valid_signals = ('start', 'reopen', 'stop', 'quit', 'reload')
if signal not in valid_signals:
return
# Make sure you use th... | python | def signal(signal=None):
'''
Signals nginx to start, reload, reopen or stop.
CLI Example:
.. code-block:: bash
salt '*' nginx.signal reload
'''
valid_signals = ('start', 'reopen', 'stop', 'quit', 'reload')
if signal not in valid_signals:
return
# Make sure you use th... | [
"def",
"signal",
"(",
"signal",
"=",
"None",
")",
":",
"valid_signals",
"=",
"(",
"'start'",
",",
"'reopen'",
",",
"'stop'",
",",
"'quit'",
",",
"'reload'",
")",
"if",
"signal",
"not",
"in",
"valid_signals",
":",
"return",
"# Make sure you use the right argume... | Signals nginx to start, reload, reopen or stop.
CLI Example:
.. code-block:: bash
salt '*' nginx.signal reload | [
"Signals",
"nginx",
"to",
"start",
"reload",
"reopen",
"or",
"stop",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/nginx.py#L102-L136 | train | Signal nginx to start reload or stop. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/nginx.py | status | def status(url="http://127.0.0.1/status"):
"""
Return the data from an Nginx status page as a dictionary.
http://wiki.nginx.org/HttpStubStatusModule
url
The URL of the status page. Defaults to 'http://127.0.0.1/status'
CLI Example:
.. code-block:: bash
salt '*' nginx.status
... | python | def status(url="http://127.0.0.1/status"):
"""
Return the data from an Nginx status page as a dictionary.
http://wiki.nginx.org/HttpStubStatusModule
url
The URL of the status page. Defaults to 'http://127.0.0.1/status'
CLI Example:
.. code-block:: bash
salt '*' nginx.status
... | [
"def",
"status",
"(",
"url",
"=",
"\"http://127.0.0.1/status\"",
")",
":",
"resp",
"=",
"_urlopen",
"(",
"url",
")",
"status_data",
"=",
"resp",
".",
"read",
"(",
")",
"resp",
".",
"close",
"(",
")",
"lines",
"=",
"status_data",
".",
"splitlines",
"(",
... | Return the data from an Nginx status page as a dictionary.
http://wiki.nginx.org/HttpStubStatusModule
url
The URL of the status page. Defaults to 'http://127.0.0.1/status'
CLI Example:
.. code-block:: bash
salt '*' nginx.status | [
"Return",
"the",
"data",
"from",
"an",
"Nginx",
"status",
"page",
"as",
"a",
"dictionary",
".",
"http",
":",
"//",
"wiki",
".",
"nginx",
".",
"org",
"/",
"HttpStubStatusModule"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/nginx.py#L139-L175 | train | Return the data from an Nginx status page as a dictionary. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/proxy/esxi.py | init | def init(opts):
'''
This function gets called when the proxy starts up. For
ESXi devices, the host, login credentials, and, if configured,
the protocol and port are cached.
'''
log.debug('Initting esxi proxy module in process %s', os.getpid())
log.debug('Validating esxi proxy input')
sch... | python | def init(opts):
'''
This function gets called when the proxy starts up. For
ESXi devices, the host, login credentials, and, if configured,
the protocol and port are cached.
'''
log.debug('Initting esxi proxy module in process %s', os.getpid())
log.debug('Validating esxi proxy input')
sch... | [
"def",
"init",
"(",
"opts",
")",
":",
"log",
".",
"debug",
"(",
"'Initting esxi proxy module in process %s'",
",",
"os",
".",
"getpid",
"(",
")",
")",
"log",
".",
"debug",
"(",
"'Validating esxi proxy input'",
")",
"schema",
"=",
"EsxiProxySchema",
".",
"seria... | This function gets called when the proxy starts up. For
ESXi devices, the host, login credentials, and, if configured,
the protocol and port are cached. | [
"This",
"function",
"gets",
"called",
"when",
"the",
"proxy",
"starts",
"up",
".",
"For",
"ESXi",
"devices",
"the",
"host",
"login",
"credentials",
"and",
"if",
"configured",
"the",
"protocol",
"and",
"port",
"are",
"cached",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/esxi.py#L314-L414 | train | Initialize the esxi proxy 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/proxy/esxi.py | ping | def ping():
'''
Returns True if connection is to be done via a vCenter (no connection is attempted).
Check to see if the host is responding when connecting directly via an ESXi
host.
CLI Example:
.. code-block:: bash
salt esxi-host test.ping
'''
if DETAILS.get('esxi_host'):
... | python | def ping():
'''
Returns True if connection is to be done via a vCenter (no connection is attempted).
Check to see if the host is responding when connecting directly via an ESXi
host.
CLI Example:
.. code-block:: bash
salt esxi-host test.ping
'''
if DETAILS.get('esxi_host'):
... | [
"def",
"ping",
"(",
")",
":",
"if",
"DETAILS",
".",
"get",
"(",
"'esxi_host'",
")",
":",
"return",
"True",
"else",
":",
"# TODO Check connection if mechanism is SSPI",
"if",
"DETAILS",
"[",
"'mechanism'",
"]",
"==",
"'userpass'",
":",
"find_credentials",
"(",
... | Returns True if connection is to be done via a vCenter (no connection is attempted).
Check to see if the host is responding when connecting directly via an ESXi
host.
CLI Example:
.. code-block:: bash
salt esxi-host test.ping | [
"Returns",
"True",
"if",
"connection",
"is",
"to",
"be",
"done",
"via",
"a",
"vCenter",
"(",
"no",
"connection",
"is",
"attempted",
")",
".",
"Check",
"to",
"see",
"if",
"the",
"host",
"is",
"responding",
"when",
"connecting",
"directly",
"via",
"an",
"E... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/esxi.py#L436-L461 | train | Ping the ESXi
host. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/proxy/esxi.py | ch_config | def ch_config(cmd, *args, **kwargs):
'''
This function is called by the
:mod:`salt.modules.esxi.cmd <salt.modules.esxi.cmd>` shim.
It then calls whatever is passed in ``cmd`` inside the
:mod:`salt.modules.vsphere <salt.modules.vsphere>` module.
Passes the return through from the vsphere module.
... | python | def ch_config(cmd, *args, **kwargs):
'''
This function is called by the
:mod:`salt.modules.esxi.cmd <salt.modules.esxi.cmd>` shim.
It then calls whatever is passed in ``cmd`` inside the
:mod:`salt.modules.vsphere <salt.modules.vsphere>` module.
Passes the return through from the vsphere module.
... | [
"def",
"ch_config",
"(",
"cmd",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"# Strip the __pub_ keys...is there a better way to do this?",
"for",
"k",
"in",
"kwargs",
":",
"if",
"k",
".",
"startswith",
"(",
"'__pub_'",
")",
":",
"kwargs",
".",
"pop"... | This function is called by the
:mod:`salt.modules.esxi.cmd <salt.modules.esxi.cmd>` shim.
It then calls whatever is passed in ``cmd`` inside the
:mod:`salt.modules.vsphere <salt.modules.vsphere>` module.
Passes the return through from the vsphere module.
cmd
The command to call inside salt.... | [
"This",
"function",
"is",
"called",
"by",
"the",
":",
"mod",
":",
"salt",
".",
"modules",
".",
"esxi",
".",
"cmd",
"<salt",
".",
"modules",
".",
"esxi",
".",
"cmd",
">",
"shim",
".",
"It",
"then",
"calls",
"whatever",
"is",
"passed",
"in",
"cmd",
"... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/esxi.py#L472-L505 | train | This function is called by the vsphere module to configure the master configuration of the master. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/proxy/esxi.py | find_credentials | def find_credentials(host):
'''
Cycle through all the possible credentials and return the first one that
works.
'''
user_names = [__pillar__['proxy'].get('username', 'root')]
passwords = __pillar__['proxy']['passwords']
for user in user_names:
for password in passwords:
t... | python | def find_credentials(host):
'''
Cycle through all the possible credentials and return the first one that
works.
'''
user_names = [__pillar__['proxy'].get('username', 'root')]
passwords = __pillar__['proxy']['passwords']
for user in user_names:
for password in passwords:
t... | [
"def",
"find_credentials",
"(",
"host",
")",
":",
"user_names",
"=",
"[",
"__pillar__",
"[",
"'proxy'",
"]",
".",
"get",
"(",
"'username'",
",",
"'root'",
")",
"]",
"passwords",
"=",
"__pillar__",
"[",
"'proxy'",
"]",
"[",
"'passwords'",
"]",
"for",
"use... | Cycle through all the possible credentials and return the first one that
works. | [
"Cycle",
"through",
"all",
"the",
"possible",
"credentials",
"and",
"return",
"the",
"first",
"one",
"that",
"works",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/esxi.py#L508-L531 | train | Find the first credentials that can be used for the given host. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/proxy/esxi.py | _grains | def _grains(host, protocol=None, port=None):
'''
Helper function to the grains from the proxied device.
'''
username, password = find_credentials(DETAILS['host'])
ret = __salt__['vsphere.system_info'](host=host,
username=username,
... | python | def _grains(host, protocol=None, port=None):
'''
Helper function to the grains from the proxied device.
'''
username, password = find_credentials(DETAILS['host'])
ret = __salt__['vsphere.system_info'](host=host,
username=username,
... | [
"def",
"_grains",
"(",
"host",
",",
"protocol",
"=",
"None",
",",
"port",
"=",
"None",
")",
":",
"username",
",",
"password",
"=",
"find_credentials",
"(",
"DETAILS",
"[",
"'host'",
"]",
")",
"ret",
"=",
"__salt__",
"[",
"'vsphere.system_info'",
"]",
"("... | Helper function to the grains from the proxied device. | [
"Helper",
"function",
"to",
"the",
"grains",
"from",
"the",
"proxied",
"device",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/esxi.py#L534-L545 | train | Helper function to get grains from the proxied device. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/telegram.py | post_message | def post_message(message, chat_id=None, token=None):
'''
Send a message to a Telegram chat.
:param message: The message to send to the Telegram chat.
:param chat_id: (optional) The Telegram chat id.
:param token: (optional) The Telegram API token.
:return: Boolean if message was sent s... | python | def post_message(message, chat_id=None, token=None):
'''
Send a message to a Telegram chat.
:param message: The message to send to the Telegram chat.
:param chat_id: (optional) The Telegram chat id.
:param token: (optional) The Telegram API token.
:return: Boolean if message was sent s... | [
"def",
"post_message",
"(",
"message",
",",
"chat_id",
"=",
"None",
",",
"token",
"=",
"None",
")",
":",
"if",
"not",
"chat_id",
":",
"chat_id",
"=",
"_get_chat_id",
"(",
")",
"if",
"not",
"token",
":",
"token",
"=",
"_get_token",
"(",
")",
"if",
"no... | Send a message to a Telegram chat.
:param message: The message to send to the Telegram chat.
:param chat_id: (optional) The Telegram chat id.
:param token: (optional) The Telegram API token.
:return: Boolean if message was sent successfully.
CLI Example:
.. code-block:: bash
... | [
"Send",
"a",
"message",
"to",
"a",
"Telegram",
"chat",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/telegram.py#L71-L97 | train | Send a message to a Telegram chat. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/telegram.py | _post_message | def _post_message(message, chat_id, token):
'''
Send a message to a Telegram chat.
:param chat_id: The chat id.
:param message: The message to send to the telegram chat.
:param token: The Telegram API token.
:return: Boolean if message was sent successfully.
'''
... | python | def _post_message(message, chat_id, token):
'''
Send a message to a Telegram chat.
:param chat_id: The chat id.
:param message: The message to send to the telegram chat.
:param token: The Telegram API token.
:return: Boolean if message was sent successfully.
'''
... | [
"def",
"_post_message",
"(",
"message",
",",
"chat_id",
",",
"token",
")",
":",
"url",
"=",
"'https://api.telegram.org/bot{0}/sendMessage'",
".",
"format",
"(",
"token",
")",
"parameters",
"=",
"dict",
"(",
")",
"if",
"chat_id",
":",
"parameters",
"[",
"'chat_... | Send a message to a Telegram chat.
:param chat_id: The chat id.
:param message: The message to send to the telegram chat.
:param token: The Telegram API token.
:return: Boolean if message was sent successfully. | [
"Send",
"a",
"message",
"to",
"a",
"Telegram",
"chat",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/telegram.py#L100-L140 | train | Send a message to a Telegram chat. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/roster/ansible.py | targets | def targets(tgt, tgt_type='glob', **kwargs):
'''
Return the targets from the ansible inventory_file
Default: /etc/salt/roster
'''
inventory = __runner__['salt.cmd']('cmd.run', 'ansible-inventory -i {0} --list'.format(get_roster_file(__opts__)))
__context__['inventory'] = __utils__['json.loads'](... | python | def targets(tgt, tgt_type='glob', **kwargs):
'''
Return the targets from the ansible inventory_file
Default: /etc/salt/roster
'''
inventory = __runner__['salt.cmd']('cmd.run', 'ansible-inventory -i {0} --list'.format(get_roster_file(__opts__)))
__context__['inventory'] = __utils__['json.loads'](... | [
"def",
"targets",
"(",
"tgt",
",",
"tgt_type",
"=",
"'glob'",
",",
"*",
"*",
"kwargs",
")",
":",
"inventory",
"=",
"__runner__",
"[",
"'salt.cmd'",
"]",
"(",
"'cmd.run'",
",",
"'ansible-inventory -i {0} --list'",
".",
"format",
"(",
"get_roster_file",
"(",
"... | Return the targets from the ansible inventory_file
Default: /etc/salt/roster | [
"Return",
"the",
"targets",
"from",
"the",
"ansible",
"inventory_file",
"Default",
":",
"/",
"etc",
"/",
"salt",
"/",
"roster"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/roster/ansible.py#L115-L127 | train | Return the targets from the ansible inventory file
Default : / etc / roster | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/sdb/cache.py | set_ | def set_(key, value, service=None, profile=None): # pylint: disable=W0613
'''
Set a key/value pair in the cache service
'''
key, profile = _parse_key(key, profile)
cache = salt.cache.Cache(__opts__)
cache.store(profile['bank'], key, value)
return get(key, service, profile) | python | def set_(key, value, service=None, profile=None): # pylint: disable=W0613
'''
Set a key/value pair in the cache service
'''
key, profile = _parse_key(key, profile)
cache = salt.cache.Cache(__opts__)
cache.store(profile['bank'], key, value)
return get(key, service, profile) | [
"def",
"set_",
"(",
"key",
",",
"value",
",",
"service",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"# pylint: disable=W0613",
"key",
",",
"profile",
"=",
"_parse_key",
"(",
"key",
",",
"profile",
")",
"cache",
"=",
"salt",
".",
"cache",
".",
... | Set a key/value pair in the cache service | [
"Set",
"a",
"key",
"/",
"value",
"pair",
"in",
"the",
"cache",
"service"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/sdb/cache.py#L66-L73 | train | Set a key value pair in the cache service
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/sdb/cache.py | get | def get(key, service=None, profile=None): # pylint: disable=W0613
'''
Get a value from the cache service
'''
key, profile = _parse_key(key, profile)
cache = salt.cache.Cache(__opts__)
return cache.fetch(profile['bank'], key=key) | python | def get(key, service=None, profile=None): # pylint: disable=W0613
'''
Get a value from the cache service
'''
key, profile = _parse_key(key, profile)
cache = salt.cache.Cache(__opts__)
return cache.fetch(profile['bank'], key=key) | [
"def",
"get",
"(",
"key",
",",
"service",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"# pylint: disable=W0613",
"key",
",",
"profile",
"=",
"_parse_key",
"(",
"key",
",",
"profile",
")",
"cache",
"=",
"salt",
".",
"cache",
".",
"Cache",
"(",
... | Get a value from the cache service | [
"Get",
"a",
"value",
"from",
"the",
"cache",
"service"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/sdb/cache.py#L76-L82 | train | Get a value from the cache service
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/sdb/cache.py | delete | def delete(key, service=None, profile=None): # pylint: disable=W0613
'''
Get a value from the cache service
'''
key, profile = _parse_key(key, profile)
cache = salt.cache.Cache(__opts__)
try:
cache.flush(profile['bank'], key=key)
return True
except Exception:
return ... | python | def delete(key, service=None, profile=None): # pylint: disable=W0613
'''
Get a value from the cache service
'''
key, profile = _parse_key(key, profile)
cache = salt.cache.Cache(__opts__)
try:
cache.flush(profile['bank'], key=key)
return True
except Exception:
return ... | [
"def",
"delete",
"(",
"key",
",",
"service",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"# pylint: disable=W0613",
"key",
",",
"profile",
"=",
"_parse_key",
"(",
"key",
",",
"profile",
")",
"cache",
"=",
"salt",
".",
"cache",
".",
"Cache",
"("... | Get a value from the cache service | [
"Get",
"a",
"value",
"from",
"the",
"cache",
"service"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/sdb/cache.py#L85-L95 | train | Delete a value from the cache service
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/sdb/cache.py | _parse_key | def _parse_key(key, profile):
'''
Parse out a key and update the opts with any override data
'''
comps = key.split('?')
if len(comps) > 1:
for item in comps[1].split('&'):
newkey, newval = item.split('=')
profile[newkey] = newval
if 'cachedir' in profile:
... | python | def _parse_key(key, profile):
'''
Parse out a key and update the opts with any override data
'''
comps = key.split('?')
if len(comps) > 1:
for item in comps[1].split('&'):
newkey, newval = item.split('=')
profile[newkey] = newval
if 'cachedir' in profile:
... | [
"def",
"_parse_key",
"(",
"key",
",",
"profile",
")",
":",
"comps",
"=",
"key",
".",
"split",
"(",
"'?'",
")",
"if",
"len",
"(",
"comps",
")",
">",
"1",
":",
"for",
"item",
"in",
"comps",
"[",
"1",
"]",
".",
"split",
"(",
"'&'",
")",
":",
"ne... | Parse out a key and update the opts with any override data | [
"Parse",
"out",
"a",
"key",
"and",
"update",
"the",
"opts",
"with",
"any",
"override",
"data"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/sdb/cache.py#L98-L109 | train | Parse out a key and update the opts with any override 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/tokens/rediscluster.py | _redis_client | def _redis_client(opts):
'''
Connect to the redis host and return a StrictRedisCluster client object.
If connection fails then return None.
'''
redis_host = opts.get("eauth_redis_host", "localhost")
redis_port = opts.get("eauth_redis_port", 6379)
try:
return rediscluster.StrictRedisC... | python | def _redis_client(opts):
'''
Connect to the redis host and return a StrictRedisCluster client object.
If connection fails then return None.
'''
redis_host = opts.get("eauth_redis_host", "localhost")
redis_port = opts.get("eauth_redis_port", 6379)
try:
return rediscluster.StrictRedisC... | [
"def",
"_redis_client",
"(",
"opts",
")",
":",
"redis_host",
"=",
"opts",
".",
"get",
"(",
"\"eauth_redis_host\"",
",",
"\"localhost\"",
")",
"redis_port",
"=",
"opts",
".",
"get",
"(",
"\"eauth_redis_port\"",
",",
"6379",
")",
"try",
":",
"return",
"rediscl... | Connect to the redis host and return a StrictRedisCluster client object.
If connection fails then return None. | [
"Connect",
"to",
"the",
"redis",
"host",
"and",
"return",
"a",
"StrictRedisCluster",
"client",
"object",
".",
"If",
"connection",
"fails",
"then",
"return",
"None",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/tokens/rediscluster.py#L48-L62 | train | Connect to the redis host and return a StrictRedisCluster client object. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/tokens/rediscluster.py | mk_token | def mk_token(opts, tdata):
'''
Mint a new token using the config option hash_type and store tdata with 'token' attribute set
to the token.
This module uses the hash of random 512 bytes as a token.
:param opts: Salt master config options
:param tdata: Token data to be stored with 'token' attirbu... | python | def mk_token(opts, tdata):
'''
Mint a new token using the config option hash_type and store tdata with 'token' attribute set
to the token.
This module uses the hash of random 512 bytes as a token.
:param opts: Salt master config options
:param tdata: Token data to be stored with 'token' attirbu... | [
"def",
"mk_token",
"(",
"opts",
",",
"tdata",
")",
":",
"redis_client",
"=",
"_redis_client",
"(",
"opts",
")",
"if",
"not",
"redis_client",
":",
"return",
"{",
"}",
"hash_type",
"=",
"getattr",
"(",
"hashlib",
",",
"opts",
".",
"get",
"(",
"'hash_type'"... | Mint a new token using the config option hash_type and store tdata with 'token' attribute set
to the token.
This module uses the hash of random 512 bytes as a token.
:param opts: Salt master config options
:param tdata: Token data to be stored with 'token' attirbute of this dict set to the token.
:... | [
"Mint",
"a",
"new",
"token",
"using",
"the",
"config",
"option",
"hash_type",
"and",
"store",
"tdata",
"with",
"token",
"attribute",
"set",
"to",
"the",
"token",
".",
"This",
"module",
"uses",
"the",
"hash",
"of",
"random",
"512",
"bytes",
"as",
"a",
"to... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/tokens/rediscluster.py#L65-L99 | train | Mint a new token using the config option hash_type and store tdata with token attribute set
to the token. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/tokens/rediscluster.py | get_token | def get_token(opts, tok):
'''
Fetch the token data from the store.
:param opts: Salt master config options
:param tok: Token value to get
:returns: Token data if successful. Empty dict if failed.
'''
redis_client = _redis_client(opts)
if not redis_client:
return {}
serial = ... | python | def get_token(opts, tok):
'''
Fetch the token data from the store.
:param opts: Salt master config options
:param tok: Token value to get
:returns: Token data if successful. Empty dict if failed.
'''
redis_client = _redis_client(opts)
if not redis_client:
return {}
serial = ... | [
"def",
"get_token",
"(",
"opts",
",",
"tok",
")",
":",
"redis_client",
"=",
"_redis_client",
"(",
"opts",
")",
"if",
"not",
"redis_client",
":",
"return",
"{",
"}",
"serial",
"=",
"salt",
".",
"payload",
".",
"Serial",
"(",
"opts",
")",
"try",
":",
"... | Fetch the token data from the store.
:param opts: Salt master config options
:param tok: Token value to get
:returns: Token data if successful. Empty dict if failed. | [
"Fetch",
"the",
"token",
"data",
"from",
"the",
"store",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/tokens/rediscluster.py#L102-L122 | train | Get the token data from the store. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/tokens/rediscluster.py | rm_token | def rm_token(opts, tok):
'''
Remove token from the store.
:param opts: Salt master config options
:param tok: Token to remove
:returns: Empty dict if successful. None if failed.
'''
redis_client = _redis_client(opts)
if not redis_client:
return
try:
redis_client.dele... | python | def rm_token(opts, tok):
'''
Remove token from the store.
:param opts: Salt master config options
:param tok: Token to remove
:returns: Empty dict if successful. None if failed.
'''
redis_client = _redis_client(opts)
if not redis_client:
return
try:
redis_client.dele... | [
"def",
"rm_token",
"(",
"opts",
",",
"tok",
")",
":",
"redis_client",
"=",
"_redis_client",
"(",
"opts",
")",
"if",
"not",
"redis_client",
":",
"return",
"try",
":",
"redis_client",
".",
"delete",
"(",
"tok",
")",
"return",
"{",
"}",
"except",
"Exception... | Remove token from the store.
:param opts: Salt master config options
:param tok: Token to remove
:returns: Empty dict if successful. None if failed. | [
"Remove",
"token",
"from",
"the",
"store",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/tokens/rediscluster.py#L125-L140 | train | Remove a token from the store. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/tokens/rediscluster.py | list_tokens | def list_tokens(opts):
'''
List all tokens in the store.
:param opts: Salt master config options
:returns: List of dicts (token_data)
'''
ret = []
redis_client = _redis_client(opts)
if not redis_client:
return []
serial = salt.payload.Serial(opts)
try:
return [k.... | python | def list_tokens(opts):
'''
List all tokens in the store.
:param opts: Salt master config options
:returns: List of dicts (token_data)
'''
ret = []
redis_client = _redis_client(opts)
if not redis_client:
return []
serial = salt.payload.Serial(opts)
try:
return [k.... | [
"def",
"list_tokens",
"(",
"opts",
")",
":",
"ret",
"=",
"[",
"]",
"redis_client",
"=",
"_redis_client",
"(",
"opts",
")",
"if",
"not",
"redis_client",
":",
"return",
"[",
"]",
"serial",
"=",
"salt",
".",
"payload",
".",
"Serial",
"(",
"opts",
")",
"... | List all tokens in the store.
:param opts: Salt master config options
:returns: List of dicts (token_data) | [
"List",
"all",
"tokens",
"in",
"the",
"store",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/tokens/rediscluster.py#L143-L159 | train | List all tokens in the store. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/wordpress.py | installed | def installed(name, user, admin_user, admin_password, admin_email, title, url):
'''
Run the initial setup of wordpress
name
path to the wordpress installation
user
user that owns the files for the wordpress installation
admin_user
username for wordpress website administrat... | python | def installed(name, user, admin_user, admin_password, admin_email, title, url):
'''
Run the initial setup of wordpress
name
path to the wordpress installation
user
user that owns the files for the wordpress installation
admin_user
username for wordpress website administrat... | [
"def",
"installed",
"(",
"name",
",",
"user",
",",
"admin_user",
",",
"admin_password",
",",
"admin_email",
",",
"title",
",",
"url",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":",
"{",
"}",
",",
"'comment'",
":",
"''",
",",... | Run the initial setup of wordpress
name
path to the wordpress installation
user
user that owns the files for the wordpress installation
admin_user
username for wordpress website administrator user
admin_password
password for wordpress website administrator user
a... | [
"Run",
"the",
"initial",
"setup",
"of",
"wordpress"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/wordpress.py#L16-L78 | train | Ensure that the wordpress module is installed | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/wordpress.py | activated | def activated(name, path, user):
'''
Activate wordpress plugins
name
name of plugin to activate
path
path to wordpress installation
user
user who should own the files in the wordpress installation
.. code-block:: yaml
HyperDB:
wordpress.activated:
... | python | def activated(name, path, user):
'''
Activate wordpress plugins
name
name of plugin to activate
path
path to wordpress installation
user
user who should own the files in the wordpress installation
.. code-block:: yaml
HyperDB:
wordpress.activated:
... | [
"def",
"activated",
"(",
"name",
",",
"path",
",",
"user",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":",
"{",
"}",
",",
"'comment'",
":",
"''",
",",
"'result'",
":",
"False",
"}",
"check",
"=",
"__salt__",
"[",
"'wordpres... | Activate wordpress plugins
name
name of plugin to activate
path
path to wordpress installation
user
user who should own the files in the wordpress installation
.. code-block:: yaml
HyperDB:
wordpress.activated:
- path: /var/www/html
... | [
"Activate",
"wordpress",
"plugins"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/wordpress.py#L81-L135 | train | Activate wordpress plugins
ArcGIS and return the new wordpress object | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/scp_mod.py | _prepare_connection | def _prepare_connection(**kwargs):
'''
Prepare the underlying SSH connection with the remote target.
'''
paramiko_kwargs, scp_kwargs = _select_kwargs(**kwargs)
ssh = paramiko.SSHClient()
if paramiko_kwargs.pop('auto_add_policy', False):
ssh.set_missing_host_key_policy(paramiko.AutoAddPol... | python | def _prepare_connection(**kwargs):
'''
Prepare the underlying SSH connection with the remote target.
'''
paramiko_kwargs, scp_kwargs = _select_kwargs(**kwargs)
ssh = paramiko.SSHClient()
if paramiko_kwargs.pop('auto_add_policy', False):
ssh.set_missing_host_key_policy(paramiko.AutoAddPol... | [
"def",
"_prepare_connection",
"(",
"*",
"*",
"kwargs",
")",
":",
"paramiko_kwargs",
",",
"scp_kwargs",
"=",
"_select_kwargs",
"(",
"*",
"*",
"kwargs",
")",
"ssh",
"=",
"paramiko",
".",
"SSHClient",
"(",
")",
"if",
"paramiko_kwargs",
".",
"pop",
"(",
"'auto... | Prepare the underlying SSH connection with the remote target. | [
"Prepare",
"the",
"underlying",
"SSH",
"connection",
"with",
"the",
"remote",
"target",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/scp_mod.py#L55-L66 | train | Prepare the underlying SSH connection with the remote target. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/scp_mod.py | get | def get(remote_path,
local_path='',
recursive=False,
preserve_times=False,
**kwargs):
'''
Transfer files and directories from remote host to the localhost of the
Minion.
remote_path
Path to retrieve from remote host. Since this is evaluated by scp on the
... | python | def get(remote_path,
local_path='',
recursive=False,
preserve_times=False,
**kwargs):
'''
Transfer files and directories from remote host to the localhost of the
Minion.
remote_path
Path to retrieve from remote host. Since this is evaluated by scp on the
... | [
"def",
"get",
"(",
"remote_path",
",",
"local_path",
"=",
"''",
",",
"recursive",
"=",
"False",
",",
"preserve_times",
"=",
"False",
",",
"*",
"*",
"kwargs",
")",
":",
"scp_client",
"=",
"_prepare_connection",
"(",
"*",
"*",
"kwargs",
")",
"get_kwargs",
... | Transfer files and directories from remote host to the localhost of the
Minion.
remote_path
Path to retrieve from remote host. Since this is evaluated by scp on the
remote host, shell wildcards and environment variables may be used.
recursive: ``False``
Transfer files and directori... | [
"Transfer",
"files",
"and",
"directories",
"from",
"remote",
"host",
"to",
"the",
"localhost",
"of",
"the",
"Minion",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/scp_mod.py#L69-L151 | train | Returns a Minion that fetches a file from the remote host. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/scp_mod.py | put | def put(files,
remote_path=None,
recursive=False,
preserve_times=False,
saltenv='base',
**kwargs):
'''
Transfer files and directories to remote host.
files
A single path or a list of paths to be transferred.
remote_path
The path on the remote dev... | python | def put(files,
remote_path=None,
recursive=False,
preserve_times=False,
saltenv='base',
**kwargs):
'''
Transfer files and directories to remote host.
files
A single path or a list of paths to be transferred.
remote_path
The path on the remote dev... | [
"def",
"put",
"(",
"files",
",",
"remote_path",
"=",
"None",
",",
"recursive",
"=",
"False",
",",
"preserve_times",
"=",
"False",
",",
"saltenv",
"=",
"'base'",
",",
"*",
"*",
"kwargs",
")",
":",
"scp_client",
"=",
"_prepare_connection",
"(",
"*",
"*",
... | Transfer files and directories to remote host.
files
A single path or a list of paths to be transferred.
remote_path
The path on the remote device where to store the files.
recursive: ``True``
Transfer files and directories recursively.
preserve_times: ``False``
Prese... | [
"Transfer",
"files",
"and",
"directories",
"to",
"remote",
"host",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/scp_mod.py#L154-L244 | train | Transfer files and directories to the remote host. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/bigip.py | _build_session | def _build_session(username, password, trans_label=None):
'''
Create a session to be used when connecting to iControl REST.
'''
bigip = requests.session()
bigip.auth = (username, password)
bigip.verify = False
bigip.headers.update({'Content-Type': 'application/json'})
if trans_label:
... | python | def _build_session(username, password, trans_label=None):
'''
Create a session to be used when connecting to iControl REST.
'''
bigip = requests.session()
bigip.auth = (username, password)
bigip.verify = False
bigip.headers.update({'Content-Type': 'application/json'})
if trans_label:
... | [
"def",
"_build_session",
"(",
"username",
",",
"password",
",",
"trans_label",
"=",
"None",
")",
":",
"bigip",
"=",
"requests",
".",
"session",
"(",
")",
"bigip",
".",
"auth",
"=",
"(",
"username",
",",
"password",
")",
"bigip",
".",
"verify",
"=",
"Fa... | Create a session to be used when connecting to iControl REST. | [
"Create",
"a",
"session",
"to",
"be",
"used",
"when",
"connecting",
"to",
"iControl",
"REST",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bigip.py#L43-L62 | train | Create a session to be used when connecting to iControl REST. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/bigip.py | _load_response | def _load_response(response):
'''
Load the response from json data, return the dictionary or raw text
'''
try:
data = salt.utils.json.loads(response.text)
except ValueError:
data = response.text
ret = {'code': response.status_code, 'content': data}
return ret | python | def _load_response(response):
'''
Load the response from json data, return the dictionary or raw text
'''
try:
data = salt.utils.json.loads(response.text)
except ValueError:
data = response.text
ret = {'code': response.status_code, 'content': data}
return ret | [
"def",
"_load_response",
"(",
"response",
")",
":",
"try",
":",
"data",
"=",
"salt",
".",
"utils",
".",
"json",
".",
"loads",
"(",
"response",
".",
"text",
")",
"except",
"ValueError",
":",
"data",
"=",
"response",
".",
"text",
"ret",
"=",
"{",
"'cod... | Load the response from json data, return the dictionary or raw text | [
"Load",
"the",
"response",
"from",
"json",
"data",
"return",
"the",
"dictionary",
"or",
"raw",
"text"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bigip.py#L65-L77 | train | Load the response from json data return the dictionary or raw text
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/bigip.py | _load_connection_error | def _load_connection_error(hostname, error):
'''
Format and Return a connection error
'''
ret = {'code': None, 'content': 'Error: Unable to connect to the bigip device: {host}\n{error}'.format(host=hostname, error=error)}
return ret | python | def _load_connection_error(hostname, error):
'''
Format and Return a connection error
'''
ret = {'code': None, 'content': 'Error: Unable to connect to the bigip device: {host}\n{error}'.format(host=hostname, error=error)}
return ret | [
"def",
"_load_connection_error",
"(",
"hostname",
",",
"error",
")",
":",
"ret",
"=",
"{",
"'code'",
":",
"None",
",",
"'content'",
":",
"'Error: Unable to connect to the bigip device: {host}\\n{error}'",
".",
"format",
"(",
"host",
"=",
"hostname",
",",
"error",
... | Format and Return a connection error | [
"Format",
"and",
"Return",
"a",
"connection",
"error"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bigip.py#L80-L87 | train | Format and Return a connection error
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/bigip.py | _loop_payload | def _loop_payload(params):
'''
Pass in a dictionary of parameters, loop through them and build a payload containing,
parameters who's values are not None.
'''
#construct the payload
payload = {}
#set the payload
for param, value in six.iteritems(params):
if value is not None:
... | python | def _loop_payload(params):
'''
Pass in a dictionary of parameters, loop through them and build a payload containing,
parameters who's values are not None.
'''
#construct the payload
payload = {}
#set the payload
for param, value in six.iteritems(params):
if value is not None:
... | [
"def",
"_loop_payload",
"(",
"params",
")",
":",
"#construct the payload",
"payload",
"=",
"{",
"}",
"#set the payload",
"for",
"param",
",",
"value",
"in",
"six",
".",
"iteritems",
"(",
"params",
")",
":",
"if",
"value",
"is",
"not",
"None",
":",
"payload... | Pass in a dictionary of parameters, loop through them and build a payload containing,
parameters who's values are not None. | [
"Pass",
"in",
"a",
"dictionary",
"of",
"parameters",
"loop",
"through",
"them",
"and",
"build",
"a",
"payload",
"containing",
"parameters",
"who",
"s",
"values",
"are",
"not",
"None",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bigip.py#L90-L104 | train | Loop through the parameters and build a payload containing the parameters who s values are not None. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/bigip.py | _build_list | def _build_list(option_value, item_kind):
'''
pass in an option to check for a list of items, create a list of dictionary of items to set
for this option
'''
#specify profiles if provided
if option_value is not None:
items = []
#if user specified none, return an empty list
... | python | def _build_list(option_value, item_kind):
'''
pass in an option to check for a list of items, create a list of dictionary of items to set
for this option
'''
#specify profiles if provided
if option_value is not None:
items = []
#if user specified none, return an empty list
... | [
"def",
"_build_list",
"(",
"option_value",
",",
"item_kind",
")",
":",
"#specify profiles if provided",
"if",
"option_value",
"is",
"not",
"None",
":",
"items",
"=",
"[",
"]",
"#if user specified none, return an empty list",
"if",
"option_value",
"==",
"'none'",
":",
... | pass in an option to check for a list of items, create a list of dictionary of items to set
for this option | [
"pass",
"in",
"an",
"option",
"to",
"check",
"for",
"a",
"list",
"of",
"items",
"create",
"a",
"list",
"of",
"dictionary",
"of",
"items",
"to",
"set",
"for",
"this",
"option"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bigip.py#L107-L135 | train | Build a list of items for a given option value | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/bigip.py | _determine_toggles | def _determine_toggles(payload, toggles):
'''
BigIP can't make up its mind if it likes yes / no or true or false.
Figure out what it likes to hear without confusing the user.
'''
for toggle, definition in six.iteritems(toggles):
#did the user specify anything?
if definition['value']... | python | def _determine_toggles(payload, toggles):
'''
BigIP can't make up its mind if it likes yes / no or true or false.
Figure out what it likes to hear without confusing the user.
'''
for toggle, definition in six.iteritems(toggles):
#did the user specify anything?
if definition['value']... | [
"def",
"_determine_toggles",
"(",
"payload",
",",
"toggles",
")",
":",
"for",
"toggle",
",",
"definition",
"in",
"six",
".",
"iteritems",
"(",
"toggles",
")",
":",
"#did the user specify anything?",
"if",
"definition",
"[",
"'value'",
"]",
"is",
"not",
"None",... | BigIP can't make up its mind if it likes yes / no or true or false.
Figure out what it likes to hear without confusing the user. | [
"BigIP",
"can",
"t",
"make",
"up",
"its",
"mind",
"if",
"it",
"likes",
"yes",
"/",
"no",
"or",
"true",
"or",
"false",
".",
"Figure",
"out",
"what",
"it",
"likes",
"to",
"hear",
"without",
"confusing",
"the",
"user",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bigip.py#L138-L159 | train | Determine which toggle the given payload should be used. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/bigip.py | _set_value | def _set_value(value):
'''
A function to detect if user is trying to pass a dictionary or list. parse it and return a
dictionary list or a string
'''
#don't continue if already an acceptable data-type
if isinstance(value, bool) or isinstance(value, dict) or isinstance(value, list):
retu... | python | def _set_value(value):
'''
A function to detect if user is trying to pass a dictionary or list. parse it and return a
dictionary list or a string
'''
#don't continue if already an acceptable data-type
if isinstance(value, bool) or isinstance(value, dict) or isinstance(value, list):
retu... | [
"def",
"_set_value",
"(",
"value",
")",
":",
"#don't continue if already an acceptable data-type",
"if",
"isinstance",
"(",
"value",
",",
"bool",
")",
"or",
"isinstance",
"(",
"value",
",",
"dict",
")",
"or",
"isinstance",
"(",
"value",
",",
"list",
")",
":",
... | A function to detect if user is trying to pass a dictionary or list. parse it and return a
dictionary list or a string | [
"A",
"function",
"to",
"detect",
"if",
"user",
"is",
"trying",
"to",
"pass",
"a",
"dictionary",
"or",
"list",
".",
"parse",
"it",
"and",
"return",
"a",
"dictionary",
"list",
"or",
"a",
"string"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bigip.py#L162-L219 | train | A function to detect if user is trying to pass a dictionary or list. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/bigip.py | start_transaction | def start_transaction(hostname, username, password, label):
'''
A function to connect to a bigip device and start a new transaction.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
label
The na... | python | def start_transaction(hostname, username, password, label):
'''
A function to connect to a bigip device and start a new transaction.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
label
The na... | [
"def",
"start_transaction",
"(",
"hostname",
",",
"username",
",",
"password",
",",
"label",
")",
":",
"#build the session",
"bigip_session",
"=",
"_build_session",
"(",
"username",
",",
"password",
")",
"payload",
"=",
"{",
"}",
"#post to REST to get trans id",
"... | A function to connect to a bigip device and start a new transaction.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
label
The name / alias for this transaction. The actual transaction
id will... | [
"A",
"function",
"to",
"connect",
"to",
"a",
"bigip",
"device",
"and",
"start",
"a",
"new",
"transaction",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bigip.py#L222-L268 | train | Start a new transaction on a 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/bigip.py | list_transaction | def list_transaction(hostname, username, password, label):
'''
A function to connect to a bigip device and list an existing transaction.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
label
th... | python | def list_transaction(hostname, username, password, label):
'''
A function to connect to a bigip device and list an existing transaction.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
label
th... | [
"def",
"list_transaction",
"(",
"hostname",
",",
"username",
",",
"password",
",",
"label",
")",
":",
"#build the session",
"bigip_session",
"=",
"_build_session",
"(",
"username",
",",
"password",
")",
"#pull the trans id from the grain",
"trans_id",
"=",
"__salt__",... | A function to connect to a bigip device and list an existing transaction.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
label
the label of this transaction stored within the grain:
``bigip_f5... | [
"A",
"function",
"to",
"connect",
"to",
"a",
"bigip",
"device",
"and",
"list",
"an",
"existing",
"transaction",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bigip.py#L271-L307 | train | A function to connect to a bigip device and list an existing transaction. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/bigip.py | create_node | def create_node(hostname, username, password, name, address, trans_label=None):
'''
A function to connect to a bigip device and create a node.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
name
... | python | def create_node(hostname, username, password, name, address, trans_label=None):
'''
A function to connect to a bigip device and create a node.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
name
... | [
"def",
"create_node",
"(",
"hostname",
",",
"username",
",",
"password",
",",
"name",
",",
"address",
",",
"trans_label",
"=",
"None",
")",
":",
"#build session",
"bigip_session",
"=",
"_build_session",
"(",
"username",
",",
"password",
",",
"trans_label",
")"... | A function to connect to a bigip device and create a node.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
name
The name of the node
address
The address of the node
trans_label
... | [
"A",
"function",
"to",
"connect",
"to",
"a",
"bigip",
"device",
"and",
"create",
"a",
"node",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bigip.py#L430-L469 | train | Function to connect to a bigip device and create 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/bigip.py | modify_node | def modify_node(hostname, username, password, name,
connection_limit=None,
description=None,
dynamic_ratio=None,
logging=None,
monitor=None,
rate_limit=None,
ratio=None,
session=None,
... | python | def modify_node(hostname, username, password, name,
connection_limit=None,
description=None,
dynamic_ratio=None,
logging=None,
monitor=None,
rate_limit=None,
ratio=None,
session=None,
... | [
"def",
"modify_node",
"(",
"hostname",
",",
"username",
",",
"password",
",",
"name",
",",
"connection_limit",
"=",
"None",
",",
"description",
"=",
"None",
",",
"dynamic_ratio",
"=",
"None",
",",
"logging",
"=",
"None",
",",
"monitor",
"=",
"None",
",",
... | A function to connect to a bigip device and modify an existing node.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
name
The name of the node to modify
connection_limit
[integer]
descr... | [
"A",
"function",
"to",
"connect",
"to",
"a",
"bigip",
"device",
"and",
"modify",
"an",
"existing",
"node",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bigip.py#L472-L549 | train | A function to connect to a bigip device and modify an existing 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/bigip.py | create_pool | def create_pool(hostname, username, password, name, members=None,
allow_nat=None,
allow_snat=None,
description=None,
gateway_failsafe_device=None,
ignore_persisted_weight=None,
ip_tos_to_client=None,
ip_tos_t... | python | def create_pool(hostname, username, password, name, members=None,
allow_nat=None,
allow_snat=None,
description=None,
gateway_failsafe_device=None,
ignore_persisted_weight=None,
ip_tos_to_client=None,
ip_tos_t... | [
"def",
"create_pool",
"(",
"hostname",
",",
"username",
",",
"password",
",",
"name",
",",
"members",
"=",
"None",
",",
"allow_nat",
"=",
"None",
",",
"allow_snat",
"=",
"None",
",",
"description",
"=",
"None",
",",
"gateway_failsafe_device",
"=",
"None",
... | A function to connect to a bigip device and create a pool.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
name
The name of the pool to create.
members
List of comma delimited pool members ... | [
"A",
"function",
"to",
"connect",
"to",
"a",
"bigip",
"device",
"and",
"create",
"a",
"pool",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bigip.py#L622-L773 | train | This function creates a new pool in the iControl REST interface. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/bigip.py | replace_pool_members | def replace_pool_members(hostname, username, password, name, members):
'''
A function to connect to a bigip device and replace members of an existing pool with new members.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iContro... | python | def replace_pool_members(hostname, username, password, name, members):
'''
A function to connect to a bigip device and replace members of an existing pool with new members.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iContro... | [
"def",
"replace_pool_members",
"(",
"hostname",
",",
"username",
",",
"password",
",",
"name",
",",
"members",
")",
":",
"payload",
"=",
"{",
"}",
"payload",
"[",
"'name'",
"]",
"=",
"name",
"#specify members if provided",
"if",
"members",
"is",
"not",
"None... | A function to connect to a bigip device and replace members of an existing pool with new members.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
name
The name of the pool to modify
members
... | [
"A",
"function",
"to",
"connect",
"to",
"a",
"bigip",
"device",
"and",
"replace",
"members",
"of",
"an",
"existing",
"pool",
"with",
"new",
"members",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bigip.py#L956-L1020 | train | This function is used to connect to a bigip device and replace members of an existing pool with new members. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/bigip.py | add_pool_member | def add_pool_member(hostname, username, password, name, member):
'''
A function to connect to a bigip device and add a new member to an existing pool.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
na... | python | def add_pool_member(hostname, username, password, name, member):
'''
A function to connect to a bigip device and add a new member to an existing pool.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
na... | [
"def",
"add_pool_member",
"(",
"hostname",
",",
"username",
",",
"password",
",",
"name",
",",
"member",
")",
":",
"# for states",
"if",
"isinstance",
"(",
"member",
",",
"dict",
")",
":",
"#check for state alternative name 'member_state', replace with state",
"if",
... | A function to connect to a bigip device and add a new member to an existing pool.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
name
The name of the pool to modify
member
The name of the ... | [
"A",
"function",
"to",
"connect",
"to",
"a",
"bigip",
"device",
"and",
"add",
"a",
"new",
"member",
"to",
"an",
"existing",
"pool",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bigip.py#L1023-L1076 | train | A function to connect to a bigip device and add a new member to an existing pool. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/bigip.py | create_virtual | def create_virtual(hostname, username, password, name, destination,
pool=None,
address_status=None,
auto_lasthop=None,
bwc_policy=None,
cmp_enabled=None,
connection_limit=None,
dhcp_relay... | python | def create_virtual(hostname, username, password, name, destination,
pool=None,
address_status=None,
auto_lasthop=None,
bwc_policy=None,
cmp_enabled=None,
connection_limit=None,
dhcp_relay... | [
"def",
"create_virtual",
"(",
"hostname",
",",
"username",
",",
"password",
",",
"name",
",",
"destination",
",",
"pool",
"=",
"None",
",",
"address_status",
"=",
"None",
",",
"auto_lasthop",
"=",
"None",
",",
"bwc_policy",
"=",
"None",
",",
"cmp_enabled",
... | r'''
A function to connect to a bigip device and create a virtual server.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
name
The name of the virtual to create
destination
[ [virtual_a... | [
"r",
"A",
"function",
"to",
"connect",
"to",
"a",
"bigip",
"device",
"and",
"create",
"a",
"virtual",
"server",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bigip.py#L1237-L1523 | train | r Creates a virtual server in the iControl REST server. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/bigip.py | list_profile | def list_profile(hostname, username, password, profile_type, name=None, ):
'''
A function to connect to a bigip device and list an existing profile. If no name is provided than all
profiles of the specified type will be listed.
hostname
The host/address of the bigip device
username
... | python | def list_profile(hostname, username, password, profile_type, name=None, ):
'''
A function to connect to a bigip device and list an existing profile. If no name is provided than all
profiles of the specified type will be listed.
hostname
The host/address of the bigip device
username
... | [
"def",
"list_profile",
"(",
"hostname",
",",
"username",
",",
"password",
",",
"profile_type",
",",
"name",
"=",
"None",
",",
")",
":",
"#build sessions",
"bigip_session",
"=",
"_build_session",
"(",
"username",
",",
"password",
")",
"#get to REST",
"try",
":"... | A function to connect to a bigip device and list an existing profile. If no name is provided than all
profiles of the specified type will be listed.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
profile... | [
"A",
"function",
"to",
"connect",
"to",
"a",
"bigip",
"device",
"and",
"list",
"an",
"existing",
"profile",
".",
"If",
"no",
"name",
"is",
"provided",
"than",
"all",
"profiles",
"of",
"the",
"specified",
"type",
"will",
"be",
"listed",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bigip.py#L2004-L2038 | train | A function to connect to a bigip device and list existing profiles. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/bigip.py | create_profile | def create_profile(hostname, username, password, profile_type, name, **kwargs):
r'''
A function to connect to a bigip device and create a profile.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
profil... | python | def create_profile(hostname, username, password, profile_type, name, **kwargs):
r'''
A function to connect to a bigip device and create a profile.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
profil... | [
"def",
"create_profile",
"(",
"hostname",
",",
"username",
",",
"password",
",",
"profile_type",
",",
"name",
",",
"*",
"*",
"kwargs",
")",
":",
"#build session",
"bigip_session",
"=",
"_build_session",
"(",
"username",
",",
"password",
")",
"#construct the payl... | r'''
A function to connect to a bigip device and create a profile.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
profile_type
The type of profile to create
name
The name of the profil... | [
"r",
"A",
"function",
"to",
"connect",
"to",
"a",
"bigip",
"device",
"and",
"create",
"a",
"profile",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bigip.py#L2041-L2119 | train | r Creates a profile on a bigip 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/bigip.py | delete_profile | def delete_profile(hostname, username, password, profile_type, name):
'''
A function to connect to a bigip device and delete an existing profile.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
profile... | python | def delete_profile(hostname, username, password, profile_type, name):
'''
A function to connect to a bigip device and delete an existing profile.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
profile... | [
"def",
"delete_profile",
"(",
"hostname",
",",
"username",
",",
"password",
",",
"profile_type",
",",
"name",
")",
":",
"#build sessions",
"bigip_session",
"=",
"_build_session",
"(",
"username",
",",
"password",
")",
"#delete to REST",
"try",
":",
"response",
"... | A function to connect to a bigip device and delete an existing profile.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
profile_type
The type of profile to delete
name
The name of the profi... | [
"A",
"function",
"to",
"connect",
"to",
"a",
"bigip",
"device",
"and",
"delete",
"an",
"existing",
"profile",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bigip.py#L2210-L2243 | train | A function to connect to a bigip device and delete an existing profile. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/beacons.py | list_ | def list_(return_yaml=True,
include_pillar=True,
include_opts=True,
**kwargs):
'''
List the beacons currently configured on the minion.
Args:
return_yaml (bool):
Whether to return YAML formatted output, default ``True``.
include_pillar (bool):
... | python | def list_(return_yaml=True,
include_pillar=True,
include_opts=True,
**kwargs):
'''
List the beacons currently configured on the minion.
Args:
return_yaml (bool):
Whether to return YAML formatted output, default ``True``.
include_pillar (bool):
... | [
"def",
"list_",
"(",
"return_yaml",
"=",
"True",
",",
"include_pillar",
"=",
"True",
",",
"include_opts",
"=",
"True",
",",
"*",
"*",
"kwargs",
")",
":",
"beacons",
"=",
"None",
"try",
":",
"eventer",
"=",
"salt",
".",
"utils",
".",
"event",
".",
"ge... | List the beacons currently configured on the minion.
Args:
return_yaml (bool):
Whether to return YAML formatted output, default ``True``.
include_pillar (bool):
Whether to include beacons that are configured in pillar, default
is ``True``.
include_opts... | [
"List",
"the",
"beacons",
"currently",
"configured",
"on",
"the",
"minion",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/beacons.py#L30-L89 | train | List the currently configured Beacons on the minion. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/beacons.py | add | def add(name, beacon_data, **kwargs):
'''
Add a beacon on the minion
Args:
name (str):
Name of the beacon to configure
beacon_data (dict):
Dictionary or list containing configuration for beacon.
Returns:
dict: Boolean and status message on success or f... | python | def add(name, beacon_data, **kwargs):
'''
Add a beacon on the minion
Args:
name (str):
Name of the beacon to configure
beacon_data (dict):
Dictionary or list containing configuration for beacon.
Returns:
dict: Boolean and status message on success or f... | [
"def",
"add",
"(",
"name",
",",
"beacon_data",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"{",
"'comment'",
":",
"'Failed to add beacon {0}.'",
".",
"format",
"(",
"name",
")",
",",
"'result'",
":",
"False",
"}",
"if",
"name",
"in",
"list_",
"(",
... | Add a beacon on the minion
Args:
name (str):
Name of the beacon to configure
beacon_data (dict):
Dictionary or list containing configuration for beacon.
Returns:
dict: Boolean and status message on success or failure of add.
CLI Example:
.. code-bloc... | [
"Add",
"a",
"beacon",
"on",
"the",
"minion"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/beacons.py#L141-L241 | train | Add a beacon to the minion | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.