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/states/module.py
_call_function
def _call_function(name, returner=None, **kwargs): ''' Calls a function from the specified module. :param name: :param kwargs: :return: ''' argspec = salt.utils.args.get_function_argspec(__salt__[name]) # func_kw is initialized to a dictionary of keyword arguments the function to be ru...
python
def _call_function(name, returner=None, **kwargs): ''' Calls a function from the specified module. :param name: :param kwargs: :return: ''' argspec = salt.utils.args.get_function_argspec(__salt__[name]) # func_kw is initialized to a dictionary of keyword arguments the function to be ru...
[ "def", "_call_function", "(", "name", ",", "returner", "=", "None", ",", "*", "*", "kwargs", ")", ":", "argspec", "=", "salt", ".", "utils", ".", "args", ".", "get_function_argspec", "(", "__salt__", "[", "name", "]", ")", "# func_kw is initialized to a dict...
Calls a function from the specified module. :param name: :param kwargs: :return:
[ "Calls", "a", "function", "from", "the", "specified", "module", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/module.py#L439-L496
train
Calls a function from the specified module.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/module.py
_run
def _run(name, **kwargs): ''' .. deprecated:: 2017.7.0 Function name stays the same, behaviour will change. Run a single module function ``name`` The module function to execute ``returner`` Specify the returner to send the return of the module execution to ``kwargs`` ...
python
def _run(name, **kwargs): ''' .. deprecated:: 2017.7.0 Function name stays the same, behaviour will change. Run a single module function ``name`` The module function to execute ``returner`` Specify the returner to send the return of the module execution to ``kwargs`` ...
[ "def", "_run", "(", "name", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'comment'", ":", "''", ",", "'result'", ":", "None", "}", "if", "name", "not", "in", "__salt__", ":", ...
.. deprecated:: 2017.7.0 Function name stays the same, behaviour will change. Run a single module function ``name`` The module function to execute ``returner`` Specify the returner to send the return of the module execution to ``kwargs`` Pass any arguments needed to ex...
[ "..", "deprecated", "::", "2017", ".", "7", ".", "0", "Function", "name", "stays", "the", "same", "behaviour", "will", "change", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/module.py#L499-L647
train
Execute a single module function
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/matchers/list_match.py
match
def match(tgt, opts=None): ''' Determines if this host is on the list ''' if not opts: opts = __opts__ try: if ',' + opts['id'] + ',' in tgt \ or tgt.startswith(opts['id'] + ',') \ or tgt.endswith(',' + opts['id']): return True # t...
python
def match(tgt, opts=None): ''' Determines if this host is on the list ''' if not opts: opts = __opts__ try: if ',' + opts['id'] + ',' in tgt \ or tgt.startswith(opts['id'] + ',') \ or tgt.endswith(',' + opts['id']): return True # t...
[ "def", "match", "(", "tgt", ",", "opts", "=", "None", ")", ":", "if", "not", "opts", ":", "opts", "=", "__opts__", "try", ":", "if", "','", "+", "opts", "[", "'id'", "]", "+", "','", "in", "tgt", "or", "tgt", ".", "startswith", "(", "opts", "["...
Determines if this host is on the list
[ "Determines", "if", "this", "host", "is", "on", "the", "list" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/matchers/list_match.py#L11-L42
train
Determines if this host is on the list
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/influxdb08mod.py
db_list
def db_list(user=None, password=None, host=None, port=None): ''' List all InfluxDB databases user The user to connect as password The password of the user host The host to connect to port The port to connect to CLI Example: .. code-block:: bash ...
python
def db_list(user=None, password=None, host=None, port=None): ''' List all InfluxDB databases user The user to connect as password The password of the user host The host to connect to port The port to connect to CLI Example: .. code-block:: bash ...
[ "def", "db_list", "(", "user", "=", "None", ",", "password", "=", "None", ",", "host", "=", "None", ",", "port", "=", "None", ")", ":", "client", "=", "_client", "(", "user", "=", "user", ",", "password", "=", "password", ",", "host", "=", "host", ...
List all InfluxDB databases user The user to connect as password The password of the user host The host to connect to port The port to connect to CLI Example: .. code-block:: bash salt '*' influxdb08.db_list salt '*' influxdb08.db_list <user...
[ "List", "all", "InfluxDB", "databases" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/influxdb08mod.py#L65-L90
train
List all InfluxDB databases in a single node
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/influxdb08mod.py
db_exists
def db_exists(name, user=None, password=None, host=None, port=None): ''' Checks if a database exists in Influxdb name Database name to create user The user to connect as password The password of the user host The host to connect to port The port t...
python
def db_exists(name, user=None, password=None, host=None, port=None): ''' Checks if a database exists in Influxdb name Database name to create user The user to connect as password The password of the user host The host to connect to port The port t...
[ "def", "db_exists", "(", "name", ",", "user", "=", "None", ",", "password", "=", "None", ",", "host", "=", "None", ",", "port", "=", "None", ")", ":", "dbs", "=", "db_list", "(", "user", ",", "password", ",", "host", ",", "port", ")", "if", "not"...
Checks if a database exists in Influxdb name Database name to create user The user to connect as password The password of the user host The host to connect to port The port to connect to CLI Example: .. code-block:: bash salt '*' influx...
[ "Checks", "if", "a", "database", "exists", "in", "Influxdb" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/influxdb08mod.py#L93-L122
train
Checks if a database exists in Influxdb
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/influxdb08mod.py
db_create
def db_create(name, user=None, password=None, host=None, port=None): ''' Create a database name Database name to create user The user to connect as password The password of the user host The host to connect to port The port to connect to CLI ...
python
def db_create(name, user=None, password=None, host=None, port=None): ''' Create a database name Database name to create user The user to connect as password The password of the user host The host to connect to port The port to connect to CLI ...
[ "def", "db_create", "(", "name", ",", "user", "=", "None", ",", "password", "=", "None", ",", "host", "=", "None", ",", "port", "=", "None", ")", ":", "if", "db_exists", "(", "name", ",", "user", ",", "password", ",", "host", ",", "port", ")", ":...
Create a database name Database name to create user The user to connect as password The password of the user host The host to connect to port The port to connect to CLI Example: .. code-block:: bash salt '*' influxdb08.db_create <name> ...
[ "Create", "a", "database" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/influxdb08mod.py#L125-L156
train
Create a database in the nclang
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/influxdb08mod.py
db_remove
def db_remove(name, user=None, password=None, host=None, port=None): ''' Remove a database name Database name to remove user The user to connect as password The password of the user host The host to connect to port The port to connect to CLI ...
python
def db_remove(name, user=None, password=None, host=None, port=None): ''' Remove a database name Database name to remove user The user to connect as password The password of the user host The host to connect to port The port to connect to CLI ...
[ "def", "db_remove", "(", "name", ",", "user", "=", "None", ",", "password", "=", "None", ",", "host", "=", "None", ",", "port", "=", "None", ")", ":", "if", "not", "db_exists", "(", "name", ",", "user", ",", "password", ",", "host", ",", "port", ...
Remove a database name Database name to remove user The user to connect as password The password of the user host The host to connect to port The port to connect to CLI Example: .. code-block:: bash salt '*' influxdb08.db_remove <name> ...
[ "Remove", "a", "database" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/influxdb08mod.py#L159-L189
train
Remove a database from the sequence of databases
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/influxdb08mod.py
user_list
def user_list(database=None, user=None, password=None, host=None, port=None): ''' List cluster admins or database users. If a database is specified: it will return database users list. If a database is not specified: it will return cluster admins list. database The database to list the use...
python
def user_list(database=None, user=None, password=None, host=None, port=None): ''' List cluster admins or database users. If a database is specified: it will return database users list. If a database is not specified: it will return cluster admins list. database The database to list the use...
[ "def", "user_list", "(", "database", "=", "None", ",", "user", "=", "None", ",", "password", "=", "None", ",", "host", "=", "None", ",", "port", "=", "None", ")", ":", "client", "=", "_client", "(", "user", "=", "user", ",", "password", "=", "passw...
List cluster admins or database users. If a database is specified: it will return database users list. If a database is not specified: it will return cluster admins list. database The database to list the users from user The user to connect as password The password of the...
[ "List", "cluster", "admins", "or", "database", "users", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/influxdb08mod.py#L192-L228
train
List cluster admins or database users.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/influxdb08mod.py
user_exists
def user_exists(name, database=None, user=None, password=None, host=None, port=None): ''' Checks if a cluster admin or database user exists. If a database is specified: it will check for database user existence. If a database is not specified: it will check for cluster admin existence. name ...
python
def user_exists(name, database=None, user=None, password=None, host=None, port=None): ''' Checks if a cluster admin or database user exists. If a database is specified: it will check for database user existence. If a database is not specified: it will check for cluster admin existence. name ...
[ "def", "user_exists", "(", "name", ",", "database", "=", "None", ",", "user", "=", "None", ",", "password", "=", "None", ",", "host", "=", "None", ",", "port", "=", "None", ")", ":", "users", "=", "user_list", "(", "database", ",", "user", ",", "pa...
Checks if a cluster admin or database user exists. If a database is specified: it will check for database user existence. If a database is not specified: it will check for cluster admin existence. name User name database The database to check for the user to exist user Th...
[ "Checks", "if", "a", "cluster", "admin", "or", "database", "user", "exists", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/influxdb08mod.py#L231-L277
train
Checks if a user exists in a database or admin.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/influxdb08mod.py
user_create
def user_create(name, passwd, database=None, user=None, password=None, host=None, port=None): ''' Create a cluster admin or a database user. If a database is specified: it will create database user. If a dat...
python
def user_create(name, passwd, database=None, user=None, password=None, host=None, port=None): ''' Create a cluster admin or a database user. If a database is specified: it will create database user. If a dat...
[ "def", "user_create", "(", "name", ",", "passwd", ",", "database", "=", "None", ",", "user", "=", "None", ",", "password", "=", "None", ",", "host", "=", "None", ",", "port", "=", "None", ")", ":", "if", "user_exists", "(", "name", ",", "database", ...
Create a cluster admin or a database user. If a database is specified: it will create database user. If a database is not specified: it will create a cluster admin. name User name for the new user to create passwd Password for the new user to create database The database ...
[ "Create", "a", "cluster", "admin", "or", "a", "database", "user", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/influxdb08mod.py#L280-L335
train
Create a new user in a cluster admin or a database user.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/influxdb08mod.py
user_chpass
def user_chpass(name, passwd, database=None, user=None, password=None, host=None, port=None): ''' Change password for a cluster admin or a database user. If a database is specified: it will update database user ...
python
def user_chpass(name, passwd, database=None, user=None, password=None, host=None, port=None): ''' Change password for a cluster admin or a database user. If a database is specified: it will update database user ...
[ "def", "user_chpass", "(", "name", ",", "passwd", ",", "database", "=", "None", ",", "user", "=", "None", ",", "password", "=", "None", ",", "host", "=", "None", ",", "port", "=", "None", ")", ":", "if", "not", "user_exists", "(", "name", ",", "dat...
Change password for a cluster admin or a database user. If a database is specified: it will update database user password. If a database is not specified: it will update cluster admin password. name User name for whom to change the password passwd New password database Th...
[ "Change", "password", "for", "a", "cluster", "admin", "or", "a", "database", "user", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/influxdb08mod.py#L338-L393
train
Change password for a user in a database or cluster admin.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/influxdb08mod.py
user_remove
def user_remove(name, database=None, user=None, password=None, host=None, port=None): ''' Remove a cluster admin or a database user. If a database is specified: it will remove the database user. If a database is not specifi...
python
def user_remove(name, database=None, user=None, password=None, host=None, port=None): ''' Remove a cluster admin or a database user. If a database is specified: it will remove the database user. If a database is not specifi...
[ "def", "user_remove", "(", "name", ",", "database", "=", "None", ",", "user", "=", "None", ",", "password", "=", "None", ",", "host", "=", "None", ",", "port", "=", "None", ")", ":", "if", "not", "user_exists", "(", "name", ",", "database", ",", "u...
Remove a cluster admin or a database user. If a database is specified: it will remove the database user. If a database is not specified: it will remove the cluster admin. name User name to remove database The database to remove the user from user User name for the new use...
[ "Remove", "a", "cluster", "admin", "or", "a", "database", "user", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/influxdb08mod.py#L396-L450
train
This function removes a user from a cluster admin or a database user.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/influxdb08mod.py
retention_policy_get
def retention_policy_get(database, name, user=None, password=None, host=None, port=None): ''' Get an existing retention policy. database The database to operate on. name...
python
def retention_policy_get(database, name, user=None, password=None, host=None, port=None): ''' Get an existing retention policy. database The database to operate on. name...
[ "def", "retention_policy_get", "(", "database", ",", "name", ",", "user", "=", "None", ",", "password", "=", "None", ",", "host", "=", "None", ",", "port", "=", "None", ")", ":", "client", "=", "_client", "(", "user", "=", "user", ",", "password", "=...
Get an existing retention policy. database The database to operate on. name Name of the policy to modify. CLI Example: .. code-block:: bash salt '*' influxdb08.retention_policy_get metrics default
[ "Get", "an", "existing", "retention", "policy", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/influxdb08mod.py#L453-L480
train
Get an existing retention policy.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/influxdb08mod.py
retention_policy_exists
def retention_policy_exists(database, name, user=None, password=None, host=None, port=None): ''' Check if a retention policy exists. database The database to o...
python
def retention_policy_exists(database, name, user=None, password=None, host=None, port=None): ''' Check if a retention policy exists. database The database to o...
[ "def", "retention_policy_exists", "(", "database", ",", "name", ",", "user", "=", "None", ",", "password", "=", "None", ",", "host", "=", "None", ",", "port", "=", "None", ")", ":", "policy", "=", "retention_policy_get", "(", "database", ",", "name", ","...
Check if a retention policy exists. database The database to operate on. name Name of the policy to modify. CLI Example: .. code-block:: bash salt '*' influxdb08.retention_policy_exists metrics default
[ "Check", "if", "a", "retention", "policy", "exists", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/influxdb08mod.py#L483-L505
train
Check if a retention policy 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/influxdb08mod.py
retention_policy_add
def retention_policy_add(database, name, duration, replication, default=False, user=None, password=None, host=None, port...
python
def retention_policy_add(database, name, duration, replication, default=False, user=None, password=None, host=None, port...
[ "def", "retention_policy_add", "(", "database", ",", "name", ",", "duration", ",", "replication", ",", "default", "=", "False", ",", "user", "=", "None", ",", "password", "=", "None", ",", "host", "=", "None", ",", "port", "=", "None", ")", ":", "clien...
Add a retention policy. database The database to operate on. name Name of the policy to modify. duration How long InfluxDB keeps the data. replication How many copies of the data are stored in the cluster. default Whether this policy should be the default...
[ "Add", "a", "retention", "policy", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/influxdb08mod.py#L508-L543
train
Adds a retention policy to an InfluxDB 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/influxdb08mod.py
retention_policy_alter
def retention_policy_alter(database, name, duration, replication, default=False, user=None, password=None, host=None, ...
python
def retention_policy_alter(database, name, duration, replication, default=False, user=None, password=None, host=None, ...
[ "def", "retention_policy_alter", "(", "database", ",", "name", ",", "duration", ",", "replication", ",", "default", "=", "False", ",", "user", "=", "None", ",", "password", "=", "None", ",", "host", "=", "None", ",", "port", "=", "None", ")", ":", "cli...
Modify an existing retention policy. database The database to operate on. name Name of the policy to modify. duration How long InfluxDB keeps the data. replication How many copies of the data are stored in the cluster. default Whether this policy should b...
[ "Modify", "an", "existing", "retention", "policy", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/influxdb08mod.py#L546-L581
train
Modify an existing retention policy.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/influxdb08mod.py
query
def query(database, query, time_precision='s', chunked=False, user=None, password=None, host=None, port=None): ''' Querying data database The database to query query Query to be executed time_precision T...
python
def query(database, query, time_precision='s', chunked=False, user=None, password=None, host=None, port=None): ''' Querying data database The database to query query Query to be executed time_precision T...
[ "def", "query", "(", "database", ",", "query", ",", "time_precision", "=", "'s'", ",", "chunked", "=", "False", ",", "user", "=", "None", ",", "password", "=", "None", ",", "host", "=", "None", ",", "port", "=", "None", ")", ":", "client", "=", "_c...
Querying data database The database to query query Query to be executed time_precision Time precision to use ('s', 'm', or 'u') chunked Whether is chunked or not user The user to connect as password The password of the user host ...
[ "Querying", "data" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/influxdb08mod.py#L584-L628
train
Query the database with the specified query
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/log/handlers/__init__.py
TemporaryLoggingHandler.sync_with_handlers
def sync_with_handlers(self, handlers=()): ''' Sync the stored log records to the provided log handlers. ''' if not handlers: return while self.__messages: record = self.__messages.pop(0) for handler in handlers: if handler.lev...
python
def sync_with_handlers(self, handlers=()): ''' Sync the stored log records to the provided log handlers. ''' if not handlers: return while self.__messages: record = self.__messages.pop(0) for handler in handlers: if handler.lev...
[ "def", "sync_with_handlers", "(", "self", ",", "handlers", "=", "(", ")", ")", ":", "if", "not", "handlers", ":", "return", "while", "self", ".", "__messages", ":", "record", "=", "self", ".", "__messages", ".", "pop", "(", "0", ")", "for", "handler", ...
Sync the stored log records to the provided log handlers.
[ "Sync", "the", "stored", "log", "records", "to", "the", "provided", "log", "handlers", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/log/handlers/__init__.py#L73-L87
train
Sync the stored log records to the provided log handlers.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/log/handlers/__init__.py
SysLogHandler.handleError
def handleError(self, record): ''' Override the default error handling mechanism for py3 Deal with syslog os errors when the log file does not exist ''' handled = False if sys.stderr and sys.version_info >= (3, 5, 4): t, v, tb = sys.exc_info() if t...
python
def handleError(self, record): ''' Override the default error handling mechanism for py3 Deal with syslog os errors when the log file does not exist ''' handled = False if sys.stderr and sys.version_info >= (3, 5, 4): t, v, tb = sys.exc_info() if t...
[ "def", "handleError", "(", "self", ",", "record", ")", ":", "handled", "=", "False", "if", "sys", ".", "stderr", "and", "sys", ".", "version_info", ">=", "(", "3", ",", "5", ",", "4", ")", ":", "t", ",", "v", ",", "tb", "=", "sys", ".", "exc_in...
Override the default error handling mechanism for py3 Deal with syslog os errors when the log file does not exist
[ "Override", "the", "default", "error", "handling", "mechanism", "for", "py3", "Deal", "with", "syslog", "os", "errors", "when", "the", "log", "file", "does", "not", "exist" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/log/handlers/__init__.py#L106-L119
train
Override the default error handling mechanism for py3 Deal with syslog os errors when the log file 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/log/handlers/__init__.py
RotatingFileHandler.handleError
def handleError(self, record): ''' Override the default error handling mechanism Deal with log file rotation errors due to log file in use more softly. ''' handled = False # Can't use "salt.utils.platform.is_windows()" in this file if (sys.platform.start...
python
def handleError(self, record): ''' Override the default error handling mechanism Deal with log file rotation errors due to log file in use more softly. ''' handled = False # Can't use "salt.utils.platform.is_windows()" in this file if (sys.platform.start...
[ "def", "handleError", "(", "self", ",", "record", ")", ":", "handled", "=", "False", "# Can't use \"salt.utils.platform.is_windows()\" in this file", "if", "(", "sys", ".", "platform", ".", "startswith", "(", "'win'", ")", "and", "logging", ".", "raiseExceptions", ...
Override the default error handling mechanism Deal with log file rotation errors due to log file in use more softly.
[ "Override", "the", "default", "error", "handling", "mechanism" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/log/handlers/__init__.py#L126-L155
train
Override the default error handling mechanism xid Deal with log file rotation errors due to log file in use xid more softly.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/beacons/status.py
beacon
def beacon(config): ''' Return status for requested information ''' log.debug(config) ctime = datetime.datetime.utcnow().isoformat() if not config: config = [{ 'loadavg': ['all'], 'cpustats': ['all'], 'meminfo': ['all'], 'vmstats': ['all']...
python
def beacon(config): ''' Return status for requested information ''' log.debug(config) ctime = datetime.datetime.utcnow().isoformat() if not config: config = [{ 'loadavg': ['all'], 'cpustats': ['all'], 'meminfo': ['all'], 'vmstats': ['all']...
[ "def", "beacon", "(", "config", ")", ":", "log", ".", "debug", "(", "config", ")", "ctime", "=", "datetime", ".", "datetime", ".", "utcnow", "(", ")", ".", "isoformat", "(", ")", "if", "not", "config", ":", "config", "=", "[", "{", "'loadavg'", ":"...
Return status for requested information
[ "Return", "status", "for", "requested", "information" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/beacons/status.py#L119-L168
train
Return status for requested information
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/sysctl.py
present
def present(name, value, config=None): ''' Ensure that the named sysctl value is set in memory and persisted to the named configuration file. The default sysctl configuration file is /etc/sysctl.conf name The name of the sysctl value to edit value The sysctl value to apply ...
python
def present(name, value, config=None): ''' Ensure that the named sysctl value is set in memory and persisted to the named configuration file. The default sysctl configuration file is /etc/sysctl.conf name The name of the sysctl value to edit value The sysctl value to apply ...
[ "def", "present", "(", "name", ",", "value", ",", "config", "=", "None", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "True", ",", "'changes'", ":", "{", "}", ",", "'comment'", ":", "''", "}", "if", "config", "is", "Non...
Ensure that the named sysctl value is set in memory and persisted to the named configuration file. The default sysctl configuration file is /etc/sysctl.conf name The name of the sysctl value to edit value The sysctl value to apply config The location of the sysctl configur...
[ "Ensure", "that", "the", "named", "sysctl", "value", "is", "set", "in", "memory", "and", "persisted", "to", "the", "named", "configuration", "file", ".", "The", "default", "sysctl", "configuration", "file", "is", "/", "etc", "/", "sysctl", ".", "conf" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/sysctl.py#L33-L131
train
Ensure that the named sysctl value is set in memory and persisted to the named sysctl configuration 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/grains/opts.py
opts
def opts(): ''' Return the minion configuration settings ''' if __opts__.get('grain_opts', False) or \ (isinstance(__pillar__, dict) and __pillar__.get('grain_opts', False)): return __opts__ return {}
python
def opts(): ''' Return the minion configuration settings ''' if __opts__.get('grain_opts', False) or \ (isinstance(__pillar__, dict) and __pillar__.get('grain_opts', False)): return __opts__ return {}
[ "def", "opts", "(", ")", ":", "if", "__opts__", ".", "get", "(", "'grain_opts'", ",", "False", ")", "or", "(", "isinstance", "(", "__pillar__", ",", "dict", ")", "and", "__pillar__", ".", "get", "(", "'grain_opts'", ",", "False", ")", ")", ":", "retu...
Return the minion configuration settings
[ "Return", "the", "minion", "configuration", "settings" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/grains/opts.py#L9-L16
train
Return the minion configuration settings
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/freebsd_update.py
_cmd
def _cmd(**kwargs): ''' .. versionadded:: 2016.3.4 Private function that returns the freebsd-update command string to be executed. It checks if any arguments are given to freebsd-update and appends them accordingly. ''' update_cmd = salt.utils.path.which('freebsd-update') if not update_...
python
def _cmd(**kwargs): ''' .. versionadded:: 2016.3.4 Private function that returns the freebsd-update command string to be executed. It checks if any arguments are given to freebsd-update and appends them accordingly. ''' update_cmd = salt.utils.path.which('freebsd-update') if not update_...
[ "def", "_cmd", "(", "*", "*", "kwargs", ")", ":", "update_cmd", "=", "salt", ".", "utils", ".", "path", ".", "which", "(", "'freebsd-update'", ")", "if", "not", "update_cmd", ":", "raise", "CommandNotFoundError", "(", "'\"freebsd-update\" command not found'", ...
.. versionadded:: 2016.3.4 Private function that returns the freebsd-update command string to be executed. It checks if any arguments are given to freebsd-update and appends them accordingly.
[ "..", "versionadded", "::", "2016", ".", "3", ".", "4" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/freebsd_update.py#L45-L77
train
Private function that returns the freebsd - update command string to be executed. It checks if any arguments are given to freebsd - update and appends them accordingly.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/freebsd_update.py
_wrapper
def _wrapper(orig, pre='', post='', err_=None, run_args=None, **kwargs): ''' Helper function that wraps the execution of freebsd-update command. orig: Originating function that called _wrapper(). pre: String that will be prepended to freebsd-update command. post: String th...
python
def _wrapper(orig, pre='', post='', err_=None, run_args=None, **kwargs): ''' Helper function that wraps the execution of freebsd-update command. orig: Originating function that called _wrapper(). pre: String that will be prepended to freebsd-update command. post: String th...
[ "def", "_wrapper", "(", "orig", ",", "pre", "=", "''", ",", "post", "=", "''", ",", "err_", "=", "None", ",", "run_args", "=", "None", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "''", "# the message to be returned", "cmd", "=", "_cmd", "(", "*"...
Helper function that wraps the execution of freebsd-update command. orig: Originating function that called _wrapper(). pre: String that will be prepended to freebsd-update command. post: String that will be appended to freebsd-update command. err_: Dictionary on which...
[ "Helper", "function", "that", "wraps", "the", "execution", "of", "freebsd", "-", "update", "command", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/freebsd_update.py#L80-L123
train
Wrapper function that wraps the execution of freebsd - update command and returns the output of the command.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/freebsd_update.py
fetch
def fetch(**kwargs): ''' .. versionadded:: 2016.3.4 freebsd-update fetch wrapper. Based on the currently installed world and the configuration options set, fetch all available binary updates. kwargs: Parameters of freebsd-update command. ''' # fetch continues when no controlling te...
python
def fetch(**kwargs): ''' .. versionadded:: 2016.3.4 freebsd-update fetch wrapper. Based on the currently installed world and the configuration options set, fetch all available binary updates. kwargs: Parameters of freebsd-update command. ''' # fetch continues when no controlling te...
[ "def", "fetch", "(", "*", "*", "kwargs", ")", ":", "# fetch continues when no controlling terminal is present", "pre", "=", "''", "post", "=", "''", "run_args", "=", "{", "}", "if", "float", "(", "__grains__", "[", "'osrelease'", "]", ")", ">=", "10.2", ":",...
.. versionadded:: 2016.3.4 freebsd-update fetch wrapper. Based on the currently installed world and the configuration options set, fetch all available binary updates. kwargs: Parameters of freebsd-update command.
[ "..", "versionadded", "::", "2016", ".", "3", ".", "4" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/freebsd_update.py#L126-L145
train
Wrapper for the freebsd - update fetch function.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/freebsd_update.py
update
def update(**kwargs): ''' .. versionadded:: 2016.3.4 Command that simplifies freebsd-update by running freebsd-update fetch first and then freebsd-update install. kwargs: Parameters of freebsd-update command. ''' stdout = {} for mode in ('fetch', 'install'): err_ = {} ...
python
def update(**kwargs): ''' .. versionadded:: 2016.3.4 Command that simplifies freebsd-update by running freebsd-update fetch first and then freebsd-update install. kwargs: Parameters of freebsd-update command. ''' stdout = {} for mode in ('fetch', 'install'): err_ = {} ...
[ "def", "update", "(", "*", "*", "kwargs", ")", ":", "stdout", "=", "{", "}", "for", "mode", "in", "(", "'fetch'", ",", "'install'", ")", ":", "err_", "=", "{", "}", "ret", "=", "_wrapper", "(", "mode", ",", "err_", "=", "err_", ",", "*", "*", ...
.. versionadded:: 2016.3.4 Command that simplifies freebsd-update by running freebsd-update fetch first and then freebsd-update install. kwargs: Parameters of freebsd-update command.
[ "..", "versionadded", "::", "2016", ".", "3", ".", "4" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/freebsd_update.py#L174-L193
train
Returns the current state of the available freebsd - von objects.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/flatpak.py
uninstalled
def uninstalled(name): ''' Ensure that the named package is not installed. Args: name (str): The flatpak package. Returns: dict: The ``result`` and ``output``. Example: .. code-block:: yaml uninstall_package: flatpack.uninstalled: - name: gimp ...
python
def uninstalled(name): ''' Ensure that the named package is not installed. Args: name (str): The flatpak package. Returns: dict: The ``result`` and ``output``. Example: .. code-block:: yaml uninstall_package: flatpack.uninstalled: - name: gimp ...
[ "def", "uninstalled", "(", "name", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'result'", ":", "None", ",", "'comment'", ":", "''", "}", "old", "=", "__salt__", "[", "'flatpak.is_installed'", "]", "(", "na...
Ensure that the named package is not installed. Args: name (str): The flatpak package. Returns: dict: The ``result`` and ``output``. Example: .. code-block:: yaml uninstall_package: flatpack.uninstalled: - name: gimp
[ "Ensure", "that", "the", "named", "package", "is", "not", "installed", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/flatpak.py#L79-L121
train
Ensure that the named package is not installed.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/flatpak.py
add_remote
def add_remote(name, location): ''' Adds a new location to install flatpak packages from. Args: name (str): The repository's name. location (str): The location of the repository. Returns: dict: The ``result`` and ``output``. Example: .. code-block:: yaml add_...
python
def add_remote(name, location): ''' Adds a new location to install flatpak packages from. Args: name (str): The repository's name. location (str): The location of the repository. Returns: dict: The ``result`` and ``output``. Example: .. code-block:: yaml add_...
[ "def", "add_remote", "(", "name", ",", "location", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'result'", ":", "None", ",", "'comment'", ":", "''", "}", "old", "=", "__salt__", "[", "'flatpak.is_remote_added...
Adds a new location to install flatpak packages from. Args: name (str): The repository's name. location (str): The location of the repository. Returns: dict: The ``result`` and ``output``. Example: .. code-block:: yaml add_flathub: flatpack.add_remote: ...
[ "Adds", "a", "new", "location", "to", "install", "flatpak", "packages", "from", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/flatpak.py#L124-L177
train
Adds a new location to install flatpak packages from.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/smartos_nictagadm.py
list_nictags
def list_nictags(include_etherstubs=True): ''' List all nictags include_etherstubs : boolean toggle include of etherstubs CLI Example: .. code-block:: bash salt '*' nictagadm.list ''' ret = {} cmd = 'nictagadm list -d "|" -p{0}'.format( ' -L' if not include_et...
python
def list_nictags(include_etherstubs=True): ''' List all nictags include_etherstubs : boolean toggle include of etherstubs CLI Example: .. code-block:: bash salt '*' nictagadm.list ''' ret = {} cmd = 'nictagadm list -d "|" -p{0}'.format( ' -L' if not include_et...
[ "def", "list_nictags", "(", "include_etherstubs", "=", "True", ")", ":", "ret", "=", "{", "}", "cmd", "=", "'nictagadm list -d \"|\" -p{0}'", ".", "format", "(", "' -L'", "if", "not", "include_etherstubs", "else", "''", ")", "res", "=", "__salt__", "[", "'cm...
List all nictags include_etherstubs : boolean toggle include of etherstubs CLI Example: .. code-block:: bash salt '*' nictagadm.list
[ "List", "all", "nictags" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smartos_nictagadm.py#L48-L78
train
List all nictags in the nictagadm system
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/smartos_nictagadm.py
vms
def vms(nictag): ''' List all vms connect to nictag nictag : string name of nictag CLI Example: .. code-block:: bash salt '*' nictagadm.vms admin ''' ret = {} cmd = 'nictagadm vms {0}'.format(nictag) res = __salt__['cmd.run_all'](cmd) retcode = res['retcode'] ...
python
def vms(nictag): ''' List all vms connect to nictag nictag : string name of nictag CLI Example: .. code-block:: bash salt '*' nictagadm.vms admin ''' ret = {} cmd = 'nictagadm vms {0}'.format(nictag) res = __salt__['cmd.run_all'](cmd) retcode = res['retcode'] ...
[ "def", "vms", "(", "nictag", ")", ":", "ret", "=", "{", "}", "cmd", "=", "'nictagadm vms {0}'", ".", "format", "(", "nictag", ")", "res", "=", "__salt__", "[", "'cmd.run_all'", "]", "(", "cmd", ")", "retcode", "=", "res", "[", "'retcode'", "]", "if",...
List all vms connect to nictag nictag : string name of nictag CLI Example: .. code-block:: bash salt '*' nictagadm.vms admin
[ "List", "all", "vms", "connect", "to", "nictag" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smartos_nictagadm.py#L81-L102
train
List all vms connect to nictag
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/smartos_nictagadm.py
exists
def exists(*nictag, **kwargs): ''' Check if nictags exists nictag : string one or more nictags to check verbose : boolean return list of nictags CLI Example: .. code-block:: bash salt '*' nictagadm.exists admin ''' ret = {} if not nictag: return {'...
python
def exists(*nictag, **kwargs): ''' Check if nictags exists nictag : string one or more nictags to check verbose : boolean return list of nictags CLI Example: .. code-block:: bash salt '*' nictagadm.exists admin ''' ret = {} if not nictag: return {'...
[ "def", "exists", "(", "*", "nictag", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "}", "if", "not", "nictag", ":", "return", "{", "'Error'", ":", "'Please provide at least one nictag to check.'", "}", "cmd", "=", "'nictagadm exists -l {0}'", ".", "for...
Check if nictags exists nictag : string one or more nictags to check verbose : boolean return list of nictags CLI Example: .. code-block:: bash salt '*' nictagadm.exists admin
[ "Check", "if", "nictags", "exists" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smartos_nictagadm.py#L105-L134
train
Check if nictags 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/smartos_nictagadm.py
add
def add(name, mac, mtu=1500): ''' Add a new nictag name : string name of new nictag mac : string mac of parent interface or 'etherstub' to create a ether stub mtu : int MTU (ignored for etherstubs) CLI Example: .. code-block:: bash salt '*' nictagadm.add s...
python
def add(name, mac, mtu=1500): ''' Add a new nictag name : string name of new nictag mac : string mac of parent interface or 'etherstub' to create a ether stub mtu : int MTU (ignored for etherstubs) CLI Example: .. code-block:: bash salt '*' nictagadm.add s...
[ "def", "add", "(", "name", ",", "mac", ",", "mtu", "=", "1500", ")", ":", "ret", "=", "{", "}", "if", "mtu", ">", "9000", "or", "mtu", "<", "1500", ":", "return", "{", "'Error'", ":", "'mtu must be a value between 1500 and 9000.'", "}", "if", "mac", ...
Add a new nictag name : string name of new nictag mac : string mac of parent interface or 'etherstub' to create a ether stub mtu : int MTU (ignored for etherstubs) CLI Example: .. code-block:: bash salt '*' nictagadm.add storage0 etherstub salt '*' nictaga...
[ "Add", "a", "new", "nictag" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smartos_nictagadm.py#L137-L176
train
Add a new nictag to the nictagadm 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/smartos_nictagadm.py
update
def update(name, mac=None, mtu=None): ''' Update a nictag name : string name of nictag mac : string optional new mac for nictag mtu : int optional new MTU for nictag CLI Example: .. code-block:: bash salt '*' nictagadm.update trunk mtu=9000 ''' ret...
python
def update(name, mac=None, mtu=None): ''' Update a nictag name : string name of nictag mac : string optional new mac for nictag mtu : int optional new MTU for nictag CLI Example: .. code-block:: bash salt '*' nictagadm.update trunk mtu=9000 ''' ret...
[ "def", "update", "(", "name", ",", "mac", "=", "None", ",", "mtu", "=", "None", ")", ":", "ret", "=", "{", "}", "if", "name", "not", "in", "list_nictags", "(", ")", ":", "return", "{", "'Error'", ":", "'nictag {0} does not exists.'", ".", "format", "...
Update a nictag name : string name of nictag mac : string optional new mac for nictag mtu : int optional new MTU for nictag CLI Example: .. code-block:: bash salt '*' nictagadm.update trunk mtu=9000
[ "Update", "a", "nictag" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smartos_nictagadm.py#L179-L228
train
Update a nictag s attributes.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/smartos_nictagadm.py
delete
def delete(name, force=False): ''' Delete nictag name : string nictag to delete force : boolean force delete even if vms attached CLI Example: .. code-block:: bash salt '*' nictagadm.exists admin ''' ret = {} if name not in list_nictags(): return ...
python
def delete(name, force=False): ''' Delete nictag name : string nictag to delete force : boolean force delete even if vms attached CLI Example: .. code-block:: bash salt '*' nictagadm.exists admin ''' ret = {} if name not in list_nictags(): return ...
[ "def", "delete", "(", "name", ",", "force", "=", "False", ")", ":", "ret", "=", "{", "}", "if", "name", "not", "in", "list_nictags", "(", ")", ":", "return", "True", "cmd", "=", "'nictagadm delete {0}{1}'", ".", "format", "(", "\"-f \"", "if", "force",...
Delete nictag name : string nictag to delete force : boolean force delete even if vms attached CLI Example: .. code-block:: bash salt '*' nictagadm.exists admin
[ "Delete", "nictag" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smartos_nictagadm.py#L231-L257
train
Delete a nictag from the nictagadm
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/proxy/philips_hue.py
init
def init(cnf): ''' Initialize the module. ''' CONFIG['host'] = cnf.get('proxy', {}).get('host') if not CONFIG['host']: raise MinionError(message="Cannot find 'host' parameter in the proxy configuration") CONFIG['user'] = cnf.get('proxy', {}).get('user') if not CONFIG['user']: ...
python
def init(cnf): ''' Initialize the module. ''' CONFIG['host'] = cnf.get('proxy', {}).get('host') if not CONFIG['host']: raise MinionError(message="Cannot find 'host' parameter in the proxy configuration") CONFIG['user'] = cnf.get('proxy', {}).get('user') if not CONFIG['user']: ...
[ "def", "init", "(", "cnf", ")", ":", "CONFIG", "[", "'host'", "]", "=", "cnf", ".", "get", "(", "'proxy'", ",", "{", "}", ")", ".", "get", "(", "'host'", ")", "if", "not", "CONFIG", "[", "'host'", "]", ":", "raise", "MinionError", "(", "message",...
Initialize the module.
[ "Initialize", "the", "module", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/philips_hue.py#L79-L91
train
Initialize the module.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/proxy/philips_hue.py
_query
def _query(lamp_id, state, action='', method='GET'): ''' Query the URI :return: ''' # Because salt.utils.query is that dreadful... :( err = None url = "{0}/lights{1}".format(CONFIG['uri'], lamp_id and '/{0}'.format(lamp_id) or '') \ + (action and ...
python
def _query(lamp_id, state, action='', method='GET'): ''' Query the URI :return: ''' # Because salt.utils.query is that dreadful... :( err = None url = "{0}/lights{1}".format(CONFIG['uri'], lamp_id and '/{0}'.format(lamp_id) or '') \ + (action and ...
[ "def", "_query", "(", "lamp_id", ",", "state", ",", "action", "=", "''", ",", "method", "=", "'GET'", ")", ":", "# Because salt.utils.query is that dreadful... :(", "err", "=", "None", "url", "=", "\"{0}/lights{1}\"", ".", "format", "(", "CONFIG", "[", "'uri'"...
Query the URI :return:
[ "Query", "the", "URI" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/philips_hue.py#L110-L137
train
Query the URI
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/proxy/philips_hue.py
_set
def _set(lamp_id, state, method="state"): ''' Set state to the device by ID. :param lamp_id: :param state: :return: ''' try: res = _query(lamp_id, state, action=method, method='PUT') except Exception as err: raise CommandExecutionError(err) res = len(res) > 1 and re...
python
def _set(lamp_id, state, method="state"): ''' Set state to the device by ID. :param lamp_id: :param state: :return: ''' try: res = _query(lamp_id, state, action=method, method='PUT') except Exception as err: raise CommandExecutionError(err) res = len(res) > 1 and re...
[ "def", "_set", "(", "lamp_id", ",", "state", ",", "method", "=", "\"state\"", ")", ":", "try", ":", "res", "=", "_query", "(", "lamp_id", ",", "state", ",", "action", "=", "method", ",", "method", "=", "'PUT'", ")", "except", "Exception", "as", "err"...
Set state to the device by ID. :param lamp_id: :param state: :return:
[ "Set", "state", "to", "the", "device", "by", "ID", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/philips_hue.py#L140-L161
train
Set the state of the specified LAMP 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/proxy/philips_hue.py
_get_devices
def _get_devices(params): ''' Parse device(s) ID(s) from the common params. :param params: :return: ''' if 'id' not in params: raise CommandExecutionError("Parameter ID is required.") return type(params['id']) == int and [params['id']] \ or [int(dev) for dev in params['i...
python
def _get_devices(params): ''' Parse device(s) ID(s) from the common params. :param params: :return: ''' if 'id' not in params: raise CommandExecutionError("Parameter ID is required.") return type(params['id']) == int and [params['id']] \ or [int(dev) for dev in params['i...
[ "def", "_get_devices", "(", "params", ")", ":", "if", "'id'", "not", "in", "params", ":", "raise", "CommandExecutionError", "(", "\"Parameter ID is required.\"", ")", "return", "type", "(", "params", "[", "'id'", "]", ")", "==", "int", "and", "[", "params", ...
Parse device(s) ID(s) from the common params. :param params: :return:
[ "Parse", "device", "(", "s", ")", "ID", "(", "s", ")", "from", "the", "common", "params", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/philips_hue.py#L164-L175
train
Parse device ID s from the common params.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/proxy/philips_hue.py
call_lights
def call_lights(*args, **kwargs): ''' Get info about all available lamps. Options: * **id**: Specifies a device ID. Can be a comma-separated values. All, if omitted. CLI Example: .. code-block:: bash salt '*' hue.lights salt '*' hue.lights id=1 salt '*' hue.lights id...
python
def call_lights(*args, **kwargs): ''' Get info about all available lamps. Options: * **id**: Specifies a device ID. Can be a comma-separated values. All, if omitted. CLI Example: .. code-block:: bash salt '*' hue.lights salt '*' hue.lights id=1 salt '*' hue.lights id...
[ "def", "call_lights", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "res", "=", "dict", "(", ")", "lights", "=", "_get_lights", "(", ")", "for", "dev_id", "in", "'id'", "in", "kwargs", "and", "_get_devices", "(", "kwargs", ")", "or", "sorted",...
Get info about all available lamps. Options: * **id**: Specifies a device ID. Can be a comma-separated values. All, if omitted. CLI Example: .. code-block:: bash salt '*' hue.lights salt '*' hue.lights id=1 salt '*' hue.lights id=1,2,3
[ "Get", "info", "about", "all", "available", "lamps", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/philips_hue.py#L186-L208
train
Get info about all available lamps.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/proxy/philips_hue.py
call_switch
def call_switch(*args, **kwargs): ''' Switch lamp ON/OFF. If no particular state is passed, then lamp will be switched to the opposite state. Options: * **id**: Specifies a device ID. Can be a comma-separated values. All, if omitted. * **on**: True or False. Inverted current, if omitted ...
python
def call_switch(*args, **kwargs): ''' Switch lamp ON/OFF. If no particular state is passed, then lamp will be switched to the opposite state. Options: * **id**: Specifies a device ID. Can be a comma-separated values. All, if omitted. * **on**: True or False. Inverted current, if omitted ...
[ "def", "call_switch", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "out", "=", "dict", "(", ")", "devices", "=", "_get_lights", "(", ")", "for", "dev_id", "in", "'id'", "not", "in", "kwargs", "and", "sorted", "(", "devices", ".", "keys", "(...
Switch lamp ON/OFF. If no particular state is passed, then lamp will be switched to the opposite state. Options: * **id**: Specifies a device ID. Can be a comma-separated values. All, if omitted. * **on**: True or False. Inverted current, if omitted CLI Example: .. code-block:: bash ...
[ "Switch", "lamp", "ON", "/", "OFF", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/philips_hue.py#L211-L241
train
Switch lamp ON or OFF.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/proxy/philips_hue.py
call_blink
def call_blink(*args, **kwargs): ''' Blink a lamp. If lamp is ON, then blink ON-OFF-ON, otherwise OFF-ON-OFF. Options: * **id**: Specifies a device ID. Can be a comma-separated values. All, if omitted. * **pause**: Time in seconds. Can be less than 1, i.e. 0.7, 0.5 sec. CLI Example: .. c...
python
def call_blink(*args, **kwargs): ''' Blink a lamp. If lamp is ON, then blink ON-OFF-ON, otherwise OFF-ON-OFF. Options: * **id**: Specifies a device ID. Can be a comma-separated values. All, if omitted. * **pause**: Time in seconds. Can be less than 1, i.e. 0.7, 0.5 sec. CLI Example: .. c...
[ "def", "call_blink", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "devices", "=", "_get_lights", "(", ")", "pause", "=", "kwargs", ".", "get", "(", "'pause'", ",", "0", ")", "res", "=", "dict", "(", ")", "for", "dev_id", "in", "'id'", "no...
Blink a lamp. If lamp is ON, then blink ON-OFF-ON, otherwise OFF-ON-OFF. Options: * **id**: Specifies a device ID. Can be a comma-separated values. All, if omitted. * **pause**: Time in seconds. Can be less than 1, i.e. 0.7, 0.5 sec. CLI Example: .. code-block:: bash salt '*' hue.blink ...
[ "Blink", "a", "lamp", ".", "If", "lamp", "is", "ON", "then", "blink", "ON", "-", "OFF", "-", "ON", "otherwise", "OFF", "-", "ON", "-", "OFF", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/philips_hue.py#L244-L270
train
Blink a lamp.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/proxy/philips_hue.py
call_ping
def call_ping(*args, **kwargs): ''' Ping the lamps by issuing a short inversion blink to all available devices. CLI Example: .. code-block:: bash salt '*' hue.ping ''' errors = dict() for dev_id, dev_status in call_blink().items(): if not dev_status['result']: ...
python
def call_ping(*args, **kwargs): ''' Ping the lamps by issuing a short inversion blink to all available devices. CLI Example: .. code-block:: bash salt '*' hue.ping ''' errors = dict() for dev_id, dev_status in call_blink().items(): if not dev_status['result']: ...
[ "def", "call_ping", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "errors", "=", "dict", "(", ")", "for", "dev_id", ",", "dev_status", "in", "call_blink", "(", ")", ".", "items", "(", ")", ":", "if", "not", "dev_status", "[", "'result'", "]"...
Ping the lamps by issuing a short inversion blink to all available devices. CLI Example: .. code-block:: bash salt '*' hue.ping
[ "Ping", "the", "lamps", "by", "issuing", "a", "short", "inversion", "blink", "to", "all", "available", "devices", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/philips_hue.py#L273-L288
train
Ping the lamps by issuing a short inversion blink to all available devices.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/proxy/philips_hue.py
call_status
def call_status(*args, **kwargs): ''' Return the status of the lamps. Options: * **id**: Specifies a device ID. Can be a comma-separated values. All, if omitted. CLI Example: .. code-block:: bash salt '*' hue.status salt '*' hue.status id=1 salt '*' hue.status id=1,2...
python
def call_status(*args, **kwargs): ''' Return the status of the lamps. Options: * **id**: Specifies a device ID. Can be a comma-separated values. All, if omitted. CLI Example: .. code-block:: bash salt '*' hue.status salt '*' hue.status id=1 salt '*' hue.status id=1,2...
[ "def", "call_status", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "res", "=", "dict", "(", ")", "devices", "=", "_get_lights", "(", ")", "for", "dev_id", "in", "'id'", "not", "in", "kwargs", "and", "sorted", "(", "devices", ".", "keys", "(...
Return the status of the lamps. Options: * **id**: Specifies a device ID. Can be a comma-separated values. All, if omitted. CLI Example: .. code-block:: bash salt '*' hue.status salt '*' hue.status id=1 salt '*' hue.status id=1,2,3
[ "Return", "the", "status", "of", "the", "lamps", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/philips_hue.py#L291-L316
train
Return the status of the lamps.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/proxy/philips_hue.py
call_rename
def call_rename(*args, **kwargs): ''' Rename a device. Options: * **id**: Specifies a device ID. Only one device at a time. * **title**: Title of the device. CLI Example: .. code-block:: bash salt '*' hue.rename id=1 title='WC for cats' ''' dev_id = _get_devices(kwargs) ...
python
def call_rename(*args, **kwargs): ''' Rename a device. Options: * **id**: Specifies a device ID. Only one device at a time. * **title**: Title of the device. CLI Example: .. code-block:: bash salt '*' hue.rename id=1 title='WC for cats' ''' dev_id = _get_devices(kwargs) ...
[ "def", "call_rename", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "dev_id", "=", "_get_devices", "(", "kwargs", ")", "if", "len", "(", "dev_id", ")", ">", "1", ":", "raise", "CommandExecutionError", "(", "\"Only one device can be renamed at a time\"",...
Rename a device. Options: * **id**: Specifies a device ID. Only one device at a time. * **title**: Title of the device. CLI Example: .. code-block:: bash salt '*' hue.rename id=1 title='WC for cats'
[ "Rename", "a", "device", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/philips_hue.py#L319-L341
train
Rename a device.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/proxy/philips_hue.py
call_alert
def call_alert(*args, **kwargs): ''' Lamp alert Options: * **id**: Specifies a device ID. Can be a comma-separated values. All, if omitted. * **on**: Turns on or off an alert. Default is True. CLI Example: .. code-block:: bash salt '*' hue.alert salt '*' hue.alert id=1 ...
python
def call_alert(*args, **kwargs): ''' Lamp alert Options: * **id**: Specifies a device ID. Can be a comma-separated values. All, if omitted. * **on**: Turns on or off an alert. Default is True. CLI Example: .. code-block:: bash salt '*' hue.alert salt '*' hue.alert id=1 ...
[ "def", "call_alert", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "res", "=", "dict", "(", ")", "devices", "=", "_get_lights", "(", ")", "for", "dev_id", "in", "'id'", "not", "in", "kwargs", "and", "sorted", "(", "devices", ".", "keys", "("...
Lamp alert Options: * **id**: Specifies a device ID. Can be a comma-separated values. All, if omitted. * **on**: Turns on or off an alert. Default is True. CLI Example: .. code-block:: bash salt '*' hue.alert salt '*' hue.alert id=1 salt '*' hue.alert id=1,2,3 on=false
[ "Lamp", "alert" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/philips_hue.py#L344-L367
train
A function to call the alert command.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/proxy/philips_hue.py
call_color
def call_color(*args, **kwargs): ''' Set a color to the lamp. Options: * **id**: Specifies a device ID. Can be a comma-separated values. All, if omitted. * **color**: Fixed color. Values are: red, green, blue, orange, pink, white, yellow, daylight, purple. Default white. * **t...
python
def call_color(*args, **kwargs): ''' Set a color to the lamp. Options: * **id**: Specifies a device ID. Can be a comma-separated values. All, if omitted. * **color**: Fixed color. Values are: red, green, blue, orange, pink, white, yellow, daylight, purple. Default white. * **t...
[ "def", "call_color", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "res", "=", "dict", "(", ")", "colormap", "=", "{", "'red'", ":", "Const", ".", "COLOR_RED", ",", "'green'", ":", "Const", ".", "COLOR_GREEN", ",", "'blue'", ":", "Const", "....
Set a color to the lamp. Options: * **id**: Specifies a device ID. Can be a comma-separated values. All, if omitted. * **color**: Fixed color. Values are: red, green, blue, orange, pink, white, yellow, daylight, purple. Default white. * **transition**: Transition 0~200. Advanced:...
[ "Set", "a", "color", "to", "the", "lamp", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/philips_hue.py#L396-L454
train
Set a color to the lamp.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/proxy/philips_hue.py
call_brightness
def call_brightness(*args, **kwargs): ''' Set an effect to the lamp. Arguments: * **value**: 0~255 brightness of the lamp. Options: * **id**: Specifies a device ID. Can be a comma-separated values. All, if omitted. * **transition**: Transition 0~200. Default 0. CLI Example: .. ...
python
def call_brightness(*args, **kwargs): ''' Set an effect to the lamp. Arguments: * **value**: 0~255 brightness of the lamp. Options: * **id**: Specifies a device ID. Can be a comma-separated values. All, if omitted. * **transition**: Transition 0~200. Default 0. CLI Example: .. ...
[ "def", "call_brightness", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "res", "=", "dict", "(", ")", "if", "'value'", "not", "in", "kwargs", ":", "raise", "CommandExecutionError", "(", "\"Parameter 'value' is missing\"", ")", "try", ":", "brightness"...
Set an effect to the lamp. Arguments: * **value**: 0~255 brightness of the lamp. Options: * **id**: Specifies a device ID. Can be a comma-separated values. All, if omitted. * **transition**: Transition 0~200. Default 0. CLI Example: .. code-block:: bash salt '*' hue.brightness...
[ "Set", "an", "effect", "to", "the", "lamp", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/philips_hue.py#L457-L497
train
Set an effect to the lamp.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/proxy/philips_hue.py
call_temperature
def call_temperature(*args, **kwargs): ''' Set the mired color temperature. More: http://en.wikipedia.org/wiki/Mired Arguments: * **value**: 150~500. Options: * **id**: Specifies a device ID. Can be a comma-separated values. All, if omitted. CLI Example: .. code-block:: bash ...
python
def call_temperature(*args, **kwargs): ''' Set the mired color temperature. More: http://en.wikipedia.org/wiki/Mired Arguments: * **value**: 150~500. Options: * **id**: Specifies a device ID. Can be a comma-separated values. All, if omitted. CLI Example: .. code-block:: bash ...
[ "def", "call_temperature", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "res", "=", "dict", "(", ")", "if", "'value'", "not", "in", "kwargs", ":", "raise", "CommandExecutionError", "(", "\"Parameter 'value' (150~500) is missing\"", ")", "try", ":", "...
Set the mired color temperature. More: http://en.wikipedia.org/wiki/Mired Arguments: * **value**: 150~500. Options: * **id**: Specifies a device ID. Can be a comma-separated values. All, if omitted. CLI Example: .. code-block:: bash salt '*' hue.temperature value=150 salt ...
[ "Set", "the", "mired", "color", "temperature", ".", "More", ":", "http", ":", "//", "en", ".", "wikipedia", ".", "org", "/", "wiki", "/", "Mired" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/philips_hue.py#L500-L533
train
Set the mired color temperature.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/fileserver/hgfs.py
_get_branch
def _get_branch(repo, name): ''' Find the requested branch in the specified repo ''' try: return [x for x in _all_branches(repo) if x[0] == name][0] except IndexError: return False
python
def _get_branch(repo, name): ''' Find the requested branch in the specified repo ''' try: return [x for x in _all_branches(repo) if x[0] == name][0] except IndexError: return False
[ "def", "_get_branch", "(", "repo", ",", "name", ")", ":", "try", ":", "return", "[", "x", "for", "x", "in", "_all_branches", "(", "repo", ")", "if", "x", "[", "0", "]", "==", "name", "]", "[", "0", "]", "except", "IndexError", ":", "return", "Fal...
Find the requested branch in the specified repo
[ "Find", "the", "requested", "branch", "in", "the", "specified", "repo" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/fileserver/hgfs.py#L111-L118
train
Find the requested branch in the specified repository
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/fileserver/hgfs.py
_get_bookmark
def _get_bookmark(repo, name): ''' Find the requested bookmark in the specified repo ''' try: return [x for x in _all_bookmarks(repo) if x[0] == name][0] except IndexError: return False
python
def _get_bookmark(repo, name): ''' Find the requested bookmark in the specified repo ''' try: return [x for x in _all_bookmarks(repo) if x[0] == name][0] except IndexError: return False
[ "def", "_get_bookmark", "(", "repo", ",", "name", ")", ":", "try", ":", "return", "[", "x", "for", "x", "in", "_all_bookmarks", "(", "repo", ")", "if", "x", "[", "0", "]", "==", "name", "]", "[", "0", "]", "except", "IndexError", ":", "return", "...
Find the requested bookmark in the specified repo
[ "Find", "the", "requested", "bookmark", "in", "the", "specified", "repo" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/fileserver/hgfs.py#L132-L139
train
Find the requested bookmark in the specified repository
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/fileserver/hgfs.py
_get_tag
def _get_tag(repo, name): ''' Find the requested tag in the specified repo ''' try: return [x for x in _all_tags(repo) if x[0] == name][0] except IndexError: return False
python
def _get_tag(repo, name): ''' Find the requested tag in the specified repo ''' try: return [x for x in _all_tags(repo) if x[0] == name][0] except IndexError: return False
[ "def", "_get_tag", "(", "repo", ",", "name", ")", ":", "try", ":", "return", "[", "x", "for", "x", "in", "_all_tags", "(", "repo", ")", "if", "x", "[", "0", "]", "==", "name", "]", "[", "0", "]", "except", "IndexError", ":", "return", "False" ]
Find the requested tag in the specified repo
[ "Find", "the", "requested", "tag", "in", "the", "specified", "repo" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/fileserver/hgfs.py#L154-L161
train
Find the requested tag in the specified repository
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/fileserver/hgfs.py
_get_ref
def _get_ref(repo, name): ''' Return ref tuple if ref is in the repo. ''' if name == 'base': name = repo['base'] if name == repo['base'] or name in envs(): if repo['branch_method'] == 'branches': return _get_branch(repo['repo'], name) \ or _get_tag(repo['r...
python
def _get_ref(repo, name): ''' Return ref tuple if ref is in the repo. ''' if name == 'base': name = repo['base'] if name == repo['base'] or name in envs(): if repo['branch_method'] == 'branches': return _get_branch(repo['repo'], name) \ or _get_tag(repo['r...
[ "def", "_get_ref", "(", "repo", ",", "name", ")", ":", "if", "name", "==", "'base'", ":", "name", "=", "repo", "[", "'base'", "]", "if", "name", "==", "repo", "[", "'base'", "]", "or", "name", "in", "envs", "(", ")", ":", "if", "repo", "[", "'b...
Return ref tuple if ref is in the repo.
[ "Return", "ref", "tuple", "if", "ref", "is", "in", "the", "repo", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/fileserver/hgfs.py#L164-L181
train
Return ref tuple if ref is in the repo.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/fileserver/hgfs.py
init
def init(): ''' Return a list of hglib objects for the various hgfs remotes ''' bp_ = os.path.join(__opts__['cachedir'], 'hgfs') new_remote = False repos = [] per_remote_defaults = {} for param in PER_REMOTE_OVERRIDES: per_remote_defaults[param] = \ six.text_type(__o...
python
def init(): ''' Return a list of hglib objects for the various hgfs remotes ''' bp_ = os.path.join(__opts__['cachedir'], 'hgfs') new_remote = False repos = [] per_remote_defaults = {} for param in PER_REMOTE_OVERRIDES: per_remote_defaults[param] = \ six.text_type(__o...
[ "def", "init", "(", ")", ":", "bp_", "=", "os", ".", "path", ".", "join", "(", "__opts__", "[", "'cachedir'", "]", ",", "'hgfs'", ")", "new_remote", "=", "False", "repos", "=", "[", "]", "per_remote_defaults", "=", "{", "}", "for", "param", "in", "...
Return a list of hglib objects for the various hgfs remotes
[ "Return", "a", "list", "of", "hglib", "objects", "for", "the", "various", "hgfs", "remotes" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/fileserver/hgfs.py#L193-L341
train
Initialize the hglib objects for the various hgfs remotes
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/fileserver/hgfs.py
lock
def lock(remote=None): ''' Place an update.lk ``remote`` can either be a dictionary containing repo configuration information, or a pattern. If the latter, then remotes for which the URL matches the pattern will be locked. ''' def _do_lock(repo): success = [] failed = [] ...
python
def lock(remote=None): ''' Place an update.lk ``remote`` can either be a dictionary containing repo configuration information, or a pattern. If the latter, then remotes for which the URL matches the pattern will be locked. ''' def _do_lock(repo): success = [] failed = [] ...
[ "def", "lock", "(", "remote", "=", "None", ")", ":", "def", "_do_lock", "(", "repo", ")", ":", "success", "=", "[", "]", "failed", "=", "[", "]", "if", "not", "os", ".", "path", ".", "exists", "(", "repo", "[", "'lockfile'", "]", ")", ":", "try...
Place an update.lk ``remote`` can either be a dictionary containing repo configuration information, or a pattern. If the latter, then remotes for which the URL matches the pattern will be locked.
[ "Place", "an", "update", ".", "lk" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/fileserver/hgfs.py#L457-L501
train
Place an update. lk with a lockfile.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/fileserver/hgfs.py
envs
def envs(ignore_cache=False): ''' Return a list of refs that can be used as environments ''' if not ignore_cache: env_cache = os.path.join(__opts__['cachedir'], 'hgfs/envs.p') cache_match = salt.fileserver.check_env_cache(__opts__, env_cache) if cache_match is not None: ...
python
def envs(ignore_cache=False): ''' Return a list of refs that can be used as environments ''' if not ignore_cache: env_cache = os.path.join(__opts__['cachedir'], 'hgfs/envs.p') cache_match = salt.fileserver.check_env_cache(__opts__, env_cache) if cache_match is not None: ...
[ "def", "envs", "(", "ignore_cache", "=", "False", ")", ":", "if", "not", "ignore_cache", ":", "env_cache", "=", "os", ".", "path", ".", "join", "(", "__opts__", "[", "'cachedir'", "]", ",", "'hgfs/envs.p'", ")", "cache_match", "=", "salt", ".", "fileserv...
Return a list of refs that can be used as environments
[ "Return", "a", "list", "of", "refs", "that", "can", "be", "used", "as", "environments" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/fileserver/hgfs.py#L610-L636
train
Return a list of refs that can be used as environments
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/fileserver/hgfs.py
find_file
def find_file(path, tgt_env='base', **kwargs): # pylint: disable=W0613 ''' Find the first file to match the path and ref, read the file out of hg and send the path to the newly cached file ''' fnd = {'path': '', 'rel': ''} if os.path.isabs(path) or tgt_env not in envs(): retu...
python
def find_file(path, tgt_env='base', **kwargs): # pylint: disable=W0613 ''' Find the first file to match the path and ref, read the file out of hg and send the path to the newly cached file ''' fnd = {'path': '', 'rel': ''} if os.path.isabs(path) or tgt_env not in envs(): retu...
[ "def", "find_file", "(", "path", ",", "tgt_env", "=", "'base'", ",", "*", "*", "kwargs", ")", ":", "# pylint: disable=W0613", "fnd", "=", "{", "'path'", ":", "''", ",", "'rel'", ":", "''", "}", "if", "os", ".", "path", ".", "isabs", "(", "path", ")...
Find the first file to match the path and ref, read the file out of hg and send the path to the newly cached file
[ "Find", "the", "first", "file", "to", "match", "the", "path", "and", "ref", "read", "the", "file", "out", "of", "hg", "and", "send", "the", "path", "to", "the", "newly", "cached", "file" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/fileserver/hgfs.py#L639-L742
train
Find the first file to match the path and ref and send the path to the newly cached 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/fileserver/hgfs.py
file_hash
def file_hash(load, fnd): ''' Return a file hash, the hash type is set in the master config file ''' if 'env' in load: # "env" is not supported; Use "saltenv". load.pop('env') if not all(x in load for x in ('path', 'saltenv')): return '' ret = {'hash_type': __opts__['has...
python
def file_hash(load, fnd): ''' Return a file hash, the hash type is set in the master config file ''' if 'env' in load: # "env" is not supported; Use "saltenv". load.pop('env') if not all(x in load for x in ('path', 'saltenv')): return '' ret = {'hash_type': __opts__['has...
[ "def", "file_hash", "(", "load", ",", "fnd", ")", ":", "if", "'env'", "in", "load", ":", "# \"env\" is not supported; Use \"saltenv\".", "load", ".", "pop", "(", "'env'", ")", "if", "not", "all", "(", "x", "in", "load", "for", "x", "in", "(", "'path'", ...
Return a file hash, the hash type is set in the master config file
[ "Return", "a", "file", "hash", "the", "hash", "type", "is", "set", "in", "the", "master", "config", "file" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/fileserver/hgfs.py#L774-L800
train
Return a file hash
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/fileserver/hgfs.py
_file_lists
def _file_lists(load, form): ''' Return a dict containing the file lists for files and dirs ''' if 'env' in load: # "env" is not supported; Use "saltenv". load.pop('env') list_cachedir = os.path.join(__opts__['cachedir'], 'file_lists/hgfs') if not os.path.isdir(list_cachedir): ...
python
def _file_lists(load, form): ''' Return a dict containing the file lists for files and dirs ''' if 'env' in load: # "env" is not supported; Use "saltenv". load.pop('env') list_cachedir = os.path.join(__opts__['cachedir'], 'file_lists/hgfs') if not os.path.isdir(list_cachedir): ...
[ "def", "_file_lists", "(", "load", ",", "form", ")", ":", "if", "'env'", "in", "load", ":", "# \"env\" is not supported; Use \"saltenv\".", "load", ".", "pop", "(", "'env'", ")", "list_cachedir", "=", "os", ".", "path", ".", "join", "(", "__opts__", "[", "...
Return a dict containing the file lists for files and dirs
[ "Return", "a", "dict", "containing", "the", "file", "lists", "for", "files", "and", "dirs" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/fileserver/hgfs.py#L803-L836
train
Return a dict containing the file lists for files and dirs
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/fileserver/hgfs.py
_get_file_list
def _get_file_list(load): ''' Get a list of all files on the file server in a specified environment ''' if 'env' in load: # "env" is not supported; Use "saltenv". load.pop('env') if 'saltenv' not in load or load['saltenv'] not in envs(): return [] ret = set() for rep...
python
def _get_file_list(load): ''' Get a list of all files on the file server in a specified environment ''' if 'env' in load: # "env" is not supported; Use "saltenv". load.pop('env') if 'saltenv' not in load or load['saltenv'] not in envs(): return [] ret = set() for rep...
[ "def", "_get_file_list", "(", "load", ")", ":", "if", "'env'", "in", "load", ":", "# \"env\" is not supported; Use \"saltenv\".", "load", ".", "pop", "(", "'env'", ")", "if", "'saltenv'", "not", "in", "load", "or", "load", "[", "'saltenv'", "]", "not", "in",...
Get a list of all files on the file server in a specified environment
[ "Get", "a", "list", "of", "all", "files", "on", "the", "file", "server", "in", "a", "specified", "environment" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/fileserver/hgfs.py#L846-L868
train
Get a list of all files on the file server in a specified environment
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/fileserver/hgfs.py
_get_dir_list
def _get_dir_list(load): ''' Get a list of all directories on the master ''' if 'env' in load: # "env" is not supported; Use "saltenv". load.pop('env') if 'saltenv' not in load or load['saltenv'] not in envs(): return [] ret = set() for repo in init(): repo['...
python
def _get_dir_list(load): ''' Get a list of all directories on the master ''' if 'env' in load: # "env" is not supported; Use "saltenv". load.pop('env') if 'saltenv' not in load or load['saltenv'] not in envs(): return [] ret = set() for repo in init(): repo['...
[ "def", "_get_dir_list", "(", "load", ")", ":", "if", "'env'", "in", "load", ":", "# \"env\" is not supported; Use \"saltenv\".", "load", ".", "pop", "(", "'env'", ")", "if", "'saltenv'", "not", "in", "load", "or", "load", "[", "'saltenv'", "]", "not", "in", ...
Get a list of all directories on the master
[ "Get", "a", "list", "of", "all", "directories", "on", "the", "master" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/fileserver/hgfs.py#L886-L916
train
Get a list of all directories on the master
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cache/__init__.py
factory
def factory(opts, **kwargs): ''' Creates and returns the cache class. If memory caching is enabled by opts MemCache class will be instantiated. If not Cache class will be returned. ''' if opts.get('memcache_expire_seconds', 0): cls = MemCache else: cls = Cache return cls(...
python
def factory(opts, **kwargs): ''' Creates and returns the cache class. If memory caching is enabled by opts MemCache class will be instantiated. If not Cache class will be returned. ''' if opts.get('memcache_expire_seconds', 0): cls = MemCache else: cls = Cache return cls(...
[ "def", "factory", "(", "opts", ",", "*", "*", "kwargs", ")", ":", "if", "opts", ".", "get", "(", "'memcache_expire_seconds'", ",", "0", ")", ":", "cls", "=", "MemCache", "else", ":", "cls", "=", "Cache", "return", "cls", "(", "opts", ",", "*", "*",...
Creates and returns the cache class. If memory caching is enabled by opts MemCache class will be instantiated. If not Cache class will be returned.
[ "Creates", "and", "returns", "the", "cache", "class", ".", "If", "memory", "caching", "is", "enabled", "by", "opts", "MemCache", "class", "will", "be", "instantiated", ".", "If", "not", "Cache", "class", "will", "be", "returned", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cache/__init__.py#L24-L34
train
Creates and returns the cache class.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cache/__init__.py
Cache.cache
def cache(self, bank, key, fun, loop_fun=None, **kwargs): ''' Check cache for the data. If it is there, check to see if it needs to be refreshed. If the data is not there, or it needs to be refreshed, then call the callback function (``fun``) with any given ``**kwargs``. ...
python
def cache(self, bank, key, fun, loop_fun=None, **kwargs): ''' Check cache for the data. If it is there, check to see if it needs to be refreshed. If the data is not there, or it needs to be refreshed, then call the callback function (``fun``) with any given ``**kwargs``. ...
[ "def", "cache", "(", "self", ",", "bank", ",", "key", ",", "fun", ",", "loop_fun", "=", "None", ",", "*", "*", "kwargs", ")", ":", "expire_seconds", "=", "kwargs", ".", "get", "(", "'expire'", ",", "86400", ")", "# 1 day", "updated", "=", "self", "...
Check cache for the data. If it is there, check to see if it needs to be refreshed. If the data is not there, or it needs to be refreshed, then call the callback function (``fun``) with any given ``**kwargs``. In some cases, the callback function returns a list of objects which ...
[ "Check", "cache", "for", "the", "data", ".", "If", "it", "is", "there", "check", "to", "see", "if", "it", "needs", "to", "be", "refreshed", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cache/__init__.py#L96-L132
train
Cache the data for the specified key in the specified bank.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cache/__init__.py
Cache.store
def store(self, bank, key, data): ''' Store data using the specified module :param bank: The name of the location inside the cache which will hold the key and its associated data. :param key: The name of the key (or file inside a directory) which wil...
python
def store(self, bank, key, data): ''' Store data using the specified module :param bank: The name of the location inside the cache which will hold the key and its associated data. :param key: The name of the key (or file inside a directory) which wil...
[ "def", "store", "(", "self", ",", "bank", ",", "key", ",", "data", ")", ":", "fun", "=", "'{0}.store'", ".", "format", "(", "self", ".", "driver", ")", "return", "self", ".", "modules", "[", "fun", "]", "(", "bank", ",", "key", ",", "data", ",", ...
Store data using the specified module :param bank: The name of the location inside the cache which will hold the key and its associated data. :param key: The name of the key (or file inside a directory) which will hold the data. File extensions should no...
[ "Store", "data", "using", "the", "specified", "module" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cache/__init__.py#L134-L156
train
Store data using the specified module
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cache/__init__.py
Cache.fetch
def fetch(self, bank, key): ''' Fetch data using the specified module :param bank: The name of the location inside the cache which will hold the key and its associated data. :param key: The name of the key (or file inside a directory) which will hold...
python
def fetch(self, bank, key): ''' Fetch data using the specified module :param bank: The name of the location inside the cache which will hold the key and its associated data. :param key: The name of the key (or file inside a directory) which will hold...
[ "def", "fetch", "(", "self", ",", "bank", ",", "key", ")", ":", "fun", "=", "'{0}.fetch'", ".", "format", "(", "self", ".", "driver", ")", "return", "self", ".", "modules", "[", "fun", "]", "(", "bank", ",", "key", ",", "*", "*", "self", ".", "...
Fetch data using the specified module :param bank: The name of the location inside the cache which will hold the key and its associated data. :param key: The name of the key (or file inside a directory) which will hold the data. File extensions should no...
[ "Fetch", "data", "using", "the", "specified", "module" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cache/__init__.py#L158-L180
train
Fetch data using the specified module
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cache/__init__.py
Cache.list
def list(self, bank): ''' Lists entries stored in the specified bank. :param bank: The name of the location inside the cache which will hold the key and its associated data. :return: An iterable object containing all bank entries. Returns an empty ...
python
def list(self, bank): ''' Lists entries stored in the specified bank. :param bank: The name of the location inside the cache which will hold the key and its associated data. :return: An iterable object containing all bank entries. Returns an empty ...
[ "def", "list", "(", "self", ",", "bank", ")", ":", "fun", "=", "'{0}.list'", ".", "format", "(", "self", ".", "driver", ")", "return", "self", ".", "modules", "[", "fun", "]", "(", "bank", ",", "*", "*", "self", ".", "_kwargs", ")" ]
Lists entries stored in the specified bank. :param bank: The name of the location inside the cache which will hold the key and its associated data. :return: An iterable object containing all bank entries. Returns an empty iterator if the bank doesn't exi...
[ "Lists", "entries", "stored", "in", "the", "specified", "bank", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cache/__init__.py#L227-L244
train
Lists all the keyical elements in the specified bank.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/wheel/error.py
error
def error(name=None, message=''): ''' If name is None Then return empty dict Otherwise raise an exception with __name__ from name, message from message CLI Example: .. code-block:: bash salt-wheel error salt-wheel error.error name="Exception" message="This is an error." ''' ...
python
def error(name=None, message=''): ''' If name is None Then return empty dict Otherwise raise an exception with __name__ from name, message from message CLI Example: .. code-block:: bash salt-wheel error salt-wheel error.error name="Exception" message="This is an error." ''' ...
[ "def", "error", "(", "name", "=", "None", ",", "message", "=", "''", ")", ":", "ret", "=", "{", "}", "if", "name", "is", "not", "None", ":", "salt", ".", "utils", ".", "error", ".", "raise_error", "(", "name", "=", "name", ",", "message", "=", ...
If name is None Then return empty dict Otherwise raise an exception with __name__ from name, message from message CLI Example: .. code-block:: bash salt-wheel error salt-wheel error.error name="Exception" message="This is an error."
[ "If", "name", "is", "None", "Then", "return", "empty", "dict" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/wheel/error.py#L15-L31
train
Return empty dict with error message
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/boto_asg.py
present
def present( name, launch_config_name, availability_zones, min_size, max_size, launch_config=None, desired_capacity=None, load_balancers=None, default_cooldown=None, health_check_type=None, health_check_period=None, placemen...
python
def present( name, launch_config_name, availability_zones, min_size, max_size, launch_config=None, desired_capacity=None, load_balancers=None, default_cooldown=None, health_check_type=None, health_check_period=None, placemen...
[ "def", "present", "(", "name", ",", "launch_config_name", ",", "availability_zones", ",", "min_size", ",", "max_size", ",", "launch_config", "=", "None", ",", "desired_capacity", "=", "None", ",", "load_balancers", "=", "None", ",", "default_cooldown", "=", "Non...
Ensure the autoscale group exists. name Name of the autoscale group. launch_config_name Name of the launch config to use for the group. Or, if ``launch_config`` is specified, this will be the launch config name's prefix. (see below) launch_config A dictionary of ...
[ "Ensure", "the", "autoscale", "group", "exists", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_asg.py#L217-L709
train
Ensure the named launch config and autoscale 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/states/boto_asg.py
_determine_termination_policies
def _determine_termination_policies(termination_policies, termination_policies_from_pillar): ''' helper method for present. ensure that termination_policies are set ''' pillar_termination_policies = copy.deepcopy( __salt__['config.option'](termination_policies_from_pillar, []) ) if not ...
python
def _determine_termination_policies(termination_policies, termination_policies_from_pillar): ''' helper method for present. ensure that termination_policies are set ''' pillar_termination_policies = copy.deepcopy( __salt__['config.option'](termination_policies_from_pillar, []) ) if not ...
[ "def", "_determine_termination_policies", "(", "termination_policies", ",", "termination_policies_from_pillar", ")", ":", "pillar_termination_policies", "=", "copy", ".", "deepcopy", "(", "__salt__", "[", "'config.option'", "]", "(", "termination_policies_from_pillar", ",", ...
helper method for present. ensure that termination_policies are set
[ "helper", "method", "for", "present", ".", "ensure", "that", "termination_policies", "are", "set" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_asg.py#L712-L721
train
helper method for present. ensure that termination_policies are set.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/boto_asg.py
_determine_scaling_policies
def _determine_scaling_policies(scaling_policies, scaling_policies_from_pillar): ''' helper method for present. ensure that scaling_policies are set ''' pillar_scaling_policies = copy.deepcopy( __salt__['config.option'](scaling_policies_from_pillar, {}) ) if not scaling_policies and pil...
python
def _determine_scaling_policies(scaling_policies, scaling_policies_from_pillar): ''' helper method for present. ensure that scaling_policies are set ''' pillar_scaling_policies = copy.deepcopy( __salt__['config.option'](scaling_policies_from_pillar, {}) ) if not scaling_policies and pil...
[ "def", "_determine_scaling_policies", "(", "scaling_policies", ",", "scaling_policies_from_pillar", ")", ":", "pillar_scaling_policies", "=", "copy", ".", "deepcopy", "(", "__salt__", "[", "'config.option'", "]", "(", "scaling_policies_from_pillar", ",", "{", "}", ")", ...
helper method for present. ensure that scaling_policies are set
[ "helper", "method", "for", "present", ".", "ensure", "that", "scaling_policies", "are", "set" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_asg.py#L724-L733
train
helper method for present. ensure that scaling_policies are set.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/boto_asg.py
_determine_scheduled_actions
def _determine_scheduled_actions(scheduled_actions, scheduled_actions_from_pillar): ''' helper method for present, ensure scheduled actions are setup ''' tmp = copy.deepcopy( __salt__['config.option'](scheduled_actions_from_pillar, {}) ) # merge with data from state if scheduled_act...
python
def _determine_scheduled_actions(scheduled_actions, scheduled_actions_from_pillar): ''' helper method for present, ensure scheduled actions are setup ''' tmp = copy.deepcopy( __salt__['config.option'](scheduled_actions_from_pillar, {}) ) # merge with data from state if scheduled_act...
[ "def", "_determine_scheduled_actions", "(", "scheduled_actions", ",", "scheduled_actions_from_pillar", ")", ":", "tmp", "=", "copy", ".", "deepcopy", "(", "__salt__", "[", "'config.option'", "]", "(", "scheduled_actions_from_pillar", ",", "{", "}", ")", ")", "# merg...
helper method for present, ensure scheduled actions are setup
[ "helper", "method", "for", "present", "ensure", "scheduled", "actions", "are", "setup" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_asg.py#L736-L746
train
helper method for present ensure scheduled actions are setup
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/boto_asg.py
_determine_notification_info
def _determine_notification_info(notification_arn, notification_arn_from_pillar, notification_types, notification_types_from_pillar): ''' helper method for present. ensure that notification_configs are set ''...
python
def _determine_notification_info(notification_arn, notification_arn_from_pillar, notification_types, notification_types_from_pillar): ''' helper method for present. ensure that notification_configs are set ''...
[ "def", "_determine_notification_info", "(", "notification_arn", ",", "notification_arn_from_pillar", ",", "notification_types", ",", "notification_types_from_pillar", ")", ":", "pillar_arn_list", "=", "copy", ".", "deepcopy", "(", "__salt__", "[", "'config.option'", "]", ...
helper method for present. ensure that notification_configs are set
[ "helper", "method", "for", "present", ".", "ensure", "that", "notification_configs", "are", "set" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_asg.py#L749-L767
train
helper method for present. ensure that notification_configs are set.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/boto_asg.py
_alarms_present
def _alarms_present(name, min_size_equals_max_size, alarms, alarms_from_pillar, region, key, keyid, profile): ''' helper method for present. ensure that cloudwatch_alarms are set ''' # load data from alarms_from_pillar tmp = copy.deepcopy(__salt__['config.option'](alarms_from_pillar, {})) # mer...
python
def _alarms_present(name, min_size_equals_max_size, alarms, alarms_from_pillar, region, key, keyid, profile): ''' helper method for present. ensure that cloudwatch_alarms are set ''' # load data from alarms_from_pillar tmp = copy.deepcopy(__salt__['config.option'](alarms_from_pillar, {})) # mer...
[ "def", "_alarms_present", "(", "name", ",", "min_size_equals_max_size", ",", "alarms", ",", "alarms_from_pillar", ",", "region", ",", "key", ",", "keyid", ",", "profile", ")", ":", "# load data from alarms_from_pillar", "tmp", "=", "copy", ".", "deepcopy", "(", ...
helper method for present. ensure that cloudwatch_alarms are set
[ "helper", "method", "for", "present", ".", "ensure", "that", "cloudwatch_alarms", "are", "set" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_asg.py#L770-L819
train
Helper method for present. Ensure that CloudWatch alarms are set.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/boto_asg.py
absent
def absent( name, force=False, region=None, key=None, keyid=None, profile=None, remove_lc=False): ''' Ensure the named autoscale group is deleted. name Name of the autoscale group. force Force deletion of autoscale group. rem...
python
def absent( name, force=False, region=None, key=None, keyid=None, profile=None, remove_lc=False): ''' Ensure the named autoscale group is deleted. name Name of the autoscale group. force Force deletion of autoscale group. rem...
[ "def", "absent", "(", "name", ",", "force", "=", "False", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ",", "remove_lc", "=", "False", ")", ":", "ret", "=", "{", "'name'", ":", "name...
Ensure the named autoscale group is deleted. name Name of the autoscale group. force Force deletion of autoscale group. remove_lc Delete the launch config as well. region The region to connect to. key Secret key to be used. keyid Access key t...
[ "Ensure", "the", "named", "autoscale", "group", "is", "deleted", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_asg.py#L822-L892
train
Ensure the named autoscale group is absent.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/kubernetesmod.py
_setup_conn_old
def _setup_conn_old(**kwargs): ''' Setup kubernetes API connection singleton the old way ''' host = __salt__['config.option']('kubernetes.api_url', 'http://localhost:8080') username = __salt__['config.option']('kubernetes.user') password = __salt__['config.op...
python
def _setup_conn_old(**kwargs): ''' Setup kubernetes API connection singleton the old way ''' host = __salt__['config.option']('kubernetes.api_url', 'http://localhost:8080') username = __salt__['config.option']('kubernetes.user') password = __salt__['config.op...
[ "def", "_setup_conn_old", "(", "*", "*", "kwargs", ")", ":", "host", "=", "__salt__", "[", "'config.option'", "]", "(", "'kubernetes.api_url'", ",", "'http://localhost:8080'", ")", "username", "=", "__salt__", "[", "'config.option'", "]", "(", "'kubernetes.user'",...
Setup kubernetes API connection singleton the old way
[ "Setup", "kubernetes", "API", "connection", "singleton", "the", "old", "way" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/kubernetesmod.py#L117-L188
train
Setup kubernetes API connection singleton the new way
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/kubernetesmod.py
_setup_conn
def _setup_conn(**kwargs): ''' Setup kubernetes API connection singleton ''' kubeconfig = kwargs.get('kubeconfig') or __salt__['config.option']('kubernetes.kubeconfig') kubeconfig_data = kwargs.get('kubeconfig_data') or __salt__['config.option']('kubernetes.kubeconfig-data') context = kwargs.get...
python
def _setup_conn(**kwargs): ''' Setup kubernetes API connection singleton ''' kubeconfig = kwargs.get('kubeconfig') or __salt__['config.option']('kubernetes.kubeconfig') kubeconfig_data = kwargs.get('kubeconfig_data') or __salt__['config.option']('kubernetes.kubeconfig-data') context = kwargs.get...
[ "def", "_setup_conn", "(", "*", "*", "kwargs", ")", ":", "kubeconfig", "=", "kwargs", ".", "get", "(", "'kubeconfig'", ")", "or", "__salt__", "[", "'config.option'", "]", "(", "'kubernetes.kubeconfig'", ")", "kubeconfig_data", "=", "kwargs", ".", "get", "(",...
Setup kubernetes API connection singleton
[ "Setup", "kubernetes", "API", "connection", "singleton" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/kubernetesmod.py#L192-L219
train
Setup kubernetes API connection singleton
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/kubernetesmod.py
ping
def ping(**kwargs): ''' Checks connections with the kubernetes API server. Returns True if the connection can be established, False otherwise. CLI Example: salt '*' kubernetes.ping ''' status = True try: nodes(**kwargs) except CommandExecutionError: status = Fals...
python
def ping(**kwargs): ''' Checks connections with the kubernetes API server. Returns True if the connection can be established, False otherwise. CLI Example: salt '*' kubernetes.ping ''' status = True try: nodes(**kwargs) except CommandExecutionError: status = Fals...
[ "def", "ping", "(", "*", "*", "kwargs", ")", ":", "status", "=", "True", "try", ":", "nodes", "(", "*", "*", "kwargs", ")", "except", "CommandExecutionError", ":", "status", "=", "False", "return", "status" ]
Checks connections with the kubernetes API server. Returns True if the connection can be established, False otherwise. CLI Example: salt '*' kubernetes.ping
[ "Checks", "connections", "with", "the", "kubernetes", "API", "server", ".", "Returns", "True", "if", "the", "connection", "can", "be", "established", "False", "otherwise", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/kubernetesmod.py#L251-L265
train
Checks if the connection to kubernetes API server is established.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/kubernetesmod.py
nodes
def nodes(**kwargs): ''' Return the names of the nodes composing the kubernetes cluster CLI Examples:: salt '*' kubernetes.nodes salt '*' kubernetes.nodes kubeconfig=/etc/salt/k8s/kubeconfig context=minikube ''' cfg = _setup_conn(**kwargs) try: api_instance = kubernetes...
python
def nodes(**kwargs): ''' Return the names of the nodes composing the kubernetes cluster CLI Examples:: salt '*' kubernetes.nodes salt '*' kubernetes.nodes kubeconfig=/etc/salt/k8s/kubeconfig context=minikube ''' cfg = _setup_conn(**kwargs) try: api_instance = kubernetes...
[ "def", "nodes", "(", "*", "*", "kwargs", ")", ":", "cfg", "=", "_setup_conn", "(", "*", "*", "kwargs", ")", "try", ":", "api_instance", "=", "kubernetes", ".", "client", ".", "CoreV1Api", "(", ")", "api_response", "=", "api_instance", ".", "list_node", ...
Return the names of the nodes composing the kubernetes cluster CLI Examples:: salt '*' kubernetes.nodes salt '*' kubernetes.nodes kubeconfig=/etc/salt/k8s/kubeconfig context=minikube
[ "Return", "the", "names", "of", "the", "nodes", "composing", "the", "kubernetes", "cluster" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/kubernetesmod.py#L268-L290
train
Return the names of the kubernetes cluster nodes
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/kubernetesmod.py
node
def node(name, **kwargs): ''' Return the details of the node identified by the specified name CLI Examples:: salt '*' kubernetes.node name='minikube' ''' cfg = _setup_conn(**kwargs) try: api_instance = kubernetes.client.CoreV1Api() api_response = api_instance.list_node(...
python
def node(name, **kwargs): ''' Return the details of the node identified by the specified name CLI Examples:: salt '*' kubernetes.node name='minikube' ''' cfg = _setup_conn(**kwargs) try: api_instance = kubernetes.client.CoreV1Api() api_response = api_instance.list_node(...
[ "def", "node", "(", "name", ",", "*", "*", "kwargs", ")", ":", "cfg", "=", "_setup_conn", "(", "*", "*", "kwargs", ")", "try", ":", "api_instance", "=", "kubernetes", ".", "client", ".", "CoreV1Api", "(", ")", "api_response", "=", "api_instance", ".", ...
Return the details of the node identified by the specified name CLI Examples:: salt '*' kubernetes.node name='minikube'
[ "Return", "the", "details", "of", "the", "node", "identified", "by", "the", "specified", "name" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/kubernetesmod.py#L293-L318
train
Return the details of the specified node
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/kubernetesmod.py
node_add_label
def node_add_label(node_name, label_name, label_value, **kwargs): ''' Set the value of the label identified by `label_name` to `label_value` on the node identified by the name `node_name`. Creates the lable if not present. CLI Examples:: salt '*' kubernetes.node_add_label node_name="miniku...
python
def node_add_label(node_name, label_name, label_value, **kwargs): ''' Set the value of the label identified by `label_name` to `label_value` on the node identified by the name `node_name`. Creates the lable if not present. CLI Examples:: salt '*' kubernetes.node_add_label node_name="miniku...
[ "def", "node_add_label", "(", "node_name", ",", "label_name", ",", "label_value", ",", "*", "*", "kwargs", ")", ":", "cfg", "=", "_setup_conn", "(", "*", "*", "kwargs", ")", "try", ":", "api_instance", "=", "kubernetes", ".", "client", ".", "CoreV1Api", ...
Set the value of the label identified by `label_name` to `label_value` on the node identified by the name `node_name`. Creates the lable if not present. CLI Examples:: salt '*' kubernetes.node_add_label node_name="minikube" \ label_name="foo" label_value="bar"
[ "Set", "the", "value", "of", "the", "label", "identified", "by", "label_name", "to", "label_value", "on", "the", "node", "identified", "by", "the", "name", "node_name", ".", "Creates", "the", "lable", "if", "not", "present", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/kubernetesmod.py#L337-L368
train
Adds a label to a node.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/kubernetesmod.py
namespaces
def namespaces(**kwargs): ''' Return the names of the available namespaces CLI Examples:: salt '*' kubernetes.namespaces salt '*' kubernetes.namespaces kubeconfig=/etc/salt/k8s/kubeconfig context=minikube ''' cfg = _setup_conn(**kwargs) try: api_instance = kubernetes.cl...
python
def namespaces(**kwargs): ''' Return the names of the available namespaces CLI Examples:: salt '*' kubernetes.namespaces salt '*' kubernetes.namespaces kubeconfig=/etc/salt/k8s/kubeconfig context=minikube ''' cfg = _setup_conn(**kwargs) try: api_instance = kubernetes.cl...
[ "def", "namespaces", "(", "*", "*", "kwargs", ")", ":", "cfg", "=", "_setup_conn", "(", "*", "*", "kwargs", ")", "try", ":", "api_instance", "=", "kubernetes", ".", "client", ".", "CoreV1Api", "(", ")", "api_response", "=", "api_instance", ".", "list_nam...
Return the names of the available namespaces CLI Examples:: salt '*' kubernetes.namespaces salt '*' kubernetes.namespaces kubeconfig=/etc/salt/k8s/kubeconfig context=minikube
[ "Return", "the", "names", "of", "the", "available", "namespaces" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/kubernetesmod.py#L404-L426
train
Return the names of the available namespaces
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/kubernetesmod.py
show_deployment
def show_deployment(name, namespace='default', **kwargs): ''' Return the kubernetes deployment defined by name and namespace CLI Examples:: salt '*' kubernetes.show_deployment my-nginx default salt '*' kubernetes.show_deployment name=my-nginx namespace=default ''' cfg = _setup_conn...
python
def show_deployment(name, namespace='default', **kwargs): ''' Return the kubernetes deployment defined by name and namespace CLI Examples:: salt '*' kubernetes.show_deployment my-nginx default salt '*' kubernetes.show_deployment name=my-nginx namespace=default ''' cfg = _setup_conn...
[ "def", "show_deployment", "(", "name", ",", "namespace", "=", "'default'", ",", "*", "*", "kwargs", ")", ":", "cfg", "=", "_setup_conn", "(", "*", "*", "kwargs", ")", "try", ":", "api_instance", "=", "kubernetes", ".", "client", ".", "ExtensionsV1beta1Api"...
Return the kubernetes deployment defined by name and namespace CLI Examples:: salt '*' kubernetes.show_deployment my-nginx default salt '*' kubernetes.show_deployment name=my-nginx namespace=default
[ "Return", "the", "kubernetes", "deployment", "defined", "by", "name", "and", "namespace" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/kubernetesmod.py#L569-L594
train
Show the kubernetes deployment defined by name and namespace
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/kubernetesmod.py
show_namespace
def show_namespace(name, **kwargs): ''' Return information for a given namespace defined by the specified name CLI Examples:: salt '*' kubernetes.show_namespace kube-system ''' cfg = _setup_conn(**kwargs) try: api_instance = kubernetes.client.CoreV1Api() api_response = ...
python
def show_namespace(name, **kwargs): ''' Return information for a given namespace defined by the specified name CLI Examples:: salt '*' kubernetes.show_namespace kube-system ''' cfg = _setup_conn(**kwargs) try: api_instance = kubernetes.client.CoreV1Api() api_response = ...
[ "def", "show_namespace", "(", "name", ",", "*", "*", "kwargs", ")", ":", "cfg", "=", "_setup_conn", "(", "*", "*", "kwargs", ")", "try", ":", "api_instance", "=", "kubernetes", ".", "client", ".", "CoreV1Api", "(", ")", "api_response", "=", "api_instance...
Return information for a given namespace defined by the specified name CLI Examples:: salt '*' kubernetes.show_namespace kube-system
[ "Return", "information", "for", "a", "given", "namespace", "defined", "by", "the", "specified", "name" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/kubernetesmod.py#L653-L677
train
Show information for a given namespace
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/kubernetesmod.py
show_secret
def show_secret(name, namespace='default', decode=False, **kwargs): ''' Return the kubernetes secret defined by name and namespace. The secrets can be decoded if specified by the user. Warning: this has security implications. CLI Examples:: salt '*' kubernetes.show_secret confidential defa...
python
def show_secret(name, namespace='default', decode=False, **kwargs): ''' Return the kubernetes secret defined by name and namespace. The secrets can be decoded if specified by the user. Warning: this has security implications. CLI Examples:: salt '*' kubernetes.show_secret confidential defa...
[ "def", "show_secret", "(", "name", ",", "namespace", "=", "'default'", ",", "decode", "=", "False", ",", "*", "*", "kwargs", ")", ":", "cfg", "=", "_setup_conn", "(", "*", "*", "kwargs", ")", "try", ":", "api_instance", "=", "kubernetes", ".", "client"...
Return the kubernetes secret defined by name and namespace. The secrets can be decoded if specified by the user. Warning: this has security implications. CLI Examples:: salt '*' kubernetes.show_secret confidential default salt '*' kubernetes.show_secret name=confidential namespace=default ...
[ "Return", "the", "kubernetes", "secret", "defined", "by", "name", "and", "namespace", ".", "The", "secrets", "can", "be", "decoded", "if", "specified", "by", "the", "user", ".", "Warning", ":", "this", "has", "security", "implications", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/kubernetesmod.py#L680-L713
train
Show the kubernetes secret defined by name and namespace.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/kubernetesmod.py
delete_deployment
def delete_deployment(name, namespace='default', **kwargs): ''' Deletes the kubernetes deployment defined by name and namespace CLI Examples:: salt '*' kubernetes.delete_deployment my-nginx salt '*' kubernetes.delete_deployment name=my-nginx namespace=default ''' cfg = _setup_conn(...
python
def delete_deployment(name, namespace='default', **kwargs): ''' Deletes the kubernetes deployment defined by name and namespace CLI Examples:: salt '*' kubernetes.delete_deployment my-nginx salt '*' kubernetes.delete_deployment name=my-nginx namespace=default ''' cfg = _setup_conn(...
[ "def", "delete_deployment", "(", "name", ",", "namespace", "=", "'default'", ",", "*", "*", "kwargs", ")", ":", "cfg", "=", "_setup_conn", "(", "*", "*", "kwargs", ")", "body", "=", "kubernetes", ".", "client", ".", "V1DeleteOptions", "(", "orphan_dependen...
Deletes the kubernetes deployment defined by name and namespace CLI Examples:: salt '*' kubernetes.delete_deployment my-nginx salt '*' kubernetes.delete_deployment name=my-nginx namespace=default
[ "Deletes", "the", "kubernetes", "deployment", "defined", "by", "name", "and", "namespace" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/kubernetesmod.py#L746-L798
train
Deletes the kubernetes deployment defined by name and namespace.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/kubernetesmod.py
delete_service
def delete_service(name, namespace='default', **kwargs): ''' Deletes the kubernetes service defined by name and namespace CLI Examples:: salt '*' kubernetes.delete_service my-nginx default salt '*' kubernetes.delete_service name=my-nginx namespace=default ''' cfg = _setup_conn(**kw...
python
def delete_service(name, namespace='default', **kwargs): ''' Deletes the kubernetes service defined by name and namespace CLI Examples:: salt '*' kubernetes.delete_service my-nginx default salt '*' kubernetes.delete_service name=my-nginx namespace=default ''' cfg = _setup_conn(**kw...
[ "def", "delete_service", "(", "name", ",", "namespace", "=", "'default'", ",", "*", "*", "kwargs", ")", ":", "cfg", "=", "_setup_conn", "(", "*", "*", "kwargs", ")", "try", ":", "api_instance", "=", "kubernetes", ".", "client", ".", "CoreV1Api", "(", "...
Deletes the kubernetes service defined by name and namespace CLI Examples:: salt '*' kubernetes.delete_service my-nginx default salt '*' kubernetes.delete_service name=my-nginx namespace=default
[ "Deletes", "the", "kubernetes", "service", "defined", "by", "name", "and", "namespace" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/kubernetesmod.py#L801-L828
train
Deletes the kubernetes service defined by name and namespace
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/kubernetesmod.py
delete_pod
def delete_pod(name, namespace='default', **kwargs): ''' Deletes the kubernetes pod defined by name and namespace CLI Examples:: salt '*' kubernetes.delete_pod guestbook-708336848-5nl8c default salt '*' kubernetes.delete_pod name=guestbook-708336848-5nl8c namespace=default ''' cfg ...
python
def delete_pod(name, namespace='default', **kwargs): ''' Deletes the kubernetes pod defined by name and namespace CLI Examples:: salt '*' kubernetes.delete_pod guestbook-708336848-5nl8c default salt '*' kubernetes.delete_pod name=guestbook-708336848-5nl8c namespace=default ''' cfg ...
[ "def", "delete_pod", "(", "name", ",", "namespace", "=", "'default'", ",", "*", "*", "kwargs", ")", ":", "cfg", "=", "_setup_conn", "(", "*", "*", "kwargs", ")", "body", "=", "kubernetes", ".", "client", ".", "V1DeleteOptions", "(", "orphan_dependents", ...
Deletes the kubernetes pod defined by name and namespace CLI Examples:: salt '*' kubernetes.delete_pod guestbook-708336848-5nl8c default salt '*' kubernetes.delete_pod name=guestbook-708336848-5nl8c namespace=default
[ "Deletes", "the", "kubernetes", "pod", "defined", "by", "name", "and", "namespace" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/kubernetesmod.py#L831-L861
train
Deletes the kubernetes pod defined by name and namespace
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/kubernetesmod.py
create_pod
def create_pod( name, namespace, metadata, spec, source, template, saltenv, **kwargs): ''' Creates the kubernetes deployment as defined by the user. ''' body = __create_object_body( kind='Pod', obj_class=kubernetes.client.V1...
python
def create_pod( name, namespace, metadata, spec, source, template, saltenv, **kwargs): ''' Creates the kubernetes deployment as defined by the user. ''' body = __create_object_body( kind='Pod', obj_class=kubernetes.client.V1...
[ "def", "create_pod", "(", "name", ",", "namespace", ",", "metadata", ",", "spec", ",", "source", ",", "template", ",", "saltenv", ",", "*", "*", "kwargs", ")", ":", "body", "=", "__create_object_body", "(", "kind", "=", "'Pod'", ",", "obj_class", "=", ...
Creates the kubernetes deployment as defined by the user.
[ "Creates", "the", "kubernetes", "deployment", "as", "defined", "by", "the", "user", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/kubernetesmod.py#L1003-L1045
train
Creates a kubernetes deployment for the specified namespace.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/kubernetesmod.py
create_secret
def create_secret( name, namespace='default', data=None, source=None, template=None, saltenv='base', **kwargs): ''' Creates the kubernetes secret as defined by the user. CLI Examples:: salt 'minion1' kubernetes.create_secret \ pas...
python
def create_secret( name, namespace='default', data=None, source=None, template=None, saltenv='base', **kwargs): ''' Creates the kubernetes secret as defined by the user. CLI Examples:: salt 'minion1' kubernetes.create_secret \ pas...
[ "def", "create_secret", "(", "name", ",", "namespace", "=", "'default'", ",", "data", "=", "None", ",", "source", "=", "None", ",", "template", "=", "None", ",", "saltenv", "=", "'base'", ",", "*", "*", "kwargs", ")", ":", "if", "source", ":", "data"...
Creates the kubernetes secret as defined by the user. CLI Examples:: salt 'minion1' kubernetes.create_secret \ passwords default '{"db": "letmein"}' salt 'minion2' kubernetes.create_secret \ name=passwords namespace=default data='{"db": "letmein"}'
[ "Creates", "the", "kubernetes", "secret", "as", "defined", "by", "the", "user", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/kubernetesmod.py#L1093-L1145
train
Creates a kubernetes secret as defined by the user.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/kubernetesmod.py
create_configmap
def create_configmap( name, namespace, data, source=None, template=None, saltenv='base', **kwargs): ''' Creates the kubernetes configmap as defined by the user. CLI Examples:: salt 'minion1' kubernetes.create_configmap \ settings ...
python
def create_configmap( name, namespace, data, source=None, template=None, saltenv='base', **kwargs): ''' Creates the kubernetes configmap as defined by the user. CLI Examples:: salt 'minion1' kubernetes.create_configmap \ settings ...
[ "def", "create_configmap", "(", "name", ",", "namespace", ",", "data", ",", "source", "=", "None", ",", "template", "=", "None", ",", "saltenv", "=", "'base'", ",", "*", "*", "kwargs", ")", ":", "if", "source", ":", "data", "=", "__read_and_render_yaml_f...
Creates the kubernetes configmap as defined by the user. CLI Examples:: salt 'minion1' kubernetes.create_configmap \ settings default '{"example.conf": "# example file"}' salt 'minion2' kubernetes.create_configmap \ name=settings namespace=default data='{"example.conf": "#...
[ "Creates", "the", "kubernetes", "configmap", "as", "defined", "by", "the", "user", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/kubernetesmod.py#L1148-L1196
train
Creates a kubernetes configmap with the specified name namespace and data.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/kubernetesmod.py
create_namespace
def create_namespace( name, **kwargs): ''' Creates a namespace with the specified name. CLI Example: salt '*' kubernetes.create_namespace salt salt '*' kubernetes.create_namespace name=salt ''' meta_obj = kubernetes.client.V1ObjectMeta(name=name) body = kubernet...
python
def create_namespace( name, **kwargs): ''' Creates a namespace with the specified name. CLI Example: salt '*' kubernetes.create_namespace salt salt '*' kubernetes.create_namespace name=salt ''' meta_obj = kubernetes.client.V1ObjectMeta(name=name) body = kubernet...
[ "def", "create_namespace", "(", "name", ",", "*", "*", "kwargs", ")", ":", "meta_obj", "=", "kubernetes", ".", "client", ".", "V1ObjectMeta", "(", "name", "=", "name", ")", "body", "=", "kubernetes", ".", "client", ".", "V1Namespace", "(", "metadata", "=...
Creates a namespace with the specified name. CLI Example: salt '*' kubernetes.create_namespace salt salt '*' kubernetes.create_namespace name=salt
[ "Creates", "a", "namespace", "with", "the", "specified", "name", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/kubernetesmod.py#L1199-L1231
train
Creates a namespace with the specified name.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/kubernetesmod.py
replace_deployment
def replace_deployment(name, metadata, spec, source, template, saltenv, namespace='default', **kwargs): ''' Replaces an existing deployment with a new ...
python
def replace_deployment(name, metadata, spec, source, template, saltenv, namespace='default', **kwargs): ''' Replaces an existing deployment with a new ...
[ "def", "replace_deployment", "(", "name", ",", "metadata", ",", "spec", ",", "source", ",", "template", ",", "saltenv", ",", "namespace", "=", "'default'", ",", "*", "*", "kwargs", ")", ":", "body", "=", "__create_object_body", "(", "kind", "=", "'Deployme...
Replaces an existing deployment with a new one defined by name and namespace, having the specificed metadata and spec.
[ "Replaces", "an", "existing", "deployment", "with", "a", "new", "one", "defined", "by", "name", "and", "namespace", "having", "the", "specificed", "metadata", "and", "spec", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/kubernetesmod.py#L1234-L1276
train
Replaces an existing deployment with a new one defined by name and namespace having the specificed metadata and specificed template and template and saltenv.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/kubernetesmod.py
replace_service
def replace_service(name, metadata, spec, source, template, old_service, saltenv, namespace='default', **kwargs): ''' Replaces an existing service with ...
python
def replace_service(name, metadata, spec, source, template, old_service, saltenv, namespace='default', **kwargs): ''' Replaces an existing service with ...
[ "def", "replace_service", "(", "name", ",", "metadata", ",", "spec", ",", "source", ",", "template", ",", "old_service", ",", "saltenv", ",", "namespace", "=", "'default'", ",", "*", "*", "kwargs", ")", ":", "body", "=", "__create_object_body", "(", "kind"...
Replaces an existing service with a new one defined by name and namespace, having the specificed metadata and spec.
[ "Replaces", "an", "existing", "service", "with", "a", "new", "one", "defined", "by", "name", "and", "namespace", "having", "the", "specificed", "metadata", "and", "spec", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/kubernetesmod.py#L1279-L1327
train
Replaces an existing service with a new one defined by name and namespace.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/kubernetesmod.py
__create_object_body
def __create_object_body(kind, obj_class, spec_creator, name, namespace, metadata, spec, source, template, ...
python
def __create_object_body(kind, obj_class, spec_creator, name, namespace, metadata, spec, source, template, ...
[ "def", "__create_object_body", "(", "kind", ",", "obj_class", ",", "spec_creator", ",", "name", ",", "namespace", ",", "metadata", ",", "spec", ",", "source", ",", "template", ",", "saltenv", ")", ":", "if", "source", ":", "src_obj", "=", "__read_and_render_...
Create a Kubernetes Object body instance.
[ "Create", "a", "Kubernetes", "Object", "body", "instance", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/kubernetesmod.py#L1434-L1464
train
Create a Kubernetes Object body instance.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/kubernetesmod.py
__read_and_render_yaml_file
def __read_and_render_yaml_file(source, template, saltenv): ''' Read a yaml file and, if needed, renders that using the specifieds templating. Returns the python objects defined inside of the file. ''' sfn = __salt__['cp.cache_file'](so...
python
def __read_and_render_yaml_file(source, template, saltenv): ''' Read a yaml file and, if needed, renders that using the specifieds templating. Returns the python objects defined inside of the file. ''' sfn = __salt__['cp.cache_file'](so...
[ "def", "__read_and_render_yaml_file", "(", "source", ",", "template", ",", "saltenv", ")", ":", "sfn", "=", "__salt__", "[", "'cp.cache_file'", "]", "(", "source", ",", "saltenv", ")", "if", "not", "sfn", ":", "raise", "CommandExecutionError", "(", "'Source fi...
Read a yaml file and, if needed, renders that using the specifieds templating. Returns the python objects defined inside of the file.
[ "Read", "a", "yaml", "file", "and", "if", "needed", "renders", "that", "using", "the", "specifieds", "templating", ".", "Returns", "the", "python", "objects", "defined", "inside", "of", "the", "file", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/kubernetesmod.py#L1467-L1510
train
Read a yaml file and if needed renders it using the specified s templating. Returns the python objects defined inside of 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/kubernetesmod.py
__dict_to_object_meta
def __dict_to_object_meta(name, namespace, metadata): ''' Converts a dictionary into kubernetes ObjectMetaV1 instance. ''' meta_obj = kubernetes.client.V1ObjectMeta() meta_obj.namespace = namespace # Replicate `kubectl [create|replace|apply] --record` if 'annotations' not in metadata: ...
python
def __dict_to_object_meta(name, namespace, metadata): ''' Converts a dictionary into kubernetes ObjectMetaV1 instance. ''' meta_obj = kubernetes.client.V1ObjectMeta() meta_obj.namespace = namespace # Replicate `kubectl [create|replace|apply] --record` if 'annotations' not in metadata: ...
[ "def", "__dict_to_object_meta", "(", "name", ",", "namespace", ",", "metadata", ")", ":", "meta_obj", "=", "kubernetes", ".", "client", ".", "V1ObjectMeta", "(", ")", "meta_obj", ".", "namespace", "=", "namespace", "# Replicate `kubectl [create|replace|apply] --record...
Converts a dictionary into kubernetes ObjectMetaV1 instance.
[ "Converts", "a", "dictionary", "into", "kubernetes", "ObjectMetaV1", "instance", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/kubernetesmod.py#L1513-L1536
train
Converts a dictionary into kubernetes ObjectMetaV1 instance.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/kubernetesmod.py
__dict_to_deployment_spec
def __dict_to_deployment_spec(spec): ''' Converts a dictionary into kubernetes AppsV1beta1DeploymentSpec instance. ''' spec_obj = AppsV1beta1DeploymentSpec(template=spec.get('template', '')) for key, value in iteritems(spec): if hasattr(spec_obj, key): setattr(spec_obj, key, valu...
python
def __dict_to_deployment_spec(spec): ''' Converts a dictionary into kubernetes AppsV1beta1DeploymentSpec instance. ''' spec_obj = AppsV1beta1DeploymentSpec(template=spec.get('template', '')) for key, value in iteritems(spec): if hasattr(spec_obj, key): setattr(spec_obj, key, valu...
[ "def", "__dict_to_deployment_spec", "(", "spec", ")", ":", "spec_obj", "=", "AppsV1beta1DeploymentSpec", "(", "template", "=", "spec", ".", "get", "(", "'template'", ",", "''", ")", ")", "for", "key", ",", "value", "in", "iteritems", "(", "spec", ")", ":",...
Converts a dictionary into kubernetes AppsV1beta1DeploymentSpec instance.
[ "Converts", "a", "dictionary", "into", "kubernetes", "AppsV1beta1DeploymentSpec", "instance", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/kubernetesmod.py#L1539-L1548
train
Converts a dictionary into kubernetes AppsV1beta1DeploymentSpec instance.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/kubernetesmod.py
__dict_to_pod_spec
def __dict_to_pod_spec(spec): ''' Converts a dictionary into kubernetes V1PodSpec instance. ''' spec_obj = kubernetes.client.V1PodSpec() for key, value in iteritems(spec): if hasattr(spec_obj, key): setattr(spec_obj, key, value) return spec_obj
python
def __dict_to_pod_spec(spec): ''' Converts a dictionary into kubernetes V1PodSpec instance. ''' spec_obj = kubernetes.client.V1PodSpec() for key, value in iteritems(spec): if hasattr(spec_obj, key): setattr(spec_obj, key, value) return spec_obj
[ "def", "__dict_to_pod_spec", "(", "spec", ")", ":", "spec_obj", "=", "kubernetes", ".", "client", ".", "V1PodSpec", "(", ")", "for", "key", ",", "value", "in", "iteritems", "(", "spec", ")", ":", "if", "hasattr", "(", "spec_obj", ",", "key", ")", ":", ...
Converts a dictionary into kubernetes V1PodSpec instance.
[ "Converts", "a", "dictionary", "into", "kubernetes", "V1PodSpec", "instance", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/kubernetesmod.py#L1551-L1560
train
Converts a dictionary into kubernetes V1PodSpec instance.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/kubernetesmod.py
__dict_to_service_spec
def __dict_to_service_spec(spec): ''' Converts a dictionary into kubernetes V1ServiceSpec instance. ''' spec_obj = kubernetes.client.V1ServiceSpec() for key, value in iteritems(spec): # pylint: disable=too-many-nested-blocks if key == 'ports': spec_obj.ports = [] for...
python
def __dict_to_service_spec(spec): ''' Converts a dictionary into kubernetes V1ServiceSpec instance. ''' spec_obj = kubernetes.client.V1ServiceSpec() for key, value in iteritems(spec): # pylint: disable=too-many-nested-blocks if key == 'ports': spec_obj.ports = [] for...
[ "def", "__dict_to_service_spec", "(", "spec", ")", ":", "spec_obj", "=", "kubernetes", ".", "client", ".", "V1ServiceSpec", "(", ")", "for", "key", ",", "value", "in", "iteritems", "(", "spec", ")", ":", "# pylint: disable=too-many-nested-blocks", "if", "key", ...
Converts a dictionary into kubernetes V1ServiceSpec instance.
[ "Converts", "a", "dictionary", "into", "kubernetes", "V1ServiceSpec", "instance", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/kubernetesmod.py#L1563-L1583
train
Converts a dictionary into kubernetes V1ServiceSpec instance.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/kubernetesmod.py
__enforce_only_strings_dict
def __enforce_only_strings_dict(dictionary): ''' Returns a dictionary that has string keys and values. ''' ret = {} for key, value in iteritems(dictionary): ret[six.text_type(key)] = six.text_type(value) return ret
python
def __enforce_only_strings_dict(dictionary): ''' Returns a dictionary that has string keys and values. ''' ret = {} for key, value in iteritems(dictionary): ret[six.text_type(key)] = six.text_type(value) return ret
[ "def", "__enforce_only_strings_dict", "(", "dictionary", ")", ":", "ret", "=", "{", "}", "for", "key", ",", "value", "in", "iteritems", "(", "dictionary", ")", ":", "ret", "[", "six", ".", "text_type", "(", "key", ")", "]", "=", "six", ".", "text_type"...
Returns a dictionary that has string keys and values.
[ "Returns", "a", "dictionary", "that", "has", "string", "keys", "and", "values", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/kubernetesmod.py#L1586-L1595
train
Enforces that a dictionary has string keys and values.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...