repo stringlengths 7 54 | path stringlengths 4 223 | func_name stringlengths 1 134 | original_string stringlengths 75 104k | language stringclasses 1
value | code stringlengths 75 104k | code_tokens listlengths 20 28.4k | docstring stringlengths 1 46.3k | docstring_tokens listlengths 1 1.66k | sha stringlengths 40 40 | url stringlengths 87 315 | partition stringclasses 1
value | summary stringlengths 4 350 | obf_code stringlengths 7.85k 764k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
saltstack/salt | salt/modules/boto_elasticsearch_domain.py | describe | def describe(DomainName,
region=None, key=None, keyid=None, profile=None):
'''
Given a domain name describe its properties.
Returns a dictionary of interesting properties.
CLI Example:
.. code-block:: bash
salt myminion boto_elasticsearch_domain.describe mydomain
'''
... | python | def describe(DomainName,
region=None, key=None, keyid=None, profile=None):
'''
Given a domain name describe its properties.
Returns a dictionary of interesting properties.
CLI Example:
.. code-block:: bash
salt myminion boto_elasticsearch_domain.describe mydomain
'''
... | [
"def",
"describe",
"(",
"DomainName",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"conn",
"=",
"_get_conn",
"(",
"region",
"=",
"region",
",",
"key",
"=",
"key",
",",
"keyid... | Given a domain name describe its properties.
Returns a dictionary of interesting properties.
CLI Example:
.. code-block:: bash
salt myminion boto_elasticsearch_domain.describe mydomain | [
"Given",
"a",
"domain",
"name",
"describe",
"its",
"properties",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_elasticsearch_domain.py#L184-L210 | train | Given a domain name describe its properties. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/boto_elasticsearch_domain.py | create | def create(DomainName, ElasticsearchClusterConfig=None, EBSOptions=None,
AccessPolicies=None, SnapshotOptions=None, AdvancedOptions=None,
region=None, key=None, keyid=None, profile=None,
ElasticsearchVersion=None):
'''
Given a valid config, create a domain.
Returns {created... | python | def create(DomainName, ElasticsearchClusterConfig=None, EBSOptions=None,
AccessPolicies=None, SnapshotOptions=None, AdvancedOptions=None,
region=None, key=None, keyid=None, profile=None,
ElasticsearchVersion=None):
'''
Given a valid config, create a domain.
Returns {created... | [
"def",
"create",
"(",
"DomainName",
",",
"ElasticsearchClusterConfig",
"=",
"None",
",",
"EBSOptions",
"=",
"None",
",",
"AccessPolicies",
"=",
"None",
",",
"SnapshotOptions",
"=",
"None",
",",
"AdvancedOptions",
"=",
"None",
",",
"region",
"=",
"None",
",",
... | Given a valid config, create a domain.
Returns {created: true} if the domain was created and returns
{created: False} if the domain was not created.
CLI Example:
.. code-block:: bash
salt myminion boto_elasticsearch_domain.create mydomain \\
{'InstanceType': 't2.micro.elasticse... | [
"Given",
"a",
"valid",
"config",
"create",
"a",
"domain",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_elasticsearch_domain.py#L213-L264 | train | Creates a new domain in elasticsearch. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/boto_elasticsearch_domain.py | delete | def delete(DomainName, region=None, key=None, keyid=None, profile=None):
'''
Given a domain name, delete it.
Returns {deleted: true} if the domain was deleted and returns
{deleted: false} if the domain was not deleted.
CLI Example:
.. code-block:: bash
salt myminion boto_elasticsearc... | python | def delete(DomainName, region=None, key=None, keyid=None, profile=None):
'''
Given a domain name, delete it.
Returns {deleted: true} if the domain was deleted and returns
{deleted: false} if the domain was not deleted.
CLI Example:
.. code-block:: bash
salt myminion boto_elasticsearc... | [
"def",
"delete",
"(",
"DomainName",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"try",
":",
"conn",
"=",
"_get_conn",
"(",
"region",
"=",
"region",
",",
"key",
"=",
"key",
... | Given a domain name, delete it.
Returns {deleted: true} if the domain was deleted and returns
{deleted: false} if the domain was not deleted.
CLI Example:
.. code-block:: bash
salt myminion boto_elasticsearch_domain.delete mydomain | [
"Given",
"a",
"domain",
"name",
"delete",
"it",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_elasticsearch_domain.py#L267-L287 | train | Given a domain name delete it. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/boto_elasticsearch_domain.py | add_tags | def add_tags(DomainName=None, ARN=None,
region=None, key=None, keyid=None, profile=None, **kwargs):
'''
Add tags to a domain
Returns {tagged: true} if the domain was tagged and returns
{tagged: False} if the domain was not tagged.
CLI Example:
.. code-block:: bash
salt mym... | python | def add_tags(DomainName=None, ARN=None,
region=None, key=None, keyid=None, profile=None, **kwargs):
'''
Add tags to a domain
Returns {tagged: true} if the domain was tagged and returns
{tagged: False} if the domain was not tagged.
CLI Example:
.. code-block:: bash
salt mym... | [
"def",
"add_tags",
"(",
"DomainName",
"=",
"None",
",",
"ARN",
"=",
"None",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"try",
":",
"conn",
"=",
... | Add tags to a domain
Returns {tagged: true} if the domain was tagged and returns
{tagged: False} if the domain was not tagged.
CLI Example:
.. code-block:: bash
salt myminion boto_elasticsearch_domain.add_tags mydomain tag_a=tag_value tag_b=tag_value | [
"Add",
"tags",
"to",
"a",
"domain"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_elasticsearch_domain.py#L340-L380 | train | Add tags to a domain. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/boto_elasticsearch_domain.py | remove_tags | def remove_tags(TagKeys, DomainName=None, ARN=None,
region=None, key=None, keyid=None, profile=None):
'''
Remove tags from 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... | python | def remove_tags(TagKeys, DomainName=None, ARN=None,
region=None, key=None, keyid=None, profile=None):
'''
Remove tags from 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... | [
"def",
"remove_tags",
"(",
"TagKeys",
",",
"DomainName",
"=",
"None",
",",
"ARN",
"=",
"None",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"try",
":",
"conn",
"=",
"_get_con... | Remove tags from 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.remove_tags my_trail tag_a=tag_value tag_b=tag_value | [
"Remove",
"tags",
"from",
"a",
"trail"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_elasticsearch_domain.py#L383-L419 | train | Removes tags from a trail. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/boto_elasticsearch_domain.py | list_tags | def list_tags(DomainName=None, ARN=None,
region=None, key=None, keyid=None, profile=None):
'''
List tags of a trail
Returns:
tags:
- {...}
- {...}
CLI Example:
.. code-block:: bash
salt myminion boto_cloudtrail.list_tags my_trail
'''
try:
... | python | def list_tags(DomainName=None, ARN=None,
region=None, key=None, keyid=None, profile=None):
'''
List tags of a trail
Returns:
tags:
- {...}
- {...}
CLI Example:
.. code-block:: bash
salt myminion boto_cloudtrail.list_tags my_trail
'''
try:
... | [
"def",
"list_tags",
"(",
"DomainName",
"=",
"None",
",",
"ARN",
"=",
"None",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"try",
":",
"conn",
"=",
"_get_conn",
"(",
"region",... | List tags of a trail
Returns:
tags:
- {...}
- {...}
CLI Example:
.. code-block:: bash
salt myminion boto_cloudtrail.list_tags my_trail | [
"List",
"tags",
"of",
"a",
"trail"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_elasticsearch_domain.py#L422-L464 | train | List tags of a trail
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/neutron_secgroup.py | present | def present(name, auth=None, **kwargs):
'''
Ensure a security group exists.
You can supply either project_name or project_id.
Creating a default security group will not show up as a change;
it gets created through the lookup process.
name
Name of the security group
description
... | python | def present(name, auth=None, **kwargs):
'''
Ensure a security group exists.
You can supply either project_name or project_id.
Creating a default security group will not show up as a change;
it gets created through the lookup process.
name
Name of the security group
description
... | [
"def",
"present",
"(",
"name",
",",
"auth",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":",
"{",
"}",
",",
"'result'",
":",
"True",
",",
"'comment'",
":",
"''",
"}",
"kwargs",
"=",
... | Ensure a security group exists.
You can supply either project_name or project_id.
Creating a default security group will not show up as a change;
it gets created through the lookup process.
name
Name of the security group
description
Description of the security group
project... | [
"Ensure",
"a",
"security",
"group",
"exists",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/neutron_secgroup.py#L50-L120 | train | Ensure a security group exists. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/neutron_secgroup.py | absent | def absent(name, auth=None, **kwargs):
'''
Ensure a security group does not exist
name
Name of the security group
'''
ret = {'name': name,
'changes': {},
'result': True,
'comment': ''}
kwargs = __utils__['args.clean_kwargs'](**kwargs)
__salt__['ne... | python | def absent(name, auth=None, **kwargs):
'''
Ensure a security group does not exist
name
Name of the security group
'''
ret = {'name': name,
'changes': {},
'result': True,
'comment': ''}
kwargs = __utils__['args.clean_kwargs'](**kwargs)
__salt__['ne... | [
"def",
"absent",
"(",
"name",
",",
"auth",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":",
"{",
"}",
",",
"'result'",
":",
"True",
",",
"'comment'",
":",
"''",
"}",
"kwargs",
"=",
"... | Ensure a security group does not exist
name
Name of the security group | [
"Ensure",
"a",
"security",
"group",
"does",
"not",
"exist"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/neutron_secgroup.py#L123-L159 | train | Ensure a security group does not exist | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/logrotate.py | _parse_conf | def _parse_conf(conf_file=_DEFAULT_CONF):
'''
Parse a logrotate configuration file.
Includes will also be parsed, and their configuration will be stored in the
return dict, as if they were part of the main config file. A dict of which
configs came from which includes will be stored in the 'include ... | python | def _parse_conf(conf_file=_DEFAULT_CONF):
'''
Parse a logrotate configuration file.
Includes will also be parsed, and their configuration will be stored in the
return dict, as if they were part of the main config file. A dict of which
configs came from which includes will be stored in the 'include ... | [
"def",
"_parse_conf",
"(",
"conf_file",
"=",
"_DEFAULT_CONF",
")",
":",
"ret",
"=",
"{",
"}",
"mode",
"=",
"'single'",
"multi_names",
"=",
"[",
"]",
"multi",
"=",
"{",
"}",
"prev_comps",
"=",
"None",
"with",
"salt",
".",
"utils",
".",
"files",
".",
"... | Parse a logrotate configuration file.
Includes will also be parsed, and their configuration will be stored in the
return dict, as if they were part of the main config file. A dict of which
configs came from which includes will be stored in the 'include files' dict
inside the return dict, for later refe... | [
"Parse",
"a",
"logrotate",
"configuration",
"file",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/logrotate.py#L57-L123 | train | Parse a logrotate configuration file and return a dict of which include files came from which includes. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/logrotate.py | get | def get(key, value=None, conf_file=_DEFAULT_CONF):
'''
Get the value for a specific configuration line.
:param str key: The command or stanza block to configure.
:param str value: The command value or command of the block specified by the key parameter.
:param str conf_file: The logrotate configura... | python | def get(key, value=None, conf_file=_DEFAULT_CONF):
'''
Get the value for a specific configuration line.
:param str key: The command or stanza block to configure.
:param str value: The command value or command of the block specified by the key parameter.
:param str conf_file: The logrotate configura... | [
"def",
"get",
"(",
"key",
",",
"value",
"=",
"None",
",",
"conf_file",
"=",
"_DEFAULT_CONF",
")",
":",
"current_conf",
"=",
"_parse_conf",
"(",
"conf_file",
")",
"stanza",
"=",
"current_conf",
".",
"get",
"(",
"key",
",",
"False",
")",
"if",
"value",
"... | Get the value for a specific configuration line.
:param str key: The command or stanza block to configure.
:param str value: The command value or command of the block specified by the key parameter.
:param str conf_file: The logrotate configuration file.
:return: The value for a specific configuration... | [
"Get",
"the",
"value",
"for",
"a",
"specific",
"configuration",
"line",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/logrotate.py#L144-L170 | train | Get the value for a specific configuration line. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/logrotate.py | set_ | def set_(key, value, setting=None, conf_file=_DEFAULT_CONF):
'''
Set a new value for a specific configuration line.
:param str key: The command or block to configure.
:param str value: The command value or command of the block specified by the key parameter.
:param str setting: The command value fo... | python | def set_(key, value, setting=None, conf_file=_DEFAULT_CONF):
'''
Set a new value for a specific configuration line.
:param str key: The command or block to configure.
:param str value: The command value or command of the block specified by the key parameter.
:param str setting: The command value fo... | [
"def",
"set_",
"(",
"key",
",",
"value",
",",
"setting",
"=",
"None",
",",
"conf_file",
"=",
"_DEFAULT_CONF",
")",
":",
"conf",
"=",
"_parse_conf",
"(",
"conf_file",
")",
"for",
"include",
"in",
"conf",
"[",
"'include files'",
"]",
":",
"if",
"key",
"i... | Set a new value for a specific configuration line.
:param str key: The command or block to configure.
:param str value: The command value or command of the block specified by the key parameter.
:param str setting: The command value for the command specified by the value parameter.
:param str conf_file:... | [
"Set",
"a",
"new",
"value",
"for",
"a",
"specific",
"configuration",
"line",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/logrotate.py#L173-L273 | train | Set a new value for a specific configuration line. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/logrotate.py | _dict_to_stanza | def _dict_to_stanza(key, stanza):
'''
Convert a dict to a multi-line stanza
'''
ret = ''
for skey in stanza:
if stanza[skey] is True:
stanza[skey] = ''
ret += ' {0} {1}\n'.format(skey, stanza[skey])
return '{0} {{\n{1}}}'.format(key, ret) | python | def _dict_to_stanza(key, stanza):
'''
Convert a dict to a multi-line stanza
'''
ret = ''
for skey in stanza:
if stanza[skey] is True:
stanza[skey] = ''
ret += ' {0} {1}\n'.format(skey, stanza[skey])
return '{0} {{\n{1}}}'.format(key, ret) | [
"def",
"_dict_to_stanza",
"(",
"key",
",",
"stanza",
")",
":",
"ret",
"=",
"''",
"for",
"skey",
"in",
"stanza",
":",
"if",
"stanza",
"[",
"skey",
"]",
"is",
"True",
":",
"stanza",
"[",
"skey",
"]",
"=",
"''",
"ret",
"+=",
"' {0} {1}\\n'",
".",
"... | Convert a dict to a multi-line stanza | [
"Convert",
"a",
"dict",
"to",
"a",
"multi",
"-",
"line",
"stanza"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/logrotate.py#L276-L285 | train | Convert a dict to a multi - line stanza | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/zk_concurrency.py | lock | def lock(name,
zk_hosts=None,
identifier=None,
max_concurrency=1,
timeout=None,
ephemeral_lease=False,
profile=None,
scheme=None,
username=None,
password=None,
default_acl=None):
'''
Block state execution until you are abl... | python | def lock(name,
zk_hosts=None,
identifier=None,
max_concurrency=1,
timeout=None,
ephemeral_lease=False,
profile=None,
scheme=None,
username=None,
password=None,
default_acl=None):
'''
Block state execution until you are abl... | [
"def",
"lock",
"(",
"name",
",",
"zk_hosts",
"=",
"None",
",",
"identifier",
"=",
"None",
",",
"max_concurrency",
"=",
"1",
",",
"timeout",
"=",
"None",
",",
"ephemeral_lease",
"=",
"False",
",",
"profile",
"=",
"None",
",",
"scheme",
"=",
"None",
",",... | Block state execution until you are able to get the lock (or hit the timeout) | [
"Block",
"state",
"execution",
"until",
"you",
"are",
"able",
"to",
"get",
"the",
"lock",
"(",
"or",
"hit",
"the",
"timeout",
")"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/zk_concurrency.py#L69-L112 | train | Lock a node in the specified node | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/zk_concurrency.py | unlock | def unlock(name,
zk_hosts=None, # in case you need to unlock without having run lock (failed execution for example)
identifier=None,
max_concurrency=1,
ephemeral_lease=False,
profile=None,
scheme=None,
username=None,
password=None,... | python | def unlock(name,
zk_hosts=None, # in case you need to unlock without having run lock (failed execution for example)
identifier=None,
max_concurrency=1,
ephemeral_lease=False,
profile=None,
scheme=None,
username=None,
password=None,... | [
"def",
"unlock",
"(",
"name",
",",
"zk_hosts",
"=",
"None",
",",
"# in case you need to unlock without having run lock (failed execution for example)",
"identifier",
"=",
"None",
",",
"max_concurrency",
"=",
"1",
",",
"ephemeral_lease",
"=",
"False",
",",
"profile",
"="... | Remove lease from semaphore. | [
"Remove",
"lease",
"from",
"semaphore",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/zk_concurrency.py#L115-L155 | train | Unlock a semaphore. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/zk_concurrency.py | min_party | def min_party(name,
zk_hosts,
min_nodes,
blocking=False,
profile=None,
scheme=None,
username=None,
password=None,
default_acl=None):
'''
Ensure that there are `min_nodes` in the party at `name`, optio... | python | def min_party(name,
zk_hosts,
min_nodes,
blocking=False,
profile=None,
scheme=None,
username=None,
password=None,
default_acl=None):
'''
Ensure that there are `min_nodes` in the party at `name`, optio... | [
"def",
"min_party",
"(",
"name",
",",
"zk_hosts",
",",
"min_nodes",
",",
"blocking",
"=",
"False",
",",
"profile",
"=",
"None",
",",
"scheme",
"=",
"None",
",",
"username",
"=",
"None",
",",
"password",
"=",
"None",
",",
"default_acl",
"=",
"None",
")"... | Ensure that there are `min_nodes` in the party at `name`, optionally blocking if not available. | [
"Ensure",
"that",
"there",
"are",
"min_nodes",
"in",
"the",
"party",
"at",
"name",
"optionally",
"blocking",
"if",
"not",
"available",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/zk_concurrency.py#L158-L198 | train | Ensure that there are at least min_nodes in the party at name. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/nxos_api.py | _cli_command | def _cli_command(commands,
method='cli',
**kwargs):
'''
Execute a list of CLI commands.
'''
if not isinstance(commands, (list, tuple)):
commands = [commands]
rpc_responses = rpc(commands,
method=method,
**kwarg... | python | def _cli_command(commands,
method='cli',
**kwargs):
'''
Execute a list of CLI commands.
'''
if not isinstance(commands, (list, tuple)):
commands = [commands]
rpc_responses = rpc(commands,
method=method,
**kwarg... | [
"def",
"_cli_command",
"(",
"commands",
",",
"method",
"=",
"'cli'",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"not",
"isinstance",
"(",
"commands",
",",
"(",
"list",
",",
"tuple",
")",
")",
":",
"commands",
"=",
"[",
"commands",
"]",
"rpc_responses",
... | Execute a list of CLI commands. | [
"Execute",
"a",
"list",
"of",
"CLI",
"commands",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/nxos_api.py#L171-L194 | train | Execute a list of CLI commands. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/nxos_api.py | rpc | def rpc(commands,
method='cli',
**kwargs):
'''
Execute an arbitrary RPC request via the Nexus API.
commands
The commands to be executed.
method: ``cli``
The type of the response, i.e., raw text (``cli_ascii``) or structured
document (``cli``). Defaults to ``cli`... | python | def rpc(commands,
method='cli',
**kwargs):
'''
Execute an arbitrary RPC request via the Nexus API.
commands
The commands to be executed.
method: ``cli``
The type of the response, i.e., raw text (``cli_ascii``) or structured
document (``cli``). Defaults to ``cli`... | [
"def",
"rpc",
"(",
"commands",
",",
"method",
"=",
"'cli'",
",",
"*",
"*",
"kwargs",
")",
":",
"nxos_api_kwargs",
"=",
"__salt__",
"[",
"'config.get'",
"]",
"(",
"'nxos_api'",
",",
"{",
"}",
")",
"nxos_api_kwargs",
".",
"update",
"(",
"*",
"*",
"kwargs... | Execute an arbitrary RPC request via the Nexus API.
commands
The commands to be executed.
method: ``cli``
The type of the response, i.e., raw text (``cli_ascii``) or structured
document (``cli``). Defaults to ``cli`` (structured data).
transport: ``https``
Specifies the ty... | [
"Execute",
"an",
"arbitrary",
"RPC",
"request",
"via",
"the",
"Nexus",
"API",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/nxos_api.py#L201-L254 | train | Execute an arbitrary RPC request via the NX - API. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/nxos_api.py | show | def show(commands,
raw_text=True,
**kwargs):
'''
Execute one or more show (non-configuration) commands.
commands
The commands to be executed.
raw_text: ``True``
Whether to return raw text or structured data.
transport: ``https``
Specifies the type of conn... | python | def show(commands,
raw_text=True,
**kwargs):
'''
Execute one or more show (non-configuration) commands.
commands
The commands to be executed.
raw_text: ``True``
Whether to return raw text or structured data.
transport: ``https``
Specifies the type of conn... | [
"def",
"show",
"(",
"commands",
",",
"raw_text",
"=",
"True",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"[",
"]",
"if",
"raw_text",
":",
"method",
"=",
"'cli_ascii'",
"key",
"=",
"'msg'",
"else",
":",
"method",
"=",
"'cli'",
"key",
"=",
"'body... | Execute one or more show (non-configuration) commands.
commands
The commands to be executed.
raw_text: ``True``
Whether to return raw text or structured data.
transport: ``https``
Specifies the type of connection transport to use. Valid values for the
connection are ``http... | [
"Execute",
"one",
"or",
"more",
"show",
"(",
"non",
"-",
"configuration",
")",
"commands",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/nxos_api.py#L257-L314 | train | Execute one or more show commands. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/nxos_api.py | config | def config(commands=None,
config_file=None,
template_engine='jinja',
context=None,
defaults=None,
saltenv='base',
**kwargs):
'''
Configures the Nexus switch with the specified commands.
This method is used to send configuration commands to t... | python | def config(commands=None,
config_file=None,
template_engine='jinja',
context=None,
defaults=None,
saltenv='base',
**kwargs):
'''
Configures the Nexus switch with the specified commands.
This method is used to send configuration commands to t... | [
"def",
"config",
"(",
"commands",
"=",
"None",
",",
"config_file",
"=",
"None",
",",
"template_engine",
"=",
"'jinja'",
",",
"context",
"=",
"None",
",",
"defaults",
"=",
"None",
",",
"saltenv",
"=",
"'base'",
",",
"*",
"*",
"kwargs",
")",
":",
"initia... | Configures the Nexus switch with the specified commands.
This method is used to send configuration commands to the switch. It
will take either a string or a list and prepend the necessary commands
to put the session into config mode.
.. warning::
All the commands will be applied directly int... | [
"Configures",
"the",
"Nexus",
"switch",
"with",
"the",
"specified",
"commands",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/nxos_api.py#L317-L427 | train | This method is used to configure the Nexus switch with the specified commands. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/aggregation.py | levelise | def levelise(level):
'''
Describe which levels are allowed to do deep merging.
level can be:
True
all levels are True
False
all levels are False
an int
only the first levels are True, the others are False
a sequence
it describes which levels are True, it ... | python | def levelise(level):
'''
Describe which levels are allowed to do deep merging.
level can be:
True
all levels are True
False
all levels are False
an int
only the first levels are True, the others are False
a sequence
it describes which levels are True, it ... | [
"def",
"levelise",
"(",
"level",
")",
":",
"if",
"not",
"level",
":",
"# False, 0, [] ...",
"return",
"False",
",",
"False",
"if",
"level",
"is",
"True",
":",
"return",
"True",
",",
"True",
"if",
"isinstance",
"(",
"level",
",",
"int",
")",
":",
"retur... | Describe which levels are allowed to do deep merging.
level can be:
True
all levels are True
False
all levels are False
an int
only the first levels are True, the others are False
a sequence
it describes which levels are True, it can be:
* a list of bool... | [
"Describe",
"which",
"levels",
"are",
"allowed",
"to",
"do",
"deep",
"merging",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/aggregation.py#L151-L185 | train | This function returns a tuple of the level and the deep merging of the sequence containing the items in the tree. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/aggregation.py | mark | def mark(obj, map_class=Map, sequence_class=Sequence):
'''
Convert obj into an Aggregate instance
'''
if isinstance(obj, Aggregate):
return obj
if isinstance(obj, dict):
return map_class(obj)
if isinstance(obj, (list, tuple, set)):
return sequence_class(obj)
else:
... | python | def mark(obj, map_class=Map, sequence_class=Sequence):
'''
Convert obj into an Aggregate instance
'''
if isinstance(obj, Aggregate):
return obj
if isinstance(obj, dict):
return map_class(obj)
if isinstance(obj, (list, tuple, set)):
return sequence_class(obj)
else:
... | [
"def",
"mark",
"(",
"obj",
",",
"map_class",
"=",
"Map",
",",
"sequence_class",
"=",
"Sequence",
")",
":",
"if",
"isinstance",
"(",
"obj",
",",
"Aggregate",
")",
":",
"return",
"obj",
"if",
"isinstance",
"(",
"obj",
",",
"dict",
")",
":",
"return",
"... | Convert obj into an Aggregate instance | [
"Convert",
"obj",
"into",
"an",
"Aggregate",
"instance"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/aggregation.py#L188-L199 | train | Convert obj into an Aggregate instance
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/aggregation.py | aggregate | def aggregate(obj_a, obj_b, level=False, map_class=Map, sequence_class=Sequence):
'''
Merge obj_b into obj_a.
>>> aggregate('first', 'second', True) == ['first', 'second']
True
'''
deep, subdeep = levelise(level)
if deep:
obj_a = mark(obj_a, map_class=map_class, sequence_class=sequ... | python | def aggregate(obj_a, obj_b, level=False, map_class=Map, sequence_class=Sequence):
'''
Merge obj_b into obj_a.
>>> aggregate('first', 'second', True) == ['first', 'second']
True
'''
deep, subdeep = levelise(level)
if deep:
obj_a = mark(obj_a, map_class=map_class, sequence_class=sequ... | [
"def",
"aggregate",
"(",
"obj_a",
",",
"obj_b",
",",
"level",
"=",
"False",
",",
"map_class",
"=",
"Map",
",",
"sequence_class",
"=",
"Sequence",
")",
":",
"deep",
",",
"subdeep",
"=",
"levelise",
"(",
"level",
")",
"if",
"deep",
":",
"obj_a",
"=",
"... | Merge obj_b into obj_a.
>>> aggregate('first', 'second', True) == ['first', 'second']
True | [
"Merge",
"obj_b",
"into",
"obj_a",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/aggregation.py#L202-L244 | train | Merge obj_a into obj_b. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/migrations.py | migrate_paths | def migrate_paths(opts):
'''
Migrate old minion and master pki file paths to new ones.
'''
oldpki_dir = os.path.join(syspaths.CONFIG_DIR, 'pki')
if not os.path.exists(oldpki_dir):
# There's not even a pki directory, don't bother migrating
return
newpki_dir = opts['pki_dir']
... | python | def migrate_paths(opts):
'''
Migrate old minion and master pki file paths to new ones.
'''
oldpki_dir = os.path.join(syspaths.CONFIG_DIR, 'pki')
if not os.path.exists(oldpki_dir):
# There's not even a pki directory, don't bother migrating
return
newpki_dir = opts['pki_dir']
... | [
"def",
"migrate_paths",
"(",
"opts",
")",
":",
"oldpki_dir",
"=",
"os",
".",
"path",
".",
"join",
"(",
"syspaths",
".",
"CONFIG_DIR",
",",
"'pki'",
")",
"if",
"not",
"os",
".",
"path",
".",
"exists",
"(",
"oldpki_dir",
")",
":",
"# There's not even a pki... | Migrate old minion and master pki file paths to new ones. | [
"Migrate",
"old",
"minion",
"and",
"master",
"pki",
"file",
"paths",
"to",
"new",
"ones",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/migrations.py#L15-L54 | train | Migrate old minion and master pki file paths to new ones. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/zfs.py | _check_retcode | def _check_retcode(cmd):
'''
Simple internal wrapper for cmdmod.retcode
'''
return salt.modules.cmdmod.retcode(cmd, output_loglevel='quiet', ignore_retcode=True) == 0 | python | def _check_retcode(cmd):
'''
Simple internal wrapper for cmdmod.retcode
'''
return salt.modules.cmdmod.retcode(cmd, output_loglevel='quiet', ignore_retcode=True) == 0 | [
"def",
"_check_retcode",
"(",
"cmd",
")",
":",
"return",
"salt",
".",
"modules",
".",
"cmdmod",
".",
"retcode",
"(",
"cmd",
",",
"output_loglevel",
"=",
"'quiet'",
",",
"ignore_retcode",
"=",
"True",
")",
"==",
"0"
] | Simple internal wrapper for cmdmod.retcode | [
"Simple",
"internal",
"wrapper",
"for",
"cmdmod",
".",
"retcode"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/zfs.py#L40-L44 | train | Simple internal wrapper for cmdmod. retcode | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/zfs.py | _exec | def _exec(**kwargs):
'''
Simple internal wrapper for cmdmod.run
'''
if 'ignore_retcode' not in kwargs:
kwargs['ignore_retcode'] = True
if 'output_loglevel' not in kwargs:
kwargs['output_loglevel'] = 'quiet'
return salt.modules.cmdmod.run_all(**kwargs) | python | def _exec(**kwargs):
'''
Simple internal wrapper for cmdmod.run
'''
if 'ignore_retcode' not in kwargs:
kwargs['ignore_retcode'] = True
if 'output_loglevel' not in kwargs:
kwargs['output_loglevel'] = 'quiet'
return salt.modules.cmdmod.run_all(**kwargs) | [
"def",
"_exec",
"(",
"*",
"*",
"kwargs",
")",
":",
"if",
"'ignore_retcode'",
"not",
"in",
"kwargs",
":",
"kwargs",
"[",
"'ignore_retcode'",
"]",
"=",
"True",
"if",
"'output_loglevel'",
"not",
"in",
"kwargs",
":",
"kwargs",
"[",
"'output_loglevel'",
"]",
"=... | Simple internal wrapper for cmdmod.run | [
"Simple",
"internal",
"wrapper",
"for",
"cmdmod",
".",
"run"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/zfs.py#L47-L55 | train | Simple internal wrapper for cmdmod. run_all | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/zfs.py | _property_detect_type | def _property_detect_type(name, values):
'''
Detect the datatype of a property
'''
value_type = 'str'
if values.startswith('on | off'):
value_type = 'bool'
elif values.startswith('yes | no'):
value_type = 'bool_alt'
elif values in ['<size>', '<size> | none']:
value_ty... | python | def _property_detect_type(name, values):
'''
Detect the datatype of a property
'''
value_type = 'str'
if values.startswith('on | off'):
value_type = 'bool'
elif values.startswith('yes | no'):
value_type = 'bool_alt'
elif values in ['<size>', '<size> | none']:
value_ty... | [
"def",
"_property_detect_type",
"(",
"name",
",",
"values",
")",
":",
"value_type",
"=",
"'str'",
"if",
"values",
".",
"startswith",
"(",
"'on | off'",
")",
":",
"value_type",
"=",
"'bool'",
"elif",
"values",
".",
"startswith",
"(",
"'yes | no'",
")",
":",
... | Detect the datatype of a property | [
"Detect",
"the",
"datatype",
"of",
"a",
"property"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/zfs.py#L77-L94 | train | Detect the datatype of a property in the tree structure | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/zfs.py | _property_create_dict | def _property_create_dict(header, data):
'''
Create a property dict
'''
prop = dict(zip(header, _merge_last(data, len(header))))
prop['name'] = _property_normalize_name(prop['property'])
prop['type'] = _property_detect_type(prop['name'], prop['values'])
prop['edit'] = from_bool(prop['edit'])... | python | def _property_create_dict(header, data):
'''
Create a property dict
'''
prop = dict(zip(header, _merge_last(data, len(header))))
prop['name'] = _property_normalize_name(prop['property'])
prop['type'] = _property_detect_type(prop['name'], prop['values'])
prop['edit'] = from_bool(prop['edit'])... | [
"def",
"_property_create_dict",
"(",
"header",
",",
"data",
")",
":",
"prop",
"=",
"dict",
"(",
"zip",
"(",
"header",
",",
"_merge_last",
"(",
"data",
",",
"len",
"(",
"header",
")",
")",
")",
")",
"prop",
"[",
"'name'",
"]",
"=",
"_property_normalize_... | Create a property dict | [
"Create",
"a",
"property",
"dict"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/zfs.py#L97-L108 | train | Create a property dict from header and data. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/zfs.py | _property_parse_cmd | def _property_parse_cmd(cmd, alias=None):
'''
Parse output of zpool/zfs get command
'''
if not alias:
alias = {}
properties = {}
# NOTE: append get to command
if cmd[-3:] != 'get':
cmd += ' get'
# NOTE: parse output
prop_hdr = []
for prop_data in _exec(cmd=cmd)[... | python | def _property_parse_cmd(cmd, alias=None):
'''
Parse output of zpool/zfs get command
'''
if not alias:
alias = {}
properties = {}
# NOTE: append get to command
if cmd[-3:] != 'get':
cmd += ' get'
# NOTE: parse output
prop_hdr = []
for prop_data in _exec(cmd=cmd)[... | [
"def",
"_property_parse_cmd",
"(",
"cmd",
",",
"alias",
"=",
"None",
")",
":",
"if",
"not",
"alias",
":",
"alias",
"=",
"{",
"}",
"properties",
"=",
"{",
"}",
"# NOTE: append get to command",
"if",
"cmd",
"[",
"-",
"3",
":",
"]",
"!=",
"'get'",
":",
... | Parse output of zpool/zfs get command | [
"Parse",
"output",
"of",
"zpool",
"/",
"zfs",
"get",
"command"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/zfs.py#L111-L150 | train | Parse output of zpool / zfs get command and return dict of properties | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/zfs.py | _auto | def _auto(direction, name, value, source='auto', convert_to_human=True):
'''
Internal magic for from_auto and to_auto
'''
# NOTE: check direction
if direction not in ['to', 'from']:
return value
# NOTE: collect property data
props = property_data_zpool()
if source == 'zfs':
... | python | def _auto(direction, name, value, source='auto', convert_to_human=True):
'''
Internal magic for from_auto and to_auto
'''
# NOTE: check direction
if direction not in ['to', 'from']:
return value
# NOTE: collect property data
props = property_data_zpool()
if source == 'zfs':
... | [
"def",
"_auto",
"(",
"direction",
",",
"name",
",",
"value",
",",
"source",
"=",
"'auto'",
",",
"convert_to_human",
"=",
"True",
")",
":",
"# NOTE: check direction",
"if",
"direction",
"not",
"in",
"[",
"'to'",
",",
"'from'",
"]",
":",
"return",
"value",
... | Internal magic for from_auto and to_auto | [
"Internal",
"magic",
"for",
"from_auto",
"and",
"to_auto"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/zfs.py#L153-L175 | train | Internal magic for from_auto and to_auto | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/zfs.py | _command | def _command(source, command, flags=None, opts=None,
property_name=None, property_value=None,
filesystem_properties=None, pool_properties=None,
target=None):
'''
Build and properly escape a zfs command
.. note::
Input is not considered safe and will be passed... | python | def _command(source, command, flags=None, opts=None,
property_name=None, property_value=None,
filesystem_properties=None, pool_properties=None,
target=None):
'''
Build and properly escape a zfs command
.. note::
Input is not considered safe and will be passed... | [
"def",
"_command",
"(",
"source",
",",
"command",
",",
"flags",
"=",
"None",
",",
"opts",
"=",
"None",
",",
"property_name",
"=",
"None",
",",
"property_value",
"=",
"None",
",",
"filesystem_properties",
"=",
"None",
",",
"pool_properties",
"=",
"None",
",... | Build and properly escape a zfs command
.. note::
Input is not considered safe and will be passed through
to_auto(from_auto('input_here')), you do not need to do so
your self first. | [
"Build",
"and",
"properly",
"escape",
"a",
"zfs",
"command"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/zfs.py#L196-L279 | train | Builds and properly escape a zfs command | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/zfs.py | is_supported | def is_supported():
'''
Check the system for ZFS support
'''
# Check for supported platforms
# NOTE: ZFS on Windows is in development
# NOTE: ZFS on NetBSD is in development
on_supported_platform = False
if salt.utils.platform.is_sunos():
on_supported_platform = True
elif sal... | python | def is_supported():
'''
Check the system for ZFS support
'''
# Check for supported platforms
# NOTE: ZFS on Windows is in development
# NOTE: ZFS on NetBSD is in development
on_supported_platform = False
if salt.utils.platform.is_sunos():
on_supported_platform = True
elif sal... | [
"def",
"is_supported",
"(",
")",
":",
"# Check for supported platforms",
"# NOTE: ZFS on Windows is in development",
"# NOTE: ZFS on NetBSD is in development",
"on_supported_platform",
"=",
"False",
"if",
"salt",
".",
"utils",
".",
"platform",
".",
"is_sunos",
"(",
")",
":"... | Check the system for ZFS support | [
"Check",
"the",
"system",
"for",
"ZFS",
"support"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/zfs.py#L282-L304 | train | Check the system for ZFS support
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/zfs.py | has_feature_flags | def has_feature_flags():
'''
Check if zpool-features is available
'''
# get man location
man = salt.utils.path.which('man')
return _check_retcode('{man} zpool-features'.format(
man=man
)) if man else False | python | def has_feature_flags():
'''
Check if zpool-features is available
'''
# get man location
man = salt.utils.path.which('man')
return _check_retcode('{man} zpool-features'.format(
man=man
)) if man else False | [
"def",
"has_feature_flags",
"(",
")",
":",
"# get man location",
"man",
"=",
"salt",
".",
"utils",
".",
"path",
".",
"which",
"(",
"'man'",
")",
"return",
"_check_retcode",
"(",
"'{man} zpool-features'",
".",
"format",
"(",
"man",
"=",
"man",
")",
")",
"if... | Check if zpool-features is available | [
"Check",
"if",
"zpool",
"-",
"features",
"is",
"available"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/zfs.py#L308-L316 | train | Check if zpool - features is available | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/zfs.py | property_data_zpool | def property_data_zpool():
'''
Return a dict of zpool properties
.. note::
Each property will have an entry with the following info:
- edit : boolean - is this property editable after pool creation
- type : str - either bool, bool_alt, size, numeric, or string
-... | python | def property_data_zpool():
'''
Return a dict of zpool properties
.. note::
Each property will have an entry with the following info:
- edit : boolean - is this property editable after pool creation
- type : str - either bool, bool_alt, size, numeric, or string
-... | [
"def",
"property_data_zpool",
"(",
")",
":",
"# NOTE: man page also mentions a few short forms",
"property_data",
"=",
"_property_parse_cmd",
"(",
"_zpool_cmd",
"(",
")",
",",
"{",
"'allocated'",
":",
"'alloc'",
",",
"'autoexpand'",
":",
"'expand'",
",",
"'autoreplace'"... | Return a dict of zpool properties
.. note::
Each property will have an entry with the following info:
- edit : boolean - is this property editable after pool creation
- type : str - either bool, bool_alt, size, numeric, or string
- values : str - list of possible values... | [
"Return",
"a",
"dict",
"of",
"zpool",
"properties"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/zfs.py#L320-L372 | train | Return a dict of zpool properties and values. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/zfs.py | from_bool | def from_bool(value):
'''
Convert zfs bool to python bool
'''
if value in ['on', 'yes']:
value = True
elif value in ['off', 'no']:
value = False
elif value == 'none':
value = None
return value | python | def from_bool(value):
'''
Convert zfs bool to python bool
'''
if value in ['on', 'yes']:
value = True
elif value in ['off', 'no']:
value = False
elif value == 'none':
value = None
return value | [
"def",
"from_bool",
"(",
"value",
")",
":",
"if",
"value",
"in",
"[",
"'on'",
",",
"'yes'",
"]",
":",
"value",
"=",
"True",
"elif",
"value",
"in",
"[",
"'off'",
",",
"'no'",
"]",
":",
"value",
"=",
"False",
"elif",
"value",
"==",
"'none'",
":",
"... | Convert zfs bool to python bool | [
"Convert",
"zfs",
"bool",
"to",
"python",
"bool"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/zfs.py#L430-L441 | train | Convert zfs bool to python bool | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/zfs.py | to_bool | def to_bool(value):
'''
Convert python bool to zfs on/off bool
'''
value = from_bool(value)
if isinstance(value, bool):
value = 'on' if value else 'off'
elif value is None:
value = 'none'
return value | python | def to_bool(value):
'''
Convert python bool to zfs on/off bool
'''
value = from_bool(value)
if isinstance(value, bool):
value = 'on' if value else 'off'
elif value is None:
value = 'none'
return value | [
"def",
"to_bool",
"(",
"value",
")",
":",
"value",
"=",
"from_bool",
"(",
"value",
")",
"if",
"isinstance",
"(",
"value",
",",
"bool",
")",
":",
"value",
"=",
"'on'",
"if",
"value",
"else",
"'off'",
"elif",
"value",
"is",
"None",
":",
"value",
"=",
... | Convert python bool to zfs on/off bool | [
"Convert",
"python",
"bool",
"to",
"zfs",
"on",
"/",
"off",
"bool"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/zfs.py#L451-L461 | train | Convert python bool to zfs on or off bool
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/zfs.py | to_bool_alt | def to_bool_alt(value):
'''
Convert python to zfs yes/no value
'''
value = from_bool_alt(value)
if isinstance(value, bool):
value = 'yes' if value else 'no'
elif value is None:
value = 'none'
return value | python | def to_bool_alt(value):
'''
Convert python to zfs yes/no value
'''
value = from_bool_alt(value)
if isinstance(value, bool):
value = 'yes' if value else 'no'
elif value is None:
value = 'none'
return value | [
"def",
"to_bool_alt",
"(",
"value",
")",
":",
"value",
"=",
"from_bool_alt",
"(",
"value",
")",
"if",
"isinstance",
"(",
"value",
",",
"bool",
")",
":",
"value",
"=",
"'yes'",
"if",
"value",
"else",
"'no'",
"elif",
"value",
"is",
"None",
":",
"value",
... | Convert python to zfs yes/no value | [
"Convert",
"python",
"to",
"zfs",
"yes",
"/",
"no",
"value"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/zfs.py#L464-L474 | train | Convert python to zfs yes or no value | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/zfs.py | from_size | def from_size(value):
'''
Convert zfs size (human readble) to python int (bytes)
'''
match_size = re_zfs_size.match(str(value))
if match_size:
v_unit = match_size.group(2).upper()[0]
v_size = float(match_size.group(1))
v_multiplier = math.pow(1024, zfs_size.index(v_unit) + 1)... | python | def from_size(value):
'''
Convert zfs size (human readble) to python int (bytes)
'''
match_size = re_zfs_size.match(str(value))
if match_size:
v_unit = match_size.group(2).upper()[0]
v_size = float(match_size.group(1))
v_multiplier = math.pow(1024, zfs_size.index(v_unit) + 1)... | [
"def",
"from_size",
"(",
"value",
")",
":",
"match_size",
"=",
"re_zfs_size",
".",
"match",
"(",
"str",
"(",
"value",
")",
")",
"if",
"match_size",
":",
"v_unit",
"=",
"match_size",
".",
"group",
"(",
"2",
")",
".",
"upper",
"(",
")",
"[",
"0",
"]"... | Convert zfs size (human readble) to python int (bytes) | [
"Convert",
"zfs",
"size",
"(",
"human",
"readble",
")",
"to",
"python",
"int",
"(",
"bytes",
")"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/zfs.py#L477-L492 | train | Convert zfs size to python int | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/zfs.py | to_size | def to_size(value, convert_to_human=True):
'''
Convert python int (bytes) to zfs size
NOTE: http://src.illumos.org/source/xref/illumos-gate/usr/src/lib/pyzfs/common/util.py#114
'''
value = from_size(value)
if value is None:
value = 'none'
if isinstance(value, Number) and value > 10... | python | def to_size(value, convert_to_human=True):
'''
Convert python int (bytes) to zfs size
NOTE: http://src.illumos.org/source/xref/illumos-gate/usr/src/lib/pyzfs/common/util.py#114
'''
value = from_size(value)
if value is None:
value = 'none'
if isinstance(value, Number) and value > 10... | [
"def",
"to_size",
"(",
"value",
",",
"convert_to_human",
"=",
"True",
")",
":",
"value",
"=",
"from_size",
"(",
"value",
")",
"if",
"value",
"is",
"None",
":",
"value",
"=",
"'none'",
"if",
"isinstance",
"(",
"value",
",",
"Number",
")",
"and",
"value"... | Convert python int (bytes) to zfs size
NOTE: http://src.illumos.org/source/xref/illumos-gate/usr/src/lib/pyzfs/common/util.py#114 | [
"Convert",
"python",
"int",
"(",
"bytes",
")",
"to",
"zfs",
"size"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/zfs.py#L495-L527 | train | Convert python int to zfs size | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/zfs.py | from_str | def from_str(value):
'''
Decode zfs safe string (used for name, path, ...)
'''
if value == 'none':
value = None
if value:
value = str(value)
if value.startswith('"') and value.endswith('"'):
value = value[1:-1]
value = value.replace('\\"', '"')
return... | python | def from_str(value):
'''
Decode zfs safe string (used for name, path, ...)
'''
if value == 'none':
value = None
if value:
value = str(value)
if value.startswith('"') and value.endswith('"'):
value = value[1:-1]
value = value.replace('\\"', '"')
return... | [
"def",
"from_str",
"(",
"value",
")",
":",
"if",
"value",
"==",
"'none'",
":",
"value",
"=",
"None",
"if",
"value",
":",
"value",
"=",
"str",
"(",
"value",
")",
"if",
"value",
".",
"startswith",
"(",
"'\"'",
")",
"and",
"value",
".",
"endswith",
"(... | Decode zfs safe string (used for name, path, ...) | [
"Decode",
"zfs",
"safe",
"string",
"(",
"used",
"for",
"name",
"path",
"...",
")"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/zfs.py#L530-L542 | train | Decode zfs safe string | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/zfs.py | to_str | def to_str(value):
'''
Encode zfs safe string (used for name, path, ...)
'''
value = from_str(value)
if value:
value = value.replace('"', '\\"')
if ' ' in value:
value = '"' + value + '"'
elif value is None:
value = 'none'
return value | python | def to_str(value):
'''
Encode zfs safe string (used for name, path, ...)
'''
value = from_str(value)
if value:
value = value.replace('"', '\\"')
if ' ' in value:
value = '"' + value + '"'
elif value is None:
value = 'none'
return value | [
"def",
"to_str",
"(",
"value",
")",
":",
"value",
"=",
"from_str",
"(",
"value",
")",
"if",
"value",
":",
"value",
"=",
"value",
".",
"replace",
"(",
"'\"'",
",",
"'\\\\\"'",
")",
"if",
"' '",
"in",
"value",
":",
"value",
"=",
"'\"'",
"+",
"value",... | Encode zfs safe string (used for name, path, ...) | [
"Encode",
"zfs",
"safe",
"string",
"(",
"used",
"for",
"name",
"path",
"...",
")"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/zfs.py#L545-L558 | train | Encode zfs safe string | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/zfs.py | to_auto | def to_auto(name, value, source='auto', convert_to_human=True):
'''
Convert python value to zfs value
'''
return _auto('to', name, value, source, convert_to_human) | python | def to_auto(name, value, source='auto', convert_to_human=True):
'''
Convert python value to zfs value
'''
return _auto('to', name, value, source, convert_to_human) | [
"def",
"to_auto",
"(",
"name",
",",
"value",
",",
"source",
"=",
"'auto'",
",",
"convert_to_human",
"=",
"True",
")",
":",
"return",
"_auto",
"(",
"'to'",
",",
"name",
",",
"value",
",",
"source",
",",
"convert_to_human",
")"
] | Convert python value to zfs value | [
"Convert",
"python",
"value",
"to",
"zfs",
"value"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/zfs.py#L568-L572 | train | Convert python value to zfs value | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/zfs.py | from_auto_dict | def from_auto_dict(values, source='auto'):
'''
Pass an entire dictionary to from_auto
.. note::
The key will be passed as the name
'''
for name, value in values.items():
values[name] = from_auto(name, value, source)
return values | python | def from_auto_dict(values, source='auto'):
'''
Pass an entire dictionary to from_auto
.. note::
The key will be passed as the name
'''
for name, value in values.items():
values[name] = from_auto(name, value, source)
return values | [
"def",
"from_auto_dict",
"(",
"values",
",",
"source",
"=",
"'auto'",
")",
":",
"for",
"name",
",",
"value",
"in",
"values",
".",
"items",
"(",
")",
":",
"values",
"[",
"name",
"]",
"=",
"from_auto",
"(",
"name",
",",
"value",
",",
"source",
")",
"... | Pass an entire dictionary to from_auto
.. note::
The key will be passed as the name | [
"Pass",
"an",
"entire",
"dictionary",
"to",
"from_auto"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/zfs.py#L575-L586 | train | Converts a dictionary of names to the ones that are auto - generated by from_auto. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/zfs.py | to_auto_dict | def to_auto_dict(values, source='auto', convert_to_human=True):
'''
Pass an entire dictionary to to_auto
.. note::
The key will be passed as the name
'''
for name, value in values.items():
values[name] = to_auto(name, value, source, convert_to_human)
return values | python | def to_auto_dict(values, source='auto', convert_to_human=True):
'''
Pass an entire dictionary to to_auto
.. note::
The key will be passed as the name
'''
for name, value in values.items():
values[name] = to_auto(name, value, source, convert_to_human)
return values | [
"def",
"to_auto_dict",
"(",
"values",
",",
"source",
"=",
"'auto'",
",",
"convert_to_human",
"=",
"True",
")",
":",
"for",
"name",
",",
"value",
"in",
"values",
".",
"items",
"(",
")",
":",
"values",
"[",
"name",
"]",
"=",
"to_auto",
"(",
"name",
","... | Pass an entire dictionary to to_auto
.. note::
The key will be passed as the name | [
"Pass",
"an",
"entire",
"dictionary",
"to",
"to_auto"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/zfs.py#L589-L599 | train | Convert a dictionary of names to auto names. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/zfs.py | zpool_command | def zpool_command(command, flags=None, opts=None, property_name=None, property_value=None,
filesystem_properties=None, pool_properties=None, target=None):
'''
Build and properly escape a zpool command
.. note::
Input is not considered safe and will be passed through
to_au... | python | def zpool_command(command, flags=None, opts=None, property_name=None, property_value=None,
filesystem_properties=None, pool_properties=None, target=None):
'''
Build and properly escape a zpool command
.. note::
Input is not considered safe and will be passed through
to_au... | [
"def",
"zpool_command",
"(",
"command",
",",
"flags",
"=",
"None",
",",
"opts",
"=",
"None",
",",
"property_name",
"=",
"None",
",",
"property_value",
"=",
"None",
",",
"filesystem_properties",
"=",
"None",
",",
"pool_properties",
"=",
"None",
",",
"target",... | Build and properly escape a zpool command
.. note::
Input is not considered safe and will be passed through
to_auto(from_auto('input_here')), you do not need to do so
your self first. | [
"Build",
"and",
"properly",
"escape",
"a",
"zpool",
"command"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/zfs.py#L648-L670 | train | Builds and properly escape a zpool command | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/zfs.py | parse_command_result | def parse_command_result(res, label=None):
'''
Parse the result of a zpool/zfs command
.. note::
Output on failure is rather predicatable.
- retcode > 0
- each 'error' is a line on stderr
- optional 'Usage:' block under those with hits
We simple check those and ret... | python | def parse_command_result(res, label=None):
'''
Parse the result of a zpool/zfs command
.. note::
Output on failure is rather predicatable.
- retcode > 0
- each 'error' is a line on stderr
- optional 'Usage:' block under those with hits
We simple check those and ret... | [
"def",
"parse_command_result",
"(",
"res",
",",
"label",
"=",
"None",
")",
":",
"ret",
"=",
"OrderedDict",
"(",
")",
"if",
"label",
":",
"ret",
"[",
"label",
"]",
"=",
"res",
"[",
"'retcode'",
"]",
"==",
"0",
"if",
"res",
"[",
"'retcode'",
"]",
"!=... | Parse the result of a zpool/zfs command
.. note::
Output on failure is rather predicatable.
- retcode > 0
- each 'error' is a line on stderr
- optional 'Usage:' block under those with hits
We simple check those and return a OrderedDict were
we set label = True|Fals... | [
"Parse",
"the",
"result",
"of",
"a",
"zpool",
"/",
"zfs",
"command"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/zfs.py#L673-L709 | train | Parse the output of a zpool command into a dictionary. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/beacons/logs.py | beacon | def beacon(config):
'''
Read the log file and return match whole string
.. code-block:: yaml
beacons:
log:
- file: <path>
- tags:
<tag>:
regex: <pattern>
.. note::
regex matching is based on the `re`_ modul... | python | def beacon(config):
'''
Read the log file and return match whole string
.. code-block:: yaml
beacons:
log:
- file: <path>
- tags:
<tag>:
regex: <pattern>
.. note::
regex matching is based on the `re`_ modul... | [
"def",
"beacon",
"(",
"config",
")",
":",
"_config",
"=",
"{",
"}",
"list",
"(",
"map",
"(",
"_config",
".",
"update",
",",
"config",
")",
")",
"ret",
"=",
"[",
"]",
"if",
"'file'",
"not",
"in",
"_config",
":",
"event",
"=",
"SKEL",
".",
"copy",
... | Read the log file and return match whole string
.. code-block:: yaml
beacons:
log:
- file: <path>
- tags:
<tag>:
regex: <pattern>
.. note::
regex matching is based on the `re`_ module
.. _re: https://docs.pyth... | [
"Read",
"the",
"log",
"file",
"and",
"return",
"match",
"whole",
"string"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/beacons/logs.py#L70-L157 | train | Read the log file and return the string that matches all the beacon events. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/pillar/pepa.py | key_value_to_tree | def key_value_to_tree(data):
'''
Convert key/value to tree
'''
tree = {}
for flatkey, value in six.iteritems(data):
t = tree
keys = flatkey.split(__opts__['pepa_delimiter'])
for i, key in enumerate(keys, 1):
if i == len(keys):
t[key] = value
... | python | def key_value_to_tree(data):
'''
Convert key/value to tree
'''
tree = {}
for flatkey, value in six.iteritems(data):
t = tree
keys = flatkey.split(__opts__['pepa_delimiter'])
for i, key in enumerate(keys, 1):
if i == len(keys):
t[key] = value
... | [
"def",
"key_value_to_tree",
"(",
"data",
")",
":",
"tree",
"=",
"{",
"}",
"for",
"flatkey",
",",
"value",
"in",
"six",
".",
"iteritems",
"(",
"data",
")",
":",
"t",
"=",
"tree",
"keys",
"=",
"flatkey",
".",
"split",
"(",
"__opts__",
"[",
"'pepa_delim... | Convert key/value to tree | [
"Convert",
"key",
"/",
"value",
"to",
"tree"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/pepa.py#L359-L372 | train | Convert key value to tree | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/pillar/pepa.py | ext_pillar | def ext_pillar(minion_id, pillar, resource, sequence, subkey=False, subkey_only=False):
'''
Evaluate Pepa templates
'''
roots = __opts__['pepa_roots']
# Default input
inp = {}
inp['default'] = 'default'
inp['hostname'] = minion_id
if 'environment' in pillar:
inp['environmen... | python | def ext_pillar(minion_id, pillar, resource, sequence, subkey=False, subkey_only=False):
'''
Evaluate Pepa templates
'''
roots = __opts__['pepa_roots']
# Default input
inp = {}
inp['default'] = 'default'
inp['hostname'] = minion_id
if 'environment' in pillar:
inp['environmen... | [
"def",
"ext_pillar",
"(",
"minion_id",
",",
"pillar",
",",
"resource",
",",
"sequence",
",",
"subkey",
"=",
"False",
",",
"subkey_only",
"=",
"False",
")",
":",
"roots",
"=",
"__opts__",
"[",
"'pepa_roots'",
"]",
"# Default input",
"inp",
"=",
"{",
"}",
... | Evaluate Pepa templates | [
"Evaluate",
"Pepa",
"templates"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/pepa.py#L375-L506 | train | Evaluate Pepa templates and return the immutable version of the resource | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/pillar/pepa.py | validate | def validate(output, resource):
'''
Validate Pepa templates
'''
try:
import cerberus # pylint: disable=import-error
except ImportError:
log.critical('You need module cerberus in order to use validation')
return
roots = __opts__['pepa_roots']
valdir = os.path.join(r... | python | def validate(output, resource):
'''
Validate Pepa templates
'''
try:
import cerberus # pylint: disable=import-error
except ImportError:
log.critical('You need module cerberus in order to use validation')
return
roots = __opts__['pepa_roots']
valdir = os.path.join(r... | [
"def",
"validate",
"(",
"output",
",",
"resource",
")",
":",
"try",
":",
"import",
"cerberus",
"# pylint: disable=import-error",
"except",
"ImportError",
":",
"log",
".",
"critical",
"(",
"'You need module cerberus in order to use validation'",
")",
"return",
"roots",
... | Validate Pepa templates | [
"Validate",
"Pepa",
"templates"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/pepa.py#L509-L542 | train | Validate Pepa templates and return the result | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/grains/disks.py | disks | def disks():
'''
Return list of disk devices
'''
if salt.utils.platform.is_freebsd():
return _freebsd_geom()
elif salt.utils.platform.is_linux():
return _linux_disks()
elif salt.utils.platform.is_windows():
return _windows_disks()
else:
log.trace('Disk grain d... | python | def disks():
'''
Return list of disk devices
'''
if salt.utils.platform.is_freebsd():
return _freebsd_geom()
elif salt.utils.platform.is_linux():
return _linux_disks()
elif salt.utils.platform.is_windows():
return _windows_disks()
else:
log.trace('Disk grain d... | [
"def",
"disks",
"(",
")",
":",
"if",
"salt",
".",
"utils",
".",
"platform",
".",
"is_freebsd",
"(",
")",
":",
"return",
"_freebsd_geom",
"(",
")",
"elif",
"salt",
".",
"utils",
".",
"platform",
".",
"is_linux",
"(",
")",
":",
"return",
"_linux_disks",
... | Return list of disk devices | [
"Return",
"list",
"of",
"disk",
"devices"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/grains/disks.py#L29-L40 | train | Return list of disk devices | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/grains/disks.py | _linux_disks | def _linux_disks():
'''
Return list of disk devices and work out if they are SSD or HDD.
'''
ret = {'disks': [], 'SSDs': []}
for entry in glob.glob('/sys/block/*/queue/rotational'):
try:
with salt.utils.files.fopen(entry) as entry_fp:
device = entry.split('/')[3]... | python | def _linux_disks():
'''
Return list of disk devices and work out if they are SSD or HDD.
'''
ret = {'disks': [], 'SSDs': []}
for entry in glob.glob('/sys/block/*/queue/rotational'):
try:
with salt.utils.files.fopen(entry) as entry_fp:
device = entry.split('/')[3]... | [
"def",
"_linux_disks",
"(",
")",
":",
"ret",
"=",
"{",
"'disks'",
":",
"[",
"]",
",",
"'SSDs'",
":",
"[",
"]",
"}",
"for",
"entry",
"in",
"glob",
".",
"glob",
"(",
"'/sys/block/*/queue/rotational'",
")",
":",
"try",
":",
"with",
"salt",
".",
"utils",... | Return list of disk devices and work out if they are SSD or HDD. | [
"Return",
"list",
"of",
"disk",
"devices",
"and",
"work",
"out",
"if",
"they",
"are",
"SSD",
"or",
"HDD",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/grains/disks.py#L128-L152 | train | Return list of disk devices and work out if they are SSD or HDD. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/vbox_guest.py | additions_installed | def additions_installed(name, reboot=False, upgrade_os=False):
'''
Ensure that the VirtualBox Guest Additions are installed. Uses the CD,
connected by VirtualBox.
name
The name has no functional value and is only used as a tracking
reference.
reboot : False
Restart OS to com... | python | def additions_installed(name, reboot=False, upgrade_os=False):
'''
Ensure that the VirtualBox Guest Additions are installed. Uses the CD,
connected by VirtualBox.
name
The name has no functional value and is only used as a tracking
reference.
reboot : False
Restart OS to com... | [
"def",
"additions_installed",
"(",
"name",
",",
"reboot",
"=",
"False",
",",
"upgrade_os",
"=",
"False",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":",
"{",
"}",
",",
"'result'",
":",
"False",
",",
"'comment'",
":",
"''",
"}... | Ensure that the VirtualBox Guest Additions are installed. Uses the CD,
connected by VirtualBox.
name
The name has no functional value and is only used as a tracking
reference.
reboot : False
Restart OS to complete installation.
upgrade_os : False
Upgrade OS (to ensure th... | [
"Ensure",
"that",
"the",
"VirtualBox",
"Guest",
"Additions",
"are",
"installed",
".",
"Uses",
"the",
"CD",
"connected",
"by",
"VirtualBox",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/vbox_guest.py#L13-L52 | train | Ensure that the VirtualBox Guest Additions are installed. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/vbox_guest.py | additions_removed | def additions_removed(name, force=False):
'''
Ensure that the VirtualBox Guest Additions are removed. Uses the CD,
connected by VirtualBox.
To connect VirtualBox Guest Additions via VirtualBox graphical interface
press 'Host+D' ('Host' is usually 'Right Ctrl').
name
The name has no fun... | python | def additions_removed(name, force=False):
'''
Ensure that the VirtualBox Guest Additions are removed. Uses the CD,
connected by VirtualBox.
To connect VirtualBox Guest Additions via VirtualBox graphical interface
press 'Host+D' ('Host' is usually 'Right Ctrl').
name
The name has no fun... | [
"def",
"additions_removed",
"(",
"name",
",",
"force",
"=",
"False",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":",
"{",
"}",
",",
"'result'",
":",
"False",
",",
"'comment'",
":",
"''",
"}",
"current_state",
"=",
"__salt__",
... | Ensure that the VirtualBox Guest Additions are removed. Uses the CD,
connected by VirtualBox.
To connect VirtualBox Guest Additions via VirtualBox graphical interface
press 'Host+D' ('Host' is usually 'Right Ctrl').
name
The name has no functional value and is only used as a tracking
r... | [
"Ensure",
"that",
"the",
"VirtualBox",
"Guest",
"Additions",
"are",
"removed",
".",
"Uses",
"the",
"CD",
"connected",
"by",
"VirtualBox",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/vbox_guest.py#L55-L93 | train | Ensure that the VirtualBox Guest Additions are removed. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/vbox_guest.py | grant_access_to_shared_folders_to | def grant_access_to_shared_folders_to(name, users=None):
'''
Grant access to auto-mounted shared folders to the users.
User is specified by it's name. To grant access for several users use
argument `users`.
name
Name of the user to grant access to auto-mounted shared folders to.
users
... | python | def grant_access_to_shared_folders_to(name, users=None):
'''
Grant access to auto-mounted shared folders to the users.
User is specified by it's name. To grant access for several users use
argument `users`.
name
Name of the user to grant access to auto-mounted shared folders to.
users
... | [
"def",
"grant_access_to_shared_folders_to",
"(",
"name",
",",
"users",
"=",
"None",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":",
"{",
"}",
",",
"'result'",
":",
"False",
",",
"'comment'",
":",
"''",
"}",
"current_state",
"=",
... | Grant access to auto-mounted shared folders to the users.
User is specified by it's name. To grant access for several users use
argument `users`.
name
Name of the user to grant access to auto-mounted shared folders to.
users
List of names of users to grant access to auto-mounted shared... | [
"Grant",
"access",
"to",
"auto",
"-",
"mounted",
"shared",
"folders",
"to",
"the",
"users",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/vbox_guest.py#L96-L137 | train | Grant access to auto - mounts shared folders to the users. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/netapi/__init__.py | NetapiClient._is_master_running | def _is_master_running(self):
'''
Perform a lightweight check to see if the master daemon is running
Note, this will return an invalid success if the master crashed or was
not shut down cleanly.
'''
# Windows doesn't have IPC. Assume the master is running.
# At w... | python | def _is_master_running(self):
'''
Perform a lightweight check to see if the master daemon is running
Note, this will return an invalid success if the master crashed or was
not shut down cleanly.
'''
# Windows doesn't have IPC. Assume the master is running.
# At w... | [
"def",
"_is_master_running",
"(",
"self",
")",
":",
"# Windows doesn't have IPC. Assume the master is running.",
"# At worse, it will error 500.",
"if",
"salt",
".",
"utils",
".",
"platform",
".",
"is_windows",
"(",
")",
":",
"return",
"True",
"if",
"self",
".",
"opts... | Perform a lightweight check to see if the master daemon is running
Note, this will return an invalid success if the master crashed or was
not shut down cleanly. | [
"Perform",
"a",
"lightweight",
"check",
"to",
"see",
"if",
"the",
"master",
"daemon",
"is",
"running"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/netapi/__init__.py#L38-L56 | train | Return True if the master daemon is running. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/netapi/__init__.py | NetapiClient.run | def run(self, low):
'''
Execute the specified function in the specified client by passing the
lowstate
'''
# Eauth currently requires a running daemon and commands run through
# this method require eauth so perform a quick check to raise a
# more meaningful error.... | python | def run(self, low):
'''
Execute the specified function in the specified client by passing the
lowstate
'''
# Eauth currently requires a running daemon and commands run through
# this method require eauth so perform a quick check to raise a
# more meaningful error.... | [
"def",
"run",
"(",
"self",
",",
"low",
")",
":",
"# Eauth currently requires a running daemon and commands run through",
"# this method require eauth so perform a quick check to raise a",
"# more meaningful error.",
"if",
"not",
"self",
".",
"_is_master_running",
"(",
")",
":",
... | Execute the specified function in the specified client by passing the
lowstate | [
"Execute",
"the",
"specified",
"function",
"in",
"the",
"specified",
"client",
"by",
"passing",
"the",
"lowstate"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/netapi/__init__.py#L58-L80 | train | Execute the specified function in the specified client by passing the lowstate
low. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/netapi/__init__.py | NetapiClient.local_async | def local_async(self, *args, **kwargs):
'''
Run :ref:`execution modules <all-salt.modules>` asynchronously
Wraps :py:meth:`salt.client.LocalClient.run_job`.
:return: job ID
'''
local = salt.client.get_local_client(mopts=self.opts)
ret = local.run_job(*args, **kw... | python | def local_async(self, *args, **kwargs):
'''
Run :ref:`execution modules <all-salt.modules>` asynchronously
Wraps :py:meth:`salt.client.LocalClient.run_job`.
:return: job ID
'''
local = salt.client.get_local_client(mopts=self.opts)
ret = local.run_job(*args, **kw... | [
"def",
"local_async",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"local",
"=",
"salt",
".",
"client",
".",
"get_local_client",
"(",
"mopts",
"=",
"self",
".",
"opts",
")",
"ret",
"=",
"local",
".",
"run_job",
"(",
"*",
"args"... | Run :ref:`execution modules <all-salt.modules>` asynchronously
Wraps :py:meth:`salt.client.LocalClient.run_job`.
:return: job ID | [
"Run",
":",
"ref",
":",
"execution",
"modules",
"<all",
"-",
"salt",
".",
"modules",
">",
"asynchronously"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/netapi/__init__.py#L82-L92 | train | Run the job asynchronously | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/netapi/__init__.py | NetapiClient.local | def local(self, *args, **kwargs):
'''
Run :ref:`execution modules <all-salt.modules>` synchronously
See :py:meth:`salt.client.LocalClient.cmd` for all available
parameters.
Sends a command from the master to the targeted minions. This is the
same interface that Salt's o... | python | def local(self, *args, **kwargs):
'''
Run :ref:`execution modules <all-salt.modules>` synchronously
See :py:meth:`salt.client.LocalClient.cmd` for all available
parameters.
Sends a command from the master to the targeted minions. This is the
same interface that Salt's o... | [
"def",
"local",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"local",
"=",
"salt",
".",
"client",
".",
"get_local_client",
"(",
"mopts",
"=",
"self",
".",
"opts",
")",
"return",
"local",
".",
"cmd",
"(",
"*",
"args",
",",
"*"... | Run :ref:`execution modules <all-salt.modules>` synchronously
See :py:meth:`salt.client.LocalClient.cmd` for all available
parameters.
Sends a command from the master to the targeted minions. This is the
same interface that Salt's own CLI uses. Note the ``arg`` and ``kwarg``
pa... | [
"Run",
":",
"ref",
":",
"execution",
"modules",
"<all",
"-",
"salt",
".",
"modules",
">",
"synchronously"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/netapi/__init__.py#L94-L109 | train | Execute a command from the master to all available minions. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/netapi/__init__.py | NetapiClient.local_subset | def local_subset(self, *args, **kwargs):
'''
Run :ref:`execution modules <all-salt.modules>` against subsets of minions
.. versionadded:: 2016.3.0
Wraps :py:meth:`salt.client.LocalClient.cmd_subset`
'''
local = salt.client.get_local_client(mopts=self.opts)
retur... | python | def local_subset(self, *args, **kwargs):
'''
Run :ref:`execution modules <all-salt.modules>` against subsets of minions
.. versionadded:: 2016.3.0
Wraps :py:meth:`salt.client.LocalClient.cmd_subset`
'''
local = salt.client.get_local_client(mopts=self.opts)
retur... | [
"def",
"local_subset",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"local",
"=",
"salt",
".",
"client",
".",
"get_local_client",
"(",
"mopts",
"=",
"self",
".",
"opts",
")",
"return",
"local",
".",
"cmd_subset",
"(",
"*",
"args"... | Run :ref:`execution modules <all-salt.modules>` against subsets of minions
.. versionadded:: 2016.3.0
Wraps :py:meth:`salt.client.LocalClient.cmd_subset` | [
"Run",
":",
"ref",
":",
"execution",
"modules",
"<all",
"-",
"salt",
".",
"modules",
">",
"against",
"subsets",
"of",
"minions"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/netapi/__init__.py#L111-L120 | train | Return a list of the minions that are in the subset of the minions | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/netapi/__init__.py | NetapiClient.local_batch | def local_batch(self, *args, **kwargs):
'''
Run :ref:`execution modules <all-salt.modules>` against batches of minions
.. versionadded:: 0.8.4
Wraps :py:meth:`salt.client.LocalClient.cmd_batch`
:return: Returns the result from the exeuction module for each batch of
... | python | def local_batch(self, *args, **kwargs):
'''
Run :ref:`execution modules <all-salt.modules>` against batches of minions
.. versionadded:: 0.8.4
Wraps :py:meth:`salt.client.LocalClient.cmd_batch`
:return: Returns the result from the exeuction module for each batch of
... | [
"def",
"local_batch",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"local",
"=",
"salt",
".",
"client",
".",
"get_local_client",
"(",
"mopts",
"=",
"self",
".",
"opts",
")",
"return",
"local",
".",
"cmd_batch",
"(",
"*",
"args",
... | Run :ref:`execution modules <all-salt.modules>` against batches of minions
.. versionadded:: 0.8.4
Wraps :py:meth:`salt.client.LocalClient.cmd_batch`
:return: Returns the result from the exeuction module for each batch of
returns | [
"Run",
":",
"ref",
":",
"execution",
"modules",
"<all",
"-",
"salt",
".",
"modules",
">",
"against",
"batches",
"of",
"minions"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/netapi/__init__.py#L122-L134 | train | Run the local exeuction module against batches of minions
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/netapi/__init__.py | NetapiClient.ssh | def ssh(self, *args, **kwargs):
'''
Run salt-ssh commands synchronously
Wraps :py:meth:`salt.client.ssh.client.SSHClient.cmd_sync`.
:return: Returns the result from the salt-ssh command
'''
ssh_client = salt.client.ssh.client.SSHClient(mopts=self.opts,
... | python | def ssh(self, *args, **kwargs):
'''
Run salt-ssh commands synchronously
Wraps :py:meth:`salt.client.ssh.client.SSHClient.cmd_sync`.
:return: Returns the result from the salt-ssh command
'''
ssh_client = salt.client.ssh.client.SSHClient(mopts=self.opts,
... | [
"def",
"ssh",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"ssh_client",
"=",
"salt",
".",
"client",
".",
"ssh",
".",
"client",
".",
"SSHClient",
"(",
"mopts",
"=",
"self",
".",
"opts",
",",
"disable_custom_roster",
"=",
"True",
... | Run salt-ssh commands synchronously
Wraps :py:meth:`salt.client.ssh.client.SSHClient.cmd_sync`.
:return: Returns the result from the salt-ssh command | [
"Run",
"salt",
"-",
"ssh",
"commands",
"synchronously"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/netapi/__init__.py#L136-L146 | train | Run salt - ssh commands synchronously | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/netapi/__init__.py | NetapiClient.runner | def runner(self, fun, timeout=None, full_return=False, **kwargs):
'''
Run `runner modules <all-salt.runners>` synchronously
Wraps :py:meth:`salt.runner.RunnerClient.cmd_sync`.
Note that runner functions must be called using keyword arguments.
Positional arguments are not suppor... | python | def runner(self, fun, timeout=None, full_return=False, **kwargs):
'''
Run `runner modules <all-salt.runners>` synchronously
Wraps :py:meth:`salt.runner.RunnerClient.cmd_sync`.
Note that runner functions must be called using keyword arguments.
Positional arguments are not suppor... | [
"def",
"runner",
"(",
"self",
",",
"fun",
",",
"timeout",
"=",
"None",
",",
"full_return",
"=",
"False",
",",
"*",
"*",
"kwargs",
")",
":",
"kwargs",
"[",
"'fun'",
"]",
"=",
"fun",
"runner",
"=",
"salt",
".",
"runner",
".",
"RunnerClient",
"(",
"se... | Run `runner modules <all-salt.runners>` synchronously
Wraps :py:meth:`salt.runner.RunnerClient.cmd_sync`.
Note that runner functions must be called using keyword arguments.
Positional arguments are not supported.
:return: Returns the result from the runner module | [
"Run",
"runner",
"modules",
"<all",
"-",
"salt",
".",
"runners",
">",
"synchronously"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/netapi/__init__.py#L148-L161 | train | Run the runner modules <all - salt. runners > synchronously | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/netapi/__init__.py | NetapiClient.runner_async | def runner_async(self, fun, **kwargs):
'''
Run `runner modules <all-salt.runners>` asynchronously
Wraps :py:meth:`salt.runner.RunnerClient.cmd_async`.
Note that runner functions must be called using keyword arguments.
Positional arguments are not supported.
:return: ev... | python | def runner_async(self, fun, **kwargs):
'''
Run `runner modules <all-salt.runners>` asynchronously
Wraps :py:meth:`salt.runner.RunnerClient.cmd_async`.
Note that runner functions must be called using keyword arguments.
Positional arguments are not supported.
:return: ev... | [
"def",
"runner_async",
"(",
"self",
",",
"fun",
",",
"*",
"*",
"kwargs",
")",
":",
"kwargs",
"[",
"'fun'",
"]",
"=",
"fun",
"runner",
"=",
"salt",
".",
"runner",
".",
"RunnerClient",
"(",
"self",
".",
"opts",
")",
"return",
"runner",
".",
"cmd_async"... | Run `runner modules <all-salt.runners>` asynchronously
Wraps :py:meth:`salt.runner.RunnerClient.cmd_async`.
Note that runner functions must be called using keyword arguments.
Positional arguments are not supported.
:return: event data and a job ID for the executed function. | [
"Run",
"runner",
"modules",
"<all",
"-",
"salt",
".",
"runners",
">",
"asynchronously"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/netapi/__init__.py#L163-L176 | train | Run all - salt. runners asynchronously | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/netapi/__init__.py | NetapiClient.wheel | def wheel(self, fun, **kwargs):
'''
Run :ref:`wheel modules <all-salt.wheel>` synchronously
Wraps :py:meth:`salt.wheel.WheelClient.master_call`.
Note that wheel functions must be called using keyword arguments.
Positional arguments are not supported.
:return: Returns t... | python | def wheel(self, fun, **kwargs):
'''
Run :ref:`wheel modules <all-salt.wheel>` synchronously
Wraps :py:meth:`salt.wheel.WheelClient.master_call`.
Note that wheel functions must be called using keyword arguments.
Positional arguments are not supported.
:return: Returns t... | [
"def",
"wheel",
"(",
"self",
",",
"fun",
",",
"*",
"*",
"kwargs",
")",
":",
"kwargs",
"[",
"'fun'",
"]",
"=",
"fun",
"wheel",
"=",
"salt",
".",
"wheel",
".",
"WheelClient",
"(",
"self",
".",
"opts",
")",
"return",
"wheel",
".",
"cmd_sync",
"(",
"... | Run :ref:`wheel modules <all-salt.wheel>` synchronously
Wraps :py:meth:`salt.wheel.WheelClient.master_call`.
Note that wheel functions must be called using keyword arguments.
Positional arguments are not supported.
:return: Returns the result from the wheel module | [
"Run",
":",
"ref",
":",
"wheel",
"modules",
"<all",
"-",
"salt",
".",
"wheel",
">",
"synchronously"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/netapi/__init__.py#L178-L191 | train | Run a wheel module synchronously | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/netapi/__init__.py | NetapiClient.wheel_async | def wheel_async(self, fun, **kwargs):
'''
Run :ref:`wheel modules <all-salt.wheel>` asynchronously
Wraps :py:meth:`salt.wheel.WheelClient.master_call`.
Note that wheel functions must be called using keyword arguments.
Positional arguments are not supported.
:return: Re... | python | def wheel_async(self, fun, **kwargs):
'''
Run :ref:`wheel modules <all-salt.wheel>` asynchronously
Wraps :py:meth:`salt.wheel.WheelClient.master_call`.
Note that wheel functions must be called using keyword arguments.
Positional arguments are not supported.
:return: Re... | [
"def",
"wheel_async",
"(",
"self",
",",
"fun",
",",
"*",
"*",
"kwargs",
")",
":",
"kwargs",
"[",
"'fun'",
"]",
"=",
"fun",
"wheel",
"=",
"salt",
".",
"wheel",
".",
"WheelClient",
"(",
"self",
".",
"opts",
")",
"return",
"wheel",
".",
"cmd_async",
"... | Run :ref:`wheel modules <all-salt.wheel>` asynchronously
Wraps :py:meth:`salt.wheel.WheelClient.master_call`.
Note that wheel functions must be called using keyword arguments.
Positional arguments are not supported.
:return: Returns the result from the wheel module | [
"Run",
":",
"ref",
":",
"wheel",
"modules",
"<all",
"-",
"salt",
".",
"wheel",
">",
"asynchronously"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/netapi/__init__.py#L193-L206 | train | Run a wheel function asynchronously | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/json.py | find_json | def find_json(raw):
'''
Pass in a raw string and load the json when it starts. This allows for a
string to start with garbage and end with json but be cleanly loaded
'''
ret = {}
lines = __split(raw)
for ind, _ in enumerate(lines):
try:
working = '\n'.join(lines[ind:])
... | python | def find_json(raw):
'''
Pass in a raw string and load the json when it starts. This allows for a
string to start with garbage and end with json but be cleanly loaded
'''
ret = {}
lines = __split(raw)
for ind, _ in enumerate(lines):
try:
working = '\n'.join(lines[ind:])
... | [
"def",
"find_json",
"(",
"raw",
")",
":",
"ret",
"=",
"{",
"}",
"lines",
"=",
"__split",
"(",
"raw",
")",
"for",
"ind",
",",
"_",
"in",
"enumerate",
"(",
"lines",
")",
":",
"try",
":",
"working",
"=",
"'\\n'",
".",
"join",
"(",
"lines",
"[",
"i... | Pass in a raw string and load the json when it starts. This allows for a
string to start with garbage and end with json but be cleanly loaded | [
"Pass",
"in",
"a",
"raw",
"string",
"and",
"load",
"the",
"json",
"when",
"it",
"starts",
".",
"This",
"allows",
"for",
"a",
"string",
"to",
"start",
"with",
"garbage",
"and",
"end",
"with",
"json",
"but",
"be",
"cleanly",
"loaded"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/json.py#L32-L53 | train | Find the json from a raw string and load the json when it starts | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/json.py | import_json | def import_json():
'''
Import a json module, starting with the quick ones and going down the list)
'''
for fast_json in ('ujson', 'yajl', 'json'):
try:
mod = __import__(fast_json)
log.trace('loaded %s json lib', fast_json)
return mod
except ImportError... | python | def import_json():
'''
Import a json module, starting with the quick ones and going down the list)
'''
for fast_json in ('ujson', 'yajl', 'json'):
try:
mod = __import__(fast_json)
log.trace('loaded %s json lib', fast_json)
return mod
except ImportError... | [
"def",
"import_json",
"(",
")",
":",
"for",
"fast_json",
"in",
"(",
"'ujson'",
",",
"'yajl'",
",",
"'json'",
")",
":",
"try",
":",
"mod",
"=",
"__import__",
"(",
"fast_json",
")",
"log",
".",
"trace",
"(",
"'loaded %s json lib'",
",",
"fast_json",
")",
... | Import a json module, starting with the quick ones and going down the list) | [
"Import",
"a",
"json",
"module",
"starting",
"with",
"the",
"quick",
"ones",
"and",
"going",
"down",
"the",
"list",
")"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/json.py#L56-L66 | train | Import a json module starting with the quick ones and going down the list | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/json.py | loads | def loads(s, **kwargs):
'''
.. versionadded:: 2018.3.0
Wraps json.loads and prevents a traceback in the event that a bytestring is
passed to the function. (Python < 3.6 cannot load bytestrings)
You can pass an alternate json module (loaded via import_json() above)
using the _json_module argume... | python | def loads(s, **kwargs):
'''
.. versionadded:: 2018.3.0
Wraps json.loads and prevents a traceback in the event that a bytestring is
passed to the function. (Python < 3.6 cannot load bytestrings)
You can pass an alternate json module (loaded via import_json() above)
using the _json_module argume... | [
"def",
"loads",
"(",
"s",
",",
"*",
"*",
"kwargs",
")",
":",
"json_module",
"=",
"kwargs",
".",
"pop",
"(",
"'_json_module'",
",",
"json",
")",
"try",
":",
"return",
"json_module",
".",
"loads",
"(",
"s",
",",
"*",
"*",
"kwargs",
")",
"except",
"Ty... | .. versionadded:: 2018.3.0
Wraps json.loads and prevents a traceback in the event that a bytestring is
passed to the function. (Python < 3.6 cannot load bytestrings)
You can pass an alternate json module (loaded via import_json() above)
using the _json_module argument) | [
"..",
"versionadded",
"::",
"2018",
".",
"3",
".",
"0"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/json.py#L81-L99 | train | Returns a new object from a byte string or a json module. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/json.py | dump | def dump(obj, fp, **kwargs):
'''
.. versionadded:: 2018.3.0
Wraps json.dump, and assumes that ensure_ascii is False (unless explicitly
passed as True) for unicode compatibility. Note that setting it to True
will mess up any unicode characters, as they will be dumped as the string
literal versio... | python | def dump(obj, fp, **kwargs):
'''
.. versionadded:: 2018.3.0
Wraps json.dump, and assumes that ensure_ascii is False (unless explicitly
passed as True) for unicode compatibility. Note that setting it to True
will mess up any unicode characters, as they will be dumped as the string
literal versio... | [
"def",
"dump",
"(",
"obj",
",",
"fp",
",",
"*",
"*",
"kwargs",
")",
":",
"json_module",
"=",
"kwargs",
".",
"pop",
"(",
"'_json_module'",
",",
"json",
")",
"orig_enc_func",
"=",
"kwargs",
".",
"pop",
"(",
"'default'",
",",
"lambda",
"x",
":",
"x",
... | .. versionadded:: 2018.3.0
Wraps json.dump, and assumes that ensure_ascii is False (unless explicitly
passed as True) for unicode compatibility. Note that setting it to True
will mess up any unicode characters, as they will be dumped as the string
literal version of the unicode code point.
On Pyth... | [
"..",
"versionadded",
"::",
"2018",
".",
"3",
".",
"0"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/json.py#L102-L128 | train | Dump the object to a file - like object. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/grains/mdata.py | _user_mdata | def _user_mdata(mdata_list=None, mdata_get=None):
'''
User Metadata
'''
grains = {}
if not mdata_list:
mdata_list = salt.utils.path.which('mdata-list')
if not mdata_get:
mdata_get = salt.utils.path.which('mdata-get')
if not mdata_list or not mdata_get:
return grain... | python | def _user_mdata(mdata_list=None, mdata_get=None):
'''
User Metadata
'''
grains = {}
if not mdata_list:
mdata_list = salt.utils.path.which('mdata-list')
if not mdata_get:
mdata_get = salt.utils.path.which('mdata-get')
if not mdata_list or not mdata_get:
return grain... | [
"def",
"_user_mdata",
"(",
"mdata_list",
"=",
"None",
",",
"mdata_get",
"=",
"None",
")",
":",
"grains",
"=",
"{",
"}",
"if",
"not",
"mdata_list",
":",
"mdata_list",
"=",
"salt",
".",
"utils",
".",
"path",
".",
"which",
"(",
"'mdata-list'",
")",
"if",
... | User Metadata | [
"User",
"Metadata"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/grains/mdata.py#L50-L77 | train | Return the user s metadata | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/grains/mdata.py | _sdc_mdata | def _sdc_mdata(mdata_list=None, mdata_get=None):
'''
SDC Metadata specified by there specs
https://eng.joyent.com/mdata/datadict.html
'''
grains = {}
sdc_text_keys = [
'uuid',
'server_uuid',
'datacenter_name',
'hostname',
'dns_domain',
]
sdc_json_k... | python | def _sdc_mdata(mdata_list=None, mdata_get=None):
'''
SDC Metadata specified by there specs
https://eng.joyent.com/mdata/datadict.html
'''
grains = {}
sdc_text_keys = [
'uuid',
'server_uuid',
'datacenter_name',
'hostname',
'dns_domain',
]
sdc_json_k... | [
"def",
"_sdc_mdata",
"(",
"mdata_list",
"=",
"None",
",",
"mdata_get",
"=",
"None",
")",
":",
"grains",
"=",
"{",
"}",
"sdc_text_keys",
"=",
"[",
"'uuid'",
",",
"'server_uuid'",
",",
"'datacenter_name'",
",",
"'hostname'",
",",
"'dns_domain'",
",",
"]",
"s... | SDC Metadata specified by there specs
https://eng.joyent.com/mdata/datadict.html | [
"SDC",
"Metadata",
"specified",
"by",
"there",
"specs",
"https",
":",
"//",
"eng",
".",
"joyent",
".",
"com",
"/",
"mdata",
"/",
"datadict",
".",
"html"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/grains/mdata.py#L80-L125 | train | Return the SDC Metadata for the current process | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/grains/mdata.py | _legacy_grains | def _legacy_grains(grains):
'''
Grains for backwards compatibility
Remove this function in Neon
'''
# parse legacy sdc grains
if 'mdata' in grains and 'sdc' in grains['mdata']:
if 'server_uuid' not in grains['mdata']['sdc'] or 'FAILURE' in grains['mdata']['sdc']['server_uuid']:
... | python | def _legacy_grains(grains):
'''
Grains for backwards compatibility
Remove this function in Neon
'''
# parse legacy sdc grains
if 'mdata' in grains and 'sdc' in grains['mdata']:
if 'server_uuid' not in grains['mdata']['sdc'] or 'FAILURE' in grains['mdata']['sdc']['server_uuid']:
... | [
"def",
"_legacy_grains",
"(",
"grains",
")",
":",
"# parse legacy sdc grains",
"if",
"'mdata'",
"in",
"grains",
"and",
"'sdc'",
"in",
"grains",
"[",
"'mdata'",
"]",
":",
"if",
"'server_uuid'",
"not",
"in",
"grains",
"[",
"'mdata'",
"]",
"[",
"'sdc'",
"]",
... | Grains for backwards compatibility
Remove this function in Neon | [
"Grains",
"for",
"backwards",
"compatibility",
"Remove",
"this",
"function",
"in",
"Neon"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/grains/mdata.py#L128-L149 | train | Parse legacy grains | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/grains/mdata.py | mdata | def mdata():
'''
Provide grains from the SmartOS metadata
'''
grains = {}
mdata_list = salt.utils.path.which('mdata-list')
mdata_get = salt.utils.path.which('mdata-get')
grains = salt.utils.dictupdate.update(grains, _user_mdata(mdata_list, mdata_get), merge_lists=True)
grains = salt.uti... | python | def mdata():
'''
Provide grains from the SmartOS metadata
'''
grains = {}
mdata_list = salt.utils.path.which('mdata-list')
mdata_get = salt.utils.path.which('mdata-get')
grains = salt.utils.dictupdate.update(grains, _user_mdata(mdata_list, mdata_get), merge_lists=True)
grains = salt.uti... | [
"def",
"mdata",
"(",
")",
":",
"grains",
"=",
"{",
"}",
"mdata_list",
"=",
"salt",
".",
"utils",
".",
"path",
".",
"which",
"(",
"'mdata-list'",
")",
"mdata_get",
"=",
"salt",
".",
"utils",
".",
"path",
".",
"which",
"(",
"'mdata-get'",
")",
"grains"... | Provide grains from the SmartOS metadata | [
"Provide",
"grains",
"from",
"the",
"SmartOS",
"metadata"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/grains/mdata.py#L152-L165 | train | Provide grains from the SmartOS metadata
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/utils/xdg.py | xdg_config_dir | def xdg_config_dir():
'''
Check xdg locations for config files
'''
xdg_config = os.getenv('XDG_CONFIG_HOME', os.path.expanduser('~/.config'))
xdg_config_directory = os.path.join(xdg_config, 'salt')
return xdg_config_directory | python | def xdg_config_dir():
'''
Check xdg locations for config files
'''
xdg_config = os.getenv('XDG_CONFIG_HOME', os.path.expanduser('~/.config'))
xdg_config_directory = os.path.join(xdg_config, 'salt')
return xdg_config_directory | [
"def",
"xdg_config_dir",
"(",
")",
":",
"xdg_config",
"=",
"os",
".",
"getenv",
"(",
"'XDG_CONFIG_HOME'",
",",
"os",
".",
"path",
".",
"expanduser",
"(",
"'~/.config'",
")",
")",
"xdg_config_directory",
"=",
"os",
".",
"path",
".",
"join",
"(",
"xdg_config... | Check xdg locations for config files | [
"Check",
"xdg",
"locations",
"for",
"config",
"files"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/xdg.py#L9-L15 | train | Check xdg locations for config files
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/boto3_sns.py | topic_present | def topic_present(name, subscriptions=None, attributes=None,
region=None, key=None, keyid=None, profile=None):
'''
Ensure the SNS topic exists.
name
Name of the SNS topic.
subscriptions
List of SNS subscriptions.
Each subscription is a dictionary with a proto... | python | def topic_present(name, subscriptions=None, attributes=None,
region=None, key=None, keyid=None, profile=None):
'''
Ensure the SNS topic exists.
name
Name of the SNS topic.
subscriptions
List of SNS subscriptions.
Each subscription is a dictionary with a proto... | [
"def",
"topic_present",
"(",
"name",
",",
"subscriptions",
"=",
"None",
",",
"attributes",
"=",
"None",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"ret",
"=",
"{",
"'name'",
... | Ensure the SNS topic exists.
name
Name of the SNS topic.
subscriptions
List of SNS subscriptions.
Each subscription is a dictionary with a protocol and endpoint key:
.. code-block:: yaml
subscriptions:
- Protocol: https
Endpoint: https:/... | [
"Ensure",
"the",
"SNS",
"topic",
"exists",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto3_sns.py#L75-L237 | train | Ensure the SNS topic exists and is up - to - date. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/boto3_sns.py | topic_absent | def topic_absent(name, unsubscribe=False, region=None, key=None, keyid=None, profile=None):
'''
Ensure the named sns topic is deleted.
name
Name of the SNS topic.
unsubscribe
If True, unsubscribe all subcriptions to the SNS topic before
deleting the SNS topic
region
... | python | def topic_absent(name, unsubscribe=False, region=None, key=None, keyid=None, profile=None):
'''
Ensure the named sns topic is deleted.
name
Name of the SNS topic.
unsubscribe
If True, unsubscribe all subcriptions to the SNS topic before
deleting the SNS topic
region
... | [
"def",
"topic_absent",
"(",
"name",
",",
"unsubscribe",
"=",
"False",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'result'",
":... | Ensure the named sns topic is deleted.
name
Name of the SNS topic.
unsubscribe
If True, unsubscribe all subcriptions to the SNS topic before
deleting the SNS topic
region
Region to connect to.
key
Secret key to be used.
keyid
Access key to be used... | [
"Ensure",
"the",
"named",
"sns",
"topic",
"is",
"deleted",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto3_sns.py#L314-L386 | train | Ensure the named SNS topic is absent. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/netapi/rest_tornado/__init__.py | start | def start():
'''
Start the saltnado!
'''
mod_opts = __opts__.get(__virtualname__, {})
if 'num_processes' not in mod_opts:
mod_opts['num_processes'] = 1
if mod_opts['num_processes'] > 1 and mod_opts.get('debug', False) is True:
raise Exception((
'Tornado\'s debug imp... | python | def start():
'''
Start the saltnado!
'''
mod_opts = __opts__.get(__virtualname__, {})
if 'num_processes' not in mod_opts:
mod_opts['num_processes'] = 1
if mod_opts['num_processes'] > 1 and mod_opts.get('debug', False) is True:
raise Exception((
'Tornado\'s debug imp... | [
"def",
"start",
"(",
")",
":",
"mod_opts",
"=",
"__opts__",
".",
"get",
"(",
"__virtualname__",
",",
"{",
"}",
")",
"if",
"'num_processes'",
"not",
"in",
"mod_opts",
":",
"mod_opts",
"[",
"'num_processes'",
"]",
"=",
"1",
"if",
"mod_opts",
"[",
"'num_pro... | Start the saltnado! | [
"Start",
"the",
"saltnado!"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/netapi/rest_tornado/__init__.py#L87-L133 | train | Start the saltnado!
countryCode | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/file.py | _check_user | def _check_user(user, group):
'''
Checks if the named user and group are present on the minion
'''
err = ''
if user:
uid = __salt__['file.user_to_uid'](user)
if uid == '':
err += 'User {0} is not available '.format(user)
if group:
gid = __salt__['file.group_to... | python | def _check_user(user, group):
'''
Checks if the named user and group are present on the minion
'''
err = ''
if user:
uid = __salt__['file.user_to_uid'](user)
if uid == '':
err += 'User {0} is not available '.format(user)
if group:
gid = __salt__['file.group_to... | [
"def",
"_check_user",
"(",
"user",
",",
"group",
")",
":",
"err",
"=",
"''",
"if",
"user",
":",
"uid",
"=",
"__salt__",
"[",
"'file.user_to_uid'",
"]",
"(",
"user",
")",
"if",
"uid",
"==",
"''",
":",
"err",
"+=",
"'User {0} is not available '",
".",
"f... | Checks if the named user and group are present on the minion | [
"Checks",
"if",
"the",
"named",
"user",
"and",
"group",
"are",
"present",
"on",
"the",
"minion"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/file.py#L380-L393 | train | Checks if the named user and group are present on the minion
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/file.py | _is_valid_relpath | def _is_valid_relpath(
relpath,
maxdepth=None):
'''
Performs basic sanity checks on a relative path.
Requires POSIX-compatible paths (i.e. the kind obtained through
cp.list_master or other such calls).
Ensures that the path does not contain directory transversal, and
that it do... | python | def _is_valid_relpath(
relpath,
maxdepth=None):
'''
Performs basic sanity checks on a relative path.
Requires POSIX-compatible paths (i.e. the kind obtained through
cp.list_master or other such calls).
Ensures that the path does not contain directory transversal, and
that it do... | [
"def",
"_is_valid_relpath",
"(",
"relpath",
",",
"maxdepth",
"=",
"None",
")",
":",
"# Check relpath surrounded by slashes, so that `..` can be caught as",
"# a path component at the start, end, and in the middle of the path.",
"sep",
",",
"pardir",
"=",
"posixpath",
".",
"sep",
... | Performs basic sanity checks on a relative path.
Requires POSIX-compatible paths (i.e. the kind obtained through
cp.list_master or other such calls).
Ensures that the path does not contain directory transversal, and
that it does not exceed a stated maximum depth (if specified). | [
"Performs",
"basic",
"sanity",
"checks",
"on",
"a",
"relative",
"path",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/file.py#L396-L420 | train | Checks that a relative path is valid. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/file.py | _salt_to_os_path | def _salt_to_os_path(path):
'''
Converts a path from the form received via salt master to the OS's native
path format.
'''
return os.path.normpath(path.replace(posixpath.sep, os.path.sep)) | python | def _salt_to_os_path(path):
'''
Converts a path from the form received via salt master to the OS's native
path format.
'''
return os.path.normpath(path.replace(posixpath.sep, os.path.sep)) | [
"def",
"_salt_to_os_path",
"(",
"path",
")",
":",
"return",
"os",
".",
"path",
".",
"normpath",
"(",
"path",
".",
"replace",
"(",
"posixpath",
".",
"sep",
",",
"os",
".",
"path",
".",
"sep",
")",
")"
] | Converts a path from the form received via salt master to the OS's native
path format. | [
"Converts",
"a",
"path",
"from",
"the",
"form",
"received",
"via",
"salt",
"master",
"to",
"the",
"OS",
"s",
"native",
"path",
"format",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/file.py#L423-L428 | train | Converts a path from the form received via salt master to the OS s native
path format. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/file.py | _gen_recurse_managed_files | def _gen_recurse_managed_files(
name,
source,
keep_symlinks=False,
include_pat=None,
exclude_pat=None,
maxdepth=None,
include_empty=False,
**kwargs):
'''
Generate the list of files managed by a recurse state
'''
# Convert a relative path g... | python | def _gen_recurse_managed_files(
name,
source,
keep_symlinks=False,
include_pat=None,
exclude_pat=None,
maxdepth=None,
include_empty=False,
**kwargs):
'''
Generate the list of files managed by a recurse state
'''
# Convert a relative path g... | [
"def",
"_gen_recurse_managed_files",
"(",
"name",
",",
"source",
",",
"keep_symlinks",
"=",
"False",
",",
"include_pat",
"=",
"None",
",",
"exclude_pat",
"=",
"None",
",",
"maxdepth",
"=",
"None",
",",
"include_empty",
"=",
"False",
",",
"*",
"*",
"kwargs",
... | Generate the list of files managed by a recurse state | [
"Generate",
"the",
"list",
"of",
"files",
"managed",
"by",
"a",
"recurse",
"state"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/file.py#L431-L556 | train | Generate the list of files managed by a recurse state. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/file.py | _gen_keep_files | def _gen_keep_files(name, require, walk_d=None):
'''
Generate the list of files that need to be kept when a dir based function
like directory or recurse has a clean.
'''
def _is_child(path, directory):
'''
Check whether ``path`` is child of ``directory``
'''
path = os... | python | def _gen_keep_files(name, require, walk_d=None):
'''
Generate the list of files that need to be kept when a dir based function
like directory or recurse has a clean.
'''
def _is_child(path, directory):
'''
Check whether ``path`` is child of ``directory``
'''
path = os... | [
"def",
"_gen_keep_files",
"(",
"name",
",",
"require",
",",
"walk_d",
"=",
"None",
")",
":",
"def",
"_is_child",
"(",
"path",
",",
"directory",
")",
":",
"'''\n Check whether ``path`` is child of ``directory``\n '''",
"path",
"=",
"os",
".",
"path",
... | Generate the list of files that need to be kept when a dir based function
like directory or recurse has a clean. | [
"Generate",
"the",
"list",
"of",
"files",
"that",
"need",
"to",
"be",
"kept",
"when",
"a",
"dir",
"based",
"function",
"like",
"directory",
"or",
"recurse",
"has",
"a",
"clean",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/file.py#L559-L631 | train | Generate the list of files that need to be kept when a dir based function
like directory or recurse has a clean. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/file.py | _find_keep_files | def _find_keep_files(root, keep):
'''
Compile a list of valid keep files (and directories).
Used by _clean_dir()
'''
real_keep = set()
real_keep.add(root)
if isinstance(keep, list):
for fn_ in keep:
if not os.path.isabs(fn_):
continue
fn_ = os.... | python | def _find_keep_files(root, keep):
'''
Compile a list of valid keep files (and directories).
Used by _clean_dir()
'''
real_keep = set()
real_keep.add(root)
if isinstance(keep, list):
for fn_ in keep:
if not os.path.isabs(fn_):
continue
fn_ = os.... | [
"def",
"_find_keep_files",
"(",
"root",
",",
"keep",
")",
":",
"real_keep",
"=",
"set",
"(",
")",
"real_keep",
".",
"add",
"(",
"root",
")",
"if",
"isinstance",
"(",
"keep",
",",
"list",
")",
":",
"for",
"fn_",
"in",
"keep",
":",
"if",
"not",
"os",... | Compile a list of valid keep files (and directories).
Used by _clean_dir() | [
"Compile",
"a",
"list",
"of",
"valid",
"keep",
"files",
"(",
"and",
"directories",
")",
".",
"Used",
"by",
"_clean_dir",
"()"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/file.py#L648-L667 | train | Compile a list of valid keep files and directories. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/file.py | _clean_dir | def _clean_dir(root, keep, exclude_pat):
'''
Clean out all of the files and directories in a directory (root) while
preserving the files in a list (keep) and part of exclude_pat
'''
root = os.path.normcase(root)
real_keep = _find_keep_files(root, keep)
removed = set()
def _delete_not_ke... | python | def _clean_dir(root, keep, exclude_pat):
'''
Clean out all of the files and directories in a directory (root) while
preserving the files in a list (keep) and part of exclude_pat
'''
root = os.path.normcase(root)
real_keep = _find_keep_files(root, keep)
removed = set()
def _delete_not_ke... | [
"def",
"_clean_dir",
"(",
"root",
",",
"keep",
",",
"exclude_pat",
")",
":",
"root",
"=",
"os",
".",
"path",
".",
"normcase",
"(",
"root",
")",
"real_keep",
"=",
"_find_keep_files",
"(",
"root",
",",
"keep",
")",
"removed",
"=",
"set",
"(",
")",
"def... | Clean out all of the files and directories in a directory (root) while
preserving the files in a list (keep) and part of exclude_pat | [
"Clean",
"out",
"all",
"of",
"the",
"files",
"and",
"directories",
"in",
"a",
"directory",
"(",
"root",
")",
"while",
"preserving",
"the",
"files",
"in",
"a",
"list",
"(",
"keep",
")",
"and",
"part",
"of",
"exclude_pat"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/file.py#L670-L696 | train | Clean out all of the files and directories in a directory and preserving the files in a list of keep and part of exclude_pat. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/file.py | _check_directory | def _check_directory(name,
user=None,
group=None,
recurse=False,
mode=None,
file_mode=None,
clean=False,
require=False,
exclude_pat=None,
... | python | def _check_directory(name,
user=None,
group=None,
recurse=False,
mode=None,
file_mode=None,
clean=False,
require=False,
exclude_pat=None,
... | [
"def",
"_check_directory",
"(",
"name",
",",
"user",
"=",
"None",
",",
"group",
"=",
"None",
",",
"recurse",
"=",
"False",
",",
"mode",
"=",
"None",
",",
"file_mode",
"=",
"None",
",",
"clean",
"=",
"False",
",",
"require",
"=",
"False",
",",
"exclud... | Check what changes need to be made on a directory | [
"Check",
"what",
"changes",
"need",
"to",
"be",
"made",
"on",
"a",
"directory"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/file.py#L705-L803 | train | Check what changes need to be made on a directory | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/file.py | _check_directory_win | def _check_directory_win(name,
win_owner=None,
win_perms=None,
win_deny_perms=None,
win_inheritance=None,
win_perms_reset=None):
'''
Check what changes need to be made on a directory
... | python | def _check_directory_win(name,
win_owner=None,
win_perms=None,
win_deny_perms=None,
win_inheritance=None,
win_perms_reset=None):
'''
Check what changes need to be made on a directory
... | [
"def",
"_check_directory_win",
"(",
"name",
",",
"win_owner",
"=",
"None",
",",
"win_perms",
"=",
"None",
",",
"win_deny_perms",
"=",
"None",
",",
"win_inheritance",
"=",
"None",
",",
"win_perms_reset",
"=",
"None",
")",
":",
"changes",
"=",
"{",
"}",
"if"... | Check what changes need to be made on a directory | [
"Check",
"what",
"changes",
"need",
"to",
"be",
"made",
"on",
"a",
"directory"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/file.py#L806-L949 | train | Check what changes need to be made on a directory win_owner win_perms win_deny_perms win_inheritance win_perms_reset | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/file.py | _check_dir_meta | def _check_dir_meta(name,
user,
group,
mode,
follow_symlinks=False):
'''
Check the changes in directory metadata
'''
try:
stats = __salt__['file.stats'](name, None, follow_symlinks)
except CommandExecutionError:
... | python | def _check_dir_meta(name,
user,
group,
mode,
follow_symlinks=False):
'''
Check the changes in directory metadata
'''
try:
stats = __salt__['file.stats'](name, None, follow_symlinks)
except CommandExecutionError:
... | [
"def",
"_check_dir_meta",
"(",
"name",
",",
"user",
",",
"group",
",",
"mode",
",",
"follow_symlinks",
"=",
"False",
")",
":",
"try",
":",
"stats",
"=",
"__salt__",
"[",
"'file.stats'",
"]",
"(",
"name",
",",
"None",
",",
"follow_symlinks",
")",
"except"... | Check the changes in directory metadata | [
"Check",
"the",
"changes",
"in",
"directory",
"metadata"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/file.py#L952-L982 | train | Check the changes in the directory metadata | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/file.py | _check_touch | def _check_touch(name, atime, mtime):
'''
Check to see if a file needs to be updated or created
'''
ret = {
'result': None,
'comment': '',
'changes': {'new': name},
}
if not os.path.exists(name):
ret['comment'] = 'File {0} is set to be created'.format(name)
el... | python | def _check_touch(name, atime, mtime):
'''
Check to see if a file needs to be updated or created
'''
ret = {
'result': None,
'comment': '',
'changes': {'new': name},
}
if not os.path.exists(name):
ret['comment'] = 'File {0} is set to be created'.format(name)
el... | [
"def",
"_check_touch",
"(",
"name",
",",
"atime",
",",
"mtime",
")",
":",
"ret",
"=",
"{",
"'result'",
":",
"None",
",",
"'comment'",
":",
"''",
",",
"'changes'",
":",
"{",
"'new'",
":",
"name",
"}",
",",
"}",
"if",
"not",
"os",
".",
"path",
".",... | Check to see if a file needs to be updated or created | [
"Check",
"to",
"see",
"if",
"a",
"file",
"needs",
"to",
"be",
"updated",
"or",
"created"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/file.py#L985-L1007 | train | Check to see if a file needs to be updated or created. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/file.py | _check_symlink_ownership | def _check_symlink_ownership(path, user, group, win_owner):
'''
Check if the symlink ownership matches the specified user and group
'''
cur_user, cur_group = _get_symlink_ownership(path)
if salt.utils.platform.is_windows():
return win_owner == cur_user
else:
return (cur_user == u... | python | def _check_symlink_ownership(path, user, group, win_owner):
'''
Check if the symlink ownership matches the specified user and group
'''
cur_user, cur_group = _get_symlink_ownership(path)
if salt.utils.platform.is_windows():
return win_owner == cur_user
else:
return (cur_user == u... | [
"def",
"_check_symlink_ownership",
"(",
"path",
",",
"user",
",",
"group",
",",
"win_owner",
")",
":",
"cur_user",
",",
"cur_group",
"=",
"_get_symlink_ownership",
"(",
"path",
")",
"if",
"salt",
".",
"utils",
".",
"platform",
".",
"is_windows",
"(",
")",
... | Check if the symlink ownership matches the specified user and group | [
"Check",
"if",
"the",
"symlink",
"ownership",
"matches",
"the",
"specified",
"user",
"and",
"group"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/file.py#L1021-L1029 | train | Check if the symlink ownership matches the specified user and group | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/file.py | _symlink_check | def _symlink_check(name, target, force, user, group, win_owner):
'''
Check the symlink function
'''
changes = {}
if not os.path.exists(name) and not __salt__['file.is_link'](name):
changes['new'] = name
return None, 'Symlink {0} to {1} is set for creation'.format(
name, t... | python | def _symlink_check(name, target, force, user, group, win_owner):
'''
Check the symlink function
'''
changes = {}
if not os.path.exists(name) and not __salt__['file.is_link'](name):
changes['new'] = name
return None, 'Symlink {0} to {1} is set for creation'.format(
name, t... | [
"def",
"_symlink_check",
"(",
"name",
",",
"target",
",",
"force",
",",
"user",
",",
"group",
",",
"win_owner",
")",
":",
"changes",
"=",
"{",
"}",
"if",
"not",
"os",
".",
"path",
".",
"exists",
"(",
"name",
")",
"and",
"not",
"__salt__",
"[",
"'fi... | Check the symlink function | [
"Check",
"the",
"symlink",
"function"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/file.py#L1050-L1083 | train | Check the symlink function
ialog | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/file.py | _unify_sources_and_hashes | def _unify_sources_and_hashes(source=None, source_hash=None,
sources=None, source_hashes=None):
'''
Silly little function to give us a standard tuple list for sources and
source_hashes
'''
if sources is None:
sources = []
if source_hashes is None:
s... | python | def _unify_sources_and_hashes(source=None, source_hash=None,
sources=None, source_hashes=None):
'''
Silly little function to give us a standard tuple list for sources and
source_hashes
'''
if sources is None:
sources = []
if source_hashes is None:
s... | [
"def",
"_unify_sources_and_hashes",
"(",
"source",
"=",
"None",
",",
"source_hash",
"=",
"None",
",",
"sources",
"=",
"None",
",",
"source_hashes",
"=",
"None",
")",
":",
"if",
"sources",
"is",
"None",
":",
"sources",
"=",
"[",
"]",
"if",
"source_hashes",
... | Silly little function to give us a standard tuple list for sources and
source_hashes | [
"Silly",
"little",
"function",
"to",
"give",
"us",
"a",
"standard",
"tuple",
"list",
"for",
"sources",
"and",
"source_hashes"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/file.py#L1104-L1128 | train | Unify sources and source_hashes. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/file.py | _get_template_texts | def _get_template_texts(source_list=None,
template='jinja',
defaults=None,
context=None,
**kwargs):
'''
Iterate a list of sources and process them as templates.
Returns a list of 'chunks' containing the rendered ... | python | def _get_template_texts(source_list=None,
template='jinja',
defaults=None,
context=None,
**kwargs):
'''
Iterate a list of sources and process them as templates.
Returns a list of 'chunks' containing the rendered ... | [
"def",
"_get_template_texts",
"(",
"source_list",
"=",
"None",
",",
"template",
"=",
"'jinja'",
",",
"defaults",
"=",
"None",
",",
"context",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"'_get_template_texts'",
",",
"'... | Iterate a list of sources and process them as templates.
Returns a list of 'chunks' containing the rendered templates. | [
"Iterate",
"a",
"list",
"of",
"sources",
"and",
"process",
"them",
"as",
"templates",
".",
"Returns",
"a",
"list",
"of",
"chunks",
"containing",
"the",
"rendered",
"templates",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/file.py#L1131-L1189 | train | Iterate a list of sources and process them as templates. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/file.py | _validate_str_list | def _validate_str_list(arg):
'''
ensure ``arg`` is a list of strings
'''
if isinstance(arg, six.binary_type):
ret = [salt.utils.stringutils.to_unicode(arg)]
elif isinstance(arg, six.string_types):
ret = [arg]
elif isinstance(arg, Iterable) and not isinstance(arg, Mapping):
... | python | def _validate_str_list(arg):
'''
ensure ``arg`` is a list of strings
'''
if isinstance(arg, six.binary_type):
ret = [salt.utils.stringutils.to_unicode(arg)]
elif isinstance(arg, six.string_types):
ret = [arg]
elif isinstance(arg, Iterable) and not isinstance(arg, Mapping):
... | [
"def",
"_validate_str_list",
"(",
"arg",
")",
":",
"if",
"isinstance",
"(",
"arg",
",",
"six",
".",
"binary_type",
")",
":",
"ret",
"=",
"[",
"salt",
".",
"utils",
".",
"stringutils",
".",
"to_unicode",
"(",
"arg",
")",
"]",
"elif",
"isinstance",
"(",
... | ensure ``arg`` is a list of strings | [
"ensure",
"arg",
"is",
"a",
"list",
"of",
"strings"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/file.py#L1192-L1209 | train | ensure arg is a list of strings
ensure it is a list of strings
ensure it is a list of strings
Inviteers | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/file.py | _set_shortcut_ownership | def _set_shortcut_ownership(path, user):
'''
Set the ownership of a shortcut and return a boolean indicating
success/failure
'''
try:
__salt__['file.lchown'](path, user)
except OSError:
pass
return _check_shortcut_ownership(path, user) | python | def _set_shortcut_ownership(path, user):
'''
Set the ownership of a shortcut and return a boolean indicating
success/failure
'''
try:
__salt__['file.lchown'](path, user)
except OSError:
pass
return _check_shortcut_ownership(path, user) | [
"def",
"_set_shortcut_ownership",
"(",
"path",
",",
"user",
")",
":",
"try",
":",
"__salt__",
"[",
"'file.lchown'",
"]",
"(",
"path",
",",
"user",
")",
"except",
"OSError",
":",
"pass",
"return",
"_check_shortcut_ownership",
"(",
"path",
",",
"user",
")"
] | Set the ownership of a shortcut and return a boolean indicating
success/failure | [
"Set",
"the",
"ownership",
"of",
"a",
"shortcut",
"and",
"return",
"a",
"boolean",
"indicating",
"success",
"/",
"failure"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/file.py#L1224-L1233 | train | Set the ownership of a shortcut and return a boolean indicating that the shortcut was set success or failure | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/file.py | _shortcut_check | def _shortcut_check(name,
target,
arguments,
working_dir,
description,
icon_location,
force,
user):
'''
Check the shortcut function
'''
changes = {}
if not os.p... | python | def _shortcut_check(name,
target,
arguments,
working_dir,
description,
icon_location,
force,
user):
'''
Check the shortcut function
'''
changes = {}
if not os.p... | [
"def",
"_shortcut_check",
"(",
"name",
",",
"target",
",",
"arguments",
",",
"working_dir",
",",
"description",
",",
"icon_location",
",",
"force",
",",
"user",
")",
":",
"changes",
"=",
"{",
"}",
"if",
"not",
"os",
".",
"path",
".",
"exists",
"(",
"na... | Check the shortcut function | [
"Check",
"the",
"shortcut",
"function"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/file.py#L1236-L1294 | train | Check the shortcut function | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/file.py | _makedirs | def _makedirs(name,
user=None,
group=None,
dir_mode=None,
win_owner=None,
win_perms=None,
win_deny_perms=None,
win_inheritance=None):
'''
Helper function for creating directories when the ``makedirs`` option is set... | python | def _makedirs(name,
user=None,
group=None,
dir_mode=None,
win_owner=None,
win_perms=None,
win_deny_perms=None,
win_inheritance=None):
'''
Helper function for creating directories when the ``makedirs`` option is set... | [
"def",
"_makedirs",
"(",
"name",
",",
"user",
"=",
"None",
",",
"group",
"=",
"None",
",",
"dir_mode",
"=",
"None",
",",
"win_owner",
"=",
"None",
",",
"win_perms",
"=",
"None",
",",
"win_deny_perms",
"=",
"None",
",",
"win_inheritance",
"=",
"None",
"... | Helper function for creating directories when the ``makedirs`` option is set
to ``True``. Handles Unix and Windows based systems
.. versionadded:: 2017.7.8
Args:
name (str): The directory path to create
user (str): The linux user to own the directory
group (str): The linux group to... | [
"Helper",
"function",
"for",
"creating",
"directories",
"when",
"the",
"makedirs",
"option",
"is",
"set",
"to",
"True",
".",
"Handles",
"Unix",
"and",
"Windows",
"based",
"systems"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/file.py#L1297-L1345 | train | Helper function for creating directories on Linux and Windows based systems. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/file.py | symlink | def symlink(
name,
target,
force=False,
backupname=None,
makedirs=False,
user=None,
group=None,
copy_target_user=False,
copy_target_group=False,
mode=None,
win_owner=None,
win_perms=None,
win_deny_perms=None,
... | python | def symlink(
name,
target,
force=False,
backupname=None,
makedirs=False,
user=None,
group=None,
copy_target_user=False,
copy_target_group=False,
mode=None,
win_owner=None,
win_perms=None,
win_deny_perms=None,
... | [
"def",
"symlink",
"(",
"name",
",",
"target",
",",
"force",
"=",
"False",
",",
"backupname",
"=",
"None",
",",
"makedirs",
"=",
"False",
",",
"user",
"=",
"None",
",",
"group",
"=",
"None",
",",
"copy_target_user",
"=",
"False",
",",
"copy_target_group",... | Create a symbolic link (symlink, soft link)
If the file already exists and is a symlink pointing to any location other
than the specified target, the symlink will be replaced. If the symlink is
a regular file or directory then the state will return False. If the
regular file or directory is desired to ... | [
"Create",
"a",
"symbolic",
"link",
"(",
"symlink",
"soft",
"link",
")"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/file.py#L1348-L1714 | train | Creates a symbolic link in the state of the state of the state of the state of the state of the state of the state of the state of the state of the state of the state of the state of the state of the state of the state of the state of the state of the state of the state of the state that is not the state of the state t... | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/file.py | absent | def absent(name,
**kwargs):
'''
Make sure that the named file or directory is absent. If it exists, it will
be deleted. This will work to reverse any of the functions in the file
state module. If a directory is supplied, it will be recursively deleted.
name
The path which should ... | python | def absent(name,
**kwargs):
'''
Make sure that the named file or directory is absent. If it exists, it will
be deleted. This will work to reverse any of the functions in the file
state module. If a directory is supplied, it will be recursively deleted.
name
The path which should ... | [
"def",
"absent",
"(",
"name",
",",
"*",
"*",
"kwargs",
")",
":",
"name",
"=",
"os",
".",
"path",
".",
"expanduser",
"(",
"name",
")",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":",
"{",
"}",
",",
"'result'",
":",
"True",
",",
"'... | Make sure that the named file or directory is absent. If it exists, it will
be deleted. This will work to reverse any of the functions in the file
state module. If a directory is supplied, it will be recursively deleted.
name
The path which should be deleted | [
"Make",
"sure",
"that",
"the",
"named",
"file",
"or",
"directory",
"is",
"absent",
".",
"If",
"it",
"exists",
"it",
"will",
"be",
"deleted",
".",
"This",
"will",
"work",
"to",
"reverse",
"any",
"of",
"the",
"functions",
"in",
"the",
"file",
"state",
"m... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/file.py#L1717-L1770 | train | Ensure that the named file or directory is absent. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/file.py | tidied | def tidied(name,
age=0,
matches=None,
rmdirs=False,
size=0,
**kwargs):
'''
Remove unwanted files based on specific criteria. Multiple criteria
are OR’d together, so a file that is too large but is not old enough
will still get tidied.
If neithe... | python | def tidied(name,
age=0,
matches=None,
rmdirs=False,
size=0,
**kwargs):
'''
Remove unwanted files based on specific criteria. Multiple criteria
are OR’d together, so a file that is too large but is not old enough
will still get tidied.
If neithe... | [
"def",
"tidied",
"(",
"name",
",",
"age",
"=",
"0",
",",
"matches",
"=",
"None",
",",
"rmdirs",
"=",
"False",
",",
"size",
"=",
"0",
",",
"*",
"*",
"kwargs",
")",
":",
"name",
"=",
"os",
".",
"path",
".",
"expanduser",
"(",
"name",
")",
"ret",
... | Remove unwanted files based on specific criteria. Multiple criteria
are OR’d together, so a file that is too large but is not old enough
will still get tidied.
If neither age nor size is given all files which match a pattern in
matches will be removed.
name
The directory tree that should b... | [
"Remove",
"unwanted",
"files",
"based",
"on",
"specific",
"criteria",
".",
"Multiple",
"criteria",
"are",
"OR’d",
"together",
"so",
"a",
"file",
"that",
"is",
"too",
"large",
"but",
"is",
"not",
"old",
"enough",
"will",
"still",
"get",
"tidied",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/file.py#L1773-L1889 | train | This function removes unwanted files from a directory tree that are too large and is not old enough. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/file.py | exists | def exists(name,
**kwargs):
'''
Verify that the named file or directory is present or exists.
Ensures pre-requisites outside of Salt's purview
(e.g., keytabs, private keys, etc.) have been previously satisfied before
deployment.
This function does not create the file if it doesn't ex... | python | def exists(name,
**kwargs):
'''
Verify that the named file or directory is present or exists.
Ensures pre-requisites outside of Salt's purview
(e.g., keytabs, private keys, etc.) have been previously satisfied before
deployment.
This function does not create the file if it doesn't ex... | [
"def",
"exists",
"(",
"name",
",",
"*",
"*",
"kwargs",
")",
":",
"name",
"=",
"os",
".",
"path",
".",
"expanduser",
"(",
"name",
")",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":",
"{",
"}",
",",
"'result'",
":",
"True",
",",
"'... | Verify that the named file or directory is present or exists.
Ensures pre-requisites outside of Salt's purview
(e.g., keytabs, private keys, etc.) have been previously satisfied before
deployment.
This function does not create the file if it doesn't exist, it will return
an error.
name
... | [
"Verify",
"that",
"the",
"named",
"file",
"or",
"directory",
"is",
"present",
"or",
"exists",
".",
"Ensures",
"pre",
"-",
"requisites",
"outside",
"of",
"Salt",
"s",
"purview",
"(",
"e",
".",
"g",
".",
"keytabs",
"private",
"keys",
"etc",
".",
")",
"ha... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/file.py#L1892-L1918 | train | Verify that the named file or directory exists. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.