id
int32
0
252k
repo
stringlengths
7
55
path
stringlengths
4
127
func_name
stringlengths
1
88
original_string
stringlengths
75
19.8k
language
stringclasses
1 value
code
stringlengths
75
19.8k
code_tokens
list
docstring
stringlengths
3
17.3k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
87
242
33,100
saltstack/salt
salt/modules/win_powercfg.py
set_monitor_timeout
def set_monitor_timeout(timeout, power='ac', scheme=None): ''' Set the monitor timeout in minutes for the given power scheme Args: timeout (int): The amount of time in minutes before the monitor will timeout power (str): Set the value for AC or DC power. Default is ...
python
def set_monitor_timeout(timeout, power='ac', scheme=None): ''' Set the monitor timeout in minutes for the given power scheme Args: timeout (int): The amount of time in minutes before the monitor will timeout power (str): Set the value for AC or DC power. Default is ...
[ "def", "set_monitor_timeout", "(", "timeout", ",", "power", "=", "'ac'", ",", "scheme", "=", "None", ")", ":", "return", "_set_powercfg_value", "(", "scheme", "=", "scheme", ",", "sub_group", "=", "'SUB_VIDEO'", ",", "setting_guid", "=", "'VIDEOIDLE'", ",", ...
Set the monitor timeout in minutes for the given power scheme Args: timeout (int): The amount of time in minutes before the monitor will timeout power (str): Set the value for AC or DC power. Default is ``ac``. Valid options are: - ``ac`` (AC Po...
[ "Set", "the", "monitor", "timeout", "in", "minutes", "for", "the", "given", "power", "scheme" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_powercfg.py#L84-L123
33,101
saltstack/salt
salt/modules/win_powercfg.py
set_disk_timeout
def set_disk_timeout(timeout, power='ac', scheme=None): ''' Set the disk timeout in minutes for the given power scheme Args: timeout (int): The amount of time in minutes before the disk will timeout power (str): Set the value for AC or DC power. Default is ``ac``. V...
python
def set_disk_timeout(timeout, power='ac', scheme=None): ''' Set the disk timeout in minutes for the given power scheme Args: timeout (int): The amount of time in minutes before the disk will timeout power (str): Set the value for AC or DC power. Default is ``ac``. V...
[ "def", "set_disk_timeout", "(", "timeout", ",", "power", "=", "'ac'", ",", "scheme", "=", "None", ")", ":", "return", "_set_powercfg_value", "(", "scheme", "=", "scheme", ",", "sub_group", "=", "'SUB_DISK'", ",", "setting_guid", "=", "'DISKIDLE'", ",", "powe...
Set the disk timeout in minutes for the given power scheme Args: timeout (int): The amount of time in minutes before the disk will timeout power (str): Set the value for AC or DC power. Default is ``ac``. Valid options are: - ``ac`` (AC Power) ...
[ "Set", "the", "disk", "timeout", "in", "minutes", "for", "the", "given", "power", "scheme" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_powercfg.py#L156-L195
33,102
saltstack/salt
salt/modules/win_powercfg.py
set_standby_timeout
def set_standby_timeout(timeout, power='ac', scheme=None): ''' Set the standby timeout in minutes for the given power scheme Args: timeout (int): The amount of time in minutes before the computer sleeps power (str): Set the value for AC or DC power. Default is ``ac`...
python
def set_standby_timeout(timeout, power='ac', scheme=None): ''' Set the standby timeout in minutes for the given power scheme Args: timeout (int): The amount of time in minutes before the computer sleeps power (str): Set the value for AC or DC power. Default is ``ac`...
[ "def", "set_standby_timeout", "(", "timeout", ",", "power", "=", "'ac'", ",", "scheme", "=", "None", ")", ":", "return", "_set_powercfg_value", "(", "scheme", "=", "scheme", ",", "sub_group", "=", "'SUB_SLEEP'", ",", "setting_guid", "=", "'STANDBYIDLE'", ",", ...
Set the standby timeout in minutes for the given power scheme Args: timeout (int): The amount of time in minutes before the computer sleeps power (str): Set the value for AC or DC power. Default is ``ac``. Valid options are: - ``ac`` (AC Power) ...
[ "Set", "the", "standby", "timeout", "in", "minutes", "for", "the", "given", "power", "scheme" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_powercfg.py#L228-L267
33,103
saltstack/salt
salt/modules/win_powercfg.py
set_hibernate_timeout
def set_hibernate_timeout(timeout, power='ac', scheme=None): ''' Set the hibernate timeout in minutes for the given power scheme Args: timeout (int): The amount of time in minutes before the computer hibernates power (str): Set the value for AC or DC power. Default ...
python
def set_hibernate_timeout(timeout, power='ac', scheme=None): ''' Set the hibernate timeout in minutes for the given power scheme Args: timeout (int): The amount of time in minutes before the computer hibernates power (str): Set the value for AC or DC power. Default ...
[ "def", "set_hibernate_timeout", "(", "timeout", ",", "power", "=", "'ac'", ",", "scheme", "=", "None", ")", ":", "return", "_set_powercfg_value", "(", "scheme", "=", "scheme", ",", "sub_group", "=", "'SUB_SLEEP'", ",", "setting_guid", "=", "'HIBERNATEIDLE'", "...
Set the hibernate timeout in minutes for the given power scheme Args: timeout (int): The amount of time in minutes before the computer hibernates power (str): Set the value for AC or DC power. Default is ``ac``. Valid options are: - ``ac`` (AC P...
[ "Set", "the", "hibernate", "timeout", "in", "minutes", "for", "the", "given", "power", "scheme" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_powercfg.py#L299-L338
33,104
saltstack/salt
salt/modules/cron.py
_cron_id
def _cron_id(cron): '''SAFETYBELT, Only set if we really have an identifier''' cid = None if cron['identifier']: cid = cron['identifier'] else: cid = SALT_CRON_NO_IDENTIFIER if cid: return _ensure_string(cid)
python
def _cron_id(cron): '''SAFETYBELT, Only set if we really have an identifier''' cid = None if cron['identifier']: cid = cron['identifier'] else: cid = SALT_CRON_NO_IDENTIFIER if cid: return _ensure_string(cid)
[ "def", "_cron_id", "(", "cron", ")", ":", "cid", "=", "None", "if", "cron", "[", "'identifier'", "]", ":", "cid", "=", "cron", "[", "'identifier'", "]", "else", ":", "cid", "=", "SALT_CRON_NO_IDENTIFIER", "if", "cid", ":", "return", "_ensure_string", "("...
SAFETYBELT, Only set if we really have an identifier
[ "SAFETYBELT", "Only", "set", "if", "we", "really", "have", "an", "identifier" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/cron.py#L52-L60
33,105
saltstack/salt
salt/modules/cron.py
_get_cron_cmdstr
def _get_cron_cmdstr(path, user=None): ''' Returns a format string, to be used to build a crontab command. ''' if user: cmd = 'crontab -u {0}'.format(user) else: cmd = 'crontab' return '{0} {1}'.format(cmd, path)
python
def _get_cron_cmdstr(path, user=None): ''' Returns a format string, to be used to build a crontab command. ''' if user: cmd = 'crontab -u {0}'.format(user) else: cmd = 'crontab' return '{0} {1}'.format(cmd, path)
[ "def", "_get_cron_cmdstr", "(", "path", ",", "user", "=", "None", ")", ":", "if", "user", ":", "cmd", "=", "'crontab -u {0}'", ".", "format", "(", "user", ")", "else", ":", "cmd", "=", "'crontab'", "return", "'{0} {1}'", ".", "format", "(", "cmd", ",",...
Returns a format string, to be used to build a crontab command.
[ "Returns", "a", "format", "string", "to", "be", "used", "to", "build", "a", "crontab", "command", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/cron.py#L180-L188
33,106
saltstack/salt
salt/modules/cron.py
write_cron_file
def write_cron_file(user, path): ''' Writes the contents of a file to a user's crontab CLI Example: .. code-block:: bash salt '*' cron.write_cron_file root /tmp/new_cron .. versionchanged:: 2015.8.9 .. note:: Some OS' do not support specifying user via the `crontab` command...
python
def write_cron_file(user, path): ''' Writes the contents of a file to a user's crontab CLI Example: .. code-block:: bash salt '*' cron.write_cron_file root /tmp/new_cron .. versionchanged:: 2015.8.9 .. note:: Some OS' do not support specifying user via the `crontab` command...
[ "def", "write_cron_file", "(", "user", ",", "path", ")", ":", "if", "_check_instance_uid_match", "(", "user", ")", "or", "__grains__", ".", "get", "(", "'os_family'", ")", "in", "(", "'Solaris'", ",", "'AIX'", ")", ":", "return", "__salt__", "[", "'cmd.ret...
Writes the contents of a file to a user's crontab CLI Example: .. code-block:: bash salt '*' cron.write_cron_file root /tmp/new_cron .. versionchanged:: 2015.8.9 .. note:: Some OS' do not support specifying user via the `crontab` command i.e. (Solaris, AIX)
[ "Writes", "the", "contents", "of", "a", "file", "to", "a", "user", "s", "crontab" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/cron.py#L198-L220
33,107
saltstack/salt
salt/modules/cron.py
_write_cron_lines
def _write_cron_lines(user, lines): ''' Takes a list of lines to be committed to a user's crontab and writes it ''' lines = [salt.utils.stringutils.to_str(_l) for _l in lines] path = salt.utils.files.mkstemp() if _check_instance_uid_match(user) or __grains__.get('os_family') in ('Solaris', 'AIX'...
python
def _write_cron_lines(user, lines): ''' Takes a list of lines to be committed to a user's crontab and writes it ''' lines = [salt.utils.stringutils.to_str(_l) for _l in lines] path = salt.utils.files.mkstemp() if _check_instance_uid_match(user) or __grains__.get('os_family') in ('Solaris', 'AIX'...
[ "def", "_write_cron_lines", "(", "user", ",", "lines", ")", ":", "lines", "=", "[", "salt", ".", "utils", ".", "stringutils", ".", "to_str", "(", "_l", ")", "for", "_l", "in", "lines", "]", "path", "=", "salt", ".", "utils", ".", "files", ".", "mks...
Takes a list of lines to be committed to a user's crontab and writes it
[ "Takes", "a", "list", "of", "lines", "to", "be", "committed", "to", "a", "user", "s", "crontab", "and", "writes", "it" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/cron.py#L248-L267
33,108
saltstack/salt
salt/modules/cron.py
raw_cron
def raw_cron(user): ''' Return the contents of the user's crontab CLI Example: .. code-block:: bash salt '*' cron.raw_cron root ''' if _check_instance_uid_match(user) or __grains__.get('os_family') in ('Solaris', 'AIX'): cmd = 'crontab -l' # Preserve line endings ...
python
def raw_cron(user): ''' Return the contents of the user's crontab CLI Example: .. code-block:: bash salt '*' cron.raw_cron root ''' if _check_instance_uid_match(user) or __grains__.get('os_family') in ('Solaris', 'AIX'): cmd = 'crontab -l' # Preserve line endings ...
[ "def", "raw_cron", "(", "user", ")", ":", "if", "_check_instance_uid_match", "(", "user", ")", "or", "__grains__", ".", "get", "(", "'os_family'", ")", "in", "(", "'Solaris'", ",", "'AIX'", ")", ":", "cmd", "=", "'crontab -l'", "# Preserve line endings", "li...
Return the contents of the user's crontab CLI Example: .. code-block:: bash salt '*' cron.raw_cron root
[ "Return", "the", "contents", "of", "the", "user", "s", "crontab" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/cron.py#L280-L312
33,109
saltstack/salt
salt/modules/cron.py
list_tab
def list_tab(user): ''' Return the contents of the specified user's crontab CLI Example: .. code-block:: bash salt '*' cron.list_tab root ''' data = raw_cron(user) ret = {'pre': [], 'crons': [], 'special': [], 'env': []} flag = False commen...
python
def list_tab(user): ''' Return the contents of the specified user's crontab CLI Example: .. code-block:: bash salt '*' cron.list_tab root ''' data = raw_cron(user) ret = {'pre': [], 'crons': [], 'special': [], 'env': []} flag = False commen...
[ "def", "list_tab", "(", "user", ")", ":", "data", "=", "raw_cron", "(", "user", ")", "ret", "=", "{", "'pre'", ":", "[", "]", ",", "'crons'", ":", "[", "]", ",", "'special'", ":", "[", "]", ",", "'env'", ":", "[", "]", "}", "flag", "=", "Fals...
Return the contents of the specified user's crontab CLI Example: .. code-block:: bash salt '*' cron.list_tab root
[ "Return", "the", "contents", "of", "the", "specified", "user", "s", "crontab" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/cron.py#L315-L404
33,110
saltstack/salt
salt/modules/cron.py
get_entry
def get_entry(user, identifier=None, cmd=None): ''' Return the specified entry from user's crontab. identifier will be used if specified, otherwise will lookup cmd Either identifier or cmd should be specified. user: User's crontab to query identifier: Search for line with ident...
python
def get_entry(user, identifier=None, cmd=None): ''' Return the specified entry from user's crontab. identifier will be used if specified, otherwise will lookup cmd Either identifier or cmd should be specified. user: User's crontab to query identifier: Search for line with ident...
[ "def", "get_entry", "(", "user", ",", "identifier", "=", "None", ",", "cmd", "=", "None", ")", ":", "cron_entries", "=", "list_tab", "(", "user", ")", ".", "get", "(", "'crons'", ",", "False", ")", "for", "cron_entry", "in", "cron_entries", ":", "if", ...
Return the specified entry from user's crontab. identifier will be used if specified, otherwise will lookup cmd Either identifier or cmd should be specified. user: User's crontab to query identifier: Search for line with identifier cmd: Search for cron line with cmd C...
[ "Return", "the", "specified", "entry", "from", "user", "s", "crontab", ".", "identifier", "will", "be", "used", "if", "specified", "otherwise", "will", "lookup", "cmd", "Either", "identifier", "or", "cmd", "should", "be", "specified", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/cron.py#L411-L438
33,111
saltstack/salt
salt/modules/cron.py
set_special
def set_special(user, special, cmd, commented=False, comment=None, identifier=None): ''' Set up a special command in the crontab. CLI Example: .. code-block:: bash salt '*' cron.set_special root @hourly 'echo foob...
python
def set_special(user, special, cmd, commented=False, comment=None, identifier=None): ''' Set up a special command in the crontab. CLI Example: .. code-block:: bash salt '*' cron.set_special root @hourly 'echo foob...
[ "def", "set_special", "(", "user", ",", "special", ",", "cmd", ",", "commented", "=", "False", ",", "comment", "=", "None", ",", "identifier", "=", "None", ")", ":", "lst", "=", "list_tab", "(", "user", ")", "for", "cron", "in", "lst", "[", "'special...
Set up a special command in the crontab. CLI Example: .. code-block:: bash salt '*' cron.set_special root @hourly 'echo foobar'
[ "Set", "up", "a", "special", "command", "in", "the", "crontab", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/cron.py#L441-L516
33,112
saltstack/salt
salt/modules/cron.py
rm_special
def rm_special(user, cmd, special=None, identifier=None): ''' Remove a special cron job for a specified user. CLI Example: .. code-block:: bash salt '*' cron.rm_special root /usr/bin/foo ''' lst = list_tab(user) ret = 'absent' rm_ = None for ind in range(len(lst['special']...
python
def rm_special(user, cmd, special=None, identifier=None): ''' Remove a special cron job for a specified user. CLI Example: .. code-block:: bash salt '*' cron.rm_special root /usr/bin/foo ''' lst = list_tab(user) ret = 'absent' rm_ = None for ind in range(len(lst['special']...
[ "def", "rm_special", "(", "user", ",", "cmd", ",", "special", "=", "None", ",", "identifier", "=", "None", ")", ":", "lst", "=", "list_tab", "(", "user", ")", "ret", "=", "'absent'", "rm_", "=", "None", "for", "ind", "in", "range", "(", "len", "(",...
Remove a special cron job for a specified user. CLI Example: .. code-block:: bash salt '*' cron.rm_special root /usr/bin/foo
[ "Remove", "a", "special", "cron", "job", "for", "a", "specified", "user", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/cron.py#L664-L694
33,113
saltstack/salt
salt/modules/cron.py
set_env
def set_env(user, name, value=None): ''' Set up an environment variable in the crontab. CLI Example: .. code-block:: bash salt '*' cron.set_env root MAILTO user@example.com ''' lst = list_tab(user) for env in lst['env']: if name == env['name']: if value != env[...
python
def set_env(user, name, value=None): ''' Set up an environment variable in the crontab. CLI Example: .. code-block:: bash salt '*' cron.set_env root MAILTO user@example.com ''' lst = list_tab(user) for env in lst['env']: if name == env['name']: if value != env[...
[ "def", "set_env", "(", "user", ",", "name", ",", "value", "=", "None", ")", ":", "lst", "=", "list_tab", "(", "user", ")", "for", "env", "in", "lst", "[", "'env'", "]", ":", "if", "name", "==", "env", "[", "'name'", "]", ":", "if", "value", "!=...
Set up an environment variable in the crontab. CLI Example: .. code-block:: bash salt '*' cron.set_env root MAILTO user@example.com
[ "Set", "up", "an", "environment", "variable", "in", "the", "crontab", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/cron.py#L748-L775
33,114
saltstack/salt
salt/modules/cron.py
rm_env
def rm_env(user, name): ''' Remove cron environment variable for a specified user. CLI Example: .. code-block:: bash salt '*' cron.rm_env root MAILTO ''' lst = list_tab(user) ret = 'absent' rm_ = None for ind in range(len(lst['env'])): if name == lst['env'][ind]['n...
python
def rm_env(user, name): ''' Remove cron environment variable for a specified user. CLI Example: .. code-block:: bash salt '*' cron.rm_env root MAILTO ''' lst = list_tab(user) ret = 'absent' rm_ = None for ind in range(len(lst['env'])): if name == lst['env'][ind]['n...
[ "def", "rm_env", "(", "user", ",", "name", ")", ":", "lst", "=", "list_tab", "(", "user", ")", "ret", "=", "'absent'", "rm_", "=", "None", "for", "ind", "in", "range", "(", "len", "(", "lst", "[", "'env'", "]", ")", ")", ":", "if", "name", "=="...
Remove cron environment variable for a specified user. CLI Example: .. code-block:: bash salt '*' cron.rm_env root MAILTO
[ "Remove", "cron", "environment", "variable", "for", "a", "specified", "user", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/cron.py#L778-L801
33,115
saltstack/salt
salt/modules/boto_s3_bucket.py
exists
def exists(Bucket, region=None, key=None, keyid=None, profile=None): ''' Given a bucket name, check to see if the given bucket exists. Returns True if the given bucket exists and returns False if the given bucket does not exist. CLI Example: .. code-block:: bash salt mymin...
python
def exists(Bucket, region=None, key=None, keyid=None, profile=None): ''' Given a bucket name, check to see if the given bucket exists. Returns True if the given bucket exists and returns False if the given bucket does not exist. CLI Example: .. code-block:: bash salt mymin...
[ "def", "exists", "(", "Bucket", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "=", "key", ","...
Given a bucket name, check to see if the given bucket exists. Returns True if the given bucket exists and returns False if the given bucket does not exist. CLI Example: .. code-block:: bash salt myminion boto_s3_bucket.exists mybucket
[ "Given", "a", "bucket", "name", "check", "to", "see", "if", "the", "given", "bucket", "exists", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_s3_bucket.py#L103-L127
33,116
saltstack/salt
salt/modules/boto_s3_bucket.py
create
def create(Bucket, ACL=None, LocationConstraint=None, GrantFullControl=None, GrantRead=None, GrantReadACP=None, GrantWrite=None, GrantWriteACP=None, region=None, key=None, keyid=None, profile=None): ''' Given a valid config, create an ...
python
def create(Bucket, ACL=None, LocationConstraint=None, GrantFullControl=None, GrantRead=None, GrantReadACP=None, GrantWrite=None, GrantWriteACP=None, region=None, key=None, keyid=None, profile=None): ''' Given a valid config, create an ...
[ "def", "create", "(", "Bucket", ",", "ACL", "=", "None", ",", "LocationConstraint", "=", "None", ",", "GrantFullControl", "=", "None", ",", "GrantRead", "=", "None", ",", "GrantReadACP", "=", "None", ",", "GrantWrite", "=", "None", ",", "GrantWriteACP", "=...
Given a valid config, create an S3 Bucket. Returns {created: true} if the bucket was created and returns {created: False} if the bucket was not created. CLI Example: .. code-block:: bash salt myminion boto_s3_bucket.create my_bucket \\ GrantFullControl='emailaddress=...
[ "Given", "a", "valid", "config", "create", "an", "S3", "Bucket", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_s3_bucket.py#L130-L177
33,117
saltstack/salt
salt/modules/boto_s3_bucket.py
delete
def delete(Bucket, MFA=None, RequestPayer=None, Force=False, region=None, key=None, keyid=None, profile=None): ''' Given a bucket name, delete it, optionally emptying it first. Returns {deleted: true} if the bucket was deleted and returns {deleted: false} if the bucket was not deleted. ...
python
def delete(Bucket, MFA=None, RequestPayer=None, Force=False, region=None, key=None, keyid=None, profile=None): ''' Given a bucket name, delete it, optionally emptying it first. Returns {deleted: true} if the bucket was deleted and returns {deleted: false} if the bucket was not deleted. ...
[ "def", "delete", "(", "Bucket", ",", "MFA", "=", "None", ",", "RequestPayer", "=", "None", ",", "Force", "=", "False", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", "...
Given a bucket name, delete it, optionally emptying it first. Returns {deleted: true} if the bucket was deleted and returns {deleted: false} if the bucket was not deleted. CLI Example: .. code-block:: bash salt myminion boto_s3_bucket.delete mybucket
[ "Given", "a", "bucket", "name", "delete", "it", "optionally", "emptying", "it", "first", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_s3_bucket.py#L180-L204
33,118
saltstack/salt
salt/modules/boto_s3_bucket.py
delete_objects
def delete_objects(Bucket, Delete, MFA=None, RequestPayer=None, region=None, key=None, keyid=None, profile=None): ''' Delete objects in a given S3 bucket. Returns {deleted: true} if all objects were deleted and {deleted: false, failed: [key, ...]} otherwise CLI Example: .. ...
python
def delete_objects(Bucket, Delete, MFA=None, RequestPayer=None, region=None, key=None, keyid=None, profile=None): ''' Delete objects in a given S3 bucket. Returns {deleted: true} if all objects were deleted and {deleted: false, failed: [key, ...]} otherwise CLI Example: .. ...
[ "def", "delete_objects", "(", "Bucket", ",", "Delete", ",", "MFA", "=", "None", ",", "RequestPayer", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "if", "isinstance...
Delete objects in a given S3 bucket. Returns {deleted: true} if all objects were deleted and {deleted: false, failed: [key, ...]} otherwise CLI Example: .. code-block:: bash salt myminion boto_s3_bucket.delete_objects mybucket '{Objects: [Key: myobject]}'
[ "Delete", "objects", "in", "a", "given", "S3", "bucket", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_s3_bucket.py#L207-L249
33,119
saltstack/salt
salt/modules/boto_s3_bucket.py
describe
def describe(Bucket, region=None, key=None, keyid=None, profile=None): ''' Given a bucket name describe its properties. Returns a dictionary of interesting properties. CLI Example: .. code-block:: bash salt myminion boto_s3_bucket.describe mybucket ''' try: ...
python
def describe(Bucket, region=None, key=None, keyid=None, profile=None): ''' Given a bucket name describe its properties. Returns a dictionary of interesting properties. CLI Example: .. code-block:: bash salt myminion boto_s3_bucket.describe mybucket ''' try: ...
[ "def", "describe", "(", "Bucket", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "=", "key", "...
Given a bucket name describe its properties. Returns a dictionary of interesting properties. CLI Example: .. code-block:: bash salt myminion boto_s3_bucket.describe mybucket
[ "Given", "a", "bucket", "name", "describe", "its", "properties", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_s3_bucket.py#L252-L315
33,120
saltstack/salt
salt/modules/boto_s3_bucket.py
empty
def empty(Bucket, MFA=None, RequestPayer=None, region=None, key=None, keyid=None, profile=None): ''' Delete all objects in a given S3 bucket. Returns {deleted: true} if all objects were deleted and {deleted: false, failed: [key, ...]} otherwise CLI Example: .. code-block:: bash ...
python
def empty(Bucket, MFA=None, RequestPayer=None, region=None, key=None, keyid=None, profile=None): ''' Delete all objects in a given S3 bucket. Returns {deleted: true} if all objects were deleted and {deleted: false, failed: [key, ...]} otherwise CLI Example: .. code-block:: bash ...
[ "def", "empty", "(", "Bucket", ",", "MFA", "=", "None", ",", "RequestPayer", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "stuff", "=", "list_object_versions", "("...
Delete all objects in a given S3 bucket. Returns {deleted: true} if all objects were deleted and {deleted: false, failed: [key, ...]} otherwise CLI Example: .. code-block:: bash salt myminion boto_s3_bucket.empty mybucket
[ "Delete", "all", "objects", "in", "a", "given", "S3", "bucket", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_s3_bucket.py#L318-L345
33,121
saltstack/salt
salt/modules/boto_s3_bucket.py
list
def list(region=None, key=None, keyid=None, profile=None): ''' List all buckets owned by the authenticated sender of the request. Returns list of buckets CLI Example: .. code-block:: yaml Owner: {...} Buckets: - {...} - {...} ''' try: conn = _...
python
def list(region=None, key=None, keyid=None, profile=None): ''' List all buckets owned by the authenticated sender of the request. Returns list of buckets CLI Example: .. code-block:: yaml Owner: {...} Buckets: - {...} - {...} ''' try: conn = _...
[ "def", "list", "(", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "=", "key", ",", "keyid", "=", ...
List all buckets owned by the authenticated sender of the request. Returns list of buckets CLI Example: .. code-block:: yaml Owner: {...} Buckets: - {...} - {...}
[ "List", "all", "buckets", "owned", "by", "the", "authenticated", "sender", "of", "the", "request", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_s3_bucket.py#L348-L373
33,122
saltstack/salt
salt/modules/boto_s3_bucket.py
put_acl
def put_acl(Bucket, ACL=None, AccessControlPolicy=None, GrantFullControl=None, GrantRead=None, GrantReadACP=None, GrantWrite=None, GrantWriteACP=None, region=None, key=None, keyid=None, profile=None): ''' Given a valid confi...
python
def put_acl(Bucket, ACL=None, AccessControlPolicy=None, GrantFullControl=None, GrantRead=None, GrantReadACP=None, GrantWrite=None, GrantWriteACP=None, region=None, key=None, keyid=None, profile=None): ''' Given a valid confi...
[ "def", "put_acl", "(", "Bucket", ",", "ACL", "=", "None", ",", "AccessControlPolicy", "=", "None", ",", "GrantFullControl", "=", "None", ",", "GrantRead", "=", "None", ",", "GrantReadACP", "=", "None", ",", "GrantWrite", "=", "None", ",", "GrantWriteACP", ...
Given a valid config, update the ACL for a bucket. Returns {updated: true} if the ACL was updated and returns {updated: False} if the ACL was not updated. CLI Example: .. code-block:: bash salt myminion boto_s3_bucket.put_acl my_bucket 'public' \\ GrantFullControl='e...
[ "Given", "a", "valid", "config", "update", "the", "ACL", "for", "a", "bucket", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_s3_bucket.py#L449-L491
33,123
saltstack/salt
salt/modules/boto_s3_bucket.py
put_cors
def put_cors(Bucket, CORSRules, region=None, key=None, keyid=None, profile=None): ''' Given a valid config, update the CORS rules for a bucket. Returns {updated: true} if CORS was updated and returns {updated: False} if CORS was not updated. CLI Example: .. code-block:: ...
python
def put_cors(Bucket, CORSRules, region=None, key=None, keyid=None, profile=None): ''' Given a valid config, update the CORS rules for a bucket. Returns {updated: true} if CORS was updated and returns {updated: False} if CORS was not updated. CLI Example: .. code-block:: ...
[ "def", "put_cors", "(", "Bucket", ",", "CORSRules", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key...
Given a valid config, update the CORS rules for a bucket. Returns {updated: true} if CORS was updated and returns {updated: False} if CORS was not updated. CLI Example: .. code-block:: bash salt myminion boto_s3_bucket.put_cors my_bucket '[{\\ "AllowedHeaders":[],\\ ...
[ "Given", "a", "valid", "config", "update", "the", "CORS", "rules", "for", "a", "bucket", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_s3_bucket.py#L494-L524
33,124
saltstack/salt
salt/modules/boto_s3_bucket.py
put_lifecycle_configuration
def put_lifecycle_configuration(Bucket, Rules, region=None, key=None, keyid=None, profile=None): ''' Given a valid config, update the Lifecycle rules for a bucket. Returns {updated: true} if Lifecycle was updated and returns {updated: False} if Lifecycle was not updated. CLI ...
python
def put_lifecycle_configuration(Bucket, Rules, region=None, key=None, keyid=None, profile=None): ''' Given a valid config, update the Lifecycle rules for a bucket. Returns {updated: true} if Lifecycle was updated and returns {updated: False} if Lifecycle was not updated. CLI ...
[ "def", "put_lifecycle_configuration", "(", "Bucket", ",", "Rules", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=", "region"...
Given a valid config, update the Lifecycle rules for a bucket. Returns {updated: true} if Lifecycle was updated and returns {updated: False} if Lifecycle was not updated. CLI Example: .. code-block:: bash salt myminion boto_s3_bucket.put_lifecycle_configuration my_bucket '[{\\ ...
[ "Given", "a", "valid", "config", "update", "the", "Lifecycle", "rules", "for", "a", "bucket", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_s3_bucket.py#L527-L559
33,125
saltstack/salt
salt/modules/boto_s3_bucket.py
put_logging
def put_logging(Bucket, TargetBucket=None, TargetPrefix=None, TargetGrants=None, region=None, key=None, keyid=None, profile=None): ''' Given a valid config, update the logging parameters for a bucket. Returns {updated: true} if parameters were updated and returns {updated: False} ...
python
def put_logging(Bucket, TargetBucket=None, TargetPrefix=None, TargetGrants=None, region=None, key=None, keyid=None, profile=None): ''' Given a valid config, update the logging parameters for a bucket. Returns {updated: true} if parameters were updated and returns {updated: False} ...
[ "def", "put_logging", "(", "Bucket", ",", "TargetBucket", "=", "None", ",", "TargetPrefix", "=", "None", ",", "TargetGrants", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")",...
Given a valid config, update the logging parameters for a bucket. Returns {updated: true} if parameters were updated and returns {updated: False} if parameters were not updated. CLI Example: .. code-block:: bash salt myminion boto_s3_bucket.put_logging my_bucket log_bucket '[{...}]' prefix
[ "Given", "a", "valid", "config", "update", "the", "logging", "parameters", "for", "a", "bucket", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_s3_bucket.py#L562-L597
33,126
saltstack/salt
salt/modules/boto_s3_bucket.py
put_notification_configuration
def put_notification_configuration(Bucket, TopicConfigurations=None, QueueConfigurations=None, LambdaFunctionConfigurations=None, region=None, key=None, keyid=None, profile=None): ''' Given a valid config, update the notification parameters for a bucket. Returns {updated: t...
python
def put_notification_configuration(Bucket, TopicConfigurations=None, QueueConfigurations=None, LambdaFunctionConfigurations=None, region=None, key=None, keyid=None, profile=None): ''' Given a valid config, update the notification parameters for a bucket. Returns {updated: t...
[ "def", "put_notification_configuration", "(", "Bucket", ",", "TopicConfigurations", "=", "None", ",", "QueueConfigurations", "=", "None", ",", "LambdaFunctionConfigurations", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "N...
Given a valid config, update the notification parameters for a bucket. Returns {updated: true} if parameters were updated and returns {updated: False} if parameters were not updated. CLI Example: .. code-block:: bash salt myminion boto_s3_bucket.put_notification_configuration my_bucket ...
[ "Given", "a", "valid", "config", "update", "the", "notification", "parameters", "for", "a", "bucket", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_s3_bucket.py#L600-L643
33,127
saltstack/salt
salt/modules/boto_s3_bucket.py
put_policy
def put_policy(Bucket, Policy, region=None, key=None, keyid=None, profile=None): ''' Given a valid config, update the policy for a bucket. Returns {updated: true} if policy was updated and returns {updated: False} if policy was not updated. CLI Example: .. code-block:: bash ...
python
def put_policy(Bucket, Policy, region=None, key=None, keyid=None, profile=None): ''' Given a valid config, update the policy for a bucket. Returns {updated: true} if policy was updated and returns {updated: False} if policy was not updated. CLI Example: .. code-block:: bash ...
[ "def", "put_policy", "(", "Bucket", ",", "Policy", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key"...
Given a valid config, update the policy for a bucket. Returns {updated: true} if policy was updated and returns {updated: False} if policy was not updated. CLI Example: .. code-block:: bash salt myminion boto_s3_bucket.put_policy my_bucket {...}
[ "Given", "a", "valid", "config", "update", "the", "policy", "for", "a", "bucket", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_s3_bucket.py#L646-L671
33,128
saltstack/salt
salt/modules/boto_s3_bucket.py
put_replication
def put_replication(Bucket, Role, Rules, region=None, key=None, keyid=None, profile=None): ''' Given a valid config, update the replication configuration for a bucket. Returns {updated: true} if replication configuration was updated and returns {updated: False} if replication configuration w...
python
def put_replication(Bucket, Role, Rules, region=None, key=None, keyid=None, profile=None): ''' Given a valid config, update the replication configuration for a bucket. Returns {updated: true} if replication configuration was updated and returns {updated: False} if replication configuration w...
[ "def", "put_replication", "(", "Bucket", ",", "Role", ",", "Rules", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=", "re...
Given a valid config, update the replication configuration for a bucket. Returns {updated: true} if replication configuration was updated and returns {updated: False} if replication configuration was not updated. CLI Example: .. code-block:: bash salt myminion boto_s3_bucket.put_replication ...
[ "Given", "a", "valid", "config", "update", "the", "replication", "configuration", "for", "a", "bucket", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_s3_bucket.py#L688-L718
33,129
saltstack/salt
salt/modules/boto_s3_bucket.py
put_request_payment
def put_request_payment(Bucket, Payer, region=None, key=None, keyid=None, profile=None): ''' Given a valid config, update the request payment configuration for a bucket. Returns {updated: true} if request payment configuration was updated and returns {updated: False} if request payment confi...
python
def put_request_payment(Bucket, Payer, region=None, key=None, keyid=None, profile=None): ''' Given a valid config, update the request payment configuration for a bucket. Returns {updated: true} if request payment configuration was updated and returns {updated: False} if request payment confi...
[ "def", "put_request_payment", "(", "Bucket", ",", "Payer", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",",...
Given a valid config, update the request payment configuration for a bucket. Returns {updated: true} if request payment configuration was updated and returns {updated: False} if request payment configuration was not updated. CLI Example: .. code-block:: bash salt myminion boto_s3_bucket.put_...
[ "Given", "a", "valid", "config", "update", "the", "request", "payment", "configuration", "for", "a", "bucket", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_s3_bucket.py#L721-L744
33,130
saltstack/salt
salt/modules/boto_s3_bucket.py
put_tagging
def put_tagging(Bucket, region=None, key=None, keyid=None, profile=None, **kwargs): ''' Given a valid config, update the tags for a bucket. Returns {updated: true} if tags were updated and returns {updated: False} if tags were not updated. CLI Example: .. code-block:: bash ...
python
def put_tagging(Bucket, region=None, key=None, keyid=None, profile=None, **kwargs): ''' Given a valid config, update the tags for a bucket. Returns {updated: true} if tags were updated and returns {updated: False} if tags were not updated. CLI Example: .. code-block:: bash ...
[ "def", "put_tagging", "(", "Bucket", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ",", "*", "*", "kwargs", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=", "region",...
Given a valid config, update the tags for a bucket. Returns {updated: true} if tags were updated and returns {updated: False} if tags were not updated. CLI Example: .. code-block:: bash salt myminion boto_s3_bucket.put_tagging my_bucket my_role [...]
[ "Given", "a", "valid", "config", "update", "the", "tags", "for", "a", "bucket", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_s3_bucket.py#L747-L775
33,131
saltstack/salt
salt/modules/boto_s3_bucket.py
put_versioning
def put_versioning(Bucket, Status, MFADelete=None, MFA=None, region=None, key=None, keyid=None, profile=None): ''' Given a valid config, update the versioning configuration for a bucket. Returns {updated: true} if versioning configuration was updated and returns {updated: False} if versionin...
python
def put_versioning(Bucket, Status, MFADelete=None, MFA=None, region=None, key=None, keyid=None, profile=None): ''' Given a valid config, update the versioning configuration for a bucket. Returns {updated: true} if versioning configuration was updated and returns {updated: False} if versionin...
[ "def", "put_versioning", "(", "Bucket", ",", "Status", ",", "MFADelete", "=", "None", ",", "MFA", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn"...
Given a valid config, update the versioning configuration for a bucket. Returns {updated: true} if versioning configuration was updated and returns {updated: False} if versioning configuration was not updated. CLI Example: .. code-block:: bash salt myminion boto_s3_bucket.put_versioning my_b...
[ "Given", "a", "valid", "config", "update", "the", "versioning", "configuration", "for", "a", "bucket", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_s3_bucket.py#L778-L807
33,132
saltstack/salt
salt/modules/boto_s3_bucket.py
put_website
def put_website(Bucket, ErrorDocument=None, IndexDocument=None, RedirectAllRequestsTo=None, RoutingRules=None, region=None, key=None, keyid=None, profile=None): ''' Given a valid config, update the website configuration for a bucket. Returns {updated: true} if website configuration wa...
python
def put_website(Bucket, ErrorDocument=None, IndexDocument=None, RedirectAllRequestsTo=None, RoutingRules=None, region=None, key=None, keyid=None, profile=None): ''' Given a valid config, update the website configuration for a bucket. Returns {updated: true} if website configuration wa...
[ "def", "put_website", "(", "Bucket", ",", "ErrorDocument", "=", "None", ",", "IndexDocument", "=", "None", ",", "RedirectAllRequestsTo", "=", "None", ",", "RoutingRules", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", ...
Given a valid config, update the website configuration for a bucket. Returns {updated: true} if website configuration was updated and returns {updated: False} if website configuration was not updated. CLI Example: .. code-block:: bash salt myminion boto_s3_bucket.put_website my_bucket IndexD...
[ "Given", "a", "valid", "config", "update", "the", "website", "configuration", "for", "a", "bucket", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_s3_bucket.py#L810-L842
33,133
saltstack/salt
salt/modules/boto_s3_bucket.py
delete_cors
def delete_cors(Bucket, region=None, key=None, keyid=None, profile=None): ''' Delete the CORS configuration for the given bucket Returns {deleted: true} if CORS was deleted and returns {deleted: False} if CORS was not deleted. CLI Example: .. code-block:: bash salt myminio...
python
def delete_cors(Bucket, region=None, key=None, keyid=None, profile=None): ''' Delete the CORS configuration for the given bucket Returns {deleted: true} if CORS was deleted and returns {deleted: False} if CORS was not deleted. CLI Example: .. code-block:: bash salt myminio...
[ "def", "delete_cors", "(", "Bucket", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "=", "key", ...
Delete the CORS configuration for the given bucket Returns {deleted: true} if CORS was deleted and returns {deleted: False} if CORS was not deleted. CLI Example: .. code-block:: bash salt myminion boto_s3_bucket.delete_cors my_bucket
[ "Delete", "the", "CORS", "configuration", "for", "the", "given", "bucket" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_s3_bucket.py#L845-L866
33,134
saltstack/salt
salt/modules/boto_s3_bucket.py
delete_lifecycle_configuration
def delete_lifecycle_configuration(Bucket, region=None, key=None, keyid=None, profile=None): ''' Delete the lifecycle configuration for the given bucket Returns {deleted: true} if Lifecycle was deleted and returns {deleted: False} if Lifecycle was not deleted. CLI Example: .. code-...
python
def delete_lifecycle_configuration(Bucket, region=None, key=None, keyid=None, profile=None): ''' Delete the lifecycle configuration for the given bucket Returns {deleted: true} if Lifecycle was deleted and returns {deleted: False} if Lifecycle was not deleted. CLI Example: .. code-...
[ "def", "delete_lifecycle_configuration", "(", "Bucket", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key...
Delete the lifecycle configuration for the given bucket Returns {deleted: true} if Lifecycle was deleted and returns {deleted: False} if Lifecycle was not deleted. CLI Example: .. code-block:: bash salt myminion boto_s3_bucket.delete_lifecycle_configuration my_bucket
[ "Delete", "the", "lifecycle", "configuration", "for", "the", "given", "bucket" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_s3_bucket.py#L869-L890
33,135
saltstack/salt
salt/modules/boto_s3_bucket.py
delete_replication
def delete_replication(Bucket, region=None, key=None, keyid=None, profile=None): ''' Delete the replication config from the given bucket Returns {deleted: true} if replication configuration was deleted and returns {deleted: False} if replication configuration was not deleted. CLI Exampl...
python
def delete_replication(Bucket, region=None, key=None, keyid=None, profile=None): ''' Delete the replication config from the given bucket Returns {deleted: true} if replication configuration was deleted and returns {deleted: False} if replication configuration was not deleted. CLI Exampl...
[ "def", "delete_replication", "(", "Bucket", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "=", ...
Delete the replication config from the given bucket Returns {deleted: true} if replication configuration was deleted and returns {deleted: False} if replication configuration was not deleted. CLI Example: .. code-block:: bash salt myminion boto_s3_bucket.delete_replication my_bucket
[ "Delete", "the", "replication", "config", "from", "the", "given", "bucket" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_s3_bucket.py#L917-L938
33,136
saltstack/salt
salt/modules/boto_s3_bucket.py
delete_tagging
def delete_tagging(Bucket, region=None, key=None, keyid=None, profile=None): ''' Delete the tags from the given bucket Returns {deleted: true} if tags were deleted and returns {deleted: False} if tags were not deleted. CLI Example: .. code-block:: bash salt myminion boto_s...
python
def delete_tagging(Bucket, region=None, key=None, keyid=None, profile=None): ''' Delete the tags from the given bucket Returns {deleted: true} if tags were deleted and returns {deleted: False} if tags were not deleted. CLI Example: .. code-block:: bash salt myminion boto_s...
[ "def", "delete_tagging", "(", "Bucket", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "=", "key...
Delete the tags from the given bucket Returns {deleted: true} if tags were deleted and returns {deleted: False} if tags were not deleted. CLI Example: .. code-block:: bash salt myminion boto_s3_bucket.delete_tagging my_bucket
[ "Delete", "the", "tags", "from", "the", "given", "bucket" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_s3_bucket.py#L941-L962
33,137
saltstack/salt
salt/modules/boto_s3_bucket.py
delete_website
def delete_website(Bucket, region=None, key=None, keyid=None, profile=None): ''' Remove the website configuration from the given bucket Returns {deleted: true} if website configuration was deleted and returns {deleted: False} if website configuration was not deleted. CLI Example: ....
python
def delete_website(Bucket, region=None, key=None, keyid=None, profile=None): ''' Remove the website configuration from the given bucket Returns {deleted: true} if website configuration was deleted and returns {deleted: False} if website configuration was not deleted. CLI Example: ....
[ "def", "delete_website", "(", "Bucket", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "=", "key...
Remove the website configuration from the given bucket Returns {deleted: true} if website configuration was deleted and returns {deleted: False} if website configuration was not deleted. CLI Example: .. code-block:: bash salt myminion boto_s3_bucket.delete_website my_bucket
[ "Remove", "the", "website", "configuration", "from", "the", "given", "bucket" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_s3_bucket.py#L965-L986
33,138
saltstack/salt
salt/acl/__init__.py
PublisherACL.user_is_blacklisted
def user_is_blacklisted(self, user): ''' Takes a username as a string and returns a boolean. True indicates that the provided user has been blacklisted ''' return not salt.utils.stringutils.check_whitelist_blacklist(user, blacklist=self.blacklist.get('users', []))
python
def user_is_blacklisted(self, user): ''' Takes a username as a string and returns a boolean. True indicates that the provided user has been blacklisted ''' return not salt.utils.stringutils.check_whitelist_blacklist(user, blacklist=self.blacklist.get('users', []))
[ "def", "user_is_blacklisted", "(", "self", ",", "user", ")", ":", "return", "not", "salt", ".", "utils", ".", "stringutils", ".", "check_whitelist_blacklist", "(", "user", ",", "blacklist", "=", "self", ".", "blacklist", ".", "get", "(", "'users'", ",", "[...
Takes a username as a string and returns a boolean. True indicates that the provided user has been blacklisted
[ "Takes", "a", "username", "as", "a", "string", "and", "returns", "a", "boolean", ".", "True", "indicates", "that", "the", "provided", "user", "has", "been", "blacklisted" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/acl/__init__.py#L29-L34
33,139
saltstack/salt
salt/states/pagerduty_escalation_policy.py
present
def present(profile='pagerduty', subdomain=None, api_key=None, **kwargs): ''' Ensure that a pagerduty escalation policy exists. Will create or update as needed. This method accepts as args everything defined in https://developer.pagerduty.com/documentation/rest/escalation_policies/create. In addit...
python
def present(profile='pagerduty', subdomain=None, api_key=None, **kwargs): ''' Ensure that a pagerduty escalation policy exists. Will create or update as needed. This method accepts as args everything defined in https://developer.pagerduty.com/documentation/rest/escalation_policies/create. In addit...
[ "def", "present", "(", "profile", "=", "'pagerduty'", ",", "subdomain", "=", "None", ",", "api_key", "=", "None", ",", "*", "*", "kwargs", ")", ":", "# for convenience, we accept id, name, or email for users", "# and we accept the id or name for schedules", "for", "esca...
Ensure that a pagerduty escalation policy exists. Will create or update as needed. This method accepts as args everything defined in https://developer.pagerduty.com/documentation/rest/escalation_policies/create. In addition, user and schedule id's will be translated from name (or email address) into P...
[ "Ensure", "that", "a", "pagerduty", "escalation", "policy", "exists", ".", "Will", "create", "or", "update", "as", "needed", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pagerduty_escalation_policy.py#L49-L107
33,140
saltstack/salt
salt/states/pagerduty_escalation_policy.py
_escalation_rules_to_string
def _escalation_rules_to_string(escalation_rules): 'convert escalation_rules dict to a string for comparison' result = '' for rule in escalation_rules: result += 'escalation_delay_in_minutes: {0} '.format(rule['escalation_delay_in_minutes']) for target in rule['targets']: result ...
python
def _escalation_rules_to_string(escalation_rules): 'convert escalation_rules dict to a string for comparison' result = '' for rule in escalation_rules: result += 'escalation_delay_in_minutes: {0} '.format(rule['escalation_delay_in_minutes']) for target in rule['targets']: result ...
[ "def", "_escalation_rules_to_string", "(", "escalation_rules", ")", ":", "result", "=", "''", "for", "rule", "in", "escalation_rules", ":", "result", "+=", "'escalation_delay_in_minutes: {0} '", ".", "format", "(", "rule", "[", "'escalation_delay_in_minutes'", "]", ")...
convert escalation_rules dict to a string for comparison
[ "convert", "escalation_rules", "dict", "to", "a", "string", "for", "comparison" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pagerduty_escalation_policy.py#L154-L161
33,141
saltstack/salt
salt/states/rabbitmq_user.py
_check_perms_changes
def _check_perms_changes(name, newperms, runas=None, existing=None): ''' Check whether Rabbitmq user's permissions need to be changed. ''' if not newperms: return False if existing is None: try: existing = __salt__['rabbitmq.list_user_permissions'](name, runas=runas) ...
python
def _check_perms_changes(name, newperms, runas=None, existing=None): ''' Check whether Rabbitmq user's permissions need to be changed. ''' if not newperms: return False if existing is None: try: existing = __salt__['rabbitmq.list_user_permissions'](name, runas=runas) ...
[ "def", "_check_perms_changes", "(", "name", ",", "newperms", ",", "runas", "=", "None", ",", "existing", "=", "None", ")", ":", "if", "not", "newperms", ":", "return", "False", "if", "existing", "is", "None", ":", "try", ":", "existing", "=", "__salt__",...
Check whether Rabbitmq user's permissions need to be changed.
[ "Check", "whether", "Rabbitmq", "user", "s", "permissions", "need", "to", "be", "changed", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/rabbitmq_user.py#L44-L73
33,142
saltstack/salt
salt/states/rabbitmq_user.py
_get_current_tags
def _get_current_tags(name, runas=None): ''' Whether Rabbitmq user's tags need to be changed ''' try: return list(__salt__['rabbitmq.list_users'](runas=runas)[name]) except CommandExecutionError as err: log.error('Error: %s', err) return []
python
def _get_current_tags(name, runas=None): ''' Whether Rabbitmq user's tags need to be changed ''' try: return list(__salt__['rabbitmq.list_users'](runas=runas)[name]) except CommandExecutionError as err: log.error('Error: %s', err) return []
[ "def", "_get_current_tags", "(", "name", ",", "runas", "=", "None", ")", ":", "try", ":", "return", "list", "(", "__salt__", "[", "'rabbitmq.list_users'", "]", "(", "runas", "=", "runas", ")", "[", "name", "]", ")", "except", "CommandExecutionError", "as",...
Whether Rabbitmq user's tags need to be changed
[ "Whether", "Rabbitmq", "user", "s", "tags", "need", "to", "be", "changed" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/rabbitmq_user.py#L76-L84
33,143
saltstack/salt
salt/states/rabbitmq_user.py
absent
def absent(name, runas=None): ''' Ensure the named user is absent name The name of the user to remove runas User to run the command ''' ret = {'name': name, 'result': False, 'comment': '', 'changes': {}} try: user_exists = __salt__['rabbitmq.user_exists']...
python
def absent(name, runas=None): ''' Ensure the named user is absent name The name of the user to remove runas User to run the command ''' ret = {'name': name, 'result': False, 'comment': '', 'changes': {}} try: user_exists = __salt__['rabbitmq.user_exists']...
[ "def", "absent", "(", "name", ",", "runas", "=", "None", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "False", ",", "'comment'", ":", "''", ",", "'changes'", ":", "{", "}", "}", "try", ":", "user_exists", "=", "__salt__",...
Ensure the named user is absent name The name of the user to remove runas User to run the command
[ "Ensure", "the", "named", "user", "is", "absent" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/rabbitmq_user.py#L232-L272
33,144
saltstack/salt
salt/runners/state.py
pause
def pause(jid, state_id=None, duration=None): ''' Set up a state id pause, this instructs a running state to pause at a given state id. This needs to pass in the jid of the running state and can optionally pass in a duration in seconds. ''' minion = salt.minion.MasterMinion(__opts__) minion....
python
def pause(jid, state_id=None, duration=None): ''' Set up a state id pause, this instructs a running state to pause at a given state id. This needs to pass in the jid of the running state and can optionally pass in a duration in seconds. ''' minion = salt.minion.MasterMinion(__opts__) minion....
[ "def", "pause", "(", "jid", ",", "state_id", "=", "None", ",", "duration", "=", "None", ")", ":", "minion", "=", "salt", ".", "minion", ".", "MasterMinion", "(", "__opts__", ")", "minion", ".", "functions", "[", "'state.pause'", "]", "(", "jid", ",", ...
Set up a state id pause, this instructs a running state to pause at a given state id. This needs to pass in the jid of the running state and can optionally pass in a duration in seconds.
[ "Set", "up", "a", "state", "id", "pause", "this", "instructs", "a", "running", "state", "to", "pause", "at", "a", "given", "state", "id", ".", "This", "needs", "to", "pass", "in", "the", "jid", "of", "the", "running", "state", "and", "can", "optionally...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/state.py#L19-L26
33,145
saltstack/salt
salt/runners/state.py
resume
def resume(jid, state_id=None): ''' Remove a pause from a jid, allowing it to continue ''' minion = salt.minion.MasterMinion(__opts__) minion.functions['state.resume'](jid, state_id)
python
def resume(jid, state_id=None): ''' Remove a pause from a jid, allowing it to continue ''' minion = salt.minion.MasterMinion(__opts__) minion.functions['state.resume'](jid, state_id)
[ "def", "resume", "(", "jid", ",", "state_id", "=", "None", ")", ":", "minion", "=", "salt", ".", "minion", ".", "MasterMinion", "(", "__opts__", ")", "minion", ".", "functions", "[", "'state.resume'", "]", "(", "jid", ",", "state_id", ")" ]
Remove a pause from a jid, allowing it to continue
[ "Remove", "a", "pause", "from", "a", "jid", "allowing", "it", "to", "continue" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/state.py#L32-L37
33,146
saltstack/salt
salt/runners/state.py
orchestrate_show_sls
def orchestrate_show_sls(mods, saltenv='base', test=None, queue=False, pillar=None, pillarenv=None, pillar_enc=None): ''' Display the state data from a specific s...
python
def orchestrate_show_sls(mods, saltenv='base', test=None, queue=False, pillar=None, pillarenv=None, pillar_enc=None): ''' Display the state data from a specific s...
[ "def", "orchestrate_show_sls", "(", "mods", ",", "saltenv", "=", "'base'", ",", "test", "=", "None", ",", "queue", "=", "False", ",", "pillar", "=", "None", ",", "pillarenv", "=", "None", ",", "pillar_enc", "=", "None", ")", ":", "if", "pillar", "is", ...
Display the state data from a specific sls, or list of sls files, after being render using the master minion. Note, the master minion adds a "_master" suffix to it's minion id. .. seealso:: The state.show_sls module function CLI Example: .. code-block:: bash salt-run state.orch_show_sls ...
[ "Display", "the", "state", "data", "from", "a", "specific", "sls", "or", "list", "of", "sls", "files", "after", "being", "render", "using", "the", "master", "minion", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/state.py#L209-L245
33,147
saltstack/salt
salt/modules/bluecoat_sslv.py
add_distinguished_name
def add_distinguished_name(list_name, item_name): ''' Adds a distinguished name to a distinguished name list. list_name(str): The name of the specific policy distinguished name list to append to. item_name(str): The distinguished name to append. CLI Example: .. code-block:: bash sal...
python
def add_distinguished_name(list_name, item_name): ''' Adds a distinguished name to a distinguished name list. list_name(str): The name of the specific policy distinguished name list to append to. item_name(str): The distinguished name to append. CLI Example: .. code-block:: bash sal...
[ "def", "add_distinguished_name", "(", "list_name", ",", "item_name", ")", ":", "payload", "=", "{", "\"jsonrpc\"", ":", "\"2.0\"", ",", "\"id\"", ":", "\"ID0\"", ",", "\"method\"", ":", "\"add_policy_distinguished_names\"", ",", "\"params\"", ":", "[", "list_name"...
Adds a distinguished name to a distinguished name list. list_name(str): The name of the specific policy distinguished name list to append to. item_name(str): The distinguished name to append. CLI Example: .. code-block:: bash salt '*' bluecoat_sslv.add_distinguished_name MyDistinguishedList...
[ "Adds", "a", "distinguished", "name", "to", "a", "distinguished", "name", "list", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bluecoat_sslv.py#L76-L98
33,148
saltstack/salt
salt/modules/bluecoat_sslv.py
add_distinguished_name_list
def add_distinguished_name_list(list_name): ''' Add a list of policy distinguished names. list_name(str): The name of the specific policy distinguished name list to add. CLI Example: .. code-block:: bash salt '*' bluecoat_sslv.add_distinguished_name_list MyDistinguishedList ''' ...
python
def add_distinguished_name_list(list_name): ''' Add a list of policy distinguished names. list_name(str): The name of the specific policy distinguished name list to add. CLI Example: .. code-block:: bash salt '*' bluecoat_sslv.add_distinguished_name_list MyDistinguishedList ''' ...
[ "def", "add_distinguished_name_list", "(", "list_name", ")", ":", "payload", "=", "{", "\"jsonrpc\"", ":", "\"2.0\"", ",", "\"id\"", ":", "\"ID0\"", ",", "\"method\"", ":", "\"add_policy_distinguished_names_list\"", ",", "\"params\"", ":", "[", "{", "\"list_name\"",...
Add a list of policy distinguished names. list_name(str): The name of the specific policy distinguished name list to add. CLI Example: .. code-block:: bash salt '*' bluecoat_sslv.add_distinguished_name_list MyDistinguishedList
[ "Add", "a", "list", "of", "policy", "distinguished", "names", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bluecoat_sslv.py#L101-L121
33,149
saltstack/salt
salt/modules/bluecoat_sslv.py
add_domain_name
def add_domain_name(list_name, item_name): ''' Adds a domain name to a domain name list. list_name(str): The name of the specific policy domain name list to append to. item_name(str): The domain name to append. CLI Example: .. code-block:: bash salt '*' bluecoat_sslv.add_domain_name...
python
def add_domain_name(list_name, item_name): ''' Adds a domain name to a domain name list. list_name(str): The name of the specific policy domain name list to append to. item_name(str): The domain name to append. CLI Example: .. code-block:: bash salt '*' bluecoat_sslv.add_domain_name...
[ "def", "add_domain_name", "(", "list_name", ",", "item_name", ")", ":", "payload", "=", "{", "\"jsonrpc\"", ":", "\"2.0\"", ",", "\"id\"", ":", "\"ID0\"", ",", "\"method\"", ":", "\"add_policy_domain_names\"", ",", "\"params\"", ":", "[", "list_name", ",", "{"...
Adds a domain name to a domain name list. list_name(str): The name of the specific policy domain name list to append to. item_name(str): The domain name to append. CLI Example: .. code-block:: bash salt '*' bluecoat_sslv.add_domain_name MyDomainName foo.bar.com
[ "Adds", "a", "domain", "name", "to", "a", "domain", "name", "list", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bluecoat_sslv.py#L124-L146
33,150
saltstack/salt
salt/modules/bluecoat_sslv.py
add_domain_name_list
def add_domain_name_list(list_name): ''' Add a list of policy domain names. list_name(str): The name of the specific policy domain name list to add. CLI Example: .. code-block:: bash salt '*' bluecoat_sslv.add_domain_name_list MyDomainNameList ''' payload = {"jsonrpc": "2.0", ...
python
def add_domain_name_list(list_name): ''' Add a list of policy domain names. list_name(str): The name of the specific policy domain name list to add. CLI Example: .. code-block:: bash salt '*' bluecoat_sslv.add_domain_name_list MyDomainNameList ''' payload = {"jsonrpc": "2.0", ...
[ "def", "add_domain_name_list", "(", "list_name", ")", ":", "payload", "=", "{", "\"jsonrpc\"", ":", "\"2.0\"", ",", "\"id\"", ":", "\"ID0\"", ",", "\"method\"", ":", "\"add_policy_domain_names_list\"", ",", "\"params\"", ":", "[", "{", "\"list_name\"", ":", "lis...
Add a list of policy domain names. list_name(str): The name of the specific policy domain name list to add. CLI Example: .. code-block:: bash salt '*' bluecoat_sslv.add_domain_name_list MyDomainNameList
[ "Add", "a", "list", "of", "policy", "domain", "names", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bluecoat_sslv.py#L149-L169
33,151
saltstack/salt
salt/modules/bluecoat_sslv.py
add_ip_address
def add_ip_address(list_name, item_name): ''' Add an IP address to an IP address list. list_name(str): The name of the specific policy IP address list to append to. item_name(str): The IP address to append to the list. CLI Example: .. code-block:: bash salt '*' bluecoat_sslv.add_ip_...
python
def add_ip_address(list_name, item_name): ''' Add an IP address to an IP address list. list_name(str): The name of the specific policy IP address list to append to. item_name(str): The IP address to append to the list. CLI Example: .. code-block:: bash salt '*' bluecoat_sslv.add_ip_...
[ "def", "add_ip_address", "(", "list_name", ",", "item_name", ")", ":", "payload", "=", "{", "\"jsonrpc\"", ":", "\"2.0\"", ",", "\"id\"", ":", "\"ID0\"", ",", "\"method\"", ":", "\"add_policy_ip_addresses\"", ",", "\"params\"", ":", "[", "list_name", ",", "{",...
Add an IP address to an IP address list. list_name(str): The name of the specific policy IP address list to append to. item_name(str): The IP address to append to the list. CLI Example: .. code-block:: bash salt '*' bluecoat_sslv.add_ip_address MyIPAddressList 10.0.0.0/24
[ "Add", "an", "IP", "address", "to", "an", "IP", "address", "list", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bluecoat_sslv.py#L172-L194
33,152
saltstack/salt
salt/modules/bluecoat_sslv.py
add_ip_address_list
def add_ip_address_list(list_name): ''' Retrieves a list of all IP address lists. list_name(str): The name of the specific IP address list to add. CLI Example: .. code-block:: bash salt '*' bluecoat_sslv.add_ip_address_list MyIPAddressList ''' payload = {"jsonrpc": "2.0", ...
python
def add_ip_address_list(list_name): ''' Retrieves a list of all IP address lists. list_name(str): The name of the specific IP address list to add. CLI Example: .. code-block:: bash salt '*' bluecoat_sslv.add_ip_address_list MyIPAddressList ''' payload = {"jsonrpc": "2.0", ...
[ "def", "add_ip_address_list", "(", "list_name", ")", ":", "payload", "=", "{", "\"jsonrpc\"", ":", "\"2.0\"", ",", "\"id\"", ":", "\"ID0\"", ",", "\"method\"", ":", "\"add_policy_ip_addresses_list\"", ",", "\"params\"", ":", "[", "{", "\"list_name\"", ":", "list...
Retrieves a list of all IP address lists. list_name(str): The name of the specific IP address list to add. CLI Example: .. code-block:: bash salt '*' bluecoat_sslv.add_ip_address_list MyIPAddressList
[ "Retrieves", "a", "list", "of", "all", "IP", "address", "lists", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bluecoat_sslv.py#L197-L217
33,153
saltstack/salt
salt/modules/bluecoat_sslv.py
get_distinguished_name_list
def get_distinguished_name_list(list_name): ''' Retrieves a specific policy distinguished name list. list_name(str): The name of the specific policy distinguished name list to retrieve. CLI Example: .. code-block:: bash salt '*' bluecoat_sslv.get_distinguished_name_list MyDistinguishedLi...
python
def get_distinguished_name_list(list_name): ''' Retrieves a specific policy distinguished name list. list_name(str): The name of the specific policy distinguished name list to retrieve. CLI Example: .. code-block:: bash salt '*' bluecoat_sslv.get_distinguished_name_list MyDistinguishedLi...
[ "def", "get_distinguished_name_list", "(", "list_name", ")", ":", "payload", "=", "{", "\"jsonrpc\"", ":", "\"2.0\"", ",", "\"id\"", ":", "\"ID0\"", ",", "\"method\"", ":", "\"get_policy_distinguished_names\"", ",", "\"params\"", ":", "[", "list_name", ",", "0", ...
Retrieves a specific policy distinguished name list. list_name(str): The name of the specific policy distinguished name list to retrieve. CLI Example: .. code-block:: bash salt '*' bluecoat_sslv.get_distinguished_name_list MyDistinguishedList
[ "Retrieves", "a", "specific", "policy", "distinguished", "name", "list", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bluecoat_sslv.py#L220-L240
33,154
saltstack/salt
salt/modules/bluecoat_sslv.py
get_domain_list
def get_domain_list(list_name): ''' Retrieves a specific policy domain name list. list_name(str): The name of the specific policy domain name list to retrieve. CLI Example: .. code-block:: bash salt '*' bluecoat_sslv.get_domain_list MyDomainNameList ''' payload = {"jsonrpc": "2....
python
def get_domain_list(list_name): ''' Retrieves a specific policy domain name list. list_name(str): The name of the specific policy domain name list to retrieve. CLI Example: .. code-block:: bash salt '*' bluecoat_sslv.get_domain_list MyDomainNameList ''' payload = {"jsonrpc": "2....
[ "def", "get_domain_list", "(", "list_name", ")", ":", "payload", "=", "{", "\"jsonrpc\"", ":", "\"2.0\"", ",", "\"id\"", ":", "\"ID0\"", ",", "\"method\"", ":", "\"get_policy_domain_names\"", ",", "\"params\"", ":", "[", "list_name", ",", "0", ",", "256", "]...
Retrieves a specific policy domain name list. list_name(str): The name of the specific policy domain name list to retrieve. CLI Example: .. code-block:: bash salt '*' bluecoat_sslv.get_domain_list MyDomainNameList
[ "Retrieves", "a", "specific", "policy", "domain", "name", "list", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bluecoat_sslv.py#L264-L284
33,155
saltstack/salt
salt/modules/bluecoat_sslv.py
get_ip_address_list
def get_ip_address_list(list_name): ''' Retrieves a specific IP address list. list_name(str): The name of the specific policy IP address list to retrieve. CLI Example: .. code-block:: bash salt '*' bluecoat_sslv.get_ip_address_list MyIPAddressList ''' payload = {"jsonrpc": "2.0"...
python
def get_ip_address_list(list_name): ''' Retrieves a specific IP address list. list_name(str): The name of the specific policy IP address list to retrieve. CLI Example: .. code-block:: bash salt '*' bluecoat_sslv.get_ip_address_list MyIPAddressList ''' payload = {"jsonrpc": "2.0"...
[ "def", "get_ip_address_list", "(", "list_name", ")", ":", "payload", "=", "{", "\"jsonrpc\"", ":", "\"2.0\"", ",", "\"id\"", ":", "\"ID0\"", ",", "\"method\"", ":", "\"get_policy_ip_addresses\"", ",", "\"params\"", ":", "[", "list_name", ",", "0", ",", "256", ...
Retrieves a specific IP address list. list_name(str): The name of the specific policy IP address list to retrieve. CLI Example: .. code-block:: bash salt '*' bluecoat_sslv.get_ip_address_list MyIPAddressList
[ "Retrieves", "a", "specific", "IP", "address", "list", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/bluecoat_sslv.py#L308-L328
33,156
saltstack/salt
salt/utils/win_runas.py
runas_unpriv
def runas_unpriv(cmd, username, password, cwd=None): ''' Runas that works for non-priviledged users ''' # Create a pipe to set as stdout in the child. The write handle needs to be # inheritable. c2pread, c2pwrite = salt.platform.win.CreatePipe( inherit_read=False, inherit_write=True, ...
python
def runas_unpriv(cmd, username, password, cwd=None): ''' Runas that works for non-priviledged users ''' # Create a pipe to set as stdout in the child. The write handle needs to be # inheritable. c2pread, c2pwrite = salt.platform.win.CreatePipe( inherit_read=False, inherit_write=True, ...
[ "def", "runas_unpriv", "(", "cmd", ",", "username", ",", "password", ",", "cwd", "=", "None", ")", ":", "# Create a pipe to set as stdout in the child. The write handle needs to be", "# inheritable.", "c2pread", ",", "c2pwrite", "=", "salt", ".", "platform", ".", "win...
Runas that works for non-priviledged users
[ "Runas", "that", "works", "for", "non", "-", "priviledged", "users" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/win_runas.py#L227-L295
33,157
saltstack/salt
salt/matchers/data_match.py
match
def match(tgt, functions=None, opts=None): ''' Match based on the local data store on the minion ''' if not opts: opts = __opts__ if functions is None: utils = salt.loader.utils(opts) functions = salt.loader.minion_mods(opts, utils=utils) comps = tgt.split(':') if len...
python
def match(tgt, functions=None, opts=None): ''' Match based on the local data store on the minion ''' if not opts: opts = __opts__ if functions is None: utils = salt.loader.utils(opts) functions = salt.loader.minion_mods(opts, utils=utils) comps = tgt.split(':') if len...
[ "def", "match", "(", "tgt", ",", "functions", "=", "None", ",", "opts", "=", "None", ")", ":", "if", "not", "opts", ":", "opts", "=", "__opts__", "if", "functions", "is", "None", ":", "utils", "=", "salt", ".", "loader", ".", "utils", "(", "opts", ...
Match based on the local data store on the minion
[ "Match", "based", "on", "the", "local", "data", "store", "on", "the", "minion" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/matchers/data_match.py#L19-L48
33,158
saltstack/salt
salt/modules/servicenow.py
delete_record
def delete_record(table, sys_id): ''' Delete an existing record :param table: The table name, e.g. sys_user :type table: ``str`` :param sys_id: The unique ID of the record :type sys_id: ``str`` CLI Example: .. code-block:: bash salt myminion servicenow.delete_record sys_co...
python
def delete_record(table, sys_id): ''' Delete an existing record :param table: The table name, e.g. sys_user :type table: ``str`` :param sys_id: The unique ID of the record :type sys_id: ``str`` CLI Example: .. code-block:: bash salt myminion servicenow.delete_record sys_co...
[ "def", "delete_record", "(", "table", ",", "sys_id", ")", ":", "client", "=", "_get_client", "(", ")", "client", ".", "table", "=", "table", "response", "=", "client", ".", "delete", "(", "sys_id", ")", "return", "response" ]
Delete an existing record :param table: The table name, e.g. sys_user :type table: ``str`` :param sys_id: The unique ID of the record :type sys_id: ``str`` CLI Example: .. code-block:: bash salt myminion servicenow.delete_record sys_computer 2134566
[ "Delete", "an", "existing", "record" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/servicenow.py#L91-L110
33,159
saltstack/salt
salt/modules/servicenow.py
update_record_field
def update_record_field(table, sys_id, field, value): ''' Update the value of a record's field in a servicenow table :param table: The table name, e.g. sys_user :type table: ``str`` :param sys_id: The unique ID of the record :type sys_id: ``str`` :param field: The new value :type f...
python
def update_record_field(table, sys_id, field, value): ''' Update the value of a record's field in a servicenow table :param table: The table name, e.g. sys_user :type table: ``str`` :param sys_id: The unique ID of the record :type sys_id: ``str`` :param field: The new value :type f...
[ "def", "update_record_field", "(", "table", ",", "sys_id", ",", "field", ",", "value", ")", ":", "client", "=", "_get_client", "(", ")", "client", ".", "table", "=", "table", "response", "=", "client", ".", "update", "(", "{", "field", ":", "value", "}...
Update the value of a record's field in a servicenow table :param table: The table name, e.g. sys_user :type table: ``str`` :param sys_id: The unique ID of the record :type sys_id: ``str`` :param field: The new value :type field: ``str`` :param value: The new value :type value: `...
[ "Update", "the", "value", "of", "a", "record", "s", "field", "in", "a", "servicenow", "table" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/servicenow.py#L148-L173
33,160
saltstack/salt
salt/states/cabal.py
_parse_pkg_string
def _parse_pkg_string(pkg): ''' Parse pkg string and return a tuple of package name, separator, and package version. Cabal support install package with following format: * foo-1.0 * foo < 1.2 * foo > 1.3 For the sake of simplicity only the first form is supported, support for othe...
python
def _parse_pkg_string(pkg): ''' Parse pkg string and return a tuple of package name, separator, and package version. Cabal support install package with following format: * foo-1.0 * foo < 1.2 * foo > 1.3 For the sake of simplicity only the first form is supported, support for othe...
[ "def", "_parse_pkg_string", "(", "pkg", ")", ":", "pkg_name", ",", "separator", ",", "pkg_ver", "=", "pkg", ".", "partition", "(", "'-'", ")", "return", "(", "pkg_name", ".", "strip", "(", ")", ",", "separator", ",", "pkg_ver", ".", "strip", "(", ")", ...
Parse pkg string and return a tuple of package name, separator, and package version. Cabal support install package with following format: * foo-1.0 * foo < 1.2 * foo > 1.3 For the sake of simplicity only the first form is supported, support for other forms can be added later.
[ "Parse", "pkg", "string", "and", "return", "a", "tuple", "of", "package", "name", "separator", "and", "package", "version", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/cabal.py#L40-L55
33,161
saltstack/salt
salt/states/cabal.py
removed
def removed(name, user=None, env=None): ''' Verify that given package is not installed. ''' ret = {'name': name, 'result': None, 'comment': '', 'changes': {}} try: installed_pkgs = __salt__['cabal.list']( user=user, installed=True, env=env) except (C...
python
def removed(name, user=None, env=None): ''' Verify that given package is not installed. ''' ret = {'name': name, 'result': None, 'comment': '', 'changes': {}} try: installed_pkgs = __salt__['cabal.list']( user=user, installed=True, env=env) except (C...
[ "def", "removed", "(", "name", ",", "user", "=", "None", ",", "env", "=", "None", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "None", ",", "'comment'", ":", "''", ",", "'changes'", ":", "{", "}", "}", "try", ":", "in...
Verify that given package is not installed.
[ "Verify", "that", "given", "package", "is", "not", "installed", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/cabal.py#L172-L206
33,162
saltstack/salt
salt/beacons/service.py
beacon
def beacon(config): ''' Scan for the configured services and fire events Example Config .. code-block:: yaml beacons: service: - services: salt-master: {} mysql: {} The config above sets up beacons to check for the salt-master and...
python
def beacon(config): ''' Scan for the configured services and fire events Example Config .. code-block:: yaml beacons: service: - services: salt-master: {} mysql: {} The config above sets up beacons to check for the salt-master and...
[ "def", "beacon", "(", "config", ")", ":", "ret", "=", "[", "]", "_config", "=", "{", "}", "list", "(", "map", "(", "_config", ".", "update", ",", "config", ")", ")", "for", "service", "in", "_config", ".", "get", "(", "'services'", ",", "{", "}",...
Scan for the configured services and fire events Example Config .. code-block:: yaml beacons: service: - services: salt-master: {} mysql: {} The config above sets up beacons to check for the salt-master and mysql services. The config...
[ "Scan", "for", "the", "configured", "services", "and", "fire", "events" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/beacons/service.py#L44-L164
33,163
saltstack/salt
salt/modules/jira_mod.py
create_issue
def create_issue(project, summary, description, template_engine='jinja', context=None, defaults=None, saltenv='base', issuetype='Bug', priority='Normal', labels=None, ...
python
def create_issue(project, summary, description, template_engine='jinja', context=None, defaults=None, saltenv='base', issuetype='Bug', priority='Normal', labels=None, ...
[ "def", "create_issue", "(", "project", ",", "summary", ",", "description", ",", "template_engine", "=", "'jinja'", ",", "context", "=", "None", ",", "defaults", "=", "None", ",", "saltenv", "=", "'base'", ",", "issuetype", "=", "'Bug'", ",", "priority", "=...
Create a JIRA issue using the named settings. Return the JIRA ticket ID. project The name of the project to attach the JIRA ticket to. summary The summary (title) of the JIRA ticket. When the ``template_engine`` argument is set to a proper value of an existing Salt template engine ...
[ "Create", "a", "JIRA", "issue", "using", "the", "named", "settings", ".", "Return", "the", "JIRA", "ticket", "ID", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/jira_mod.py#L80-L183
33,164
saltstack/salt
salt/modules/jira_mod.py
assign_issue
def assign_issue(issue_key, assignee, server=None, username=None, password=None): ''' Assign the issue to an existing user. Return ``True`` when the issue has been properly assigned. issue_key The JIRA ID of the ticket to manip...
python
def assign_issue(issue_key, assignee, server=None, username=None, password=None): ''' Assign the issue to an existing user. Return ``True`` when the issue has been properly assigned. issue_key The JIRA ID of the ticket to manip...
[ "def", "assign_issue", "(", "issue_key", ",", "assignee", ",", "server", "=", "None", ",", "username", "=", "None", ",", "password", "=", "None", ")", ":", "jira_", "=", "_get_jira", "(", "server", "=", "server", ",", "username", "=", "username", ",", ...
Assign the issue to an existing user. Return ``True`` when the issue has been properly assigned. issue_key The JIRA ID of the ticket to manipulate. assignee The name of the user to assign the ticket to. CLI Example: salt '*' jira.assign_issue NET-123 example_user
[ "Assign", "the", "issue", "to", "an", "existing", "user", ".", "Return", "True", "when", "the", "issue", "has", "been", "properly", "assigned", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/jira_mod.py#L186-L209
33,165
saltstack/salt
salt/modules/jira_mod.py
add_comment
def add_comment(issue_key, comment, visibility=None, is_internal=False, server=None, username=None, password=None): ''' Add a comment to an existing ticket. Return ``True`` when it successfully added the comment....
python
def add_comment(issue_key, comment, visibility=None, is_internal=False, server=None, username=None, password=None): ''' Add a comment to an existing ticket. Return ``True`` when it successfully added the comment....
[ "def", "add_comment", "(", "issue_key", ",", "comment", ",", "visibility", "=", "None", ",", "is_internal", "=", "False", ",", "server", "=", "None", ",", "username", "=", "None", ",", "password", "=", "None", ")", ":", "jira_", "=", "_get_jira", "(", ...
Add a comment to an existing ticket. Return ``True`` when it successfully added the comment. issue_key The issue ID to add the comment to. comment The body of the comment to be added. visibility: ``None`` A dictionary having two keys: - ``type``: is ``role`` (or ``gro...
[ "Add", "a", "comment", "to", "an", "existing", "ticket", ".", "Return", "True", "when", "it", "successfully", "added", "the", "comment", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/jira_mod.py#L212-L253
33,166
saltstack/salt
salt/modules/jira_mod.py
issue_closed
def issue_closed(issue_key, server=None, username=None, password=None): ''' Check if the issue is closed. issue_key The JIRA iD of the ticket to close. Returns: - ``True``: the ticket exists and it is closed. - ``False``: the ticket e...
python
def issue_closed(issue_key, server=None, username=None, password=None): ''' Check if the issue is closed. issue_key The JIRA iD of the ticket to close. Returns: - ``True``: the ticket exists and it is closed. - ``False``: the ticket e...
[ "def", "issue_closed", "(", "issue_key", ",", "server", "=", "None", ",", "username", "=", "None", ",", "password", "=", "None", ")", ":", "if", "not", "issue_key", ":", "return", "None", "jira_", "=", "_get_jira", "(", "server", "=", "server", ",", "u...
Check if the issue is closed. issue_key The JIRA iD of the ticket to close. Returns: - ``True``: the ticket exists and it is closed. - ``False``: the ticket exists and it has not been closed. - ``None``: the ticket does not exist. CLI Example: .. code-block:: bash salt ...
[ "Check", "if", "the", "issue", "is", "closed", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/jira_mod.py#L256-L288
33,167
saltstack/salt
salt/grains/junos.py
_remove_complex_types
def _remove_complex_types(dictionary): ''' Linode-python is now returning some complex types that are not serializable by msgpack. Kill those. ''' for k, v in six.iteritems(dictionary): if isinstance(v, dict): dictionary[k] = _remove_complex_types(v) elif hasattr(v, 'to_...
python
def _remove_complex_types(dictionary): ''' Linode-python is now returning some complex types that are not serializable by msgpack. Kill those. ''' for k, v in six.iteritems(dictionary): if isinstance(v, dict): dictionary[k] = _remove_complex_types(v) elif hasattr(v, 'to_...
[ "def", "_remove_complex_types", "(", "dictionary", ")", ":", "for", "k", ",", "v", "in", "six", ".", "iteritems", "(", "dictionary", ")", ":", "if", "isinstance", "(", "v", ",", "dict", ")", ":", "dictionary", "[", "k", "]", "=", "_remove_complex_types",...
Linode-python is now returning some complex types that are not serializable by msgpack. Kill those.
[ "Linode", "-", "python", "is", "now", "returning", "some", "complex", "types", "that", "are", "not", "serializable", "by", "msgpack", ".", "Kill", "those", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/grains/junos.py#L30-L41
33,168
saltstack/salt
salt/states/module.py
run
def run(**kwargs): ''' Run a single module function or a range of module functions in a batch. Supersedes ``module.run`` function, which requires ``m_`` prefix to function-specific parameters. :param returner: Specify a common returner for the whole batch to send the return data :param...
python
def run(**kwargs): ''' Run a single module function or a range of module functions in a batch. Supersedes ``module.run`` function, which requires ``m_`` prefix to function-specific parameters. :param returner: Specify a common returner for the whole batch to send the return data :param...
[ "def", "run", "(", "*", "*", "kwargs", ")", ":", "if", "'name'", "in", "kwargs", ":", "kwargs", ".", "pop", "(", "'name'", ")", "ret", "=", "{", "'name'", ":", "list", "(", "kwargs", ")", ",", "'changes'", ":", "{", "}", ",", "'comment'", ":", ...
Run a single module function or a range of module functions in a batch. Supersedes ``module.run`` function, which requires ``m_`` prefix to function-specific parameters. :param returner: Specify a common returner for the whole batch to send the return data :param kwargs: Pass any argum...
[ "Run", "a", "single", "module", "function", "or", "a", "range", "of", "module", "functions", "in", "a", "batch", ".", "Supersedes", "module", ".", "run", "function", "which", "requires", "m_", "prefix", "to", "function", "-", "specific", "parameters", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/module.py#L350-L436
33,169
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
33,170
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
33,171
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
33,172
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
33,173
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
33,174
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
33,175
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
33,176
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
33,177
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
33,178
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
33,179
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
33,180
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
33,181
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
33,182
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
33,183
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
33,184
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
33,185
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
33,186
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
33,187
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
33,188
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
33,189
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
33,190
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
33,191
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
33,192
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
33,193
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
33,194
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
33,195
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
33,196
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
33,197
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
33,198
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
33,199
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