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/netapi/rest_cherrypy/app.py
lowdata_fmt
def lowdata_fmt(): ''' Validate and format lowdata from incoming unserialized request data This tool requires that the hypermedia_in tool has already been run. ''' if cherrypy.request.method.upper() != 'POST': return data = cherrypy.request.unserialized_data # if the data was sen...
python
def lowdata_fmt(): ''' Validate and format lowdata from incoming unserialized request data This tool requires that the hypermedia_in tool has already been run. ''' if cherrypy.request.method.upper() != 'POST': return data = cherrypy.request.unserialized_data # if the data was sen...
[ "def", "lowdata_fmt", "(", ")", ":", "if", "cherrypy", ".", "request", ".", "method", ".", "upper", "(", ")", "!=", "'POST'", ":", "return", "data", "=", "cherrypy", ".", "request", ".", "unserialized_data", "# if the data was sent as urlencoded, we need to make i...
Validate and format lowdata from incoming unserialized request data This tool requires that the hypermedia_in tool has already been run.
[ "Validate", "and", "format", "lowdata", "from", "incoming", "unserialized", "request", "data" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/netapi/rest_cherrypy/app.py#L1077-L1100
train
Validate and format lowdata from incoming unserialized request data MimeType
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/netapi/rest_cherrypy/app.py
get_app
def get_app(opts): ''' Returns a WSGI app and a configuration dictionary ''' apiopts = opts.get(__name__.rsplit('.', 2)[-2], {}) # rest_cherrypy opts # Add Salt and salt-api config options to the main CherryPy config dict cherrypy.config['saltopts'] = opts cherrypy.config['apiopts'] = apio...
python
def get_app(opts): ''' Returns a WSGI app and a configuration dictionary ''' apiopts = opts.get(__name__.rsplit('.', 2)[-2], {}) # rest_cherrypy opts # Add Salt and salt-api config options to the main CherryPy config dict cherrypy.config['saltopts'] = opts cherrypy.config['apiopts'] = apio...
[ "def", "get_app", "(", "opts", ")", ":", "apiopts", "=", "opts", ".", "get", "(", "__name__", ".", "rsplit", "(", "'.'", ",", "2", ")", "[", "-", "2", "]", ",", "{", "}", ")", "# rest_cherrypy opts", "# Add Salt and salt-api config options to the main Cherry...
Returns a WSGI app and a configuration dictionary
[ "Returns", "a", "WSGI", "app", "and", "a", "configuration", "dictionary" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/netapi/rest_cherrypy/app.py#L2927-L2940
train
Returns a WSGI app and a configuration 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/netapi/rest_cherrypy/app.py
LowDataAdapter.exec_lowstate
def exec_lowstate(self, client=None, token=None): ''' Pull a Low State data structure from request and execute the low-data chunks through Salt. The low-data chunks will be updated to include the authorization token for the current session. ''' lowstate = cherrypy.request...
python
def exec_lowstate(self, client=None, token=None): ''' Pull a Low State data structure from request and execute the low-data chunks through Salt. The low-data chunks will be updated to include the authorization token for the current session. ''' lowstate = cherrypy.request...
[ "def", "exec_lowstate", "(", "self", ",", "client", "=", "None", ",", "token", "=", "None", ")", ":", "lowstate", "=", "cherrypy", ".", "request", ".", "lowstate", "# Release the session lock before executing any potentially", "# long-running Salt commands. This allows di...
Pull a Low State data structure from request and execute the low-data chunks through Salt. The low-data chunks will be updated to include the authorization token for the current session.
[ "Pull", "a", "Low", "State", "data", "structure", "from", "request", "and", "execute", "the", "low", "-", "data", "chunks", "through", "Salt", ".", "The", "low", "-", "data", "chunks", "will", "be", "updated", "to", "include", "the", "authorization", "toke...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/netapi/rest_cherrypy/app.py#L1155-L1208
train
Execute the low - data for the current session and return the result.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/netapi/rest_cherrypy/app.py
LowDataAdapter.POST
def POST(self, **kwargs): ''' Send one or more Salt commands in the request body .. http:post:: / :reqheader X-Auth-Token: |req_token| :reqheader Accept: |req_accept| :reqheader Content-Type: |req_ct| :resheader Content-Type: |res_ct| ...
python
def POST(self, **kwargs): ''' Send one or more Salt commands in the request body .. http:post:: / :reqheader X-Auth-Token: |req_token| :reqheader Accept: |req_accept| :reqheader Content-Type: |req_ct| :resheader Content-Type: |res_ct| ...
[ "def", "POST", "(", "self", ",", "*", "*", "kwargs", ")", ":", "return", "{", "'return'", ":", "list", "(", "self", ".", "exec_lowstate", "(", "token", "=", "cherrypy", ".", "session", ".", "get", "(", "'token'", ")", ")", ")", "}" ]
Send one or more Salt commands in the request body .. http:post:: / :reqheader X-Auth-Token: |req_token| :reqheader Accept: |req_accept| :reqheader Content-Type: |req_ct| :resheader Content-Type: |res_ct| :status 200: |200| :status 400:...
[ "Send", "one", "or", "more", "Salt", "commands", "in", "the", "request", "body" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/netapi/rest_cherrypy/app.py#L1251-L1310
train
Send one or more Salt commands in the request body
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/netapi/rest_cherrypy/app.py
Minions.GET
def GET(self, mid=None): ''' A convenience URL for getting lists of minions or getting minion details .. http:get:: /minions/(mid) :reqheader X-Auth-Token: |req_token| :reqheader Accept: |req_accept| :status 200: |200| :status 401: |401|...
python
def GET(self, mid=None): ''' A convenience URL for getting lists of minions or getting minion details .. http:get:: /minions/(mid) :reqheader X-Auth-Token: |req_token| :reqheader Accept: |req_accept| :status 200: |200| :status 401: |401|...
[ "def", "GET", "(", "self", ",", "mid", "=", "None", ")", ":", "cherrypy", ".", "request", ".", "lowstate", "=", "[", "{", "'client'", ":", "'local'", ",", "'tgt'", ":", "mid", "or", "'*'", ",", "'fun'", ":", "'grains.items'", ",", "}", "]", "return...
A convenience URL for getting lists of minions or getting minion details .. http:get:: /minions/(mid) :reqheader X-Auth-Token: |req_token| :reqheader Accept: |req_accept| :status 200: |200| :status 401: |401| :status 406: |406| **Ex...
[ "A", "convenience", "URL", "for", "getting", "lists", "of", "minions", "or", "getting", "minion", "details" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/netapi/rest_cherrypy/app.py#L1321-L1366
train
A convenience URL for getting a list of minions or getting a single 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/netapi/rest_cherrypy/app.py
Minions.POST
def POST(self, **kwargs): ''' Start an execution command and immediately return the job id .. http:post:: /minions :reqheader X-Auth-Token: |req_token| :reqheader Accept: |req_accept| :reqheader Content-Type: |req_ct| :resheader Content-Type: |r...
python
def POST(self, **kwargs): ''' Start an execution command and immediately return the job id .. http:post:: /minions :reqheader X-Auth-Token: |req_token| :reqheader Accept: |req_accept| :reqheader Content-Type: |req_ct| :resheader Content-Type: |r...
[ "def", "POST", "(", "self", ",", "*", "*", "kwargs", ")", ":", "job_data", "=", "list", "(", "self", ".", "exec_lowstate", "(", "client", "=", "'local_async'", ",", "token", "=", "cherrypy", ".", "session", ".", "get", "(", "'token'", ")", ")", ")", ...
Start an execution command and immediately return the job id .. http:post:: /minions :reqheader X-Auth-Token: |req_token| :reqheader Accept: |req_accept| :reqheader Content-Type: |req_ct| :resheader Content-Type: |res_ct| :status 200: |200| ...
[ "Start", "an", "execution", "command", "and", "immediately", "return", "the", "job", "id" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/netapi/rest_cherrypy/app.py#L1368-L1432
train
Execute a command and immediately return the job id
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/netapi/rest_cherrypy/app.py
Jobs.GET
def GET(self, jid=None, timeout=''): ''' A convenience URL for getting lists of previously run jobs or getting the return from a single job .. http:get:: /jobs/(jid) List jobs or show a single job from the job cache. :reqheader X-Auth-Token: |req_token| ...
python
def GET(self, jid=None, timeout=''): ''' A convenience URL for getting lists of previously run jobs or getting the return from a single job .. http:get:: /jobs/(jid) List jobs or show a single job from the job cache. :reqheader X-Auth-Token: |req_token| ...
[ "def", "GET", "(", "self", ",", "jid", "=", "None", ",", "timeout", "=", "''", ")", ":", "lowstate", "=", "{", "'client'", ":", "'runner'", "}", "if", "jid", ":", "lowstate", ".", "update", "(", "{", "'fun'", ":", "'jobs.list_job'", ",", "'jid'", "...
A convenience URL for getting lists of previously run jobs or getting the return from a single job .. http:get:: /jobs/(jid) List jobs or show a single job from the job cache. :reqheader X-Auth-Token: |req_token| :reqheader Accept: |req_accept| :status...
[ "A", "convenience", "URL", "for", "getting", "lists", "of", "previously", "run", "jobs", "or", "getting", "the", "return", "from", "a", "single", "job" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/netapi/rest_cherrypy/app.py#L1440-L1548
train
This method is used to get a single job from a job cache.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/netapi/rest_cherrypy/app.py
Keys.GET
def GET(self, mid=None): ''' Show the list of minion keys or detail on a specific key .. versionadded:: 2014.7.0 .. http:get:: /keys/(mid) List all keys or show a specific key :reqheader X-Auth-Token: |req_token| :reqheader Accept: |req_accept| ...
python
def GET(self, mid=None): ''' Show the list of minion keys or detail on a specific key .. versionadded:: 2014.7.0 .. http:get:: /keys/(mid) List all keys or show a specific key :reqheader X-Auth-Token: |req_token| :reqheader Accept: |req_accept| ...
[ "def", "GET", "(", "self", ",", "mid", "=", "None", ")", ":", "if", "mid", ":", "lowstate", "=", "[", "{", "'client'", ":", "'wheel'", ",", "'fun'", ":", "'key.finger'", ",", "'match'", ":", "mid", ",", "}", "]", "else", ":", "lowstate", "=", "["...
Show the list of minion keys or detail on a specific key .. versionadded:: 2014.7.0 .. http:get:: /keys/(mid) List all keys or show a specific key :reqheader X-Auth-Token: |req_token| :reqheader Accept: |req_accept| :status 200: |200| :sta...
[ "Show", "the", "list", "of", "minion", "keys", "or", "detail", "on", "a", "specific", "key" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/netapi/rest_cherrypy/app.py#L1561-L1646
train
Get all minion keys or detail on a specific key.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/netapi/rest_cherrypy/app.py
Keys.POST
def POST(self, **kwargs): r''' Easily generate keys for a minion and auto-accept the new key Accepts all the same parameters as the :py:func:`key.gen_accept <salt.wheel.key.gen_accept>`. .. note:: A note about ``curl`` Avoid using the ``-i`` flag or HTTP headers will...
python
def POST(self, **kwargs): r''' Easily generate keys for a minion and auto-accept the new key Accepts all the same parameters as the :py:func:`key.gen_accept <salt.wheel.key.gen_accept>`. .. note:: A note about ``curl`` Avoid using the ``-i`` flag or HTTP headers will...
[ "def", "POST", "(", "self", ",", "*", "*", "kwargs", ")", ":", "lowstate", "=", "cherrypy", ".", "request", ".", "lowstate", "lowstate", "[", "0", "]", ".", "update", "(", "{", "'client'", ":", "'wheel'", ",", "'fun'", ":", "'key.gen_accept'", ",", "...
r''' Easily generate keys for a minion and auto-accept the new key Accepts all the same parameters as the :py:func:`key.gen_accept <salt.wheel.key.gen_accept>`. .. note:: A note about ``curl`` Avoid using the ``-i`` flag or HTTP headers will be written and produce...
[ "r", "Easily", "generate", "keys", "for", "a", "minion", "and", "auto", "-", "accept", "the", "new", "key" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/netapi/rest_cherrypy/app.py#L1649-L1752
train
A method that generates public and private keys for a new minion and returns both as a tarball.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/netapi/rest_cherrypy/app.py
Login.POST
def POST(self, **kwargs): ''' :ref:`Authenticate <rest_cherrypy-auth>` against Salt's eauth system .. http:post:: /login :reqheader X-Auth-Token: |req_token| :reqheader Accept: |req_accept| :reqheader Content-Type: |req_ct| :form eauth: the eau...
python
def POST(self, **kwargs): ''' :ref:`Authenticate <rest_cherrypy-auth>` against Salt's eauth system .. http:post:: /login :reqheader X-Auth-Token: |req_token| :reqheader Accept: |req_accept| :reqheader Content-Type: |req_ct| :form eauth: the eau...
[ "def", "POST", "(", "self", ",", "*", "*", "kwargs", ")", ":", "if", "not", "self", ".", "api", ".", "_is_master_running", "(", ")", ":", "raise", "salt", ".", "exceptions", ".", "SaltDaemonNotRunning", "(", "'Salt Master is not available.'", ")", "# the url...
:ref:`Authenticate <rest_cherrypy-auth>` against Salt's eauth system .. http:post:: /login :reqheader X-Auth-Token: |req_token| :reqheader Accept: |req_accept| :reqheader Content-Type: |req_ct| :form eauth: the eauth backend configured for the user ...
[ ":", "ref", ":", "Authenticate", "<rest_cherrypy", "-", "auth", ">", "against", "Salt", "s", "eauth", "system" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/netapi/rest_cherrypy/app.py#L1805-L1932
train
Authenticate a user against the system and return a JSON 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/netapi/rest_cherrypy/app.py
Token.POST
def POST(self, **kwargs): r''' .. http:post:: /token Generate a Salt eauth token :status 200: |200| :status 400: |400| :status 401: |401| **Example request:** .. code-block:: bash curl -sSk https://localhost:8000/token \ ...
python
def POST(self, **kwargs): r''' .. http:post:: /token Generate a Salt eauth token :status 200: |200| :status 400: |400| :status 401: |401| **Example request:** .. code-block:: bash curl -sSk https://localhost:8000/token \ ...
[ "def", "POST", "(", "self", ",", "*", "*", "kwargs", ")", ":", "for", "creds", "in", "cherrypy", ".", "request", ".", "lowstate", ":", "try", ":", "creds", ".", "update", "(", "{", "'client'", ":", "'runner'", ",", "'fun'", ":", "'auth.mk_token'", ",...
r''' .. http:post:: /token Generate a Salt eauth token :status 200: |200| :status 400: |400| :status 401: |401| **Example request:** .. code-block:: bash curl -sSk https://localhost:8000/token \ -H 'Content-type: ap...
[ "r", "..", "http", ":", "post", "::", "/", "token" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/netapi/rest_cherrypy/app.py#L1964-L2016
train
This method generates a Salt eauth token and returns a list of the result.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/netapi/rest_cherrypy/app.py
Events._is_valid_token
def _is_valid_token(self, auth_token): ''' Check if this is a valid salt-api token or valid Salt token salt-api tokens are regular session tokens that tie back to a real Salt token. Salt tokens are tokens generated by Salt's eauth system. :return bool: True if valid, False if n...
python
def _is_valid_token(self, auth_token): ''' Check if this is a valid salt-api token or valid Salt token salt-api tokens are regular session tokens that tie back to a real Salt token. Salt tokens are tokens generated by Salt's eauth system. :return bool: True if valid, False if n...
[ "def", "_is_valid_token", "(", "self", ",", "auth_token", ")", ":", "# Make sure that auth token is hex. If it's None, or something other", "# than hex, this will raise a ValueError.", "try", ":", "int", "(", "auth_token", ",", "16", ")", "except", "(", "TypeError", ",", ...
Check if this is a valid salt-api token or valid Salt token salt-api tokens are regular session tokens that tie back to a real Salt token. Salt tokens are tokens generated by Salt's eauth system. :return bool: True if valid, False if not valid.
[ "Check", "if", "this", "is", "a", "valid", "salt", "-", "api", "token", "or", "valid", "Salt", "token" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/netapi/rest_cherrypy/app.py#L2191-L2219
train
Check if the given token is a valid Salt API token or a regular Salt 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/netapi/rest_cherrypy/app.py
Events.GET
def GET(self, token=None, salt_token=None): r''' An HTTP stream of the Salt master event bus This stream is formatted per the Server Sent Events (SSE) spec. Each event is formatted as JSON. .. http:get:: /events :status 200: |200| :status 401: |401| ...
python
def GET(self, token=None, salt_token=None): r''' An HTTP stream of the Salt master event bus This stream is formatted per the Server Sent Events (SSE) spec. Each event is formatted as JSON. .. http:get:: /events :status 200: |200| :status 401: |401| ...
[ "def", "GET", "(", "self", ",", "token", "=", "None", ",", "salt_token", "=", "None", ")", ":", "cookies", "=", "cherrypy", ".", "request", ".", "cookie", "auth_token", "=", "token", "or", "salt_token", "or", "(", "cookies", "[", "'session_id'", "]", "...
r''' An HTTP stream of the Salt master event bus This stream is formatted per the Server Sent Events (SSE) spec. Each event is formatted as JSON. .. http:get:: /events :status 200: |200| :status 401: |401| :status 406: |406| :query token...
[ "r", "An", "HTTP", "stream", "of", "the", "Salt", "master", "event", "bus" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/netapi/rest_cherrypy/app.py#L2221-L2380
train
r This method returns a JSON object containing the current state of the master 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/netapi/rest_cherrypy/app.py
WebsocketEndpoint.GET
def GET(self, token=None, **kwargs): ''' Return a websocket connection of Salt's event stream .. http:get:: /ws/(token) :query format_events: The event stream will undergo server-side formatting if the ``format_events`` URL parameter is included in the request. ...
python
def GET(self, token=None, **kwargs): ''' Return a websocket connection of Salt's event stream .. http:get:: /ws/(token) :query format_events: The event stream will undergo server-side formatting if the ``format_events`` URL parameter is included in the request. ...
[ "def", "GET", "(", "self", ",", "token", "=", "None", ",", "*", "*", "kwargs", ")", ":", "# Pulling the session token from an URL param is a workaround for", "# browsers not supporting CORS in the EventSource API.", "if", "token", ":", "orig_session", ",", "_", "=", "ch...
Return a websocket connection of Salt's event stream .. http:get:: /ws/(token) :query format_events: The event stream will undergo server-side formatting if the ``format_events`` URL parameter is included in the request. This can be useful to avoid formatting on the ...
[ "Return", "a", "websocket", "connection", "of", "Salt", "s", "event", "stream" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/netapi/rest_cherrypy/app.py#L2413-L2573
train
This function returns a websocket connection of Salt s event stream with the specified authentication 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/netapi/rest_cherrypy/app.py
Webhook.POST
def POST(self, *args, **kwargs): ''' Fire an event in Salt with a custom event tag and data .. http:post:: /hook :status 200: |200| :status 401: |401| :status 406: |406| :status 413: request body is too large **Example request:** ...
python
def POST(self, *args, **kwargs): ''' Fire an event in Salt with a custom event tag and data .. http:post:: /hook :status 200: |200| :status 401: |401| :status 406: |406| :status 413: request body is too large **Example request:** ...
[ "def", "POST", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "tag", "=", "'/'", ".", "join", "(", "itertools", ".", "chain", "(", "self", ".", "tag_base", ",", "args", ")", ")", "data", "=", "cherrypy", ".", "serving", ".", ...
Fire an event in Salt with a custom event tag and data .. http:post:: /hook :status 200: |200| :status 401: |401| :status 406: |406| :status 413: request body is too large **Example request:** .. code-block:: bash curl -sS localhos...
[ "Fire", "an", "event", "in", "Salt", "with", "a", "custom", "event", "tag", "and", "data" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/netapi/rest_cherrypy/app.py#L2643-L2739
train
This method is used to send an HTTP POST request to the URL that was used to kick off a build of the specific version of the build.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/netapi/rest_cherrypy/app.py
App.GET
def GET(self, *args): ''' Serve a single static file ignoring the remaining path This is useful in combination with a browser-based app using the HTML5 history API. .. http::get:: /app :reqheader X-Auth-Token: |req_token| :status 200: |200| ...
python
def GET(self, *args): ''' Serve a single static file ignoring the remaining path This is useful in combination with a browser-based app using the HTML5 history API. .. http::get:: /app :reqheader X-Auth-Token: |req_token| :status 200: |200| ...
[ "def", "GET", "(", "self", ",", "*", "args", ")", ":", "apiopts", "=", "cherrypy", ".", "config", "[", "'apiopts'", "]", "default_index", "=", "os", ".", "path", ".", "abspath", "(", "os", ".", "path", ".", "join", "(", "os", ".", "path", ".", "d...
Serve a single static file ignoring the remaining path This is useful in combination with a browser-based app using the HTML5 history API. .. http::get:: /app :reqheader X-Auth-Token: |req_token| :status 200: |200| :status 401: |401|
[ "Serve", "a", "single", "static", "file", "ignoring", "the", "remaining", "path" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/netapi/rest_cherrypy/app.py#L2783-L2803
train
Serve a single static file ignoring the remaining 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/netapi/rest_cherrypy/app.py
API._setattr_url_map
def _setattr_url_map(self): ''' Set an attribute on the local instance for each key/val in url_map CherryPy uses class attributes to resolve URLs. ''' if self.apiopts.get('enable_sessions', True) is False: url_blacklist = ['login', 'logout', 'minions', 'jobs'] ...
python
def _setattr_url_map(self): ''' Set an attribute on the local instance for each key/val in url_map CherryPy uses class attributes to resolve URLs. ''' if self.apiopts.get('enable_sessions', True) is False: url_blacklist = ['login', 'logout', 'minions', 'jobs'] ...
[ "def", "_setattr_url_map", "(", "self", ")", ":", "if", "self", ".", "apiopts", ".", "get", "(", "'enable_sessions'", ",", "True", ")", "is", "False", ":", "url_blacklist", "=", "[", "'login'", ",", "'logout'", ",", "'minions'", ",", "'jobs'", "]", "else...
Set an attribute on the local instance for each key/val in url_map CherryPy uses class attributes to resolve URLs.
[ "Set", "an", "attribute", "on", "the", "local", "instance", "for", "each", "key", "/", "val", "in", "url_map" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/netapi/rest_cherrypy/app.py#L2823-L2838
train
Set an attribute on the local instance for each key / val in url_map.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/netapi/rest_cherrypy/app.py
API.get_conf
def get_conf(self): ''' Combine the CherryPy configuration with the rest_cherrypy config values pulled from the master config and return the CherryPy configuration ''' conf = { 'global': { 'server.socket_host': self.apiopts.get('host', '0.0.0.0'), ...
python
def get_conf(self): ''' Combine the CherryPy configuration with the rest_cherrypy config values pulled from the master config and return the CherryPy configuration ''' conf = { 'global': { 'server.socket_host': self.apiopts.get('host', '0.0.0.0'), ...
[ "def", "get_conf", "(", "self", ")", ":", "conf", "=", "{", "'global'", ":", "{", "'server.socket_host'", ":", "self", ".", "apiopts", ".", "get", "(", "'host'", ",", "'0.0.0.0'", ")", ",", "'server.socket_port'", ":", "self", ".", "apiopts", ".", "get",...
Combine the CherryPy configuration with the rest_cherrypy config values pulled from the master config and return the CherryPy configuration
[ "Combine", "the", "CherryPy", "configuration", "with", "the", "rest_cherrypy", "config", "values", "pulled", "from", "the", "master", "config", "and", "return", "the", "CherryPy", "configuration" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/netapi/rest_cherrypy/app.py#L2866-L2924
train
Combine the CherryPy configuration with the rest_cherrypy config values and return the CherryPy configuration
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/gentoo_service.py
get_disabled
def get_disabled(): ''' Return a set of services that are installed but disabled CLI Example: .. code-block:: bash salt '*' service.get_disabled ''' (enabled_services, disabled_services) = _get_service_list(include_enabled=False, ...
python
def get_disabled(): ''' Return a set of services that are installed but disabled CLI Example: .. code-block:: bash salt '*' service.get_disabled ''' (enabled_services, disabled_services) = _get_service_list(include_enabled=False, ...
[ "def", "get_disabled", "(", ")", ":", "(", "enabled_services", ",", "disabled_services", ")", "=", "_get_service_list", "(", "include_enabled", "=", "False", ",", "include_disabled", "=", "True", ")", "return", "sorted", "(", "disabled_services", ")" ]
Return a set of services that are installed but disabled CLI Example: .. code-block:: bash salt '*' service.get_disabled
[ "Return", "a", "set", "of", "services", "that", "are", "installed", "but", "disabled" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/gentoo_service.py#L107-L119
train
Return a set of services that are installed but disabled
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/gentoo_service.py
available
def available(name): ''' Returns ``True`` if the specified service is available, otherwise returns ``False``. CLI Example: .. code-block:: bash salt '*' service.available sshd ''' (enabled_services, disabled_services) = _get_service_list(include_enabled=True, ...
python
def available(name): ''' Returns ``True`` if the specified service is available, otherwise returns ``False``. CLI Example: .. code-block:: bash salt '*' service.available sshd ''' (enabled_services, disabled_services) = _get_service_list(include_enabled=True, ...
[ "def", "available", "(", "name", ")", ":", "(", "enabled_services", ",", "disabled_services", ")", "=", "_get_service_list", "(", "include_enabled", "=", "True", ",", "include_disabled", "=", "True", ")", "return", "name", "in", "enabled_services", "or", "name",...
Returns ``True`` if the specified service is available, otherwise returns ``False``. CLI Example: .. code-block:: bash salt '*' service.available sshd
[ "Returns", "True", "if", "the", "specified", "service", "is", "available", "otherwise", "returns", "False", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/gentoo_service.py#L122-L135
train
Returns True if the specified service is available otherwise returns False.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/gentoo_service.py
get_all
def get_all(): ''' Return all available boot services CLI Example: .. code-block:: bash salt '*' service.get_all ''' (enabled_services, disabled_services) = _get_service_list(include_enabled=True, include_disabled=True) ...
python
def get_all(): ''' Return all available boot services CLI Example: .. code-block:: bash salt '*' service.get_all ''' (enabled_services, disabled_services) = _get_service_list(include_enabled=True, include_disabled=True) ...
[ "def", "get_all", "(", ")", ":", "(", "enabled_services", ",", "disabled_services", ")", "=", "_get_service_list", "(", "include_enabled", "=", "True", ",", "include_disabled", "=", "True", ")", "enabled_services", ".", "update", "(", "dict", "(", "[", "(", ...
Return all available boot services CLI Example: .. code-block:: bash salt '*' service.get_all
[ "Return", "all", "available", "boot", "services" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/gentoo_service.py#L153-L166
train
Return all available boot services in order
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/gentoo_service.py
status
def status(name, sig=None): ''' Return the status for a service. If the name contains globbing, a dict mapping service name to True/False values is returned. .. versionchanged:: 2018.3.0 The service name can now be a glob (e.g. ``salt*``) Args: name (str): The name of the servi...
python
def status(name, sig=None): ''' Return the status for a service. If the name contains globbing, a dict mapping service name to True/False values is returned. .. versionchanged:: 2018.3.0 The service name can now be a glob (e.g. ``salt*``) Args: name (str): The name of the servi...
[ "def", "status", "(", "name", ",", "sig", "=", "None", ")", ":", "if", "sig", ":", "return", "bool", "(", "__salt__", "[", "'status.pid'", "]", "(", "sig", ")", ")", "contains_globbing", "=", "bool", "(", "re", ".", "search", "(", "r'\\*|\\?|\\[.+\\]'"...
Return the status for a service. If the name contains globbing, a dict mapping service name to True/False values is returned. .. versionchanged:: 2018.3.0 The service name can now be a glob (e.g. ``salt*``) Args: name (str): The name of the service to check sig (str): Signature...
[ "Return", "the", "status", "for", "a", "service", ".", "If", "the", "name", "contains", "globbing", "a", "dict", "mapping", "service", "name", "to", "True", "/", "False", "values", "is", "returned", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/gentoo_service.py#L239-L276
train
Return the status for a service.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/gentoo_service.py
disable
def disable(name, **kwargs): ''' Disable the named service to start at boot CLI Example: .. code-block:: bash salt '*' service.disable <service name> <runlevels=single-runlevel> salt '*' service.disable <service name> <runlevels=[runlevel1,runlevel2]> ''' levels = [] if 'r...
python
def disable(name, **kwargs): ''' Disable the named service to start at boot CLI Example: .. code-block:: bash salt '*' service.disable <service name> <runlevels=single-runlevel> salt '*' service.disable <service name> <runlevels=[runlevel1,runlevel2]> ''' levels = [] if 'r...
[ "def", "disable", "(", "name", ",", "*", "*", "kwargs", ")", ":", "levels", "=", "[", "]", "if", "'runlevels'", "in", "kwargs", ":", "requested_levels", "=", "set", "(", "kwargs", "[", "'runlevels'", "]", "if", "isinstance", "(", "kwargs", "[", "'runle...
Disable the named service to start at boot CLI Example: .. code-block:: bash salt '*' service.disable <service name> <runlevels=single-runlevel> salt '*' service.disable <service name> <runlevels=[runlevel1,runlevel2]>
[ "Disable", "the", "named", "service", "to", "start", "at", "boot" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/gentoo_service.py#L309-L328
train
Disable the named service to start at boot atabase CLI Example : bash disable 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/gentoo_service.py
enabled
def enabled(name, **kwargs): ''' Return True if the named service is enabled, false otherwise CLI Example: .. code-block:: bash salt '*' service.enabled <service name> <runlevels=single-runlevel> salt '*' service.enabled <service name> <runlevels=[runlevel1,runlevel2]> ''' ena...
python
def enabled(name, **kwargs): ''' Return True if the named service is enabled, false otherwise CLI Example: .. code-block:: bash salt '*' service.enabled <service name> <runlevels=single-runlevel> salt '*' service.enabled <service name> <runlevels=[runlevel1,runlevel2]> ''' ena...
[ "def", "enabled", "(", "name", ",", "*", "*", "kwargs", ")", ":", "enabled_services", "=", "get_enabled", "(", ")", "if", "name", "not", "in", "enabled_services", ":", "return", "False", "if", "'runlevels'", "not", "in", "kwargs", ":", "return", "True", ...
Return True if the named service is enabled, false otherwise CLI Example: .. code-block:: bash salt '*' service.enabled <service name> <runlevels=single-runlevel> salt '*' service.enabled <service name> <runlevels=[runlevel1,runlevel2]>
[ "Return", "True", "if", "the", "named", "service", "is", "enabled", "false", "otherwise" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/gentoo_service.py#L331-L349
train
Return True if the named service is enabled 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/states/virtualenv_mod.py
managed
def managed(name, venv_bin=None, requirements=None, system_site_packages=False, distribute=False, use_wheel=False, clear=False, python=None, extra_search_dir=None, never_download=None, prompt=None, ...
python
def managed(name, venv_bin=None, requirements=None, system_site_packages=False, distribute=False, use_wheel=False, clear=False, python=None, extra_search_dir=None, never_download=None, prompt=None, ...
[ "def", "managed", "(", "name", ",", "venv_bin", "=", "None", ",", "requirements", "=", "None", ",", "system_site_packages", "=", "False", ",", "distribute", "=", "False", ",", "use_wheel", "=", "False", ",", "clear", "=", "False", ",", "python", "=", "No...
Create a virtualenv and optionally manage it with pip name Path to the virtualenv. venv_bin: virtualenv The name (and optionally path) of the virtualenv command. This can also be set globally in the minion config file as ``virtualenv.venv_bin``. requirements: None Path to ...
[ "Create", "a", "virtualenv", "and", "optionally", "manage", "it", "with", "pip" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/virtualenv_mod.py#L33-L337
train
Create a new virtual environment and optionally manage it with pip.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/rh_ip.py
_parse_settings_bond_1
def _parse_settings_bond_1(opts, iface, bond_def): ''' Filters given options and outputs valid settings for bond1. If an option has a value that is not expected, this function will log what the Interface, Setting and what it was expecting. ''' bond = {'mode': '1'} for binding in ['miim...
python
def _parse_settings_bond_1(opts, iface, bond_def): ''' Filters given options and outputs valid settings for bond1. If an option has a value that is not expected, this function will log what the Interface, Setting and what it was expecting. ''' bond = {'mode': '1'} for binding in ['miim...
[ "def", "_parse_settings_bond_1", "(", "opts", ",", "iface", ",", "bond_def", ")", ":", "bond", "=", "{", "'mode'", ":", "'1'", "}", "for", "binding", "in", "[", "'miimon'", ",", "'downdelay'", ",", "'updelay'", "]", ":", "if", "binding", "in", "opts", ...
Filters given options and outputs valid settings for bond1. If an option has a value that is not expected, this function will log what the Interface, Setting and what it was expecting.
[ "Filters", "given", "options", "and", "outputs", "valid", "settings", "for", "bond1", ".", "If", "an", "option", "has", "a", "value", "that", "is", "not", "expected", "this", "function", "will", "log", "what", "the", "Interface", "Setting", "and", "what", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rh_ip.py#L320-L356
train
Filters given options and outputs valid settings for bond1.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/rh_ip.py
_parse_settings_vlan
def _parse_settings_vlan(opts, iface): ''' Filters given options and outputs valid settings for a vlan ''' vlan = {} if 'reorder_hdr' in opts: if opts['reorder_hdr'] in _CONFIG_TRUE + _CONFIG_FALSE: vlan.update({'reorder_hdr': opts['reorder_hdr']}) else: vali...
python
def _parse_settings_vlan(opts, iface): ''' Filters given options and outputs valid settings for a vlan ''' vlan = {} if 'reorder_hdr' in opts: if opts['reorder_hdr'] in _CONFIG_TRUE + _CONFIG_FALSE: vlan.update({'reorder_hdr': opts['reorder_hdr']}) else: vali...
[ "def", "_parse_settings_vlan", "(", "opts", ",", "iface", ")", ":", "vlan", "=", "{", "}", "if", "'reorder_hdr'", "in", "opts", ":", "if", "opts", "[", "'reorder_hdr'", "]", "in", "_CONFIG_TRUE", "+", "_CONFIG_FALSE", ":", "vlan", ".", "update", "(", "{"...
Filters given options and outputs valid settings for a vlan
[ "Filters", "given", "options", "and", "outputs", "valid", "settings", "for", "a", "vlan" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rh_ip.py#L571-L596
train
Filters given options and outputs valid settings for a vlan
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/rh_ip.py
_parse_settings_eth
def _parse_settings_eth(opts, iface_type, enabled, iface): ''' Filters given options and outputs valid settings for a network interface. ''' result = {'name': iface} if 'proto' in opts: valid = ['none', 'bootp', 'dhcp'] if opts['proto'] in valid: result['proto'] = opt...
python
def _parse_settings_eth(opts, iface_type, enabled, iface): ''' Filters given options and outputs valid settings for a network interface. ''' result = {'name': iface} if 'proto' in opts: valid = ['none', 'bootp', 'dhcp'] if opts['proto'] in valid: result['proto'] = opt...
[ "def", "_parse_settings_eth", "(", "opts", ",", "iface_type", ",", "enabled", ",", "iface", ")", ":", "result", "=", "{", "'name'", ":", "iface", "}", "if", "'proto'", "in", "opts", ":", "valid", "=", "[", "'none'", ",", "'bootp'", ",", "'dhcp'", "]", ...
Filters given options and outputs valid settings for a network interface.
[ "Filters", "given", "options", "and", "outputs", "valid", "settings", "for", "a", "network", "interface", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rh_ip.py#L599-L816
train
Filters given options and outputs valid settings for a network 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/rh_ip.py
_parse_network_settings
def _parse_network_settings(opts, current): ''' Filters given options and outputs valid settings for the global network settings file. ''' # Normalize keys opts = dict((k.lower(), v) for (k, v) in six.iteritems(opts)) current = dict((k.lower(), v) for (k, v) in six.iteritems(current)) #...
python
def _parse_network_settings(opts, current): ''' Filters given options and outputs valid settings for the global network settings file. ''' # Normalize keys opts = dict((k.lower(), v) for (k, v) in six.iteritems(opts)) current = dict((k.lower(), v) for (k, v) in six.iteritems(current)) #...
[ "def", "_parse_network_settings", "(", "opts", ",", "current", ")", ":", "# Normalize keys", "opts", "=", "dict", "(", "(", "k", ".", "lower", "(", ")", ",", "v", ")", "for", "(", "k", ",", "v", ")", "in", "six", ".", "iteritems", "(", "opts", ")",...
Filters given options and outputs valid settings for the global network settings file.
[ "Filters", "given", "options", "and", "outputs", "valid", "settings", "for", "the", "global", "network", "settings", "file", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rh_ip.py#L836-L903
train
Filters given options and outputs valid settings for the global network settings file.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/rh_ip.py
_read_file
def _read_file(path): ''' Reads and returns the contents of a file ''' try: with salt.utils.files.fopen(path, 'rb') as rfh: lines = salt.utils.stringutils.to_unicode(rfh.read()).splitlines() try: lines.remove('') except ValueError: ...
python
def _read_file(path): ''' Reads and returns the contents of a file ''' try: with salt.utils.files.fopen(path, 'rb') as rfh: lines = salt.utils.stringutils.to_unicode(rfh.read()).splitlines() try: lines.remove('') except ValueError: ...
[ "def", "_read_file", "(", "path", ")", ":", "try", ":", "with", "salt", ".", "utils", ".", "files", ".", "fopen", "(", "path", ",", "'rb'", ")", "as", "rfh", ":", "lines", "=", "salt", ".", "utils", ".", "stringutils", ".", "to_unicode", "(", "rfh"...
Reads and returns the contents of a file
[ "Reads", "and", "returns", "the", "contents", "of", "a", "file" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rh_ip.py#L933-L946
train
Reads and returns the contents of a file in a order that the file is in the order they were added.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/rh_ip.py
_write_file_iface
def _write_file_iface(iface, data, folder, pattern): ''' Writes a file to disk ''' filename = os.path.join(folder, pattern.format(iface)) if not os.path.exists(folder): msg = '{0} cannot be written. {1} does not exist' msg = msg.format(filename, folder) log.error(msg) ...
python
def _write_file_iface(iface, data, folder, pattern): ''' Writes a file to disk ''' filename = os.path.join(folder, pattern.format(iface)) if not os.path.exists(folder): msg = '{0} cannot be written. {1} does not exist' msg = msg.format(filename, folder) log.error(msg) ...
[ "def", "_write_file_iface", "(", "iface", ",", "data", ",", "folder", ",", "pattern", ")", ":", "filename", "=", "os", ".", "path", ".", "join", "(", "folder", ",", "pattern", ".", "format", "(", "iface", ")", ")", "if", "not", "os", ".", "path", "...
Writes a file to disk
[ "Writes", "a", "file", "to", "disk" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rh_ip.py#L949-L960
train
Writes a file to disk
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/rh_ip.py
_write_file_network
def _write_file_network(data, filename): ''' Writes a file to disk ''' with salt.utils.files.fopen(filename, 'w') as fp_: fp_.write(salt.utils.stringutils.to_str(data))
python
def _write_file_network(data, filename): ''' Writes a file to disk ''' with salt.utils.files.fopen(filename, 'w') as fp_: fp_.write(salt.utils.stringutils.to_str(data))
[ "def", "_write_file_network", "(", "data", ",", "filename", ")", ":", "with", "salt", ".", "utils", ".", "files", ".", "fopen", "(", "filename", ",", "'w'", ")", "as", "fp_", ":", "fp_", ".", "write", "(", "salt", ".", "utils", ".", "stringutils", "....
Writes a file to disk
[ "Writes", "a", "file", "to", "disk" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rh_ip.py#L963-L968
train
Writes a file to disk
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/rh_ip.py
build_bond
def build_bond(iface, **settings): ''' Create a bond script in /etc/modprobe.d with the passed settings and load the bonding kernel module. CLI Example: .. code-block:: bash salt '*' ip.build_bond bond0 mode=balance-alb ''' rh_major = __grains__['osrelease'][:1] opts = _parse...
python
def build_bond(iface, **settings): ''' Create a bond script in /etc/modprobe.d with the passed settings and load the bonding kernel module. CLI Example: .. code-block:: bash salt '*' ip.build_bond bond0 mode=balance-alb ''' rh_major = __grains__['osrelease'][:1] opts = _parse...
[ "def", "build_bond", "(", "iface", ",", "*", "*", "settings", ")", ":", "rh_major", "=", "__grains__", "[", "'osrelease'", "]", "[", ":", "1", "]", "opts", "=", "_parse_settings_bond", "(", "settings", ",", "iface", ")", "try", ":", "template", "=", "J...
Create a bond script in /etc/modprobe.d with the passed settings and load the bonding kernel module. CLI Example: .. code-block:: bash salt '*' ip.build_bond bond0 mode=balance-alb
[ "Create", "a", "bond", "script", "in", "/", "etc", "/", "modprobe", ".", "d", "with", "the", "passed", "settings", "and", "load", "the", "bonding", "kernel", "module", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rh_ip.py#L980-L1017
train
Build a bond kernel for the given 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/rh_ip.py
build_interface
def build_interface(iface, iface_type, enabled, **settings): ''' Build an interface script for a network interface. CLI Example: .. code-block:: bash salt '*' ip.build_interface eth0 eth <settings> ''' if __grains__['os'] == 'Fedora': if __grains__['osmajorrelease'] >= 18: ...
python
def build_interface(iface, iface_type, enabled, **settings): ''' Build an interface script for a network interface. CLI Example: .. code-block:: bash salt '*' ip.build_interface eth0 eth <settings> ''' if __grains__['os'] == 'Fedora': if __grains__['osmajorrelease'] >= 18: ...
[ "def", "build_interface", "(", "iface", ",", "iface_type", ",", "enabled", ",", "*", "*", "settings", ")", ":", "if", "__grains__", "[", "'os'", "]", "==", "'Fedora'", ":", "if", "__grains__", "[", "'osmajorrelease'", "]", ">=", "18", ":", "rh_major", "=...
Build an interface script for a network interface. CLI Example: .. code-block:: bash salt '*' ip.build_interface eth0 eth <settings>
[ "Build", "an", "interface", "script", "for", "a", "network", "interface", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rh_ip.py#L1020-L1074
train
Build an interface script for a network 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/rh_ip.py
build_routes
def build_routes(iface, **settings): ''' Build a route script for a network interface. CLI Example: .. code-block:: bash salt '*' ip.build_routes eth0 <settings> ''' template = 'rh6_route_eth.jinja' try: if int(__grains__['osrelease'][0]) < 6: template = 'rout...
python
def build_routes(iface, **settings): ''' Build a route script for a network interface. CLI Example: .. code-block:: bash salt '*' ip.build_routes eth0 <settings> ''' template = 'rh6_route_eth.jinja' try: if int(__grains__['osrelease'][0]) < 6: template = 'rout...
[ "def", "build_routes", "(", "iface", ",", "*", "*", "settings", ")", ":", "template", "=", "'rh6_route_eth.jinja'", "try", ":", "if", "int", "(", "__grains__", "[", "'osrelease'", "]", "[", "0", "]", ")", "<", "6", ":", "template", "=", "'route_eth.jinja...
Build a route script for a network interface. CLI Example: .. code-block:: bash salt '*' ip.build_routes eth0 <settings>
[ "Build", "a", "route", "script", "for", "a", "network", "interface", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rh_ip.py#L1077-L1130
train
Build a route script for a network 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/rh_ip.py
get_bond
def get_bond(iface): ''' Return the content of a bond script CLI Example: .. code-block:: bash salt '*' ip.get_bond bond0 ''' path = os.path.join(_RH_NETWORK_CONF_FILES, '{0}.conf'.format(iface)) return _read_file(path)
python
def get_bond(iface): ''' Return the content of a bond script CLI Example: .. code-block:: bash salt '*' ip.get_bond bond0 ''' path = os.path.join(_RH_NETWORK_CONF_FILES, '{0}.conf'.format(iface)) return _read_file(path)
[ "def", "get_bond", "(", "iface", ")", ":", "path", "=", "os", ".", "path", ".", "join", "(", "_RH_NETWORK_CONF_FILES", ",", "'{0}.conf'", ".", "format", "(", "iface", ")", ")", "return", "_read_file", "(", "path", ")" ]
Return the content of a bond script CLI Example: .. code-block:: bash salt '*' ip.get_bond bond0
[ "Return", "the", "content", "of", "a", "bond", "script" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rh_ip.py#L1149-L1160
train
Return the content of a bond script CLI Example : bash salt '*' ip. get_bond bond0
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/rh_ip.py
get_interface
def get_interface(iface): ''' Return the contents of an interface script CLI Example: .. code-block:: bash salt '*' ip.get_interface eth0 ''' path = os.path.join(_RH_NETWORK_SCRIPT_DIR, 'ifcfg-{0}'.format(iface)) return _read_file(path)
python
def get_interface(iface): ''' Return the contents of an interface script CLI Example: .. code-block:: bash salt '*' ip.get_interface eth0 ''' path = os.path.join(_RH_NETWORK_SCRIPT_DIR, 'ifcfg-{0}'.format(iface)) return _read_file(path)
[ "def", "get_interface", "(", "iface", ")", ":", "path", "=", "os", ".", "path", ".", "join", "(", "_RH_NETWORK_SCRIPT_DIR", ",", "'ifcfg-{0}'", ".", "format", "(", "iface", ")", ")", "return", "_read_file", "(", "path", ")" ]
Return the contents of an interface script CLI Example: .. code-block:: bash salt '*' ip.get_interface eth0
[ "Return", "the", "contents", "of", "an", "interface", "script" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rh_ip.py#L1163-L1174
train
Get the contents of an interface script CLI Example : bash salt '*' ip. get_interface eth0
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/rh_ip.py
get_routes
def get_routes(iface): ''' Return the contents of the interface routes script. CLI Example: .. code-block:: bash salt '*' ip.get_routes eth0 ''' path = os.path.join(_RH_NETWORK_SCRIPT_DIR, 'route-{0}'.format(iface)) path6 = os.path.join(_RH_NETWORK_SCRIPT_DIR, 'route6-{0}'.format(...
python
def get_routes(iface): ''' Return the contents of the interface routes script. CLI Example: .. code-block:: bash salt '*' ip.get_routes eth0 ''' path = os.path.join(_RH_NETWORK_SCRIPT_DIR, 'route-{0}'.format(iface)) path6 = os.path.join(_RH_NETWORK_SCRIPT_DIR, 'route6-{0}'.format(...
[ "def", "get_routes", "(", "iface", ")", ":", "path", "=", "os", ".", "path", ".", "join", "(", "_RH_NETWORK_SCRIPT_DIR", ",", "'route-{0}'", ".", "format", "(", "iface", ")", ")", "path6", "=", "os", ".", "path", ".", "join", "(", "_RH_NETWORK_SCRIPT_DIR...
Return the contents of the interface routes script. CLI Example: .. code-block:: bash salt '*' ip.get_routes eth0
[ "Return", "the", "contents", "of", "the", "interface", "routes", "script", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rh_ip.py#L1193-L1207
train
Get the contents of the interface routes script.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/rh_ip.py
apply_network_settings
def apply_network_settings(**settings): ''' Apply global network configuration. CLI Example: .. code-block:: bash salt '*' ip.apply_network_settings ''' if 'require_reboot' not in settings: settings['require_reboot'] = False if 'apply_hostname' not in settings: se...
python
def apply_network_settings(**settings): ''' Apply global network configuration. CLI Example: .. code-block:: bash salt '*' ip.apply_network_settings ''' if 'require_reboot' not in settings: settings['require_reboot'] = False if 'apply_hostname' not in settings: se...
[ "def", "apply_network_settings", "(", "*", "*", "settings", ")", ":", "if", "'require_reboot'", "not", "in", "settings", ":", "settings", "[", "'require_reboot'", "]", "=", "False", "if", "'apply_hostname'", "not", "in", "settings", ":", "settings", "[", "'app...
Apply global network configuration. CLI Example: .. code-block:: bash salt '*' ip.apply_network_settings
[ "Apply", "global", "network", "configuration", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rh_ip.py#L1223-L1260
train
Apply global network configuration.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/rh_ip.py
build_network_settings
def build_network_settings(**settings): ''' Build the global network script. CLI Example: .. code-block:: bash salt '*' ip.build_network_settings <settings> ''' # Read current configuration and store default values current_network_settings = _parse_rh_config(_RH_NETWORK_FILE) ...
python
def build_network_settings(**settings): ''' Build the global network script. CLI Example: .. code-block:: bash salt '*' ip.build_network_settings <settings> ''' # Read current configuration and store default values current_network_settings = _parse_rh_config(_RH_NETWORK_FILE) ...
[ "def", "build_network_settings", "(", "*", "*", "settings", ")", ":", "# Read current configuration and store default values", "current_network_settings", "=", "_parse_rh_config", "(", "_RH_NETWORK_FILE", ")", "# Build settings", "opts", "=", "_parse_network_settings", "(", "...
Build the global network script. CLI Example: .. code-block:: bash salt '*' ip.build_network_settings <settings>
[ "Build", "the", "global", "network", "script", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rh_ip.py#L1263-L1291
train
Build the global network script.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/gnomedesktop.py
setIdleDelay
def setIdleDelay(delaySeconds, **kwargs): ''' Set the current idle delay setting in seconds CLI Example: .. code-block:: bash salt '*' gnome.setIdleDelay <seconds> user=<username> ''' _gsession = _GSettings(user=kwargs.get('user'), schema='org.gnome.desktop...
python
def setIdleDelay(delaySeconds, **kwargs): ''' Set the current idle delay setting in seconds CLI Example: .. code-block:: bash salt '*' gnome.setIdleDelay <seconds> user=<username> ''' _gsession = _GSettings(user=kwargs.get('user'), schema='org.gnome.desktop...
[ "def", "setIdleDelay", "(", "delaySeconds", ",", "*", "*", "kwargs", ")", ":", "_gsession", "=", "_GSettings", "(", "user", "=", "kwargs", ".", "get", "(", "'user'", ")", ",", "schema", "=", "'org.gnome.desktop.session'", ",", "key", "=", "'idle-delay'", "...
Set the current idle delay setting in seconds CLI Example: .. code-block:: bash salt '*' gnome.setIdleDelay <seconds> user=<username>
[ "Set", "the", "current", "idle", "delay", "setting", "in", "seconds" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/gnomedesktop.py#L144-L158
train
Sets the idle delay in seconds
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/gnomedesktop.py
setClockFormat
def setClockFormat(clockFormat, **kwargs): ''' Set the clock format, either 12h or 24h format. CLI Example: .. code-block:: bash salt '*' gnome.setClockFormat <12h|24h> user=<username> ''' if clockFormat != '12h' and clockFormat != '24h': return False _gsession = _GSettin...
python
def setClockFormat(clockFormat, **kwargs): ''' Set the clock format, either 12h or 24h format. CLI Example: .. code-block:: bash salt '*' gnome.setClockFormat <12h|24h> user=<username> ''' if clockFormat != '12h' and clockFormat != '24h': return False _gsession = _GSettin...
[ "def", "setClockFormat", "(", "clockFormat", ",", "*", "*", "kwargs", ")", ":", "if", "clockFormat", "!=", "'12h'", "and", "clockFormat", "!=", "'24h'", ":", "return", "False", "_gsession", "=", "_GSettings", "(", "user", "=", "kwargs", ".", "get", "(", ...
Set the clock format, either 12h or 24h format. CLI Example: .. code-block:: bash salt '*' gnome.setClockFormat <12h|24h> user=<username>
[ "Set", "the", "clock", "format", "either", "12h", "or", "24h", "format", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/gnomedesktop.py#L178-L194
train
Sets the clock format either 12h or 24h format.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/gnomedesktop.py
setClockShowDate
def setClockShowDate(kvalue, **kwargs): ''' Set whether the date is visible in the clock CLI Example: .. code-block:: bash salt '*' gnome.setClockShowDate <True|False> user=<username> ''' if kvalue is not True and kvalue is not False: return False _gsession = _GSettings(u...
python
def setClockShowDate(kvalue, **kwargs): ''' Set whether the date is visible in the clock CLI Example: .. code-block:: bash salt '*' gnome.setClockShowDate <True|False> user=<username> ''' if kvalue is not True and kvalue is not False: return False _gsession = _GSettings(u...
[ "def", "setClockShowDate", "(", "kvalue", ",", "*", "*", "kwargs", ")", ":", "if", "kvalue", "is", "not", "True", "and", "kvalue", "is", "not", "False", ":", "return", "False", "_gsession", "=", "_GSettings", "(", "user", "=", "kwargs", ".", "get", "("...
Set whether the date is visible in the clock CLI Example: .. code-block:: bash salt '*' gnome.setClockShowDate <True|False> user=<username>
[ "Set", "whether", "the", "date", "is", "visible", "in", "the", "clock" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/gnomedesktop.py#L214-L230
train
Sets the clock show date in the bash CLI Example
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/gnomedesktop.py
getIdleActivation
def getIdleActivation(**kwargs): ''' Get whether the idle activation is enabled CLI Example: .. code-block:: bash salt '*' gnome.getIdleActivation user=<username> ''' _gsession = _GSettings(user=kwargs.get('user'), schema='org.gnome.desktop.screensaver', ...
python
def getIdleActivation(**kwargs): ''' Get whether the idle activation is enabled CLI Example: .. code-block:: bash salt '*' gnome.getIdleActivation user=<username> ''' _gsession = _GSettings(user=kwargs.get('user'), schema='org.gnome.desktop.screensaver', ...
[ "def", "getIdleActivation", "(", "*", "*", "kwargs", ")", ":", "_gsession", "=", "_GSettings", "(", "user", "=", "kwargs", ".", "get", "(", "'user'", ")", ",", "schema", "=", "'org.gnome.desktop.screensaver'", ",", "key", "=", "'idle-activation-enabled'", ")",...
Get whether the idle activation is enabled CLI Example: .. code-block:: bash salt '*' gnome.getIdleActivation user=<username>
[ "Get", "whether", "the", "idle", "activation", "is", "enabled" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/gnomedesktop.py#L233-L247
train
Get whether idle activation is enabled
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/gnomedesktop.py
get
def get(schema=None, key=None, user=None, **kwargs): ''' Get key in a particular GNOME schema CLI Example: .. code-block:: bash salt '*' gnome.get user=<username> schema=org.gnome.desktop.screensaver key=idle-activation-enabled ''' _gsession = _GSettings(user=user, schema=schema, key...
python
def get(schema=None, key=None, user=None, **kwargs): ''' Get key in a particular GNOME schema CLI Example: .. code-block:: bash salt '*' gnome.get user=<username> schema=org.gnome.desktop.screensaver key=idle-activation-enabled ''' _gsession = _GSettings(user=user, schema=schema, key...
[ "def", "get", "(", "schema", "=", "None", ",", "key", "=", "None", ",", "user", "=", "None", ",", "*", "*", "kwargs", ")", ":", "_gsession", "=", "_GSettings", "(", "user", "=", "user", ",", "schema", "=", "schema", ",", "key", "=", "key", ")", ...
Get key in a particular GNOME schema CLI Example: .. code-block:: bash salt '*' gnome.get user=<username> schema=org.gnome.desktop.screensaver key=idle-activation-enabled
[ "Get", "key", "in", "a", "particular", "GNOME", "schema" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/gnomedesktop.py#L269-L281
train
Get a specific key in a particular GNOME schema
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/gnomedesktop.py
set_
def set_(schema=None, key=None, user=None, value=None, **kwargs): ''' Set key in a particular GNOME schema CLI Example: .. code-block:: bash salt '*' gnome.set user=<username> schema=org.gnome.desktop.screensaver key=idle-activation-enabled value=False ''' _gsession = _GSettings(user...
python
def set_(schema=None, key=None, user=None, value=None, **kwargs): ''' Set key in a particular GNOME schema CLI Example: .. code-block:: bash salt '*' gnome.set user=<username> schema=org.gnome.desktop.screensaver key=idle-activation-enabled value=False ''' _gsession = _GSettings(user...
[ "def", "set_", "(", "schema", "=", "None", ",", "key", "=", "None", ",", "user", "=", "None", ",", "value", "=", "None", ",", "*", "*", "kwargs", ")", ":", "_gsession", "=", "_GSettings", "(", "user", "=", "user", ",", "schema", "=", "schema", ",...
Set key in a particular GNOME schema CLI Example: .. code-block:: bash salt '*' gnome.set user=<username> schema=org.gnome.desktop.screensaver key=idle-activation-enabled value=False
[ "Set", "key", "in", "a", "particular", "GNOME", "schema" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/gnomedesktop.py#L284-L296
train
Set a key in a particular GNOME schema
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/gnomedesktop.py
_GSettings._get
def _get(self): ''' get the value for user in gsettings ''' user = self.USER try: uid = pwd.getpwnam(user).pw_uid except KeyError: log.info('User does not exist') return False cmd = self.gsetting_command + ['get', str(self.SCH...
python
def _get(self): ''' get the value for user in gsettings ''' user = self.USER try: uid = pwd.getpwnam(user).pw_uid except KeyError: log.info('User does not exist') return False cmd = self.gsetting_command + ['get', str(self.SCH...
[ "def", "_get", "(", "self", ")", ":", "user", "=", "self", ".", "USER", "try", ":", "uid", "=", "pwd", ".", "getpwnam", "(", "user", ")", ".", "pw_uid", "except", "KeyError", ":", "log", ".", "info", "(", "'User does not exist'", ")", "return", "Fals...
get the value for user in gsettings
[ "get", "the", "value", "for", "user", "in", "gsettings" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/gnomedesktop.py#L66-L89
train
get the value for user in gsettings
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/gnomedesktop.py
_GSettings._set
def _set(self, value): ''' set the value for user in gsettings ''' user = self.USER try: uid = pwd.getpwnam(user).pw_uid except KeyError: log.info('User does not exist') result = {} result['retcode'] = 1 result[...
python
def _set(self, value): ''' set the value for user in gsettings ''' user = self.USER try: uid = pwd.getpwnam(user).pw_uid except KeyError: log.info('User does not exist') result = {} result['retcode'] = 1 result[...
[ "def", "_set", "(", "self", ",", "value", ")", ":", "user", "=", "self", ".", "USER", "try", ":", "uid", "=", "pwd", ".", "getpwnam", "(", "user", ")", ".", "pw_uid", "except", "KeyError", ":", "log", ".", "info", "(", "'User does not exist'", ")", ...
set the value for user in gsettings
[ "set", "the", "value", "for", "user", "in", "gsettings" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/gnomedesktop.py#L91-L110
train
set the value for the user in gsettings
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/rpm_lowpkg.py
bin_pkg_info
def bin_pkg_info(path, saltenv='base'): ''' .. versionadded:: 2015.8.0 Parses RPM metadata and returns a dictionary of information about the package (name, version, etc.). path Path to the file. Can either be an absolute path to a file on the minion, or a salt fileserver URL (e.g. ...
python
def bin_pkg_info(path, saltenv='base'): ''' .. versionadded:: 2015.8.0 Parses RPM metadata and returns a dictionary of information about the package (name, version, etc.). path Path to the file. Can either be an absolute path to a file on the minion, or a salt fileserver URL (e.g. ...
[ "def", "bin_pkg_info", "(", "path", ",", "saltenv", "=", "'base'", ")", ":", "# If the path is a valid protocol, pull it down using cp.cache_file", "if", "__salt__", "[", "'config.valid_fileproto'", "]", "(", "path", ")", ":", "newpath", "=", "__salt__", "[", "'cp.cac...
.. versionadded:: 2015.8.0 Parses RPM metadata and returns a dictionary of information about the package (name, version, etc.). path Path to the file. Can either be an absolute path to a file on the minion, or a salt fileserver URL (e.g. ``salt://path/to/file.rpm``). If a salt file...
[ "..", "versionadded", "::", "2015", ".", "8", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rpm_lowpkg.py#L65-L128
train
Return a dictionary of information about the specified RPM package.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/rpm_lowpkg.py
list_pkgs
def list_pkgs(*packages, **kwargs): ''' List the packages currently installed in a dict:: {'<package_name>': '<version>'} root use root as top level directory (default: "/") CLI Example: .. code-block:: bash salt '*' lowpkg.list_pkgs ''' pkgs = {} cmd = ['rpm...
python
def list_pkgs(*packages, **kwargs): ''' List the packages currently installed in a dict:: {'<package_name>': '<version>'} root use root as top level directory (default: "/") CLI Example: .. code-block:: bash salt '*' lowpkg.list_pkgs ''' pkgs = {} cmd = ['rpm...
[ "def", "list_pkgs", "(", "*", "packages", ",", "*", "*", "kwargs", ")", ":", "pkgs", "=", "{", "}", "cmd", "=", "[", "'rpm'", "]", "if", "kwargs", ".", "get", "(", "'root'", ")", ":", "cmd", ".", "extend", "(", "[", "'--root'", ",", "kwargs", "...
List the packages currently installed in a dict:: {'<package_name>': '<version>'} root use root as top level directory (default: "/") CLI Example: .. code-block:: bash salt '*' lowpkg.list_pkgs
[ "List", "the", "packages", "currently", "installed", "in", "a", "dict", "::" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rpm_lowpkg.py#L131-L160
train
List the packages currently installed in a dict
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/rpm_lowpkg.py
verify
def verify(*packages, **kwargs): ''' Runs an rpm -Va on a system, and returns the results in a dict root use root as top level directory (default: "/") Files with an attribute of config, doc, ghost, license or readme in the package header can be ignored using the ``ignore_types`` keyword a...
python
def verify(*packages, **kwargs): ''' Runs an rpm -Va on a system, and returns the results in a dict root use root as top level directory (default: "/") Files with an attribute of config, doc, ghost, license or readme in the package header can be ignored using the ``ignore_types`` keyword a...
[ "def", "verify", "(", "*", "packages", ",", "*", "*", "kwargs", ")", ":", "ftypes", "=", "{", "'c'", ":", "'config'", ",", "'d'", ":", "'doc'", ",", "'g'", ":", "'ghost'", ",", "'l'", ":", "'license'", ",", "'r'", ":", "'readme'", "}", "ret", "="...
Runs an rpm -Va on a system, and returns the results in a dict root use root as top level directory (default: "/") Files with an attribute of config, doc, ghost, license or readme in the package header can be ignored using the ``ignore_types`` keyword argument CLI Example: .. code-block:...
[ "Runs", "an", "rpm", "-", "Va", "on", "a", "system", "and", "returns", "the", "results", "in", "a", "dict" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rpm_lowpkg.py#L163-L262
train
Runs an rpm - Va on a system and returns the results in a dict
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/rpm_lowpkg.py
modified
def modified(*packages, **flags): ''' List the modified files that belong to a package. Not specifying any packages will return a list of _all_ modified files on the system's RPM database. .. versionadded:: 2015.5.0 root use root as top level directory (default: "/") CLI examples: ...
python
def modified(*packages, **flags): ''' List the modified files that belong to a package. Not specifying any packages will return a list of _all_ modified files on the system's RPM database. .. versionadded:: 2015.5.0 root use root as top level directory (default: "/") CLI examples: ...
[ "def", "modified", "(", "*", "packages", ",", "*", "*", "flags", ")", ":", "cmd", "=", "[", "'rpm'", "]", "if", "flags", ".", "get", "(", "'root'", ")", ":", "cmd", ".", "extend", "(", "[", "'--root'", ",", "flags", ".", "pop", "(", "'root'", "...
List the modified files that belong to a package. Not specifying any packages will return a list of _all_ modified files on the system's RPM database. .. versionadded:: 2015.5.0 root use root as top level directory (default: "/") CLI examples: .. code-block:: bash salt '*' lowpk...
[ "List", "the", "modified", "files", "that", "belong", "to", "a", "package", ".", "Not", "specifying", "any", "packages", "will", "return", "a", "list", "of", "_all_", "modified", "files", "on", "the", "system", "s", "RPM", "database", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rpm_lowpkg.py#L265-L340
train
Return a list of modified files that belong to a package on the system s RPM database.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/rpm_lowpkg.py
file_list
def file_list(*packages, **kwargs): ''' List the files that belong to a package. Not specifying any packages will return a list of _every_ file on the system's rpm database (not generally recommended). root use root as top level directory (default: "/") CLI Examples: .. code-block...
python
def file_list(*packages, **kwargs): ''' List the files that belong to a package. Not specifying any packages will return a list of _every_ file on the system's rpm database (not generally recommended). root use root as top level directory (default: "/") CLI Examples: .. code-block...
[ "def", "file_list", "(", "*", "packages", ",", "*", "*", "kwargs", ")", ":", "cmd", "=", "[", "'rpm'", "]", "if", "kwargs", ".", "get", "(", "'root'", ")", ":", "cmd", ".", "extend", "(", "[", "'--root'", ",", "kwargs", "[", "'root'", "]", "]", ...
List the files that belong to a package. Not specifying any packages will return a list of _every_ file on the system's rpm database (not generally recommended). root use root as top level directory (default: "/") CLI Examples: .. code-block:: bash salt '*' lowpkg.file_list httpd...
[ "List", "the", "files", "that", "belong", "to", "a", "package", ".", "Not", "specifying", "any", "packages", "will", "return", "a", "list", "of", "_every_", "file", "on", "the", "system", "s", "rpm", "database", "(", "not", "generally", "recommended", ")",...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rpm_lowpkg.py#L343-L373
train
List the files that belong to a package.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/rpm_lowpkg.py
file_dict
def file_dict(*packages, **kwargs): ''' List the files that belong to a package, sorted by group. Not specifying any packages will return a list of _every_ file on the system's rpm database (not generally recommended). root use root as top level directory (default: "/") CLI Examples: ...
python
def file_dict(*packages, **kwargs): ''' List the files that belong to a package, sorted by group. Not specifying any packages will return a list of _every_ file on the system's rpm database (not generally recommended). root use root as top level directory (default: "/") CLI Examples: ...
[ "def", "file_dict", "(", "*", "packages", ",", "*", "*", "kwargs", ")", ":", "errors", "=", "[", "]", "ret", "=", "{", "}", "pkgs", "=", "{", "}", "cmd", "=", "[", "'rpm'", "]", "if", "kwargs", ".", "get", "(", "'root'", ")", ":", "cmd", ".",...
List the files that belong to a package, sorted by group. Not specifying any packages will return a list of _every_ file on the system's rpm database (not generally recommended). root use root as top level directory (default: "/") CLI Examples: .. code-block:: bash salt '*' lowpk...
[ "List", "the", "files", "that", "belong", "to", "a", "package", "sorted", "by", "group", ".", "Not", "specifying", "any", "packages", "will", "return", "a", "list", "of", "_every_", "file", "on", "the", "system", "s", "rpm", "database", "(", "not", "gene...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rpm_lowpkg.py#L376-L420
train
Return a dict of all files in a package
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/rpm_lowpkg.py
owner
def owner(*paths, **kwargs): ''' Return the name of the package that owns the file. Multiple file paths can be passed. If a single path is passed, a string will be returned, and if multiple paths are passed, a dictionary of file/package name pairs will be returned. If the file is not owned by a...
python
def owner(*paths, **kwargs): ''' Return the name of the package that owns the file. Multiple file paths can be passed. If a single path is passed, a string will be returned, and if multiple paths are passed, a dictionary of file/package name pairs will be returned. If the file is not owned by a...
[ "def", "owner", "(", "*", "paths", ",", "*", "*", "kwargs", ")", ":", "if", "not", "paths", ":", "return", "''", "ret", "=", "{", "}", "for", "path", "in", "paths", ":", "cmd", "=", "[", "'rpm'", "]", "if", "kwargs", ".", "get", "(", "'root'", ...
Return the name of the package that owns the file. Multiple file paths can be passed. If a single path is passed, a string will be returned, and if multiple paths are passed, a dictionary of file/package name pairs will be returned. If the file is not owned by a package, or is not present on the minion...
[ "Return", "the", "name", "of", "the", "package", "that", "owns", "the", "file", ".", "Multiple", "file", "paths", "can", "be", "passed", ".", "If", "a", "single", "path", "is", "passed", "a", "string", "will", "be", "returned", "and", "if", "multiple", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rpm_lowpkg.py#L423-L458
train
Return the name of the package that owns the file.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/rpm_lowpkg.py
diff
def diff(package_path, path): ''' Return a formatted diff between current file and original in a package. NOTE: this function includes all files (configuration and not), but does not work on binary content. :param package: Full pack of the RPM file :param path: Full path to the installed file ...
python
def diff(package_path, path): ''' Return a formatted diff between current file and original in a package. NOTE: this function includes all files (configuration and not), but does not work on binary content. :param package: Full pack of the RPM file :param path: Full path to the installed file ...
[ "def", "diff", "(", "package_path", ",", "path", ")", ":", "cmd", "=", "\"rpm2cpio {0} \"", "\"| cpio -i --quiet --to-stdout .{1} \"", "\"| diff -u --label 'A {1}' --from-file=- --label 'B {1}' {1}\"", "res", "=", "__salt__", "[", "'cmd.shell'", "]", "(", "cmd", ".", "for...
Return a formatted diff between current file and original in a package. NOTE: this function includes all files (configuration and not), but does not work on binary content. :param package: Full pack of the RPM file :param path: Full path to the installed file :return: Difference or empty string. Fo...
[ "Return", "a", "formatted", "diff", "between", "current", "file", "and", "original", "in", "a", "package", ".", "NOTE", ":", "this", "function", "includes", "all", "files", "(", "configuration", "and", "not", ")", "but", "does", "not", "work", "on", "binar...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rpm_lowpkg.py#L464-L490
train
Return a formatted diff between current file and original file in a package.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/rpm_lowpkg.py
info
def info(*packages, **kwargs): ''' Return a detailed package(s) summary information. If no packages specified, all packages will be returned. :param packages: :param attr: Comma-separated package attributes. If no 'attr' is specified, all available attributes returned. Valid attri...
python
def info(*packages, **kwargs): ''' Return a detailed package(s) summary information. If no packages specified, all packages will be returned. :param packages: :param attr: Comma-separated package attributes. If no 'attr' is specified, all available attributes returned. Valid attri...
[ "def", "info", "(", "*", "packages", ",", "*", "*", "kwargs", ")", ":", "all_versions", "=", "kwargs", ".", "get", "(", "'all_versions'", ",", "False", ")", "# LONGSIZE is not a valid tag for all versions of rpm. If LONGSIZE isn't", "# available, then we can just use SIZE...
Return a detailed package(s) summary information. If no packages specified, all packages will be returned. :param packages: :param attr: Comma-separated package attributes. If no 'attr' is specified, all available attributes returned. Valid attributes are: version, vendor, rel...
[ "Return", "a", "detailed", "package", "(", "s", ")", "summary", "information", ".", "If", "no", "packages", "specified", "all", "packages", "will", "be", "returned", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rpm_lowpkg.py#L493-L674
train
Return a detailed version of the specified packages.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/rpm_lowpkg.py
version_cmp
def version_cmp(ver1, ver2, ignore_epoch=False): ''' .. versionadded:: 2015.8.9 Do a cmp-style comparison on two packages. Return -1 if ver1 < ver2, 0 if ver1 == ver2, and 1 if ver1 > ver2. Return None if there was a problem making the comparison. ignore_epoch : False Set to ``True`` t...
python
def version_cmp(ver1, ver2, ignore_epoch=False): ''' .. versionadded:: 2015.8.9 Do a cmp-style comparison on two packages. Return -1 if ver1 < ver2, 0 if ver1 == ver2, and 1 if ver1 > ver2. Return None if there was a problem making the comparison. ignore_epoch : False Set to ``True`` t...
[ "def", "version_cmp", "(", "ver1", ",", "ver2", ",", "ignore_epoch", "=", "False", ")", ":", "normalize", "=", "lambda", "x", ":", "six", ".", "text_type", "(", "x", ")", ".", "split", "(", "':'", ",", "1", ")", "[", "-", "1", "]", "if", "ignore_...
.. versionadded:: 2015.8.9 Do a cmp-style comparison on two packages. Return -1 if ver1 < ver2, 0 if ver1 == ver2, and 1 if ver1 > ver2. Return None if there was a problem making the comparison. ignore_epoch : False Set to ``True`` to ignore the epoch when comparing versions .. versio...
[ "..", "versionadded", "::", "2015", ".", "8", ".", "9" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rpm_lowpkg.py#L677-L791
train
Compare two versions of a single resource item.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/rpm_lowpkg.py
checksum
def checksum(*paths, **kwargs): ''' Return if the signature of a RPM file is valid. root use root as top level directory (default: "/") CLI Example: .. code-block:: bash salt '*' lowpkg.checksum /path/to/package1.rpm salt '*' lowpkg.checksum /path/to/package1.rpm /path/to...
python
def checksum(*paths, **kwargs): ''' Return if the signature of a RPM file is valid. root use root as top level directory (default: "/") CLI Example: .. code-block:: bash salt '*' lowpkg.checksum /path/to/package1.rpm salt '*' lowpkg.checksum /path/to/package1.rpm /path/to...
[ "def", "checksum", "(", "*", "paths", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "dict", "(", ")", "if", "not", "paths", ":", "raise", "CommandExecutionError", "(", "\"No package files has been specified.\"", ")", "cmd", "=", "[", "'rpm'", "]", "if", ...
Return if the signature of a RPM file is valid. root use root as top level directory (default: "/") CLI Example: .. code-block:: bash salt '*' lowpkg.checksum /path/to/package1.rpm salt '*' lowpkg.checksum /path/to/package1.rpm /path/to/package2.rpm
[ "Return", "if", "the", "signature", "of", "a", "RPM", "file", "is", "valid", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rpm_lowpkg.py#L794-L825
train
Return if the signature of a RPM file is valid.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/haproxyconn.py
_get_conn
def _get_conn(socket=DEFAULT_SOCKET_URL): ''' Get connection to haproxy socket. ''' assert os.path.exists(socket), '{0} does not exist.'.format(socket) issock = os.stat(socket).st_mode assert stat.S_ISSOCK(issock), '{0} is not a socket.'.format(socket) ha_conn = haproxy.conn.HaPConn(socket) ...
python
def _get_conn(socket=DEFAULT_SOCKET_URL): ''' Get connection to haproxy socket. ''' assert os.path.exists(socket), '{0} does not exist.'.format(socket) issock = os.stat(socket).st_mode assert stat.S_ISSOCK(issock), '{0} is not a socket.'.format(socket) ha_conn = haproxy.conn.HaPConn(socket) ...
[ "def", "_get_conn", "(", "socket", "=", "DEFAULT_SOCKET_URL", ")", ":", "assert", "os", ".", "path", ".", "exists", "(", "socket", ")", ",", "'{0} does not exist.'", ".", "format", "(", "socket", ")", "issock", "=", "os", ".", "stat", "(", "socket", ")",...
Get connection to haproxy socket.
[ "Get", "connection", "to", "haproxy", "socket", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/haproxyconn.py#L44-L52
train
Get connection to haproxy socket.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/haproxyconn.py
list_servers
def list_servers(backend, socket=DEFAULT_SOCKET_URL, objectify=False): ''' List servers in haproxy backend. backend haproxy backend socket haproxy stats socket, default ``/var/run/haproxy.sock`` CLI Example: .. code-block:: bash salt '*' haproxy.list_servers mysql ...
python
def list_servers(backend, socket=DEFAULT_SOCKET_URL, objectify=False): ''' List servers in haproxy backend. backend haproxy backend socket haproxy stats socket, default ``/var/run/haproxy.sock`` CLI Example: .. code-block:: bash salt '*' haproxy.list_servers mysql ...
[ "def", "list_servers", "(", "backend", ",", "socket", "=", "DEFAULT_SOCKET_URL", ",", "objectify", "=", "False", ")", ":", "ha_conn", "=", "_get_conn", "(", "socket", ")", "ha_cmd", "=", "haproxy", ".", "cmds", ".", "listServers", "(", "backend", "=", "bac...
List servers in haproxy backend. backend haproxy backend socket haproxy stats socket, default ``/var/run/haproxy.sock`` CLI Example: .. code-block:: bash salt '*' haproxy.list_servers mysql
[ "List", "servers", "in", "haproxy", "backend", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/haproxyconn.py#L55-L73
train
List all servers in a backend
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/haproxyconn.py
enable_server
def enable_server(name, backend, socket=DEFAULT_SOCKET_URL): ''' Enable Server in haproxy name Server to enable backend haproxy backend, or all backends if "*" is supplied socket haproxy stats socket, default ``/var/run/haproxy.sock`` CLI Example: .. code-block::...
python
def enable_server(name, backend, socket=DEFAULT_SOCKET_URL): ''' Enable Server in haproxy name Server to enable backend haproxy backend, or all backends if "*" is supplied socket haproxy stats socket, default ``/var/run/haproxy.sock`` CLI Example: .. code-block::...
[ "def", "enable_server", "(", "name", ",", "backend", ",", "socket", "=", "DEFAULT_SOCKET_URL", ")", ":", "if", "backend", "==", "'*'", ":", "backends", "=", "show_backends", "(", "socket", "=", "socket", ")", ".", "split", "(", "'\\n'", ")", "else", ":",...
Enable Server in haproxy name Server to enable backend haproxy backend, or all backends if "*" is supplied socket haproxy stats socket, default ``/var/run/haproxy.sock`` CLI Example: .. code-block:: bash salt '*' haproxy.enable_server web1.example.com www
[ "Enable", "Server", "in", "haproxy" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/haproxyconn.py#L158-L190
train
Enable a server in haproxy backend
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/haproxyconn.py
get_weight
def get_weight(name, backend, socket=DEFAULT_SOCKET_URL): ''' Get server weight name Server name backend haproxy backend socket haproxy stats socket, default ``/var/run/haproxy.sock`` CLI Example: .. code-block:: bash salt '*' haproxy.get_weight web1.exa...
python
def get_weight(name, backend, socket=DEFAULT_SOCKET_URL): ''' Get server weight name Server name backend haproxy backend socket haproxy stats socket, default ``/var/run/haproxy.sock`` CLI Example: .. code-block:: bash salt '*' haproxy.get_weight web1.exa...
[ "def", "get_weight", "(", "name", ",", "backend", ",", "socket", "=", "DEFAULT_SOCKET_URL", ")", ":", "ha_conn", "=", "_get_conn", "(", "socket", ")", "ha_cmd", "=", "haproxy", ".", "cmds", ".", "getWeight", "(", "server", "=", "name", ",", "backend", "=...
Get server weight name Server name backend haproxy backend socket haproxy stats socket, default ``/var/run/haproxy.sock`` CLI Example: .. code-block:: bash salt '*' haproxy.get_weight web1.example.com www
[ "Get", "server", "weight" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/haproxyconn.py#L228-L249
train
Get server weight
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/haproxyconn.py
set_state
def set_state(name, backend, state, socket=DEFAULT_SOCKET_URL): ''' Force a server's administrative state to a new state. This can be useful to disable load balancing and/or any traffic to a server. Setting the state to "ready" puts the server in normal mode, and the command is the equivalent of the...
python
def set_state(name, backend, state, socket=DEFAULT_SOCKET_URL): ''' Force a server's administrative state to a new state. This can be useful to disable load balancing and/or any traffic to a server. Setting the state to "ready" puts the server in normal mode, and the command is the equivalent of the...
[ "def", "set_state", "(", "name", ",", "backend", ",", "state", ",", "socket", "=", "DEFAULT_SOCKET_URL", ")", ":", "# Pulling this in from the latest 0.5 release which is not yet in PyPi.", "# https://github.com/neurogeek/haproxyctl", "class", "setServerState", "(", "haproxy", ...
Force a server's administrative state to a new state. This can be useful to disable load balancing and/or any traffic to a server. Setting the state to "ready" puts the server in normal mode, and the command is the equivalent of the "enable server" command. Setting the state to "maint" disables any traffic ...
[ "Force", "a", "server", "s", "administrative", "state", "to", "a", "new", "state", ".", "This", "can", "be", "useful", "to", "disable", "load", "balancing", "and", "/", "or", "any", "traffic", "to", "a", "server", ".", "Setting", "the", "state", "to", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/haproxyconn.py#L280-L320
train
Force a server s administrative state to a new state.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/haproxyconn.py
show_frontends
def show_frontends(socket=DEFAULT_SOCKET_URL): ''' Show HaProxy frontends socket haproxy stats socket, default ``/var/run/haproxy.sock`` CLI Example: .. code-block:: bash salt '*' haproxy.show_frontends ''' ha_conn = _get_conn(socket) ha_cmd = haproxy.cmds.showFronten...
python
def show_frontends(socket=DEFAULT_SOCKET_URL): ''' Show HaProxy frontends socket haproxy stats socket, default ``/var/run/haproxy.sock`` CLI Example: .. code-block:: bash salt '*' haproxy.show_frontends ''' ha_conn = _get_conn(socket) ha_cmd = haproxy.cmds.showFronten...
[ "def", "show_frontends", "(", "socket", "=", "DEFAULT_SOCKET_URL", ")", ":", "ha_conn", "=", "_get_conn", "(", "socket", ")", "ha_cmd", "=", "haproxy", ".", "cmds", ".", "showFrontends", "(", ")", "return", "ha_conn", ".", "sendCmd", "(", "ha_cmd", ")" ]
Show HaProxy frontends socket haproxy stats socket, default ``/var/run/haproxy.sock`` CLI Example: .. code-block:: bash salt '*' haproxy.show_frontends
[ "Show", "HaProxy", "frontends" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/haproxyconn.py#L323-L338
train
Show HaProxy frontends
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/haproxyconn.py
show_backends
def show_backends(socket=DEFAULT_SOCKET_URL): ''' Show HaProxy Backends socket haproxy stats socket, default ``/var/run/haproxy.sock`` CLI Example: .. code-block:: bash salt '*' haproxy.show_backends ''' ha_conn = _get_conn(socket) ha_cmd = haproxy.cmds.showBackends()...
python
def show_backends(socket=DEFAULT_SOCKET_URL): ''' Show HaProxy Backends socket haproxy stats socket, default ``/var/run/haproxy.sock`` CLI Example: .. code-block:: bash salt '*' haproxy.show_backends ''' ha_conn = _get_conn(socket) ha_cmd = haproxy.cmds.showBackends()...
[ "def", "show_backends", "(", "socket", "=", "DEFAULT_SOCKET_URL", ")", ":", "ha_conn", "=", "_get_conn", "(", "socket", ")", "ha_cmd", "=", "haproxy", ".", "cmds", ".", "showBackends", "(", ")", "return", "ha_conn", ".", "sendCmd", "(", "ha_cmd", ")" ]
Show HaProxy Backends socket haproxy stats socket, default ``/var/run/haproxy.sock`` CLI Example: .. code-block:: bash salt '*' haproxy.show_backends
[ "Show", "HaProxy", "Backends" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/haproxyconn.py#L358-L373
train
Show HaProxy Backends
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/haproxyconn.py
get_sessions
def get_sessions(name, backend, socket=DEFAULT_SOCKET_URL): ''' .. versionadded:: 2016.11.0 Get number of current sessions on server in backend (scur) name Server name backend haproxy backend socket haproxy stats socket, default ``/var/run/haproxy.sock`` CLI Exam...
python
def get_sessions(name, backend, socket=DEFAULT_SOCKET_URL): ''' .. versionadded:: 2016.11.0 Get number of current sessions on server in backend (scur) name Server name backend haproxy backend socket haproxy stats socket, default ``/var/run/haproxy.sock`` CLI Exam...
[ "def", "get_sessions", "(", "name", ",", "backend", ",", "socket", "=", "DEFAULT_SOCKET_URL", ")", ":", "class", "getStats", "(", "haproxy", ".", "cmds", ".", "Cmd", ")", ":", "p_args", "=", "[", "\"backend\"", ",", "\"server\"", "]", "cmdTxt", "=", "\"s...
.. versionadded:: 2016.11.0 Get number of current sessions on server in backend (scur) name Server name backend haproxy backend socket haproxy stats socket, default ``/var/run/haproxy.sock`` CLI Example: .. code-block:: bash salt '*' haproxy.get_sessions we...
[ "..", "versionadded", "::", "2016", ".", "11", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/haproxyconn.py#L402-L435
train
Get number of current sessions on a server in a backend
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/beacon.py
present
def present(name, save=False, **kwargs): ''' Ensure beacon is configured with the included beacon data. Args: name (str): The name of the beacon ensure is configured. save (bool): ``True`` updates the beacons.conf. Default is ``False``. ...
python
def present(name, save=False, **kwargs): ''' Ensure beacon is configured with the included beacon data. Args: name (str): The name of the beacon ensure is configured. save (bool): ``True`` updates the beacons.conf. Default is ``False``. ...
[ "def", "present", "(", "name", ",", "save", "=", "False", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "True", ",", "'changes'", ":", "{", "}", ",", "'comment'", ":", "[", "]", "}", "current_bea...
Ensure beacon is configured with the included beacon data. Args: name (str): The name of the beacon ensure is configured. save (bool): ``True`` updates the beacons.conf. Default is ``False``. Returns: dict: A dictionary of information about the results of the ...
[ "Ensure", "beacon", "is", "configured", "with", "the", "included", "beacon", "data", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/beacon.py#L80-L160
train
Ensure that the given beacon is present in the state of the given beacon.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/netscaler.py
_connect
def _connect(**kwargs): ''' Initialise netscaler connection ''' connargs = dict() # Shamelessy ripped from the mysql module def __connarg(name, key=None, default=None): ''' Add key to connargs, only if name exists in our kwargs or as netscaler.<name> in __opts__ or __pil...
python
def _connect(**kwargs): ''' Initialise netscaler connection ''' connargs = dict() # Shamelessy ripped from the mysql module def __connarg(name, key=None, default=None): ''' Add key to connargs, only if name exists in our kwargs or as netscaler.<name> in __opts__ or __pil...
[ "def", "_connect", "(", "*", "*", "kwargs", ")", ":", "connargs", "=", "dict", "(", ")", "# Shamelessy ripped from the mysql module", "def", "__connarg", "(", "name", ",", "key", "=", "None", ",", "default", "=", "None", ")", ":", "'''\n Add key to conn...
Initialise netscaler connection
[ "Initialise", "netscaler", "connection" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/netscaler.py#L89-L132
train
Connect to the mysql module and return the connection 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/netscaler.py
_servicegroup_get
def _servicegroup_get(sg_name, **connection_args): ''' Return a service group ressource or None ''' nitro = _connect(**connection_args) if nitro is None: return None sg = NSServiceGroup() sg.set_servicegroupname(sg_name) try: sg = NSServiceGroup.get(nitro, sg) except ...
python
def _servicegroup_get(sg_name, **connection_args): ''' Return a service group ressource or None ''' nitro = _connect(**connection_args) if nitro is None: return None sg = NSServiceGroup() sg.set_servicegroupname(sg_name) try: sg = NSServiceGroup.get(nitro, sg) except ...
[ "def", "_servicegroup_get", "(", "sg_name", ",", "*", "*", "connection_args", ")", ":", "nitro", "=", "_connect", "(", "*", "*", "connection_args", ")", "if", "nitro", "is", "None", ":", "return", "None", "sg", "=", "NSServiceGroup", "(", ")", "sg", ".",...
Return a service group ressource or None
[ "Return", "a", "service", "group", "ressource", "or", "None" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/netscaler.py#L144-L159
train
Get a service group ressource or 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/netscaler.py
_servicegroup_get_servers
def _servicegroup_get_servers(sg_name, **connection_args): ''' Returns a list of members of a servicegroup or None ''' nitro = _connect(**connection_args) if nitro is None: return None sg = NSServiceGroup() sg.set_servicegroupname(sg_name) try: sg = NSServiceGroup.get_ser...
python
def _servicegroup_get_servers(sg_name, **connection_args): ''' Returns a list of members of a servicegroup or None ''' nitro = _connect(**connection_args) if nitro is None: return None sg = NSServiceGroup() sg.set_servicegroupname(sg_name) try: sg = NSServiceGroup.get_ser...
[ "def", "_servicegroup_get_servers", "(", "sg_name", ",", "*", "*", "connection_args", ")", ":", "nitro", "=", "_connect", "(", "*", "*", "connection_args", ")", "if", "nitro", "is", "None", ":", "return", "None", "sg", "=", "NSServiceGroup", "(", ")", "sg"...
Returns a list of members of a servicegroup or None
[ "Returns", "a", "list", "of", "members", "of", "a", "servicegroup", "or", "None" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/netscaler.py#L162-L177
train
Returns a list of members of a servicegroup or None if the servicegroup does not 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/modules/netscaler.py
_servicegroup_get_server
def _servicegroup_get_server(sg_name, s_name, s_port=None, **connection_args): ''' Returns a member of a service group or None ''' ret = None servers = _servicegroup_get_servers(sg_name, **connection_args) if servers is None: return None for server in servers: if server.get_s...
python
def _servicegroup_get_server(sg_name, s_name, s_port=None, **connection_args): ''' Returns a member of a service group or None ''' ret = None servers = _servicegroup_get_servers(sg_name, **connection_args) if servers is None: return None for server in servers: if server.get_s...
[ "def", "_servicegroup_get_server", "(", "sg_name", ",", "s_name", ",", "s_port", "=", "None", ",", "*", "*", "connection_args", ")", ":", "ret", "=", "None", "servers", "=", "_servicegroup_get_servers", "(", "sg_name", ",", "*", "*", "connection_args", ")", ...
Returns a member of a service group or None
[ "Returns", "a", "member", "of", "a", "service", "group", "or", "None" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/netscaler.py#L180-L193
train
Returns a member of a service group or None if it does not 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/modules/netscaler.py
servicegroup_exists
def servicegroup_exists(sg_name, sg_type=None, **connection_args): ''' Checks if a service group exists CLI Example: .. code-block:: bash salt '*' netscaler.servicegroup_exists 'serviceGroupName' ''' sg = _servicegroup_get(sg_name, **connection_args) if sg is None: return ...
python
def servicegroup_exists(sg_name, sg_type=None, **connection_args): ''' Checks if a service group exists CLI Example: .. code-block:: bash salt '*' netscaler.servicegroup_exists 'serviceGroupName' ''' sg = _servicegroup_get(sg_name, **connection_args) if sg is None: return ...
[ "def", "servicegroup_exists", "(", "sg_name", ",", "sg_type", "=", "None", ",", "*", "*", "connection_args", ")", ":", "sg", "=", "_servicegroup_get", "(", "sg_name", ",", "*", "*", "connection_args", ")", "if", "sg", "is", "None", ":", "return", "False", ...
Checks if a service group exists CLI Example: .. code-block:: bash salt '*' netscaler.servicegroup_exists 'serviceGroupName'
[ "Checks", "if", "a", "service", "group", "exists" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/netscaler.py#L196-L211
train
Checks if a service group exists
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/netscaler.py
servicegroup_add
def servicegroup_add(sg_name, sg_type='HTTP', **connection_args): ''' Add a new service group If no service type is specified, HTTP will be used. Most common service types: HTTP, SSL, and SSL_BRIDGE CLI Example: .. code-block:: bash salt '*' netscaler.servicegroup_add 'serviceGroupNam...
python
def servicegroup_add(sg_name, sg_type='HTTP', **connection_args): ''' Add a new service group If no service type is specified, HTTP will be used. Most common service types: HTTP, SSL, and SSL_BRIDGE CLI Example: .. code-block:: bash salt '*' netscaler.servicegroup_add 'serviceGroupNam...
[ "def", "servicegroup_add", "(", "sg_name", ",", "sg_type", "=", "'HTTP'", ",", "*", "*", "connection_args", ")", ":", "ret", "=", "True", "if", "servicegroup_exists", "(", "sg_name", ")", ":", "return", "False", "nitro", "=", "_connect", "(", "*", "*", "...
Add a new service group If no service type is specified, HTTP will be used. Most common service types: HTTP, SSL, and SSL_BRIDGE CLI Example: .. code-block:: bash salt '*' netscaler.servicegroup_add 'serviceGroupName' salt '*' netscaler.servicegroup_add 'serviceGroupName' 'serviceGrou...
[ "Add", "a", "new", "service", "group", "If", "no", "service", "type", "is", "specified", "HTTP", "will", "be", "used", ".", "Most", "common", "service", "types", ":", "HTTP", "SSL", "and", "SSL_BRIDGE" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/netscaler.py#L214-L242
train
Add a new service group to the current service group.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/netscaler.py
servicegroup_delete
def servicegroup_delete(sg_name, **connection_args): ''' Delete a new service group CLI Example: .. code-block:: bash salt '*' netscaler.servicegroup_delete 'serviceGroupName' ''' ret = True sg = _servicegroup_get(sg_name, **connection_args) if sg is None: return False...
python
def servicegroup_delete(sg_name, **connection_args): ''' Delete a new service group CLI Example: .. code-block:: bash salt '*' netscaler.servicegroup_delete 'serviceGroupName' ''' ret = True sg = _servicegroup_get(sg_name, **connection_args) if sg is None: return False...
[ "def", "servicegroup_delete", "(", "sg_name", ",", "*", "*", "connection_args", ")", ":", "ret", "=", "True", "sg", "=", "_servicegroup_get", "(", "sg_name", ",", "*", "*", "connection_args", ")", "if", "sg", "is", "None", ":", "return", "False", "nitro", ...
Delete a new service group CLI Example: .. code-block:: bash salt '*' netscaler.servicegroup_delete 'serviceGroupName'
[ "Delete", "a", "new", "service", "group" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/netscaler.py#L245-L268
train
Delete a service group
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/netscaler.py
servicegroup_server_exists
def servicegroup_server_exists(sg_name, s_name, s_port=None, **connection_args): ''' Check if a server:port combination is a member of a servicegroup CLI Example: .. code-block:: bash salt '*' netscaler.servicegroup_server_exists 'serviceGroupName' 'serverName' 'serverPort' ''' return...
python
def servicegroup_server_exists(sg_name, s_name, s_port=None, **connection_args): ''' Check if a server:port combination is a member of a servicegroup CLI Example: .. code-block:: bash salt '*' netscaler.servicegroup_server_exists 'serviceGroupName' 'serverName' 'serverPort' ''' return...
[ "def", "servicegroup_server_exists", "(", "sg_name", ",", "s_name", ",", "s_port", "=", "None", ",", "*", "*", "connection_args", ")", ":", "return", "_servicegroup_get_server", "(", "sg_name", ",", "s_name", ",", "s_port", ",", "*", "*", "connection_args", ")...
Check if a server:port combination is a member of a servicegroup CLI Example: .. code-block:: bash salt '*' netscaler.servicegroup_server_exists 'serviceGroupName' 'serverName' 'serverPort'
[ "Check", "if", "a", "server", ":", "port", "combination", "is", "a", "member", "of", "a", "servicegroup" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/netscaler.py#L271-L281
train
Check if a server exists in a servicegroup
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/netscaler.py
servicegroup_server_up
def servicegroup_server_up(sg_name, s_name, s_port, **connection_args): ''' Check if a server:port combination is in state UP in a servicegroup CLI Example: .. code-block:: bash salt '*' netscaler.servicegroup_server_up 'serviceGroupName' 'serverName' 'serverPort' ''' server = _servic...
python
def servicegroup_server_up(sg_name, s_name, s_port, **connection_args): ''' Check if a server:port combination is in state UP in a servicegroup CLI Example: .. code-block:: bash salt '*' netscaler.servicegroup_server_up 'serviceGroupName' 'serverName' 'serverPort' ''' server = _servic...
[ "def", "servicegroup_server_up", "(", "sg_name", ",", "s_name", ",", "s_port", ",", "*", "*", "connection_args", ")", ":", "server", "=", "_servicegroup_get_server", "(", "sg_name", ",", "s_name", ",", "s_port", ",", "*", "*", "connection_args", ")", "return",...
Check if a server:port combination is in state UP in a servicegroup CLI Example: .. code-block:: bash salt '*' netscaler.servicegroup_server_up 'serviceGroupName' 'serverName' 'serverPort'
[ "Check", "if", "a", "server", ":", "port", "combination", "is", "in", "state", "UP", "in", "a", "servicegroup" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/netscaler.py#L284-L295
train
Check if a server is up in a servicegroup
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/netscaler.py
servicegroup_server_enable
def servicegroup_server_enable(sg_name, s_name, s_port, **connection_args): ''' Enable a server:port member of a servicegroup CLI Example: .. code-block:: bash salt '*' netscaler.servicegroup_server_enable 'serviceGroupName' 'serverName' 'serverPort' ''' ret = True server = _servi...
python
def servicegroup_server_enable(sg_name, s_name, s_port, **connection_args): ''' Enable a server:port member of a servicegroup CLI Example: .. code-block:: bash salt '*' netscaler.servicegroup_server_enable 'serviceGroupName' 'serverName' 'serverPort' ''' ret = True server = _servi...
[ "def", "servicegroup_server_enable", "(", "sg_name", ",", "s_name", ",", "s_port", ",", "*", "*", "connection_args", ")", ":", "ret", "=", "True", "server", "=", "_servicegroup_get_server", "(", "sg_name", ",", "s_name", ",", "s_port", ",", "*", "*", "connec...
Enable a server:port member of a servicegroup CLI Example: .. code-block:: bash salt '*' netscaler.servicegroup_server_enable 'serviceGroupName' 'serverName' 'serverPort'
[ "Enable", "a", "server", ":", "port", "member", "of", "a", "servicegroup" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/netscaler.py#L298-L321
train
Enable a server port member of a servicegroup
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/netscaler.py
servicegroup_server_add
def servicegroup_server_add(sg_name, s_name, s_port, **connection_args): ''' Add a server:port member to a servicegroup CLI Example: .. code-block:: bash salt '*' netscaler.servicegroup_server_add 'serviceGroupName' 'serverName' 'serverPort' ''' # Nitro will throw an error if the serv...
python
def servicegroup_server_add(sg_name, s_name, s_port, **connection_args): ''' Add a server:port member to a servicegroup CLI Example: .. code-block:: bash salt '*' netscaler.servicegroup_server_add 'serviceGroupName' 'serverName' 'serverPort' ''' # Nitro will throw an error if the serv...
[ "def", "servicegroup_server_add", "(", "sg_name", ",", "s_name", ",", "s_port", ",", "*", "*", "connection_args", ")", ":", "# Nitro will throw an error if the server is already present", "ret", "=", "True", "server", "=", "_servicegroup_get_server", "(", "sg_name", ","...
Add a server:port member to a servicegroup CLI Example: .. code-block:: bash salt '*' netscaler.servicegroup_server_add 'serviceGroupName' 'serverName' 'serverPort'
[ "Add", "a", "server", ":", "port", "member", "to", "a", "servicegroup" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/netscaler.py#L350-L378
train
Add a server to a servicegroup
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/netscaler.py
_service_get
def _service_get(s_name, **connection_args): ''' Returns a service ressource or None ''' nitro = _connect(**connection_args) if nitro is None: return None service = NSService() service.set_name(s_name) try: service = NSService.get(nitro, service) except NSNitroError a...
python
def _service_get(s_name, **connection_args): ''' Returns a service ressource or None ''' nitro = _connect(**connection_args) if nitro is None: return None service = NSService() service.set_name(s_name) try: service = NSService.get(nitro, service) except NSNitroError a...
[ "def", "_service_get", "(", "s_name", ",", "*", "*", "connection_args", ")", ":", "nitro", "=", "_connect", "(", "*", "*", "connection_args", ")", "if", "nitro", "is", "None", ":", "return", "None", "service", "=", "NSService", "(", ")", "service", ".", ...
Returns a service ressource or None
[ "Returns", "a", "service", "ressource", "or", "None" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/netscaler.py#L412-L427
train
Returns a service ressource or None if no service ressource exists
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/netscaler.py
service_up
def service_up(s_name, **connection_args): ''' Checks if a service is UP CLI Example: .. code-block:: bash salt '*' netscaler.service_up 'serviceName' ''' service = _service_get(s_name, **connection_args) return service is not None and service.get_svrstate() == 'UP'
python
def service_up(s_name, **connection_args): ''' Checks if a service is UP CLI Example: .. code-block:: bash salt '*' netscaler.service_up 'serviceName' ''' service = _service_get(s_name, **connection_args) return service is not None and service.get_svrstate() == 'UP'
[ "def", "service_up", "(", "s_name", ",", "*", "*", "connection_args", ")", ":", "service", "=", "_service_get", "(", "s_name", ",", "*", "*", "connection_args", ")", "return", "service", "is", "not", "None", "and", "service", ".", "get_svrstate", "(", ")",...
Checks if a service is UP CLI Example: .. code-block:: bash salt '*' netscaler.service_up 'serviceName'
[ "Checks", "if", "a", "service", "is", "UP" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/netscaler.py#L443-L454
train
Checks if a service is UP
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/netscaler.py
service_enable
def service_enable(s_name, **connection_args): ''' Enable a service CLI Example: .. code-block:: bash salt '*' netscaler.service_enable 'serviceName' ''' ret = True service = _service_get(s_name, **connection_args) if service is None: return False nitro = _connect...
python
def service_enable(s_name, **connection_args): ''' Enable a service CLI Example: .. code-block:: bash salt '*' netscaler.service_enable 'serviceName' ''' ret = True service = _service_get(s_name, **connection_args) if service is None: return False nitro = _connect...
[ "def", "service_enable", "(", "s_name", ",", "*", "*", "connection_args", ")", ":", "ret", "=", "True", "service", "=", "_service_get", "(", "s_name", ",", "*", "*", "connection_args", ")", "if", "service", "is", "None", ":", "return", "False", "nitro", ...
Enable a service CLI Example: .. code-block:: bash salt '*' netscaler.service_enable 'serviceName'
[ "Enable", "a", "service" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/netscaler.py#L457-L481
train
Enable a service by name CLI Example : bash service_enable serviceName
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/netscaler.py
service_disable
def service_disable(s_name, s_delay=None, **connection_args): ''' Disable a service CLI Example: .. code-block:: bash salt '*' netscaler.service_disable 'serviceName' salt '*' netscaler.service_disable 'serviceName' 'delayInSeconds' ''' ret = True service = _service_get(s_...
python
def service_disable(s_name, s_delay=None, **connection_args): ''' Disable a service CLI Example: .. code-block:: bash salt '*' netscaler.service_disable 'serviceName' salt '*' netscaler.service_disable 'serviceName' 'delayInSeconds' ''' ret = True service = _service_get(s_...
[ "def", "service_disable", "(", "s_name", ",", "s_delay", "=", "None", ",", "*", "*", "connection_args", ")", ":", "ret", "=", "True", "service", "=", "_service_get", "(", "s_name", ",", "*", "*", "connection_args", ")", "if", "service", "is", "None", ":"...
Disable a service CLI Example: .. code-block:: bash salt '*' netscaler.service_disable 'serviceName' salt '*' netscaler.service_disable 'serviceName' 'delayInSeconds'
[ "Disable", "a", "service" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/netscaler.py#L484-L510
train
Disable a service by name
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/netscaler.py
server_exists
def server_exists(s_name, ip=None, s_state=None, **connection_args): ''' Checks if a server exists CLI Example: .. code-block:: bash salt '*' netscaler.server_exists 'serverName' ''' server = _server_get(s_name, **connection_args) if server is None: return False if ip ...
python
def server_exists(s_name, ip=None, s_state=None, **connection_args): ''' Checks if a server exists CLI Example: .. code-block:: bash salt '*' netscaler.server_exists 'serverName' ''' server = _server_get(s_name, **connection_args) if server is None: return False if ip ...
[ "def", "server_exists", "(", "s_name", ",", "ip", "=", "None", ",", "s_state", "=", "None", ",", "*", "*", "connection_args", ")", ":", "server", "=", "_server_get", "(", "s_name", ",", "*", "*", "connection_args", ")", "if", "server", "is", "None", ":...
Checks if a server exists CLI Example: .. code-block:: bash salt '*' netscaler.server_exists 'serverName'
[ "Checks", "if", "a", "server", "exists" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/netscaler.py#L528-L545
train
Checks if a server exists in the cluster
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/netscaler.py
server_add
def server_add(s_name, s_ip, s_state=None, **connection_args): ''' Add a server Note: The default server state is ENABLED CLI Example: .. code-block:: bash salt '*' netscaler.server_add 'serverName' 'serverIpAddress' salt '*' netscaler.server_add 'serverName' 'serverIpAddress' 'se...
python
def server_add(s_name, s_ip, s_state=None, **connection_args): ''' Add a server Note: The default server state is ENABLED CLI Example: .. code-block:: bash salt '*' netscaler.server_add 'serverName' 'serverIpAddress' salt '*' netscaler.server_add 'serverName' 'serverIpAddress' 'se...
[ "def", "server_add", "(", "s_name", ",", "s_ip", ",", "s_state", "=", "None", ",", "*", "*", "connection_args", ")", ":", "ret", "=", "True", "if", "server_exists", "(", "s_name", ",", "*", "*", "connection_args", ")", ":", "return", "False", "nitro", ...
Add a server Note: The default server state is ENABLED CLI Example: .. code-block:: bash salt '*' netscaler.server_add 'serverName' 'serverIpAddress' salt '*' netscaler.server_add 'serverName' 'serverIpAddress' 'serverState'
[ "Add", "a", "server", "Note", ":", "The", "default", "server", "state", "is", "ENABLED" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/netscaler.py#L548-L577
train
Add a server to the cluster
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/netscaler.py
server_delete
def server_delete(s_name, **connection_args): ''' Delete a server CLI Example: .. code-block:: bash salt '*' netscaler.server_delete 'serverName' ''' ret = True server = _server_get(s_name, **connection_args) if server is None: return False nitro = _connect(**conne...
python
def server_delete(s_name, **connection_args): ''' Delete a server CLI Example: .. code-block:: bash salt '*' netscaler.server_delete 'serverName' ''' ret = True server = _server_get(s_name, **connection_args) if server is None: return False nitro = _connect(**conne...
[ "def", "server_delete", "(", "s_name", ",", "*", "*", "connection_args", ")", ":", "ret", "=", "True", "server", "=", "_server_get", "(", "s_name", ",", "*", "*", "connection_args", ")", "if", "server", "is", "None", ":", "return", "False", "nitro", "=",...
Delete a server CLI Example: .. code-block:: bash salt '*' netscaler.server_delete 'serverName'
[ "Delete", "a", "server" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/netscaler.py#L580-L603
train
Delete a server by name CLI Example : bash server_delete serverName
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/netscaler.py
server_update
def server_update(s_name, s_ip, **connection_args): ''' Update a server's attributes CLI Example: .. code-block:: bash salt '*' netscaler.server_update 'serverName' 'serverIP' ''' altered = False cur_server = _server_get(s_name, **connection_args) if cur_server is None: ...
python
def server_update(s_name, s_ip, **connection_args): ''' Update a server's attributes CLI Example: .. code-block:: bash salt '*' netscaler.server_update 'serverName' 'serverIP' ''' altered = False cur_server = _server_get(s_name, **connection_args) if cur_server is None: ...
[ "def", "server_update", "(", "s_name", ",", "s_ip", ",", "*", "*", "connection_args", ")", ":", "altered", "=", "False", "cur_server", "=", "_server_get", "(", "s_name", ",", "*", "*", "connection_args", ")", "if", "cur_server", "is", "None", ":", "return"...
Update a server's attributes CLI Example: .. code-block:: bash salt '*' netscaler.server_update 'serverName' 'serverIP'
[ "Update", "a", "server", "s", "attributes" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/netscaler.py#L606-L639
train
Update a server s attributes with a new IP address.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/netscaler.py
server_enabled
def server_enabled(s_name, **connection_args): ''' Check if a server is enabled globally CLI Example: .. code-block:: bash salt '*' netscaler.server_enabled 'serverName' ''' server = _server_get(s_name, **connection_args) return server is not None and server.get_state() == 'ENABLE...
python
def server_enabled(s_name, **connection_args): ''' Check if a server is enabled globally CLI Example: .. code-block:: bash salt '*' netscaler.server_enabled 'serverName' ''' server = _server_get(s_name, **connection_args) return server is not None and server.get_state() == 'ENABLE...
[ "def", "server_enabled", "(", "s_name", ",", "*", "*", "connection_args", ")", ":", "server", "=", "_server_get", "(", "s_name", ",", "*", "*", "connection_args", ")", "return", "server", "is", "not", "None", "and", "server", ".", "get_state", "(", ")", ...
Check if a server is enabled globally CLI Example: .. code-block:: bash salt '*' netscaler.server_enabled 'serverName'
[ "Check", "if", "a", "server", "is", "enabled", "globally" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/netscaler.py#L642-L653
train
Check if a server is enabled globally CLI Example : bash . server_enabled serverName
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/netscaler.py
server_enable
def server_enable(s_name, **connection_args): ''' Enables a server globally CLI Example: .. code-block:: bash salt '*' netscaler.server_enable 'serverName' ''' ret = True server = _server_get(s_name, **connection_args) if server is None: return False if server.get_...
python
def server_enable(s_name, **connection_args): ''' Enables a server globally CLI Example: .. code-block:: bash salt '*' netscaler.server_enable 'serverName' ''' ret = True server = _server_get(s_name, **connection_args) if server is None: return False if server.get_...
[ "def", "server_enable", "(", "s_name", ",", "*", "*", "connection_args", ")", ":", "ret", "=", "True", "server", "=", "_server_get", "(", "s_name", ",", "*", "*", "connection_args", ")", "if", "server", "is", "None", ":", "return", "False", "if", "server...
Enables a server globally CLI Example: .. code-block:: bash salt '*' netscaler.server_enable 'serverName'
[ "Enables", "a", "server", "globally" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/netscaler.py#L656-L681
train
Enables a server globally CLI Example : bash . server_enable serverName
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/netscaler.py
vserver_exists
def vserver_exists(v_name, v_ip=None, v_port=None, v_type=None, **connection_args): ''' Checks if a vserver exists CLI Example: .. code-block:: bash salt '*' netscaler.vserver_exists 'vserverName' ''' vserver = _vserver_get(v_name, **connection_args) if vserver is None: re...
python
def vserver_exists(v_name, v_ip=None, v_port=None, v_type=None, **connection_args): ''' Checks if a vserver exists CLI Example: .. code-block:: bash salt '*' netscaler.vserver_exists 'vserverName' ''' vserver = _vserver_get(v_name, **connection_args) if vserver is None: re...
[ "def", "vserver_exists", "(", "v_name", ",", "v_ip", "=", "None", ",", "v_port", "=", "None", ",", "v_type", "=", "None", ",", "*", "*", "connection_args", ")", ":", "vserver", "=", "_vserver_get", "(", "v_name", ",", "*", "*", "connection_args", ")", ...
Checks if a vserver exists CLI Example: .. code-block:: bash salt '*' netscaler.vserver_exists 'vserverName'
[ "Checks", "if", "a", "vserver", "exists" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/netscaler.py#L727-L746
train
Checks if a vserver exists
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/netscaler.py
vserver_add
def vserver_add(v_name, v_ip, v_port, v_type, **connection_args): ''' Add a new lb vserver CLI Example: .. code-block:: bash salt '*' netscaler.vserver_add 'vserverName' 'vserverIP' 'vserverPort' 'vserverType' salt '*' netscaler.vserver_add 'alex.patate.chaude.443' '1.2.3.4' '443' 'SS...
python
def vserver_add(v_name, v_ip, v_port, v_type, **connection_args): ''' Add a new lb vserver CLI Example: .. code-block:: bash salt '*' netscaler.vserver_add 'vserverName' 'vserverIP' 'vserverPort' 'vserverType' salt '*' netscaler.vserver_add 'alex.patate.chaude.443' '1.2.3.4' '443' 'SS...
[ "def", "vserver_add", "(", "v_name", ",", "v_ip", ",", "v_port", ",", "v_type", ",", "*", "*", "connection_args", ")", ":", "ret", "=", "True", "if", "vserver_exists", "(", "v_name", ",", "*", "*", "connection_args", ")", ":", "return", "False", "nitro",...
Add a new lb vserver CLI Example: .. code-block:: bash salt '*' netscaler.vserver_add 'vserverName' 'vserverIP' 'vserverPort' 'vserverType' salt '*' netscaler.vserver_add 'alex.patate.chaude.443' '1.2.3.4' '443' 'SSL'
[ "Add", "a", "new", "lb", "vserver" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/netscaler.py#L749-L777
train
Adds a new lb vserver
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/netscaler.py
vserver_delete
def vserver_delete(v_name, **connection_args): ''' Delete a lb vserver CLI Example: .. code-block:: bash salt '*' netscaler.vserver_delete 'vserverName' ''' ret = True vserver = _vserver_get(v_name, **connection_args) if vserver is None: return False nitro = _conne...
python
def vserver_delete(v_name, **connection_args): ''' Delete a lb vserver CLI Example: .. code-block:: bash salt '*' netscaler.vserver_delete 'vserverName' ''' ret = True vserver = _vserver_get(v_name, **connection_args) if vserver is None: return False nitro = _conne...
[ "def", "vserver_delete", "(", "v_name", ",", "*", "*", "connection_args", ")", ":", "ret", "=", "True", "vserver", "=", "_vserver_get", "(", "v_name", ",", "*", "*", "connection_args", ")", "if", "vserver", "is", "None", ":", "return", "False", "nitro", ...
Delete a lb vserver CLI Example: .. code-block:: bash salt '*' netscaler.vserver_delete 'vserverName'
[ "Delete", "a", "lb", "vserver" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/netscaler.py#L780-L803
train
Delete a lb vserver
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/netscaler.py
vserver_servicegroup_add
def vserver_servicegroup_add(v_name, sg_name, **connection_args): ''' Bind a servicegroup to a vserver CLI Example: .. code-block:: bash salt '*' netscaler.vserver_servicegroup_add 'vserverName' 'serviceGroupName' ''' ret = True if vserver_servicegroup_exists(v_name, sg_name, **co...
python
def vserver_servicegroup_add(v_name, sg_name, **connection_args): ''' Bind a servicegroup to a vserver CLI Example: .. code-block:: bash salt '*' netscaler.vserver_servicegroup_add 'vserverName' 'serviceGroupName' ''' ret = True if vserver_servicegroup_exists(v_name, sg_name, **co...
[ "def", "vserver_servicegroup_add", "(", "v_name", ",", "sg_name", ",", "*", "*", "connection_args", ")", ":", "ret", "=", "True", "if", "vserver_servicegroup_exists", "(", "v_name", ",", "sg_name", ",", "*", "*", "connection_args", ")", ":", "return", "False",...
Bind a servicegroup to a vserver CLI Example: .. code-block:: bash salt '*' netscaler.vserver_servicegroup_add 'vserverName' 'serviceGroupName'
[ "Bind", "a", "servicegroup", "to", "a", "vserver" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/netscaler.py#L838-L863
train
Bind a servicegroup to a vserver
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/netscaler.py
vserver_sslcert_add
def vserver_sslcert_add(v_name, sc_name, **connection_args): ''' Binds a SSL certificate to a vserver CLI Example: .. code-block:: bash salt '*' netscaler.vserver_sslcert_add 'vserverName' 'sslCertificateName' ''' ret = True if vserver_sslcert_exists(v_name, sc_name, **connection_...
python
def vserver_sslcert_add(v_name, sc_name, **connection_args): ''' Binds a SSL certificate to a vserver CLI Example: .. code-block:: bash salt '*' netscaler.vserver_sslcert_add 'vserverName' 'sslCertificateName' ''' ret = True if vserver_sslcert_exists(v_name, sc_name, **connection_...
[ "def", "vserver_sslcert_add", "(", "v_name", ",", "sc_name", ",", "*", "*", "connection_args", ")", ":", "ret", "=", "True", "if", "vserver_sslcert_exists", "(", "v_name", ",", "sc_name", ",", "*", "*", "connection_args", ")", ":", "return", "False", "nitro"...
Binds a SSL certificate to a vserver CLI Example: .. code-block:: bash salt '*' netscaler.vserver_sslcert_add 'vserverName' 'sslCertificateName'
[ "Binds", "a", "SSL", "certificate", "to", "a", "vserver" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/netscaler.py#L925-L950
train
Adds a SSL certificate to a vserver
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/libcloud_dns.py
list_zones
def list_zones(profile): ''' List zones for the given profile :param profile: The profile key :type profile: ``str`` CLI Example: .. code-block:: bash salt myminion libcloud_dns.list_zones profile1 ''' conn = _get_driver(profile=profile) return [_simple_zone(zone) for zo...
python
def list_zones(profile): ''' List zones for the given profile :param profile: The profile key :type profile: ``str`` CLI Example: .. code-block:: bash salt myminion libcloud_dns.list_zones profile1 ''' conn = _get_driver(profile=profile) return [_simple_zone(zone) for zo...
[ "def", "list_zones", "(", "profile", ")", ":", "conn", "=", "_get_driver", "(", "profile", "=", "profile", ")", "return", "[", "_simple_zone", "(", "zone", ")", "for", "zone", "in", "conn", ".", "list_zones", "(", ")", "]" ]
List zones for the given profile :param profile: The profile key :type profile: ``str`` CLI Example: .. code-block:: bash salt myminion libcloud_dns.list_zones profile1
[ "List", "zones", "for", "the", "given", "profile" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/libcloud_dns.py#L103-L117
train
List zones for the given 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/libcloud_dns.py
list_records
def list_records(zone_id, profile, type=None): ''' List records for the given zone_id on the given profile :param zone_id: Zone to export. :type zone_id: ``str`` :param profile: The profile key :type profile: ``str`` :param type: The record type, e.g. A, NS :type type: ``str`` ...
python
def list_records(zone_id, profile, type=None): ''' List records for the given zone_id on the given profile :param zone_id: Zone to export. :type zone_id: ``str`` :param profile: The profile key :type profile: ``str`` :param type: The record type, e.g. A, NS :type type: ``str`` ...
[ "def", "list_records", "(", "zone_id", ",", "profile", ",", "type", "=", "None", ")", ":", "conn", "=", "_get_driver", "(", "profile", "=", "profile", ")", "zone", "=", "conn", ".", "get_zone", "(", "zone_id", ")", "if", "type", "is", "not", "None", ...
List records for the given zone_id on the given profile :param zone_id: Zone to export. :type zone_id: ``str`` :param profile: The profile key :type profile: ``str`` :param type: The record type, e.g. A, NS :type type: ``str`` CLI Example: .. code-block:: bash salt mymin...
[ "List", "records", "for", "the", "given", "zone_id", "on", "the", "given", "profile" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/libcloud_dns.py#L120-L144
train
List records for the given zone_id on the given 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/libcloud_dns.py
get_zone
def get_zone(zone_id, profile): ''' Get zone information for the given zone_id on the given profile :param zone_id: Zone to export. :type zone_id: ``str`` :param profile: The profile key :type profile: ``str`` CLI Example: .. code-block:: bash salt myminion libcloud_dns.ge...
python
def get_zone(zone_id, profile): ''' Get zone information for the given zone_id on the given profile :param zone_id: Zone to export. :type zone_id: ``str`` :param profile: The profile key :type profile: ``str`` CLI Example: .. code-block:: bash salt myminion libcloud_dns.ge...
[ "def", "get_zone", "(", "zone_id", ",", "profile", ")", ":", "conn", "=", "_get_driver", "(", "profile", "=", "profile", ")", "return", "_simple_zone", "(", "conn", ".", "get_zone", "(", "zone_id", ")", ")" ]
Get zone information for the given zone_id on the given profile :param zone_id: Zone to export. :type zone_id: ``str`` :param profile: The profile key :type profile: ``str`` CLI Example: .. code-block:: bash salt myminion libcloud_dns.get_zone google.com profile1
[ "Get", "zone", "information", "for", "the", "given", "zone_id", "on", "the", "given", "profile" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/libcloud_dns.py#L147-L164
train
Get zone information for the given zone_id on the given 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/libcloud_dns.py
get_record
def get_record(zone_id, record_id, profile): ''' Get record information for the given zone_id on the given profile :param zone_id: Zone to export. :type zone_id: ``str`` :param record_id: Record to delete. :type record_id: ``str`` :param profile: The profile key :type profile: ``st...
python
def get_record(zone_id, record_id, profile): ''' Get record information for the given zone_id on the given profile :param zone_id: Zone to export. :type zone_id: ``str`` :param record_id: Record to delete. :type record_id: ``str`` :param profile: The profile key :type profile: ``st...
[ "def", "get_record", "(", "zone_id", ",", "record_id", ",", "profile", ")", ":", "conn", "=", "_get_driver", "(", "profile", "=", "profile", ")", "return", "_simple_record", "(", "conn", ".", "get_record", "(", "zone_id", ",", "record_id", ")", ")" ]
Get record information for the given zone_id on the given profile :param zone_id: Zone to export. :type zone_id: ``str`` :param record_id: Record to delete. :type record_id: ``str`` :param profile: The profile key :type profile: ``str`` CLI Example: .. code-block:: bash ...
[ "Get", "record", "information", "for", "the", "given", "zone_id", "on", "the", "given", "profile" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/libcloud_dns.py#L167-L187
train
Get record information for the given zone_id on the given 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/libcloud_dns.py
create_zone
def create_zone(domain, profile, type='master', ttl=None): ''' Create a new zone. :param domain: Zone domain name (e.g. example.com) :type domain: ``str`` :param profile: The profile key :type profile: ``str`` :param type: Zone type (master / slave). :type type: ``str`` :param ...
python
def create_zone(domain, profile, type='master', ttl=None): ''' Create a new zone. :param domain: Zone domain name (e.g. example.com) :type domain: ``str`` :param profile: The profile key :type profile: ``str`` :param type: Zone type (master / slave). :type type: ``str`` :param ...
[ "def", "create_zone", "(", "domain", ",", "profile", ",", "type", "=", "'master'", ",", "ttl", "=", "None", ")", ":", "conn", "=", "_get_driver", "(", "profile", "=", "profile", ")", "zone", "=", "conn", ".", "create_record", "(", "domain", ",", "type"...
Create a new zone. :param domain: Zone domain name (e.g. example.com) :type domain: ``str`` :param profile: The profile key :type profile: ``str`` :param type: Zone type (master / slave). :type type: ``str`` :param ttl: TTL for new records. (optional) :type ttl: ``int`` CLI E...
[ "Create", "a", "new", "zone", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/libcloud_dns.py#L190-L214
train
Create a new zone.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/libcloud_dns.py
update_zone
def update_zone(zone_id, domain, profile, type='master', ttl=None): ''' Update an existing zone. :param zone_id: Zone ID to update. :type zone_id: ``str`` :param domain: Zone domain name (e.g. example.com) :type domain: ``str`` :param profile: The profile key :type profile: ``str``...
python
def update_zone(zone_id, domain, profile, type='master', ttl=None): ''' Update an existing zone. :param zone_id: Zone ID to update. :type zone_id: ``str`` :param domain: Zone domain name (e.g. example.com) :type domain: ``str`` :param profile: The profile key :type profile: ``str``...
[ "def", "update_zone", "(", "zone_id", ",", "domain", ",", "profile", ",", "type", "=", "'master'", ",", "ttl", "=", "None", ")", ":", "conn", "=", "_get_driver", "(", "profile", "=", "profile", ")", "zone", "=", "conn", ".", "get_zone", "(", "zone_id",...
Update an existing zone. :param zone_id: Zone ID to update. :type zone_id: ``str`` :param domain: Zone domain name (e.g. example.com) :type domain: ``str`` :param profile: The profile key :type profile: ``str`` :param type: Zone type (master / slave). :type type: ``str`` :pa...
[ "Update", "an", "existing", "zone", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/libcloud_dns.py#L217-L244
train
Update an existing zone.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...