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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
37,200 | saltstack/salt | salt/modules/aptly.py | get_mirror | def get_mirror(name, config_path=_DEFAULT_CONFIG_PATH, with_packages=False):
'''
Get detailed information about a mirrored remote repository.
:param str name: The name of the remote repository mirror.
:param str config_path: The path to the configuration file for the aptly instance.
:param bool wit... | python | def get_mirror(name, config_path=_DEFAULT_CONFIG_PATH, with_packages=False):
'''
Get detailed information about a mirrored remote repository.
:param str name: The name of the remote repository mirror.
:param str config_path: The path to the configuration file for the aptly instance.
:param bool wit... | [
"def",
"get_mirror",
"(",
"name",
",",
"config_path",
"=",
"_DEFAULT_CONFIG_PATH",
",",
"with_packages",
"=",
"False",
")",
":",
"_validate_config",
"(",
"config_path",
")",
"ret",
"=",
"dict",
"(",
")",
"cmd",
"=",
"[",
"'mirror'",
",",
"'show'",
",",
"'-... | Get detailed information about a mirrored remote repository.
:param str name: The name of the remote repository mirror.
:param str config_path: The path to the configuration file for the aptly instance.
:param bool with_packages: Return a list of packages in the repo.
:return: A dictionary containing ... | [
"Get",
"detailed",
"information",
"about",
"a",
"mirrored",
"remote",
"repository",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aptly.py#L488-L521 |
37,201 | saltstack/salt | salt/modules/aptly.py | delete_mirror | def delete_mirror(name, config_path=_DEFAULT_CONFIG_PATH, force=False):
'''
Remove a mirrored remote repository. By default, Package data is not removed.
:param str name: The name of the remote repository mirror.
:param str config_path: The path to the configuration file for the aptly instance.
:pa... | python | def delete_mirror(name, config_path=_DEFAULT_CONFIG_PATH, force=False):
'''
Remove a mirrored remote repository. By default, Package data is not removed.
:param str name: The name of the remote repository mirror.
:param str config_path: The path to the configuration file for the aptly instance.
:pa... | [
"def",
"delete_mirror",
"(",
"name",
",",
"config_path",
"=",
"_DEFAULT_CONFIG_PATH",
",",
"force",
"=",
"False",
")",
":",
"_validate_config",
"(",
"config_path",
")",
"force",
"=",
"six",
".",
"text_type",
"(",
"bool",
"(",
"force",
")",
")",
".",
"lower... | Remove a mirrored remote repository. By default, Package data is not removed.
:param str name: The name of the remote repository mirror.
:param str config_path: The path to the configuration file for the aptly instance.
:param bool force: Whether to remove the mirror even if it is used as the source
... | [
"Remove",
"a",
"mirrored",
"remote",
"repository",
".",
"By",
"default",
"Package",
"data",
"is",
"not",
"removed",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aptly.py#L524-L561 |
37,202 | saltstack/salt | salt/modules/aptly.py | list_published | def list_published(config_path=_DEFAULT_CONFIG_PATH):
'''
Get a list of all the published repositories.
:param str config_path: The path to the configuration file for the aptly instance.
:return: A list of the published repositories.
:rtype: list
CLI Example:
.. code-block:: bash
... | python | def list_published(config_path=_DEFAULT_CONFIG_PATH):
'''
Get a list of all the published repositories.
:param str config_path: The path to the configuration file for the aptly instance.
:return: A list of the published repositories.
:rtype: list
CLI Example:
.. code-block:: bash
... | [
"def",
"list_published",
"(",
"config_path",
"=",
"_DEFAULT_CONFIG_PATH",
")",
":",
"_validate_config",
"(",
"config_path",
")",
"ret",
"=",
"list",
"(",
")",
"cmd",
"=",
"[",
"'publish'",
",",
"'list'",
",",
"'-config={}'",
".",
"format",
"(",
"config_path",
... | Get a list of all the published repositories.
:param str config_path: The path to the configuration file for the aptly instance.
:return: A list of the published repositories.
:rtype: list
CLI Example:
.. code-block:: bash
salt '*' aptly.list_published | [
"Get",
"a",
"list",
"of",
"all",
"the",
"published",
"repositories",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aptly.py#L564-L594 |
37,203 | saltstack/salt | salt/modules/aptly.py | get_published | def get_published(name, config_path=_DEFAULT_CONFIG_PATH, endpoint='', prefix=None):
'''
Get the details of a published repository.
:param str name: The distribution name of the published repository.
:param str config_path: The path to the configuration file for the aptly instance.
:param str endpo... | python | def get_published(name, config_path=_DEFAULT_CONFIG_PATH, endpoint='', prefix=None):
'''
Get the details of a published repository.
:param str name: The distribution name of the published repository.
:param str config_path: The path to the configuration file for the aptly instance.
:param str endpo... | [
"def",
"get_published",
"(",
"name",
",",
"config_path",
"=",
"_DEFAULT_CONFIG_PATH",
",",
"endpoint",
"=",
"''",
",",
"prefix",
"=",
"None",
")",
":",
"_validate_config",
"(",
"config_path",
")",
"ret",
"=",
"dict",
"(",
")",
"sources",
"=",
"list",
"(",
... | Get the details of a published repository.
:param str name: The distribution name of the published repository.
:param str config_path: The path to the configuration file for the aptly instance.
:param str endpoint: The publishing endpoint.
:param str prefix: The prefix for publishing.
:return: A d... | [
"Get",
"the",
"details",
"of",
"a",
"published",
"repository",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aptly.py#L597-L633 |
37,204 | saltstack/salt | salt/modules/aptly.py | delete_published | def delete_published(name, config_path=_DEFAULT_CONFIG_PATH, endpoint='', prefix=None,
skip_cleanup=False, force=False):
'''
Remove files belonging to a published repository. Aptly tries to remove as many files
belonging to this repository as possible.
:param str name: The dist... | python | def delete_published(name, config_path=_DEFAULT_CONFIG_PATH, endpoint='', prefix=None,
skip_cleanup=False, force=False):
'''
Remove files belonging to a published repository. Aptly tries to remove as many files
belonging to this repository as possible.
:param str name: The dist... | [
"def",
"delete_published",
"(",
"name",
",",
"config_path",
"=",
"_DEFAULT_CONFIG_PATH",
",",
"endpoint",
"=",
"''",
",",
"prefix",
"=",
"None",
",",
"skip_cleanup",
"=",
"False",
",",
"force",
"=",
"False",
")",
":",
"_validate_config",
"(",
"config_path",
... | Remove files belonging to a published repository. Aptly tries to remove as many files
belonging to this repository as possible.
:param str name: The distribution name of the published repository.
:param str config_path: The path to the configuration file for the aptly instance.
:param str endpoint:... | [
"Remove",
"files",
"belonging",
"to",
"a",
"published",
"repository",
".",
"Aptly",
"tries",
"to",
"remove",
"as",
"many",
"files",
"belonging",
"to",
"this",
"repository",
"as",
"possible",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aptly.py#L636-L685 |
37,205 | saltstack/salt | salt/modules/aptly.py | list_snapshots | def list_snapshots(config_path=_DEFAULT_CONFIG_PATH, sort_by_time=False):
'''
Get a list of all the existing snapshots.
:param str config_path: The path to the configuration file for the aptly instance.
:param bool sort_by_time: Whether to sort by creation time instead of by name.
:return: A list ... | python | def list_snapshots(config_path=_DEFAULT_CONFIG_PATH, sort_by_time=False):
'''
Get a list of all the existing snapshots.
:param str config_path: The path to the configuration file for the aptly instance.
:param bool sort_by_time: Whether to sort by creation time instead of by name.
:return: A list ... | [
"def",
"list_snapshots",
"(",
"config_path",
"=",
"_DEFAULT_CONFIG_PATH",
",",
"sort_by_time",
"=",
"False",
")",
":",
"_validate_config",
"(",
"config_path",
")",
"cmd",
"=",
"[",
"'snapshot'",
",",
"'list'",
",",
"'-config={}'",
".",
"format",
"(",
"config_pat... | Get a list of all the existing snapshots.
:param str config_path: The path to the configuration file for the aptly instance.
:param bool sort_by_time: Whether to sort by creation time instead of by name.
:return: A list of the snapshot names.
:rtype: list
CLI Example:
.. code-block:: bash
... | [
"Get",
"a",
"list",
"of",
"all",
"the",
"existing",
"snapshots",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aptly.py#L688-L717 |
37,206 | saltstack/salt | salt/modules/aptly.py | get_snapshot | def get_snapshot(name, config_path=_DEFAULT_CONFIG_PATH, with_packages=False):
'''
Get detailed information about a snapshot.
:param str name: The name of the snapshot given during snapshot creation.
:param str config_path: The path to the configuration file for the aptly instance.
:param bool with... | python | def get_snapshot(name, config_path=_DEFAULT_CONFIG_PATH, with_packages=False):
'''
Get detailed information about a snapshot.
:param str name: The name of the snapshot given during snapshot creation.
:param str config_path: The path to the configuration file for the aptly instance.
:param bool with... | [
"def",
"get_snapshot",
"(",
"name",
",",
"config_path",
"=",
"_DEFAULT_CONFIG_PATH",
",",
"with_packages",
"=",
"False",
")",
":",
"_validate_config",
"(",
"config_path",
")",
"sources",
"=",
"list",
"(",
")",
"cmd",
"=",
"[",
"'snapshot'",
",",
"'show'",
",... | Get detailed information about a snapshot.
:param str name: The name of the snapshot given during snapshot creation.
:param str config_path: The path to the configuration file for the aptly instance.
:param bool with_packages: Return a list of packages in the snapshot.
:return: A dictionary containing... | [
"Get",
"detailed",
"information",
"about",
"a",
"snapshot",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aptly.py#L720-L754 |
37,207 | saltstack/salt | salt/modules/aptly.py | delete_snapshot | def delete_snapshot(name, config_path=_DEFAULT_CONFIG_PATH, force=False):
'''
Remove information about a snapshot. If a snapshot is published, it can not be
dropped without first removing publishing for that snapshot. If a snapshot is
used as the source for other snapshots, Aptly will refuse to ... | python | def delete_snapshot(name, config_path=_DEFAULT_CONFIG_PATH, force=False):
'''
Remove information about a snapshot. If a snapshot is published, it can not be
dropped without first removing publishing for that snapshot. If a snapshot is
used as the source for other snapshots, Aptly will refuse to ... | [
"def",
"delete_snapshot",
"(",
"name",
",",
"config_path",
"=",
"_DEFAULT_CONFIG_PATH",
",",
"force",
"=",
"False",
")",
":",
"_validate_config",
"(",
"config_path",
")",
"force",
"=",
"six",
".",
"text_type",
"(",
"bool",
"(",
"force",
")",
")",
".",
"low... | Remove information about a snapshot. If a snapshot is published, it can not be
dropped without first removing publishing for that snapshot. If a snapshot is
used as the source for other snapshots, Aptly will refuse to remove it unless
forced.
:param str name: The name of the snapshot given ... | [
"Remove",
"information",
"about",
"a",
"snapshot",
".",
"If",
"a",
"snapshot",
"is",
"published",
"it",
"can",
"not",
"be",
"dropped",
"without",
"first",
"removing",
"publishing",
"for",
"that",
"snapshot",
".",
"If",
"a",
"snapshot",
"is",
"used",
"as",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aptly.py#L757-L797 |
37,208 | saltstack/salt | salt/modules/aptly.py | cleanup_db | def cleanup_db(config_path=_DEFAULT_CONFIG_PATH, dry_run=False):
'''
Remove data regarding unreferenced packages and delete files in the package pool that
are no longer being used by packages.
:param bool dry_run: Report potential changes without making any changes.
:return: A dictionary of th... | python | def cleanup_db(config_path=_DEFAULT_CONFIG_PATH, dry_run=False):
'''
Remove data regarding unreferenced packages and delete files in the package pool that
are no longer being used by packages.
:param bool dry_run: Report potential changes without making any changes.
:return: A dictionary of th... | [
"def",
"cleanup_db",
"(",
"config_path",
"=",
"_DEFAULT_CONFIG_PATH",
",",
"dry_run",
"=",
"False",
")",
":",
"_validate_config",
"(",
"config_path",
")",
"dry_run",
"=",
"six",
".",
"text_type",
"(",
"bool",
"(",
"dry_run",
")",
")",
".",
"lower",
"(",
")... | Remove data regarding unreferenced packages and delete files in the package pool that
are no longer being used by packages.
:param bool dry_run: Report potential changes without making any changes.
:return: A dictionary of the package keys and files that were removed.
:rtype: dict
CLI Example... | [
"Remove",
"data",
"regarding",
"unreferenced",
"packages",
"and",
"delete",
"files",
"in",
"the",
"package",
"pool",
"that",
"are",
"no",
"longer",
"being",
"used",
"by",
"packages",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aptly.py#L800-L848 |
37,209 | saltstack/salt | salt/states/bluecoat_sslv.py | distinguished_name_list_exists | def distinguished_name_list_exists(name, items):
'''
Ensures that a distinguished name list exists with the items provided.
name: The name of the module function to execute.
name(str): The name of the distinguished names list.
items(list): A list of items to ensure exist on the distinguished name... | python | def distinguished_name_list_exists(name, items):
'''
Ensures that a distinguished name list exists with the items provided.
name: The name of the module function to execute.
name(str): The name of the distinguished names list.
items(list): A list of items to ensure exist on the distinguished name... | [
"def",
"distinguished_name_list_exists",
"(",
"name",
",",
"items",
")",
":",
"ret",
"=",
"_default_ret",
"(",
"name",
")",
"req_change",
"=",
"False",
"try",
":",
"existing_lists",
"=",
"__salt__",
"[",
"'bluecoat_sslv.get_distinguished_name_lists'",
"]",
"(",
")... | Ensures that a distinguished name list exists with the items provided.
name: The name of the module function to execute.
name(str): The name of the distinguished names list.
items(list): A list of items to ensure exist on the distinguished names list.
SLS Example:
.. code-block:: yaml
... | [
"Ensures",
"that",
"a",
"distinguished",
"name",
"list",
"exists",
"with",
"the",
"items",
"provided",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/bluecoat_sslv.py#L50-L95 |
37,210 | saltstack/salt | salt/modules/boto_cloudwatch.py | get_alarm | def get_alarm(name, region=None, key=None, keyid=None, profile=None):
'''
Get alarm details. Also can be used to check to see if an alarm exists.
CLI example::
salt myminion boto_cloudwatch.get_alarm myalarm region=us-east-1
'''
conn = _get_conn(region=region, key=key, keyid=keyid, profile... | python | def get_alarm(name, region=None, key=None, keyid=None, profile=None):
'''
Get alarm details. Also can be used to check to see if an alarm exists.
CLI example::
salt myminion boto_cloudwatch.get_alarm myalarm region=us-east-1
'''
conn = _get_conn(region=region, key=key, keyid=keyid, profile... | [
"def",
"get_alarm",
"(",
"name",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"conn",
"=",
"_get_conn",
"(",
"region",
"=",
"region",
",",
"key",
"=",
"key",
",",
"keyid",
... | Get alarm details. Also can be used to check to see if an alarm exists.
CLI example::
salt myminion boto_cloudwatch.get_alarm myalarm region=us-east-1 | [
"Get",
"alarm",
"details",
".",
"Also",
"can",
"be",
"used",
"to",
"check",
"to",
"see",
"if",
"an",
"alarm",
"exists",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_cloudwatch.py#L85-L100 |
37,211 | saltstack/salt | salt/modules/boto_cloudwatch.py | get_all_alarms | def get_all_alarms(region=None, prefix=None, key=None, keyid=None,
profile=None):
'''
Get all alarm details. Produces results that can be used to create an sls
file.
If prefix parameter is given, alarm names in the output will be prepended
with the prefix; alarms that have the p... | python | def get_all_alarms(region=None, prefix=None, key=None, keyid=None,
profile=None):
'''
Get all alarm details. Produces results that can be used to create an sls
file.
If prefix parameter is given, alarm names in the output will be prepended
with the prefix; alarms that have the p... | [
"def",
"get_all_alarms",
"(",
"region",
"=",
"None",
",",
"prefix",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"conn",
"=",
"_get_conn",
"(",
"region",
"=",
"region",
",",
"key",
"=",
"ke... | Get all alarm details. Produces results that can be used to create an sls
file.
If prefix parameter is given, alarm names in the output will be prepended
with the prefix; alarms that have the prefix will be skipped. This can be
used to convert existing alarms to be managed by salt, as follows:
... | [
"Get",
"all",
"alarm",
"details",
".",
"Produces",
"results",
"that",
"can",
"be",
"used",
"to",
"create",
"an",
"sls",
"file",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_cloudwatch.py#L127-L175 |
37,212 | saltstack/salt | salt/modules/boto_cloudwatch.py | create_or_update_alarm | def create_or_update_alarm(
connection=None, name=None, metric=None, namespace=None,
statistic=None, comparison=None, threshold=None, period=None,
evaluation_periods=None, unit=None, description='',
dimensions=None, alarm_actions=None,
insufficient_data_actions=None, ok_actions=N... | python | def create_or_update_alarm(
connection=None, name=None, metric=None, namespace=None,
statistic=None, comparison=None, threshold=None, period=None,
evaluation_periods=None, unit=None, description='',
dimensions=None, alarm_actions=None,
insufficient_data_actions=None, ok_actions=N... | [
"def",
"create_or_update_alarm",
"(",
"connection",
"=",
"None",
",",
"name",
"=",
"None",
",",
"metric",
"=",
"None",
",",
"namespace",
"=",
"None",
",",
"statistic",
"=",
"None",
",",
"comparison",
"=",
"None",
",",
"threshold",
"=",
"None",
",",
"peri... | Create or update a cloudwatch alarm.
Params are the same as:
https://boto.readthedocs.io/en/latest/ref/cloudwatch.html#boto.ec2.cloudwatch.alarm.MetricAlarm.
Dimensions must be a dict. If the value of Dimensions is a string, it will
be json decoded to produce a dict. alarm_actions, insufficient_da... | [
"Create",
"or",
"update",
"a",
"cloudwatch",
"alarm",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_cloudwatch.py#L178-L271 |
37,213 | saltstack/salt | salt/modules/boto_cloudwatch.py | delete_alarm | def delete_alarm(name, region=None, key=None, keyid=None, profile=None):
'''
Delete a cloudwatch alarm
CLI example to delete a queue::
salt myminion boto_cloudwatch.delete_alarm myalarm region=us-east-1
'''
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
conn.de... | python | def delete_alarm(name, region=None, key=None, keyid=None, profile=None):
'''
Delete a cloudwatch alarm
CLI example to delete a queue::
salt myminion boto_cloudwatch.delete_alarm myalarm region=us-east-1
'''
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
conn.de... | [
"def",
"delete_alarm",
"(",
"name",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"conn",
"=",
"_get_conn",
"(",
"region",
"=",
"region",
",",
"key",
"=",
"key",
",",
"keyid",... | Delete a cloudwatch alarm
CLI example to delete a queue::
salt myminion boto_cloudwatch.delete_alarm myalarm region=us-east-1 | [
"Delete",
"a",
"cloudwatch",
"alarm"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_cloudwatch.py#L299-L311 |
37,214 | saltstack/salt | salt/modules/boto_cloudwatch.py | _metric_alarm_to_dict | def _metric_alarm_to_dict(alarm):
'''
Convert a boto.ec2.cloudwatch.alarm.MetricAlarm into a dict. Convenience
for pretty printing.
'''
d = odict.OrderedDict()
fields = ['name', 'metric', 'namespace', 'statistic', 'comparison',
'threshold', 'period', 'evaluation_periods', 'unit',
... | python | def _metric_alarm_to_dict(alarm):
'''
Convert a boto.ec2.cloudwatch.alarm.MetricAlarm into a dict. Convenience
for pretty printing.
'''
d = odict.OrderedDict()
fields = ['name', 'metric', 'namespace', 'statistic', 'comparison',
'threshold', 'period', 'evaluation_periods', 'unit',
... | [
"def",
"_metric_alarm_to_dict",
"(",
"alarm",
")",
":",
"d",
"=",
"odict",
".",
"OrderedDict",
"(",
")",
"fields",
"=",
"[",
"'name'",
",",
"'metric'",
",",
"'namespace'",
",",
"'statistic'",
",",
"'comparison'",
",",
"'threshold'",
",",
"'period'",
",",
"... | Convert a boto.ec2.cloudwatch.alarm.MetricAlarm into a dict. Convenience
for pretty printing. | [
"Convert",
"a",
"boto",
".",
"ec2",
".",
"cloudwatch",
".",
"alarm",
".",
"MetricAlarm",
"into",
"a",
"dict",
".",
"Convenience",
"for",
"pretty",
"printing",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_cloudwatch.py#L314-L327 |
37,215 | saltstack/salt | salt/states/gpg.py | present | def present(name,
keys=None,
user=None,
keyserver=None,
gnupghome=None,
trust=None,
**kwargs):
'''
Ensure GPG public key is present in keychain
name
The unique name or keyid for the GPG public key.
keys
The keyId o... | python | def present(name,
keys=None,
user=None,
keyserver=None,
gnupghome=None,
trust=None,
**kwargs):
'''
Ensure GPG public key is present in keychain
name
The unique name or keyid for the GPG public key.
keys
The keyId o... | [
"def",
"present",
"(",
"name",
",",
"keys",
"=",
"None",
",",
"user",
"=",
"None",
",",
"keyserver",
"=",
"None",
",",
"gnupghome",
"=",
"None",
",",
"trust",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",... | Ensure GPG public key is present in keychain
name
The unique name or keyid for the GPG public key.
keys
The keyId or keyIds to add to the GPG keychain.
user
Add GPG keys to the specified user's keychain
keyserver
The keyserver to retrieve the keys from.
gnupghome... | [
"Ensure",
"GPG",
"public",
"key",
"is",
"present",
"in",
"keychain"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/gpg.py#L34-L136 |
37,216 | saltstack/salt | salt/states/gpg.py | absent | def absent(name,
keys=None,
user=None,
gnupghome=None,
**kwargs):
'''
Ensure GPG public key is absent in keychain
name
The unique name or keyid for the GPG public key.
keys
The keyId or keyIds to add to the GPG keychain.
user
Rem... | python | def absent(name,
keys=None,
user=None,
gnupghome=None,
**kwargs):
'''
Ensure GPG public key is absent in keychain
name
The unique name or keyid for the GPG public key.
keys
The keyId or keyIds to add to the GPG keychain.
user
Rem... | [
"def",
"absent",
"(",
"name",
",",
"keys",
"=",
"None",
",",
"user",
"=",
"None",
",",
"gnupghome",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'result'",
":",
"True",
",",
"'changes'",
":",
"{",
... | Ensure GPG public key is absent in keychain
name
The unique name or keyid for the GPG public key.
keys
The keyId or keyIds to add to the GPG keychain.
user
Remove GPG keys from the specified user's keychain
gnupghome
Override GNUPG Home directory | [
"Ensure",
"GPG",
"public",
"key",
"is",
"absent",
"in",
"keychain"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/gpg.py#L139-L192 |
37,217 | saltstack/salt | salt/pillar/hg_pillar.py | ext_pillar | def ext_pillar(minion_id, pillar, repo, branch='default', root=None):
'''
Extract pillar from an hg repository
'''
with Repo(repo) as repo:
repo.update(branch)
envname = 'base' if branch == 'default' else branch
if root:
path = os.path.normpath(os.path.join(repo.working_dir, root... | python | def ext_pillar(minion_id, pillar, repo, branch='default', root=None):
'''
Extract pillar from an hg repository
'''
with Repo(repo) as repo:
repo.update(branch)
envname = 'base' if branch == 'default' else branch
if root:
path = os.path.normpath(os.path.join(repo.working_dir, root... | [
"def",
"ext_pillar",
"(",
"minion_id",
",",
"pillar",
",",
"repo",
",",
"branch",
"=",
"'default'",
",",
"root",
"=",
"None",
")",
":",
"with",
"Repo",
"(",
"repo",
")",
"as",
"repo",
":",
"repo",
".",
"update",
"(",
"branch",
")",
"envname",
"=",
... | Extract pillar from an hg repository | [
"Extract",
"pillar",
"from",
"an",
"hg",
"repository"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/hg_pillar.py#L69-L84 |
37,218 | saltstack/salt | salt/pillar/hg_pillar.py | Repo.update | def update(self, branch='default'):
'''
Ensure we are using the latest revision in the hg repository
'''
log.debug('Updating hg repo from hg_pillar module (pull)')
self.repo.pull()
log.debug('Updating hg repo from hg_pillar module (update)')
self.repo.update(branc... | python | def update(self, branch='default'):
'''
Ensure we are using the latest revision in the hg repository
'''
log.debug('Updating hg repo from hg_pillar module (pull)')
self.repo.pull()
log.debug('Updating hg repo from hg_pillar module (update)')
self.repo.update(branc... | [
"def",
"update",
"(",
"self",
",",
"branch",
"=",
"'default'",
")",
":",
"log",
".",
"debug",
"(",
"'Updating hg repo from hg_pillar module (pull)'",
")",
"self",
".",
"repo",
".",
"pull",
"(",
")",
"log",
".",
"debug",
"(",
"'Updating hg repo from hg_pillar mod... | Ensure we are using the latest revision in the hg repository | [
"Ensure",
"we",
"are",
"using",
"the",
"latest",
"revision",
"in",
"the",
"hg",
"repository"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/hg_pillar.py#L120-L127 |
37,219 | saltstack/salt | salt/proxy/netmiko_px.py | init | def init(opts):
'''
Open the connection to the network device
managed through netmiko.
'''
proxy_dict = opts.get('proxy', {})
opts['multiprocessing'] = proxy_dict.get('multiprocessing', False)
netmiko_connection_args = proxy_dict.copy()
netmiko_connection_args.pop('proxytype', None)
... | python | def init(opts):
'''
Open the connection to the network device
managed through netmiko.
'''
proxy_dict = opts.get('proxy', {})
opts['multiprocessing'] = proxy_dict.get('multiprocessing', False)
netmiko_connection_args = proxy_dict.copy()
netmiko_connection_args.pop('proxytype', None)
... | [
"def",
"init",
"(",
"opts",
")",
":",
"proxy_dict",
"=",
"opts",
".",
"get",
"(",
"'proxy'",
",",
"{",
"}",
")",
"opts",
"[",
"'multiprocessing'",
"]",
"=",
"proxy_dict",
".",
"get",
"(",
"'multiprocessing'",
",",
"False",
")",
"netmiko_connection_args",
... | Open the connection to the network device
managed through netmiko. | [
"Open",
"the",
"connection",
"to",
"the",
"network",
"device",
"managed",
"through",
"netmiko",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/netmiko_px.py#L234-L257 |
37,220 | saltstack/salt | salt/proxy/netmiko_px.py | alive | def alive(opts):
'''
Return the connection status with the network device.
'''
log.debug('Checking if %s is still alive', opts.get('id', ''))
if not netmiko_device['always_alive']:
return True
if ping() and initialized():
return netmiko_device['connection'].remote_conn.transport.... | python | def alive(opts):
'''
Return the connection status with the network device.
'''
log.debug('Checking if %s is still alive', opts.get('id', ''))
if not netmiko_device['always_alive']:
return True
if ping() and initialized():
return netmiko_device['connection'].remote_conn.transport.... | [
"def",
"alive",
"(",
"opts",
")",
":",
"log",
".",
"debug",
"(",
"'Checking if %s is still alive'",
",",
"opts",
".",
"get",
"(",
"'id'",
",",
"''",
")",
")",
"if",
"not",
"netmiko_device",
"[",
"'always_alive'",
"]",
":",
"return",
"True",
"if",
"ping",... | Return the connection status with the network device. | [
"Return",
"the",
"connection",
"status",
"with",
"the",
"network",
"device",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/netmiko_px.py#L260-L269 |
37,221 | saltstack/salt | salt/proxy/netmiko_px.py | call | def call(method, *args, **kwargs):
'''
Calls an arbitrary netmiko method.
'''
kwargs = clean_kwargs(**kwargs)
if not netmiko_device['always_alive']:
connection = ConnectHandler(**netmiko_device['args'])
ret = getattr(connection, method)(*args, **kwargs)
connection.disconnect(... | python | def call(method, *args, **kwargs):
'''
Calls an arbitrary netmiko method.
'''
kwargs = clean_kwargs(**kwargs)
if not netmiko_device['always_alive']:
connection = ConnectHandler(**netmiko_device['args'])
ret = getattr(connection, method)(*args, **kwargs)
connection.disconnect(... | [
"def",
"call",
"(",
"method",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"kwargs",
"=",
"clean_kwargs",
"(",
"*",
"*",
"kwargs",
")",
"if",
"not",
"netmiko_device",
"[",
"'always_alive'",
"]",
":",
"connection",
"=",
"ConnectHandler",
"(",
"*... | Calls an arbitrary netmiko method. | [
"Calls",
"an",
"arbitrary",
"netmiko",
"method",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/netmiko_px.py#L312-L322 |
37,222 | saltstack/salt | salt/modules/boto_cloudtrail.py | exists | def exists(Name,
region=None, key=None, keyid=None, profile=None):
'''
Given a trail name, check to see if the given trail exists.
Returns True if the given trail exists and returns False if the given
trail does not exist.
CLI Example:
.. code-block:: bash
salt myminion bo... | python | def exists(Name,
region=None, key=None, keyid=None, profile=None):
'''
Given a trail name, check to see if the given trail exists.
Returns True if the given trail exists and returns False if the given
trail does not exist.
CLI Example:
.. code-block:: bash
salt myminion bo... | [
"def",
"exists",
"(",
"Name",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"try",
":",
"conn",
"=",
"_get_conn",
"(",
"region",
"=",
"region",
",",
"key",
"=",
"key",
",",
... | Given a trail name, check to see if the given trail exists.
Returns True if the given trail exists and returns False if the given
trail does not exist.
CLI Example:
.. code-block:: bash
salt myminion boto_cloudtrail.exists mytrail | [
"Given",
"a",
"trail",
"name",
"check",
"to",
"see",
"if",
"the",
"given",
"trail",
"exists",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_cloudtrail.py#L98-L122 |
37,223 | saltstack/salt | salt/modules/boto_cloudtrail.py | list | def list(region=None, key=None, keyid=None, profile=None):
'''
List all trails
Returns list of trails
CLI Example:
.. code-block:: yaml
policies:
- {...}
- {...}
'''
try:
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
t... | python | def list(region=None, key=None, keyid=None, profile=None):
'''
List all trails
Returns list of trails
CLI Example:
.. code-block:: yaml
policies:
- {...}
- {...}
'''
try:
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
t... | [
"def",
"list",
"(",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"try",
":",
"conn",
"=",
"_get_conn",
"(",
"region",
"=",
"region",
",",
"key",
"=",
"key",
",",
"keyid",
"=",
... | List all trails
Returns list of trails
CLI Example:
.. code-block:: yaml
policies:
- {...}
- {...} | [
"List",
"all",
"trails"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_cloudtrail.py#L273-L295 |
37,224 | saltstack/salt | salt/modules/boto_cloudtrail.py | update | def update(Name,
S3BucketName, S3KeyPrefix=None,
SnsTopicName=None,
IncludeGlobalServiceEvents=None,
IsMultiRegionTrail=None,
EnableLogFileValidation=None,
CloudWatchLogsLogGroupArn=None,
CloudWatchLogsRoleArn=None,
KmsKeyId=None,
... | python | def update(Name,
S3BucketName, S3KeyPrefix=None,
SnsTopicName=None,
IncludeGlobalServiceEvents=None,
IsMultiRegionTrail=None,
EnableLogFileValidation=None,
CloudWatchLogsLogGroupArn=None,
CloudWatchLogsRoleArn=None,
KmsKeyId=None,
... | [
"def",
"update",
"(",
"Name",
",",
"S3BucketName",
",",
"S3KeyPrefix",
"=",
"None",
",",
"SnsTopicName",
"=",
"None",
",",
"IncludeGlobalServiceEvents",
"=",
"None",
",",
"IsMultiRegionTrail",
"=",
"None",
",",
"EnableLogFileValidation",
"=",
"None",
",",
"Cloud... | Given a valid config, update a trail.
Returns {created: true} if the trail was created and returns
{created: False} if the trail was not created.
CLI Example:
.. code-block:: bash
salt myminion boto_cloudtrail.update my_trail my_bucket | [
"Given",
"a",
"valid",
"config",
"update",
"a",
"trail",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_cloudtrail.py#L298-L342 |
37,225 | saltstack/salt | salt/modules/boto_cloudtrail.py | start_logging | def start_logging(Name,
region=None, key=None, keyid=None, profile=None):
'''
Start logging for a trail
Returns {started: true} if the trail was started and returns
{started: False} if the trail was not started.
CLI Example:
.. code-block:: bash
salt myminion boto_cloudtra... | python | def start_logging(Name,
region=None, key=None, keyid=None, profile=None):
'''
Start logging for a trail
Returns {started: true} if the trail was started and returns
{started: False} if the trail was not started.
CLI Example:
.. code-block:: bash
salt myminion boto_cloudtra... | [
"def",
"start_logging",
"(",
"Name",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"try",
":",
"conn",
"=",
"_get_conn",
"(",
"region",
"=",
"region",
",",
"key",
"=",
"key",
... | Start logging for a trail
Returns {started: true} if the trail was started and returns
{started: False} if the trail was not started.
CLI Example:
.. code-block:: bash
salt myminion boto_cloudtrail.start_logging my_trail | [
"Start",
"logging",
"for",
"a",
"trail"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_cloudtrail.py#L345-L366 |
37,226 | saltstack/salt | salt/modules/boto_cloudtrail.py | add_tags | def add_tags(Name,
region=None, key=None, keyid=None, profile=None, **kwargs):
'''
Add tags to a trail
Returns {tagged: true} if the trail was tagged and returns
{tagged: False} if the trail was not tagged.
CLI Example:
.. code-block:: bash
salt myminion boto_cloudtrail.ad... | python | def add_tags(Name,
region=None, key=None, keyid=None, profile=None, **kwargs):
'''
Add tags to a trail
Returns {tagged: true} if the trail was tagged and returns
{tagged: False} if the trail was not tagged.
CLI Example:
.. code-block:: bash
salt myminion boto_cloudtrail.ad... | [
"def",
"add_tags",
"(",
"Name",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"try",
":",
"conn",
"=",
"_get_conn",
"(",
"region",
"=",
"region",
",... | Add tags to a trail
Returns {tagged: true} if the trail was tagged and returns
{tagged: False} if the trail was not tagged.
CLI Example:
.. code-block:: bash
salt myminion boto_cloudtrail.add_tags my_trail tag_a=tag_value tag_b=tag_value | [
"Add",
"tags",
"to",
"a",
"trail"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_cloudtrail.py#L407-L435 |
37,227 | saltstack/salt | salt/modules/boto_cloudfront.py | _list_distributions | def _list_distributions(
conn,
name=None,
region=None,
key=None,
keyid=None,
profile=None,
):
'''
Private function that returns an iterator over all CloudFront distributions.
The caller is responsible for all boto-related error handling.
name
(Optional) Only yield the di... | python | def _list_distributions(
conn,
name=None,
region=None,
key=None,
keyid=None,
profile=None,
):
'''
Private function that returns an iterator over all CloudFront distributions.
The caller is responsible for all boto-related error handling.
name
(Optional) Only yield the di... | [
"def",
"_list_distributions",
"(",
"conn",
",",
"name",
"=",
"None",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
",",
")",
":",
"for",
"dl_",
"in",
"conn",
".",
"get_paginator",
"(",
... | Private function that returns an iterator over all CloudFront distributions.
The caller is responsible for all boto-related error handling.
name
(Optional) Only yield the distribution with the given name | [
"Private",
"function",
"that",
"returns",
"an",
"iterator",
"over",
"all",
"CloudFront",
"distributions",
".",
"The",
"caller",
"is",
"responsible",
"for",
"all",
"boto",
"-",
"related",
"error",
"handling",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_cloudfront.py#L87-L156 |
37,228 | saltstack/salt | salt/modules/boto_cloudfront.py | export_distributions | def export_distributions(region=None, key=None, keyid=None, profile=None):
'''
Get details of all CloudFront distributions.
Produces results that can be used to create an SLS file.
CLI Example:
.. code-block:: bash
salt-call boto_cloudfront.export_distributions --out=txt |\
se... | python | def export_distributions(region=None, key=None, keyid=None, profile=None):
'''
Get details of all CloudFront distributions.
Produces results that can be used to create an SLS file.
CLI Example:
.. code-block:: bash
salt-call boto_cloudfront.export_distributions --out=txt |\
se... | [
"def",
"export_distributions",
"(",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"results",
"=",
"OrderedDict",
"(",
")",
"conn",
"=",
"_get_conn",
"(",
"region",
"=",
"region",
",",
... | Get details of all CloudFront distributions.
Produces results that can be used to create an SLS file.
CLI Example:
.. code-block:: bash
salt-call boto_cloudfront.export_distributions --out=txt |\
sed "s/local: //" > cloudfront_distributions.sls | [
"Get",
"details",
"of",
"all",
"CloudFront",
"distributions",
".",
"Produces",
"results",
"that",
"can",
"be",
"used",
"to",
"create",
"an",
"SLS",
"file",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_cloudfront.py#L234-L278 |
37,229 | saltstack/salt | salt/modules/boto_cloudfront.py | list_distributions | def list_distributions(region=None, key=None, keyid=None, profile=None):
'''
List, with moderate information, all CloudFront distributions in the bound account.
region
Region to connect to.
key
Secret key to use.
keyid
Access key to use.
profile
Dict, or pilla... | python | def list_distributions(region=None, key=None, keyid=None, profile=None):
'''
List, with moderate information, all CloudFront distributions in the bound account.
region
Region to connect to.
key
Secret key to use.
keyid
Access key to use.
profile
Dict, or pilla... | [
"def",
"list_distributions",
"(",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"retries",
"=",
"10",
"sleep",
"=",
"6",
"conn",
"=",
"_get_conn",
"(",
"region",
"=",
"region",
",",
... | List, with moderate information, all CloudFront distributions in the bound account.
region
Region to connect to.
key
Secret key to use.
keyid
Access key to use.
profile
Dict, or pillar key pointing to a dict, containing AWS region/key/keyid.
CLI Example:
.. ... | [
"List",
"with",
"moderate",
"information",
"all",
"CloudFront",
"distributions",
"in",
"the",
"bound",
"account",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_cloudfront.py#L564-L609 |
37,230 | saltstack/salt | salt/modules/boto_cloudfront.py | distribution_exists | def distribution_exists(Id, region=None, key=None, keyid=None, profile=None):
'''
Return True if a CloudFront distribution exists with the given Resource ID or False otherwise.
Id
Resource ID of the CloudFront distribution.
region
Region to connect to.
key
Secret key to us... | python | def distribution_exists(Id, region=None, key=None, keyid=None, profile=None):
'''
Return True if a CloudFront distribution exists with the given Resource ID or False otherwise.
Id
Resource ID of the CloudFront distribution.
region
Region to connect to.
key
Secret key to us... | [
"def",
"distribution_exists",
"(",
"Id",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"authargs",
"=",
"{",
"'region'",
":",
"region",
",",
"'key'",
":",
"key",
",",
"'keyid'",... | Return True if a CloudFront distribution exists with the given Resource ID or False otherwise.
Id
Resource ID of the CloudFront distribution.
region
Region to connect to.
key
Secret key to use.
keyid
Access key to use.
profile
Dict, or pillar key pointing... | [
"Return",
"True",
"if",
"a",
"CloudFront",
"distribution",
"exists",
"with",
"the",
"given",
"Resource",
"ID",
"or",
"False",
"otherwise",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_cloudfront.py#L612-L640 |
37,231 | saltstack/salt | salt/modules/boto_cloudfront.py | get_distributions_by_comment | def get_distributions_by_comment(Comment, region=None, key=None, keyid=None, profile=None):
'''
Find and return any CloudFront distributions which happen to have a Comment sub-field
either exactly matching the given Comment, or beginning with it AND with the remainder
separated by a colon.
Comment
... | python | def get_distributions_by_comment(Comment, region=None, key=None, keyid=None, profile=None):
'''
Find and return any CloudFront distributions which happen to have a Comment sub-field
either exactly matching the given Comment, or beginning with it AND with the remainder
separated by a colon.
Comment
... | [
"def",
"get_distributions_by_comment",
"(",
"Comment",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"log",
".",
"debug",
"(",
"'Dereferincing CloudFront distribution(s) by Comment `%s`.'",
... | Find and return any CloudFront distributions which happen to have a Comment sub-field
either exactly matching the given Comment, or beginning with it AND with the remainder
separated by a colon.
Comment
The string to be matched when searching for the given Distribution. Note that this
will... | [
"Find",
"and",
"return",
"any",
"CloudFront",
"distributions",
"which",
"happen",
"to",
"have",
"a",
"Comment",
"sub",
"-",
"field",
"either",
"exactly",
"matching",
"the",
"given",
"Comment",
"or",
"beginning",
"with",
"it",
"AND",
"with",
"the",
"remainder",... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_cloudfront.py#L643-L688 |
37,232 | saltstack/salt | salt/modules/boto_cloudfront.py | disable_distribution | def disable_distribution(region=None, key=None, keyid=None, profile=None, **kwargs):
'''
Set a CloudFront distribution to be disabled.
Id
Id of the distribution to update.
region
Region to connect to.
key
Secret key to use.
keyid
Access key to use.
profil... | python | def disable_distribution(region=None, key=None, keyid=None, profile=None, **kwargs):
'''
Set a CloudFront distribution to be disabled.
Id
Id of the distribution to update.
region
Region to connect to.
key
Secret key to use.
keyid
Access key to use.
profil... | [
"def",
"disable_distribution",
"(",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"retries",
"=",
"10",
"sleep",
"=",
"6",
"kwargs",
"=",
"{",
"k",
":",
... | Set a CloudFront distribution to be disabled.
Id
Id of the distribution to update.
region
Region to connect to.
key
Secret key to use.
keyid
Access key to use.
profile
Dict, or pillar key pointing to a dict, containing AWS region/key/keyid.
CLI Examp... | [
"Set",
"a",
"CloudFront",
"distribution",
"to",
"be",
"disabled",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_cloudfront.py#L978-L1036 |
37,233 | saltstack/salt | salt/modules/boto_cloudfront.py | get_cloud_front_origin_access_identities_by_comment | def get_cloud_front_origin_access_identities_by_comment(Comment, region=None, key=None, keyid=None,
profile=None):
'''
Find and return any CloudFront Origin Access Identities which happen to have a Comment
sub-field either exactly matching the given Co... | python | def get_cloud_front_origin_access_identities_by_comment(Comment, region=None, key=None, keyid=None,
profile=None):
'''
Find and return any CloudFront Origin Access Identities which happen to have a Comment
sub-field either exactly matching the given Co... | [
"def",
"get_cloud_front_origin_access_identities_by_comment",
"(",
"Comment",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"log",
".",
"debug",
"(",
"'Dereferincing CloudFront origin access ... | Find and return any CloudFront Origin Access Identities which happen to have a Comment
sub-field either exactly matching the given Comment, or beginning with it AND with the
remainder separate by a colon.
Comment
The string to be matched when searching for the given Origin Access Identity. Note
... | [
"Find",
"and",
"return",
"any",
"CloudFront",
"Origin",
"Access",
"Identities",
"which",
"happen",
"to",
"have",
"a",
"Comment",
"sub",
"-",
"field",
"either",
"exactly",
"matching",
"the",
"given",
"Comment",
"or",
"beginning",
"with",
"it",
"AND",
"with",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_cloudfront.py#L1237-L1283 |
37,234 | saltstack/salt | salt/modules/boto_cloudfront.py | cloud_front_origin_access_identity_exists | def cloud_front_origin_access_identity_exists(Id, region=None, key=None, keyid=None, profile=None):
'''
Return True if a CloudFront origin access identity exists with the given Resource ID or False
otherwise.
Id
Resource ID of the CloudFront origin access identity.
region
Region to... | python | def cloud_front_origin_access_identity_exists(Id, region=None, key=None, keyid=None, profile=None):
'''
Return True if a CloudFront origin access identity exists with the given Resource ID or False
otherwise.
Id
Resource ID of the CloudFront origin access identity.
region
Region to... | [
"def",
"cloud_front_origin_access_identity_exists",
"(",
"Id",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"authargs",
"=",
"{",
"'region'",
":",
"region",
",",
"'key'",
":",
"key... | Return True if a CloudFront origin access identity exists with the given Resource ID or False
otherwise.
Id
Resource ID of the CloudFront origin access identity.
region
Region to connect to.
key
Secret key to use.
keyid
Access key to use.
profile
Dict... | [
"Return",
"True",
"if",
"a",
"CloudFront",
"origin",
"access",
"identity",
"exists",
"with",
"the",
"given",
"Resource",
"ID",
"or",
"False",
"otherwise",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_cloudfront.py#L1455-L1484 |
37,235 | saltstack/salt | salt/modules/boto_cloudfront.py | tag_resource | def tag_resource(region=None, key=None, keyid=None, profile=None, **kwargs):
'''
Add tags to a CloudFront resource.
Resource
The ARN of the affected CloudFront resource.
Tags
Dict of {'Tag': 'Value', ...} providing the tags to be set.
region
Region to connect to.
key
... | python | def tag_resource(region=None, key=None, keyid=None, profile=None, **kwargs):
'''
Add tags to a CloudFront resource.
Resource
The ARN of the affected CloudFront resource.
Tags
Dict of {'Tag': 'Value', ...} providing the tags to be set.
region
Region to connect to.
key
... | [
"def",
"tag_resource",
"(",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"retries",
"=",
"10",
"sleep",
"=",
"6",
"kwargs",
"=",
"{",
"k",
":",
"v",
"... | Add tags to a CloudFront resource.
Resource
The ARN of the affected CloudFront resource.
Tags
Dict of {'Tag': 'Value', ...} providing the tags to be set.
region
Region to connect to.
key
Secret key to use.
keyid
Access key to use.
profile
Dic... | [
"Add",
"tags",
"to",
"a",
"CloudFront",
"resource",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_cloudfront.py#L1537-L1588 |
37,236 | saltstack/salt | salt/states/pcs.py | _file_read | def _file_read(path):
'''
Read a file and return content
'''
content = False
if os.path.exists(path):
with salt.utils.files.fopen(path, 'r+') as fp_:
content = salt.utils.stringutils.to_unicode(fp_.read())
fp_.close()
return content | python | def _file_read(path):
'''
Read a file and return content
'''
content = False
if os.path.exists(path):
with salt.utils.files.fopen(path, 'r+') as fp_:
content = salt.utils.stringutils.to_unicode(fp_.read())
fp_.close()
return content | [
"def",
"_file_read",
"(",
"path",
")",
":",
"content",
"=",
"False",
"if",
"os",
".",
"path",
".",
"exists",
"(",
"path",
")",
":",
"with",
"salt",
".",
"utils",
".",
"files",
".",
"fopen",
"(",
"path",
",",
"'r+'",
")",
"as",
"fp_",
":",
"conten... | Read a file and return content | [
"Read",
"a",
"file",
"and",
"return",
"content"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pcs.py#L191-L200 |
37,237 | saltstack/salt | salt/states/pcs.py | _file_write | def _file_write(path, content):
'''
Write content to a file
'''
with salt.utils.files.fopen(path, 'w+') as fp_:
fp_.write(salt.utils.stringutils.to_str(content))
fp_.close() | python | def _file_write(path, content):
'''
Write content to a file
'''
with salt.utils.files.fopen(path, 'w+') as fp_:
fp_.write(salt.utils.stringutils.to_str(content))
fp_.close() | [
"def",
"_file_write",
"(",
"path",
",",
"content",
")",
":",
"with",
"salt",
".",
"utils",
".",
"files",
".",
"fopen",
"(",
"path",
",",
"'w+'",
")",
"as",
"fp_",
":",
"fp_",
".",
"write",
"(",
"salt",
".",
"utils",
".",
"stringutils",
".",
"to_str... | Write content to a file | [
"Write",
"content",
"to",
"a",
"file"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pcs.py#L203-L209 |
37,238 | saltstack/salt | salt/states/pcs.py | _get_cibpath | def _get_cibpath():
'''
Get the path to the directory on the minion where CIB's are saved
'''
cibpath = os.path.join(__opts__['cachedir'], 'pcs', __env__)
log.trace('cibpath: %s', cibpath)
return cibpath | python | def _get_cibpath():
'''
Get the path to the directory on the minion where CIB's are saved
'''
cibpath = os.path.join(__opts__['cachedir'], 'pcs', __env__)
log.trace('cibpath: %s', cibpath)
return cibpath | [
"def",
"_get_cibpath",
"(",
")",
":",
"cibpath",
"=",
"os",
".",
"path",
".",
"join",
"(",
"__opts__",
"[",
"'cachedir'",
"]",
",",
"'pcs'",
",",
"__env__",
")",
"log",
".",
"trace",
"(",
"'cibpath: %s'",
",",
"cibpath",
")",
"return",
"cibpath"
] | Get the path to the directory on the minion where CIB's are saved | [
"Get",
"the",
"path",
"to",
"the",
"directory",
"on",
"the",
"minion",
"where",
"CIB",
"s",
"are",
"saved"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pcs.py#L212-L218 |
37,239 | saltstack/salt | salt/states/pcs.py | _get_cibfile | def _get_cibfile(cibname):
'''
Get the full path of a cached CIB-file with the name of the CIB
'''
cibfile = os.path.join(_get_cibpath(), '{0}.{1}'.format(cibname, 'cib'))
log.trace('cibfile: %s', cibfile)
return cibfile | python | def _get_cibfile(cibname):
'''
Get the full path of a cached CIB-file with the name of the CIB
'''
cibfile = os.path.join(_get_cibpath(), '{0}.{1}'.format(cibname, 'cib'))
log.trace('cibfile: %s', cibfile)
return cibfile | [
"def",
"_get_cibfile",
"(",
"cibname",
")",
":",
"cibfile",
"=",
"os",
".",
"path",
".",
"join",
"(",
"_get_cibpath",
"(",
")",
",",
"'{0}.{1}'",
".",
"format",
"(",
"cibname",
",",
"'cib'",
")",
")",
"log",
".",
"trace",
"(",
"'cibfile: %s'",
",",
"... | Get the full path of a cached CIB-file with the name of the CIB | [
"Get",
"the",
"full",
"path",
"of",
"a",
"cached",
"CIB",
"-",
"file",
"with",
"the",
"name",
"of",
"the",
"CIB"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pcs.py#L221-L227 |
37,240 | saltstack/salt | salt/states/pcs.py | _get_cibfile_tmp | def _get_cibfile_tmp(cibname):
'''
Get the full path of a temporary CIB-file with the name of the CIB
'''
cibfile_tmp = '{0}.tmp'.format(_get_cibfile(cibname))
log.trace('cibfile_tmp: %s', cibfile_tmp)
return cibfile_tmp | python | def _get_cibfile_tmp(cibname):
'''
Get the full path of a temporary CIB-file with the name of the CIB
'''
cibfile_tmp = '{0}.tmp'.format(_get_cibfile(cibname))
log.trace('cibfile_tmp: %s', cibfile_tmp)
return cibfile_tmp | [
"def",
"_get_cibfile_tmp",
"(",
"cibname",
")",
":",
"cibfile_tmp",
"=",
"'{0}.tmp'",
".",
"format",
"(",
"_get_cibfile",
"(",
"cibname",
")",
")",
"log",
".",
"trace",
"(",
"'cibfile_tmp: %s'",
",",
"cibfile_tmp",
")",
"return",
"cibfile_tmp"
] | Get the full path of a temporary CIB-file with the name of the CIB | [
"Get",
"the",
"full",
"path",
"of",
"a",
"temporary",
"CIB",
"-",
"file",
"with",
"the",
"name",
"of",
"the",
"CIB"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pcs.py#L230-L236 |
37,241 | saltstack/salt | salt/states/pcs.py | _get_cibfile_cksum | def _get_cibfile_cksum(cibname):
'''
Get the full path of the file containing a checksum of a CIB-file with the name of the CIB
'''
cibfile_cksum = '{0}.cksum'.format(_get_cibfile(cibname))
log.trace('cibfile_cksum: %s', cibfile_cksum)
return cibfile_cksum | python | def _get_cibfile_cksum(cibname):
'''
Get the full path of the file containing a checksum of a CIB-file with the name of the CIB
'''
cibfile_cksum = '{0}.cksum'.format(_get_cibfile(cibname))
log.trace('cibfile_cksum: %s', cibfile_cksum)
return cibfile_cksum | [
"def",
"_get_cibfile_cksum",
"(",
"cibname",
")",
":",
"cibfile_cksum",
"=",
"'{0}.cksum'",
".",
"format",
"(",
"_get_cibfile",
"(",
"cibname",
")",
")",
"log",
".",
"trace",
"(",
"'cibfile_cksum: %s'",
",",
"cibfile_cksum",
")",
"return",
"cibfile_cksum"
] | Get the full path of the file containing a checksum of a CIB-file with the name of the CIB | [
"Get",
"the",
"full",
"path",
"of",
"the",
"file",
"containing",
"a",
"checksum",
"of",
"a",
"CIB",
"-",
"file",
"with",
"the",
"name",
"of",
"the",
"CIB"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pcs.py#L239-L245 |
37,242 | saltstack/salt | salt/states/pcs.py | auth | def auth(name, nodes, pcsuser='hacluster', pcspasswd='hacluster', extra_args=None):
'''
Ensure all nodes are authorized to the cluster
name
Irrelevant, not used (recommended: pcs_auth__auth)
nodes
a list of nodes which should be authorized to the cluster
pcsuser
user for com... | python | def auth(name, nodes, pcsuser='hacluster', pcspasswd='hacluster', extra_args=None):
'''
Ensure all nodes are authorized to the cluster
name
Irrelevant, not used (recommended: pcs_auth__auth)
nodes
a list of nodes which should be authorized to the cluster
pcsuser
user for com... | [
"def",
"auth",
"(",
"name",
",",
"nodes",
",",
"pcsuser",
"=",
"'hacluster'",
",",
"pcspasswd",
"=",
"'hacluster'",
",",
"extra_args",
"=",
"None",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'result'",
":",
"True",
",",
"'comment'",
":",
... | Ensure all nodes are authorized to the cluster
name
Irrelevant, not used (recommended: pcs_auth__auth)
nodes
a list of nodes which should be authorized to the cluster
pcsuser
user for communication with pcs (default: hacluster)
pcspasswd
password for pcsuser (default: ha... | [
"Ensure",
"all",
"nodes",
"are",
"authorized",
"to",
"the",
"cluster"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pcs.py#L360-L444 |
37,243 | saltstack/salt | salt/states/pcs.py | cib_pushed | def cib_pushed(name, cibname, scope=None, extra_args=None):
'''
Ensure that a CIB-file is pushed if it is changed since the creation of it with pcs.cib_present
Should be run on one cluster node only
(there may be races)
name
Irrelevant, not used (recommended: {{formulaname}}__cib_pushed_{{... | python | def cib_pushed(name, cibname, scope=None, extra_args=None):
'''
Ensure that a CIB-file is pushed if it is changed since the creation of it with pcs.cib_present
Should be run on one cluster node only
(there may be races)
name
Irrelevant, not used (recommended: {{formulaname}}__cib_pushed_{{... | [
"def",
"cib_pushed",
"(",
"name",
",",
"cibname",
",",
"scope",
"=",
"None",
",",
"extra_args",
"=",
"None",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'result'",
":",
"True",
",",
"'comment'",
":",
"''",
",",
"'changes'",
":",
"{",
"}... | Ensure that a CIB-file is pushed if it is changed since the creation of it with pcs.cib_present
Should be run on one cluster node only
(there may be races)
name
Irrelevant, not used (recommended: {{formulaname}}__cib_pushed_{{cibname}})
cibname
name/path of the file containing the CIB
... | [
"Ensure",
"that",
"a",
"CIB",
"-",
"file",
"is",
"pushed",
"if",
"it",
"is",
"changed",
"since",
"the",
"creation",
"of",
"it",
"with",
"pcs",
".",
"cib_present"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pcs.py#L751-L821 |
37,244 | saltstack/salt | salt/states/pcs.py | prop_has_value | def prop_has_value(name, prop, value, extra_args=None, cibname=None):
'''
Ensure that a property in the cluster is set to a given value
Should be run on one cluster node only
(there may be races)
name
Irrelevant, not used (recommended: pcs_properties__prop_has_value_{{prop}})
prop
... | python | def prop_has_value(name, prop, value, extra_args=None, cibname=None):
'''
Ensure that a property in the cluster is set to a given value
Should be run on one cluster node only
(there may be races)
name
Irrelevant, not used (recommended: pcs_properties__prop_has_value_{{prop}})
prop
... | [
"def",
"prop_has_value",
"(",
"name",
",",
"prop",
",",
"value",
",",
"extra_args",
"=",
"None",
",",
"cibname",
"=",
"None",
")",
":",
"return",
"_item_present",
"(",
"name",
"=",
"name",
",",
"item",
"=",
"'property'",
",",
"item_id",
"=",
"'{0}={1}'",... | Ensure that a property in the cluster is set to a given value
Should be run on one cluster node only
(there may be races)
name
Irrelevant, not used (recommended: pcs_properties__prop_has_value_{{prop}})
prop
name of the property
value
value of the property
extra_args
... | [
"Ensure",
"that",
"a",
"property",
"in",
"the",
"cluster",
"is",
"set",
"to",
"a",
"given",
"value"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pcs.py#L824-L858 |
37,245 | saltstack/salt | salt/states/pcs.py | resource_defaults_to | def resource_defaults_to(name, default, value, extra_args=None, cibname=None):
'''
Ensure a resource default in the cluster is set to a given value
Should be run on one cluster node only
(there may be races)
Can only be run on a node with a functional pacemaker/corosync
name
Irrelevant... | python | def resource_defaults_to(name, default, value, extra_args=None, cibname=None):
'''
Ensure a resource default in the cluster is set to a given value
Should be run on one cluster node only
(there may be races)
Can only be run on a node with a functional pacemaker/corosync
name
Irrelevant... | [
"def",
"resource_defaults_to",
"(",
"name",
",",
"default",
",",
"value",
",",
"extra_args",
"=",
"None",
",",
"cibname",
"=",
"None",
")",
":",
"return",
"_item_present",
"(",
"name",
"=",
"name",
",",
"item",
"=",
"'resource'",
",",
"item_id",
"=",
"'{... | Ensure a resource default in the cluster is set to a given value
Should be run on one cluster node only
(there may be races)
Can only be run on a node with a functional pacemaker/corosync
name
Irrelevant, not used (recommended: pcs_properties__resource_defaults_to_{{default}})
default
... | [
"Ensure",
"a",
"resource",
"default",
"in",
"the",
"cluster",
"is",
"set",
"to",
"a",
"given",
"value"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pcs.py#L861-L897 |
37,246 | saltstack/salt | salt/states/pcs.py | resource_op_defaults_to | def resource_op_defaults_to(name, op_default, value, extra_args=None, cibname=None):
'''
Ensure a resource operation default in the cluster is set to a given value
Should be run on one cluster node only
(there may be races)
Can only be run on a node with a functional pacemaker/corosync
name
... | python | def resource_op_defaults_to(name, op_default, value, extra_args=None, cibname=None):
'''
Ensure a resource operation default in the cluster is set to a given value
Should be run on one cluster node only
(there may be races)
Can only be run on a node with a functional pacemaker/corosync
name
... | [
"def",
"resource_op_defaults_to",
"(",
"name",
",",
"op_default",
",",
"value",
",",
"extra_args",
"=",
"None",
",",
"cibname",
"=",
"None",
")",
":",
"return",
"_item_present",
"(",
"name",
"=",
"name",
",",
"item",
"=",
"'resource'",
",",
"item_id",
"=",... | Ensure a resource operation default in the cluster is set to a given value
Should be run on one cluster node only
(there may be races)
Can only be run on a node with a functional pacemaker/corosync
name
Irrelevant, not used (recommended: pcs_properties__resource_op_defaults_to_{{op_default}})
... | [
"Ensure",
"a",
"resource",
"operation",
"default",
"in",
"the",
"cluster",
"is",
"set",
"to",
"a",
"given",
"value"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pcs.py#L900-L936 |
37,247 | saltstack/salt | salt/states/pcs.py | stonith_present | def stonith_present(name, stonith_id, stonith_device_type, stonith_device_options=None, cibname=None):
'''
Ensure that a fencing resource is created
Should be run on one cluster node only
(there may be races)
Can only be run on a node with a functional pacemaker/corosync
name
Irrelevan... | python | def stonith_present(name, stonith_id, stonith_device_type, stonith_device_options=None, cibname=None):
'''
Ensure that a fencing resource is created
Should be run on one cluster node only
(there may be races)
Can only be run on a node with a functional pacemaker/corosync
name
Irrelevan... | [
"def",
"stonith_present",
"(",
"name",
",",
"stonith_id",
",",
"stonith_device_type",
",",
"stonith_device_options",
"=",
"None",
",",
"cibname",
"=",
"None",
")",
":",
"return",
"_item_present",
"(",
"name",
"=",
"name",
",",
"item",
"=",
"'stonith'",
",",
... | Ensure that a fencing resource is created
Should be run on one cluster node only
(there may be races)
Can only be run on a node with a functional pacemaker/corosync
name
Irrelevant, not used (recommended: pcs_stonith__created_{{stonith_id}})
stonith_id
name for the stonith resource... | [
"Ensure",
"that",
"a",
"fencing",
"resource",
"is",
"created"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pcs.py#L939-L981 |
37,248 | saltstack/salt | salt/states/pcs.py | resource_present | def resource_present(name, resource_id, resource_type, resource_options=None, cibname=None):
'''
Ensure that a resource is created
Should be run on one cluster node only
(there may be races)
Can only be run on a node with a functional pacemaker/corosync
name
Irrelevant, not used (recom... | python | def resource_present(name, resource_id, resource_type, resource_options=None, cibname=None):
'''
Ensure that a resource is created
Should be run on one cluster node only
(there may be races)
Can only be run on a node with a functional pacemaker/corosync
name
Irrelevant, not used (recom... | [
"def",
"resource_present",
"(",
"name",
",",
"resource_id",
",",
"resource_type",
",",
"resource_options",
"=",
"None",
",",
"cibname",
"=",
"None",
")",
":",
"return",
"_item_present",
"(",
"name",
"=",
"name",
",",
"item",
"=",
"'resource'",
",",
"item_id"... | Ensure that a resource is created
Should be run on one cluster node only
(there may be races)
Can only be run on a node with a functional pacemaker/corosync
name
Irrelevant, not used (recommended: {{formulaname}}__resource_present_{{resource_id}})
resource_id
name for the resource
... | [
"Ensure",
"that",
"a",
"resource",
"is",
"created"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pcs.py#L984-L1021 |
37,249 | saltstack/salt | salt/states/pcs.py | constraint_present | def constraint_present(name, constraint_id, constraint_type, constraint_options=None, cibname=None):
'''
Ensure that a constraint is created
Should be run on one cluster node only
(there may be races)
Can only be run on a node with a functional pacemaker/corosync
name
Irrelevant, not u... | python | def constraint_present(name, constraint_id, constraint_type, constraint_options=None, cibname=None):
'''
Ensure that a constraint is created
Should be run on one cluster node only
(there may be races)
Can only be run on a node with a functional pacemaker/corosync
name
Irrelevant, not u... | [
"def",
"constraint_present",
"(",
"name",
",",
"constraint_id",
",",
"constraint_type",
",",
"constraint_options",
"=",
"None",
",",
"cibname",
"=",
"None",
")",
":",
"return",
"_item_present",
"(",
"name",
"=",
"name",
",",
"item",
"=",
"'constraint'",
",",
... | Ensure that a constraint is created
Should be run on one cluster node only
(there may be races)
Can only be run on a node with a functional pacemaker/corosync
name
Irrelevant, not used (recommended: {{formulaname}}__constraint_present_{{constraint_id}})
constraint_id
name for the c... | [
"Ensure",
"that",
"a",
"constraint",
"is",
"created"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pcs.py#L1024-L1064 |
37,250 | saltstack/salt | salt/pillar/makostack.py | _parse_top_cfg | def _parse_top_cfg(content, filename):
'''
Allow top_cfg to be YAML
'''
try:
obj = salt.utils.yaml.safe_load(content)
if isinstance(obj, list):
log.debug('MakoStack cfg `%s` parsed as YAML', filename)
return obj
except Exception as err:
pass
log.de... | python | def _parse_top_cfg(content, filename):
'''
Allow top_cfg to be YAML
'''
try:
obj = salt.utils.yaml.safe_load(content)
if isinstance(obj, list):
log.debug('MakoStack cfg `%s` parsed as YAML', filename)
return obj
except Exception as err:
pass
log.de... | [
"def",
"_parse_top_cfg",
"(",
"content",
",",
"filename",
")",
":",
"try",
":",
"obj",
"=",
"salt",
".",
"utils",
".",
"yaml",
".",
"safe_load",
"(",
"content",
")",
"if",
"isinstance",
"(",
"obj",
",",
"list",
")",
":",
"log",
".",
"debug",
"(",
"... | Allow top_cfg to be YAML | [
"Allow",
"top_cfg",
"to",
"be",
"YAML"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/makostack.py#L564-L576 |
37,251 | saltstack/salt | salt/modules/freebsdjail.py | is_enabled | def is_enabled():
'''
See if jail service is actually enabled on boot
CLI Example:
.. code-block:: bash
salt '*' jail.is_enabled <jail name>
'''
cmd = 'service -e'
services = __salt__['cmd.run'](cmd, python_shell=False)
for service in services.split('\\n'):
if re.searc... | python | def is_enabled():
'''
See if jail service is actually enabled on boot
CLI Example:
.. code-block:: bash
salt '*' jail.is_enabled <jail name>
'''
cmd = 'service -e'
services = __salt__['cmd.run'](cmd, python_shell=False)
for service in services.split('\\n'):
if re.searc... | [
"def",
"is_enabled",
"(",
")",
":",
"cmd",
"=",
"'service -e'",
"services",
"=",
"__salt__",
"[",
"'cmd.run'",
"]",
"(",
"cmd",
",",
"python_shell",
"=",
"False",
")",
"for",
"service",
"in",
"services",
".",
"split",
"(",
"'\\\\n'",
")",
":",
"if",
"r... | See if jail service is actually enabled on boot
CLI Example:
.. code-block:: bash
salt '*' jail.is_enabled <jail name> | [
"See",
"if",
"jail",
"service",
"is",
"actually",
"enabled",
"on",
"boot"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/freebsdjail.py#L73-L88 |
37,252 | saltstack/salt | salt/modules/freebsdjail.py | get_enabled | def get_enabled():
'''
Return which jails are set to be run
CLI Example:
.. code-block:: bash
salt '*' jail.get_enabled
'''
ret = []
for rconf in ('/etc/rc.conf', '/etc/rc.conf.local'):
if os.access(rconf, os.R_OK):
with salt.utils.files.fopen(rconf, 'r') as _f... | python | def get_enabled():
'''
Return which jails are set to be run
CLI Example:
.. code-block:: bash
salt '*' jail.get_enabled
'''
ret = []
for rconf in ('/etc/rc.conf', '/etc/rc.conf.local'):
if os.access(rconf, os.R_OK):
with salt.utils.files.fopen(rconf, 'r') as _f... | [
"def",
"get_enabled",
"(",
")",
":",
"ret",
"=",
"[",
"]",
"for",
"rconf",
"in",
"(",
"'/etc/rc.conf'",
",",
"'/etc/rc.conf.local'",
")",
":",
"if",
"os",
".",
"access",
"(",
"rconf",
",",
"os",
".",
"R_OK",
")",
":",
"with",
"salt",
".",
"utils",
... | Return which jails are set to be run
CLI Example:
.. code-block:: bash
salt '*' jail.get_enabled | [
"Return",
"which",
"jails",
"are",
"set",
"to",
"be",
"run"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/freebsdjail.py#L91-L114 |
37,253 | saltstack/salt | salt/modules/freebsdjail.py | show_config | def show_config(jail):
'''
Display specified jail's configuration
CLI Example:
.. code-block:: bash
salt '*' jail.show_config <jail name>
'''
ret = {}
if subprocess.call(["jls", "-nq", "-j", jail]) == 0:
jls = subprocess.check_output(["jls", "-nq", "-j", jail]) # pylint: ... | python | def show_config(jail):
'''
Display specified jail's configuration
CLI Example:
.. code-block:: bash
salt '*' jail.show_config <jail name>
'''
ret = {}
if subprocess.call(["jls", "-nq", "-j", jail]) == 0:
jls = subprocess.check_output(["jls", "-nq", "-j", jail]) # pylint: ... | [
"def",
"show_config",
"(",
"jail",
")",
":",
"ret",
"=",
"{",
"}",
"if",
"subprocess",
".",
"call",
"(",
"[",
"\"jls\"",
",",
"\"-nq\"",
",",
"\"-j\"",
",",
"jail",
"]",
")",
"==",
"0",
":",
"jls",
"=",
"subprocess",
".",
"check_output",
"(",
"[",
... | Display specified jail's configuration
CLI Example:
.. code-block:: bash
salt '*' jail.show_config <jail name> | [
"Display",
"specified",
"jail",
"s",
"configuration"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/freebsdjail.py#L117-L172 |
37,254 | saltstack/salt | salt/modules/freebsdjail.py | status | def status(jail):
'''
See if specified jail is currently running
CLI Example:
.. code-block:: bash
salt '*' jail.status <jail name>
'''
cmd = 'jls'
found_jails = __salt__['cmd.run'](cmd, python_shell=False)
for found_jail in found_jails.split('\\n'):
if re.search(jail,... | python | def status(jail):
'''
See if specified jail is currently running
CLI Example:
.. code-block:: bash
salt '*' jail.status <jail name>
'''
cmd = 'jls'
found_jails = __salt__['cmd.run'](cmd, python_shell=False)
for found_jail in found_jails.split('\\n'):
if re.search(jail,... | [
"def",
"status",
"(",
"jail",
")",
":",
"cmd",
"=",
"'jls'",
"found_jails",
"=",
"__salt__",
"[",
"'cmd.run'",
"]",
"(",
"cmd",
",",
"python_shell",
"=",
"False",
")",
"for",
"found_jail",
"in",
"found_jails",
".",
"split",
"(",
"'\\\\n'",
")",
":",
"i... | See if specified jail is currently running
CLI Example:
.. code-block:: bash
salt '*' jail.status <jail name> | [
"See",
"if",
"specified",
"jail",
"is",
"currently",
"running"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/freebsdjail.py#L220-L235 |
37,255 | saltstack/salt | salt/modules/pecl.py | _pecl | def _pecl(command, defaults=False):
'''
Execute the command passed with pecl
'''
cmdline = 'pecl {0}'.format(command)
if salt.utils.data.is_true(defaults):
cmdline = 'yes ' "''" + ' | ' + cmdline
ret = __salt__['cmd.run_all'](cmdline, python_shell=True)
if ret['retcode'] == 0:
... | python | def _pecl(command, defaults=False):
'''
Execute the command passed with pecl
'''
cmdline = 'pecl {0}'.format(command)
if salt.utils.data.is_true(defaults):
cmdline = 'yes ' "''" + ' | ' + cmdline
ret = __salt__['cmd.run_all'](cmdline, python_shell=True)
if ret['retcode'] == 0:
... | [
"def",
"_pecl",
"(",
"command",
",",
"defaults",
"=",
"False",
")",
":",
"cmdline",
"=",
"'pecl {0}'",
".",
"format",
"(",
"command",
")",
"if",
"salt",
".",
"utils",
".",
"data",
".",
"is_true",
"(",
"defaults",
")",
":",
"cmdline",
"=",
"'yes '",
"... | Execute the command passed with pecl | [
"Execute",
"the",
"command",
"passed",
"with",
"pecl"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/pecl.py#L40-L54 |
37,256 | saltstack/salt | salt/modules/pecl.py | uninstall | def uninstall(pecls):
'''
Uninstall one or several pecl extensions.
pecls
The pecl extensions to uninstall.
CLI Example:
.. code-block:: bash
salt '*' pecl.uninstall fuse
'''
if isinstance(pecls, six.string_types):
pecls = [pecls]
return _pecl('uninstall {0}'.... | python | def uninstall(pecls):
'''
Uninstall one or several pecl extensions.
pecls
The pecl extensions to uninstall.
CLI Example:
.. code-block:: bash
salt '*' pecl.uninstall fuse
'''
if isinstance(pecls, six.string_types):
pecls = [pecls]
return _pecl('uninstall {0}'.... | [
"def",
"uninstall",
"(",
"pecls",
")",
":",
"if",
"isinstance",
"(",
"pecls",
",",
"six",
".",
"string_types",
")",
":",
"pecls",
"=",
"[",
"pecls",
"]",
"return",
"_pecl",
"(",
"'uninstall {0}'",
".",
"format",
"(",
"_cmd_quote",
"(",
"' '",
".",
"joi... | Uninstall one or several pecl extensions.
pecls
The pecl extensions to uninstall.
CLI Example:
.. code-block:: bash
salt '*' pecl.uninstall fuse | [
"Uninstall",
"one",
"or",
"several",
"pecl",
"extensions",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/pecl.py#L110-L125 |
37,257 | saltstack/salt | salt/modules/pecl.py | list_ | def list_(channel=None):
'''
List installed pecl extensions.
CLI Example:
.. code-block:: bash
salt '*' pecl.list
'''
pecl_channel_pat = re.compile('^([^ ]+)[ ]+([^ ]+)[ ]+([^ ]+)')
pecls = {}
command = 'list'
if channel:
command = '{0} -c {1}'.format(command, _cmd... | python | def list_(channel=None):
'''
List installed pecl extensions.
CLI Example:
.. code-block:: bash
salt '*' pecl.list
'''
pecl_channel_pat = re.compile('^([^ ]+)[ ]+([^ ]+)[ ]+([^ ]+)')
pecls = {}
command = 'list'
if channel:
command = '{0} -c {1}'.format(command, _cmd... | [
"def",
"list_",
"(",
"channel",
"=",
"None",
")",
":",
"pecl_channel_pat",
"=",
"re",
".",
"compile",
"(",
"'^([^ ]+)[ ]+([^ ]+)[ ]+([^ ]+)'",
")",
"pecls",
"=",
"{",
"}",
"command",
"=",
"'list'",
"if",
"channel",
":",
"command",
"=",
"'{0} -c {1}'",
".",
... | List installed pecl extensions.
CLI Example:
.. code-block:: bash
salt '*' pecl.list | [
"List",
"installed",
"pecl",
"extensions",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/pecl.py#L146-L169 |
37,258 | saltstack/salt | salt/runners/cloud.py | _get_client | def _get_client():
'''
Return cloud client
'''
client = salt.cloud.CloudClient(
os.path.join(os.path.dirname(__opts__['conf_file']), 'cloud')
)
return client | python | def _get_client():
'''
Return cloud client
'''
client = salt.cloud.CloudClient(
os.path.join(os.path.dirname(__opts__['conf_file']), 'cloud')
)
return client | [
"def",
"_get_client",
"(",
")",
":",
"client",
"=",
"salt",
".",
"cloud",
".",
"CloudClient",
"(",
"os",
".",
"path",
".",
"join",
"(",
"os",
".",
"path",
".",
"dirname",
"(",
"__opts__",
"[",
"'conf_file'",
"]",
")",
",",
"'cloud'",
")",
")",
"ret... | Return cloud client | [
"Return",
"cloud",
"client"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/cloud.py#L24-L31 |
37,259 | saltstack/salt | salt/runners/cloud.py | profile | def profile(prof=None, instances=None, opts=None, **kwargs):
'''
Create a cloud vm with the given profile and instances, instances can be a
list or comma-delimited string
CLI Example:
.. code-block:: bash
salt-run cloud.profile prof=my-ec2 instances=node1,node2,node3
'''
if prof i... | python | def profile(prof=None, instances=None, opts=None, **kwargs):
'''
Create a cloud vm with the given profile and instances, instances can be a
list or comma-delimited string
CLI Example:
.. code-block:: bash
salt-run cloud.profile prof=my-ec2 instances=node1,node2,node3
'''
if prof i... | [
"def",
"profile",
"(",
"prof",
"=",
"None",
",",
"instances",
"=",
"None",
",",
"opts",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"prof",
"is",
"None",
"and",
"'profile'",
"in",
"kwargs",
":",
"prof",
"=",
"kwargs",
"[",
"'profile'",
"]... | Create a cloud vm with the given profile and instances, instances can be a
list or comma-delimited string
CLI Example:
.. code-block:: bash
salt-run cloud.profile prof=my-ec2 instances=node1,node2,node3 | [
"Create",
"a",
"cloud",
"vm",
"with",
"the",
"given",
"profile",
"and",
"instances",
"instances",
"can",
"be",
"a",
"list",
"or",
"comma",
"-",
"delimited",
"string"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/cloud.py#L88-L115 |
37,260 | saltstack/salt | salt/modules/splunk_search.py | _get_splunk_search_props | def _get_splunk_search_props(search):
'''
Get splunk search properties from an object
'''
props = search.content
props["app"] = search.access.app
props["sharing"] = search.access.sharing
return props | python | def _get_splunk_search_props(search):
'''
Get splunk search properties from an object
'''
props = search.content
props["app"] = search.access.app
props["sharing"] = search.access.sharing
return props | [
"def",
"_get_splunk_search_props",
"(",
"search",
")",
":",
"props",
"=",
"search",
".",
"content",
"props",
"[",
"\"app\"",
"]",
"=",
"search",
".",
"access",
".",
"app",
"props",
"[",
"\"sharing\"",
"]",
"=",
"search",
".",
"access",
".",
"sharing",
"r... | Get splunk search properties from an object | [
"Get",
"splunk",
"search",
"properties",
"from",
"an",
"object"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/splunk_search.py#L82-L89 |
37,261 | saltstack/salt | salt/modules/splunk_search.py | get | def get(name, profile="splunk"):
'''
Get a splunk search
CLI Example:
splunk_search.get 'my search name'
'''
client = _get_splunk(profile)
search = None
# uglyness of splunk lib
try:
search = client.saved_searches[name]
except KeyError:
pass
return searc... | python | def get(name, profile="splunk"):
'''
Get a splunk search
CLI Example:
splunk_search.get 'my search name'
'''
client = _get_splunk(profile)
search = None
# uglyness of splunk lib
try:
search = client.saved_searches[name]
except KeyError:
pass
return searc... | [
"def",
"get",
"(",
"name",
",",
"profile",
"=",
"\"splunk\"",
")",
":",
"client",
"=",
"_get_splunk",
"(",
"profile",
")",
"search",
"=",
"None",
"# uglyness of splunk lib",
"try",
":",
"search",
"=",
"client",
".",
"saved_searches",
"[",
"name",
"]",
"exc... | Get a splunk search
CLI Example:
splunk_search.get 'my search name' | [
"Get",
"a",
"splunk",
"search"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/splunk_search.py#L92-L107 |
37,262 | saltstack/salt | salt/modules/splunk_search.py | update | def update(name, profile="splunk", **kwargs):
'''
Update a splunk search
CLI Example:
splunk_search.update 'my search name' sharing=app
'''
client = _get_splunk(profile)
search = client.saved_searches[name]
props = _get_splunk_search_props(search)
updates = kwargs
update_ne... | python | def update(name, profile="splunk", **kwargs):
'''
Update a splunk search
CLI Example:
splunk_search.update 'my search name' sharing=app
'''
client = _get_splunk(profile)
search = client.saved_searches[name]
props = _get_splunk_search_props(search)
updates = kwargs
update_ne... | [
"def",
"update",
"(",
"name",
",",
"profile",
"=",
"\"splunk\"",
",",
"*",
"*",
"kwargs",
")",
":",
"client",
"=",
"_get_splunk",
"(",
"profile",
")",
"search",
"=",
"client",
".",
"saved_searches",
"[",
"name",
"]",
"props",
"=",
"_get_splunk_search_props... | Update a splunk search
CLI Example:
splunk_search.update 'my search name' sharing=app | [
"Update",
"a",
"splunk",
"search"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/splunk_search.py#L110-L141 |
37,263 | saltstack/salt | salt/modules/splunk_search.py | create | def create(name, profile="splunk", **kwargs):
'''
Create a splunk search
CLI Example:
splunk_search.create 'my search name' search='error msg'
'''
client = _get_splunk(profile)
search = client.saved_searches.create(name, **kwargs)
# use the REST API to set owner and permissions
... | python | def create(name, profile="splunk", **kwargs):
'''
Create a splunk search
CLI Example:
splunk_search.create 'my search name' search='error msg'
'''
client = _get_splunk(profile)
search = client.saved_searches.create(name, **kwargs)
# use the REST API to set owner and permissions
... | [
"def",
"create",
"(",
"name",
",",
"profile",
"=",
"\"splunk\"",
",",
"*",
"*",
"kwargs",
")",
":",
"client",
"=",
"_get_splunk",
"(",
"profile",
")",
"search",
"=",
"client",
".",
"saved_searches",
".",
"create",
"(",
"name",
",",
"*",
"*",
"kwargs",
... | Create a splunk search
CLI Example:
splunk_search.create 'my search name' search='error msg' | [
"Create",
"a",
"splunk",
"search"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/splunk_search.py#L144-L170 |
37,264 | saltstack/salt | salt/modules/splunk_search.py | delete | def delete(name, profile="splunk"):
'''
Delete a splunk search
CLI Example:
splunk_search.delete 'my search name'
'''
client = _get_splunk(profile)
try:
client.saved_searches.delete(name)
return True
except KeyError:
return None | python | def delete(name, profile="splunk"):
'''
Delete a splunk search
CLI Example:
splunk_search.delete 'my search name'
'''
client = _get_splunk(profile)
try:
client.saved_searches.delete(name)
return True
except KeyError:
return None | [
"def",
"delete",
"(",
"name",
",",
"profile",
"=",
"\"splunk\"",
")",
":",
"client",
"=",
"_get_splunk",
"(",
"profile",
")",
"try",
":",
"client",
".",
"saved_searches",
".",
"delete",
"(",
"name",
")",
"return",
"True",
"except",
"KeyError",
":",
"retu... | Delete a splunk search
CLI Example:
splunk_search.delete 'my search name' | [
"Delete",
"a",
"splunk",
"search"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/splunk_search.py#L173-L186 |
37,265 | saltstack/salt | salt/modules/splunk_search.py | list_all | def list_all(prefix=None, app=None, owner=None, description_contains=None,
name_not_contains=None, profile="splunk"):
'''
Get all splunk search details. Produces results that can be used to create
an sls file.
if app or owner are specified, results will be limited to matching saved
sea... | python | def list_all(prefix=None, app=None, owner=None, description_contains=None,
name_not_contains=None, profile="splunk"):
'''
Get all splunk search details. Produces results that can be used to create
an sls file.
if app or owner are specified, results will be limited to matching saved
sea... | [
"def",
"list_all",
"(",
"prefix",
"=",
"None",
",",
"app",
"=",
"None",
",",
"owner",
"=",
"None",
",",
"description_contains",
"=",
"None",
",",
"name_not_contains",
"=",
"None",
",",
"profile",
"=",
"\"splunk\"",
")",
":",
"client",
"=",
"_get_splunk",
... | Get all splunk search details. Produces results that can be used to create
an sls file.
if app or owner are specified, results will be limited to matching saved
searches.
if description_contains is specified, results will be limited to those
where "description_contains in description" is true if n... | [
"Get",
"all",
"splunk",
"search",
"details",
".",
"Produces",
"results",
"that",
"can",
"be",
"used",
"to",
"create",
"an",
"sls",
"file",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/splunk_search.py#L201-L300 |
37,266 | saltstack/salt | salt/states/gem.py | installed | def installed(name, # pylint: disable=C0103
ruby=None,
gem_bin=None,
user=None,
version=None,
rdoc=False,
ri=False,
pre_releases=False,
proxy=None,
source=None): # pylint: disable=C... | python | def installed(name, # pylint: disable=C0103
ruby=None,
gem_bin=None,
user=None,
version=None,
rdoc=False,
ri=False,
pre_releases=False,
proxy=None,
source=None): # pylint: disable=C... | [
"def",
"installed",
"(",
"name",
",",
"# pylint: disable=C0103",
"ruby",
"=",
"None",
",",
"gem_bin",
"=",
"None",
",",
"user",
"=",
"None",
",",
"version",
"=",
"None",
",",
"rdoc",
"=",
"False",
",",
"ri",
"=",
"False",
",",
"pre_releases",
"=",
"Fal... | Make sure that a gem is installed.
name
The name of the gem to install
ruby: None
Only for RVM or rbenv installations: the ruby version and gemset to
target.
gem_bin: None
Custom ``gem`` command to run instead of the default.
Use this to install gems to a non-defau... | [
"Make",
"sure",
"that",
"a",
"gem",
"is",
"installed",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/gem.py#L33-L143 |
37,267 | saltstack/salt | salt/states/gem.py | removed | def removed(name, ruby=None, user=None, gem_bin=None):
'''
Make sure that a gem is not installed.
name
The name of the gem to uninstall
gem_bin : None
Full path to ``gem`` binary to use.
ruby : None
If RVM or rbenv are installed, the ruby version and gemset to use.
... | python | def removed(name, ruby=None, user=None, gem_bin=None):
'''
Make sure that a gem is not installed.
name
The name of the gem to uninstall
gem_bin : None
Full path to ``gem`` binary to use.
ruby : None
If RVM or rbenv are installed, the ruby version and gemset to use.
... | [
"def",
"removed",
"(",
"name",
",",
"ruby",
"=",
"None",
",",
"user",
"=",
"None",
",",
"gem_bin",
"=",
"None",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'result'",
":",
"None",
",",
"'comment'",
":",
"''",
",",
"'changes'",
":",
"{... | Make sure that a gem is not installed.
name
The name of the gem to uninstall
gem_bin : None
Full path to ``gem`` binary to use.
ruby : None
If RVM or rbenv are installed, the ruby version and gemset to use.
Ignored if ``gem_bin`` is specified.
user: None
The u... | [
"Make",
"sure",
"that",
"a",
"gem",
"is",
"not",
"installed",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/gem.py#L146-L182 |
37,268 | saltstack/salt | salt/states/gem.py | sources_add | def sources_add(name, ruby=None, user=None):
'''
Make sure that a gem source is added.
name
The URL of the gem source to be added
ruby: None
For RVM or rbenv installations: the ruby version and gemset to target.
user: None
The user under which to run the ``gem`` command
... | python | def sources_add(name, ruby=None, user=None):
'''
Make sure that a gem source is added.
name
The URL of the gem source to be added
ruby: None
For RVM or rbenv installations: the ruby version and gemset to target.
user: None
The user under which to run the ``gem`` command
... | [
"def",
"sources_add",
"(",
"name",
",",
"ruby",
"=",
"None",
",",
"user",
"=",
"None",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'result'",
":",
"None",
",",
"'comment'",
":",
"''",
",",
"'changes'",
":",
"{",
"}",
"}",
"if",
"name"... | Make sure that a gem source is added.
name
The URL of the gem source to be added
ruby: None
For RVM or rbenv installations: the ruby version and gemset to target.
user: None
The user under which to run the ``gem`` command
.. versionadded:: 0.17.0 | [
"Make",
"sure",
"that",
"a",
"gem",
"source",
"is",
"added",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/gem.py#L185-L216 |
37,269 | saltstack/salt | salt/states/gem.py | sources_remove | def sources_remove(name, ruby=None, user=None):
'''
Make sure that a gem source is removed.
name
The URL of the gem source to be removed
ruby: None
For RVM or rbenv installations: the ruby version and gemset to target.
user: None
The user under which to run the ``gem`` com... | python | def sources_remove(name, ruby=None, user=None):
'''
Make sure that a gem source is removed.
name
The URL of the gem source to be removed
ruby: None
For RVM or rbenv installations: the ruby version and gemset to target.
user: None
The user under which to run the ``gem`` com... | [
"def",
"sources_remove",
"(",
"name",
",",
"ruby",
"=",
"None",
",",
"user",
"=",
"None",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'result'",
":",
"None",
",",
"'comment'",
":",
"''",
",",
"'changes'",
":",
"{",
"}",
"}",
"if",
"na... | Make sure that a gem source is removed.
name
The URL of the gem source to be removed
ruby: None
For RVM or rbenv installations: the ruby version and gemset to target.
user: None
The user under which to run the ``gem`` command
.. versionadded:: 0.17.0 | [
"Make",
"sure",
"that",
"a",
"gem",
"source",
"is",
"removed",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/gem.py#L219-L252 |
37,270 | saltstack/salt | salt/modules/glanceng.py | image_create | def image_create(auth=None, **kwargs):
'''
Create an image
CLI Example:
.. code-block:: bash
salt '*' glanceng.image_create name=cirros file=cirros.raw disk_format=raw
salt '*' glanceng.image_create name=cirros file=cirros.raw disk_format=raw hw_scsi_model=virtio-scsi hw_disk_bus=scsi... | python | def image_create(auth=None, **kwargs):
'''
Create an image
CLI Example:
.. code-block:: bash
salt '*' glanceng.image_create name=cirros file=cirros.raw disk_format=raw
salt '*' glanceng.image_create name=cirros file=cirros.raw disk_format=raw hw_scsi_model=virtio-scsi hw_disk_bus=scsi... | [
"def",
"image_create",
"(",
"auth",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"cloud",
"=",
"get_operator_cloud",
"(",
"auth",
")",
"kwargs",
"=",
"_clean_kwargs",
"(",
"keep_name",
"=",
"True",
",",
"*",
"*",
"kwargs",
")",
"return",
"cloud",
".... | Create an image
CLI Example:
.. code-block:: bash
salt '*' glanceng.image_create name=cirros file=cirros.raw disk_format=raw
salt '*' glanceng.image_create name=cirros file=cirros.raw disk_format=raw hw_scsi_model=virtio-scsi hw_disk_bus=scsi | [
"Create",
"an",
"image"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/glanceng.py#L108-L121 |
37,271 | saltstack/salt | salt/modules/glanceng.py | image_search | def image_search(auth=None, **kwargs):
'''
Search for images
CLI Example:
.. code-block:: bash
salt '*' glanceng.image_search name=image1
salt '*' glanceng.image_search
'''
cloud = get_operator_cloud(auth)
kwargs = _clean_kwargs(**kwargs)
return cloud.search_images(**k... | python | def image_search(auth=None, **kwargs):
'''
Search for images
CLI Example:
.. code-block:: bash
salt '*' glanceng.image_search name=image1
salt '*' glanceng.image_search
'''
cloud = get_operator_cloud(auth)
kwargs = _clean_kwargs(**kwargs)
return cloud.search_images(**k... | [
"def",
"image_search",
"(",
"auth",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"cloud",
"=",
"get_operator_cloud",
"(",
"auth",
")",
"kwargs",
"=",
"_clean_kwargs",
"(",
"*",
"*",
"kwargs",
")",
"return",
"cloud",
".",
"search_images",
"(",
"*",
"... | Search for images
CLI Example:
.. code-block:: bash
salt '*' glanceng.image_search name=image1
salt '*' glanceng.image_search | [
"Search",
"for",
"images"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/glanceng.py#L156-L169 |
37,272 | saltstack/salt | salt/modules/glanceng.py | image_get | def image_get(auth=None, **kwargs):
'''
Get a single image
CLI Example:
.. code-block:: bash
salt '*' glanceng.image_get name=image1
salt '*' glanceng.image_get name=0e4febc2a5ab4f2c8f374b054162506d
'''
cloud = get_operator_cloud(auth)
kwargs = _clean_kwargs(**kwargs)
... | python | def image_get(auth=None, **kwargs):
'''
Get a single image
CLI Example:
.. code-block:: bash
salt '*' glanceng.image_get name=image1
salt '*' glanceng.image_get name=0e4febc2a5ab4f2c8f374b054162506d
'''
cloud = get_operator_cloud(auth)
kwargs = _clean_kwargs(**kwargs)
... | [
"def",
"image_get",
"(",
"auth",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"cloud",
"=",
"get_operator_cloud",
"(",
"auth",
")",
"kwargs",
"=",
"_clean_kwargs",
"(",
"*",
"*",
"kwargs",
")",
"return",
"cloud",
".",
"get_image",
"(",
"*",
"*",
"... | Get a single image
CLI Example:
.. code-block:: bash
salt '*' glanceng.image_get name=image1
salt '*' glanceng.image_get name=0e4febc2a5ab4f2c8f374b054162506d | [
"Get",
"a",
"single",
"image"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/glanceng.py#L172-L185 |
37,273 | saltstack/salt | salt/modules/glanceng.py | update_image_properties | def update_image_properties(auth=None, **kwargs):
'''
Update properties for an image
CLI Example:
.. code-block:: bash
salt '*' glanceng.update_image_properties name=image1 hw_scsi_model=virtio-scsi hw_disk_bus=scsi
salt '*' glanceng.update_image_properties name=0e4febc2a5ab4f2c8f374b... | python | def update_image_properties(auth=None, **kwargs):
'''
Update properties for an image
CLI Example:
.. code-block:: bash
salt '*' glanceng.update_image_properties name=image1 hw_scsi_model=virtio-scsi hw_disk_bus=scsi
salt '*' glanceng.update_image_properties name=0e4febc2a5ab4f2c8f374b... | [
"def",
"update_image_properties",
"(",
"auth",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"cloud",
"=",
"get_operator_cloud",
"(",
"auth",
")",
"kwargs",
"=",
"_clean_kwargs",
"(",
"*",
"*",
"kwargs",
")",
"return",
"cloud",
".",
"update_image_propertie... | Update properties for an image
CLI Example:
.. code-block:: bash
salt '*' glanceng.update_image_properties name=image1 hw_scsi_model=virtio-scsi hw_disk_bus=scsi
salt '*' glanceng.update_image_properties name=0e4febc2a5ab4f2c8f374b054162506d min_ram=1024 | [
"Update",
"properties",
"for",
"an",
"image"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/glanceng.py#L188-L201 |
37,274 | saltstack/salt | salt/runners/vistara.py | _get_oath2_access_token | def _get_oath2_access_token(client_key, client_secret):
'''
Query the vistara API and get an access_token
'''
if not client_key and not client_secret:
log.error(
"client_key and client_secret have not been specified "
"and are required parameters."
)
retu... | python | def _get_oath2_access_token(client_key, client_secret):
'''
Query the vistara API and get an access_token
'''
if not client_key and not client_secret:
log.error(
"client_key and client_secret have not been specified "
"and are required parameters."
)
retu... | [
"def",
"_get_oath2_access_token",
"(",
"client_key",
",",
"client_secret",
")",
":",
"if",
"not",
"client_key",
"and",
"not",
"client_secret",
":",
"log",
".",
"error",
"(",
"\"client_key and client_secret have not been specified \"",
"\"and are required parameters.\"",
")"... | Query the vistara API and get an access_token | [
"Query",
"the",
"vistara",
"API",
"and",
"get",
"an",
"access_token"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/vistara.py#L181-L220 |
37,275 | saltstack/salt | salt/modules/apache.py | signal | def signal(signal=None):
'''
Signals httpd to start, restart, or stop.
CLI Example:
.. code-block:: bash
salt '*' apache.signal restart
'''
no_extra_args = ('configtest', 'status', 'fullstatus')
valid_signals = ('start', 'stop', 'restart', 'graceful', 'graceful-stop')
if sign... | python | def signal(signal=None):
'''
Signals httpd to start, restart, or stop.
CLI Example:
.. code-block:: bash
salt '*' apache.signal restart
'''
no_extra_args = ('configtest', 'status', 'fullstatus')
valid_signals = ('start', 'stop', 'restart', 'graceful', 'graceful-stop')
if sign... | [
"def",
"signal",
"(",
"signal",
"=",
"None",
")",
":",
"no_extra_args",
"=",
"(",
"'configtest'",
",",
"'status'",
",",
"'fullstatus'",
")",
"valid_signals",
"=",
"(",
"'start'",
",",
"'stop'",
",",
"'restart'",
",",
"'graceful'",
",",
"'graceful-stop'",
")"... | Signals httpd to start, restart, or stop.
CLI Example:
.. code-block:: bash
salt '*' apache.signal restart | [
"Signals",
"httpd",
"to",
"start",
"restart",
"or",
"stop",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/apache.py#L227-L261 |
37,276 | saltstack/salt | salt/modules/apache.py | server_status | def server_status(profile='default'):
'''
Get Information from the Apache server-status handler
.. note::
The server-status handler is disabled by default.
In order for this function to work it needs to be enabled.
See http://httpd.apache.org/docs/2.2/mod/mod_status.html
The f... | python | def server_status(profile='default'):
'''
Get Information from the Apache server-status handler
.. note::
The server-status handler is disabled by default.
In order for this function to work it needs to be enabled.
See http://httpd.apache.org/docs/2.2/mod/mod_status.html
The f... | [
"def",
"server_status",
"(",
"profile",
"=",
"'default'",
")",
":",
"ret",
"=",
"{",
"'Scoreboard'",
":",
"{",
"'_'",
":",
"0",
",",
"'S'",
":",
"0",
",",
"'R'",
":",
"0",
",",
"'W'",
":",
"0",
",",
"'K'",
":",
"0",
",",
"'D'",
":",
"0",
",",... | Get Information from the Apache server-status handler
.. note::
The server-status handler is disabled by default.
In order for this function to work it needs to be enabled.
See http://httpd.apache.org/docs/2.2/mod/mod_status.html
The following configuration needs to exists in pillar/g... | [
"Get",
"Information",
"from",
"the",
"Apache",
"server",
"-",
"status",
"handler"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/apache.py#L300-L400 |
37,277 | saltstack/salt | salt/modules/apache.py | _parse_config | def _parse_config(conf, slot=None):
'''
Recursively goes through config structure and builds final Apache configuration
:param conf: defined config structure
:param slot: name of section container if needed
'''
ret = cStringIO()
if isinstance(conf, six.string_types):
if slot:
... | python | def _parse_config(conf, slot=None):
'''
Recursively goes through config structure and builds final Apache configuration
:param conf: defined config structure
:param slot: name of section container if needed
'''
ret = cStringIO()
if isinstance(conf, six.string_types):
if slot:
... | [
"def",
"_parse_config",
"(",
"conf",
",",
"slot",
"=",
"None",
")",
":",
"ret",
"=",
"cStringIO",
"(",
")",
"if",
"isinstance",
"(",
"conf",
",",
"six",
".",
"string_types",
")",
":",
"if",
"slot",
":",
"print",
"(",
"'{0} {1}'",
".",
"format",
"(",
... | Recursively goes through config structure and builds final Apache configuration
:param conf: defined config structure
:param slot: name of section container if needed | [
"Recursively",
"goes",
"through",
"config",
"structure",
"and",
"builds",
"final",
"Apache",
"configuration"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/apache.py#L403-L449 |
37,278 | saltstack/salt | salt/modules/apache.py | config | def config(name, config, edit=True):
'''
Create VirtualHost configuration files
name
File for the virtual host
config
VirtualHost configurations
.. note::
This function is not meant to be used from the command line.
Config is meant to be an ordered dict of all of t... | python | def config(name, config, edit=True):
'''
Create VirtualHost configuration files
name
File for the virtual host
config
VirtualHost configurations
.. note::
This function is not meant to be used from the command line.
Config is meant to be an ordered dict of all of t... | [
"def",
"config",
"(",
"name",
",",
"config",
",",
"edit",
"=",
"True",
")",
":",
"configs",
"=",
"[",
"]",
"for",
"entry",
"in",
"config",
":",
"key",
"=",
"next",
"(",
"six",
".",
"iterkeys",
"(",
"entry",
")",
")",
"configs",
".",
"append",
"("... | Create VirtualHost configuration files
name
File for the virtual host
config
VirtualHost configurations
.. note::
This function is not meant to be used from the command line.
Config is meant to be an ordered dict of all of the apache configs.
CLI Example:
.. code... | [
"Create",
"VirtualHost",
"configuration",
"files"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/apache.py#L452-L484 |
37,279 | saltstack/salt | salt/states/boto_sqs.py | absent | def absent(
name,
region=None,
key=None,
keyid=None,
profile=None,
):
'''
Ensure the named sqs queue is deleted.
name
Name of the SQS queue.
region
Region to connect to.
key
Secret key to be used.
keyid
Access key to be ... | python | def absent(
name,
region=None,
key=None,
keyid=None,
profile=None,
):
'''
Ensure the named sqs queue is deleted.
name
Name of the SQS queue.
region
Region to connect to.
key
Secret key to be used.
keyid
Access key to be ... | [
"def",
"absent",
"(",
"name",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
",",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'result'",
":",
"True",
",",
"'comment'",
":",... | Ensure the named sqs queue is deleted.
name
Name of the SQS queue.
region
Region to connect to.
key
Secret key to be used.
keyid
Access key to be used.
profile
A dict with region, key and keyid, or a pillar key (string)
that contains a dict with r... | [
"Ensure",
"the",
"named",
"sqs",
"queue",
"is",
"deleted",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto_sqs.py#L253-L321 |
37,280 | saltstack/salt | salt/states/user.py | _group_changes | def _group_changes(cur, wanted, remove=False):
'''
Determine if the groups need to be changed
'''
old = set(cur)
new = set(wanted)
if (remove and old != new) or (not remove and not new.issubset(old)):
return True
return False | python | def _group_changes(cur, wanted, remove=False):
'''
Determine if the groups need to be changed
'''
old = set(cur)
new = set(wanted)
if (remove and old != new) or (not remove and not new.issubset(old)):
return True
return False | [
"def",
"_group_changes",
"(",
"cur",
",",
"wanted",
",",
"remove",
"=",
"False",
")",
":",
"old",
"=",
"set",
"(",
"cur",
")",
"new",
"=",
"set",
"(",
"wanted",
")",
"if",
"(",
"remove",
"and",
"old",
"!=",
"new",
")",
"or",
"(",
"not",
"remove",... | Determine if the groups need to be changed | [
"Determine",
"if",
"the",
"groups",
"need",
"to",
"be",
"changed"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/user.py#L44-L52 |
37,281 | saltstack/salt | salt/utils/url.py | is_escaped | def is_escaped(url):
'''
test whether `url` is escaped with `|`
'''
scheme = urlparse(url).scheme
if not scheme:
return url.startswith('|')
elif scheme == 'salt':
path, saltenv = parse(url)
if salt.utils.platform.is_windows() and '|' in url:
return path.starts... | python | def is_escaped(url):
'''
test whether `url` is escaped with `|`
'''
scheme = urlparse(url).scheme
if not scheme:
return url.startswith('|')
elif scheme == 'salt':
path, saltenv = parse(url)
if salt.utils.platform.is_windows() and '|' in url:
return path.starts... | [
"def",
"is_escaped",
"(",
"url",
")",
":",
"scheme",
"=",
"urlparse",
"(",
"url",
")",
".",
"scheme",
"if",
"not",
"scheme",
":",
"return",
"url",
".",
"startswith",
"(",
"'|'",
")",
"elif",
"scheme",
"==",
"'salt'",
":",
"path",
",",
"saltenv",
"=",... | test whether `url` is escaped with `|` | [
"test",
"whether",
"url",
"is",
"escaped",
"with",
"|"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/url.py#L56-L70 |
37,282 | saltstack/salt | salt/utils/url.py | escape | def escape(url):
'''
add escape character `|` to `url`
'''
if salt.utils.platform.is_windows():
return url
scheme = urlparse(url).scheme
if not scheme:
if url.startswith('|'):
return url
else:
return '|{0}'.format(url)
elif scheme == 'salt':
... | python | def escape(url):
'''
add escape character `|` to `url`
'''
if salt.utils.platform.is_windows():
return url
scheme = urlparse(url).scheme
if not scheme:
if url.startswith('|'):
return url
else:
return '|{0}'.format(url)
elif scheme == 'salt':
... | [
"def",
"escape",
"(",
"url",
")",
":",
"if",
"salt",
".",
"utils",
".",
"platform",
".",
"is_windows",
"(",
")",
":",
"return",
"url",
"scheme",
"=",
"urlparse",
"(",
"url",
")",
".",
"scheme",
"if",
"not",
"scheme",
":",
"if",
"url",
".",
"startsw... | add escape character `|` to `url` | [
"add",
"escape",
"character",
"|",
"to",
"url"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/url.py#L73-L93 |
37,283 | saltstack/salt | salt/utils/url.py | unescape | def unescape(url):
'''
remove escape character `|` from `url`
'''
scheme = urlparse(url).scheme
if not scheme:
return url.lstrip('|')
elif scheme == 'salt':
path, saltenv = parse(url)
if salt.utils.platform.is_windows() and '|' in url:
return create(path.lstri... | python | def unescape(url):
'''
remove escape character `|` from `url`
'''
scheme = urlparse(url).scheme
if not scheme:
return url.lstrip('|')
elif scheme == 'salt':
path, saltenv = parse(url)
if salt.utils.platform.is_windows() and '|' in url:
return create(path.lstri... | [
"def",
"unescape",
"(",
"url",
")",
":",
"scheme",
"=",
"urlparse",
"(",
"url",
")",
".",
"scheme",
"if",
"not",
"scheme",
":",
"return",
"url",
".",
"lstrip",
"(",
"'|'",
")",
"elif",
"scheme",
"==",
"'salt'",
":",
"path",
",",
"saltenv",
"=",
"pa... | remove escape character `|` from `url` | [
"remove",
"escape",
"character",
"|",
"from",
"url"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/url.py#L96-L110 |
37,284 | saltstack/salt | salt/utils/url.py | add_http_basic_auth | def add_http_basic_auth(url,
user=None,
password=None,
https_only=False):
'''
Return a string with http basic auth incorporated into it
'''
if user is None and password is None:
return url
else:
urltuple = urlpar... | python | def add_http_basic_auth(url,
user=None,
password=None,
https_only=False):
'''
Return a string with http basic auth incorporated into it
'''
if user is None and password is None:
return url
else:
urltuple = urlpar... | [
"def",
"add_http_basic_auth",
"(",
"url",
",",
"user",
"=",
"None",
",",
"password",
"=",
"None",
",",
"https_only",
"=",
"False",
")",
":",
"if",
"user",
"is",
"None",
"and",
"password",
"is",
"None",
":",
"return",
"url",
"else",
":",
"urltuple",
"="... | Return a string with http basic auth incorporated into it | [
"Return",
"a",
"string",
"with",
"http",
"basic",
"auth",
"incorporated",
"into",
"it"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/url.py#L152-L179 |
37,285 | saltstack/salt | salt/utils/url.py | redact_http_basic_auth | def redact_http_basic_auth(output):
'''
Remove HTTP user and password
'''
# We can't use re.compile because re.compile(someregex).sub() doesn't
# support flags even in Python 2.7.
url_re = '(https?)://.*@'
redacted = r'\1://<redacted>@'
if sys.version_info >= (2, 7):
# re.sub() s... | python | def redact_http_basic_auth(output):
'''
Remove HTTP user and password
'''
# We can't use re.compile because re.compile(someregex).sub() doesn't
# support flags even in Python 2.7.
url_re = '(https?)://.*@'
redacted = r'\1://<redacted>@'
if sys.version_info >= (2, 7):
# re.sub() s... | [
"def",
"redact_http_basic_auth",
"(",
"output",
")",
":",
"# We can't use re.compile because re.compile(someregex).sub() doesn't",
"# support flags even in Python 2.7.",
"url_re",
"=",
"'(https?)://.*@'",
"redacted",
"=",
"r'\\1://<redacted>@'",
"if",
"sys",
".",
"version_info",
... | Remove HTTP user and password | [
"Remove",
"HTTP",
"user",
"and",
"password"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/url.py#L182-L201 |
37,286 | saltstack/salt | salt/modules/yumpkg.py | _get_hold | def _get_hold(line, pattern=__HOLD_PATTERN, full=True):
'''
Resolve a package name from a line containing the hold expression. If the
regex is not matched, None is returned.
yum ==> 2:vim-enhanced-7.4.629-5.el6.*
dnf ==> vim-enhanced-2:7.4.827-1.fc22.*
'''
if full:
if _yum() == 'dnf... | python | def _get_hold(line, pattern=__HOLD_PATTERN, full=True):
'''
Resolve a package name from a line containing the hold expression. If the
regex is not matched, None is returned.
yum ==> 2:vim-enhanced-7.4.629-5.el6.*
dnf ==> vim-enhanced-2:7.4.827-1.fc22.*
'''
if full:
if _yum() == 'dnf... | [
"def",
"_get_hold",
"(",
"line",
",",
"pattern",
"=",
"__HOLD_PATTERN",
",",
"full",
"=",
"True",
")",
":",
"if",
"full",
":",
"if",
"_yum",
"(",
")",
"==",
"'dnf'",
":",
"lock_re",
"=",
"r'({0}-\\S+)'",
".",
"format",
"(",
"pattern",
")",
"else",
":... | Resolve a package name from a line containing the hold expression. If the
regex is not matched, None is returned.
yum ==> 2:vim-enhanced-7.4.629-5.el6.*
dnf ==> vim-enhanced-2:7.4.827-1.fc22.* | [
"Resolve",
"a",
"package",
"name",
"from",
"a",
"line",
"containing",
"the",
"hold",
"expression",
".",
"If",
"the",
"regex",
"is",
"not",
"matched",
"None",
"is",
"returned",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/yumpkg.py#L109-L136 |
37,287 | saltstack/salt | salt/modules/yumpkg.py | _check_versionlock | def _check_versionlock():
'''
Ensure that the appropriate versionlock plugin is present
'''
if _yum() == 'dnf':
if int(__grains__.get('osmajorrelease')) >= 26:
if six.PY3:
vl_plugin = 'python3-dnf-plugin-versionlock'
else:
vl_plugin = 'pyth... | python | def _check_versionlock():
'''
Ensure that the appropriate versionlock plugin is present
'''
if _yum() == 'dnf':
if int(__grains__.get('osmajorrelease')) >= 26:
if six.PY3:
vl_plugin = 'python3-dnf-plugin-versionlock'
else:
vl_plugin = 'pyth... | [
"def",
"_check_versionlock",
"(",
")",
":",
"if",
"_yum",
"(",
")",
"==",
"'dnf'",
":",
"if",
"int",
"(",
"__grains__",
".",
"get",
"(",
"'osmajorrelease'",
")",
")",
">=",
"26",
":",
"if",
"six",
".",
"PY3",
":",
"vl_plugin",
"=",
"'python3-dnf-plugin... | Ensure that the appropriate versionlock plugin is present | [
"Ensure",
"that",
"the",
"appropriate",
"versionlock",
"plugin",
"is",
"present"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/yumpkg.py#L211-L234 |
37,288 | saltstack/salt | salt/modules/yumpkg.py | _get_yum_config | def _get_yum_config():
'''
Returns a dict representing the yum config options and values.
We try to pull all of the yum config options into a standard dict object.
This is currently only used to get the reposdir settings, but could be used
for other things if needed.
If the yum python library ... | python | def _get_yum_config():
'''
Returns a dict representing the yum config options and values.
We try to pull all of the yum config options into a standard dict object.
This is currently only used to get the reposdir settings, but could be used
for other things if needed.
If the yum python library ... | [
"def",
"_get_yum_config",
"(",
")",
":",
"# in case of any non-fatal failures, these defaults will be used",
"conf",
"=",
"{",
"'reposdir'",
":",
"[",
"'/etc/yum/repos.d'",
",",
"'/etc/yum.repos.d'",
"]",
",",
"}",
"if",
"HAS_YUM",
":",
"try",
":",
"yb",
"=",
"yum",... | Returns a dict representing the yum config options and values.
We try to pull all of the yum config options into a standard dict object.
This is currently only used to get the reposdir settings, but could be used
for other things if needed.
If the yum python library is available, use that, which will ... | [
"Returns",
"a",
"dict",
"representing",
"the",
"yum",
"config",
"options",
"and",
"values",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/yumpkg.py#L310-L382 |
37,289 | saltstack/salt | salt/modules/yumpkg.py | _get_yum_config_value | def _get_yum_config_value(name):
'''
Look for a specific config variable and return its value
'''
conf = _get_yum_config()
if name in conf.keys():
return conf.get(name)
return None | python | def _get_yum_config_value(name):
'''
Look for a specific config variable and return its value
'''
conf = _get_yum_config()
if name in conf.keys():
return conf.get(name)
return None | [
"def",
"_get_yum_config_value",
"(",
"name",
")",
":",
"conf",
"=",
"_get_yum_config",
"(",
")",
"if",
"name",
"in",
"conf",
".",
"keys",
"(",
")",
":",
"return",
"conf",
".",
"get",
"(",
"name",
")",
"return",
"None"
] | Look for a specific config variable and return its value | [
"Look",
"for",
"a",
"specific",
"config",
"variable",
"and",
"return",
"its",
"value"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/yumpkg.py#L385-L392 |
37,290 | saltstack/salt | salt/modules/yumpkg.py | _normalize_basedir | def _normalize_basedir(basedir=None):
'''
Takes a basedir argument as a string or a list. If the string or list is
empty, then look up the default from the 'reposdir' option in the yum
config.
Returns a list of directories.
'''
# if we are passed a string (for backward compatibility), conve... | python | def _normalize_basedir(basedir=None):
'''
Takes a basedir argument as a string or a list. If the string or list is
empty, then look up the default from the 'reposdir' option in the yum
config.
Returns a list of directories.
'''
# if we are passed a string (for backward compatibility), conve... | [
"def",
"_normalize_basedir",
"(",
"basedir",
"=",
"None",
")",
":",
"# if we are passed a string (for backward compatibility), convert to a list",
"if",
"isinstance",
"(",
"basedir",
",",
"six",
".",
"string_types",
")",
":",
"basedir",
"=",
"[",
"x",
".",
"strip",
... | Takes a basedir argument as a string or a list. If the string or list is
empty, then look up the default from the 'reposdir' option in the yum
config.
Returns a list of directories. | [
"Takes",
"a",
"basedir",
"argument",
"as",
"a",
"string",
"or",
"a",
"list",
".",
"If",
"the",
"string",
"or",
"list",
"is",
"empty",
"then",
"look",
"up",
"the",
"default",
"from",
"the",
"reposdir",
"option",
"in",
"the",
"yum",
"config",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/yumpkg.py#L395-L417 |
37,291 | saltstack/salt | salt/modules/yumpkg.py | refresh_db | def refresh_db(**kwargs):
'''
Check the yum repos for updated packages
Returns:
- ``True``: Updates are available
- ``False``: An error occurred
- ``None``: No updates are available
repo
Refresh just the specified repo
disablerepo
Do not refresh the specified repo
... | python | def refresh_db(**kwargs):
'''
Check the yum repos for updated packages
Returns:
- ``True``: Updates are available
- ``False``: An error occurred
- ``None``: No updates are available
repo
Refresh just the specified repo
disablerepo
Do not refresh the specified repo
... | [
"def",
"refresh_db",
"(",
"*",
"*",
"kwargs",
")",
":",
"# Remove rtag file to keep multiple refreshes from happening in pkg states",
"salt",
".",
"utils",
".",
"pkg",
".",
"clear_rtag",
"(",
"__opts__",
")",
"retcodes",
"=",
"{",
"100",
":",
"True",
",",
"0",
"... | Check the yum repos for updated packages
Returns:
- ``True``: Updates are available
- ``False``: An error occurred
- ``None``: No updates are available
repo
Refresh just the specified repo
disablerepo
Do not refresh the specified repo
enablerepo
Refresh a disable... | [
"Check",
"the",
"yum",
"repos",
"for",
"updated",
"packages"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/yumpkg.py#L1056-L1124 |
37,292 | saltstack/salt | salt/modules/yumpkg.py | _parse_repo_file | def _parse_repo_file(filename):
'''
Turn a single repo file into a dict
'''
parsed = configparser.ConfigParser()
config = {}
try:
parsed.read(filename)
except configparser.MissingSectionHeaderError as err:
log.error(
'Failed to parse file %s, error: %s',
... | python | def _parse_repo_file(filename):
'''
Turn a single repo file into a dict
'''
parsed = configparser.ConfigParser()
config = {}
try:
parsed.read(filename)
except configparser.MissingSectionHeaderError as err:
log.error(
'Failed to parse file %s, error: %s',
... | [
"def",
"_parse_repo_file",
"(",
"filename",
")",
":",
"parsed",
"=",
"configparser",
".",
"ConfigParser",
"(",
")",
"config",
"=",
"{",
"}",
"try",
":",
"parsed",
".",
"read",
"(",
"filename",
")",
"except",
"configparser",
".",
"MissingSectionHeaderError",
... | Turn a single repo file into a dict | [
"Turn",
"a",
"single",
"repo",
"file",
"into",
"a",
"dict"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/yumpkg.py#L2906-L2952 |
37,293 | saltstack/salt | salt/utils/ssdp.py | SSDPBase.get_self_ip | def get_self_ip():
'''
Find out localhost outside IP.
:return:
'''
sck = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
try:
sck.connect(('1.255.255.255', 1)) # Does not needs to be reachable
ip_addr = sck.getsockname()[0]
except Except... | python | def get_self_ip():
'''
Find out localhost outside IP.
:return:
'''
sck = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
try:
sck.connect(('1.255.255.255', 1)) # Does not needs to be reachable
ip_addr = sck.getsockname()[0]
except Except... | [
"def",
"get_self_ip",
"(",
")",
":",
"sck",
"=",
"socket",
".",
"socket",
"(",
"socket",
".",
"AF_INET",
",",
"socket",
".",
"SOCK_DGRAM",
")",
"try",
":",
"sck",
".",
"connect",
"(",
"(",
"'1.255.255.255'",
",",
"1",
")",
")",
"# Does not needs to be re... | Find out localhost outside IP.
:return: | [
"Find",
"out",
"localhost",
"outside",
"IP",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/ssdp.py#L89-L103 |
37,294 | saltstack/salt | salt/utils/ssdp.py | SSDPFactory._sendto | def _sendto(self, data, addr=None, attempts=10):
'''
On multi-master environments, running on the same machine,
transport sending to the destination can be allowed only at once.
Since every machine will immediately respond, high chance to
get sending fired at the same time, which... | python | def _sendto(self, data, addr=None, attempts=10):
'''
On multi-master environments, running on the same machine,
transport sending to the destination can be allowed only at once.
Since every machine will immediately respond, high chance to
get sending fired at the same time, which... | [
"def",
"_sendto",
"(",
"self",
",",
"data",
",",
"addr",
"=",
"None",
",",
"attempts",
"=",
"10",
")",
":",
"tries",
"=",
"0",
"slp_time",
"=",
"lambda",
":",
"0.5",
"/",
"random",
".",
"randint",
"(",
"10",
",",
"30",
")",
"slp",
"=",
"slp_time"... | On multi-master environments, running on the same machine,
transport sending to the destination can be allowed only at once.
Since every machine will immediately respond, high chance to
get sending fired at the same time, which will result to a PermissionError
at socket level. We are att... | [
"On",
"multi",
"-",
"master",
"environments",
"running",
"on",
"the",
"same",
"machine",
"transport",
"sending",
"to",
"the",
"destination",
"can",
"be",
"allowed",
"only",
"at",
"once",
".",
"Since",
"every",
"machine",
"will",
"immediately",
"respond",
"high... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/ssdp.py#L141-L165 |
37,295 | saltstack/salt | salt/utils/ssdp.py | SSDPFactory.datagram_received | def datagram_received(self, data, addr):
'''
On datagram receive.
:param data:
:param addr:
:return:
'''
message = salt.utils.stringutils.to_unicode(data)
if message.startswith(self.signature):
try:
timestamp = float(message[le... | python | def datagram_received(self, data, addr):
'''
On datagram receive.
:param data:
:param addr:
:return:
'''
message = salt.utils.stringutils.to_unicode(data)
if message.startswith(self.signature):
try:
timestamp = float(message[le... | [
"def",
"datagram_received",
"(",
"self",
",",
"data",
",",
"addr",
")",
":",
"message",
"=",
"salt",
".",
"utils",
".",
"stringutils",
".",
"to_unicode",
"(",
"data",
")",
"if",
"message",
".",
"startswith",
"(",
"self",
".",
"signature",
")",
":",
"tr... | On datagram receive.
:param data:
:param addr:
:return: | [
"On",
"datagram",
"receive",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/ssdp.py#L167-L210 |
37,296 | saltstack/salt | salt/utils/ssdp.py | SSDPDiscoveryServer.create_datagram_endpoint | def create_datagram_endpoint(loop, protocol_factory, local_addr=None, remote_addr=None, family=0, proto=0, flags=0):
'''
Create datagram connection.
Based on code from Python 3.5 version, this method is used
only in Python 2.7+ versions, since Trollius library did not
ported UDP... | python | def create_datagram_endpoint(loop, protocol_factory, local_addr=None, remote_addr=None, family=0, proto=0, flags=0):
'''
Create datagram connection.
Based on code from Python 3.5 version, this method is used
only in Python 2.7+ versions, since Trollius library did not
ported UDP... | [
"def",
"create_datagram_endpoint",
"(",
"loop",
",",
"protocol_factory",
",",
"local_addr",
"=",
"None",
",",
"remote_addr",
"=",
"None",
",",
"family",
"=",
"0",
",",
"proto",
"=",
"0",
",",
"flags",
"=",
"0",
")",
":",
"if",
"not",
"(",
"local_addr",
... | Create datagram connection.
Based on code from Python 3.5 version, this method is used
only in Python 2.7+ versions, since Trollius library did not
ported UDP packets broadcast. | [
"Create",
"datagram",
"connection",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/ssdp.py#L238-L305 |
37,297 | saltstack/salt | salt/utils/ssdp.py | SSDPDiscoveryClient.discover | def discover(self):
'''
Gather the information of currently declared servers.
:return:
'''
response = {}
masters = {}
self.log.info("Looking for a server discovery")
self._query()
self._collect_masters_map(response)
if not response:
... | python | def discover(self):
'''
Gather the information of currently declared servers.
:return:
'''
response = {}
masters = {}
self.log.info("Looking for a server discovery")
self._query()
self._collect_masters_map(response)
if not response:
... | [
"def",
"discover",
"(",
"self",
")",
":",
"response",
"=",
"{",
"}",
"masters",
"=",
"{",
"}",
"self",
".",
"log",
".",
"info",
"(",
"\"Looking for a server discovery\"",
")",
"self",
".",
"_query",
"(",
")",
"self",
".",
"_collect_masters_map",
"(",
"re... | Gather the information of currently declared servers.
:return: | [
"Gather",
"the",
"information",
"of",
"currently",
"declared",
"servers",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/ssdp.py#L385-L423 |
37,298 | saltstack/salt | salt/states/zabbix_user.py | absent | def absent(name, **kwargs):
'''
Ensures that the user does not exist, eventually delete user.
.. versionadded:: 2016.3.0
:param name: user alias
:param _connection_user: Optional - zabbix user (can also be set in opts or pillar, see module's docstring)
:param _connection_password: Optional - z... | python | def absent(name, **kwargs):
'''
Ensures that the user does not exist, eventually delete user.
.. versionadded:: 2016.3.0
:param name: user alias
:param _connection_user: Optional - zabbix user (can also be set in opts or pillar, see module's docstring)
:param _connection_password: Optional - z... | [
"def",
"absent",
"(",
"name",
",",
"*",
"*",
"kwargs",
")",
":",
"connection_args",
"=",
"{",
"}",
"if",
"'_connection_user'",
"in",
"kwargs",
":",
"connection_args",
"[",
"'_connection_user'",
"]",
"=",
"kwargs",
"[",
"'_connection_user'",
"]",
"if",
"'_con... | Ensures that the user does not exist, eventually delete user.
.. versionadded:: 2016.3.0
:param name: user alias
:param _connection_user: Optional - zabbix user (can also be set in opts or pillar, see module's docstring)
:param _connection_password: Optional - zabbix password (can also be set in opts ... | [
"Ensures",
"that",
"the",
"user",
"does",
"not",
"exist",
"eventually",
"delete",
"user",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/zabbix_user.py#L355-L421 |
37,299 | saltstack/salt | salt/utils/pushover.py | query | def query(function,
token=None,
api_version='1',
method='POST',
header_dict=None,
data=None,
query_params=None,
opts=None):
'''
PushOver object method function to construct and execute on the API URL.
:param token: The PushOver api... | python | def query(function,
token=None,
api_version='1',
method='POST',
header_dict=None,
data=None,
query_params=None,
opts=None):
'''
PushOver object method function to construct and execute on the API URL.
:param token: The PushOver api... | [
"def",
"query",
"(",
"function",
",",
"token",
"=",
"None",
",",
"api_version",
"=",
"'1'",
",",
"method",
"=",
"'POST'",
",",
"header_dict",
"=",
"None",
",",
"data",
"=",
"None",
",",
"query_params",
"=",
"None",
",",
"opts",
"=",
"None",
")",
":",... | PushOver object method function to construct and execute on the API URL.
:param token: The PushOver api key.
:param api_version: The PushOver API version to use, defaults to version 1.
:param function: The PushOver api function to perform.
:param method: The HTTP method, e.g. GET or POST.... | [
"PushOver",
"object",
"method",
"function",
"to",
"construct",
"and",
"execute",
"on",
"the",
"API",
"URL",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/pushover.py#L32-L110 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.