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/glassfish.py | create_admin_object_resource | def create_admin_object_resource(name, server=None, **kwargs):
'''
Create a JMS destination
'''
defaults = {
'description': '',
'className': 'com.sun.messaging.Queue',
'enabled': True,
'id': name,
'resAdapter': 'jmsra',
'resType': 'javax.jms.Queue',
... | python | def create_admin_object_resource(name, server=None, **kwargs):
'''
Create a JMS destination
'''
defaults = {
'description': '',
'className': 'com.sun.messaging.Queue',
'enabled': True,
'id': name,
'resAdapter': 'jmsra',
'resType': 'javax.jms.Queue',
... | [
"def",
"create_admin_object_resource",
"(",
"name",
",",
"server",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"defaults",
"=",
"{",
"'description'",
":",
"''",
",",
"'className'",
":",
"'com.sun.messaging.Queue'",
",",
"'enabled'",
":",
"True",
",",
"'i... | Create a JMS destination | [
"Create",
"a",
"JMS",
"destination"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/glassfish.py#L421-L458 | train | Create a JMS destination resource | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/glassfish.py | update_admin_object_resource | def update_admin_object_resource(name, server=None, **kwargs):
'''
Update a JMS destination
'''
if 'jndiName' in kwargs:
del kwargs['jndiName']
return _update_element(name, 'resources/admin-object-resource', kwargs, server) | python | def update_admin_object_resource(name, server=None, **kwargs):
'''
Update a JMS destination
'''
if 'jndiName' in kwargs:
del kwargs['jndiName']
return _update_element(name, 'resources/admin-object-resource', kwargs, server) | [
"def",
"update_admin_object_resource",
"(",
"name",
",",
"server",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"'jndiName'",
"in",
"kwargs",
":",
"del",
"kwargs",
"[",
"'jndiName'",
"]",
"return",
"_update_element",
"(",
"name",
",",
"'resources/ad... | Update a JMS destination | [
"Update",
"a",
"JMS",
"destination"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/glassfish.py#L461-L467 | train | Update an admin object resource | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/glassfish.py | create_jdbc_connection_pool | def create_jdbc_connection_pool(name, server=None, **kwargs):
'''
Create a connection resource
'''
defaults = {
'allowNonComponentCallers': False,
'associateWithThread': False,
'connectionCreationRetryAttempts': '0',
'connectionCreationRetryIntervalInSeconds': '10',
... | python | def create_jdbc_connection_pool(name, server=None, **kwargs):
'''
Create a connection resource
'''
defaults = {
'allowNonComponentCallers': False,
'associateWithThread': False,
'connectionCreationRetryAttempts': '0',
'connectionCreationRetryIntervalInSeconds': '10',
... | [
"def",
"create_jdbc_connection_pool",
"(",
"name",
",",
"server",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"defaults",
"=",
"{",
"'allowNonComponentCallers'",
":",
"False",
",",
"'associateWithThread'",
":",
"False",
",",
"'connectionCreationRetryAttempts'",
... | Create a connection resource | [
"Create",
"a",
"connection",
"resource"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/glassfish.py#L492-L579 | train | Create a new JDBC connection pool. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/glassfish.py | delete_jdbc_connection_pool | def delete_jdbc_connection_pool(name, target='server', cascade=False, server=None):
'''
Delete a JDBC pool
'''
data = {'target': target, 'cascade': cascade}
return _delete_element(name, 'resources/jdbc-connection-pool', data, server) | python | def delete_jdbc_connection_pool(name, target='server', cascade=False, server=None):
'''
Delete a JDBC pool
'''
data = {'target': target, 'cascade': cascade}
return _delete_element(name, 'resources/jdbc-connection-pool', data, server) | [
"def",
"delete_jdbc_connection_pool",
"(",
"name",
",",
"target",
"=",
"'server'",
",",
"cascade",
"=",
"False",
",",
"server",
"=",
"None",
")",
":",
"data",
"=",
"{",
"'target'",
":",
"target",
",",
"'cascade'",
":",
"cascade",
"}",
"return",
"_delete_el... | Delete a JDBC pool | [
"Delete",
"a",
"JDBC",
"pool"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/glassfish.py#L589-L594 | train | Delete a JDBC connection pool. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/glassfish.py | create_jdbc_resource | def create_jdbc_resource(name, server=None, **kwargs):
'''
Create a JDBC resource
'''
defaults = {
'description': '',
'enabled': True,
'id': name,
'poolName': '',
'target': 'server'
}
# Data = defaults + merge kwargs + poolname
data = defaults
dat... | python | def create_jdbc_resource(name, server=None, **kwargs):
'''
Create a JDBC resource
'''
defaults = {
'description': '',
'enabled': True,
'id': name,
'poolName': '',
'target': 'server'
}
# Data = defaults + merge kwargs + poolname
data = defaults
dat... | [
"def",
"create_jdbc_resource",
"(",
"name",
",",
"server",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"defaults",
"=",
"{",
"'description'",
":",
"''",
",",
"'enabled'",
":",
"True",
",",
"'id'",
":",
"name",
",",
"'poolName'",
":",
"''",
",",
"... | Create a JDBC resource | [
"Create",
"a",
"JDBC",
"resource"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/glassfish.py#L612-L631 | train | Create a JDBC resource | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/glassfish.py | update_jdbc_resource | def update_jdbc_resource(name, server=None, **kwargs):
'''
Update a JDBC resource
'''
# You're not supposed to update jndiName, if you do so, it will crash, silently
if 'jndiName' in kwargs:
del kwargs['jndiName']
return _update_element(name, 'resources/jdbc-resource', kwargs, server) | python | def update_jdbc_resource(name, server=None, **kwargs):
'''
Update a JDBC resource
'''
# You're not supposed to update jndiName, if you do so, it will crash, silently
if 'jndiName' in kwargs:
del kwargs['jndiName']
return _update_element(name, 'resources/jdbc-resource', kwargs, server) | [
"def",
"update_jdbc_resource",
"(",
"name",
",",
"server",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"# You're not supposed to update jndiName, if you do so, it will crash, silently",
"if",
"'jndiName'",
"in",
"kwargs",
":",
"del",
"kwargs",
"[",
"'jndiName'",
"... | Update a JDBC resource | [
"Update",
"a",
"JDBC",
"resource"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/glassfish.py#L634-L641 | train | Update a JDBC resource | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/glassfish.py | get_system_properties | def get_system_properties(server=None):
'''
Get system properties
'''
properties = {}
data = _api_get('system-properties', server)
# Get properties into a dict
if any(data['extraProperties']['systemProperties']):
for element in data['extraProperties']['systemProperties']:
... | python | def get_system_properties(server=None):
'''
Get system properties
'''
properties = {}
data = _api_get('system-properties', server)
# Get properties into a dict
if any(data['extraProperties']['systemProperties']):
for element in data['extraProperties']['systemProperties']:
... | [
"def",
"get_system_properties",
"(",
"server",
"=",
"None",
")",
":",
"properties",
"=",
"{",
"}",
"data",
"=",
"_api_get",
"(",
"'system-properties'",
",",
"server",
")",
"# Get properties into a dict",
"if",
"any",
"(",
"data",
"[",
"'extraProperties'",
"]",
... | Get system properties | [
"Get",
"system",
"properties"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/glassfish.py#L652-L664 | train | Get system properties from the server | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/neutron_network.py | present | def present(name, auth=None, **kwargs):
'''
Ensure a network exists and is up-to-date
name
Name of the network
provider
A dict of network provider options.
shared
Set the network as shared.
external
Whether this network is externally accessible.
admin_sta... | python | def present(name, auth=None, **kwargs):
'''
Ensure a network exists and is up-to-date
name
Name of the network
provider
A dict of network provider options.
shared
Set the network as shared.
external
Whether this network is externally accessible.
admin_sta... | [
"def",
"present",
"(",
"name",
",",
"auth",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":",
"{",
"}",
",",
"'result'",
":",
"True",
",",
"'comment'",
":",
"''",
"}",
"kwargs",
"=",
... | Ensure a network exists and is up-to-date
name
Name of the network
provider
A dict of network provider options.
shared
Set the network as shared.
external
Whether this network is externally accessible.
admin_state_up
Set the network administrative state ... | [
"Ensure",
"a",
"network",
"exists",
"and",
"is",
"up",
"-",
"to",
"-",
"date"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/neutron_network.py#L44-L127 | train | Ensure a network exists and is up - to - date and is up - to - date. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/neutron_network.py | absent | def absent(name, auth=None, **kwargs):
'''
Ensure a network does not exists
name
Name of the network
'''
ret = {'name': name,
'changes': {},
'result': True,
'comment': ''}
kwargs = __utils__['args.clean_kwargs'](**kwargs)
__salt__['neutronng.setup... | python | def absent(name, auth=None, **kwargs):
'''
Ensure a network does not exists
name
Name of the network
'''
ret = {'name': name,
'changes': {},
'result': True,
'comment': ''}
kwargs = __utils__['args.clean_kwargs'](**kwargs)
__salt__['neutronng.setup... | [
"def",
"absent",
"(",
"name",
",",
"auth",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":",
"{",
"}",
",",
"'result'",
":",
"True",
",",
"'comment'",
":",
"''",
"}",
"kwargs",
"=",
"... | Ensure a network does not exists
name
Name of the network | [
"Ensure",
"a",
"network",
"does",
"not",
"exists"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/neutron_network.py#L130-L161 | train | Ensure a network does not exists | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/smartos_imgadm.py | _split_docker_uuid | def _split_docker_uuid(uuid):
'''
Split a smartos docker uuid into repo and tag
'''
if uuid:
uuid = uuid.split(':')
if len(uuid) == 2:
tag = uuid[1]
repo = uuid[0]
return repo, tag
return None, None | python | def _split_docker_uuid(uuid):
'''
Split a smartos docker uuid into repo and tag
'''
if uuid:
uuid = uuid.split(':')
if len(uuid) == 2:
tag = uuid[1]
repo = uuid[0]
return repo, tag
return None, None | [
"def",
"_split_docker_uuid",
"(",
"uuid",
")",
":",
"if",
"uuid",
":",
"uuid",
"=",
"uuid",
".",
"split",
"(",
"':'",
")",
"if",
"len",
"(",
"uuid",
")",
"==",
"2",
":",
"tag",
"=",
"uuid",
"[",
"1",
"]",
"repo",
"=",
"uuid",
"[",
"0",
"]",
"... | Split a smartos docker uuid into repo and tag | [
"Split",
"a",
"smartos",
"docker",
"uuid",
"into",
"repo",
"and",
"tag"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smartos_imgadm.py#L104-L114 | train | Split a smartos docker uuid into repo and tag | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/smartos_imgadm.py | _is_uuid | def _is_uuid(uuid):
'''
Check if uuid is a valid smartos uuid
Example: e69a0918-055d-11e5-8912-e3ceb6df4cf8
'''
if uuid and list((len(x) for x in uuid.split('-'))) == [8, 4, 4, 4, 12]:
return True
return False | python | def _is_uuid(uuid):
'''
Check if uuid is a valid smartos uuid
Example: e69a0918-055d-11e5-8912-e3ceb6df4cf8
'''
if uuid and list((len(x) for x in uuid.split('-'))) == [8, 4, 4, 4, 12]:
return True
return False | [
"def",
"_is_uuid",
"(",
"uuid",
")",
":",
"if",
"uuid",
"and",
"list",
"(",
"(",
"len",
"(",
"x",
")",
"for",
"x",
"in",
"uuid",
".",
"split",
"(",
"'-'",
")",
")",
")",
"==",
"[",
"8",
",",
"4",
",",
"4",
",",
"4",
",",
"12",
"]",
":",
... | Check if uuid is a valid smartos uuid
Example: e69a0918-055d-11e5-8912-e3ceb6df4cf8 | [
"Check",
"if",
"uuid",
"is",
"a",
"valid",
"smartos",
"uuid"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smartos_imgadm.py#L117-L125 | train | Check if uuid is a valid smartos uuid | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/smartos_imgadm.py | version | def version():
'''
Return imgadm version
CLI Example:
.. code-block:: bash
salt '*' imgadm.version
'''
ret = {}
cmd = 'imgadm --version'
res = __salt__['cmd.run'](cmd).splitlines()
ret = res[0].split()
return ret[-1] | python | def version():
'''
Return imgadm version
CLI Example:
.. code-block:: bash
salt '*' imgadm.version
'''
ret = {}
cmd = 'imgadm --version'
res = __salt__['cmd.run'](cmd).splitlines()
ret = res[0].split()
return ret[-1] | [
"def",
"version",
"(",
")",
":",
"ret",
"=",
"{",
"}",
"cmd",
"=",
"'imgadm --version'",
"res",
"=",
"__salt__",
"[",
"'cmd.run'",
"]",
"(",
"cmd",
")",
".",
"splitlines",
"(",
")",
"ret",
"=",
"res",
"[",
"0",
"]",
".",
"split",
"(",
")",
"retur... | Return imgadm version
CLI Example:
.. code-block:: bash
salt '*' imgadm.version | [
"Return",
"imgadm",
"version"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smartos_imgadm.py#L138-L152 | train | Return imgadm version | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/smartos_imgadm.py | docker_to_uuid | def docker_to_uuid(uuid):
'''
Get the image uuid from an imported docker image
.. versionadded:: 2019.2.0
'''
if _is_uuid(uuid):
return uuid
if _is_docker_uuid(uuid):
images = list_installed(verbose=True)
for image_uuid in images:
if 'name' not in images[imag... | python | def docker_to_uuid(uuid):
'''
Get the image uuid from an imported docker image
.. versionadded:: 2019.2.0
'''
if _is_uuid(uuid):
return uuid
if _is_docker_uuid(uuid):
images = list_installed(verbose=True)
for image_uuid in images:
if 'name' not in images[imag... | [
"def",
"docker_to_uuid",
"(",
"uuid",
")",
":",
"if",
"_is_uuid",
"(",
"uuid",
")",
":",
"return",
"uuid",
"if",
"_is_docker_uuid",
"(",
"uuid",
")",
":",
"images",
"=",
"list_installed",
"(",
"verbose",
"=",
"True",
")",
"for",
"image_uuid",
"in",
"imag... | Get the image uuid from an imported docker image
.. versionadded:: 2019.2.0 | [
"Get",
"the",
"image",
"uuid",
"from",
"an",
"imported",
"docker",
"image"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smartos_imgadm.py#L155-L170 | train | Get the image uuid from an imported docker image
.. versionadded:: 2019. 2. 0
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/smartos_imgadm.py | avail | def avail(search=None, verbose=False):
'''
Return a list of available images
search : string
search keyword
verbose : boolean (False)
toggle verbose output
CLI Example:
.. code-block:: bash
salt '*' imgadm.avail [percona]
salt '*' imgadm.avail verbose=True
... | python | def avail(search=None, verbose=False):
'''
Return a list of available images
search : string
search keyword
verbose : boolean (False)
toggle verbose output
CLI Example:
.. code-block:: bash
salt '*' imgadm.avail [percona]
salt '*' imgadm.avail verbose=True
... | [
"def",
"avail",
"(",
"search",
"=",
"None",
",",
"verbose",
"=",
"False",
")",
":",
"ret",
"=",
"{",
"}",
"cmd",
"=",
"'imgadm avail -j'",
"res",
"=",
"__salt__",
"[",
"'cmd.run_all'",
"]",
"(",
"cmd",
")",
"retcode",
"=",
"res",
"[",
"'retcode'",
"]... | Return a list of available images
search : string
search keyword
verbose : boolean (False)
toggle verbose output
CLI Example:
.. code-block:: bash
salt '*' imgadm.avail [percona]
salt '*' imgadm.avail verbose=True | [
"Return",
"a",
"list",
"of",
"available",
"images"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smartos_imgadm.py#L191-L226 | train | Return a list of available images | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/smartos_imgadm.py | show | def show(uuid):
'''
Show manifest of a given image
uuid : string
uuid of image
CLI Example:
.. code-block:: bash
salt '*' imgadm.show e42f8c84-bbea-11e2-b920-078fab2aab1f
salt '*' imgadm.show plexinc/pms-docker:plexpass
'''
ret = {}
if _is_uuid(uuid) or _is_d... | python | def show(uuid):
'''
Show manifest of a given image
uuid : string
uuid of image
CLI Example:
.. code-block:: bash
salt '*' imgadm.show e42f8c84-bbea-11e2-b920-078fab2aab1f
salt '*' imgadm.show plexinc/pms-docker:plexpass
'''
ret = {}
if _is_uuid(uuid) or _is_d... | [
"def",
"show",
"(",
"uuid",
")",
":",
"ret",
"=",
"{",
"}",
"if",
"_is_uuid",
"(",
"uuid",
")",
"or",
"_is_docker_uuid",
"(",
"uuid",
")",
":",
"cmd",
"=",
"'imgadm show {0}'",
".",
"format",
"(",
"uuid",
")",
"res",
"=",
"__salt__",
"[",
"'cmd.run_a... | Show manifest of a given image
uuid : string
uuid of image
CLI Example:
.. code-block:: bash
salt '*' imgadm.show e42f8c84-bbea-11e2-b920-078fab2aab1f
salt '*' imgadm.show plexinc/pms-docker:plexpass | [
"Show",
"manifest",
"of",
"a",
"given",
"image"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smartos_imgadm.py#L265-L292 | train | Show manifest of a given image
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/modules/smartos_imgadm.py | import_image | def import_image(uuid, verbose=False):
'''
Import an image from the repository
uuid : string
uuid to import
verbose : boolean (False)
toggle verbose output
CLI Example:
.. code-block:: bash
salt '*' imgadm.import e42f8c84-bbea-11e2-b920-078fab2aab1f [verbose=True]
... | python | def import_image(uuid, verbose=False):
'''
Import an image from the repository
uuid : string
uuid to import
verbose : boolean (False)
toggle verbose output
CLI Example:
.. code-block:: bash
salt '*' imgadm.import e42f8c84-bbea-11e2-b920-078fab2aab1f [verbose=True]
... | [
"def",
"import_image",
"(",
"uuid",
",",
"verbose",
"=",
"False",
")",
":",
"ret",
"=",
"{",
"}",
"cmd",
"=",
"'imgadm import {0}'",
".",
"format",
"(",
"uuid",
")",
"res",
"=",
"__salt__",
"[",
"'cmd.run_all'",
"]",
"(",
"cmd",
",",
"python_shell",
"=... | Import an image from the repository
uuid : string
uuid to import
verbose : boolean (False)
toggle verbose output
CLI Example:
.. code-block:: bash
salt '*' imgadm.import e42f8c84-bbea-11e2-b920-078fab2aab1f [verbose=True] | [
"Import",
"an",
"image",
"from",
"the",
"repository"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smartos_imgadm.py#L328-L353 | train | Imports an image from the 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/smartos_imgadm.py | delete | def delete(uuid):
'''
Remove an installed image
uuid : string
Specifies uuid to import
CLI Example:
.. code-block:: bash
salt '*' imgadm.delete e42f8c84-bbea-11e2-b920-078fab2aab1f
'''
ret = {}
cmd = 'imgadm delete {0}'.format(uuid)
res = __salt__['cmd.run_all'](c... | python | def delete(uuid):
'''
Remove an installed image
uuid : string
Specifies uuid to import
CLI Example:
.. code-block:: bash
salt '*' imgadm.delete e42f8c84-bbea-11e2-b920-078fab2aab1f
'''
ret = {}
cmd = 'imgadm delete {0}'.format(uuid)
res = __salt__['cmd.run_all'](c... | [
"def",
"delete",
"(",
"uuid",
")",
":",
"ret",
"=",
"{",
"}",
"cmd",
"=",
"'imgadm delete {0}'",
".",
"format",
"(",
"uuid",
")",
"res",
"=",
"__salt__",
"[",
"'cmd.run_all'",
"]",
"(",
"cmd",
",",
"python_shell",
"=",
"False",
")",
"retcode",
"=",
"... | Remove an installed image
uuid : string
Specifies uuid to import
CLI Example:
.. code-block:: bash
salt '*' imgadm.delete e42f8c84-bbea-11e2-b920-078fab2aab1f | [
"Remove",
"an",
"installed",
"image"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smartos_imgadm.py#L356-L382 | train | Remove an installed image
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/smartos_imgadm.py | vacuum | def vacuum(verbose=False):
'''
Remove unused images
verbose : boolean (False)
toggle verbose output
CLI Example:
.. code-block:: bash
salt '*' imgadm.vacuum [verbose=True]
'''
ret = {}
cmd = 'imgadm vacuum -f'
res = __salt__['cmd.run_all'](cmd)
retcode = res['... | python | def vacuum(verbose=False):
'''
Remove unused images
verbose : boolean (False)
toggle verbose output
CLI Example:
.. code-block:: bash
salt '*' imgadm.vacuum [verbose=True]
'''
ret = {}
cmd = 'imgadm vacuum -f'
res = __salt__['cmd.run_all'](cmd)
retcode = res['... | [
"def",
"vacuum",
"(",
"verbose",
"=",
"False",
")",
":",
"ret",
"=",
"{",
"}",
"cmd",
"=",
"'imgadm vacuum -f'",
"res",
"=",
"__salt__",
"[",
"'cmd.run_all'",
"]",
"(",
"cmd",
")",
"retcode",
"=",
"res",
"[",
"'retcode'",
"]",
"if",
"retcode",
"!=",
... | Remove unused images
verbose : boolean (False)
toggle verbose output
CLI Example:
.. code-block:: bash
salt '*' imgadm.vacuum [verbose=True] | [
"Remove",
"unused",
"images"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smartos_imgadm.py#L385-L416 | train | Remove unused images from the vacuum image list | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/smartos_imgadm.py | sources | def sources(verbose=False):
'''
Return a list of available sources
verbose : boolean (False)
toggle verbose output
.. versionadded:: 2019.2.0
CLI Example:
.. code-block:: bash
salt '*' imgadm.sources
'''
ret = {}
cmd = 'imgadm sources -j'
res = __salt__['cmd.... | python | def sources(verbose=False):
'''
Return a list of available sources
verbose : boolean (False)
toggle verbose output
.. versionadded:: 2019.2.0
CLI Example:
.. code-block:: bash
salt '*' imgadm.sources
'''
ret = {}
cmd = 'imgadm sources -j'
res = __salt__['cmd.... | [
"def",
"sources",
"(",
"verbose",
"=",
"False",
")",
":",
"ret",
"=",
"{",
"}",
"cmd",
"=",
"'imgadm sources -j'",
"res",
"=",
"__salt__",
"[",
"'cmd.run_all'",
"]",
"(",
"cmd",
")",
"retcode",
"=",
"res",
"[",
"'retcode'",
"]",
"if",
"retcode",
"!=",
... | Return a list of available sources
verbose : boolean (False)
toggle verbose output
.. versionadded:: 2019.2.0
CLI Example:
.. code-block:: bash
salt '*' imgadm.sources | [
"Return",
"a",
"list",
"of",
"available",
"sources"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smartos_imgadm.py#L419-L449 | train | Return a list of available sources | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/smartos_imgadm.py | source_delete | def source_delete(source):
'''
Delete a source
source : string
source url to delete
.. versionadded:: 2019.2.0
CLI Example:
.. code-block:: bash
salt '*' imgadm.source_delete https://updates.joyent.com
'''
ret = {}
cmd = 'imgadm sources -d {0}'.format(source)
... | python | def source_delete(source):
'''
Delete a source
source : string
source url to delete
.. versionadded:: 2019.2.0
CLI Example:
.. code-block:: bash
salt '*' imgadm.source_delete https://updates.joyent.com
'''
ret = {}
cmd = 'imgadm sources -d {0}'.format(source)
... | [
"def",
"source_delete",
"(",
"source",
")",
":",
"ret",
"=",
"{",
"}",
"cmd",
"=",
"'imgadm sources -d {0}'",
".",
"format",
"(",
"source",
")",
"res",
"=",
"__salt__",
"[",
"'cmd.run_all'",
"]",
"(",
"cmd",
")",
"retcode",
"=",
"res",
"[",
"'retcode'",
... | Delete a source
source : string
source url to delete
.. versionadded:: 2019.2.0
CLI Example:
.. code-block:: bash
salt '*' imgadm.source_delete https://updates.joyent.com | [
"Delete",
"a",
"source"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smartos_imgadm.py#L452-L475 | train | Delete a source from the
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/smartos_imgadm.py | source_add | def source_add(source, source_type='imgapi'):
'''
Add a new source
source : string
source url to add
source_trype : string (imgapi)
source type, either imgapi or docker
.. versionadded:: 2019.2.0
CLI Example:
.. code-block:: bash
salt '*' imgadm.source_add https:... | python | def source_add(source, source_type='imgapi'):
'''
Add a new source
source : string
source url to add
source_trype : string (imgapi)
source type, either imgapi or docker
.. versionadded:: 2019.2.0
CLI Example:
.. code-block:: bash
salt '*' imgadm.source_add https:... | [
"def",
"source_add",
"(",
"source",
",",
"source_type",
"=",
"'imgapi'",
")",
":",
"ret",
"=",
"{",
"}",
"# NOTE: there are some undocumented deprecated source types",
"# so we just warn instead of error on those",
"if",
"source_type",
"not",
"in",
"[",
"'imgapi'",
... | Add a new source
source : string
source url to add
source_trype : string (imgapi)
source type, either imgapi or docker
.. versionadded:: 2019.2.0
CLI Example:
.. code-block:: bash
salt '*' imgadm.source_add https://updates.joyent.com
salt '*' imgadm.source_add ht... | [
"Add",
"a",
"new",
"source"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/smartos_imgadm.py#L478-L510 | train | Add a new source to the
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/win_dacl.py | flags | def flags(instantiated=True):
'''
Helper function for instantiating a Flags object
Args:
instantiated (bool):
True to return an instantiated object, False to return the object
definition. Use False if inherited by another class. Default is
True.
Returns:
... | python | def flags(instantiated=True):
'''
Helper function for instantiating a Flags object
Args:
instantiated (bool):
True to return an instantiated object, False to return the object
definition. Use False if inherited by another class. Default is
True.
Returns:
... | [
"def",
"flags",
"(",
"instantiated",
"=",
"True",
")",
":",
"if",
"not",
"HAS_WIN32",
":",
"return",
"class",
"Flags",
"(",
"object",
")",
":",
"'''\n Object containing all the flags for dealing with Windows permissions\n '''",
"# Flag Dicts",
"ace_perms",
"... | Helper function for instantiating a Flags object
Args:
instantiated (bool):
True to return an instantiated object, False to return the object
definition. Use False if inherited by another class. Default is
True.
Returns:
object: An instance of the Flags obj... | [
"Helper",
"function",
"for",
"instantiating",
"a",
"Flags",
"object"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/win_dacl.py#L170-L435 | train | Returns an object containing all the flags for dealing with Windows permissions and permissions. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/win_dacl.py | dacl | def dacl(obj_name=None, obj_type='file'):
'''
Helper function for instantiating a Dacl class.
Args:
obj_name (str):
The full path to the object. If None, a blank DACL will be created.
Default is None.
obj_type (str):
The type of object. Default is 'File... | python | def dacl(obj_name=None, obj_type='file'):
'''
Helper function for instantiating a Dacl class.
Args:
obj_name (str):
The full path to the object. If None, a blank DACL will be created.
Default is None.
obj_type (str):
The type of object. Default is 'File... | [
"def",
"dacl",
"(",
"obj_name",
"=",
"None",
",",
"obj_type",
"=",
"'file'",
")",
":",
"if",
"not",
"HAS_WIN32",
":",
"return",
"class",
"Dacl",
"(",
"flags",
"(",
"False",
")",
")",
":",
"'''\n DACL Object\n '''",
"def",
"__init__",
"(",
"se... | Helper function for instantiating a Dacl class.
Args:
obj_name (str):
The full path to the object. If None, a blank DACL will be created.
Default is None.
obj_type (str):
The type of object. Default is 'File'
Returns:
object: An instantiated Dacl o... | [
"Helper",
"function",
"for",
"instantiating",
"a",
"Dacl",
"class",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/win_dacl.py#L438-L1044 | train | Returns a new DACL 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/win_dacl.py | get_sid | def get_sid(principal):
'''
Converts a username to a sid, or verifies a sid. Required for working with
the DACL.
Args:
principal(str):
The principal to lookup the sid. Can be a sid or a username.
Returns:
PySID Object: A sid
Usage:
.. code-block:: python
... | python | def get_sid(principal):
'''
Converts a username to a sid, or verifies a sid. Required for working with
the DACL.
Args:
principal(str):
The principal to lookup the sid. Can be a sid or a username.
Returns:
PySID Object: A sid
Usage:
.. code-block:: python
... | [
"def",
"get_sid",
"(",
"principal",
")",
":",
"# If None is passed, use the Universal Well-known SID \"Null SID\"",
"if",
"principal",
"is",
"None",
":",
"principal",
"=",
"'NULL SID'",
"# Test if the user passed a sid or a name",
"try",
":",
"sid",
"=",
"salt",
".",
"uti... | Converts a username to a sid, or verifies a sid. Required for working with
the DACL.
Args:
principal(str):
The principal to lookup the sid. Can be a sid or a username.
Returns:
PySID Object: A sid
Usage:
.. code-block:: python
# Get a user's sid
salt... | [
"Converts",
"a",
"username",
"to",
"a",
"sid",
"or",
"verifies",
"a",
"sid",
".",
"Required",
"for",
"working",
"with",
"the",
"DACL",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/win_dacl.py#L1047-L1090 | train | Returns a sid or a sid from a user s name or a sid. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/win_dacl.py | get_sid_string | def get_sid_string(principal):
'''
Converts a PySID object to a string SID.
Args:
principal(str):
The principal to lookup the sid. Must be a PySID object.
Returns:
str: A string sid
Usage:
.. code-block:: python
# Get a PySID object
py_sid = salt... | python | def get_sid_string(principal):
'''
Converts a PySID object to a string SID.
Args:
principal(str):
The principal to lookup the sid. Must be a PySID object.
Returns:
str: A string sid
Usage:
.. code-block:: python
# Get a PySID object
py_sid = salt... | [
"def",
"get_sid_string",
"(",
"principal",
")",
":",
"# If None is passed, use the Universal Well-known SID \"Null SID\"",
"if",
"principal",
"is",
"None",
":",
"principal",
"=",
"'NULL SID'",
"try",
":",
"return",
"win32security",
".",
"ConvertSidToStringSid",
"(",
"prin... | Converts a PySID object to a string SID.
Args:
principal(str):
The principal to lookup the sid. Must be a PySID object.
Returns:
str: A string sid
Usage:
.. code-block:: python
# Get a PySID object
py_sid = salt.utils.win_dacl.get_sid('jsnuffy')
... | [
"Converts",
"a",
"PySID",
"object",
"to",
"a",
"string",
"SID",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/win_dacl.py#L1093-L1129 | train | Converts a PySID object to a string SID. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/win_dacl.py | get_name | def get_name(principal):
'''
Gets the name from the specified principal.
Args:
principal (str):
Find the Normalized name based on this. Can be a PySID object, a SID
string, or a user name in any capitalization.
.. note::
Searching based on the u... | python | def get_name(principal):
'''
Gets the name from the specified principal.
Args:
principal (str):
Find the Normalized name based on this. Can be a PySID object, a SID
string, or a user name in any capitalization.
.. note::
Searching based on the u... | [
"def",
"get_name",
"(",
"principal",
")",
":",
"# If this is a PySID object, use it",
"if",
"isinstance",
"(",
"principal",
",",
"pywintypes",
".",
"SIDType",
")",
":",
"sid_obj",
"=",
"principal",
"else",
":",
"# If None is passed, use the Universal Well-known SID for \"... | Gets the name from the specified principal.
Args:
principal (str):
Find the Normalized name based on this. Can be a PySID object, a SID
string, or a user name in any capitalization.
.. note::
Searching based on the user name can be slow on hosts connect... | [
"Gets",
"the",
"name",
"from",
"the",
"specified",
"principal",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/win_dacl.py#L1132-L1186 | train | Gets the name from the specified principal. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/win_dacl.py | get_owner | def get_owner(obj_name, obj_type='file'):
r'''
Gets the owner of the passed object
Args:
obj_name (str):
The path for which to obtain owner information. The format of this
parameter is different depending on the ``obj_type``
obj_type (str):
The type of ... | python | def get_owner(obj_name, obj_type='file'):
r'''
Gets the owner of the passed object
Args:
obj_name (str):
The path for which to obtain owner information. The format of this
parameter is different depending on the ``obj_type``
obj_type (str):
The type of ... | [
"def",
"get_owner",
"(",
"obj_name",
",",
"obj_type",
"=",
"'file'",
")",
":",
"# Not all filesystems mountable within windows have SecurityDescriptors.",
"# For instance, some mounted SAMBA shares, or VirtualBox shared folders. If",
"# we can't load a file descriptor for the file, we defaul... | r'''
Gets the owner of the passed object
Args:
obj_name (str):
The path for which to obtain owner information. The format of this
parameter is different depending on the ``obj_type``
obj_type (str):
The type of object to query. This value changes the format... | [
"r",
"Gets",
"the",
"owner",
"of",
"the",
"passed",
"object"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/win_dacl.py#L1189-L1270 | train | r Gets the owner of the passed 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/win_dacl.py | get_primary_group | def get_primary_group(obj_name, obj_type='file'):
r'''
Gets the primary group of the passed object
Args:
obj_name (str):
The path for which to obtain primary group information
obj_type (str):
The type of object to query. This value changes the format of the
... | python | def get_primary_group(obj_name, obj_type='file'):
r'''
Gets the primary group of the passed object
Args:
obj_name (str):
The path for which to obtain primary group information
obj_type (str):
The type of object to query. This value changes the format of the
... | [
"def",
"get_primary_group",
"(",
"obj_name",
",",
"obj_type",
"=",
"'file'",
")",
":",
"# Not all filesystems mountable within windows have SecurityDescriptors.",
"# For instance, some mounted SAMBA shares, or VirtualBox shared folders. If",
"# we can't load a file descriptor for the file, w... | r'''
Gets the primary group of the passed object
Args:
obj_name (str):
The path for which to obtain primary group information
obj_type (str):
The type of object to query. This value changes the format of the
``obj_name`` parameter as follows:
-... | [
"r",
"Gets",
"the",
"primary",
"group",
"of",
"the",
"passed",
"object"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/win_dacl.py#L1273-L1356 | train | r Returns the primary group of the passed 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/win_dacl.py | set_owner | def set_owner(obj_name, principal, obj_type='file'):
'''
Set the owner of an object. This can be a file, folder, registry key,
printer, service, etc...
Args:
obj_name (str):
The object for which to set owner. This can be the path to a file or
folder, a registry key, pri... | python | def set_owner(obj_name, principal, obj_type='file'):
'''
Set the owner of an object. This can be a file, folder, registry key,
printer, service, etc...
Args:
obj_name (str):
The object for which to set owner. This can be the path to a file or
folder, a registry key, pri... | [
"def",
"set_owner",
"(",
"obj_name",
",",
"principal",
",",
"obj_type",
"=",
"'file'",
")",
":",
"sid",
"=",
"get_sid",
"(",
"principal",
")",
"obj_flags",
"=",
"flags",
"(",
")",
"# Validate obj_type",
"if",
"obj_type",
".",
"lower",
"(",
")",
"not",
"i... | Set the owner of an object. This can be a file, folder, registry key,
printer, service, etc...
Args:
obj_name (str):
The object for which to set owner. This can be the path to a file or
folder, a registry key, printer, etc. For more information about how
to format t... | [
"Set",
"the",
"owner",
"of",
"an",
"object",
".",
"This",
"can",
"be",
"a",
"file",
"folder",
"registry",
"key",
"printer",
"service",
"etc",
"..."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/win_dacl.py#L1359-L1433 | train | Set the owner of an 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/win_dacl.py | set_permissions | def set_permissions(obj_name,
principal,
permissions,
access_mode='grant',
applies_to=None,
obj_type='file',
reset_perms=False,
protected=None):
'''
Set the permissions of ... | python | def set_permissions(obj_name,
principal,
permissions,
access_mode='grant',
applies_to=None,
obj_type='file',
reset_perms=False,
protected=None):
'''
Set the permissions of ... | [
"def",
"set_permissions",
"(",
"obj_name",
",",
"principal",
",",
"permissions",
",",
"access_mode",
"=",
"'grant'",
",",
"applies_to",
"=",
"None",
",",
"obj_type",
"=",
"'file'",
",",
"reset_perms",
"=",
"False",
",",
"protected",
"=",
"None",
")",
":",
... | Set the permissions of an object. This can be a file, folder, registry key,
printer, service, etc...
Args:
obj_name (str):
The object for which to set permissions. This can be the path to a
file or folder, a registry key, printer, etc. For more information
about how... | [
"Set",
"the",
"permissions",
"of",
"an",
"object",
".",
"This",
"can",
"be",
"a",
"file",
"folder",
"registry",
"key",
"printer",
"service",
"etc",
"..."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/win_dacl.py#L1517-L1599 | train | Set the permissions of an object in the specified order. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/win_dacl.py | rm_permissions | def rm_permissions(obj_name,
principal,
ace_type='all',
obj_type='file'):
r'''
Remove a user's ACE from an object. This can be a file, folder, registry
key, printer, service, etc...
Args:
obj_name (str):
The object from which... | python | def rm_permissions(obj_name,
principal,
ace_type='all',
obj_type='file'):
r'''
Remove a user's ACE from an object. This can be a file, folder, registry
key, printer, service, etc...
Args:
obj_name (str):
The object from which... | [
"def",
"rm_permissions",
"(",
"obj_name",
",",
"principal",
",",
"ace_type",
"=",
"'all'",
",",
"obj_type",
"=",
"'file'",
")",
":",
"obj_dacl",
"=",
"dacl",
"(",
"obj_name",
",",
"obj_type",
")",
"obj_dacl",
".",
"rm_ace",
"(",
"principal",
",",
"ace_type... | r'''
Remove a user's ACE from an object. This can be a file, folder, registry
key, printer, service, etc...
Args:
obj_name (str):
The object from which to remove the ace. This can be the
path to a file or folder, a registry key, printer, etc. For more
informatio... | [
"r",
"Remove",
"a",
"user",
"s",
"ACE",
"from",
"an",
"object",
".",
"This",
"can",
"be",
"a",
"file",
"folder",
"registry",
"key",
"printer",
"service",
"etc",
"..."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/win_dacl.py#L1602-L1648 | train | r Removes permissions for a user from a specific 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/win_dacl.py | get_permissions | def get_permissions(obj_name, principal=None, obj_type='file'):
'''
Get the permissions for the passed object
Args:
obj_name (str):
The name of or path to the object.
principal (Optional[str]):
The name of the user or group for which to get permissions. Can also
... | python | def get_permissions(obj_name, principal=None, obj_type='file'):
'''
Get the permissions for the passed object
Args:
obj_name (str):
The name of or path to the object.
principal (Optional[str]):
The name of the user or group for which to get permissions. Can also
... | [
"def",
"get_permissions",
"(",
"obj_name",
",",
"principal",
"=",
"None",
",",
"obj_type",
"=",
"'file'",
")",
":",
"obj_dacl",
"=",
"dacl",
"(",
"obj_name",
",",
"obj_type",
")",
"if",
"principal",
"is",
"None",
":",
"return",
"obj_dacl",
".",
"list_aces"... | Get the permissions for the passed object
Args:
obj_name (str):
The name of or path to the object.
principal (Optional[str]):
The name of the user or group for which to get permissions. Can also
pass a SID. If None, all ACEs defined on the object will be
... | [
"Get",
"the",
"permissions",
"for",
"the",
"passed",
"object"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/win_dacl.py#L1651-L1682 | train | Get the permissions for the passed 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/win_dacl.py | has_permission | def has_permission(obj_name,
principal,
permission,
access_mode='grant',
obj_type='file',
exact=True):
r'''
Check if the object has a permission
Args:
obj_name (str):
The name of or path to t... | python | def has_permission(obj_name,
principal,
permission,
access_mode='grant',
obj_type='file',
exact=True):
r'''
Check if the object has a permission
Args:
obj_name (str):
The name of or path to t... | [
"def",
"has_permission",
"(",
"obj_name",
",",
"principal",
",",
"permission",
",",
"access_mode",
"=",
"'grant'",
",",
"obj_type",
"=",
"'file'",
",",
"exact",
"=",
"True",
")",
":",
"# Validate access_mode",
"if",
"access_mode",
".",
"lower",
"(",
")",
"no... | r'''
Check if the object has a permission
Args:
obj_name (str):
The name of or path to the object.
principal (str):
The name of the user or group for which to get permissions. Can also
pass a SID.
permission (str):
The permission to ver... | [
"r",
"Check",
"if",
"the",
"object",
"has",
"a",
"permission"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/win_dacl.py#L1685-L1773 | train | r Check if the object has the permission | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/win_dacl.py | set_inheritance | def set_inheritance(obj_name, enabled, obj_type='file', clear=False):
'''
Enable or disable an objects inheritance.
Args:
obj_name (str):
The name of the object
enabled (bool):
True to enable inheritance, False to disable
obj_type (Optional[str]):
... | python | def set_inheritance(obj_name, enabled, obj_type='file', clear=False):
'''
Enable or disable an objects inheritance.
Args:
obj_name (str):
The name of the object
enabled (bool):
True to enable inheritance, False to disable
obj_type (Optional[str]):
... | [
"def",
"set_inheritance",
"(",
"obj_name",
",",
"enabled",
",",
"obj_type",
"=",
"'file'",
",",
"clear",
"=",
"False",
")",
":",
"if",
"obj_type",
"not",
"in",
"[",
"'file'",
",",
"'registry'",
",",
"'registry32'",
"]",
":",
"raise",
"SaltInvocationError",
... | Enable or disable an objects inheritance.
Args:
obj_name (str):
The name of the object
enabled (bool):
True to enable inheritance, False to disable
obj_type (Optional[str]):
The type of object. Only three objects allow inheritance. Valid
ob... | [
"Enable",
"or",
"disable",
"an",
"objects",
"inheritance",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/win_dacl.py#L1776-L1818 | train | Enable or disable inheritance of an object in the ACEs. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/win_dacl.py | get_inheritance | def get_inheritance(obj_name, obj_type='file'):
'''
Get an object's inheritance.
Args:
obj_name (str):
The name of the object
obj_type (Optional[str]):
The type of object. Only three object types allow inheritance. Valid
objects are:
- file... | python | def get_inheritance(obj_name, obj_type='file'):
'''
Get an object's inheritance.
Args:
obj_name (str):
The name of the object
obj_type (Optional[str]):
The type of object. Only three object types allow inheritance. Valid
objects are:
- file... | [
"def",
"get_inheritance",
"(",
"obj_name",
",",
"obj_type",
"=",
"'file'",
")",
":",
"obj_dacl",
"=",
"dacl",
"(",
"obj_name",
"=",
"obj_name",
",",
"obj_type",
"=",
"obj_type",
")",
"inherited",
"=",
"win32security",
".",
"INHERITED_ACE",
"for",
"i",
"in",
... | Get an object's inheritance.
Args:
obj_name (str):
The name of the object
obj_type (Optional[str]):
The type of object. Only three object types allow inheritance. Valid
objects are:
- file (default): This is a file or directory
- regist... | [
"Get",
"an",
"object",
"s",
"inheritance",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/win_dacl.py#L1821-L1861 | train | Get an object s inheritance. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/win_dacl.py | copy_security | def copy_security(source,
target,
obj_type='file',
copy_owner=True,
copy_group=True,
copy_dacl=True,
copy_sacl=True):
r'''
Copy the security descriptor of the Source to the Target. You can specify a
s... | python | def copy_security(source,
target,
obj_type='file',
copy_owner=True,
copy_group=True,
copy_dacl=True,
copy_sacl=True):
r'''
Copy the security descriptor of the Source to the Target. You can specify a
s... | [
"def",
"copy_security",
"(",
"source",
",",
"target",
",",
"obj_type",
"=",
"'file'",
",",
"copy_owner",
"=",
"True",
",",
"copy_group",
"=",
"True",
",",
"copy_dacl",
"=",
"True",
",",
"copy_sacl",
"=",
"True",
")",
":",
"obj_dacl",
"=",
"dacl",
"(",
... | r'''
Copy the security descriptor of the Source to the Target. You can specify a
specific portion of the security descriptor to copy using one of the
`copy_*` parameters.
.. note::
At least one `copy_*` parameter must be ``True``
.. note::
The user account running this command must... | [
"r",
"Copy",
"the",
"security",
"descriptor",
"of",
"the",
"Source",
"to",
"the",
"Target",
".",
"You",
"can",
"specify",
"a",
"specific",
"portion",
"of",
"the",
"security",
"descriptor",
"to",
"copy",
"using",
"one",
"of",
"the",
"copy_",
"*",
"parameter... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/win_dacl.py#L1864-L2029 | train | r Copy the security info from one source to another. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/win_dacl.py | _check_perms | def _check_perms(obj_name, obj_type, new_perms, cur_perms, access_mode, ret):
'''
Helper function used by ``check_perms`` for checking and setting Grant and
Deny permissions.
Args:
obj_name (str):
The name or full path to the object
obj_type (Optional[str]):
Th... | python | def _check_perms(obj_name, obj_type, new_perms, cur_perms, access_mode, ret):
'''
Helper function used by ``check_perms`` for checking and setting Grant and
Deny permissions.
Args:
obj_name (str):
The name or full path to the object
obj_type (Optional[str]):
Th... | [
"def",
"_check_perms",
"(",
"obj_name",
",",
"obj_type",
",",
"new_perms",
",",
"cur_perms",
",",
"access_mode",
",",
"ret",
")",
":",
"access_mode",
"=",
"access_mode",
".",
"lower",
"(",
")",
"changes",
"=",
"{",
"}",
"for",
"user",
"in",
"new_perms",
... | Helper function used by ``check_perms`` for checking and setting Grant and
Deny permissions.
Args:
obj_name (str):
The name or full path to the object
obj_type (Optional[str]):
The type of object for which to check permissions. Default is 'file'
new_perms (dic... | [
"Helper",
"function",
"used",
"by",
"check_perms",
"for",
"checking",
"and",
"setting",
"Grant",
"and",
"Deny",
"permissions",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/win_dacl.py#L2032-L2198 | train | Helper function to check permissions for the object and return a dictionary of changes to the state 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/utils/win_dacl.py | check_perms | def check_perms(obj_name,
obj_type='file',
ret=None,
owner=None,
grant_perms=None,
deny_perms=None,
inheritance=True,
reset=False):
'''
Check owner and permissions for the passed directory. This funct... | python | def check_perms(obj_name,
obj_type='file',
ret=None,
owner=None,
grant_perms=None,
deny_perms=None,
inheritance=True,
reset=False):
'''
Check owner and permissions for the passed directory. This funct... | [
"def",
"check_perms",
"(",
"obj_name",
",",
"obj_type",
"=",
"'file'",
",",
"ret",
"=",
"None",
",",
"owner",
"=",
"None",
",",
"grant_perms",
"=",
"None",
",",
"deny_perms",
"=",
"None",
",",
"inheritance",
"=",
"True",
",",
"reset",
"=",
"False",
")"... | Check owner and permissions for the passed directory. This function checks
the permissions and sets them, returning the changes made.
.. versionadded:: 2019.2.0
Args:
obj_name (str):
The name or full path to the object
obj_type (Optional[str]):
The type of object ... | [
"Check",
"owner",
"and",
"permissions",
"for",
"the",
"passed",
"directory",
".",
"This",
"function",
"checks",
"the",
"permissions",
"and",
"sets",
"them",
"returning",
"the",
"changes",
"made",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/win_dacl.py#L2201-L2419 | train | This function checks the permissions of the passed object and sets them to the DACL and returns the changes made. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/win_dacl.py | set_perms | def set_perms(obj_name,
obj_type='file',
grant_perms=None,
deny_perms=None,
inheritance=True,
reset=False):
'''
Set permissions for the given path
.. versionadded:: 2019.2.0
Args:
obj_name (str):
The name or ful... | python | def set_perms(obj_name,
obj_type='file',
grant_perms=None,
deny_perms=None,
inheritance=True,
reset=False):
'''
Set permissions for the given path
.. versionadded:: 2019.2.0
Args:
obj_name (str):
The name or ful... | [
"def",
"set_perms",
"(",
"obj_name",
",",
"obj_type",
"=",
"'file'",
",",
"grant_perms",
"=",
"None",
",",
"deny_perms",
"=",
"None",
",",
"inheritance",
"=",
"True",
",",
"reset",
"=",
"False",
")",
":",
"ret",
"=",
"{",
"}",
"if",
"reset",
":",
"# ... | Set permissions for the given path
.. versionadded:: 2019.2.0
Args:
obj_name (str):
The name or full path to the object
obj_type (Optional[str]):
The type of object for which to check permissions. Default is 'file'
grant_perms (dict):
A dictionary... | [
"Set",
"permissions",
"for",
"the",
"given",
"path"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/win_dacl.py#L2467-L2606 | train | Sets the permissions for the given 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/github.py | get_user_pubkeys | def get_user_pubkeys(users):
'''
Retrieve a set of public keys from GitHub for the specified list of users.
Expects input in list format. Optionally, a value in the list may be a dict
whose value is a list of key IDs to be returned. If this is not done, then
all keys will be returned.
Some exam... | python | def get_user_pubkeys(users):
'''
Retrieve a set of public keys from GitHub for the specified list of users.
Expects input in list format. Optionally, a value in the list may be a dict
whose value is a list of key IDs to be returned. If this is not done, then
all keys will be returned.
Some exam... | [
"def",
"get_user_pubkeys",
"(",
"users",
")",
":",
"if",
"not",
"isinstance",
"(",
"users",
",",
"list",
")",
":",
"return",
"{",
"'Error'",
":",
"'A list of users is expected'",
"}",
"ret",
"=",
"{",
"}",
"for",
"user",
"in",
"users",
":",
"key_ids",
"=... | Retrieve a set of public keys from GitHub for the specified list of users.
Expects input in list format. Optionally, a value in the list may be a dict
whose value is a list of key IDs to be returned. If this is not done, then
all keys will be returned.
Some example data structures that coupld be passed... | [
"Retrieve",
"a",
"set",
"of",
"public",
"keys",
"from",
"GitHub",
"for",
"the",
"specified",
"list",
"of",
"users",
".",
"Expects",
"input",
"in",
"list",
"format",
".",
"Optionally",
"a",
"value",
"in",
"the",
"list",
"may",
"be",
"a",
"dict",
"whose",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/github.py#L20-L71 | train | Retrieve a set of public keys from GitHub for the specified list of users. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/namecheap_domains_dns.py | get_hosts | def get_hosts(sld, tld):
'''
Retrieves DNS host record settings for the requested domain.
returns a dictionary of information about the requested domain
sld
SLD of the domain name
tld
TLD of the domain name
CLI Example:
.. code-block:: bash
salt 'my-minion' name... | python | def get_hosts(sld, tld):
'''
Retrieves DNS host record settings for the requested domain.
returns a dictionary of information about the requested domain
sld
SLD of the domain name
tld
TLD of the domain name
CLI Example:
.. code-block:: bash
salt 'my-minion' name... | [
"def",
"get_hosts",
"(",
"sld",
",",
"tld",
")",
":",
"opts",
"=",
"salt",
".",
"utils",
".",
"namecheap",
".",
"get_opts",
"(",
"'namecheap.domains.dns.gethosts'",
")",
"opts",
"[",
"'TLD'",
"]",
"=",
"tld",
"opts",
"[",
"'SLD'",
"]",
"=",
"sld",
"res... | Retrieves DNS host record settings for the requested domain.
returns a dictionary of information about the requested domain
sld
SLD of the domain name
tld
TLD of the domain name
CLI Example:
.. code-block:: bash
salt 'my-minion' namecheap_domains_dns.get_hosts sld tld | [
"Retrieves",
"DNS",
"host",
"record",
"settings",
"for",
"the",
"requested",
"domain",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/namecheap_domains_dns.py#L56-L84 | train | Retrieves DNS host record settings for the requested domain. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/namecheap_domains_dns.py | get_list | def get_list(sld, tld):
'''
Gets a list of DNS servers associated with the requested domain.
returns a dictionary of information about requested domain
sld
SLD of the domain name
tld
TLD of the domain name
CLI Example:
.. code-block:: bash
salt 'my-minion' namec... | python | def get_list(sld, tld):
'''
Gets a list of DNS servers associated with the requested domain.
returns a dictionary of information about requested domain
sld
SLD of the domain name
tld
TLD of the domain name
CLI Example:
.. code-block:: bash
salt 'my-minion' namec... | [
"def",
"get_list",
"(",
"sld",
",",
"tld",
")",
":",
"opts",
"=",
"salt",
".",
"utils",
".",
"namecheap",
".",
"get_opts",
"(",
"'namecheap.domains.dns.getlist'",
")",
"opts",
"[",
"'TLD'",
"]",
"=",
"tld",
"opts",
"[",
"'SLD'",
"]",
"=",
"sld",
"respo... | Gets a list of DNS servers associated with the requested domain.
returns a dictionary of information about requested domain
sld
SLD of the domain name
tld
TLD of the domain name
CLI Example:
.. code-block:: bash
salt 'my-minion' namecheap_domains_dns.get_list sld tld | [
"Gets",
"a",
"list",
"of",
"DNS",
"servers",
"associated",
"with",
"the",
"requested",
"domain",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/namecheap_domains_dns.py#L87-L115 | train | Gets a list of DNS servers associated with the requested domain. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/namecheap_domains_dns.py | set_hosts | def set_hosts(sld, tld, hosts):
'''
Sets DNS host records settings for the requested domain.
returns True if the host records were set successfully
sld
SLD of the domain name
tld
TLD of the domain name
hosts
Must be passed as a list of Python dictionaries, with each d... | python | def set_hosts(sld, tld, hosts):
'''
Sets DNS host records settings for the requested domain.
returns True if the host records were set successfully
sld
SLD of the domain name
tld
TLD of the domain name
hosts
Must be passed as a list of Python dictionaries, with each d... | [
"def",
"set_hosts",
"(",
"sld",
",",
"tld",
",",
"hosts",
")",
":",
"opts",
"=",
"salt",
".",
"utils",
".",
"namecheap",
".",
"get_opts",
"(",
"'namecheap.domains.dns.setHosts'",
")",
"opts",
"[",
"'SLD'",
"]",
"=",
"sld",
"opts",
"[",
"'TLD'",
"]",
"=... | Sets DNS host records settings for the requested domain.
returns True if the host records were set successfully
sld
SLD of the domain name
tld
TLD of the domain name
hosts
Must be passed as a list of Python dictionaries, with each dictionary
containing the following k... | [
"Sets",
"DNS",
"host",
"records",
"settings",
"for",
"the",
"requested",
"domain",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/namecheap_domains_dns.py#L118-L170 | train | Sets the DNS host records settings for the requested domain. Returns True if the host records were set successfully. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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_domains_dns.py | set_custom | def set_custom(sld, tld, nameservers):
'''
Sets domain to use custom DNS servers.
returns True if the custom nameservers were set successfully
sld
SLD of the domain name
tld
TLD of the domain name
nameservers
array of strings List of nameservers to be associated with... | python | def set_custom(sld, tld, nameservers):
'''
Sets domain to use custom DNS servers.
returns True if the custom nameservers were set successfully
sld
SLD of the domain name
tld
TLD of the domain name
nameservers
array of strings List of nameservers to be associated with... | [
"def",
"set_custom",
"(",
"sld",
",",
"tld",
",",
"nameservers",
")",
":",
"opts",
"=",
"salt",
".",
"utils",
".",
"namecheap",
".",
"get_opts",
"(",
"'namecheap.domains.dns.setCustom'",
")",
"opts",
"[",
"'SLD'",
"]",
"=",
"sld",
"opts",
"[",
"'TLD'",
"... | Sets domain to use custom DNS servers.
returns True if the custom nameservers were set successfully
sld
SLD of the domain name
tld
TLD of the domain name
nameservers
array of strings List of nameservers to be associated with this domain
CLI Example:
.. code-block::... | [
"Sets",
"domain",
"to",
"use",
"custom",
"DNS",
"servers",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/namecheap_domains_dns.py#L173-L203 | train | Sets the domain to use custom DNS servers. Returns True if the custom nameservers were set successfully | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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_domains_dns.py | set_default | def set_default(sld, tld):
'''
Sets domain to use namecheap default DNS servers. Required for free
services like Host record management, URL forwarding, email forwarding,
dynamic DNS and other value added services.
sld
SLD of the domain name
tld
TLD of the domain name
Retu... | python | def set_default(sld, tld):
'''
Sets domain to use namecheap default DNS servers. Required for free
services like Host record management, URL forwarding, email forwarding,
dynamic DNS and other value added services.
sld
SLD of the domain name
tld
TLD of the domain name
Retu... | [
"def",
"set_default",
"(",
"sld",
",",
"tld",
")",
":",
"opts",
"=",
"salt",
".",
"utils",
".",
"namecheap",
".",
"get_opts",
"(",
"'namecheap.domains.dns.setDefault'",
")",
"opts",
"[",
"'SLD'",
"]",
"=",
"sld",
"opts",
"[",
"'TLD'",
"]",
"=",
"tld",
... | Sets domain to use namecheap default DNS servers. Required for free
services like Host record management, URL forwarding, email forwarding,
dynamic DNS and other value added services.
sld
SLD of the domain name
tld
TLD of the domain name
Returns ``True`` if the domain was successf... | [
"Sets",
"domain",
"to",
"use",
"namecheap",
"default",
"DNS",
"servers",
".",
"Required",
"for",
"free",
"services",
"like",
"Host",
"record",
"management",
"URL",
"forwarding",
"email",
"forwarding",
"dynamic",
"DNS",
"and",
"other",
"value",
"added",
"services... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/namecheap_domains_dns.py#L206-L235 | train | Sets the domain to use namecheap default DNS servers. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/profile.py | output | def output(data, **kwargs):
'''
Display the profiling data in a table format.
'''
rows = _find_durations(data)
kwargs['opts'] = __opts__
kwargs['rows_key'] = 'rows'
kwargs['labels_key'] = 'labels'
to_show = {'labels': ['name', 'mod.fun', 'duration (ms)'],
'rows': rows... | python | def output(data, **kwargs):
'''
Display the profiling data in a table format.
'''
rows = _find_durations(data)
kwargs['opts'] = __opts__
kwargs['rows_key'] = 'rows'
kwargs['labels_key'] = 'labels'
to_show = {'labels': ['name', 'mod.fun', 'duration (ms)'],
'rows': rows... | [
"def",
"output",
"(",
"data",
",",
"*",
"*",
"kwargs",
")",
":",
"rows",
"=",
"_find_durations",
"(",
"data",
")",
"kwargs",
"[",
"'opts'",
"]",
"=",
"__opts__",
"kwargs",
"[",
"'rows_key'",
"]",
"=",
"'rows'",
"kwargs",
"[",
"'labels_key'",
"]",
"=",
... | Display the profiling data in a table format. | [
"Display",
"the",
"profiling",
"data",
"in",
"a",
"table",
"format",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/output/profile.py#L67-L81 | train | Display the profiling data in a table 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/lxd_image.py | present | def present(name,
source,
aliases=None,
public=None,
auto_update=None,
remote_addr=None,
cert=None,
key=None,
verify_cert=True):
'''
Ensure an image exists, copy it else from source
name :
An alias of th... | python | def present(name,
source,
aliases=None,
public=None,
auto_update=None,
remote_addr=None,
cert=None,
key=None,
verify_cert=True):
'''
Ensure an image exists, copy it else from source
name :
An alias of th... | [
"def",
"present",
"(",
"name",
",",
"source",
",",
"aliases",
"=",
"None",
",",
"public",
"=",
"None",
",",
"auto_update",
"=",
"None",
",",
"remote_addr",
"=",
"None",
",",
"cert",
"=",
"None",
",",
"key",
"=",
"None",
",",
"verify_cert",
"=",
"True... | Ensure an image exists, copy it else from source
name :
An alias of the image, this is used to check if the image exists and
it will be added as alias to the image on copy/create.
source :
Source dict.
For an LXD to LXD copy:
.. code-block: yaml
source:
... | [
"Ensure",
"an",
"image",
"exists",
"copy",
"it",
"else",
"from",
"source"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/lxd_image.py#L52-L298 | train | Ensure an image exists copy it else from source and create it if it does not exist. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/boto3_route53.py | hosted_zone_present | def hosted_zone_present(name, Name=None, PrivateZone=False,
CallerReference=None, Comment=None, VPCs=None,
region=None, key=None, keyid=None, profile=None):
'''
Ensure a hosted zone exists with the given attributes.
name
The name of the state definiti... | python | def hosted_zone_present(name, Name=None, PrivateZone=False,
CallerReference=None, Comment=None, VPCs=None,
region=None, key=None, keyid=None, profile=None):
'''
Ensure a hosted zone exists with the given attributes.
name
The name of the state definiti... | [
"def",
"hosted_zone_present",
"(",
"name",
",",
"Name",
"=",
"None",
",",
"PrivateZone",
"=",
"False",
",",
"CallerReference",
"=",
"None",
",",
"Comment",
"=",
"None",
",",
"VPCs",
"=",
"None",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",... | Ensure a hosted zone exists with the given attributes.
name
The name of the state definition.
Name
The name of the domain. This should be a fully-specified domain, and should terminate with a
period. This is the name you have registered with your DNS registrar. It is also the name
... | [
"Ensure",
"a",
"hosted",
"zone",
"exists",
"with",
"the",
"given",
"attributes",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto3_route53.py#L87-L298 | train | Ensure a hosted zone with the given attributes 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/boto3_route53.py | hosted_zone_absent | def hosted_zone_absent(name, Name=None, PrivateZone=False,
region=None, key=None, keyid=None, profile=None):
'''
Ensure the Route53 Hostes Zone described is absent
name
The name of the state definition.
Name
The name of the domain. This should be a fully-specifie... | python | def hosted_zone_absent(name, Name=None, PrivateZone=False,
region=None, key=None, keyid=None, profile=None):
'''
Ensure the Route53 Hostes Zone described is absent
name
The name of the state definition.
Name
The name of the domain. This should be a fully-specifie... | [
"def",
"hosted_zone_absent",
"(",
"name",
",",
"Name",
"=",
"None",
",",
"PrivateZone",
"=",
"False",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"Name",
"=",
"Name",
"if",
... | Ensure the Route53 Hostes Zone described is absent
name
The name of the state definition.
Name
The name of the domain. This should be a fully-specified domain, and should terminate with a
period. If not provided, the value of name will be used.
PrivateZone
Set True if del... | [
"Ensure",
"the",
"Route53",
"Hostes",
"Zone",
"described",
"is",
"absent"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto3_route53.py#L301-L350 | train | Ensure the Route 53 Hostes Zone described is absent. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/boto3_route53.py | rr_present | def rr_present(name, HostedZoneId=None, DomainName=None, PrivateZone=False, Name=None, Type=None,
SetIdentifier=None, Weight=None, Region=None, GeoLocation=None, Failover=None,
TTL=None, ResourceRecords=None, AliasTarget=None, HealthCheckId=None,
TrafficPolicyInstanceId=None... | python | def rr_present(name, HostedZoneId=None, DomainName=None, PrivateZone=False, Name=None, Type=None,
SetIdentifier=None, Weight=None, Region=None, GeoLocation=None, Failover=None,
TTL=None, ResourceRecords=None, AliasTarget=None, HealthCheckId=None,
TrafficPolicyInstanceId=None... | [
"def",
"rr_present",
"(",
"name",
",",
"HostedZoneId",
"=",
"None",
",",
"DomainName",
"=",
"None",
",",
"PrivateZone",
"=",
"False",
",",
"Name",
"=",
"None",
",",
"Type",
"=",
"None",
",",
"SetIdentifier",
"=",
"None",
",",
"Weight",
"=",
"None",
","... | Ensure the Route53 record is present.
name
The name of the state definition. This will be used for Name if the latter is
not provided.
HostedZoneId
The ID of a zone to create the record in. Exclusive with DomainName.
DomainName
The domain name of a zone to create the rec... | [
"Ensure",
"the",
"Route53",
"record",
"is",
"present",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto3_route53.py#L353-L692 | train | Ensure a Route 53 record is present in the Route 53 record store. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/boto3_route53.py | rr_absent | def rr_absent(name, HostedZoneId=None, DomainName=None, PrivateZone=False,
Name=None, Type=None, SetIdentifier=None,
region=None, key=None, keyid=None, profile=None):
'''
Ensure the Route53 record is deleted.
name
The name of the state definition. This will be used for ... | python | def rr_absent(name, HostedZoneId=None, DomainName=None, PrivateZone=False,
Name=None, Type=None, SetIdentifier=None,
region=None, key=None, keyid=None, profile=None):
'''
Ensure the Route53 record is deleted.
name
The name of the state definition. This will be used for ... | [
"def",
"rr_absent",
"(",
"name",
",",
"HostedZoneId",
"=",
"None",
",",
"DomainName",
"=",
"None",
",",
"PrivateZone",
"=",
"False",
",",
"Name",
"=",
"None",
",",
"Type",
"=",
"None",
",",
"SetIdentifier",
"=",
"None",
",",
"region",
"=",
"None",
",",... | Ensure the Route53 record is deleted.
name
The name of the state definition. This will be used for Name if the latter is
not provided.
HostedZoneId
The ID of the zone to delete the record from. Exclusive with DomainName.
DomainName
The domain name of the zone to delete t... | [
"Ensure",
"the",
"Route53",
"record",
"is",
"deleted",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/boto3_route53.py#L695-L800 | train | Ensure a Route53 record is absent in a Route53 state definition. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/environment.py | get_module_environment | def get_module_environment(env=None, function=None):
'''
Get module optional environment.
To setup an environment option for a particular module,
add either pillar or config at the minion as follows:
system-environment:
modules:
pkg:
_:
LC_ALL: en_GB.UTF-8
... | python | def get_module_environment(env=None, function=None):
'''
Get module optional environment.
To setup an environment option for a particular module,
add either pillar or config at the minion as follows:
system-environment:
modules:
pkg:
_:
LC_ALL: en_GB.UTF-8
... | [
"def",
"get_module_environment",
"(",
"env",
"=",
"None",
",",
"function",
"=",
"None",
")",
":",
"result",
"=",
"{",
"}",
"if",
"not",
"env",
":",
"env",
"=",
"{",
"}",
"for",
"env_src",
"in",
"[",
"env",
".",
"get",
"(",
"'__opts__'",
",",
"{",
... | Get module optional environment.
To setup an environment option for a particular module,
add either pillar or config at the minion as follows:
system-environment:
modules:
pkg:
_:
LC_ALL: en_GB.UTF-8
FOO: bar
install:
HELLO: world
... | [
"Get",
"module",
"optional",
"environment",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/environment.py#L9-L65 | train | Get the environment for a particular module. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/aptly.py | _cmd_run | def _cmd_run(cmd):
'''
Run the aptly command.
:return: The string output of the command.
:rtype: str
'''
cmd.insert(0, 'aptly')
cmd_ret = __salt__['cmd.run_all'](cmd, ignore_retcode=True)
if cmd_ret['retcode'] != 0:
log.debug('Unable to execute command: %s\nError: %s', cmd,
... | python | def _cmd_run(cmd):
'''
Run the aptly command.
:return: The string output of the command.
:rtype: str
'''
cmd.insert(0, 'aptly')
cmd_ret = __salt__['cmd.run_all'](cmd, ignore_retcode=True)
if cmd_ret['retcode'] != 0:
log.debug('Unable to execute command: %s\nError: %s', cmd,
... | [
"def",
"_cmd_run",
"(",
"cmd",
")",
":",
"cmd",
".",
"insert",
"(",
"0",
",",
"'aptly'",
")",
"cmd_ret",
"=",
"__salt__",
"[",
"'cmd.run_all'",
"]",
"(",
"cmd",
",",
"ignore_retcode",
"=",
"True",
")",
"if",
"cmd_ret",
"[",
"'retcode'",
"]",
"!=",
"0... | Run the aptly command.
:return: The string output of the command.
:rtype: str | [
"Run",
"the",
"aptly",
"command",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aptly.py#L36-L50 | train | Run the aptly command and return the output of the command. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/aptly.py | _convert_to_closest_type | def _convert_to_closest_type(value):
'''
Convert string value to it's closest non-string analog, if possible.
:param dict value: The string value to attempt conversion on.
:return: The converted value.
:rtype: Union[bool, int, None, str]
'''
value = salt.utils.stringutils.to_bool(value.str... | python | def _convert_to_closest_type(value):
'''
Convert string value to it's closest non-string analog, if possible.
:param dict value: The string value to attempt conversion on.
:return: The converted value.
:rtype: Union[bool, int, None, str]
'''
value = salt.utils.stringutils.to_bool(value.str... | [
"def",
"_convert_to_closest_type",
"(",
"value",
")",
":",
"value",
"=",
"salt",
".",
"utils",
".",
"stringutils",
".",
"to_bool",
"(",
"value",
".",
"strip",
"(",
")",
")",
"if",
"isinstance",
"(",
"value",
",",
"bool",
")",
":",
"return",
"value",
"r... | Convert string value to it's closest non-string analog, if possible.
:param dict value: The string value to attempt conversion on.
:return: The converted value.
:rtype: Union[bool, int, None, str] | [
"Convert",
"string",
"value",
"to",
"it",
"s",
"closest",
"non",
"-",
"string",
"analog",
"if",
"possible",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aptly.py#L53-L67 | train | Convert string value to it s closest non - string analog. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/aptly.py | _format_repo_args | def _format_repo_args(comment=None, component=None, distribution=None,
uploaders_file=None, saltenv='base'):
'''
Format the common arguments for creating or editing a repository.
:param str comment: The description of the repository.
:param str component: The default component to ... | python | def _format_repo_args(comment=None, component=None, distribution=None,
uploaders_file=None, saltenv='base'):
'''
Format the common arguments for creating or editing a repository.
:param str comment: The description of the repository.
:param str component: The default component to ... | [
"def",
"_format_repo_args",
"(",
"comment",
"=",
"None",
",",
"component",
"=",
"None",
",",
"distribution",
"=",
"None",
",",
"uploaders_file",
"=",
"None",
",",
"saltenv",
"=",
"'base'",
")",
":",
"ret",
"=",
"list",
"(",
")",
"cached_uploaders_path",
"=... | Format the common arguments for creating or editing a repository.
:param str comment: The description of the repository.
:param str component: The default component to use when publishing.
:param str distribution: The default distribution to use when publishing.
:param str uploaders_file: The repositor... | [
"Format",
"the",
"common",
"arguments",
"for",
"creating",
"or",
"editing",
"a",
"repository",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aptly.py#L70-L103 | train | Return a list of arguments to be passed to the aptly command line | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/aptly.py | _parse_show_output | def _parse_show_output(cmd_ret):
'''
Parse the output of an aptly show command.
:param str cmd_ret: The text of the command output that needs to be parsed.
:return: A dictionary containing the configuration data.
:rtype: dict
'''
parsed_data = dict()
list_key = None
for line in cm... | python | def _parse_show_output(cmd_ret):
'''
Parse the output of an aptly show command.
:param str cmd_ret: The text of the command output that needs to be parsed.
:return: A dictionary containing the configuration data.
:rtype: dict
'''
parsed_data = dict()
list_key = None
for line in cm... | [
"def",
"_parse_show_output",
"(",
"cmd_ret",
")",
":",
"parsed_data",
"=",
"dict",
"(",
")",
"list_key",
"=",
"None",
"for",
"line",
"in",
"cmd_ret",
".",
"splitlines",
"(",
")",
":",
"# Skip empty lines.",
"if",
"not",
"line",
".",
"strip",
"(",
")",
":... | Parse the output of an aptly show command.
:param str cmd_ret: The text of the command output that needs to be parsed.
:return: A dictionary containing the configuration data.
:rtype: dict | [
"Parse",
"the",
"output",
"of",
"an",
"aptly",
"show",
"command",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aptly.py#L106-L152 | train | Parse the output of an aptly show 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/aptly.py | _convert_parsed_show_output | def _convert_parsed_show_output(parsed_data):
'''
Convert matching string values to lists/dictionaries.
:param dict parsed_data: The text of the command output that needs to be parsed.
:return: A dictionary containing the modified configuration data.
:rtype: dict
'''
# Match lines like "ma... | python | def _convert_parsed_show_output(parsed_data):
'''
Convert matching string values to lists/dictionaries.
:param dict parsed_data: The text of the command output that needs to be parsed.
:return: A dictionary containing the modified configuration data.
:rtype: dict
'''
# Match lines like "ma... | [
"def",
"_convert_parsed_show_output",
"(",
"parsed_data",
")",
":",
"# Match lines like \"main: xenial [snapshot]\" or \"test [local]\".",
"source_pattern",
"=",
"re",
".",
"compile",
"(",
"r'(?:(?P<component>\\S+):)?\\s*(?P<name>\\S+)\\s+\\[(?P<type>\\S+)\\]'",
")",
"sources",
"=",
... | Convert matching string values to lists/dictionaries.
:param dict parsed_data: The text of the command output that needs to be parsed.
:return: A dictionary containing the modified configuration data.
:rtype: dict | [
"Convert",
"matching",
"string",
"values",
"to",
"lists",
"/",
"dictionaries",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aptly.py#L155-L182 | train | Convert matching string values to lists and dictionaries. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/aptly.py | _validate_config | def _validate_config(config_path):
'''
Validate that the configuration file exists and is readable.
:param str config_path: The path to the configuration file for the aptly instance.
:return: None
:rtype: None
'''
log.debug('Checking configuration file: %s', config_path)
if not os.pat... | python | def _validate_config(config_path):
'''
Validate that the configuration file exists and is readable.
:param str config_path: The path to the configuration file for the aptly instance.
:return: None
:rtype: None
'''
log.debug('Checking configuration file: %s', config_path)
if not os.pat... | [
"def",
"_validate_config",
"(",
"config_path",
")",
":",
"log",
".",
"debug",
"(",
"'Checking configuration file: %s'",
",",
"config_path",
")",
"if",
"not",
"os",
".",
"path",
".",
"isfile",
"(",
"config_path",
")",
":",
"message",
"=",
"'Unable to get configur... | Validate that the configuration file exists and is readable.
:param str config_path: The path to the configuration file for the aptly instance.
:return: None
:rtype: None | [
"Validate",
"that",
"the",
"configuration",
"file",
"exists",
"and",
"is",
"readable",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aptly.py#L185-L200 | train | Validate that the configuration file exists and is readable. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/aptly.py | get_config | def get_config(config_path=_DEFAULT_CONFIG_PATH):
'''
Get the configuration data.
:param str config_path: The path to the configuration file for the aptly instance.
:return: A dictionary containing the configuration data.
:rtype: dict
CLI Example:
.. code-block:: bash
salt '*' a... | python | def get_config(config_path=_DEFAULT_CONFIG_PATH):
'''
Get the configuration data.
:param str config_path: The path to the configuration file for the aptly instance.
:return: A dictionary containing the configuration data.
:rtype: dict
CLI Example:
.. code-block:: bash
salt '*' a... | [
"def",
"get_config",
"(",
"config_path",
"=",
"_DEFAULT_CONFIG_PATH",
")",
":",
"_validate_config",
"(",
"config_path",
")",
"cmd",
"=",
"[",
"'config'",
",",
"'show'",
",",
"'-config={}'",
".",
"format",
"(",
"config_path",
")",
"]",
"cmd_ret",
"=",
"_cmd_run... | Get the configuration data.
:param str config_path: The path to the configuration file for the aptly instance.
:return: A dictionary containing the configuration data.
:rtype: dict
CLI Example:
.. code-block:: bash
salt '*' aptly.get_config | [
"Get",
"the",
"configuration",
"data",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aptly.py#L203-L224 | train | Get the configuration data for the Aptly instance. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/aptly.py | list_repos | def list_repos(config_path=_DEFAULT_CONFIG_PATH, with_packages=False):
'''
List all of the local package repositories.
:param str config_path: The path to the configuration file for the aptly instance.
:param bool with_packages: Return a list of packages in the repo.
:return: A dictionary of the r... | python | def list_repos(config_path=_DEFAULT_CONFIG_PATH, with_packages=False):
'''
List all of the local package repositories.
:param str config_path: The path to the configuration file for the aptly instance.
:param bool with_packages: Return a list of packages in the repo.
:return: A dictionary of the r... | [
"def",
"list_repos",
"(",
"config_path",
"=",
"_DEFAULT_CONFIG_PATH",
",",
"with_packages",
"=",
"False",
")",
":",
"_validate_config",
"(",
"config_path",
")",
"ret",
"=",
"dict",
"(",
")",
"cmd",
"=",
"[",
"'repo'",
",",
"'list'",
",",
"'-config={}'",
".",... | List all of the local package repositories.
:param str config_path: The path to the configuration file for the aptly instance.
:param bool with_packages: Return a list of packages in the repo.
:return: A dictionary of the repositories.
:rtype: dict
CLI Example:
.. code-block:: bash
... | [
"List",
"all",
"of",
"the",
"local",
"package",
"repositories",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aptly.py#L227-L256 | train | List all of the local package repositories. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/aptly.py | get_repo | def get_repo(name, config_path=_DEFAULT_CONFIG_PATH, with_packages=False):
'''
Get detailed information about a local package repository.
:param str name: The name of the local repository.
:param str config_path: The path to the configuration file for the aptly instance.
:param bool with_packages: ... | python | def get_repo(name, config_path=_DEFAULT_CONFIG_PATH, with_packages=False):
'''
Get detailed information about a local package repository.
:param str name: The name of the local repository.
:param str config_path: The path to the configuration file for the aptly instance.
:param bool with_packages: ... | [
"def",
"get_repo",
"(",
"name",
",",
"config_path",
"=",
"_DEFAULT_CONFIG_PATH",
",",
"with_packages",
"=",
"False",
")",
":",
"_validate_config",
"(",
"config_path",
")",
"with_packages",
"=",
"six",
".",
"text_type",
"(",
"bool",
"(",
"with_packages",
")",
"... | Get detailed information about a local package repository.
:param str name: The name of the local repository.
:param str config_path: The path to the configuration file for the aptly instance.
:param bool with_packages: Return a list of packages in the repo.
:return: A dictionary containing informatio... | [
"Get",
"detailed",
"information",
"about",
"a",
"local",
"package",
"repository",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aptly.py#L259-L292 | train | Get detailed information about a local package 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/aptly.py | new_repo | def new_repo(name, config_path=_DEFAULT_CONFIG_PATH, comment=None, component=None,
distribution=None, uploaders_file=None, from_snapshot=None,
saltenv='base'):
'''
Create a new local package repository.
:param str name: The name of the local repository.
:param str config_path:... | python | def new_repo(name, config_path=_DEFAULT_CONFIG_PATH, comment=None, component=None,
distribution=None, uploaders_file=None, from_snapshot=None,
saltenv='base'):
'''
Create a new local package repository.
:param str name: The name of the local repository.
:param str config_path:... | [
"def",
"new_repo",
"(",
"name",
",",
"config_path",
"=",
"_DEFAULT_CONFIG_PATH",
",",
"comment",
"=",
"None",
",",
"component",
"=",
"None",
",",
"distribution",
"=",
"None",
",",
"uploaders_file",
"=",
"None",
",",
"from_snapshot",
"=",
"None",
",",
"salten... | Create a new local package repository.
:param str name: The name of the local repository.
:param str config_path: The path to the configuration file for the aptly instance.
:param str comment: The description of the repository.
:param str component: The default component to use when publishing.
:pa... | [
"Create",
"a",
"new",
"local",
"package",
"repository",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aptly.py#L295-L344 | train | Create a new local package 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/aptly.py | set_repo | def set_repo(name, config_path=_DEFAULT_CONFIG_PATH, comment=None, component=None,
distribution=None, uploaders_file=None, saltenv='base'):
'''
Configure the settings for a local package repository.
:param str name: The name of the local repository.
:param str config_path: The path to the ... | python | def set_repo(name, config_path=_DEFAULT_CONFIG_PATH, comment=None, component=None,
distribution=None, uploaders_file=None, saltenv='base'):
'''
Configure the settings for a local package repository.
:param str name: The name of the local repository.
:param str config_path: The path to the ... | [
"def",
"set_repo",
"(",
"name",
",",
"config_path",
"=",
"_DEFAULT_CONFIG_PATH",
",",
"comment",
"=",
"None",
",",
"component",
"=",
"None",
",",
"distribution",
"=",
"None",
",",
"uploaders_file",
"=",
"None",
",",
"saltenv",
"=",
"'base'",
")",
":",
"_va... | Configure the settings for a local package repository.
:param str name: The name of the local repository.
:param str config_path: The path to the configuration file for the aptly instance.
:param str comment: The description of the repository.
:param str component: The default component to use when pub... | [
"Configure",
"the",
"settings",
"for",
"a",
"local",
"package",
"repository",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aptly.py#L347-L419 | train | Configure the settings for a local package 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/aptly.py | delete_repo | def delete_repo(name, config_path=_DEFAULT_CONFIG_PATH, force=False):
'''
Remove a local package repository.
:param str name: The name of the local repository.
:param str config_path: The path to the configuration file for the aptly instance.
:param bool force: Whether to remove the repository even... | python | def delete_repo(name, config_path=_DEFAULT_CONFIG_PATH, force=False):
'''
Remove a local package repository.
:param str name: The name of the local repository.
:param str config_path: The path to the configuration file for the aptly instance.
:param bool force: Whether to remove the repository even... | [
"def",
"delete_repo",
"(",
"name",
",",
"config_path",
"=",
"_DEFAULT_CONFIG_PATH",
",",
"force",
"=",
"False",
")",
":",
"_validate_config",
"(",
"config_path",
")",
"force",
"=",
"six",
".",
"text_type",
"(",
"bool",
"(",
"force",
")",
")",
".",
"lower",... | Remove a local package repository.
:param str name: The name of the local repository.
:param str config_path: The path to the configuration file for the aptly instance.
:param bool force: Whether to remove the repository even if it is used as the source
of an existing snapshot.
:return: A bool... | [
"Remove",
"a",
"local",
"package",
"repository",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aptly.py#L422-L459 | train | Remove a local package 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/aptly.py | list_mirrors | def list_mirrors(config_path=_DEFAULT_CONFIG_PATH):
'''
Get a list of all the mirrored remote repositories.
:param str config_path: The path to the configuration file for the aptly instance.
:return: A list of the mirror names.
:rtype: list
CLI Example:
.. code-block:: bash
salt... | python | def list_mirrors(config_path=_DEFAULT_CONFIG_PATH):
'''
Get a list of all the mirrored remote repositories.
:param str config_path: The path to the configuration file for the aptly instance.
:return: A list of the mirror names.
:rtype: list
CLI Example:
.. code-block:: bash
salt... | [
"def",
"list_mirrors",
"(",
"config_path",
"=",
"_DEFAULT_CONFIG_PATH",
")",
":",
"_validate_config",
"(",
"config_path",
")",
"cmd",
"=",
"[",
"'mirror'",
",",
"'list'",
",",
"'-config={}'",
".",
"format",
"(",
"config_path",
")",
",",
"'-raw=true'",
"]",
"cm... | Get a list of all the mirrored remote repositories.
:param str config_path: The path to the configuration file for the aptly instance.
:return: A list of the mirror names.
:rtype: list
CLI Example:
.. code-block:: bash
salt '*' aptly.list_mirrors | [
"Get",
"a",
"list",
"of",
"all",
"the",
"mirrored",
"remote",
"repositories",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aptly.py#L462-L485 | train | List all the mirrored remote repositories. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/aptly.py | get_mirror | def get_mirror(name, config_path=_DEFAULT_CONFIG_PATH, with_packages=False):
'''
Get detailed information about a mirrored remote repository.
:param str name: The name of the remote repository mirror.
:param str config_path: The path to the configuration file for the aptly instance.
:param bool wit... | python | def get_mirror(name, config_path=_DEFAULT_CONFIG_PATH, with_packages=False):
'''
Get detailed information about a mirrored remote repository.
:param str name: The name of the remote repository mirror.
:param str config_path: The path to the configuration file for the aptly instance.
:param bool wit... | [
"def",
"get_mirror",
"(",
"name",
",",
"config_path",
"=",
"_DEFAULT_CONFIG_PATH",
",",
"with_packages",
"=",
"False",
")",
":",
"_validate_config",
"(",
"config_path",
")",
"ret",
"=",
"dict",
"(",
")",
"cmd",
"=",
"[",
"'mirror'",
",",
"'show'",
",",
"'-... | Get detailed information about a mirrored remote repository.
:param str name: The name of the remote repository mirror.
:param str config_path: The path to the configuration file for the aptly instance.
:param bool with_packages: Return a list of packages in the repo.
:return: A dictionary containing ... | [
"Get",
"detailed",
"information",
"about",
"a",
"mirrored",
"remote",
"repository",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aptly.py#L488-L521 | train | Get detailed information about a mirrored remote 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/aptly.py | delete_mirror | def delete_mirror(name, config_path=_DEFAULT_CONFIG_PATH, force=False):
'''
Remove a mirrored remote repository. By default, Package data is not removed.
:param str name: The name of the remote repository mirror.
:param str config_path: The path to the configuration file for the aptly instance.
:pa... | python | def delete_mirror(name, config_path=_DEFAULT_CONFIG_PATH, force=False):
'''
Remove a mirrored remote repository. By default, Package data is not removed.
:param str name: The name of the remote repository mirror.
:param str config_path: The path to the configuration file for the aptly instance.
:pa... | [
"def",
"delete_mirror",
"(",
"name",
",",
"config_path",
"=",
"_DEFAULT_CONFIG_PATH",
",",
"force",
"=",
"False",
")",
":",
"_validate_config",
"(",
"config_path",
")",
"force",
"=",
"six",
".",
"text_type",
"(",
"bool",
"(",
"force",
")",
")",
".",
"lower... | Remove a mirrored remote repository. By default, Package data is not removed.
:param str name: The name of the remote repository mirror.
:param str config_path: The path to the configuration file for the aptly instance.
:param bool force: Whether to remove the mirror even if it is used as the source
... | [
"Remove",
"a",
"mirrored",
"remote",
"repository",
".",
"By",
"default",
"Package",
"data",
"is",
"not",
"removed",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aptly.py#L524-L561 | train | Remove a mirrored remote repository. By default Package data is not removed. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/aptly.py | list_published | def list_published(config_path=_DEFAULT_CONFIG_PATH):
'''
Get a list of all the published repositories.
:param str config_path: The path to the configuration file for the aptly instance.
:return: A list of the published repositories.
:rtype: list
CLI Example:
.. code-block:: bash
... | python | def list_published(config_path=_DEFAULT_CONFIG_PATH):
'''
Get a list of all the published repositories.
:param str config_path: The path to the configuration file for the aptly instance.
:return: A list of the published repositories.
:rtype: list
CLI Example:
.. code-block:: bash
... | [
"def",
"list_published",
"(",
"config_path",
"=",
"_DEFAULT_CONFIG_PATH",
")",
":",
"_validate_config",
"(",
"config_path",
")",
"ret",
"=",
"list",
"(",
")",
"cmd",
"=",
"[",
"'publish'",
",",
"'list'",
",",
"'-config={}'",
".",
"format",
"(",
"config_path",
... | Get a list of all the published repositories.
:param str config_path: The path to the configuration file for the aptly instance.
:return: A list of the published repositories.
:rtype: list
CLI Example:
.. code-block:: bash
salt '*' aptly.list_published | [
"Get",
"a",
"list",
"of",
"all",
"the",
"published",
"repositories",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aptly.py#L564-L594 | train | List all the published repositories. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/aptly.py | get_published | def get_published(name, config_path=_DEFAULT_CONFIG_PATH, endpoint='', prefix=None):
'''
Get the details of a published repository.
:param str name: The distribution name of the published repository.
:param str config_path: The path to the configuration file for the aptly instance.
:param str endpo... | python | def get_published(name, config_path=_DEFAULT_CONFIG_PATH, endpoint='', prefix=None):
'''
Get the details of a published repository.
:param str name: The distribution name of the published repository.
:param str config_path: The path to the configuration file for the aptly instance.
:param str endpo... | [
"def",
"get_published",
"(",
"name",
",",
"config_path",
"=",
"_DEFAULT_CONFIG_PATH",
",",
"endpoint",
"=",
"''",
",",
"prefix",
"=",
"None",
")",
":",
"_validate_config",
"(",
"config_path",
")",
"ret",
"=",
"dict",
"(",
")",
"sources",
"=",
"list",
"(",
... | Get the details of a published repository.
:param str name: The distribution name of the published repository.
:param str config_path: The path to the configuration file for the aptly instance.
:param str endpoint: The publishing endpoint.
:param str prefix: The prefix for publishing.
:return: A d... | [
"Get",
"the",
"details",
"of",
"a",
"published",
"repository",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aptly.py#L597-L633 | train | Get the details of a published 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/aptly.py | delete_published | def delete_published(name, config_path=_DEFAULT_CONFIG_PATH, endpoint='', prefix=None,
skip_cleanup=False, force=False):
'''
Remove files belonging to a published repository. Aptly tries to remove as many files
belonging to this repository as possible.
:param str name: The dist... | python | def delete_published(name, config_path=_DEFAULT_CONFIG_PATH, endpoint='', prefix=None,
skip_cleanup=False, force=False):
'''
Remove files belonging to a published repository. Aptly tries to remove as many files
belonging to this repository as possible.
:param str name: The dist... | [
"def",
"delete_published",
"(",
"name",
",",
"config_path",
"=",
"_DEFAULT_CONFIG_PATH",
",",
"endpoint",
"=",
"''",
",",
"prefix",
"=",
"None",
",",
"skip_cleanup",
"=",
"False",
",",
"force",
"=",
"False",
")",
":",
"_validate_config",
"(",
"config_path",
... | Remove files belonging to a published repository. Aptly tries to remove as many files
belonging to this repository as possible.
:param str name: The distribution name of the published repository.
:param str config_path: The path to the configuration file for the aptly instance.
:param str endpoint:... | [
"Remove",
"files",
"belonging",
"to",
"a",
"published",
"repository",
".",
"Aptly",
"tries",
"to",
"remove",
"as",
"many",
"files",
"belonging",
"to",
"this",
"repository",
"as",
"possible",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aptly.py#L636-L685 | train | Delete a published 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/aptly.py | list_snapshots | def list_snapshots(config_path=_DEFAULT_CONFIG_PATH, sort_by_time=False):
'''
Get a list of all the existing snapshots.
:param str config_path: The path to the configuration file for the aptly instance.
:param bool sort_by_time: Whether to sort by creation time instead of by name.
:return: A list ... | python | def list_snapshots(config_path=_DEFAULT_CONFIG_PATH, sort_by_time=False):
'''
Get a list of all the existing snapshots.
:param str config_path: The path to the configuration file for the aptly instance.
:param bool sort_by_time: Whether to sort by creation time instead of by name.
:return: A list ... | [
"def",
"list_snapshots",
"(",
"config_path",
"=",
"_DEFAULT_CONFIG_PATH",
",",
"sort_by_time",
"=",
"False",
")",
":",
"_validate_config",
"(",
"config_path",
")",
"cmd",
"=",
"[",
"'snapshot'",
",",
"'list'",
",",
"'-config={}'",
".",
"format",
"(",
"config_pat... | Get a list of all the existing snapshots.
:param str config_path: The path to the configuration file for the aptly instance.
:param bool sort_by_time: Whether to sort by creation time instead of by name.
:return: A list of the snapshot names.
:rtype: list
CLI Example:
.. code-block:: bash
... | [
"Get",
"a",
"list",
"of",
"all",
"the",
"existing",
"snapshots",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aptly.py#L688-L717 | train | Get a list of all the existing snapshots. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/aptly.py | get_snapshot | def get_snapshot(name, config_path=_DEFAULT_CONFIG_PATH, with_packages=False):
'''
Get detailed information about a snapshot.
:param str name: The name of the snapshot given during snapshot creation.
:param str config_path: The path to the configuration file for the aptly instance.
:param bool with... | python | def get_snapshot(name, config_path=_DEFAULT_CONFIG_PATH, with_packages=False):
'''
Get detailed information about a snapshot.
:param str name: The name of the snapshot given during snapshot creation.
:param str config_path: The path to the configuration file for the aptly instance.
:param bool with... | [
"def",
"get_snapshot",
"(",
"name",
",",
"config_path",
"=",
"_DEFAULT_CONFIG_PATH",
",",
"with_packages",
"=",
"False",
")",
":",
"_validate_config",
"(",
"config_path",
")",
"sources",
"=",
"list",
"(",
")",
"cmd",
"=",
"[",
"'snapshot'",
",",
"'show'",
",... | Get detailed information about a snapshot.
:param str name: The name of the snapshot given during snapshot creation.
:param str config_path: The path to the configuration file for the aptly instance.
:param bool with_packages: Return a list of packages in the snapshot.
:return: A dictionary containing... | [
"Get",
"detailed",
"information",
"about",
"a",
"snapshot",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aptly.py#L720-L754 | train | Get detailed information about a snapshot. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/aptly.py | delete_snapshot | def delete_snapshot(name, config_path=_DEFAULT_CONFIG_PATH, force=False):
'''
Remove information about a snapshot. If a snapshot is published, it can not be
dropped without first removing publishing for that snapshot. If a snapshot is
used as the source for other snapshots, Aptly will refuse to ... | python | def delete_snapshot(name, config_path=_DEFAULT_CONFIG_PATH, force=False):
'''
Remove information about a snapshot. If a snapshot is published, it can not be
dropped without first removing publishing for that snapshot. If a snapshot is
used as the source for other snapshots, Aptly will refuse to ... | [
"def",
"delete_snapshot",
"(",
"name",
",",
"config_path",
"=",
"_DEFAULT_CONFIG_PATH",
",",
"force",
"=",
"False",
")",
":",
"_validate_config",
"(",
"config_path",
")",
"force",
"=",
"six",
".",
"text_type",
"(",
"bool",
"(",
"force",
")",
")",
".",
"low... | Remove information about a snapshot. If a snapshot is published, it can not be
dropped without first removing publishing for that snapshot. If a snapshot is
used as the source for other snapshots, Aptly will refuse to remove it unless
forced.
:param str name: The name of the snapshot given ... | [
"Remove",
"information",
"about",
"a",
"snapshot",
".",
"If",
"a",
"snapshot",
"is",
"published",
"it",
"can",
"not",
"be",
"dropped",
"without",
"first",
"removing",
"publishing",
"for",
"that",
"snapshot",
".",
"If",
"a",
"snapshot",
"is",
"used",
"as",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aptly.py#L757-L797 | train | Remove information about a snapshot. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/aptly.py | cleanup_db | def cleanup_db(config_path=_DEFAULT_CONFIG_PATH, dry_run=False):
'''
Remove data regarding unreferenced packages and delete files in the package pool that
are no longer being used by packages.
:param bool dry_run: Report potential changes without making any changes.
:return: A dictionary of th... | python | def cleanup_db(config_path=_DEFAULT_CONFIG_PATH, dry_run=False):
'''
Remove data regarding unreferenced packages and delete files in the package pool that
are no longer being used by packages.
:param bool dry_run: Report potential changes without making any changes.
:return: A dictionary of th... | [
"def",
"cleanup_db",
"(",
"config_path",
"=",
"_DEFAULT_CONFIG_PATH",
",",
"dry_run",
"=",
"False",
")",
":",
"_validate_config",
"(",
"config_path",
")",
"dry_run",
"=",
"six",
".",
"text_type",
"(",
"bool",
"(",
"dry_run",
")",
")",
".",
"lower",
"(",
")... | Remove data regarding unreferenced packages and delete files in the package pool that
are no longer being used by packages.
:param bool dry_run: Report potential changes without making any changes.
:return: A dictionary of the package keys and files that were removed.
:rtype: dict
CLI Example... | [
"Remove",
"data",
"regarding",
"unreferenced",
"packages",
"and",
"delete",
"files",
"in",
"the",
"package",
"pool",
"that",
"are",
"no",
"longer",
"being",
"used",
"by",
"packages",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aptly.py#L800-L848 | train | Remove data regarding unreferenced packages and delete files in the package pool. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/netapi/rest_cherrypy/event_processor.py | SaltInfo.publish_minions | def publish_minions(self):
'''
Publishes minions as a list of dicts.
'''
minions = []
for minion, minion_info in six.iteritems(self.minions):
curr_minion = {}
curr_minion.update(minion_info)
curr_minion.update({'id': minion})
minio... | python | def publish_minions(self):
'''
Publishes minions as a list of dicts.
'''
minions = []
for minion, minion_info in six.iteritems(self.minions):
curr_minion = {}
curr_minion.update(minion_info)
curr_minion.update({'id': minion})
minio... | [
"def",
"publish_minions",
"(",
"self",
")",
":",
"minions",
"=",
"[",
"]",
"for",
"minion",
",",
"minion_info",
"in",
"six",
".",
"iteritems",
"(",
"self",
".",
"minions",
")",
":",
"curr_minion",
"=",
"{",
"}",
"curr_minion",
".",
"update",
"(",
"mini... | Publishes minions as a list of dicts. | [
"Publishes",
"minions",
"as",
"a",
"list",
"of",
"dicts",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/netapi/rest_cherrypy/event_processor.py#L35-L48 | train | Publishes the minions as a list of dicts. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/netapi/rest_cherrypy/event_processor.py | SaltInfo.publish | def publish(self, key, data):
'''
Publishes the data to the event stream.
'''
publish_data = {key: data}
self.handler.send(salt.utils.json.dumps(publish_data), False) | python | def publish(self, key, data):
'''
Publishes the data to the event stream.
'''
publish_data = {key: data}
self.handler.send(salt.utils.json.dumps(publish_data), False) | [
"def",
"publish",
"(",
"self",
",",
"key",
",",
"data",
")",
":",
"publish_data",
"=",
"{",
"key",
":",
"data",
"}",
"self",
".",
"handler",
".",
"send",
"(",
"salt",
".",
"utils",
".",
"json",
".",
"dumps",
"(",
"publish_data",
")",
",",
"False",
... | Publishes the data to the event stream. | [
"Publishes",
"the",
"data",
"to",
"the",
"event",
"stream",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/netapi/rest_cherrypy/event_processor.py#L50-L55 | train | Publishes the data to the event stream. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/netapi/rest_cherrypy/event_processor.py | SaltInfo.process_presence_events | def process_presence_events(self, event_data, token, opts):
'''
Check if any minions have connected or dropped.
Send a message to the client if they have.
'''
tag = event_data['tag']
event_info = event_data['data']
minions_detected = event_info['present']
... | python | def process_presence_events(self, event_data, token, opts):
'''
Check if any minions have connected or dropped.
Send a message to the client if they have.
'''
tag = event_data['tag']
event_info = event_data['data']
minions_detected = event_info['present']
... | [
"def",
"process_presence_events",
"(",
"self",
",",
"event_data",
",",
"token",
",",
"opts",
")",
":",
"tag",
"=",
"event_data",
"[",
"'tag'",
"]",
"event_info",
"=",
"event_data",
"[",
"'data'",
"]",
"minions_detected",
"=",
"event_info",
"[",
"'present'",
... | Check if any minions have connected or dropped.
Send a message to the client if they have. | [
"Check",
"if",
"any",
"minions",
"have",
"connected",
"or",
"dropped",
".",
"Send",
"a",
"message",
"to",
"the",
"client",
"if",
"they",
"have",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/netapi/rest_cherrypy/event_processor.py#L148-L188 | train | Process presence events from the master | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/netapi/rest_cherrypy/event_processor.py | SaltInfo.process | def process(self, salt_data, token, opts):
'''
Process events and publish data
'''
parts = salt_data['tag'].split('/')
if len(parts) < 2:
return
# TBD: Simplify these conditional expressions
if parts[1] == 'job':
if parts[3] == 'new':
... | python | def process(self, salt_data, token, opts):
'''
Process events and publish data
'''
parts = salt_data['tag'].split('/')
if len(parts) < 2:
return
# TBD: Simplify these conditional expressions
if parts[1] == 'job':
if parts[3] == 'new':
... | [
"def",
"process",
"(",
"self",
",",
"salt_data",
",",
"token",
",",
"opts",
")",
":",
"parts",
"=",
"salt_data",
"[",
"'tag'",
"]",
".",
"split",
"(",
"'/'",
")",
"if",
"len",
"(",
"parts",
")",
"<",
"2",
":",
"return",
"# TBD: Simplify these condition... | Process events and publish data | [
"Process",
"events",
"and",
"publish",
"data"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/netapi/rest_cherrypy/event_processor.py#L190-L211 | train | Process events and publish 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/states/bluecoat_sslv.py | distinguished_name_list_exists | def distinguished_name_list_exists(name, items):
'''
Ensures that a distinguished name list exists with the items provided.
name: The name of the module function to execute.
name(str): The name of the distinguished names list.
items(list): A list of items to ensure exist on the distinguished name... | python | def distinguished_name_list_exists(name, items):
'''
Ensures that a distinguished name list exists with the items provided.
name: The name of the module function to execute.
name(str): The name of the distinguished names list.
items(list): A list of items to ensure exist on the distinguished name... | [
"def",
"distinguished_name_list_exists",
"(",
"name",
",",
"items",
")",
":",
"ret",
"=",
"_default_ret",
"(",
"name",
")",
"req_change",
"=",
"False",
"try",
":",
"existing_lists",
"=",
"__salt__",
"[",
"'bluecoat_sslv.get_distinguished_name_lists'",
"]",
"(",
")... | Ensures that a distinguished name list exists with the items provided.
name: The name of the module function to execute.
name(str): The name of the distinguished names list.
items(list): A list of items to ensure exist on the distinguished names list.
SLS Example:
.. code-block:: yaml
... | [
"Ensures",
"that",
"a",
"distinguished",
"name",
"list",
"exists",
"with",
"the",
"items",
"provided",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/bluecoat_sslv.py#L50-L95 | train | Ensures that a distinguished name list exists with the items provided. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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_cloudwatch.py | get_alarm | def get_alarm(name, region=None, key=None, keyid=None, profile=None):
'''
Get alarm details. Also can be used to check to see if an alarm exists.
CLI example::
salt myminion boto_cloudwatch.get_alarm myalarm region=us-east-1
'''
conn = _get_conn(region=region, key=key, keyid=keyid, profile... | python | def get_alarm(name, region=None, key=None, keyid=None, profile=None):
'''
Get alarm details. Also can be used to check to see if an alarm exists.
CLI example::
salt myminion boto_cloudwatch.get_alarm myalarm region=us-east-1
'''
conn = _get_conn(region=region, key=key, keyid=keyid, profile... | [
"def",
"get_alarm",
"(",
"name",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"conn",
"=",
"_get_conn",
"(",
"region",
"=",
"region",
",",
"key",
"=",
"key",
",",
"keyid",
... | Get alarm details. Also can be used to check to see if an alarm exists.
CLI example::
salt myminion boto_cloudwatch.get_alarm myalarm region=us-east-1 | [
"Get",
"alarm",
"details",
".",
"Also",
"can",
"be",
"used",
"to",
"check",
"to",
"see",
"if",
"an",
"alarm",
"exists",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_cloudwatch.py#L85-L100 | train | Get details about an alarm. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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_cloudwatch.py | _safe_dump | def _safe_dump(data):
'''
this presenter magic makes yaml.safe_dump
work with the objects returned from
boto.describe_alarms()
'''
custom_dumper = __utils__['yaml.get_dumper']('SafeOrderedDumper')
def boto_listelement_presenter(dumper, data):
return dumper.represent_list(list(data))... | python | def _safe_dump(data):
'''
this presenter magic makes yaml.safe_dump
work with the objects returned from
boto.describe_alarms()
'''
custom_dumper = __utils__['yaml.get_dumper']('SafeOrderedDumper')
def boto_listelement_presenter(dumper, data):
return dumper.represent_list(list(data))... | [
"def",
"_safe_dump",
"(",
"data",
")",
":",
"custom_dumper",
"=",
"__utils__",
"[",
"'yaml.get_dumper'",
"]",
"(",
"'SafeOrderedDumper'",
")",
"def",
"boto_listelement_presenter",
"(",
"dumper",
",",
"data",
")",
":",
"return",
"dumper",
".",
"represent_list",
"... | this presenter magic makes yaml.safe_dump
work with the objects returned from
boto.describe_alarms() | [
"this",
"presenter",
"magic",
"makes",
"yaml",
".",
"safe_dump",
"work",
"with",
"the",
"objects",
"returned",
"from",
"boto",
".",
"describe_alarms",
"()"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_cloudwatch.py#L103-L124 | train | This presenter magic makes yaml. safe_dump | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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_cloudwatch.py | get_all_alarms | def get_all_alarms(region=None, prefix=None, key=None, keyid=None,
profile=None):
'''
Get all alarm details. Produces results that can be used to create an sls
file.
If prefix parameter is given, alarm names in the output will be prepended
with the prefix; alarms that have the p... | python | def get_all_alarms(region=None, prefix=None, key=None, keyid=None,
profile=None):
'''
Get all alarm details. Produces results that can be used to create an sls
file.
If prefix parameter is given, alarm names in the output will be prepended
with the prefix; alarms that have the p... | [
"def",
"get_all_alarms",
"(",
"region",
"=",
"None",
",",
"prefix",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"conn",
"=",
"_get_conn",
"(",
"region",
"=",
"region",
",",
"key",
"=",
"ke... | Get all alarm details. Produces results that can be used to create an sls
file.
If prefix parameter is given, alarm names in the output will be prepended
with the prefix; alarms that have the prefix will be skipped. This can be
used to convert existing alarms to be managed by salt, as follows:
... | [
"Get",
"all",
"alarm",
"details",
".",
"Produces",
"results",
"that",
"can",
"be",
"used",
"to",
"create",
"an",
"sls",
"file",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_cloudwatch.py#L127-L175 | train | Get all alarms in a given region optionally with a specific prefix. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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_cloudwatch.py | create_or_update_alarm | def create_or_update_alarm(
connection=None, name=None, metric=None, namespace=None,
statistic=None, comparison=None, threshold=None, period=None,
evaluation_periods=None, unit=None, description='',
dimensions=None, alarm_actions=None,
insufficient_data_actions=None, ok_actions=N... | python | def create_or_update_alarm(
connection=None, name=None, metric=None, namespace=None,
statistic=None, comparison=None, threshold=None, period=None,
evaluation_periods=None, unit=None, description='',
dimensions=None, alarm_actions=None,
insufficient_data_actions=None, ok_actions=N... | [
"def",
"create_or_update_alarm",
"(",
"connection",
"=",
"None",
",",
"name",
"=",
"None",
",",
"metric",
"=",
"None",
",",
"namespace",
"=",
"None",
",",
"statistic",
"=",
"None",
",",
"comparison",
"=",
"None",
",",
"threshold",
"=",
"None",
",",
"peri... | Create or update a cloudwatch alarm.
Params are the same as:
https://boto.readthedocs.io/en/latest/ref/cloudwatch.html#boto.ec2.cloudwatch.alarm.MetricAlarm.
Dimensions must be a dict. If the value of Dimensions is a string, it will
be json decoded to produce a dict. alarm_actions, insufficient_da... | [
"Create",
"or",
"update",
"a",
"cloudwatch",
"alarm",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_cloudwatch.py#L178-L271 | train | Create or update a CloudWatch alarm. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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_cloudwatch.py | convert_to_arn | def convert_to_arn(arns, region=None, key=None, keyid=None, profile=None):
'''
Convert a list of strings into actual arns. Converts convenience names such
as 'scaling_policy:...'
CLI Example::
salt '*' convert_to_arn 'scaling_policy:'
'''
results = []
for arn in arns:
if ar... | python | def convert_to_arn(arns, region=None, key=None, keyid=None, profile=None):
'''
Convert a list of strings into actual arns. Converts convenience names such
as 'scaling_policy:...'
CLI Example::
salt '*' convert_to_arn 'scaling_policy:'
'''
results = []
for arn in arns:
if ar... | [
"def",
"convert_to_arn",
"(",
"arns",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"results",
"=",
"[",
"]",
"for",
"arn",
"in",
"arns",
":",
"if",
"arn",
".",
"startswith",
... | Convert a list of strings into actual arns. Converts convenience names such
as 'scaling_policy:...'
CLI Example::
salt '*' convert_to_arn 'scaling_policy:' | [
"Convert",
"a",
"list",
"of",
"strings",
"into",
"actual",
"arns",
".",
"Converts",
"convenience",
"names",
"such",
"as",
"scaling_policy",
":",
"..."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_cloudwatch.py#L274-L296 | train | Convert a list of strings into actual arns. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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_cloudwatch.py | delete_alarm | def delete_alarm(name, region=None, key=None, keyid=None, profile=None):
'''
Delete a cloudwatch alarm
CLI example to delete a queue::
salt myminion boto_cloudwatch.delete_alarm myalarm region=us-east-1
'''
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
conn.de... | python | def delete_alarm(name, region=None, key=None, keyid=None, profile=None):
'''
Delete a cloudwatch alarm
CLI example to delete a queue::
salt myminion boto_cloudwatch.delete_alarm myalarm region=us-east-1
'''
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
conn.de... | [
"def",
"delete_alarm",
"(",
"name",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"conn",
"=",
"_get_conn",
"(",
"region",
"=",
"region",
",",
"key",
"=",
"key",
",",
"keyid",... | Delete a cloudwatch alarm
CLI example to delete a queue::
salt myminion boto_cloudwatch.delete_alarm myalarm region=us-east-1 | [
"Delete",
"a",
"cloudwatch",
"alarm"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_cloudwatch.py#L299-L311 | train | Delete an alarm | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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_cloudwatch.py | _metric_alarm_to_dict | def _metric_alarm_to_dict(alarm):
'''
Convert a boto.ec2.cloudwatch.alarm.MetricAlarm into a dict. Convenience
for pretty printing.
'''
d = odict.OrderedDict()
fields = ['name', 'metric', 'namespace', 'statistic', 'comparison',
'threshold', 'period', 'evaluation_periods', 'unit',
... | python | def _metric_alarm_to_dict(alarm):
'''
Convert a boto.ec2.cloudwatch.alarm.MetricAlarm into a dict. Convenience
for pretty printing.
'''
d = odict.OrderedDict()
fields = ['name', 'metric', 'namespace', 'statistic', 'comparison',
'threshold', 'period', 'evaluation_periods', 'unit',
... | [
"def",
"_metric_alarm_to_dict",
"(",
"alarm",
")",
":",
"d",
"=",
"odict",
".",
"OrderedDict",
"(",
")",
"fields",
"=",
"[",
"'name'",
",",
"'metric'",
",",
"'namespace'",
",",
"'statistic'",
",",
"'comparison'",
",",
"'threshold'",
",",
"'period'",
",",
"... | Convert a boto.ec2.cloudwatch.alarm.MetricAlarm into a dict. Convenience
for pretty printing. | [
"Convert",
"a",
"boto",
".",
"ec2",
".",
"cloudwatch",
".",
"alarm",
".",
"MetricAlarm",
"into",
"a",
"dict",
".",
"Convenience",
"for",
"pretty",
"printing",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_cloudwatch.py#L314-L327 | train | Convert a boto. ec2. cloudwatch. alarm. MetricAlarm into a dict. Convenience
for pretty printing. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/gpg.py | present | def present(name,
keys=None,
user=None,
keyserver=None,
gnupghome=None,
trust=None,
**kwargs):
'''
Ensure GPG public key is present in keychain
name
The unique name or keyid for the GPG public key.
keys
The keyId o... | python | def present(name,
keys=None,
user=None,
keyserver=None,
gnupghome=None,
trust=None,
**kwargs):
'''
Ensure GPG public key is present in keychain
name
The unique name or keyid for the GPG public key.
keys
The keyId o... | [
"def",
"present",
"(",
"name",
",",
"keys",
"=",
"None",
",",
"user",
"=",
"None",
",",
"keyserver",
"=",
"None",
",",
"gnupghome",
"=",
"None",
",",
"trust",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",... | Ensure GPG public key is present in keychain
name
The unique name or keyid for the GPG public key.
keys
The keyId or keyIds to add to the GPG keychain.
user
Add GPG keys to the specified user's keychain
keyserver
The keyserver to retrieve the keys from.
gnupghome... | [
"Ensure",
"GPG",
"public",
"key",
"is",
"present",
"in",
"keychain"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/gpg.py#L34-L136 | train | Ensure GPG public key is present in keychain. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/gpg.py | absent | def absent(name,
keys=None,
user=None,
gnupghome=None,
**kwargs):
'''
Ensure GPG public key is absent in keychain
name
The unique name or keyid for the GPG public key.
keys
The keyId or keyIds to add to the GPG keychain.
user
Rem... | python | def absent(name,
keys=None,
user=None,
gnupghome=None,
**kwargs):
'''
Ensure GPG public key is absent in keychain
name
The unique name or keyid for the GPG public key.
keys
The keyId or keyIds to add to the GPG keychain.
user
Rem... | [
"def",
"absent",
"(",
"name",
",",
"keys",
"=",
"None",
",",
"user",
"=",
"None",
",",
"gnupghome",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'result'",
":",
"True",
",",
"'changes'",
":",
"{",
... | Ensure GPG public key is absent in keychain
name
The unique name or keyid for the GPG public key.
keys
The keyId or keyIds to add to the GPG keychain.
user
Remove GPG keys from the specified user's keychain
gnupghome
Override GNUPG Home directory | [
"Ensure",
"GPG",
"public",
"key",
"is",
"absent",
"in",
"keychain"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/gpg.py#L139-L192 | train | Ensure GPG public key is absent in keychain. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/pillar/hg_pillar.py | ext_pillar | def ext_pillar(minion_id, pillar, repo, branch='default', root=None):
'''
Extract pillar from an hg repository
'''
with Repo(repo) as repo:
repo.update(branch)
envname = 'base' if branch == 'default' else branch
if root:
path = os.path.normpath(os.path.join(repo.working_dir, root... | python | def ext_pillar(minion_id, pillar, repo, branch='default', root=None):
'''
Extract pillar from an hg repository
'''
with Repo(repo) as repo:
repo.update(branch)
envname = 'base' if branch == 'default' else branch
if root:
path = os.path.normpath(os.path.join(repo.working_dir, root... | [
"def",
"ext_pillar",
"(",
"minion_id",
",",
"pillar",
",",
"repo",
",",
"branch",
"=",
"'default'",
",",
"root",
"=",
"None",
")",
":",
"with",
"Repo",
"(",
"repo",
")",
"as",
"repo",
":",
"repo",
".",
"update",
"(",
"branch",
")",
"envname",
"=",
... | Extract pillar from an hg repository | [
"Extract",
"pillar",
"from",
"an",
"hg",
"repository"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/hg_pillar.py#L69-L84 | train | Extract pillar from an hg 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/pillar/hg_pillar.py | Repo.update | def update(self, branch='default'):
'''
Ensure we are using the latest revision in the hg repository
'''
log.debug('Updating hg repo from hg_pillar module (pull)')
self.repo.pull()
log.debug('Updating hg repo from hg_pillar module (update)')
self.repo.update(branc... | python | def update(self, branch='default'):
'''
Ensure we are using the latest revision in the hg repository
'''
log.debug('Updating hg repo from hg_pillar module (pull)')
self.repo.pull()
log.debug('Updating hg repo from hg_pillar module (update)')
self.repo.update(branc... | [
"def",
"update",
"(",
"self",
",",
"branch",
"=",
"'default'",
")",
":",
"log",
".",
"debug",
"(",
"'Updating hg repo from hg_pillar module (pull)'",
")",
"self",
".",
"repo",
".",
"pull",
"(",
")",
"log",
".",
"debug",
"(",
"'Updating hg repo from hg_pillar mod... | Ensure we are using the latest revision in the hg repository | [
"Ensure",
"we",
"are",
"using",
"the",
"latest",
"revision",
"in",
"the",
"hg",
"repository"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/hg_pillar.py#L120-L127 | train | Update the latest revision in the hg 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/proxy/netmiko_px.py | init | def init(opts):
'''
Open the connection to the network device
managed through netmiko.
'''
proxy_dict = opts.get('proxy', {})
opts['multiprocessing'] = proxy_dict.get('multiprocessing', False)
netmiko_connection_args = proxy_dict.copy()
netmiko_connection_args.pop('proxytype', None)
... | python | def init(opts):
'''
Open the connection to the network device
managed through netmiko.
'''
proxy_dict = opts.get('proxy', {})
opts['multiprocessing'] = proxy_dict.get('multiprocessing', False)
netmiko_connection_args = proxy_dict.copy()
netmiko_connection_args.pop('proxytype', None)
... | [
"def",
"init",
"(",
"opts",
")",
":",
"proxy_dict",
"=",
"opts",
".",
"get",
"(",
"'proxy'",
",",
"{",
"}",
")",
"opts",
"[",
"'multiprocessing'",
"]",
"=",
"proxy_dict",
".",
"get",
"(",
"'multiprocessing'",
",",
"False",
")",
"netmiko_connection_args",
... | Open the connection to the network device
managed through netmiko. | [
"Open",
"the",
"connection",
"to",
"the",
"network",
"device",
"managed",
"through",
"netmiko",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/netmiko_px.py#L234-L257 | train | Open the connection to the network device and set up the necessary attributes. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/proxy/netmiko_px.py | alive | def alive(opts):
'''
Return the connection status with the network device.
'''
log.debug('Checking if %s is still alive', opts.get('id', ''))
if not netmiko_device['always_alive']:
return True
if ping() and initialized():
return netmiko_device['connection'].remote_conn.transport.... | python | def alive(opts):
'''
Return the connection status with the network device.
'''
log.debug('Checking if %s is still alive', opts.get('id', ''))
if not netmiko_device['always_alive']:
return True
if ping() and initialized():
return netmiko_device['connection'].remote_conn.transport.... | [
"def",
"alive",
"(",
"opts",
")",
":",
"log",
".",
"debug",
"(",
"'Checking if %s is still alive'",
",",
"opts",
".",
"get",
"(",
"'id'",
",",
"''",
")",
")",
"if",
"not",
"netmiko_device",
"[",
"'always_alive'",
"]",
":",
"return",
"True",
"if",
"ping",... | Return the connection status with the network device. | [
"Return",
"the",
"connection",
"status",
"with",
"the",
"network",
"device",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/netmiko_px.py#L260-L269 | train | Return the connection status with the network device. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/proxy/netmiko_px.py | call | def call(method, *args, **kwargs):
'''
Calls an arbitrary netmiko method.
'''
kwargs = clean_kwargs(**kwargs)
if not netmiko_device['always_alive']:
connection = ConnectHandler(**netmiko_device['args'])
ret = getattr(connection, method)(*args, **kwargs)
connection.disconnect(... | python | def call(method, *args, **kwargs):
'''
Calls an arbitrary netmiko method.
'''
kwargs = clean_kwargs(**kwargs)
if not netmiko_device['always_alive']:
connection = ConnectHandler(**netmiko_device['args'])
ret = getattr(connection, method)(*args, **kwargs)
connection.disconnect(... | [
"def",
"call",
"(",
"method",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"kwargs",
"=",
"clean_kwargs",
"(",
"*",
"*",
"kwargs",
")",
"if",
"not",
"netmiko_device",
"[",
"'always_alive'",
"]",
":",
"connection",
"=",
"ConnectHandler",
"(",
"*... | Calls an arbitrary netmiko method. | [
"Calls",
"an",
"arbitrary",
"netmiko",
"method",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/netmiko_px.py#L312-L322 | train | Calls an arbitrary netmiko method. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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_cloudtrail.py | exists | def exists(Name,
region=None, key=None, keyid=None, profile=None):
'''
Given a trail name, check to see if the given trail exists.
Returns True if the given trail exists and returns False if the given
trail does not exist.
CLI Example:
.. code-block:: bash
salt myminion bo... | python | def exists(Name,
region=None, key=None, keyid=None, profile=None):
'''
Given a trail name, check to see if the given trail exists.
Returns True if the given trail exists and returns False if the given
trail does not exist.
CLI Example:
.. code-block:: bash
salt myminion bo... | [
"def",
"exists",
"(",
"Name",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"try",
":",
"conn",
"=",
"_get_conn",
"(",
"region",
"=",
"region",
",",
"key",
"=",
"key",
",",
... | Given a trail name, check to see if the given trail exists.
Returns True if the given trail exists and returns False if the given
trail does not exist.
CLI Example:
.. code-block:: bash
salt myminion boto_cloudtrail.exists mytrail | [
"Given",
"a",
"trail",
"name",
"check",
"to",
"see",
"if",
"the",
"given",
"trail",
"exists",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_cloudtrail.py#L98-L122 | train | Check to see if the given trail exists. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/boto_cloudtrail.py | describe | def describe(Name,
region=None, key=None, keyid=None, profile=None):
'''
Given a trail name describe its properties.
Returns a dictionary of interesting properties.
CLI Example:
.. code-block:: bash
salt myminion boto_cloudtrail.describe mytrail
'''
try:
co... | python | def describe(Name,
region=None, key=None, keyid=None, profile=None):
'''
Given a trail name describe its properties.
Returns a dictionary of interesting properties.
CLI Example:
.. code-block:: bash
salt myminion boto_cloudtrail.describe mytrail
'''
try:
co... | [
"def",
"describe",
"(",
"Name",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"try",
":",
"conn",
"=",
"_get_conn",
"(",
"region",
"=",
"region",
",",
"key",
"=",
"key",
","... | Given a trail name describe its properties.
Returns a dictionary of interesting properties.
CLI Example:
.. code-block:: bash
salt myminion boto_cloudtrail.describe mytrail | [
"Given",
"a",
"trail",
"name",
"describe",
"its",
"properties",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_cloudtrail.py#L196-L229 | train | Given a trail name describe its properties. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/boto_cloudtrail.py | status | def status(Name,
region=None, key=None, keyid=None, profile=None):
'''
Given a trail name describe its properties.
Returns a dictionary of interesting properties.
CLI Example:
.. code-block:: bash
salt myminion boto_cloudtrail.describe mytrail
'''
try:
conn... | python | def status(Name,
region=None, key=None, keyid=None, profile=None):
'''
Given a trail name describe its properties.
Returns a dictionary of interesting properties.
CLI Example:
.. code-block:: bash
salt myminion boto_cloudtrail.describe mytrail
'''
try:
conn... | [
"def",
"status",
"(",
"Name",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"try",
":",
"conn",
"=",
"_get_conn",
"(",
"region",
"=",
"region",
",",
"key",
"=",
"key",
",",
... | Given a trail name describe its properties.
Returns a dictionary of interesting properties.
CLI Example:
.. code-block:: bash
salt myminion boto_cloudtrail.describe mytrail | [
"Given",
"a",
"trail",
"name",
"describe",
"its",
"properties",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_cloudtrail.py#L232-L270 | train | Given a trail name describe its properties. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/boto_cloudtrail.py | list | def list(region=None, key=None, keyid=None, profile=None):
'''
List all trails
Returns list of trails
CLI Example:
.. code-block:: yaml
policies:
- {...}
- {...}
'''
try:
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
t... | python | def list(region=None, key=None, keyid=None, profile=None):
'''
List all trails
Returns list of trails
CLI Example:
.. code-block:: yaml
policies:
- {...}
- {...}
'''
try:
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
t... | [
"def",
"list",
"(",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"try",
":",
"conn",
"=",
"_get_conn",
"(",
"region",
"=",
"region",
",",
"key",
"=",
"key",
",",
"keyid",
"=",
... | List all trails
Returns list of trails
CLI Example:
.. code-block:: yaml
policies:
- {...}
- {...} | [
"List",
"all",
"trails"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_cloudtrail.py#L273-L295 | train | List all trails in a region | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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_cloudtrail.py | update | def update(Name,
S3BucketName, S3KeyPrefix=None,
SnsTopicName=None,
IncludeGlobalServiceEvents=None,
IsMultiRegionTrail=None,
EnableLogFileValidation=None,
CloudWatchLogsLogGroupArn=None,
CloudWatchLogsRoleArn=None,
KmsKeyId=None,
... | python | def update(Name,
S3BucketName, S3KeyPrefix=None,
SnsTopicName=None,
IncludeGlobalServiceEvents=None,
IsMultiRegionTrail=None,
EnableLogFileValidation=None,
CloudWatchLogsLogGroupArn=None,
CloudWatchLogsRoleArn=None,
KmsKeyId=None,
... | [
"def",
"update",
"(",
"Name",
",",
"S3BucketName",
",",
"S3KeyPrefix",
"=",
"None",
",",
"SnsTopicName",
"=",
"None",
",",
"IncludeGlobalServiceEvents",
"=",
"None",
",",
"IsMultiRegionTrail",
"=",
"None",
",",
"EnableLogFileValidation",
"=",
"None",
",",
"Cloud... | Given a valid config, update a trail.
Returns {created: true} if the trail was created and returns
{created: False} if the trail was not created.
CLI Example:
.. code-block:: bash
salt myminion boto_cloudtrail.update my_trail my_bucket | [
"Given",
"a",
"valid",
"config",
"update",
"a",
"trail",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_cloudtrail.py#L298-L342 | train | Given a valid config update a trail. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/boto_cloudtrail.py | start_logging | def start_logging(Name,
region=None, key=None, keyid=None, profile=None):
'''
Start logging for a trail
Returns {started: true} if the trail was started and returns
{started: False} if the trail was not started.
CLI Example:
.. code-block:: bash
salt myminion boto_cloudtra... | python | def start_logging(Name,
region=None, key=None, keyid=None, profile=None):
'''
Start logging for a trail
Returns {started: true} if the trail was started and returns
{started: False} if the trail was not started.
CLI Example:
.. code-block:: bash
salt myminion boto_cloudtra... | [
"def",
"start_logging",
"(",
"Name",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
")",
":",
"try",
":",
"conn",
"=",
"_get_conn",
"(",
"region",
"=",
"region",
",",
"key",
"=",
"key",
... | Start logging for a trail
Returns {started: true} if the trail was started and returns
{started: False} if the trail was not started.
CLI Example:
.. code-block:: bash
salt myminion boto_cloudtrail.start_logging my_trail | [
"Start",
"logging",
"for",
"a",
"trail"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_cloudtrail.py#L345-L366 | train | Start logging for a trail | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/boto_cloudtrail.py | add_tags | def add_tags(Name,
region=None, key=None, keyid=None, profile=None, **kwargs):
'''
Add tags to a trail
Returns {tagged: true} if the trail was tagged and returns
{tagged: False} if the trail was not tagged.
CLI Example:
.. code-block:: bash
salt myminion boto_cloudtrail.ad... | python | def add_tags(Name,
region=None, key=None, keyid=None, profile=None, **kwargs):
'''
Add tags to a trail
Returns {tagged: true} if the trail was tagged and returns
{tagged: False} if the trail was not tagged.
CLI Example:
.. code-block:: bash
salt myminion boto_cloudtrail.ad... | [
"def",
"add_tags",
"(",
"Name",
",",
"region",
"=",
"None",
",",
"key",
"=",
"None",
",",
"keyid",
"=",
"None",
",",
"profile",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"try",
":",
"conn",
"=",
"_get_conn",
"(",
"region",
"=",
"region",
",... | Add tags to a trail
Returns {tagged: true} if the trail was tagged and returns
{tagged: False} if the trail was not tagged.
CLI Example:
.. code-block:: bash
salt myminion boto_cloudtrail.add_tags my_trail tag_a=tag_value tag_b=tag_value | [
"Add",
"tags",
"to",
"a",
"trail"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_cloudtrail.py#L407-L435 | train | Add tags to a trail
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.