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_secgroup.py | authorize | def authorize(name=None, source_group_name=None,
source_group_owner_id=None, ip_protocol=None,
from_port=None, to_port=None, cidr_ip=None, group_id=None,
source_group_group_id=None, region=None, key=None, keyid=None,
profile=None, vpc_id=None, vpc_name=None, egres... | python | def authorize(name=None, source_group_name=None,
source_group_owner_id=None, ip_protocol=None,
from_port=None, to_port=None, cidr_ip=None, group_id=None,
source_group_group_id=None, region=None, key=None, keyid=None,
profile=None, vpc_id=None, vpc_name=None, egres... | [
"def",
"authorize",
"(",
"name",
"=",
"None",
",",
"source_group_name",
"=",
"None",
",",
"source_group_owner_id",
"=",
"None",
",",
"ip_protocol",
"=",
"None",
",",
"from_port",
"=",
"None",
",",
"to_port",
"=",
"None",
",",
"cidr_ip",
"=",
"None",
",",
... | Add a new rule to an existing security group.
CLI example::
salt myminion boto_secgroup.authorize mysecgroup ip_protocol=tcp from_port=80 to_port=80 cidr_ip='['10.0.0.0/8', '192.168.0.0/24']' | [
"Add",
"a",
"new",
"rule",
"to",
"an",
"existing",
"security",
"group",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_secgroup.py#L434-L486 | train | Add a rule to an existing security group. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/boto_secgroup.py | _find_vpcs | def _find_vpcs(vpc_id=None, vpc_name=None, cidr=None, tags=None,
region=None, key=None, keyid=None, profile=None):
'''
Given VPC properties, find and return matching VPC ids.
Borrowed from boto_vpc; these could be refactored into a common library
'''
if all((vpc_id, vpc_name)):
... | python | def _find_vpcs(vpc_id=None, vpc_name=None, cidr=None, tags=None,
region=None, key=None, keyid=None, profile=None):
'''
Given VPC properties, find and return matching VPC ids.
Borrowed from boto_vpc; these could be refactored into a common library
'''
if all((vpc_id, vpc_name)):
... | [
"def",
"_find_vpcs",
"(",
"vpc_id",
"=",
"None",
",",
"vpc_name",
"=",
"None",
",",
"cidr",
"=",
"None",
",",
"tags",
"=",
"None",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
"... | Given VPC properties, find and return matching VPC ids.
Borrowed from boto_vpc; these could be refactored into a common library | [
"Given",
"VPC",
"properties",
"find",
"and",
"return",
"matching",
"VPC",
"ids",
".",
"Borrowed",
"from",
"boto_vpc",
";",
"these",
"could",
"be",
"refactored",
"into",
"a",
"common",
"library"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_secgroup.py#L542-L580 | train | Given VPC properties find and return matching VPC ids. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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_secgroup.py | set_tags | def set_tags(tags,
name=None,
group_id=None,
vpc_name=None,
vpc_id=None,
region=None,
key=None,
keyid=None,
profile=None):
'''
sets tags on a security group
.. versionadded:: 2016.3.0
tags
a... | python | def set_tags(tags,
name=None,
group_id=None,
vpc_name=None,
vpc_id=None,
region=None,
key=None,
keyid=None,
profile=None):
'''
sets tags on a security group
.. versionadded:: 2016.3.0
tags
a... | [
"def",
"set_tags",
"(",
"tags",
",",
"name",
"=",
"None",
",",
"group_id",
"=",
"None",
",",
"vpc_name",
"=",
"None",
",",
"vpc_id",
"=",
"None",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
... | sets tags on a security group
.. versionadded:: 2016.3.0
tags
a dict of key:value pair of tags to set on the security group
name
the name of the security group
group_id
the group id of the security group (in lie of a name/vpc combo)
vpc_name
the name of the vpc t... | [
"sets",
"tags",
"on",
"a",
"security",
"group"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_secgroup.py#L583-L644 | train | Set tags on security group | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/boto_secgroup.py | delete_tags | def delete_tags(tags,
name=None,
group_id=None,
vpc_name=None,
vpc_id=None,
region=None,
key=None,
keyid=None,
profile=None):
'''
deletes tags from a security group
.. versionadde... | python | def delete_tags(tags,
name=None,
group_id=None,
vpc_name=None,
vpc_id=None,
region=None,
key=None,
keyid=None,
profile=None):
'''
deletes tags from a security group
.. versionadde... | [
"def",
"delete_tags",
"(",
"tags",
",",
"name",
"=",
"None",
",",
"group_id",
"=",
"None",
",",
"vpc_name",
"=",
"None",
",",
"vpc_id",
"=",
"None",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"="... | deletes tags from a security group
.. versionadded:: 2016.3.0
tags
a list of tags to remove
name
the name of the security group
group_id
the group id of the security group (in lie of a name/vpc combo)
vpc_name
the name of the vpc to search the named group for
... | [
"deletes",
"tags",
"from",
"a",
"security",
"group"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_secgroup.py#L647-L710 | train | Delete tags from a security group | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/zypperpkg.py | list_upgrades | def list_upgrades(refresh=True, root=None, **kwargs):
'''
List all available package upgrades on this system
refresh
force a refresh if set to True (default).
If set to False it depends on zypper if a refresh is
executed.
root
operate on a different root directory.
... | python | def list_upgrades(refresh=True, root=None, **kwargs):
'''
List all available package upgrades on this system
refresh
force a refresh if set to True (default).
If set to False it depends on zypper if a refresh is
executed.
root
operate on a different root directory.
... | [
"def",
"list_upgrades",
"(",
"refresh",
"=",
"True",
",",
"root",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"refresh",
":",
"refresh_db",
"(",
"root",
")",
"ret",
"=",
"dict",
"(",
")",
"cmd",
"=",
"[",
"'list-updates'",
"]",
"if",
"'fr... | List all available package upgrades on this system
refresh
force a refresh if set to True (default).
If set to False it depends on zypper if a refresh is
executed.
root
operate on a different root directory.
CLI Example:
.. code-block:: bash
salt '*' pkg.list... | [
"List",
"all",
"available",
"package",
"upgrades",
"on",
"this",
"system"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zypperpkg.py#L455-L487 | train | List all available package upgrades on this system | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/zypperpkg.py | info_available | def info_available(*names, **kwargs):
'''
Return the information of the named package available for the system.
refresh
force a refresh if set to True (default).
If set to False it depends on zypper if a refresh is
executed or not.
root
operate on a different root direc... | python | def info_available(*names, **kwargs):
'''
Return the information of the named package available for the system.
refresh
force a refresh if set to True (default).
If set to False it depends on zypper if a refresh is
executed or not.
root
operate on a different root direc... | [
"def",
"info_available",
"(",
"*",
"names",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"{",
"}",
"if",
"not",
"names",
":",
"return",
"ret",
"else",
":",
"names",
"=",
"sorted",
"(",
"list",
"(",
"set",
"(",
"names",
")",
")",
")",
"root",
... | Return the information of the named package available for the system.
refresh
force a refresh if set to True (default).
If set to False it depends on zypper if a refresh is
executed or not.
root
operate on a different root directory.
CLI example:
.. code-block:: bash
... | [
"Return",
"the",
"information",
"of",
"the",
"named",
"package",
"available",
"for",
"the",
"system",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zypperpkg.py#L554-L613 | train | Return the information of the named package available for the system. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/zypperpkg.py | version_cmp | def version_cmp(ver1, ver2, ignore_epoch=False, **kwargs):
'''
.. versionadded:: 2015.5.4
Do a cmp-style comparison on two packages. Return -1 if ver1 < ver2, 0 if
ver1 == ver2, and 1 if ver1 > ver2. Return None if there was a problem
making the comparison.
ignore_epoch : False
Set to ... | python | def version_cmp(ver1, ver2, ignore_epoch=False, **kwargs):
'''
.. versionadded:: 2015.5.4
Do a cmp-style comparison on two packages. Return -1 if ver1 < ver2, 0 if
ver1 == ver2, and 1 if ver1 > ver2. Return None if there was a problem
making the comparison.
ignore_epoch : False
Set to ... | [
"def",
"version_cmp",
"(",
"ver1",
",",
"ver2",
",",
"ignore_epoch",
"=",
"False",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"__salt__",
"[",
"'lowpkg.version_cmp'",
"]",
"(",
"ver1",
",",
"ver2",
",",
"ignore_epoch",
"=",
"ignore_epoch",
")"
] | .. versionadded:: 2015.5.4
Do a cmp-style comparison on two packages. Return -1 if ver1 < ver2, 0 if
ver1 == ver2, and 1 if ver1 > ver2. Return None if there was a problem
making the comparison.
ignore_epoch : False
Set to ``True`` to ignore the epoch when comparing versions
.. versio... | [
"..",
"versionadded",
"::",
"2015",
".",
"5",
".",
"4"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zypperpkg.py#L707-L726 | train | Compare two versions of a single package. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/zypperpkg.py | list_pkgs | def list_pkgs(versions_as_list=False, root=None, includes=None, **kwargs):
'''
List the packages currently installed as a dict. By default, the dict
contains versions as a comma separated string::
{'<package_name>': '<version>[,<version>...]'}
versions_as_list:
If set to true, the vers... | python | def list_pkgs(versions_as_list=False, root=None, includes=None, **kwargs):
'''
List the packages currently installed as a dict. By default, the dict
contains versions as a comma separated string::
{'<package_name>': '<version>[,<version>...]'}
versions_as_list:
If set to true, the vers... | [
"def",
"list_pkgs",
"(",
"versions_as_list",
"=",
"False",
",",
"root",
"=",
"None",
",",
"includes",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"versions_as_list",
"=",
"salt",
".",
"utils",
".",
"data",
".",
"is_true",
"(",
"versions_as_list",
")"... | List the packages currently installed as a dict. By default, the dict
contains versions as a comma separated string::
{'<package_name>': '<version>[,<version>...]'}
versions_as_list:
If set to true, the versions are provided as a list
{'<package_name>': ['<version>', '<version>']}
... | [
"List",
"the",
"packages",
"currently",
"installed",
"as",
"a",
"dict",
".",
"By",
"default",
"the",
"dict",
"contains",
"versions",
"as",
"a",
"comma",
"separated",
"string",
"::"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zypperpkg.py#L729-L858 | train | Return a dict containing the currently installed packages. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/zypperpkg.py | list_repo_pkgs | def list_repo_pkgs(*args, **kwargs):
'''
.. versionadded:: 2017.7.5,2018.3.1
Returns all available packages. Optionally, package names (and name globs)
can be passed and the results will be filtered to packages matching those
names. This is recommended as it speeds up the function considerably.
... | python | def list_repo_pkgs(*args, **kwargs):
'''
.. versionadded:: 2017.7.5,2018.3.1
Returns all available packages. Optionally, package names (and name globs)
can be passed and the results will be filtered to packages matching those
names. This is recommended as it speeds up the function considerably.
... | [
"def",
"list_repo_pkgs",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"byrepo",
"=",
"kwargs",
".",
"pop",
"(",
"'byrepo'",
",",
"False",
")",
"fromrepo",
"=",
"kwargs",
".",
"pop",
"(",
"'fromrepo'",
",",
"''",
")",
"or",
"''",
"ret",
"=",... | .. versionadded:: 2017.7.5,2018.3.1
Returns all available packages. Optionally, package names (and name globs)
can be passed and the results will be filtered to packages matching those
names. This is recommended as it speeds up the function considerably.
This function can be helpful in discovering the... | [
"..",
"versionadded",
"::",
"2017",
".",
"7",
".",
"5",
"2018",
".",
"3",
".",
"1"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zypperpkg.py#L861-L979 | train | A function that returns all available packages in a repository. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/zypperpkg.py | _get_configured_repos | def _get_configured_repos(root=None):
'''
Get all the info about repositories from the configurations.
'''
repos = os.path.join(root, os.path.relpath(REPOS, os.path.sep)) if root else REPOS
repos_cfg = configparser.ConfigParser()
if os.path.exists(repos):
repos_cfg.read([repos + '/' + f... | python | def _get_configured_repos(root=None):
'''
Get all the info about repositories from the configurations.
'''
repos = os.path.join(root, os.path.relpath(REPOS, os.path.sep)) if root else REPOS
repos_cfg = configparser.ConfigParser()
if os.path.exists(repos):
repos_cfg.read([repos + '/' + f... | [
"def",
"_get_configured_repos",
"(",
"root",
"=",
"None",
")",
":",
"repos",
"=",
"os",
".",
"path",
".",
"join",
"(",
"root",
",",
"os",
".",
"path",
".",
"relpath",
"(",
"REPOS",
",",
"os",
".",
"path",
".",
"sep",
")",
")",
"if",
"root",
"else... | Get all the info about repositories from the configurations. | [
"Get",
"all",
"the",
"info",
"about",
"repositories",
"from",
"the",
"configurations",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zypperpkg.py#L982-L994 | train | Get all the info about repositories from the configurations. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/zypperpkg.py | _get_repo_info | def _get_repo_info(alias, repos_cfg=None, root=None):
'''
Get one repo meta-data.
'''
try:
meta = dict((repos_cfg or _get_configured_repos(root=root)).items(alias))
meta['alias'] = alias
for key, val in six.iteritems(meta):
if val in ['0', '1']:
meta[k... | python | def _get_repo_info(alias, repos_cfg=None, root=None):
'''
Get one repo meta-data.
'''
try:
meta = dict((repos_cfg or _get_configured_repos(root=root)).items(alias))
meta['alias'] = alias
for key, val in six.iteritems(meta):
if val in ['0', '1']:
meta[k... | [
"def",
"_get_repo_info",
"(",
"alias",
",",
"repos_cfg",
"=",
"None",
",",
"root",
"=",
"None",
")",
":",
"try",
":",
"meta",
"=",
"dict",
"(",
"(",
"repos_cfg",
"or",
"_get_configured_repos",
"(",
"root",
"=",
"root",
")",
")",
".",
"items",
"(",
"a... | Get one repo meta-data. | [
"Get",
"one",
"repo",
"meta",
"-",
"data",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zypperpkg.py#L997-L1011 | train | Get one repo meta - data. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/zypperpkg.py | list_repos | def list_repos(root=None, **kwargs):
'''
Lists all repos.
root
operate on a different root directory.
CLI Example:
.. code-block:: bash
salt '*' pkg.list_repos
'''
repos_cfg = _get_configured_repos(root=root)
all_repos = {}
for alias in repos_cfg.sections():
... | python | def list_repos(root=None, **kwargs):
'''
Lists all repos.
root
operate on a different root directory.
CLI Example:
.. code-block:: bash
salt '*' pkg.list_repos
'''
repos_cfg = _get_configured_repos(root=root)
all_repos = {}
for alias in repos_cfg.sections():
... | [
"def",
"list_repos",
"(",
"root",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"repos_cfg",
"=",
"_get_configured_repos",
"(",
"root",
"=",
"root",
")",
"all_repos",
"=",
"{",
"}",
"for",
"alias",
"in",
"repos_cfg",
".",
"sections",
"(",
")",
":",
... | Lists all repos.
root
operate on a different root directory.
CLI Example:
.. code-block:: bash
salt '*' pkg.list_repos | [
"Lists",
"all",
"repos",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zypperpkg.py#L1030-L1048 | train | Lists all repos. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/zypperpkg.py | del_repo | def del_repo(repo, root=None):
'''
Delete a repo.
root
operate on a different root directory.
CLI Examples:
.. code-block:: bash
salt '*' pkg.del_repo alias
'''
repos_cfg = _get_configured_repos(root=root)
for alias in repos_cfg.sections():
if alias == repo:
... | python | def del_repo(repo, root=None):
'''
Delete a repo.
root
operate on a different root directory.
CLI Examples:
.. code-block:: bash
salt '*' pkg.del_repo alias
'''
repos_cfg = _get_configured_repos(root=root)
for alias in repos_cfg.sections():
if alias == repo:
... | [
"def",
"del_repo",
"(",
"repo",
",",
"root",
"=",
"None",
")",
":",
"repos_cfg",
"=",
"_get_configured_repos",
"(",
"root",
"=",
"root",
")",
"for",
"alias",
"in",
"repos_cfg",
".",
"sections",
"(",
")",
":",
"if",
"alias",
"==",
"repo",
":",
"doc",
... | Delete a repo.
root
operate on a different root directory.
CLI Examples:
.. code-block:: bash
salt '*' pkg.del_repo alias | [
"Delete",
"a",
"repo",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zypperpkg.py#L1051-L1075 | train | Delete a repository. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/zypperpkg.py | mod_repo | def mod_repo(repo, **kwargs):
'''
Modify one or more values for a repo. If the repo does not exist, it will
be created, so long as the following values are specified:
repo or alias
alias by which Zypper refers to the repo
url, mirrorlist or baseurl
the URL for Zypper to reference
... | python | def mod_repo(repo, **kwargs):
'''
Modify one or more values for a repo. If the repo does not exist, it will
be created, so long as the following values are specified:
repo or alias
alias by which Zypper refers to the repo
url, mirrorlist or baseurl
the URL for Zypper to reference
... | [
"def",
"mod_repo",
"(",
"repo",
",",
"*",
"*",
"kwargs",
")",
":",
"root",
"=",
"kwargs",
".",
"get",
"(",
"'root'",
")",
"or",
"None",
"repos_cfg",
"=",
"_get_configured_repos",
"(",
"root",
"=",
"root",
")",
"added",
"=",
"False",
"# An attempt to add ... | Modify one or more values for a repo. If the repo does not exist, it will
be created, so long as the following values are specified:
repo or alias
alias by which Zypper refers to the repo
url, mirrorlist or baseurl
the URL for Zypper to reference
enabled
Enable or disable (Tru... | [
"Modify",
"one",
"or",
"more",
"values",
"for",
"a",
"repo",
".",
"If",
"the",
"repo",
"does",
"not",
"exist",
"it",
"will",
"be",
"created",
"so",
"long",
"as",
"the",
"following",
"values",
"are",
"specified",
":"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zypperpkg.py#L1078-L1233 | train | Modify one or more values for a repository. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/zypperpkg.py | refresh_db | def refresh_db(root=None):
'''
Force a repository refresh by calling ``zypper refresh --force``, return a dict::
{'<database name>': Bool}
root
operate on a different root directory.
CLI Example:
.. code-block:: bash
salt '*' pkg.refresh_db
'''
# Remove rtag file... | python | def refresh_db(root=None):
'''
Force a repository refresh by calling ``zypper refresh --force``, return a dict::
{'<database name>': Bool}
root
operate on a different root directory.
CLI Example:
.. code-block:: bash
salt '*' pkg.refresh_db
'''
# Remove rtag file... | [
"def",
"refresh_db",
"(",
"root",
"=",
"None",
")",
":",
"# Remove rtag file to keep multiple refreshes from happening in pkg states",
"salt",
".",
"utils",
".",
"pkg",
".",
"clear_rtag",
"(",
"__opts__",
")",
"ret",
"=",
"{",
"}",
"out",
"=",
"__zypper__",
"(",
... | Force a repository refresh by calling ``zypper refresh --force``, return a dict::
{'<database name>': Bool}
root
operate on a different root directory.
CLI Example:
.. code-block:: bash
salt '*' pkg.refresh_db | [
"Force",
"a",
"repository",
"refresh",
"by",
"calling",
"zypper",
"refresh",
"--",
"force",
"return",
"a",
"dict",
"::"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zypperpkg.py#L1236-L1270 | train | Refresh a repository from the specified root 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/modules/zypperpkg.py | _find_types | def _find_types(pkgs):
'''Form a package names list, find prefixes of packages types.'''
return sorted({pkg.split(':', 1)[0] for pkg in pkgs
if len(pkg.split(':', 1)) == 2}) | python | def _find_types(pkgs):
'''Form a package names list, find prefixes of packages types.'''
return sorted({pkg.split(':', 1)[0] for pkg in pkgs
if len(pkg.split(':', 1)) == 2}) | [
"def",
"_find_types",
"(",
"pkgs",
")",
":",
"return",
"sorted",
"(",
"{",
"pkg",
".",
"split",
"(",
"':'",
",",
"1",
")",
"[",
"0",
"]",
"for",
"pkg",
"in",
"pkgs",
"if",
"len",
"(",
"pkg",
".",
"split",
"(",
"':'",
",",
"1",
")",
")",
"==",... | Form a package names list, find prefixes of packages types. | [
"Form",
"a",
"package",
"names",
"list",
"find",
"prefixes",
"of",
"packages",
"types",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zypperpkg.py#L1273-L1276 | train | Form a package names list find prefixes of packages types. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/zypperpkg.py | install | def install(name=None,
refresh=False,
fromrepo=None,
pkgs=None,
sources=None,
downloadonly=None,
skip_verify=False,
version=None,
ignore_repo_failure=False,
no_recommends=False,
root=None,
... | python | def install(name=None,
refresh=False,
fromrepo=None,
pkgs=None,
sources=None,
downloadonly=None,
skip_verify=False,
version=None,
ignore_repo_failure=False,
no_recommends=False,
root=None,
... | [
"def",
"install",
"(",
"name",
"=",
"None",
",",
"refresh",
"=",
"False",
",",
"fromrepo",
"=",
"None",
",",
"pkgs",
"=",
"None",
",",
"sources",
"=",
"None",
",",
"downloadonly",
"=",
"None",
",",
"skip_verify",
"=",
"False",
",",
"version",
"=",
"N... | .. versionchanged:: 2015.8.12,2016.3.3,2016.11.0
On minions running systemd>=205, `systemd-run(1)`_ is now used to
isolate commands which modify installed packages from the
``salt-minion`` daemon's control group. This is done to keep systemd
from killing any zypper commands spawned by Sa... | [
"..",
"versionchanged",
"::",
"2015",
".",
"8",
".",
"12",
"2016",
".",
"3",
".",
"3",
"2016",
".",
"11",
".",
"0",
"On",
"minions",
"running",
"systemd",
">",
"=",
"205",
"systemd",
"-",
"run",
"(",
"1",
")",
"_",
"is",
"now",
"used",
"to",
"i... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zypperpkg.py#L1279-L1528 | train | Installs packages from a software repository. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/zypperpkg.py | upgrade | def upgrade(refresh=True,
dryrun=False,
dist_upgrade=False,
fromrepo=None,
novendorchange=False,
skip_verify=False,
no_recommends=False,
root=None,
**kwargs): # pylint: disable=unused-argument
'''
.. versionchanged:... | python | def upgrade(refresh=True,
dryrun=False,
dist_upgrade=False,
fromrepo=None,
novendorchange=False,
skip_verify=False,
no_recommends=False,
root=None,
**kwargs): # pylint: disable=unused-argument
'''
.. versionchanged:... | [
"def",
"upgrade",
"(",
"refresh",
"=",
"True",
",",
"dryrun",
"=",
"False",
",",
"dist_upgrade",
"=",
"False",
",",
"fromrepo",
"=",
"None",
",",
"novendorchange",
"=",
"False",
",",
"skip_verify",
"=",
"False",
",",
"no_recommends",
"=",
"False",
",",
"... | .. versionchanged:: 2015.8.12,2016.3.3,2016.11.0
On minions running systemd>=205, `systemd-run(1)`_ is now used to
isolate commands which modify installed packages from the
``salt-minion`` daemon's control group. This is done to keep systemd
from killing any zypper commands spawned by Sa... | [
"..",
"versionchanged",
"::",
"2015",
".",
"8",
".",
"12",
"2016",
".",
"3",
".",
"3",
"2016",
".",
"11",
".",
"0",
"On",
"minions",
"running",
"systemd",
">",
"=",
"205",
"systemd",
"-",
"run",
"(",
"1",
")",
"_",
"is",
"now",
"used",
"to",
"i... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zypperpkg.py#L1531-L1656 | train | A simple system upgrade of the specified version of the specified object. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/zypperpkg.py | _uninstall | def _uninstall(name=None, pkgs=None, root=None):
'''
Remove and purge do identical things but with different Zypper commands,
this function performs the common logic.
'''
try:
pkg_params = __salt__['pkg_resource.parse_targets'](name, pkgs)[0]
except MinionError as exc:
raise Comm... | python | def _uninstall(name=None, pkgs=None, root=None):
'''
Remove and purge do identical things but with different Zypper commands,
this function performs the common logic.
'''
try:
pkg_params = __salt__['pkg_resource.parse_targets'](name, pkgs)[0]
except MinionError as exc:
raise Comm... | [
"def",
"_uninstall",
"(",
"name",
"=",
"None",
",",
"pkgs",
"=",
"None",
",",
"root",
"=",
"None",
")",
":",
"try",
":",
"pkg_params",
"=",
"__salt__",
"[",
"'pkg_resource.parse_targets'",
"]",
"(",
"name",
",",
"pkgs",
")",
"[",
"0",
"]",
"except",
... | Remove and purge do identical things but with different Zypper commands,
this function performs the common logic. | [
"Remove",
"and",
"purge",
"do",
"identical",
"things",
"but",
"with",
"different",
"Zypper",
"commands",
"this",
"function",
"performs",
"the",
"common",
"logic",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zypperpkg.py#L1659-L1699 | train | Remove and purge do identical things but with different Zypper 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/zypperpkg.py | remove | def remove(name=None, pkgs=None, root=None, **kwargs): # pylint: disable=unused-argument
'''
.. versionchanged:: 2015.8.12,2016.3.3,2016.11.0
On minions running systemd>=205, `systemd-run(1)`_ is now used to
isolate commands which modify installed packages from the
``salt-minion`` daemo... | python | def remove(name=None, pkgs=None, root=None, **kwargs): # pylint: disable=unused-argument
'''
.. versionchanged:: 2015.8.12,2016.3.3,2016.11.0
On minions running systemd>=205, `systemd-run(1)`_ is now used to
isolate commands which modify installed packages from the
``salt-minion`` daemo... | [
"def",
"remove",
"(",
"name",
"=",
"None",
",",
"pkgs",
"=",
"None",
",",
"root",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"# pylint: disable=unused-argument",
"return",
"_uninstall",
"(",
"name",
"=",
"name",
",",
"pkgs",
"=",
"pkgs",
",",
"roo... | .. versionchanged:: 2015.8.12,2016.3.3,2016.11.0
On minions running systemd>=205, `systemd-run(1)`_ is now used to
isolate commands which modify installed packages from the
``salt-minion`` daemon's control group. This is done to keep systemd
from killing any zypper commands spawned by Sa... | [
"..",
"versionchanged",
"::",
"2015",
".",
"8",
".",
"12",
"2016",
".",
"3",
".",
"3",
"2016",
".",
"11",
".",
"0",
"On",
"minions",
"running",
"systemd",
">",
"=",
"205",
"systemd",
"-",
"run",
"(",
"1",
")",
"_",
"is",
"now",
"used",
"to",
"i... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zypperpkg.py#L1728-L1772 | train | Remove packages from the named package. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/zypperpkg.py | purge | def purge(name=None, pkgs=None, root=None, **kwargs): # pylint: disable=unused-argument
'''
.. versionchanged:: 2015.8.12,2016.3.3,2016.11.0
On minions running systemd>=205, `systemd-run(1)`_ is now used to
isolate commands which modify installed packages from the
``salt-minion`` daemon... | python | def purge(name=None, pkgs=None, root=None, **kwargs): # pylint: disable=unused-argument
'''
.. versionchanged:: 2015.8.12,2016.3.3,2016.11.0
On minions running systemd>=205, `systemd-run(1)`_ is now used to
isolate commands which modify installed packages from the
``salt-minion`` daemon... | [
"def",
"purge",
"(",
"name",
"=",
"None",
",",
"pkgs",
"=",
"None",
",",
"root",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"# pylint: disable=unused-argument",
"return",
"_uninstall",
"(",
"name",
"=",
"name",
",",
"pkgs",
"=",
"pkgs",
",",
"root... | .. versionchanged:: 2015.8.12,2016.3.3,2016.11.0
On minions running systemd>=205, `systemd-run(1)`_ is now used to
isolate commands which modify installed packages from the
``salt-minion`` daemon's control group. This is done to keep systemd
from killing any zypper commands spawned by Sa... | [
"..",
"versionchanged",
"::",
"2015",
".",
"8",
".",
"12",
"2016",
".",
"3",
".",
"3",
"2016",
".",
"11",
".",
"0",
"On",
"minions",
"running",
"systemd",
">",
"=",
"205",
"systemd",
"-",
"run",
"(",
"1",
")",
"_",
"is",
"now",
"used",
"to",
"i... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zypperpkg.py#L1775-L1820 | train | Remove a package from the system. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/zypperpkg.py | list_locks | def list_locks(root=None):
'''
List current package locks.
root
operate on a different root directory.
Return a dict containing the locked package with attributes::
{'<package>': {'case_sensitive': '<case_sensitive>',
'match_type': '<match_type>'
... | python | def list_locks(root=None):
'''
List current package locks.
root
operate on a different root directory.
Return a dict containing the locked package with attributes::
{'<package>': {'case_sensitive': '<case_sensitive>',
'match_type': '<match_type>'
... | [
"def",
"list_locks",
"(",
"root",
"=",
"None",
")",
":",
"locks",
"=",
"{",
"}",
"_locks",
"=",
"os",
".",
"path",
".",
"join",
"(",
"root",
",",
"os",
".",
"path",
".",
"relpath",
"(",
"LOCKS",
",",
"os",
".",
"path",
".",
"sep",
")",
")",
"... | List current package locks.
root
operate on a different root directory.
Return a dict containing the locked package with attributes::
{'<package>': {'case_sensitive': '<case_sensitive>',
'match_type': '<match_type>'
'type': '<type>'}}
CLI Exa... | [
"List",
"current",
"package",
"locks",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zypperpkg.py#L1823-L1859 | train | List all current locks. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/zypperpkg.py | clean_locks | def clean_locks(root=None):
'''
Remove unused locks that do not currently (with regard to repositories
used) lock any package.
root
Operate on a different root directory.
CLI Example:
.. code-block:: bash
salt '*' pkg.clean_locks
'''
LCK = "removed"
out = {LCK: 0}... | python | def clean_locks(root=None):
'''
Remove unused locks that do not currently (with regard to repositories
used) lock any package.
root
Operate on a different root directory.
CLI Example:
.. code-block:: bash
salt '*' pkg.clean_locks
'''
LCK = "removed"
out = {LCK: 0}... | [
"def",
"clean_locks",
"(",
"root",
"=",
"None",
")",
":",
"LCK",
"=",
"\"removed\"",
"out",
"=",
"{",
"LCK",
":",
"0",
"}",
"locks",
"=",
"os",
".",
"path",
".",
"join",
"(",
"root",
",",
"os",
".",
"path",
".",
"relpath",
"(",
"LOCKS",
",",
"o... | Remove unused locks that do not currently (with regard to repositories
used) lock any package.
root
Operate on a different root directory.
CLI Example:
.. code-block:: bash
salt '*' pkg.clean_locks | [
"Remove",
"unused",
"locks",
"that",
"do",
"not",
"currently",
"(",
"with",
"regard",
"to",
"repositories",
"used",
")",
"lock",
"any",
"package",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zypperpkg.py#L1862-L1888 | train | Remove unused locks that do not currently lock any package. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/zypperpkg.py | unhold | def unhold(name=None, pkgs=None, **kwargs):
'''
Remove specified package lock.
root
operate on a different root directory.
CLI Example:
.. code-block:: bash
salt '*' pkg.remove_lock <package name>
salt '*' pkg.remove_lock <package1>,<package2>,<package3>
salt '*' ... | python | def unhold(name=None, pkgs=None, **kwargs):
'''
Remove specified package lock.
root
operate on a different root directory.
CLI Example:
.. code-block:: bash
salt '*' pkg.remove_lock <package name>
salt '*' pkg.remove_lock <package1>,<package2>,<package3>
salt '*' ... | [
"def",
"unhold",
"(",
"name",
"=",
"None",
",",
"pkgs",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"{",
"}",
"root",
"=",
"kwargs",
".",
"get",
"(",
"'root'",
")",
"if",
"(",
"not",
"name",
"and",
"not",
"pkgs",
")",
"or",
"(... | Remove specified package lock.
root
operate on a different root directory.
CLI Example:
.. code-block:: bash
salt '*' pkg.remove_lock <package name>
salt '*' pkg.remove_lock <package1>,<package2>,<package3>
salt '*' pkg.remove_lock pkgs='["foo", "bar"]' | [
"Remove",
"specified",
"package",
"lock",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zypperpkg.py#L1891-L1932 | train | Remove specified package lock. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/zypperpkg.py | remove_lock | def remove_lock(packages, root=None, **kwargs): # pylint: disable=unused-argument
'''
Remove specified package lock.
root
operate on a different root directory.
CLI Example:
.. code-block:: bash
salt '*' pkg.remove_lock <package name>
salt '*' pkg.remove_lock <package1>,... | python | def remove_lock(packages, root=None, **kwargs): # pylint: disable=unused-argument
'''
Remove specified package lock.
root
operate on a different root directory.
CLI Example:
.. code-block:: bash
salt '*' pkg.remove_lock <package name>
salt '*' pkg.remove_lock <package1>,... | [
"def",
"remove_lock",
"(",
"packages",
",",
"root",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"# pylint: disable=unused-argument",
"salt",
".",
"utils",
".",
"versions",
".",
"warn_until",
"(",
"'Sodium'",
",",
"'This function is deprecated. Please use unhold(... | Remove specified package lock.
root
operate on a different root directory.
CLI Example:
.. code-block:: bash
salt '*' pkg.remove_lock <package name>
salt '*' pkg.remove_lock <package1>,<package2>,<package3>
salt '*' pkg.remove_lock pkgs='["foo", "bar"]' | [
"Remove",
"specified",
"package",
"lock",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zypperpkg.py#L1935-L1968 | train | Remove specified package lock. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/zypperpkg.py | hold | def hold(name=None, pkgs=None, **kwargs):
'''
Add a package lock. Specify packages to lock by exact name.
root
operate on a different root directory.
CLI Example:
.. code-block:: bash
salt '*' pkg.add_lock <package name>
salt '*' pkg.add_lock <package1>,<package2>,<packag... | python | def hold(name=None, pkgs=None, **kwargs):
'''
Add a package lock. Specify packages to lock by exact name.
root
operate on a different root directory.
CLI Example:
.. code-block:: bash
salt '*' pkg.add_lock <package name>
salt '*' pkg.add_lock <package1>,<package2>,<packag... | [
"def",
"hold",
"(",
"name",
"=",
"None",
",",
"pkgs",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"{",
"}",
"root",
"=",
"kwargs",
".",
"get",
"(",
"'root'",
")",
"if",
"(",
"not",
"name",
"and",
"not",
"pkgs",
")",
"or",
"(",... | Add a package lock. Specify packages to lock by exact name.
root
operate on a different root directory.
CLI Example:
.. code-block:: bash
salt '*' pkg.add_lock <package name>
salt '*' pkg.add_lock <package1>,<package2>,<package3>
salt '*' pkg.add_lock pkgs='["foo", "bar"]... | [
"Add",
"a",
"package",
"lock",
".",
"Specify",
"packages",
"to",
"lock",
"by",
"exact",
"name",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zypperpkg.py#L1971-L2016 | train | Add a package lock to the root 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/modules/zypperpkg.py | add_lock | def add_lock(packages, root=None, **kwargs): # pylint: disable=unused-argument
'''
Add a package lock. Specify packages to lock by exact name.
root
operate on a different root directory.
CLI Example:
.. code-block:: bash
salt '*' pkg.add_lock <package name>
salt '*' pkg.... | python | def add_lock(packages, root=None, **kwargs): # pylint: disable=unused-argument
'''
Add a package lock. Specify packages to lock by exact name.
root
operate on a different root directory.
CLI Example:
.. code-block:: bash
salt '*' pkg.add_lock <package name>
salt '*' pkg.... | [
"def",
"add_lock",
"(",
"packages",
",",
"root",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"# pylint: disable=unused-argument",
"salt",
".",
"utils",
".",
"versions",
".",
"warn_until",
"(",
"'Sodium'",
",",
"'This function is deprecated. Please use hold() ins... | Add a package lock. Specify packages to lock by exact name.
root
operate on a different root directory.
CLI Example:
.. code-block:: bash
salt '*' pkg.add_lock <package name>
salt '*' pkg.add_lock <package1>,<package2>,<package3>
salt '*' pkg.add_lock pkgs='["foo", "bar"]... | [
"Add",
"a",
"package",
"lock",
".",
"Specify",
"packages",
"to",
"lock",
"by",
"exact",
"name",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zypperpkg.py#L2019-L2049 | train | Add a lock to a set of packages. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/zypperpkg.py | _get_patterns | def _get_patterns(installed_only=None, root=None):
'''
List all known patterns in repos.
'''
patterns = {}
for element in __zypper__(root=root).nolock.xml.call('se', '-t', 'pattern').getElementsByTagName('solvable'):
installed = element.getAttribute('status') == 'installed'
if (insta... | python | def _get_patterns(installed_only=None, root=None):
'''
List all known patterns in repos.
'''
patterns = {}
for element in __zypper__(root=root).nolock.xml.call('se', '-t', 'pattern').getElementsByTagName('solvable'):
installed = element.getAttribute('status') == 'installed'
if (insta... | [
"def",
"_get_patterns",
"(",
"installed_only",
"=",
"None",
",",
"root",
"=",
"None",
")",
":",
"patterns",
"=",
"{",
"}",
"for",
"element",
"in",
"__zypper__",
"(",
"root",
"=",
"root",
")",
".",
"nolock",
".",
"xml",
".",
"call",
"(",
"'se'",
",",
... | List all known patterns in repos. | [
"List",
"all",
"known",
"patterns",
"in",
"repos",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zypperpkg.py#L2185-L2198 | train | Get all known patterns in repos. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/zypperpkg.py | list_patterns | def list_patterns(refresh=False, root=None):
'''
List all known patterns from available repos.
refresh
force a refresh if set to True.
If set to False (default) it depends on zypper if a refresh is
executed.
root
operate on a different root directory.
CLI Examples:... | python | def list_patterns(refresh=False, root=None):
'''
List all known patterns from available repos.
refresh
force a refresh if set to True.
If set to False (default) it depends on zypper if a refresh is
executed.
root
operate on a different root directory.
CLI Examples:... | [
"def",
"list_patterns",
"(",
"refresh",
"=",
"False",
",",
"root",
"=",
"None",
")",
":",
"if",
"refresh",
":",
"refresh_db",
"(",
"root",
")",
"return",
"_get_patterns",
"(",
"root",
"=",
"root",
")"
] | List all known patterns from available repos.
refresh
force a refresh if set to True.
If set to False (default) it depends on zypper if a refresh is
executed.
root
operate on a different root directory.
CLI Examples:
.. code-block:: bash
salt '*' pkg.list_pat... | [
"List",
"all",
"known",
"patterns",
"from",
"available",
"repos",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zypperpkg.py#L2201-L2222 | train | List all known patterns from available repos. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/zypperpkg.py | search | def search(criteria, refresh=False, **kwargs):
'''
List known packages, available to the system.
refresh
force a refresh if set to True.
If set to False (default) it depends on zypper if a refresh is
executed.
match (str)
One of `exact`, `words`, `substrings`. Search fo... | python | def search(criteria, refresh=False, **kwargs):
'''
List known packages, available to the system.
refresh
force a refresh if set to True.
If set to False (default) it depends on zypper if a refresh is
executed.
match (str)
One of `exact`, `words`, `substrings`. Search fo... | [
"def",
"search",
"(",
"criteria",
",",
"refresh",
"=",
"False",
",",
"*",
"*",
"kwargs",
")",
":",
"ALLOWED_SEARCH_OPTIONS",
"=",
"{",
"'provides'",
":",
"'--provides'",
",",
"'recommends'",
":",
"'--recommends'",
",",
"'requires'",
":",
"'--requires'",
",",
... | List known packages, available to the system.
refresh
force a refresh if set to True.
If set to False (default) it depends on zypper if a refresh is
executed.
match (str)
One of `exact`, `words`, `substrings`. Search for an `exact` match
or for the whole `words` only. D... | [
"List",
"known",
"packages",
"available",
"to",
"the",
"system",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zypperpkg.py#L2241-L2345 | train | Search for known packages in the system. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/zypperpkg.py | _get_first_aggregate_text | def _get_first_aggregate_text(node_list):
'''
Extract text from the first occurred DOM aggregate.
'''
if not node_list:
return ''
out = []
for node in node_list[0].childNodes:
if node.nodeType == dom.Document.TEXT_NODE:
out.append(node.nodeValue)
return '\n'.join... | python | def _get_first_aggregate_text(node_list):
'''
Extract text from the first occurred DOM aggregate.
'''
if not node_list:
return ''
out = []
for node in node_list[0].childNodes:
if node.nodeType == dom.Document.TEXT_NODE:
out.append(node.nodeValue)
return '\n'.join... | [
"def",
"_get_first_aggregate_text",
"(",
"node_list",
")",
":",
"if",
"not",
"node_list",
":",
"return",
"''",
"out",
"=",
"[",
"]",
"for",
"node",
"in",
"node_list",
"[",
"0",
"]",
".",
"childNodes",
":",
"if",
"node",
".",
"nodeType",
"==",
"dom",
".... | Extract text from the first occurred DOM aggregate. | [
"Extract",
"text",
"from",
"the",
"first",
"occurred",
"DOM",
"aggregate",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zypperpkg.py#L2348-L2359 | train | Extract text from the first occurred DOM aggregate. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/zypperpkg.py | list_products | def list_products(all=False, refresh=False, root=None):
'''
List all available or installed SUSE products.
all
List all products available or only installed. Default is False.
refresh
force a refresh if set to True.
If set to False (default) it depends on zypper if a refresh is... | python | def list_products(all=False, refresh=False, root=None):
'''
List all available or installed SUSE products.
all
List all products available or only installed. Default is False.
refresh
force a refresh if set to True.
If set to False (default) it depends on zypper if a refresh is... | [
"def",
"list_products",
"(",
"all",
"=",
"False",
",",
"refresh",
"=",
"False",
",",
"root",
"=",
"None",
")",
":",
"if",
"refresh",
":",
"refresh_db",
"(",
"root",
")",
"ret",
"=",
"list",
"(",
")",
"OEM_PATH",
"=",
"'/var/lib/suseRegister/OEM'",
"if",
... | List all available or installed SUSE products.
all
List all products available or only installed. Default is False.
refresh
force a refresh if set to True.
If set to False (default) it depends on zypper if a refresh is
executed.
root
operate on a different root dir... | [
"List",
"all",
"available",
"or",
"installed",
"SUSE",
"products",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zypperpkg.py#L2362-L2431 | train | List available or only installed SUSE products. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/zypperpkg.py | download | def download(*packages, **kwargs):
'''
Download packages to the local disk.
refresh
force a refresh if set to True.
If set to False (default) it depends on zypper if a refresh is
executed.
root
operate on a different root directory.
CLI example:
.. code-block:... | python | def download(*packages, **kwargs):
'''
Download packages to the local disk.
refresh
force a refresh if set to True.
If set to False (default) it depends on zypper if a refresh is
executed.
root
operate on a different root directory.
CLI example:
.. code-block:... | [
"def",
"download",
"(",
"*",
"packages",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"not",
"packages",
":",
"raise",
"SaltInvocationError",
"(",
"'No packages specified'",
")",
"root",
"=",
"kwargs",
".",
"get",
"(",
"'root'",
",",
"None",
")",
"refresh",
... | Download packages to the local disk.
refresh
force a refresh if set to True.
If set to False (default) it depends on zypper if a refresh is
executed.
root
operate on a different root directory.
CLI example:
.. code-block:: bash
salt '*' pkg.download httpd
... | [
"Download",
"packages",
"to",
"the",
"local",
"disk",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zypperpkg.py#L2434-L2485 | train | Download packages to the local disk. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/zypperpkg.py | _get_patches | def _get_patches(installed_only=False, root=None):
'''
List all known patches in repos.
'''
patches = {}
for element in __zypper__(root=root).nolock.xml.call('se', '-t', 'patch').getElementsByTagName('solvable'):
installed = element.getAttribute('status') == 'installed'
if (installed... | python | def _get_patches(installed_only=False, root=None):
'''
List all known patches in repos.
'''
patches = {}
for element in __zypper__(root=root).nolock.xml.call('se', '-t', 'patch').getElementsByTagName('solvable'):
installed = element.getAttribute('status') == 'installed'
if (installed... | [
"def",
"_get_patches",
"(",
"installed_only",
"=",
"False",
",",
"root",
"=",
"None",
")",
":",
"patches",
"=",
"{",
"}",
"for",
"element",
"in",
"__zypper__",
"(",
"root",
"=",
"root",
")",
".",
"nolock",
".",
"xml",
".",
"call",
"(",
"'se'",
",",
... | List all known patches in repos. | [
"List",
"all",
"known",
"patches",
"in",
"repos",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zypperpkg.py#L2563-L2576 | train | Get all known patches in repos. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/zypperpkg.py | list_patches | def list_patches(refresh=False, root=None, **kwargs):
'''
.. versionadded:: 2017.7.0
List all known advisory patches from available repos.
refresh
force a refresh if set to True.
If set to False (default) it depends on zypper if a refresh is
executed.
root
operate ... | python | def list_patches(refresh=False, root=None, **kwargs):
'''
.. versionadded:: 2017.7.0
List all known advisory patches from available repos.
refresh
force a refresh if set to True.
If set to False (default) it depends on zypper if a refresh is
executed.
root
operate ... | [
"def",
"list_patches",
"(",
"refresh",
"=",
"False",
",",
"root",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"refresh",
":",
"refresh_db",
"(",
"root",
")",
"return",
"_get_patches",
"(",
"root",
"=",
"root",
")"
] | .. versionadded:: 2017.7.0
List all known advisory patches from available repos.
refresh
force a refresh if set to True.
If set to False (default) it depends on zypper if a refresh is
executed.
root
operate on a different root directory.
CLI Examples:
.. code-blo... | [
"..",
"versionadded",
"::",
"2017",
".",
"7",
".",
"0"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zypperpkg.py#L2579-L2602 | train | List all known advisory patches from available repos. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/zypperpkg.py | list_provides | def list_provides(root=None, **kwargs):
'''
.. versionadded:: 2018.3.0
List package provides of installed packages as a dict.
{'<provided_name>': ['<package_name>', '<package_name>', ...]}
root
operate on a different root directory.
CLI Examples:
.. code-block:: bash
sal... | python | def list_provides(root=None, **kwargs):
'''
.. versionadded:: 2018.3.0
List package provides of installed packages as a dict.
{'<provided_name>': ['<package_name>', '<package_name>', ...]}
root
operate on a different root directory.
CLI Examples:
.. code-block:: bash
sal... | [
"def",
"list_provides",
"(",
"root",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"__context__",
".",
"get",
"(",
"'pkg.list_provides'",
")",
"if",
"not",
"ret",
":",
"cmd",
"=",
"[",
"'rpm'",
"]",
"if",
"root",
":",
"cmd",
".",
"ext... | .. versionadded:: 2018.3.0
List package provides of installed packages as a dict.
{'<provided_name>': ['<package_name>', '<package_name>', ...]}
root
operate on a different root directory.
CLI Examples:
.. code-block:: bash
salt '*' pkg.list_provides | [
"..",
"versionadded",
"::",
"2018",
".",
"3",
".",
"0"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zypperpkg.py#L2623-L2657 | train | List packages provides by installed packages. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/zypperpkg.py | resolve_capabilities | def resolve_capabilities(pkgs, refresh=False, root=None, **kwargs):
'''
.. versionadded:: 2018.3.0
Convert name provides in ``pkgs`` into real package names if
``resolve_capabilities`` parameter is set to True. In case of
``resolve_capabilities`` is set to False the package list
is returned unc... | python | def resolve_capabilities(pkgs, refresh=False, root=None, **kwargs):
'''
.. versionadded:: 2018.3.0
Convert name provides in ``pkgs`` into real package names if
``resolve_capabilities`` parameter is set to True. In case of
``resolve_capabilities`` is set to False the package list
is returned unc... | [
"def",
"resolve_capabilities",
"(",
"pkgs",
",",
"refresh",
"=",
"False",
",",
"root",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"refresh",
":",
"refresh_db",
"(",
"root",
")",
"ret",
"=",
"list",
"(",
")",
"for",
"pkg",
"in",
"pkgs",
"... | .. versionadded:: 2018.3.0
Convert name provides in ``pkgs`` into real package names if
``resolve_capabilities`` parameter is set to True. In case of
``resolve_capabilities`` is set to False the package list
is returned unchanged.
refresh
force a refresh if set to True.
If set to F... | [
"..",
"versionadded",
"::",
"2018",
".",
"3",
".",
"0"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zypperpkg.py#L2660-L2723 | train | This function will search for a list of packages and return a list of all available capabilities. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/zypperpkg.py | _Zypper._reset | def _reset(self):
'''
Resets values of the call setup.
:return:
'''
self.__cmd = ['zypper', '--non-interactive']
self.__exit_code = 0
self.__call_result = dict()
self.__error_msg = ''
self.__env = salt.utils.environment.get_module_environment(glob... | python | def _reset(self):
'''
Resets values of the call setup.
:return:
'''
self.__cmd = ['zypper', '--non-interactive']
self.__exit_code = 0
self.__call_result = dict()
self.__error_msg = ''
self.__env = salt.utils.environment.get_module_environment(glob... | [
"def",
"_reset",
"(",
"self",
")",
":",
"self",
".",
"__cmd",
"=",
"[",
"'zypper'",
",",
"'--non-interactive'",
"]",
"self",
".",
"__exit_code",
"=",
"0",
"self",
".",
"__call_result",
"=",
"dict",
"(",
")",
"self",
".",
"__error_msg",
"=",
"''",
"self... | Resets values of the call setup.
:return: | [
"Resets",
"values",
"of",
"the",
"call",
"setup",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zypperpkg.py#L112-L134 | train | Resets the values of the call setup. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/zypperpkg.py | _Zypper._is_error | def _is_error(self):
'''
Is this is an error code?
:return:
'''
if self.exit_code:
msg = self.SUCCESS_EXIT_CODES.get(self.exit_code)
if msg:
log.info(msg)
msg = self.WARNING_EXIT_CODES.get(self.exit_code)
if msg:
... | python | def _is_error(self):
'''
Is this is an error code?
:return:
'''
if self.exit_code:
msg = self.SUCCESS_EXIT_CODES.get(self.exit_code)
if msg:
log.info(msg)
msg = self.WARNING_EXIT_CODES.get(self.exit_code)
if msg:
... | [
"def",
"_is_error",
"(",
"self",
")",
":",
"if",
"self",
".",
"exit_code",
":",
"msg",
"=",
"self",
".",
"SUCCESS_EXIT_CODES",
".",
"get",
"(",
"self",
".",
"exit_code",
")",
"if",
"msg",
":",
"log",
".",
"info",
"(",
"msg",
")",
"msg",
"=",
"self"... | Is this is an error code?
:return: | [
"Is",
"this",
"is",
"an",
"error",
"code?"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zypperpkg.py#L214-L228 | train | Is this is an error code? | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/zypperpkg.py | _Zypper._is_xml_mode | def _is_xml_mode(self):
'''
Is Zypper's output is in XML format?
:return:
'''
return [itm for itm in self.XML_DIRECTIVES if itm in self.__cmd] and True or False | python | def _is_xml_mode(self):
'''
Is Zypper's output is in XML format?
:return:
'''
return [itm for itm in self.XML_DIRECTIVES if itm in self.__cmd] and True or False | [
"def",
"_is_xml_mode",
"(",
"self",
")",
":",
"return",
"[",
"itm",
"for",
"itm",
"in",
"self",
".",
"XML_DIRECTIVES",
"if",
"itm",
"in",
"self",
".",
"__cmd",
"]",
"and",
"True",
"or",
"False"
] | Is Zypper's output is in XML format?
:return: | [
"Is",
"Zypper",
"s",
"output",
"is",
"in",
"XML",
"format?"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zypperpkg.py#L238-L244 | train | Is Zypper s output is in XML format? | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/zypperpkg.py | _Zypper._check_result | def _check_result(self):
'''
Check and set the result of a zypper command. In case of an error,
either raise a CommandExecutionError or extract the error.
result
The result of a zypper command called with cmd.run_all
'''
if not self.__call_result:
... | python | def _check_result(self):
'''
Check and set the result of a zypper command. In case of an error,
either raise a CommandExecutionError or extract the error.
result
The result of a zypper command called with cmd.run_all
'''
if not self.__call_result:
... | [
"def",
"_check_result",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"__call_result",
":",
"raise",
"CommandExecutionError",
"(",
"'No output result from Zypper?'",
")",
"self",
".",
"exit_code",
"=",
"self",
".",
"__call_result",
"[",
"'retcode'",
"]",
"if"... | Check and set the result of a zypper command. In case of an error,
either raise a CommandExecutionError or extract the error.
result
The result of a zypper command called with cmd.run_all | [
"Check",
"and",
"set",
"the",
"result",
"of",
"a",
"zypper",
"command",
".",
"In",
"case",
"of",
"an",
"error",
"either",
"raise",
"a",
"CommandExecutionError",
"or",
"extract",
"the",
"error",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zypperpkg.py#L246-L281 | train | Check and set the result of a zypper command. In case of an error extract the error. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/zypperpkg.py | _Zypper.__call | def __call(self, *args, **kwargs):
'''
Call Zypper.
:param state:
:return:
'''
self.__called = True
if self.__xml:
self.__cmd.append('--xmlout')
if not self.__refresh and '--no-refresh' not in args:
self.__cmd.append('--no-refresh'... | python | def __call(self, *args, **kwargs):
'''
Call Zypper.
:param state:
:return:
'''
self.__called = True
if self.__xml:
self.__cmd.append('--xmlout')
if not self.__refresh and '--no-refresh' not in args:
self.__cmd.append('--no-refresh'... | [
"def",
"__call",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"self",
".",
"__called",
"=",
"True",
"if",
"self",
".",
"__xml",
":",
"self",
".",
"__cmd",
".",
"append",
"(",
"'--xmlout'",
")",
"if",
"not",
"self",
".",
"__re... | Call Zypper.
:param state:
:return: | [
"Call",
"Zypper",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zypperpkg.py#L283-L356 | train | Call Zypper. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/zypperpkg.py | Wildcard._get_available_versions | def _get_available_versions(self):
'''
Get available versions of the package.
:return:
'''
solvables = self.zypper.nolock.xml.call('se', '-xv', self.name).getElementsByTagName('solvable')
if not solvables:
raise CommandExecutionError('No packages found matchin... | python | def _get_available_versions(self):
'''
Get available versions of the package.
:return:
'''
solvables = self.zypper.nolock.xml.call('se', '-xv', self.name).getElementsByTagName('solvable')
if not solvables:
raise CommandExecutionError('No packages found matchin... | [
"def",
"_get_available_versions",
"(",
"self",
")",
":",
"solvables",
"=",
"self",
".",
"zypper",
".",
"nolock",
".",
"xml",
".",
"call",
"(",
"'se'",
",",
"'-xv'",
",",
"self",
".",
"name",
")",
".",
"getElementsByTagName",
"(",
"'solvable'",
")",
"if",... | Get available versions of the package.
:return: | [
"Get",
"available",
"versions",
"of",
"the",
"package",
".",
":",
"return",
":"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zypperpkg.py#L402-L412 | train | Get available versions of the package. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/zypperpkg.py | Wildcard._get_scope_versions | def _get_scope_versions(self, pkg_versions):
'''
Get available difference between next possible matches.
:return:
'''
get_in_versions = []
for p_version in pkg_versions:
if fnmatch.fnmatch(p_version, self.version):
get_in_versions.append(p_ver... | python | def _get_scope_versions(self, pkg_versions):
'''
Get available difference between next possible matches.
:return:
'''
get_in_versions = []
for p_version in pkg_versions:
if fnmatch.fnmatch(p_version, self.version):
get_in_versions.append(p_ver... | [
"def",
"_get_scope_versions",
"(",
"self",
",",
"pkg_versions",
")",
":",
"get_in_versions",
"=",
"[",
"]",
"for",
"p_version",
"in",
"pkg_versions",
":",
"if",
"fnmatch",
".",
"fnmatch",
"(",
"p_version",
",",
"self",
".",
"version",
")",
":",
"get_in_versi... | Get available difference between next possible matches.
:return: | [
"Get",
"available",
"difference",
"between",
"next",
"possible",
"matches",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zypperpkg.py#L414-L424 | train | Get available difference between next possible matches. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/zypperpkg.py | Wildcard._set_version | def _set_version(self, version):
'''
Stash operator from the version, if any.
:return:
'''
if not version:
return
exact_version = re.sub(r'[<>=+]*', '', version)
self._op = version.replace(exact_version, '') or None
if self._op and self._op n... | python | def _set_version(self, version):
'''
Stash operator from the version, if any.
:return:
'''
if not version:
return
exact_version = re.sub(r'[<>=+]*', '', version)
self._op = version.replace(exact_version, '') or None
if self._op and self._op n... | [
"def",
"_set_version",
"(",
"self",
",",
"version",
")",
":",
"if",
"not",
"version",
":",
"return",
"exact_version",
"=",
"re",
".",
"sub",
"(",
"r'[<>=+]*'",
",",
"''",
",",
"version",
")",
"self",
".",
"_op",
"=",
"version",
".",
"replace",
"(",
"... | Stash operator from the version, if any.
:return: | [
"Stash",
"operator",
"from",
"the",
"version",
"if",
"any",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/zypperpkg.py#L426-L439 | train | Set the version of the zypper 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/utils/vt.py | _cleanup | def _cleanup():
'''
Make sure that any terminal processes still running when __del__ was called
to the waited and cleaned up.
'''
for inst in _ACTIVE[:]:
res = inst.isalive()
if res is not True:
try:
_ACTIVE.remove(inst)
except ValueError:
... | python | def _cleanup():
'''
Make sure that any terminal processes still running when __del__ was called
to the waited and cleaned up.
'''
for inst in _ACTIVE[:]:
res = inst.isalive()
if res is not True:
try:
_ACTIVE.remove(inst)
except ValueError:
... | [
"def",
"_cleanup",
"(",
")",
":",
"for",
"inst",
"in",
"_ACTIVE",
"[",
":",
"]",
":",
"res",
"=",
"inst",
".",
"isalive",
"(",
")",
"if",
"res",
"is",
"not",
"True",
":",
"try",
":",
"_ACTIVE",
".",
"remove",
"(",
"inst",
")",
"except",
"ValueErr... | Make sure that any terminal processes still running when __del__ was called
to the waited and cleaned up. | [
"Make",
"sure",
"that",
"any",
"terminal",
"processes",
"still",
"running",
"when",
"__del__",
"was",
"called",
"to",
"the",
"waited",
"and",
"cleaned",
"up",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vt.py#L78-L91 | train | Clean up any remaining terminal processes that are still 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/utils/vt.py | Terminal.sendline | def sendline(self, data, linesep=os.linesep):
'''
Send the provided data to the terminal appending a line feed.
'''
return self.send('{0}{1}'.format(data, linesep)) | python | def sendline(self, data, linesep=os.linesep):
'''
Send the provided data to the terminal appending a line feed.
'''
return self.send('{0}{1}'.format(data, linesep)) | [
"def",
"sendline",
"(",
"self",
",",
"data",
",",
"linesep",
"=",
"os",
".",
"linesep",
")",
":",
"return",
"self",
".",
"send",
"(",
"'{0}{1}'",
".",
"format",
"(",
"data",
",",
"linesep",
")",
")"
] | Send the provided data to the terminal appending a line feed. | [
"Send",
"the",
"provided",
"data",
"to",
"the",
"terminal",
"appending",
"a",
"line",
"feed",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vt.py#L295-L299 | train | Send the provided data to the terminal appending a line feed. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/vt.py | Terminal.recv | def recv(self, maxsize=None):
'''
Receive data from the terminal as a (``stdout``, ``stderr``) tuple. If
any of those is ``None`` we can no longer communicate with the
terminal's child process.
'''
if maxsize is None:
maxsize = 1024
elif maxsize < 1:
... | python | def recv(self, maxsize=None):
'''
Receive data from the terminal as a (``stdout``, ``stderr``) tuple. If
any of those is ``None`` we can no longer communicate with the
terminal's child process.
'''
if maxsize is None:
maxsize = 1024
elif maxsize < 1:
... | [
"def",
"recv",
"(",
"self",
",",
"maxsize",
"=",
"None",
")",
":",
"if",
"maxsize",
"is",
"None",
":",
"maxsize",
"=",
"1024",
"elif",
"maxsize",
"<",
"1",
":",
"maxsize",
"=",
"1",
"return",
"self",
".",
"_recv",
"(",
"maxsize",
")"
] | Receive data from the terminal as a (``stdout``, ``stderr``) tuple. If
any of those is ``None`` we can no longer communicate with the
terminal's child process. | [
"Receive",
"data",
"from",
"the",
"terminal",
"as",
"a",
"(",
"stdout",
"stderr",
")",
"tuple",
".",
"If",
"any",
"of",
"those",
"is",
"None",
"we",
"can",
"no",
"longer",
"communicate",
"with",
"the",
"terminal",
"s",
"child",
"process",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vt.py#L301-L311 | train | Receive data from the terminal as a tuple. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/vt.py | Terminal.close | def close(self, terminate=True, kill=False):
'''
Close the communication with the terminal's child.
If ``terminate`` is ``True`` then additionally try to terminate the
terminal, and if ``kill`` is also ``True``, kill the terminal if
terminating it was not enough.
'''
... | python | def close(self, terminate=True, kill=False):
'''
Close the communication with the terminal's child.
If ``terminate`` is ``True`` then additionally try to terminate the
terminal, and if ``kill`` is also ``True``, kill the terminal if
terminating it was not enough.
'''
... | [
"def",
"close",
"(",
"self",
",",
"terminate",
"=",
"True",
",",
"kill",
"=",
"False",
")",
":",
"if",
"not",
"self",
".",
"closed",
":",
"if",
"self",
".",
"child_fd",
"is",
"not",
"None",
":",
"os",
".",
"close",
"(",
"self",
".",
"child_fd",
"... | Close the communication with the terminal's child.
If ``terminate`` is ``True`` then additionally try to terminate the
terminal, and if ``kill`` is also ``True``, kill the terminal if
terminating it was not enough. | [
"Close",
"the",
"communication",
"with",
"the",
"terminal",
"s",
"child",
".",
"If",
"terminate",
"is",
"True",
"then",
"additionally",
"try",
"to",
"terminate",
"the",
"terminal",
"and",
"if",
"kill",
"is",
"also",
"True",
"kill",
"the",
"terminal",
"if",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/vt.py#L313-L331 | train | Close the communication with the terminal s child. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/pyrax_queues.py | present | def present(name, provider):
'''
Ensure the RackSpace queue exists.
name
Name of the Rackspace queue.
provider
Salt Cloud Provider
'''
ret = {'name': name, 'result': True, 'comment': '', 'changes': {}}
is_present = list(__salt__['cloud.action']('queues_exists', provider=pr... | python | def present(name, provider):
'''
Ensure the RackSpace queue exists.
name
Name of the Rackspace queue.
provider
Salt Cloud Provider
'''
ret = {'name': name, 'result': True, 'comment': '', 'changes': {}}
is_present = list(__salt__['cloud.action']('queues_exists', provider=pr... | [
"def",
"present",
"(",
"name",
",",
"provider",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'result'",
":",
"True",
",",
"'comment'",
":",
"''",
",",
"'changes'",
":",
"{",
"}",
"}",
"is_present",
"=",
"list",
"(",
"__salt__",
"[",
"'cl... | Ensure the RackSpace queue exists.
name
Name of the Rackspace queue.
provider
Salt Cloud Provider | [
"Ensure",
"the",
"RackSpace",
"queue",
"exists",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pyrax_queues.py#L36-L68 | train | Ensure the Rackspace queue 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/pyrax_queues.py | absent | def absent(name, provider):
'''
Ensure the named Rackspace queue is deleted.
name
Name of the Rackspace queue.
provider
Salt Cloud provider
'''
ret = {'name': name, 'result': True, 'comment': '', 'changes': {}}
is_present = list(__salt__['cloud.action']('queues_exists', pr... | python | def absent(name, provider):
'''
Ensure the named Rackspace queue is deleted.
name
Name of the Rackspace queue.
provider
Salt Cloud provider
'''
ret = {'name': name, 'result': True, 'comment': '', 'changes': {}}
is_present = list(__salt__['cloud.action']('queues_exists', pr... | [
"def",
"absent",
"(",
"name",
",",
"provider",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'result'",
":",
"True",
",",
"'comment'",
":",
"''",
",",
"'changes'",
":",
"{",
"}",
"}",
"is_present",
"=",
"list",
"(",
"__salt__",
"[",
"'clo... | Ensure the named Rackspace queue is deleted.
name
Name of the Rackspace queue.
provider
Salt Cloud provider | [
"Ensure",
"the",
"named",
"Rackspace",
"queue",
"is",
"deleted",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pyrax_queues.py#L71-L102 | train | Ensure the named Rackspace queue is deleted. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/runners/drac.py | __connect | def __connect(hostname, timeout=20, username=None, password=None):
'''
Connect to the DRAC
'''
drac_cred = __opts__.get('drac')
err_msg = 'No drac login credentials found. Please add the \'username\' and \'password\' ' \
'fields beneath a \'drac\' key in the master configuration file. ... | python | def __connect(hostname, timeout=20, username=None, password=None):
'''
Connect to the DRAC
'''
drac_cred = __opts__.get('drac')
err_msg = 'No drac login credentials found. Please add the \'username\' and \'password\' ' \
'fields beneath a \'drac\' key in the master configuration file. ... | [
"def",
"__connect",
"(",
"hostname",
",",
"timeout",
"=",
"20",
",",
"username",
"=",
"None",
",",
"password",
"=",
"None",
")",
":",
"drac_cred",
"=",
"__opts__",
".",
"get",
"(",
"'drac'",
")",
"err_msg",
"=",
"'No drac login credentials found. Please add th... | Connect to the DRAC | [
"Connect",
"to",
"the",
"DRAC"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/drac.py#L37-L66 | train | Connect to the DRAC
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/runners/drac.py | __version | def __version(client):
'''
Grab DRAC version
'''
versions = {9: 'CMC',
8: 'iDRAC6',
10: 'iDRAC6',
11: 'iDRAC6',
16: 'iDRAC7',
17: 'iDRAC7'}
if isinstance(client, paramiko.SSHClient):
(stdin, stdout, stderr) = cl... | python | def __version(client):
'''
Grab DRAC version
'''
versions = {9: 'CMC',
8: 'iDRAC6',
10: 'iDRAC6',
11: 'iDRAC6',
16: 'iDRAC7',
17: 'iDRAC7'}
if isinstance(client, paramiko.SSHClient):
(stdin, stdout, stderr) = cl... | [
"def",
"__version",
"(",
"client",
")",
":",
"versions",
"=",
"{",
"9",
":",
"'CMC'",
",",
"8",
":",
"'iDRAC6'",
",",
"10",
":",
"'iDRAC6'",
",",
"11",
":",
"'iDRAC6'",
",",
"16",
":",
"'iDRAC7'",
",",
"17",
":",
"'iDRAC7'",
"}",
"if",
"isinstance"... | Grab DRAC version | [
"Grab",
"DRAC",
"version"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/drac.py#L69-L87 | train | Get DRAC version of the current DRAC. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/runners/drac.py | pxe | def pxe(hostname, timeout=20, username=None, password=None):
'''
Connect to the Dell DRAC and have the boot order set to PXE
and power cycle the system to PXE boot
CLI Example:
.. code-block:: bash
salt-run drac.pxe example.com
'''
_cmds = [
'racadm config -g cfgServerInfo... | python | def pxe(hostname, timeout=20, username=None, password=None):
'''
Connect to the Dell DRAC and have the boot order set to PXE
and power cycle the system to PXE boot
CLI Example:
.. code-block:: bash
salt-run drac.pxe example.com
'''
_cmds = [
'racadm config -g cfgServerInfo... | [
"def",
"pxe",
"(",
"hostname",
",",
"timeout",
"=",
"20",
",",
"username",
"=",
"None",
",",
"password",
"=",
"None",
")",
":",
"_cmds",
"=",
"[",
"'racadm config -g cfgServerInfo -o cfgServerFirstBootDevice pxe'",
",",
"'racadm config -g cfgServerInfo -o cfgServerBootO... | Connect to the Dell DRAC and have the boot order set to PXE
and power cycle the system to PXE boot
CLI Example:
.. code-block:: bash
salt-run drac.pxe example.com | [
"Connect",
"to",
"the",
"Dell",
"DRAC",
"and",
"have",
"the",
"boot",
"order",
"set",
"to",
"PXE",
"and",
"power",
"cycle",
"the",
"system",
"to",
"PXE",
"boot"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/drac.py#L90-L121 | train | Connect to the Dell DRAC and power cycle the system to PXE boot
Taxonomy | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/runners/drac.py | reboot | def reboot(hostname, timeout=20, username=None, password=None):
'''
Reboot a server using the Dell DRAC
CLI Example:
.. code-block:: bash
salt-run drac.reboot example.com
'''
client = __connect(hostname, timeout, username, password)
if isinstance(client, paramiko.SSHClient):
... | python | def reboot(hostname, timeout=20, username=None, password=None):
'''
Reboot a server using the Dell DRAC
CLI Example:
.. code-block:: bash
salt-run drac.reboot example.com
'''
client = __connect(hostname, timeout, username, password)
if isinstance(client, paramiko.SSHClient):
... | [
"def",
"reboot",
"(",
"hostname",
",",
"timeout",
"=",
"20",
",",
"username",
"=",
"None",
",",
"password",
"=",
"None",
")",
":",
"client",
"=",
"__connect",
"(",
"hostname",
",",
"timeout",
",",
"username",
",",
"password",
")",
"if",
"isinstance",
"... | Reboot a server using the Dell DRAC
CLI Example:
.. code-block:: bash
salt-run drac.reboot example.com | [
"Reboot",
"a",
"server",
"using",
"the",
"Dell",
"DRAC"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/drac.py#L124-L148 | train | Reboot a server using the Dell DRAC
CLI Example | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/runners/drac.py | version | def version(hostname, timeout=20, username=None, password=None):
'''
Display the version of DRAC
CLI Example:
.. code-block:: bash
salt-run drac.version example.com
'''
return __version(__connect(hostname, timeout, username, password)) | python | def version(hostname, timeout=20, username=None, password=None):
'''
Display the version of DRAC
CLI Example:
.. code-block:: bash
salt-run drac.version example.com
'''
return __version(__connect(hostname, timeout, username, password)) | [
"def",
"version",
"(",
"hostname",
",",
"timeout",
"=",
"20",
",",
"username",
"=",
"None",
",",
"password",
"=",
"None",
")",
":",
"return",
"__version",
"(",
"__connect",
"(",
"hostname",
",",
"timeout",
",",
"username",
",",
"password",
")",
")"
] | Display the version of DRAC
CLI Example:
.. code-block:: bash
salt-run drac.version example.com | [
"Display",
"the",
"version",
"of",
"DRAC"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/drac.py#L205-L215 | train | Display the version of DRAC
CLI Example : DRAC
getTerminal version of DRAC
getTerminal | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/glxinfo.py | beacon | def beacon(config):
'''
Emit the status of a connected display to the minion
Mainly this is used to detect when the display fails to connect
for whatever reason.
.. code-block:: yaml
beacons:
glxinfo:
- user: frank
- screen_event: True
'''
log.t... | python | def beacon(config):
'''
Emit the status of a connected display to the minion
Mainly this is used to detect when the display fails to connect
for whatever reason.
.. code-block:: yaml
beacons:
glxinfo:
- user: frank
- screen_event: True
'''
log.t... | [
"def",
"beacon",
"(",
"config",
")",
":",
"log",
".",
"trace",
"(",
"'glxinfo beacon starting'",
")",
"ret",
"=",
"[",
"]",
"_config",
"=",
"{",
"}",
"list",
"(",
"map",
"(",
"_config",
".",
"update",
",",
"config",
")",
")",
"retcode",
"=",
"__salt_... | Emit the status of a connected display to the minion
Mainly this is used to detect when the display fails to connect
for whatever reason.
.. code-block:: yaml
beacons:
glxinfo:
- user: frank
- screen_event: True | [
"Emit",
"the",
"status",
"of",
"a",
"connected",
"display",
"to",
"the",
"minion"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/beacons/glxinfo.py#L49-L82 | train | Emit the status of a connected display to 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/runners/config.py | get | def get(key, default='', delimiter=':'):
'''
Retrieve master config options, with optional nesting via the delimiter
argument.
**Arguments**
default
If the key is not found, the default will be returned instead
delimiter
Override the delimiter used to separate nested levels ... | python | def get(key, default='', delimiter=':'):
'''
Retrieve master config options, with optional nesting via the delimiter
argument.
**Arguments**
default
If the key is not found, the default will be returned instead
delimiter
Override the delimiter used to separate nested levels ... | [
"def",
"get",
"(",
"key",
",",
"default",
"=",
"''",
",",
"delimiter",
"=",
"':'",
")",
":",
"ret",
"=",
"salt",
".",
"utils",
".",
"data",
".",
"traverse_dict_and_list",
"(",
"__opts__",
",",
"key",
",",
"default",
"=",
"'_|-'",
",",
"delimiter",
"=... | Retrieve master config options, with optional nesting via the delimiter
argument.
**Arguments**
default
If the key is not found, the default will be returned instead
delimiter
Override the delimiter used to separate nested levels of a data
structure.
CLI Example:
.... | [
"Retrieve",
"master",
"config",
"options",
"with",
"optional",
"nesting",
"via",
"the",
"delimiter",
"argument",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/config.py#L12-L40 | train | Get a master config option | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/namecheap_ssl.py | reissue | def reissue(csr_file,
certificate_id,
web_server_type,
approver_email=None,
http_dc_validation=False,
**kwargs):
'''
Reissues a purchased SSL certificate. Returns a dictionary of result
values.
csr_file
Path to Certificate Signing Requ... | python | def reissue(csr_file,
certificate_id,
web_server_type,
approver_email=None,
http_dc_validation=False,
**kwargs):
'''
Reissues a purchased SSL certificate. Returns a dictionary of result
values.
csr_file
Path to Certificate Signing Requ... | [
"def",
"reissue",
"(",
"csr_file",
",",
"certificate_id",
",",
"web_server_type",
",",
"approver_email",
"=",
"None",
",",
"http_dc_validation",
"=",
"False",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"__get_certificates",
"(",
"'namecheap.ssl.reissue'",
",",
... | Reissues a purchased SSL certificate. Returns a dictionary of result
values.
csr_file
Path to Certificate Signing Request file
certificate_id
Unique ID of the SSL certificate you wish to activate
web_server_type
The type of certificate format to return. Possible values include... | [
"Reissues",
"a",
"purchased",
"SSL",
"certificate",
".",
"Returns",
"a",
"dictionary",
"of",
"result",
"values",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/namecheap_ssl.py#L58-L128 | train | Namecheap. ssl. reissue. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/namecheap_ssl.py | renew | def renew(years, certificate_id, certificate_type, promotion_code=None):
'''
Renews an SSL certificate if it is ACTIVE and Expires <= 30 days. Returns
the following information:
- The certificate ID
- The order ID
- The transaction ID
- The amount charged for the order
years : 1
... | python | def renew(years, certificate_id, certificate_type, promotion_code=None):
'''
Renews an SSL certificate if it is ACTIVE and Expires <= 30 days. Returns
the following information:
- The certificate ID
- The order ID
- The transaction ID
- The amount charged for the order
years : 1
... | [
"def",
"renew",
"(",
"years",
",",
"certificate_id",
",",
"certificate_type",
",",
"promotion_code",
"=",
"None",
")",
":",
"valid_certs",
"=",
"(",
"'QuickSSL Premium'",
",",
"'RapidSSL'",
",",
"'RapidSSL Wildcard'",
",",
"'PremiumSSL'",
",",
"'InstantSSL'",
",",... | Renews an SSL certificate if it is ACTIVE and Expires <= 30 days. Returns
the following information:
- The certificate ID
- The order ID
- The transaction ID
- The amount charged for the order
years : 1
Number of years to register
certificate_id
Unique ID of the SSL certif... | [
"Renews",
"an",
"SSL",
"certificate",
"if",
"it",
"is",
"ACTIVE",
"and",
"Expires",
"<",
"=",
"30",
"days",
".",
"Returns",
"the",
"following",
"information",
":"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/namecheap_ssl.py#L295-L407 | train | renews an SSL certificate if it is ACTIVE and Expires < 30 days. Returns the new SSL certificate. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/namecheap_ssl.py | create | def create(years, certificate_type, promotion_code=None, sans_to_add=None):
'''
Creates a new SSL certificate. Returns the following information:
- Whether or not the SSL order was successful
- The certificate ID
- The order ID
- The transaction ID
- The amount charged for the order
- T... | python | def create(years, certificate_type, promotion_code=None, sans_to_add=None):
'''
Creates a new SSL certificate. Returns the following information:
- Whether or not the SSL order was successful
- The certificate ID
- The order ID
- The transaction ID
- The amount charged for the order
- T... | [
"def",
"create",
"(",
"years",
",",
"certificate_type",
",",
"promotion_code",
"=",
"None",
",",
"sans_to_add",
"=",
"None",
")",
":",
"valid_certs",
"=",
"(",
"'QuickSSL Premium'",
",",
"'RapidSSL'",
",",
"'RapidSSL Wildcard'",
",",
"'PremiumSSL'",
",",
"'Insta... | Creates a new SSL certificate. Returns the following information:
- Whether or not the SSL order was successful
- The certificate ID
- The order ID
- The transaction ID
- The amount charged for the order
- The date on which the certificate was created
- The date on which the certificate wil... | [
"Creates",
"a",
"new",
"SSL",
"certificate",
".",
"Returns",
"the",
"following",
"information",
":"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/namecheap_ssl.py#L410-L591 | train | Creates a new SSL certificate in the specified number of years and certificate type. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/namecheap_ssl.py | parse_csr | def parse_csr(csr_file, certificate_type, http_dc_validation=False):
'''
Parses the CSR. Returns a dictionary of result values.
csr_file
Path to Certificate Signing Request file
certificate_type
Type of SSL Certificate. Possible values include:
- EV Multi Domain SSL
- ... | python | def parse_csr(csr_file, certificate_type, http_dc_validation=False):
'''
Parses the CSR. Returns a dictionary of result values.
csr_file
Path to Certificate Signing Request file
certificate_type
Type of SSL Certificate. Possible values include:
- EV Multi Domain SSL
- ... | [
"def",
"parse_csr",
"(",
"csr_file",
",",
"certificate_type",
",",
"http_dc_validation",
"=",
"False",
")",
":",
"valid_certs",
"=",
"(",
"'QuickSSL Premium'",
",",
"'RapidSSL'",
",",
"'RapidSSL Wildcard'",
",",
"'PremiumSSL'",
",",
"'InstantSSL'",
",",
"'PositiveSS... | Parses the CSR. Returns a dictionary of result values.
csr_file
Path to Certificate Signing Request file
certificate_type
Type of SSL Certificate. Possible values include:
- EV Multi Domain SSL
- EV SSL
- EV SSL SGC
- EssentialSSL
- EssentialSSL Wildcar... | [
"Parses",
"the",
"CSR",
".",
"Returns",
"a",
"dictionary",
"of",
"result",
"values",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/namecheap_ssl.py#L594-L696 | train | Parses a CSR file and returns a dictionary of result 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/modules/namecheap_ssl.py | get_list | def get_list(**kwargs):
'''
Returns a list of SSL certificates for a particular user
ListType : All
Possible values:
- All
- Processing
- EmailSent
- TechnicalProblem
- InProgress
- Completed
- Deactivated
- Active
- Cancelled... | python | def get_list(**kwargs):
'''
Returns a list of SSL certificates for a particular user
ListType : All
Possible values:
- All
- Processing
- EmailSent
- TechnicalProblem
- InProgress
- Completed
- Deactivated
- Active
- Cancelled... | [
"def",
"get_list",
"(",
"*",
"*",
"kwargs",
")",
":",
"opts",
"=",
"salt",
".",
"utils",
".",
"namecheap",
".",
"get_opts",
"(",
"'namecheap.ssl.getList'",
")",
"for",
"key",
",",
"value",
"in",
"six",
".",
"iteritems",
"(",
"kwargs",
")",
":",
"opts",... | Returns a list of SSL certificates for a particular user
ListType : All
Possible values:
- All
- Processing
- EmailSent
- TechnicalProblem
- InProgress
- Completed
- Deactivated
- Active
- Cancelled
- NewPurchase
- New... | [
"Returns",
"a",
"list",
"of",
"SSL",
"certificates",
"for",
"a",
"particular",
"user"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/namecheap_ssl.py#L699-L755 | train | Return a list of SSL certificates for a particular user. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/namecheap_ssl.py | get_info | def get_info(certificate_id, returncertificate=False, returntype=None):
'''
Retrieves information about the requested SSL certificate. Returns a
dictionary of information about the SSL certificate with two keys:
- **ssl** - Contains the metadata information
- **certificate** - Contains the details ... | python | def get_info(certificate_id, returncertificate=False, returntype=None):
'''
Retrieves information about the requested SSL certificate. Returns a
dictionary of information about the SSL certificate with two keys:
- **ssl** - Contains the metadata information
- **certificate** - Contains the details ... | [
"def",
"get_info",
"(",
"certificate_id",
",",
"returncertificate",
"=",
"False",
",",
"returntype",
"=",
"None",
")",
":",
"opts",
"=",
"salt",
".",
"utils",
".",
"namecheap",
".",
"get_opts",
"(",
"'namecheap.ssl.getinfo'",
")",
"opts",
"[",
"'certificateID'... | Retrieves information about the requested SSL certificate. Returns a
dictionary of information about the SSL certificate with two keys:
- **ssl** - Contains the metadata information
- **certificate** - Contains the details for the certificate such as the
CSR, Approver, and certificate data
certi... | [
"Retrieves",
"information",
"about",
"the",
"requested",
"SSL",
"certificate",
".",
"Returns",
"a",
"dictionary",
"of",
"information",
"about",
"the",
"SSL",
"certificate",
"with",
"two",
"keys",
":"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/namecheap_ssl.py#L758-L806 | train | Get information about the requested SSL certificate. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/cron.py | _check_cron | def _check_cron(user,
cmd,
minute=None,
hour=None,
daymonth=None,
month=None,
dayweek=None,
comment=None,
commented=None,
identifier=None,
special=None):
''... | python | def _check_cron(user,
cmd,
minute=None,
hour=None,
daymonth=None,
month=None,
dayweek=None,
comment=None,
commented=None,
identifier=None,
special=None):
''... | [
"def",
"_check_cron",
"(",
"user",
",",
"cmd",
",",
"minute",
"=",
"None",
",",
"hour",
"=",
"None",
",",
"daymonth",
"=",
"None",
",",
"month",
"=",
"None",
",",
"dayweek",
"=",
"None",
",",
"comment",
"=",
"None",
",",
"commented",
"=",
"None",
"... | Return the changes | [
"Return",
"the",
"changes"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/cron.py#L161-L214 | train | Check if a user has a cron entry. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/cron.py | _check_cron_env | def _check_cron_env(user,
name,
value=None):
'''
Return the environment changes
'''
if value is None:
value = "" # Matching value set in salt.modules.cron._render_tab
lst = __salt__['cron.list_tab'](user)
for env in lst['env']:
if name == ... | python | def _check_cron_env(user,
name,
value=None):
'''
Return the environment changes
'''
if value is None:
value = "" # Matching value set in salt.modules.cron._render_tab
lst = __salt__['cron.list_tab'](user)
for env in lst['env']:
if name == ... | [
"def",
"_check_cron_env",
"(",
"user",
",",
"name",
",",
"value",
"=",
"None",
")",
":",
"if",
"value",
"is",
"None",
":",
"value",
"=",
"\"\"",
"# Matching value set in salt.modules.cron._render_tab",
"lst",
"=",
"__salt__",
"[",
"'cron.list_tab'",
"]",
"(",
... | Return the environment changes | [
"Return",
"the",
"environment",
"changes"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/cron.py#L217-L231 | train | Check if the environment changes for a specific environment | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/cron.py | _get_cron_info | def _get_cron_info():
'''
Returns the proper group owner and path to the cron directory
'''
owner = 'root'
if __grains__['os'] == 'FreeBSD':
group = 'wheel'
crontab_dir = '/var/cron/tabs'
elif __grains__['os'] == 'OpenBSD':
group = 'crontab'
crontab_dir = '/var/cr... | python | def _get_cron_info():
'''
Returns the proper group owner and path to the cron directory
'''
owner = 'root'
if __grains__['os'] == 'FreeBSD':
group = 'wheel'
crontab_dir = '/var/cron/tabs'
elif __grains__['os'] == 'OpenBSD':
group = 'crontab'
crontab_dir = '/var/cr... | [
"def",
"_get_cron_info",
"(",
")",
":",
"owner",
"=",
"'root'",
"if",
"__grains__",
"[",
"'os'",
"]",
"==",
"'FreeBSD'",
":",
"group",
"=",
"'wheel'",
"crontab_dir",
"=",
"'/var/cron/tabs'",
"elif",
"__grains__",
"[",
"'os'",
"]",
"==",
"'OpenBSD'",
":",
"... | Returns the proper group owner and path to the cron directory | [
"Returns",
"the",
"proper",
"group",
"owner",
"and",
"path",
"to",
"the",
"cron",
"directory"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/cron.py#L234-L254 | train | Returns the proper group owner and path to the cron 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/cron.py | present | def present(name,
user='root',
minute='*',
hour='*',
daymonth='*',
month='*',
dayweek='*',
comment=None,
commented=False,
identifier=False,
special=None):
'''
Verifies that the specified cron ... | python | def present(name,
user='root',
minute='*',
hour='*',
daymonth='*',
month='*',
dayweek='*',
comment=None,
commented=False,
identifier=False,
special=None):
'''
Verifies that the specified cron ... | [
"def",
"present",
"(",
"name",
",",
"user",
"=",
"'root'",
",",
"minute",
"=",
"'*'",
",",
"hour",
"=",
"'*'",
",",
"daymonth",
"=",
"'*'",
",",
"month",
"=",
"'*'",
",",
"dayweek",
"=",
"'*'",
",",
"comment",
"=",
"None",
",",
"commented",
"=",
... | Verifies that the specified cron job is present for the specified user.
It is recommended to use `identifier`. Otherwise the cron job is installed
twice if you change the name.
For more advanced information about what exactly can be set in the cron
timing parameters, check your cron system's documentati... | [
"Verifies",
"that",
"the",
"specified",
"cron",
"job",
"is",
"present",
"for",
"the",
"specified",
"user",
".",
"It",
"is",
"recommended",
"to",
"use",
"identifier",
".",
"Otherwise",
"the",
"cron",
"job",
"is",
"installed",
"twice",
"if",
"you",
"change",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/cron.py#L257-L383 | train | Returns a dict that contains the specified crontab entry for the specified user. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/cron.py | absent | def absent(name,
user='root',
identifier=False,
special=None,
**kwargs):
'''
Verifies that the specified cron job is absent for the specified user; only
the name is matched when removing a cron job.
name
The command that should be absent in the user c... | python | def absent(name,
user='root',
identifier=False,
special=None,
**kwargs):
'''
Verifies that the specified cron job is absent for the specified user; only
the name is matched when removing a cron job.
name
The command that should be absent in the user c... | [
"def",
"absent",
"(",
"name",
",",
"user",
"=",
"'root'",
",",
"identifier",
"=",
"False",
",",
"special",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"# NOTE: The keyword arguments in **kwargs are ignored in this state, but",
"# cannot be removed from the fun... | Verifies that the specified cron job is absent for the specified user; only
the name is matched when removing a cron job.
name
The command that should be absent in the user crontab.
user
The name of the user whose crontab needs to be modified, defaults to
the root user
identif... | [
"Verifies",
"that",
"the",
"specified",
"cron",
"job",
"is",
"absent",
"for",
"the",
"specified",
"user",
";",
"only",
"the",
"name",
"is",
"matched",
"when",
"removing",
"a",
"cron",
"job",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/cron.py#L386-L448 | train | Ensures that the specified cron job is absent for the specified user. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/cron.py | file | def file(name,
source_hash='',
source_hash_name=None,
user='root',
template=None,
context=None,
replace=True,
defaults=None,
backup='',
**kwargs):
'''
Provides file.managed-like functionality (templating, etc.) for a pre-made
c... | python | def file(name,
source_hash='',
source_hash_name=None,
user='root',
template=None,
context=None,
replace=True,
defaults=None,
backup='',
**kwargs):
'''
Provides file.managed-like functionality (templating, etc.) for a pre-made
c... | [
"def",
"file",
"(",
"name",
",",
"source_hash",
"=",
"''",
",",
"source_hash_name",
"=",
"None",
",",
"user",
"=",
"'root'",
",",
"template",
"=",
"None",
",",
"context",
"=",
"None",
",",
"replace",
"=",
"True",
",",
"defaults",
"=",
"None",
",",
"b... | Provides file.managed-like functionality (templating, etc.) for a pre-made
crontab file, to be assigned to a given user.
name
The source file to be used as the crontab. This source file can be
hosted on either the salt master server, or on an HTTP or FTP server.
For files hosted on the ... | [
"Provides",
"file",
".",
"managed",
"-",
"like",
"functionality",
"(",
"templating",
"etc",
".",
")",
"for",
"a",
"pre",
"-",
"made",
"crontab",
"file",
"to",
"be",
"assigned",
"to",
"a",
"given",
"user",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/cron.py#L451-L669 | train | This function returns a crontab file that can be used as a crontab file for a given user. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/cron.py | env_present | def env_present(name,
value=None,
user='root'):
'''
Verifies that the specified environment variable is present in the crontab
for the specified user.
name
The name of the environment variable to set in the user crontab
user
The name of the user whos... | python | def env_present(name,
value=None,
user='root'):
'''
Verifies that the specified environment variable is present in the crontab
for the specified user.
name
The name of the environment variable to set in the user crontab
user
The name of the user whos... | [
"def",
"env_present",
"(",
"name",
",",
"value",
"=",
"None",
",",
"user",
"=",
"'root'",
")",
":",
"ret",
"=",
"{",
"'changes'",
":",
"{",
"}",
",",
"'comment'",
":",
"''",
",",
"'name'",
":",
"name",
",",
"'result'",
":",
"True",
"}",
"if",
"__... | Verifies that the specified environment variable is present in the crontab
for the specified user.
name
The name of the environment variable to set in the user crontab
user
The name of the user whose crontab needs to be modified, defaults to
the root user
value
The val... | [
"Verifies",
"that",
"the",
"specified",
"environment",
"variable",
"is",
"present",
"in",
"the",
"crontab",
"for",
"the",
"specified",
"user",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/cron.py#L672-L722 | train | Ensures that the specified environment variable is present in the crontab. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/cron.py | env_absent | def env_absent(name,
user='root'):
'''
Verifies that the specified environment variable is absent from the crontab
for the specified user
name
The name of the environment variable to remove from the user crontab
user
The name of the user whose crontab needs to be mod... | python | def env_absent(name,
user='root'):
'''
Verifies that the specified environment variable is absent from the crontab
for the specified user
name
The name of the environment variable to remove from the user crontab
user
The name of the user whose crontab needs to be mod... | [
"def",
"env_absent",
"(",
"name",
",",
"user",
"=",
"'root'",
")",
":",
"name",
"=",
"name",
".",
"strip",
"(",
")",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'result'",
":",
"True",
",",
"'changes'",
":",
"{",
"}",
",",
"'comment'",
":",
"''... | Verifies that the specified environment variable is absent from the crontab
for the specified user
name
The name of the environment variable to remove from the user crontab
user
The name of the user whose crontab needs to be modified, defaults to
the root user | [
"Verifies",
"that",
"the",
"specified",
"environment",
"variable",
"is",
"absent",
"from",
"the",
"crontab",
"for",
"the",
"specified",
"user"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/cron.py#L725-L767 | train | Ensures that the specified environment variable is absent from the crontab environment variable for the specified user. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/output/highstate.py | output | def output(data, **kwargs): # pylint: disable=unused-argument
'''
The HighState Outputter is only meant to be used with the state.highstate
function, or a function that returns highstate return data.
'''
if len(data.keys()) == 1:
# account for nested orchs via saltutil.runner
if 're... | python | def output(data, **kwargs): # pylint: disable=unused-argument
'''
The HighState Outputter is only meant to be used with the state.highstate
function, or a function that returns highstate return data.
'''
if len(data.keys()) == 1:
# account for nested orchs via saltutil.runner
if 're... | [
"def",
"output",
"(",
"data",
",",
"*",
"*",
"kwargs",
")",
":",
"# pylint: disable=unused-argument",
"if",
"len",
"(",
"data",
".",
"keys",
"(",
")",
")",
"==",
"1",
":",
"# account for nested orchs via saltutil.runner",
"if",
"'return'",
"in",
"data",
":",
... | The HighState Outputter is only meant to be used with the state.highstate
function, or a function that returns highstate return data. | [
"The",
"HighState",
"Outputter",
"is",
"only",
"meant",
"to",
"be",
"used",
"with",
"the",
"state",
".",
"highstate",
"function",
"or",
"a",
"function",
"that",
"returns",
"highstate",
"return",
"data",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/output/highstate.py#L136-L183 | train | Output the data dictionary to a highstate file. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/output/highstate.py | _format_host | def _format_host(host, data, indent_level=1):
'''
Main highstate formatter. can be called recursively if a nested highstate
contains other highstates (ie in an orchestration)
'''
host = salt.utils.data.decode(host)
colors = salt.utils.color.get_colors(
__opts__.get('color'),
... | python | def _format_host(host, data, indent_level=1):
'''
Main highstate formatter. can be called recursively if a nested highstate
contains other highstates (ie in an orchestration)
'''
host = salt.utils.data.decode(host)
colors = salt.utils.color.get_colors(
__opts__.get('color'),
... | [
"def",
"_format_host",
"(",
"host",
",",
"data",
",",
"indent_level",
"=",
"1",
")",
":",
"host",
"=",
"salt",
".",
"utils",
".",
"data",
".",
"decode",
"(",
"host",
")",
"colors",
"=",
"salt",
".",
"utils",
".",
"color",
".",
"get_colors",
"(",
"_... | Main highstate formatter. can be called recursively if a nested highstate
contains other highstates (ie in an orchestration) | [
"Main",
"highstate",
"formatter",
".",
"can",
"be",
"called",
"recursively",
"if",
"a",
"nested",
"highstate",
"contains",
"other",
"highstates",
"(",
"ie",
"in",
"an",
"orchestration",
")"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/output/highstate.py#L186-L511 | train | Internal function to format a single host | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/output/highstate.py | _nested_changes | def _nested_changes(changes):
'''
Print the changes data using the nested outputter
'''
ret = '\n'
ret += salt.output.out_format(
changes,
'nested',
__opts__,
nested_indent=14)
return ret | python | def _nested_changes(changes):
'''
Print the changes data using the nested outputter
'''
ret = '\n'
ret += salt.output.out_format(
changes,
'nested',
__opts__,
nested_indent=14)
return ret | [
"def",
"_nested_changes",
"(",
"changes",
")",
":",
"ret",
"=",
"'\\n'",
"ret",
"+=",
"salt",
".",
"output",
".",
"out_format",
"(",
"changes",
",",
"'nested'",
",",
"__opts__",
",",
"nested_indent",
"=",
"14",
")",
"return",
"ret"
] | Print the changes data using the nested outputter | [
"Print",
"the",
"changes",
"data",
"using",
"the",
"nested",
"outputter"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/output/highstate.py#L514-L524 | train | Print the changes data using the nested outputter
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/output/highstate.py | _format_changes | def _format_changes(changes, orchestration=False):
'''
Format the changes dict based on what the data is
'''
if not changes:
return False, ''
if orchestration:
return True, _nested_changes(changes)
if not isinstance(changes, dict):
return True, 'Invalid Changes data: {0... | python | def _format_changes(changes, orchestration=False):
'''
Format the changes dict based on what the data is
'''
if not changes:
return False, ''
if orchestration:
return True, _nested_changes(changes)
if not isinstance(changes, dict):
return True, 'Invalid Changes data: {0... | [
"def",
"_format_changes",
"(",
"changes",
",",
"orchestration",
"=",
"False",
")",
":",
"if",
"not",
"changes",
":",
"return",
"False",
",",
"''",
"if",
"orchestration",
":",
"return",
"True",
",",
"_nested_changes",
"(",
"changes",
")",
"if",
"not",
"isin... | Format the changes dict based on what the data is | [
"Format",
"the",
"changes",
"dict",
"based",
"on",
"what",
"the",
"data",
"is"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/output/highstate.py#L527-L551 | train | Format the changes dict based on what the data is
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/output/highstate.py | _format_terse | def _format_terse(tcolor, comps, ret, colors, tabular):
'''
Terse formatting of a message.
'''
result = 'Clean'
if ret['changes']:
result = 'Changed'
if ret['result'] is False:
result = 'Failed'
elif ret['result'] is None:
result = 'Differs'
if tabular is True:
... | python | def _format_terse(tcolor, comps, ret, colors, tabular):
'''
Terse formatting of a message.
'''
result = 'Clean'
if ret['changes']:
result = 'Changed'
if ret['result'] is False:
result = 'Failed'
elif ret['result'] is None:
result = 'Differs'
if tabular is True:
... | [
"def",
"_format_terse",
"(",
"tcolor",
",",
"comps",
",",
"ret",
",",
"colors",
",",
"tabular",
")",
":",
"result",
"=",
"'Clean'",
"if",
"ret",
"[",
"'changes'",
"]",
":",
"result",
"=",
"'Changed'",
"if",
"ret",
"[",
"'result'",
"]",
"is",
"False",
... | Terse formatting of a message. | [
"Terse",
"formatting",
"of",
"a",
"message",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/output/highstate.py#L554-L595 | train | Format a message in Terse 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/kernelpkg.py | mod_watch | def mod_watch(name, sfun, **kwargs):
'''
The kernerpkg watcher, called to invoke the watch command.
When called, execute a kernelpkg state based on a watch or listen call.
.. note::
This state exists to support special handling of the ``watch``
:ref:`requisite <requisites>`. It should n... | python | def mod_watch(name, sfun, **kwargs):
'''
The kernerpkg watcher, called to invoke the watch command.
When called, execute a kernelpkg state based on a watch or listen call.
.. note::
This state exists to support special handling of the ``watch``
:ref:`requisite <requisites>`. It should n... | [
"def",
"mod_watch",
"(",
"name",
",",
"sfun",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"sfun",
"in",
"(",
"'latest_active'",
",",
"'latest_wait'",
")",
":",
"return",
"latest_active",
"(",
"name",
",",
"*",
"*",
"kwargs",
")",
"else",
":",
"return",
... | The kernerpkg watcher, called to invoke the watch command.
When called, execute a kernelpkg state based on a watch or listen call.
.. note::
This state exists to support special handling of the ``watch``
:ref:`requisite <requisites>`. It should not be called directly.
Parameters for th... | [
"The",
"kernerpkg",
"watcher",
"called",
"to",
"invoke",
"the",
"watch",
"command",
".",
"When",
"called",
"execute",
"a",
"kernelpkg",
"state",
"based",
"on",
"a",
"watch",
"or",
"listen",
"call",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/kernelpkg.py#L204-L221 | train | Returns a dict with the state of the kernelpkg state based on a watch command. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/solr.py | _get_none_or_value | def _get_none_or_value(value):
'''
PRIVATE METHOD
Checks to see if the value of a primitive or built-in container such as
a list, dict, set, tuple etc is empty or none. None type is returned if the
value is empty/None/False. Number data types that are 0 will return None.
value : obj
The... | python | def _get_none_or_value(value):
'''
PRIVATE METHOD
Checks to see if the value of a primitive or built-in container such as
a list, dict, set, tuple etc is empty or none. None type is returned if the
value is empty/None/False. Number data types that are 0 will return None.
value : obj
The... | [
"def",
"_get_none_or_value",
"(",
"value",
")",
":",
"if",
"value",
"is",
"None",
":",
"return",
"None",
"elif",
"not",
"value",
":",
"return",
"value",
"# if it's a string, and it's not empty check for none",
"elif",
"isinstance",
"(",
"value",
",",
"six",
".",
... | PRIVATE METHOD
Checks to see if the value of a primitive or built-in container such as
a list, dict, set, tuple etc is empty or none. None type is returned if the
value is empty/None/False. Number data types that are 0 will return None.
value : obj
The primitive or built-in container to evaluat... | [
"PRIVATE",
"METHOD",
"Checks",
"to",
"see",
"if",
"the",
"value",
"of",
"a",
"primitive",
"or",
"built",
"-",
"in",
"container",
"such",
"as",
"a",
"list",
"dict",
"set",
"tuple",
"etc",
"is",
"empty",
"or",
"none",
".",
"None",
"type",
"is",
"returned... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/solr.py#L99-L122 | train | Private method to return None or value depending on the value of the object. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/solr.py | _get_return_dict | def _get_return_dict(success=True, data=None, errors=None, warnings=None):
'''
PRIVATE METHOD
Creates a new return dict with default values. Defaults may be overwritten.
success : boolean (True)
True indicates a successful result.
data : dict<str,obj> ({})
Data to be returned to the... | python | def _get_return_dict(success=True, data=None, errors=None, warnings=None):
'''
PRIVATE METHOD
Creates a new return dict with default values. Defaults may be overwritten.
success : boolean (True)
True indicates a successful result.
data : dict<str,obj> ({})
Data to be returned to the... | [
"def",
"_get_return_dict",
"(",
"success",
"=",
"True",
",",
"data",
"=",
"None",
",",
"errors",
"=",
"None",
",",
"warnings",
"=",
"None",
")",
":",
"data",
"=",
"{",
"}",
"if",
"data",
"is",
"None",
"else",
"data",
"errors",
"=",
"[",
"]",
"if",
... | PRIVATE METHOD
Creates a new return dict with default values. Defaults may be overwritten.
success : boolean (True)
True indicates a successful result.
data : dict<str,obj> ({})
Data to be returned to the caller.
errors : list<str> ([()])
A list of error messages to be returned ... | [
"PRIVATE",
"METHOD",
"Creates",
"a",
"new",
"return",
"dict",
"with",
"default",
"values",
".",
"Defaults",
"may",
"be",
"overwritten",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/solr.py#L138-L164 | train | Private METHOD to get a new return dict. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/solr.py | _update_return_dict | def _update_return_dict(ret, success, data, errors=None, warnings=None):
'''
PRIVATE METHOD
Updates the return dictionary and returns it.
ret : dict<str,obj>
The original return dict to update. The ret param should have
been created from _get_return_dict()
success : boolean (True)
... | python | def _update_return_dict(ret, success, data, errors=None, warnings=None):
'''
PRIVATE METHOD
Updates the return dictionary and returns it.
ret : dict<str,obj>
The original return dict to update. The ret param should have
been created from _get_return_dict()
success : boolean (True)
... | [
"def",
"_update_return_dict",
"(",
"ret",
",",
"success",
",",
"data",
",",
"errors",
"=",
"None",
",",
"warnings",
"=",
"None",
")",
":",
"errors",
"=",
"[",
"]",
"if",
"errors",
"is",
"None",
"else",
"errors",
"warnings",
"=",
"[",
"]",
"if",
"warn... | PRIVATE METHOD
Updates the return dictionary and returns it.
ret : dict<str,obj>
The original return dict to update. The ret param should have
been created from _get_return_dict()
success : boolean (True)
True indicates a successful result.
data : dict<str,obj> ({})
Data... | [
"PRIVATE",
"METHOD",
"Updates",
"the",
"return",
"dictionary",
"and",
"returns",
"it",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/solr.py#L167-L194 | train | Private method to update the return dictionary of the base object. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/solr.py | _format_url | def _format_url(handler, host=None, core_name=None, extra=None):
'''
PRIVATE METHOD
Formats the URL based on parameters, and if cores are used or not
handler : str
The request handler to hit.
host : str (None)
The solr host to query. __opts__['host'] is default
core_name : str (... | python | def _format_url(handler, host=None, core_name=None, extra=None):
'''
PRIVATE METHOD
Formats the URL based on parameters, and if cores are used or not
handler : str
The request handler to hit.
host : str (None)
The solr host to query. __opts__['host'] is default
core_name : str (... | [
"def",
"_format_url",
"(",
"handler",
",",
"host",
"=",
"None",
",",
"core_name",
"=",
"None",
",",
"extra",
"=",
"None",
")",
":",
"extra",
"=",
"[",
"]",
"if",
"extra",
"is",
"None",
"else",
"extra",
"if",
"_get_none_or_value",
"(",
"host",
")",
"i... | PRIVATE METHOD
Formats the URL based on parameters, and if cores are used or not
handler : str
The request handler to hit.
host : str (None)
The solr host to query. __opts__['host'] is default
core_name : str (None)
The name of the solr core if using cores. Leave this blank if y... | [
"PRIVATE",
"METHOD",
"Formats",
"the",
"URL",
"based",
"on",
"parameters",
"and",
"if",
"cores",
"are",
"used",
"or",
"not"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/solr.py#L197-L233 | train | Formats the URL based on parameters and returns the full URL. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/solr.py | _auth | def _auth(url):
'''
Install an auth handler for urllib2
'''
user = __salt__['config.get']('solr.user', False)
password = __salt__['config.get']('solr.passwd', False)
realm = __salt__['config.get']('solr.auth_realm', 'Solr')
if user and password:
basic = _HTTPBasicAuthHandler()
... | python | def _auth(url):
'''
Install an auth handler for urllib2
'''
user = __salt__['config.get']('solr.user', False)
password = __salt__['config.get']('solr.passwd', False)
realm = __salt__['config.get']('solr.auth_realm', 'Solr')
if user and password:
basic = _HTTPBasicAuthHandler()
... | [
"def",
"_auth",
"(",
"url",
")",
":",
"user",
"=",
"__salt__",
"[",
"'config.get'",
"]",
"(",
"'solr.user'",
",",
"False",
")",
"password",
"=",
"__salt__",
"[",
"'config.get'",
"]",
"(",
"'solr.passwd'",
",",
"False",
")",
"realm",
"=",
"__salt__",
"[",... | Install an auth handler for urllib2 | [
"Install",
"an",
"auth",
"handler",
"for",
"urllib2"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/solr.py#L236-L255 | train | Install an auth handler for urllib2
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/solr.py | _http_request | def _http_request(url, request_timeout=None):
'''
PRIVATE METHOD
Uses salt.utils.json.load to fetch the JSON results from the solr API.
url : str
a complete URL that can be passed to urllib.open
request_timeout : int (None)
The number of seconds before the timeout should fail. Leave... | python | def _http_request(url, request_timeout=None):
'''
PRIVATE METHOD
Uses salt.utils.json.load to fetch the JSON results from the solr API.
url : str
a complete URL that can be passed to urllib.open
request_timeout : int (None)
The number of seconds before the timeout should fail. Leave... | [
"def",
"_http_request",
"(",
"url",
",",
"request_timeout",
"=",
"None",
")",
":",
"_auth",
"(",
"url",
")",
"try",
":",
"request_timeout",
"=",
"__salt__",
"[",
"'config.option'",
"]",
"(",
"'solr.request_timeout'",
")",
"kwargs",
"=",
"{",
"}",
"if",
"re... | PRIVATE METHOD
Uses salt.utils.json.load to fetch the JSON results from the solr API.
url : str
a complete URL that can be passed to urllib.open
request_timeout : int (None)
The number of seconds before the timeout should fail. Leave blank/None
to use the default. __opts__['solr.req... | [
"PRIVATE",
"METHOD",
"Uses",
"salt",
".",
"utils",
".",
"json",
".",
"load",
"to",
"fetch",
"the",
"JSON",
"results",
"from",
"the",
"solr",
"API",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/solr.py#L258-L281 | train | Private method to make an HTTP request to the NCBI solr 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/solr.py | _replication_request | def _replication_request(command, host=None, core_name=None, params=None):
'''
PRIVATE METHOD
Performs the requested replication command and returns a dictionary with
success, errors and data as keys. The data object will contain the JSON
response.
command : str
The replication command ... | python | def _replication_request(command, host=None, core_name=None, params=None):
'''
PRIVATE METHOD
Performs the requested replication command and returns a dictionary with
success, errors and data as keys. The data object will contain the JSON
response.
command : str
The replication command ... | [
"def",
"_replication_request",
"(",
"command",
",",
"host",
"=",
"None",
",",
"core_name",
"=",
"None",
",",
"params",
"=",
"None",
")",
":",
"params",
"=",
"[",
"]",
"if",
"params",
"is",
"None",
"else",
"params",
"extra",
"=",
"[",
"\"command={0}\"",
... | PRIVATE METHOD
Performs the requested replication command and returns a dictionary with
success, errors and data as keys. The data object will contain the JSON
response.
command : str
The replication command to execute.
host : str (None)
The solr host to query. __opts__['host'] is d... | [
"PRIVATE",
"METHOD",
"Performs",
"the",
"requested",
"replication",
"command",
"and",
"returns",
"a",
"dictionary",
"with",
"success",
"errors",
"and",
"data",
"as",
"keys",
".",
"The",
"data",
"object",
"will",
"contain",
"the",
"JSON",
"response",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/solr.py#L284-L310 | train | Private method to execute a replication command and return the JSON response. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/solr.py | _get_admin_info | def _get_admin_info(command, host=None, core_name=None):
'''
PRIVATE METHOD
Calls the _http_request method and passes the admin command to execute
and stores the data. This data is fairly static but should be refreshed
periodically to make sure everything this OK. The data object will contain
th... | python | def _get_admin_info(command, host=None, core_name=None):
'''
PRIVATE METHOD
Calls the _http_request method and passes the admin command to execute
and stores the data. This data is fairly static but should be refreshed
periodically to make sure everything this OK. The data object will contain
th... | [
"def",
"_get_admin_info",
"(",
"command",
",",
"host",
"=",
"None",
",",
"core_name",
"=",
"None",
")",
":",
"url",
"=",
"_format_url",
"(",
"\"admin/{0}\"",
".",
"format",
"(",
"command",
")",
",",
"host",
",",
"core_name",
"=",
"core_name",
")",
"resp"... | PRIVATE METHOD
Calls the _http_request method and passes the admin command to execute
and stores the data. This data is fairly static but should be refreshed
periodically to make sure everything this OK. The data object will contain
the JSON response.
command : str
The admin command to exec... | [
"PRIVATE",
"METHOD",
"Calls",
"the",
"_http_request",
"method",
"and",
"passes",
"the",
"admin",
"command",
"to",
"execute",
"and",
"stores",
"the",
"data",
".",
"This",
"data",
"is",
"fairly",
"static",
"but",
"should",
"be",
"refreshed",
"periodically",
"to"... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/solr.py#L313-L335 | train | Execute an admin command and return the response as a dict. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/solr.py | _merge_options | def _merge_options(options):
'''
PRIVATE METHOD
updates the default import options from __opts__['solr.dih.import_options']
with the dictionary passed in. Also converts booleans to strings
to pass to solr.
options : dict<str,boolean>
Dictionary the over rides the default options define... | python | def _merge_options(options):
'''
PRIVATE METHOD
updates the default import options from __opts__['solr.dih.import_options']
with the dictionary passed in. Also converts booleans to strings
to pass to solr.
options : dict<str,boolean>
Dictionary the over rides the default options define... | [
"def",
"_merge_options",
"(",
"options",
")",
":",
"defaults",
"=",
"__salt__",
"[",
"'config.option'",
"]",
"(",
"'solr.dih.import_options'",
")",
"if",
"isinstance",
"(",
"options",
",",
"dict",
")",
":",
"defaults",
".",
"update",
"(",
"options",
")",
"fo... | PRIVATE METHOD
updates the default import options from __opts__['solr.dih.import_options']
with the dictionary passed in. Also converts booleans to strings
to pass to solr.
options : dict<str,boolean>
Dictionary the over rides the default options defined in
__opts__['solr.dih.import_op... | [
"PRIVATE",
"METHOD",
"updates",
"the",
"default",
"import",
"options",
"from",
"__opts__",
"[",
"solr",
".",
"dih",
".",
"import_options",
"]",
"with",
"the",
"dictionary",
"passed",
"in",
".",
"Also",
"converts",
"booleans",
"to",
"strings",
"to",
"pass",
"... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/solr.py#L350-L371 | train | Private method to merge the default options from the passed in dictionary into the default 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/modules/solr.py | _pre_index_check | def _pre_index_check(handler, host=None, core_name=None):
'''
PRIVATE METHOD - MASTER CALL
Does a pre-check to make sure that all the options are set and that
we can talk to solr before trying to send a command to solr. This
Command should only be issued to masters.
handler : str
The im... | python | def _pre_index_check(handler, host=None, core_name=None):
'''
PRIVATE METHOD - MASTER CALL
Does a pre-check to make sure that all the options are set and that
we can talk to solr before trying to send a command to solr. This
Command should only be issued to masters.
handler : str
The im... | [
"def",
"_pre_index_check",
"(",
"handler",
",",
"host",
"=",
"None",
",",
"core_name",
"=",
"None",
")",
":",
"# make sure that it's a master minion",
"if",
"_get_none_or_value",
"(",
"host",
")",
"is",
"None",
"and",
"not",
"_is_master",
"(",
")",
":",
"err",... | PRIVATE METHOD - MASTER CALL
Does a pre-check to make sure that all the options are set and that
we can talk to solr before trying to send a command to solr. This
Command should only be issued to masters.
handler : str
The import handler to check the state of
host : str (None):
The ... | [
"PRIVATE",
"METHOD",
"-",
"MASTER",
"CALL",
"Does",
"a",
"pre",
"-",
"check",
"to",
"make",
"sure",
"that",
"all",
"the",
"options",
"are",
"set",
"and",
"that",
"we",
"can",
"talk",
"to",
"solr",
"before",
"trying",
"to",
"send",
"a",
"command",
"to",... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/solr.py#L374-L419 | train | This function is a private method that checks the state of the specified resource and performs a pre - indexing check. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/solr.py | _find_value | def _find_value(ret_dict, key, path=None):
'''
PRIVATE METHOD
Traverses a dictionary of dictionaries/lists to find key
and return the value stored.
TODO:// this method doesn't really work very well, and it's not really
very useful in its current state. The purpose for this method is
... | python | def _find_value(ret_dict, key, path=None):
'''
PRIVATE METHOD
Traverses a dictionary of dictionaries/lists to find key
and return the value stored.
TODO:// this method doesn't really work very well, and it's not really
very useful in its current state. The purpose for this method is
... | [
"def",
"_find_value",
"(",
"ret_dict",
",",
"key",
",",
"path",
"=",
"None",
")",
":",
"if",
"path",
"is",
"None",
":",
"path",
"=",
"key",
"else",
":",
"path",
"=",
"\"{0}:{1}\"",
".",
"format",
"(",
"path",
",",
"key",
")",
"ret",
"=",
"[",
"]"... | PRIVATE METHOD
Traverses a dictionary of dictionaries/lists to find key
and return the value stored.
TODO:// this method doesn't really work very well, and it's not really
very useful in its current state. The purpose for this method is
to simplify parsing the JSON output so you can ... | [
"PRIVATE",
"METHOD",
"Traverses",
"a",
"dictionary",
"of",
"dictionaries",
"/",
"lists",
"to",
"find",
"key",
"and",
"return",
"the",
"value",
"stored",
".",
"TODO",
":",
"//",
"this",
"method",
"doesn",
"t",
"really",
"work",
"very",
"well",
"and",
"it",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/solr.py#L422-L456 | train | Private method to find the value of a key in 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/modules/solr.py | lucene_version | def lucene_version(core_name=None):
'''
Gets the lucene version that solr is using. If you are running a multi-core
setup you should specify a core name since all the cores run under the same
servlet container, they will all have the same version.
core_name : str (None)
The name of the solr... | python | def lucene_version(core_name=None):
'''
Gets the lucene version that solr is using. If you are running a multi-core
setup you should specify a core name since all the cores run under the same
servlet container, they will all have the same version.
core_name : str (None)
The name of the solr... | [
"def",
"lucene_version",
"(",
"core_name",
"=",
"None",
")",
":",
"ret",
"=",
"_get_return_dict",
"(",
")",
"# do we want to check for all the cores?",
"if",
"_get_none_or_value",
"(",
"core_name",
")",
"is",
"None",
"and",
"_check_for_cores",
"(",
")",
":",
"succ... | Gets the lucene version that solr is using. If you are running a multi-core
setup you should specify a core name since all the cores run under the same
servlet container, they will all have the same version.
core_name : str (None)
The name of the solr core if using cores. Leave this blank if you ar... | [
"Gets",
"the",
"lucene",
"version",
"that",
"solr",
"is",
"using",
".",
"If",
"you",
"are",
"running",
"a",
"multi",
"-",
"core",
"setup",
"you",
"should",
"specify",
"a",
"core",
"name",
"since",
"all",
"the",
"cores",
"run",
"under",
"the",
"same",
"... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/solr.py#L461-L501 | train | Returns the lucene version that solr is using. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/solr.py | version | def version(core_name=None):
'''
Gets the solr version for the core specified. You should specify a core
here as all the cores will run under the same servlet container and so will
all have the same version.
core_name : str (None)
The name of the solr core if using cores. Leave this blank ... | python | def version(core_name=None):
'''
Gets the solr version for the core specified. You should specify a core
here as all the cores will run under the same servlet container and so will
all have the same version.
core_name : str (None)
The name of the solr core if using cores. Leave this blank ... | [
"def",
"version",
"(",
"core_name",
"=",
"None",
")",
":",
"ret",
"=",
"_get_return_dict",
"(",
")",
"# do we want to check for all the cores?",
"if",
"_get_none_or_value",
"(",
"core_name",
")",
"is",
"None",
"and",
"_check_for_cores",
"(",
")",
":",
"success",
... | Gets the solr version for the core specified. You should specify a core
here as all the cores will run under the same servlet container and so will
all have the same version.
core_name : str (None)
The name of the solr core if using cores. Leave this blank if you are
not using cores or if ... | [
"Gets",
"the",
"solr",
"version",
"for",
"the",
"core",
"specified",
".",
"You",
"should",
"specify",
"a",
"core",
"here",
"as",
"all",
"the",
"cores",
"will",
"run",
"under",
"the",
"same",
"servlet",
"container",
"and",
"so",
"will",
"all",
"have",
"th... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/solr.py#L504-L546 | train | Get the solr version for the specified core. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/solr.py | optimize | def optimize(host=None, core_name=None):
'''
Search queries fast, but it is a very expensive operation. The ideal
process is to run this with a master/slave configuration. Then you
can optimize the master, and push the optimized index to the slaves.
If you are running a single solr instance, or if ... | python | def optimize(host=None, core_name=None):
'''
Search queries fast, but it is a very expensive operation. The ideal
process is to run this with a master/slave configuration. Then you
can optimize the master, and push the optimized index to the slaves.
If you are running a single solr instance, or if ... | [
"def",
"optimize",
"(",
"host",
"=",
"None",
",",
"core_name",
"=",
"None",
")",
":",
"ret",
"=",
"_get_return_dict",
"(",
")",
"if",
"_get_none_or_value",
"(",
"core_name",
")",
"is",
"None",
"and",
"_check_for_cores",
"(",
")",
":",
"success",
"=",
"Tr... | Search queries fast, but it is a very expensive operation. The ideal
process is to run this with a master/slave configuration. Then you
can optimize the master, and push the optimized index to the slaves.
If you are running a single solr instance, or if you are going to run
this on a slave be aware tha... | [
"Search",
"queries",
"fast",
"but",
"it",
"is",
"a",
"very",
"expensive",
"operation",
".",
"The",
"ideal",
"process",
"is",
"to",
"run",
"this",
"with",
"a",
"master",
"/",
"slave",
"configuration",
".",
"Then",
"you",
"can",
"optimize",
"the",
"master",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/solr.py#L549-L597 | train | This function is used to optimize the master and slave index. It is a very expensive operation. It is a very expensive operation. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/solr.py | ping | def ping(host=None, core_name=None):
'''
Does a health check on solr, makes sure solr can talk to the indexes.
host : str (None)
The solr host to query. __opts__['host'] is default.
core_name : str (None)
The name of the solr core if using cores. Leave this blank if you are
not ... | python | def ping(host=None, core_name=None):
'''
Does a health check on solr, makes sure solr can talk to the indexes.
host : str (None)
The solr host to query. __opts__['host'] is default.
core_name : str (None)
The name of the solr core if using cores. Leave this blank if you are
not ... | [
"def",
"ping",
"(",
"host",
"=",
"None",
",",
"core_name",
"=",
"None",
")",
":",
"ret",
"=",
"_get_return_dict",
"(",
")",
"if",
"_get_none_or_value",
"(",
"core_name",
")",
"is",
"None",
"and",
"_check_for_cores",
"(",
")",
":",
"success",
"=",
"True",... | Does a health check on solr, makes sure solr can talk to the indexes.
host : str (None)
The solr host to query. __opts__['host'] is default.
core_name : str (None)
The name of the solr core if using cores. Leave this blank if you are
not using cores or if you want to check all cores.
... | [
"Does",
"a",
"health",
"check",
"on",
"solr",
"makes",
"sure",
"solr",
"can",
"talk",
"to",
"the",
"indexes",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/solr.py#L600-L634 | train | Does a health check on solr makes sure solr can talk to the indexes. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/solr.py | is_replication_enabled | def is_replication_enabled(host=None, core_name=None):
'''
SLAVE CALL
Check for errors, and determine if a slave is replicating or not.
host : str (None)
The solr host to query. __opts__['host'] is default.
core_name : str (None)
The name of the solr core if using cores. Leave this ... | python | def is_replication_enabled(host=None, core_name=None):
'''
SLAVE CALL
Check for errors, and determine if a slave is replicating or not.
host : str (None)
The solr host to query. __opts__['host'] is default.
core_name : str (None)
The name of the solr core if using cores. Leave this ... | [
"def",
"is_replication_enabled",
"(",
"host",
"=",
"None",
",",
"core_name",
"=",
"None",
")",
":",
"ret",
"=",
"_get_return_dict",
"(",
")",
"success",
"=",
"True",
"# since only slaves can call this let's check the config:",
"if",
"_is_master",
"(",
")",
"and",
... | SLAVE CALL
Check for errors, and determine if a slave is replicating or not.
host : str (None)
The solr host to query. __opts__['host'] is default.
core_name : str (None)
The name of the solr core if using cores. Leave this blank if you are
not using cores or if you want to check al... | [
"SLAVE",
"CALL",
"Check",
"for",
"errors",
"and",
"determine",
"if",
"a",
"slave",
"is",
"replicating",
"or",
"not",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/solr.py#L637-L708 | train | Return True if the master is replicating or False if the master is not replicating or not. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/solr.py | match_index_versions | def match_index_versions(host=None, core_name=None):
'''
SLAVE CALL
Verifies that the master and the slave versions are in sync by
comparing the index version. If you are constantly pushing updates
the index the master and slave versions will seldom match. A solution
to this is pause indexing ev... | python | def match_index_versions(host=None, core_name=None):
'''
SLAVE CALL
Verifies that the master and the slave versions are in sync by
comparing the index version. If you are constantly pushing updates
the index the master and slave versions will seldom match. A solution
to this is pause indexing ev... | [
"def",
"match_index_versions",
"(",
"host",
"=",
"None",
",",
"core_name",
"=",
"None",
")",
":",
"# since only slaves can call this let's check the config:",
"ret",
"=",
"_get_return_dict",
"(",
")",
"success",
"=",
"True",
"if",
"_is_master",
"(",
")",
"and",
"_... | SLAVE CALL
Verifies that the master and the slave versions are in sync by
comparing the index version. If you are constantly pushing updates
the index the master and slave versions will seldom match. A solution
to this is pause indexing every so often to allow the slave to replicate
and then call th... | [
"SLAVE",
"CALL",
"Verifies",
"that",
"the",
"master",
"and",
"the",
"slave",
"versions",
"are",
"in",
"sync",
"by",
"comparing",
"the",
"index",
"version",
".",
"If",
"you",
"are",
"constantly",
"pushing",
"updates",
"the",
"index",
"the",
"master",
"and",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/solr.py#L711-L800 | train | This function is used to match the master and slave versions of a single core. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/solr.py | replication_details | def replication_details(host=None, core_name=None):
'''
Get the full replication details.
host : str (None)
The solr host to query. __opts__['host'] is default.
core_name : str (None)
The name of the solr core if using cores. Leave this blank if you are
not using cores or if you... | python | def replication_details(host=None, core_name=None):
'''
Get the full replication details.
host : str (None)
The solr host to query. __opts__['host'] is default.
core_name : str (None)
The name of the solr core if using cores. Leave this blank if you are
not using cores or if you... | [
"def",
"replication_details",
"(",
"host",
"=",
"None",
",",
"core_name",
"=",
"None",
")",
":",
"ret",
"=",
"_get_return_dict",
"(",
")",
"if",
"_get_none_or_value",
"(",
"core_name",
")",
"is",
"None",
":",
"success",
"=",
"True",
"for",
"name",
"in",
... | Get the full replication details.
host : str (None)
The solr host to query. __opts__['host'] is default.
core_name : str (None)
The name of the solr core if using cores. Leave this blank if you are
not using cores or if you want to check all cores.
Return : dict<str,obj>::
... | [
"Get",
"the",
"full",
"replication",
"details",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/solr.py#L803-L838 | train | Get the full replication details. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/solr.py | backup | def backup(host=None, core_name=None, append_core_to_path=False):
'''
Tell solr make a backup. This method can be mis-leading since it uses the
backup API. If an error happens during the backup you are not notified.
The status: 'OK' in the response simply means that solr received the
request succe... | python | def backup(host=None, core_name=None, append_core_to_path=False):
'''
Tell solr make a backup. This method can be mis-leading since it uses the
backup API. If an error happens during the backup you are not notified.
The status: 'OK' in the response simply means that solr received the
request succe... | [
"def",
"backup",
"(",
"host",
"=",
"None",
",",
"core_name",
"=",
"None",
",",
"append_core_to_path",
"=",
"False",
")",
":",
"path",
"=",
"__opts__",
"[",
"'solr.backup_path'",
"]",
"num_backups",
"=",
"__opts__",
"[",
"'solr.num_backups'",
"]",
"if",
"path... | Tell solr make a backup. This method can be mis-leading since it uses the
backup API. If an error happens during the backup you are not notified.
The status: 'OK' in the response simply means that solr received the
request successfully.
host : str (None)
The solr host to query. __opts__['host... | [
"Tell",
"solr",
"make",
"a",
"backup",
".",
"This",
"method",
"can",
"be",
"mis",
"-",
"leading",
"since",
"it",
"uses",
"the",
"backup",
"API",
".",
"If",
"an",
"error",
"happens",
"during",
"the",
"backup",
"you",
"are",
"not",
"notified",
".",
"The"... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/solr.py#L841-L899 | train | This function makes a backup of the current node. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/solr.py | set_is_polling | def set_is_polling(polling, host=None, core_name=None):
'''
SLAVE CALL
Prevent the slaves from polling the master for updates.
polling : boolean
True will enable polling. False will disable it.
host : str (None)
The solr host to query. __opts__['host'] is default.
core_name : st... | python | def set_is_polling(polling, host=None, core_name=None):
'''
SLAVE CALL
Prevent the slaves from polling the master for updates.
polling : boolean
True will enable polling. False will disable it.
host : str (None)
The solr host to query. __opts__['host'] is default.
core_name : st... | [
"def",
"set_is_polling",
"(",
"polling",
",",
"host",
"=",
"None",
",",
"core_name",
"=",
"None",
")",
":",
"ret",
"=",
"_get_return_dict",
"(",
")",
"# since only slaves can call this let's check the config:",
"if",
"_is_master",
"(",
")",
"and",
"_get_none_or_valu... | SLAVE CALL
Prevent the slaves from polling the master for updates.
polling : boolean
True will enable polling. False will disable it.
host : str (None)
The solr host to query. __opts__['host'] is default.
core_name : str (None)
The name of the solr core if using cores. Leave thi... | [
"SLAVE",
"CALL",
"Prevent",
"the",
"slaves",
"from",
"polling",
"the",
"master",
"for",
"updates",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/solr.py#L902-L945 | train | Set the is polling status of the current node. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/solr.py | set_replication_enabled | def set_replication_enabled(status, host=None, core_name=None):
'''
MASTER ONLY
Sets the master to ignore poll requests from the slaves. Useful when you
don't want the slaves replicating during indexing or when clearing the
index.
status : boolean
Sets the replication status to the spec... | python | def set_replication_enabled(status, host=None, core_name=None):
'''
MASTER ONLY
Sets the master to ignore poll requests from the slaves. Useful when you
don't want the slaves replicating during indexing or when clearing the
index.
status : boolean
Sets the replication status to the spec... | [
"def",
"set_replication_enabled",
"(",
"status",
",",
"host",
"=",
"None",
",",
"core_name",
"=",
"None",
")",
":",
"if",
"not",
"_is_master",
"(",
")",
"and",
"_get_none_or_value",
"(",
"host",
")",
"is",
"None",
":",
"return",
"_get_return_dict",
"(",
"F... | MASTER ONLY
Sets the master to ignore poll requests from the slaves. Useful when you
don't want the slaves replicating during indexing or when clearing the
index.
status : boolean
Sets the replication status to the specified state.
host : str (None)
The solr host to query. __opts__[... | [
"MASTER",
"ONLY",
"Sets",
"the",
"master",
"to",
"ignore",
"poll",
"requests",
"from",
"the",
"slaves",
".",
"Useful",
"when",
"you",
"don",
"t",
"want",
"the",
"slaves",
"replicating",
"during",
"indexing",
"or",
"when",
"clearing",
"the",
"index",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/solr.py#L948-L993 | train | Sets the replication status of the master and all cores. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/solr.py | signal | def signal(signal=None):
'''
Signals Apache Solr to start, stop, or restart. Obviously this is only
going to work if the minion resides on the solr host. Additionally Solr
doesn't ship with an init script so one must be created.
signal : str (None)
The command to pass to the apache solr ini... | python | def signal(signal=None):
'''
Signals Apache Solr to start, stop, or restart. Obviously this is only
going to work if the minion resides on the solr host. Additionally Solr
doesn't ship with an init script so one must be created.
signal : str (None)
The command to pass to the apache solr ini... | [
"def",
"signal",
"(",
"signal",
"=",
"None",
")",
":",
"valid_signals",
"=",
"(",
"'start'",
",",
"'stop'",
",",
"'restart'",
")",
"# Give a friendly error message for invalid signals",
"# TODO: Fix this logic to be reusable and used by apache.signal",
"if",
"signal",
"not"... | Signals Apache Solr to start, stop, or restart. Obviously this is only
going to work if the minion resides on the solr host. Additionally Solr
doesn't ship with an init script so one must be created.
signal : str (None)
The command to pass to the apache solr init valid values are 'start',
'... | [
"Signals",
"Apache",
"Solr",
"to",
"start",
"stop",
"or",
"restart",
".",
"Obviously",
"this",
"is",
"only",
"going",
"to",
"work",
"if",
"the",
"minion",
"resides",
"on",
"the",
"solr",
"host",
".",
"Additionally",
"Solr",
"doesn",
"t",
"ship",
"with",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/solr.py#L996-L1022 | train | Signal apache solr to start stop or restart | Pu7Z6IJCgH3a,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.