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/cloud/clouds/ec2.py | get_imageid | def get_imageid(vm_):
'''
Returns the ImageId to use
'''
image = config.get_cloud_config_value(
'image', vm_, __opts__, search_global=False
)
if image.startswith('ami-'):
return image
# a poor man's cache
if not hasattr(get_imageid, 'images'):
get_imageid.images =... | python | def get_imageid(vm_):
'''
Returns the ImageId to use
'''
image = config.get_cloud_config_value(
'image', vm_, __opts__, search_global=False
)
if image.startswith('ami-'):
return image
# a poor man's cache
if not hasattr(get_imageid, 'images'):
get_imageid.images =... | [
"def",
"get_imageid",
"(",
"vm_",
")",
":",
"image",
"=",
"config",
".",
"get_cloud_config_value",
"(",
"'image'",
",",
"vm_",
",",
"__opts__",
",",
"search_global",
"=",
"False",
")",
"if",
"image",
".",
"startswith",
"(",
"'ami-'",
")",
":",
"return",
... | Returns the ImageId to use | [
"Returns",
"the",
"ImageId",
"to",
"use"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L1212-L1236 | train | Returns the ImageId to use for a resource in the cache | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/ec2.py | _get_subnetname_id | def _get_subnetname_id(subnetname):
'''
Returns the SubnetId of a SubnetName to use
'''
params = {'Action': 'DescribeSubnets'}
for subnet in aws.query(params, location=get_location(),
provider=get_provider(), opts=__opts__, sigver='4'):
tags = subnet.get('tagSet', {}).get('ite... | python | def _get_subnetname_id(subnetname):
'''
Returns the SubnetId of a SubnetName to use
'''
params = {'Action': 'DescribeSubnets'}
for subnet in aws.query(params, location=get_location(),
provider=get_provider(), opts=__opts__, sigver='4'):
tags = subnet.get('tagSet', {}).get('ite... | [
"def",
"_get_subnetname_id",
"(",
"subnetname",
")",
":",
"params",
"=",
"{",
"'Action'",
":",
"'DescribeSubnets'",
"}",
"for",
"subnet",
"in",
"aws",
".",
"query",
"(",
"params",
",",
"location",
"=",
"get_location",
"(",
")",
",",
"provider",
"=",
"get_p... | Returns the SubnetId of a SubnetName to use | [
"Returns",
"the",
"SubnetId",
"of",
"a",
"SubnetName",
"to",
"use"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L1239-L1256 | train | Returns the SubnetId of a SubnetName to use
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/ec2.py | get_subnetid | def get_subnetid(vm_):
'''
Returns the SubnetId to use
'''
subnetid = config.get_cloud_config_value(
'subnetid', vm_, __opts__, search_global=False
)
if subnetid:
return subnetid
subnetname = config.get_cloud_config_value(
'subnetname', vm_, __opts__, search_global=F... | python | def get_subnetid(vm_):
'''
Returns the SubnetId to use
'''
subnetid = config.get_cloud_config_value(
'subnetid', vm_, __opts__, search_global=False
)
if subnetid:
return subnetid
subnetname = config.get_cloud_config_value(
'subnetname', vm_, __opts__, search_global=F... | [
"def",
"get_subnetid",
"(",
"vm_",
")",
":",
"subnetid",
"=",
"config",
".",
"get_cloud_config_value",
"(",
"'subnetid'",
",",
"vm_",
",",
"__opts__",
",",
"search_global",
"=",
"False",
")",
"if",
"subnetid",
":",
"return",
"subnetid",
"subnetname",
"=",
"c... | Returns the SubnetId to use | [
"Returns",
"the",
"SubnetId",
"to",
"use"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L1259-L1274 | train | Returns the SubnetId to use
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/ec2.py | _get_securitygroupname_id | def _get_securitygroupname_id(securitygroupname_list):
'''
Returns the SecurityGroupId of a SecurityGroupName to use
'''
securitygroupid_set = set()
if not isinstance(securitygroupname_list, list):
securitygroupname_list = [securitygroupname_list]
params = {'Action': 'DescribeSecurityGro... | python | def _get_securitygroupname_id(securitygroupname_list):
'''
Returns the SecurityGroupId of a SecurityGroupName to use
'''
securitygroupid_set = set()
if not isinstance(securitygroupname_list, list):
securitygroupname_list = [securitygroupname_list]
params = {'Action': 'DescribeSecurityGro... | [
"def",
"_get_securitygroupname_id",
"(",
"securitygroupname_list",
")",
":",
"securitygroupid_set",
"=",
"set",
"(",
")",
"if",
"not",
"isinstance",
"(",
"securitygroupname_list",
",",
"list",
")",
":",
"securitygroupname_list",
"=",
"[",
"securitygroupname_list",
"]"... | Returns the SecurityGroupId of a SecurityGroupName to use | [
"Returns",
"the",
"SecurityGroupId",
"of",
"a",
"SecurityGroupName",
"to",
"use"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L1277-L1293 | train | Returns the SecurityGroupId of a SecurityGroupName to use
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/ec2.py | securitygroupid | def securitygroupid(vm_):
'''
Returns the SecurityGroupId
'''
securitygroupid_set = set()
securitygroupid_list = config.get_cloud_config_value(
'securitygroupid',
vm_,
__opts__,
search_global=False
)
# If the list is None, then the set will remain empty
# ... | python | def securitygroupid(vm_):
'''
Returns the SecurityGroupId
'''
securitygroupid_set = set()
securitygroupid_list = config.get_cloud_config_value(
'securitygroupid',
vm_,
__opts__,
search_global=False
)
# If the list is None, then the set will remain empty
# ... | [
"def",
"securitygroupid",
"(",
"vm_",
")",
":",
"securitygroupid_set",
"=",
"set",
"(",
")",
"securitygroupid_list",
"=",
"config",
".",
"get_cloud_config_value",
"(",
"'securitygroupid'",
",",
"vm_",
",",
"__opts__",
",",
"search_global",
"=",
"False",
")",
"# ... | Returns the SecurityGroupId | [
"Returns",
"the",
"SecurityGroupId"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L1296-L1329 | train | Returns the SecurityGroupId of the current 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/cloud/clouds/ec2.py | get_provider | def get_provider(vm_=None):
'''
Extract the provider name from vm
'''
if vm_ is None:
provider = __active_provider_name__ or 'ec2'
else:
provider = vm_.get('provider', 'ec2')
if ':' in provider:
prov_comps = provider.split(':')
provider = prov_comps[0]
return... | python | def get_provider(vm_=None):
'''
Extract the provider name from vm
'''
if vm_ is None:
provider = __active_provider_name__ or 'ec2'
else:
provider = vm_.get('provider', 'ec2')
if ':' in provider:
prov_comps = provider.split(':')
provider = prov_comps[0]
return... | [
"def",
"get_provider",
"(",
"vm_",
"=",
"None",
")",
":",
"if",
"vm_",
"is",
"None",
":",
"provider",
"=",
"__active_provider_name__",
"or",
"'ec2'",
"else",
":",
"provider",
"=",
"vm_",
".",
"get",
"(",
"'provider'",
",",
"'ec2'",
")",
"if",
"':'",
"i... | Extract the provider name from vm | [
"Extract",
"the",
"provider",
"name",
"from",
"vm"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L1350-L1362 | train | Extract the provider name from vm
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/ec2.py | _list_availability_zones | def _list_availability_zones(vm_=None):
'''
List all availability zones in the current region
'''
ret = {}
params = {'Action': 'DescribeAvailabilityZones',
'Filter.0.Name': 'region-name',
'Filter.0.Value.0': get_location(vm_)}
result = aws.query(params,
... | python | def _list_availability_zones(vm_=None):
'''
List all availability zones in the current region
'''
ret = {}
params = {'Action': 'DescribeAvailabilityZones',
'Filter.0.Name': 'region-name',
'Filter.0.Value.0': get_location(vm_)}
result = aws.query(params,
... | [
"def",
"_list_availability_zones",
"(",
"vm_",
"=",
"None",
")",
":",
"ret",
"=",
"{",
"}",
"params",
"=",
"{",
"'Action'",
":",
"'DescribeAvailabilityZones'",
",",
"'Filter.0.Name'",
":",
"'region-name'",
",",
"'Filter.0.Value.0'",
":",
"get_location",
"(",
"vm... | List all availability zones in the current region | [
"List",
"all",
"availability",
"zones",
"in",
"the",
"current",
"region"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L1365-L1383 | train | List all availability zones in the current 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/cloud/clouds/ec2.py | _request_eip | def _request_eip(interface, vm_):
'''
Request and return Elastic IP
'''
params = {'Action': 'AllocateAddress'}
params['Domain'] = interface.setdefault('domain', 'vpc')
eips = aws.query(params,
return_root=True,
location=get_location(vm_),
... | python | def _request_eip(interface, vm_):
'''
Request and return Elastic IP
'''
params = {'Action': 'AllocateAddress'}
params['Domain'] = interface.setdefault('domain', 'vpc')
eips = aws.query(params,
return_root=True,
location=get_location(vm_),
... | [
"def",
"_request_eip",
"(",
"interface",
",",
"vm_",
")",
":",
"params",
"=",
"{",
"'Action'",
":",
"'AllocateAddress'",
"}",
"params",
"[",
"'Domain'",
"]",
"=",
"interface",
".",
"setdefault",
"(",
"'domain'",
",",
"'vpc'",
")",
"eips",
"=",
"aws",
"."... | Request and return Elastic IP | [
"Request",
"and",
"return",
"Elastic",
"IP"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L1400-L1415 | train | Request Elastic IP
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/ec2.py | _create_eni_if_necessary | def _create_eni_if_necessary(interface, vm_):
'''
Create an Elastic Interface if necessary and return a Network Interface Specification
'''
if 'NetworkInterfaceId' in interface and interface['NetworkInterfaceId'] is not None:
return {'DeviceIndex': interface['DeviceIndex'],
'Netw... | python | def _create_eni_if_necessary(interface, vm_):
'''
Create an Elastic Interface if necessary and return a Network Interface Specification
'''
if 'NetworkInterfaceId' in interface and interface['NetworkInterfaceId'] is not None:
return {'DeviceIndex': interface['DeviceIndex'],
'Netw... | [
"def",
"_create_eni_if_necessary",
"(",
"interface",
",",
"vm_",
")",
":",
"if",
"'NetworkInterfaceId'",
"in",
"interface",
"and",
"interface",
"[",
"'NetworkInterfaceId'",
"]",
"is",
"not",
"None",
":",
"return",
"{",
"'DeviceIndex'",
":",
"interface",
"[",
"'D... | Create an Elastic Interface if necessary and return a Network Interface Specification | [
"Create",
"an",
"Elastic",
"Interface",
"if",
"necessary",
"and",
"return",
"a",
"Network",
"Interface",
"Specification"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L1418-L1515 | train | Create an Elastic Interface if necessary and return a Network Interface Specification | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/ec2.py | _list_interface_private_addrs | def _list_interface_private_addrs(eni_desc):
'''
Returns a list of all of the private IP addresses attached to a
network interface. The 'primary' address will be listed first.
'''
primary = eni_desc.get('privateIpAddress')
if not primary:
return None
addresses = [primary]
lst =... | python | def _list_interface_private_addrs(eni_desc):
'''
Returns a list of all of the private IP addresses attached to a
network interface. The 'primary' address will be listed first.
'''
primary = eni_desc.get('privateIpAddress')
if not primary:
return None
addresses = [primary]
lst =... | [
"def",
"_list_interface_private_addrs",
"(",
"eni_desc",
")",
":",
"primary",
"=",
"eni_desc",
".",
"get",
"(",
"'privateIpAddress'",
")",
"if",
"not",
"primary",
":",
"return",
"None",
"addresses",
"=",
"[",
"primary",
"]",
"lst",
"=",
"eni_desc",
".",
"get... | Returns a list of all of the private IP addresses attached to a
network interface. The 'primary' address will be listed first. | [
"Returns",
"a",
"list",
"of",
"all",
"of",
"the",
"private",
"IP",
"addresses",
"attached",
"to",
"a",
"network",
"interface",
".",
"The",
"primary",
"address",
"will",
"be",
"listed",
"first",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L1543-L1564 | train | Returns a list of all of the private IP addresses attached to a
network interface. The primary address will be listed first. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/ec2.py | _modify_eni_properties | def _modify_eni_properties(eni_id, properties=None, vm_=None):
'''
Change properties of the interface
with id eni_id to the values in properties dict
'''
if not isinstance(properties, dict):
raise SaltCloudException(
'ENI properties must be a dictionary'
)
params = {... | python | def _modify_eni_properties(eni_id, properties=None, vm_=None):
'''
Change properties of the interface
with id eni_id to the values in properties dict
'''
if not isinstance(properties, dict):
raise SaltCloudException(
'ENI properties must be a dictionary'
)
params = {... | [
"def",
"_modify_eni_properties",
"(",
"eni_id",
",",
"properties",
"=",
"None",
",",
"vm_",
"=",
"None",
")",
":",
"if",
"not",
"isinstance",
"(",
"properties",
",",
"dict",
")",
":",
"raise",
"SaltCloudException",
"(",
"'ENI properties must be a dictionary'",
"... | Change properties of the interface
with id eni_id to the values in properties dict | [
"Change",
"properties",
"of",
"the",
"interface",
"with",
"id",
"eni_id",
"to",
"the",
"values",
"in",
"properties",
"dict"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L1567-L1596 | train | Modify properties of the interface with id eni_id to the values in properties dict
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/ec2.py | _associate_eip_with_interface | def _associate_eip_with_interface(eni_id, eip_id, private_ip=None, vm_=None):
'''
Accept the id of a network interface, and the id of an elastic ip
address, and associate the two of them, such that traffic sent to the
elastic ip address will be forwarded (NATted) to this network interface.
Optional... | python | def _associate_eip_with_interface(eni_id, eip_id, private_ip=None, vm_=None):
'''
Accept the id of a network interface, and the id of an elastic ip
address, and associate the two of them, such that traffic sent to the
elastic ip address will be forwarded (NATted) to this network interface.
Optional... | [
"def",
"_associate_eip_with_interface",
"(",
"eni_id",
",",
"eip_id",
",",
"private_ip",
"=",
"None",
",",
"vm_",
"=",
"None",
")",
":",
"params",
"=",
"{",
"'Action'",
":",
"'AssociateAddress'",
",",
"'NetworkInterfaceId'",
":",
"eni_id",
",",
"'AllocationId'",... | Accept the id of a network interface, and the id of an elastic ip
address, and associate the two of them, such that traffic sent to the
elastic ip address will be forwarded (NATted) to this network interface.
Optionally specify the private (10.x.x.x) IP address that traffic should
be NATted to - useful... | [
"Accept",
"the",
"id",
"of",
"a",
"network",
"interface",
"and",
"the",
"id",
"of",
"an",
"elastic",
"ip",
"address",
"and",
"associate",
"the",
"two",
"of",
"them",
"such",
"that",
"traffic",
"sent",
"to",
"the",
"elastic",
"ip",
"address",
"will",
"be"... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L1599-L1636 | train | Associate an elastic ip with an elastic ip. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/ec2.py | _param_from_config | def _param_from_config(key, data):
'''
Return EC2 API parameters based on the given config data.
Examples:
1. List of dictionaries
>>> data = [
... {'DeviceIndex': 0, 'SubnetId': 'subid0',
... 'AssociatePublicIpAddress': True},
... {'DeviceIndex': 1,
... 'SubnetId'... | python | def _param_from_config(key, data):
'''
Return EC2 API parameters based on the given config data.
Examples:
1. List of dictionaries
>>> data = [
... {'DeviceIndex': 0, 'SubnetId': 'subid0',
... 'AssociatePublicIpAddress': True},
... {'DeviceIndex': 1,
... 'SubnetId'... | [
"def",
"_param_from_config",
"(",
"key",
",",
"data",
")",
":",
"param",
"=",
"{",
"}",
"if",
"isinstance",
"(",
"data",
",",
"dict",
")",
":",
"for",
"k",
",",
"v",
"in",
"six",
".",
"iteritems",
"(",
"data",
")",
":",
"param",
".",
"update",
"(... | Return EC2 API parameters based on the given config data.
Examples:
1. List of dictionaries
>>> data = [
... {'DeviceIndex': 0, 'SubnetId': 'subid0',
... 'AssociatePublicIpAddress': True},
... {'DeviceIndex': 1,
... 'SubnetId': 'subid1',
... 'PrivateIpAddress': '1... | [
"Return",
"EC2",
"API",
"parameters",
"based",
"on",
"the",
"given",
"config",
"data",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L1675-L1744 | train | Return EC2 API parameters based on the given config 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/cloud/clouds/ec2.py | request_instance | def request_instance(vm_=None, call=None):
'''
Put together all of the information necessary to request an instance on EC2,
and then fire off the request the instance.
Returns data about the instance
'''
if call == 'function':
# Technically this function may be called other ways too, bu... | python | def request_instance(vm_=None, call=None):
'''
Put together all of the information necessary to request an instance on EC2,
and then fire off the request the instance.
Returns data about the instance
'''
if call == 'function':
# Technically this function may be called other ways too, bu... | [
"def",
"request_instance",
"(",
"vm_",
"=",
"None",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"==",
"'function'",
":",
"# Technically this function may be called other ways too, but it",
"# definitely cannot be called with --function.",
"raise",
"SaltCloudSystemExit",... | Put together all of the information necessary to request an instance on EC2,
and then fire off the request the instance.
Returns data about the instance | [
"Put",
"together",
"all",
"of",
"the",
"information",
"necessary",
"to",
"request",
"an",
"instance",
"on",
"EC2",
"and",
"then",
"fire",
"off",
"the",
"request",
"the",
"instance",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L1747-L2175 | train | Request an instance on EC2. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/ec2.py | query_instance | def query_instance(vm_=None, call=None):
'''
Query an instance upon creation from the EC2 API
'''
if call == 'function':
# Technically this function may be called other ways too, but it
# definitely cannot be called with --function.
raise SaltCloudSystemExit(
'The que... | python | def query_instance(vm_=None, call=None):
'''
Query an instance upon creation from the EC2 API
'''
if call == 'function':
# Technically this function may be called other ways too, but it
# definitely cannot be called with --function.
raise SaltCloudSystemExit(
'The que... | [
"def",
"query_instance",
"(",
"vm_",
"=",
"None",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"==",
"'function'",
":",
"# Technically this function may be called other ways too, but it",
"# definitely cannot be called with --function.",
"raise",
"SaltCloudSystemExit",
... | Query an instance upon creation from the EC2 API | [
"Query",
"an",
"instance",
"upon",
"creation",
"from",
"the",
"EC2",
"API"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L2178-L2304 | train | Query an instance upon creation from the EC2 API. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/ec2.py | wait_for_instance | def wait_for_instance(
vm_=None,
data=None,
ip_address=None,
display_ssh_output=True,
call=None,
):
'''
Wait for an instance upon creation from the EC2 API, to become available
'''
if call == 'function':
# Technically this function may be called other ... | python | def wait_for_instance(
vm_=None,
data=None,
ip_address=None,
display_ssh_output=True,
call=None,
):
'''
Wait for an instance upon creation from the EC2 API, to become available
'''
if call == 'function':
# Technically this function may be called other ... | [
"def",
"wait_for_instance",
"(",
"vm_",
"=",
"None",
",",
"data",
"=",
"None",
",",
"ip_address",
"=",
"None",
",",
"display_ssh_output",
"=",
"True",
",",
"call",
"=",
"None",
",",
")",
":",
"if",
"call",
"==",
"'function'",
":",
"# Technically this funct... | Wait for an instance upon creation from the EC2 API, to become available | [
"Wait",
"for",
"an",
"instance",
"upon",
"creation",
"from",
"the",
"EC2",
"API",
"to",
"become",
"available"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L2307-L2527 | train | Wait for an instance on the EC2 API to become available. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/ec2.py | create | def create(vm_=None, call=None):
'''
Create a single VM from a data dict
'''
if call:
raise SaltCloudSystemExit(
'You cannot create an instance with -a or -f.'
)
try:
# Check for required profile parameters before sending any API calls.
if vm_['profile'] ... | python | def create(vm_=None, call=None):
'''
Create a single VM from a data dict
'''
if call:
raise SaltCloudSystemExit(
'You cannot create an instance with -a or -f.'
)
try:
# Check for required profile parameters before sending any API calls.
if vm_['profile'] ... | [
"def",
"create",
"(",
"vm_",
"=",
"None",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'You cannot create an instance with -a or -f.'",
")",
"try",
":",
"# Check for required profile parameters before sending any API calls."... | Create a single VM from a data dict | [
"Create",
"a",
"single",
"VM",
"from",
"a",
"data",
"dict"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L2555-L2931 | train | Create a single VM from a data dict. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/ec2.py | queue_instances | def queue_instances(instances):
'''
Queue a set of instances to be provisioned later. Expects a list.
Currently this only queries node data, and then places it in the cloud
cache (if configured). If the salt-cloud-reactor is being used, these
instances will be automatically provisioned using that.
... | python | def queue_instances(instances):
'''
Queue a set of instances to be provisioned later. Expects a list.
Currently this only queries node data, and then places it in the cloud
cache (if configured). If the salt-cloud-reactor is being used, these
instances will be automatically provisioned using that.
... | [
"def",
"queue_instances",
"(",
"instances",
")",
":",
"for",
"instance_id",
"in",
"instances",
":",
"node",
"=",
"_get_node",
"(",
"instance_id",
"=",
"instance_id",
")",
"__utils__",
"[",
"'cloud.cache_node'",
"]",
"(",
"node",
",",
"__active_provider_name__",
... | Queue a set of instances to be provisioned later. Expects a list.
Currently this only queries node data, and then places it in the cloud
cache (if configured). If the salt-cloud-reactor is being used, these
instances will be automatically provisioned using that.
For more information about the salt-clo... | [
"Queue",
"a",
"set",
"of",
"instances",
"to",
"be",
"provisioned",
"later",
".",
"Expects",
"a",
"list",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L2934-L2948 | train | Queues a set of instances to be provisioned later. Expects a 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/cloud/clouds/ec2.py | create_attach_volumes | def create_attach_volumes(name, kwargs, call=None, wait_to_finish=True):
'''
Create and attach volumes to created node
'''
if call != 'action':
raise SaltCloudSystemExit(
'The create_attach_volumes action must be called with '
'-a or --action.'
)
if 'instance... | python | def create_attach_volumes(name, kwargs, call=None, wait_to_finish=True):
'''
Create and attach volumes to created node
'''
if call != 'action':
raise SaltCloudSystemExit(
'The create_attach_volumes action must be called with '
'-a or --action.'
)
if 'instance... | [
"def",
"create_attach_volumes",
"(",
"name",
",",
"kwargs",
",",
"call",
"=",
"None",
",",
"wait_to_finish",
"=",
"True",
")",
":",
"if",
"call",
"!=",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The create_attach_volumes action must be called with '",
"... | Create and attach volumes to created node | [
"Create",
"and",
"attach",
"volumes",
"to",
"created",
"node"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L2951-L3034 | train | Create and attach volumes to a node | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/ec2.py | stop | def stop(name, call=None):
'''
Stop a node
'''
if call != 'action':
raise SaltCloudSystemExit(
'The stop action must be called with -a or --action.'
)
log.info('Stopping node %s', name)
instance_id = _get_node(name)['instanceId']
__utils__['cloud.fire_event'](
... | python | def stop(name, call=None):
'''
Stop a node
'''
if call != 'action':
raise SaltCloudSystemExit(
'The stop action must be called with -a or --action.'
)
log.info('Stopping node %s', name)
instance_id = _get_node(name)['instanceId']
__utils__['cloud.fire_event'](
... | [
"def",
"stop",
"(",
"name",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The stop action must be called with -a or --action.'",
")",
"log",
".",
"info",
"(",
"'Stopping node %s'",
",",
"name",
")... | Stop a node | [
"Stop",
"a",
"node"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L3037-L3067 | train | Stop a node in the cluster | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/ec2.py | set_tags | def set_tags(name=None,
tags=None,
call=None,
location=None,
instance_id=None,
resource_id=None,
kwargs=None): # pylint: disable=W0613
'''
Set tags for a resource. Normally a VM name or instance_id is passed in,
but a resource_id... | python | def set_tags(name=None,
tags=None,
call=None,
location=None,
instance_id=None,
resource_id=None,
kwargs=None): # pylint: disable=W0613
'''
Set tags for a resource. Normally a VM name or instance_id is passed in,
but a resource_id... | [
"def",
"set_tags",
"(",
"name",
"=",
"None",
",",
"tags",
"=",
"None",
",",
"call",
"=",
"None",
",",
"location",
"=",
"None",
",",
"instance_id",
"=",
"None",
",",
"resource_id",
"=",
"None",
",",
"kwargs",
"=",
"None",
")",
":",
"# pylint: disable=W0... | Set tags for a resource. Normally a VM name or instance_id is passed in,
but a resource_id may be passed instead. If both are passed in, the
instance_id will be used.
CLI Examples:
.. code-block:: bash
salt-cloud -a set_tags mymachine tag1=somestuff tag2='Other stuff'
salt-cloud -a se... | [
"Set",
"tags",
"for",
"a",
"resource",
".",
"Normally",
"a",
"VM",
"name",
"or",
"instance_id",
"is",
"passed",
"in",
"but",
"a",
"resource_id",
"may",
"be",
"passed",
"instead",
".",
"If",
"both",
"are",
"passed",
"in",
"the",
"instance_id",
"will",
"be... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L3103-L3206 | train | Set tags for a 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/cloud/clouds/ec2.py | get_tags | def get_tags(name=None,
instance_id=None,
call=None,
location=None,
kwargs=None,
resource_id=None): # pylint: disable=W0613
'''
Retrieve tags for a resource. Normally a VM name or instance_id is passed
in, but a resource_id may be passed inst... | python | def get_tags(name=None,
instance_id=None,
call=None,
location=None,
kwargs=None,
resource_id=None): # pylint: disable=W0613
'''
Retrieve tags for a resource. Normally a VM name or instance_id is passed
in, but a resource_id may be passed inst... | [
"def",
"get_tags",
"(",
"name",
"=",
"None",
",",
"instance_id",
"=",
"None",
",",
"call",
"=",
"None",
",",
"location",
"=",
"None",
",",
"kwargs",
"=",
"None",
",",
"resource_id",
"=",
"None",
")",
":",
"# pylint: disable=W0613",
"if",
"location",
"is"... | Retrieve tags for a resource. Normally a VM name or instance_id is passed
in, but a resource_id may be passed instead. If both are passed in, the
instance_id will be used.
CLI Examples:
.. code-block:: bash
salt-cloud -a get_tags mymachine
salt-cloud -a get_tags resource_id=vol-3267ab... | [
"Retrieve",
"tags",
"for",
"a",
"resource",
".",
"Normally",
"a",
"VM",
"name",
"or",
"instance_id",
"is",
"passed",
"in",
"but",
"a",
"resource_id",
"may",
"be",
"passed",
"instead",
".",
"If",
"both",
"are",
"passed",
"in",
"the",
"instance_id",
"will",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L3209-L3250 | train | Retrieve tags for a 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/cloud/clouds/ec2.py | del_tags | def del_tags(name=None,
kwargs=None,
call=None,
instance_id=None,
resource_id=None): # pylint: disable=W0613
'''
Delete tags for a resource. Normally a VM name or instance_id is passed in,
but a resource_id may be passed instead. If both are passed in, th... | python | def del_tags(name=None,
kwargs=None,
call=None,
instance_id=None,
resource_id=None): # pylint: disable=W0613
'''
Delete tags for a resource. Normally a VM name or instance_id is passed in,
but a resource_id may be passed instead. If both are passed in, th... | [
"def",
"del_tags",
"(",
"name",
"=",
"None",
",",
"kwargs",
"=",
"None",
",",
"call",
"=",
"None",
",",
"instance_id",
"=",
"None",
",",
"resource_id",
"=",
"None",
")",
":",
"# pylint: disable=W0613",
"if",
"kwargs",
"is",
"None",
":",
"kwargs",
"=",
... | Delete tags for a resource. Normally a VM name or instance_id is passed in,
but a resource_id may be passed instead. If both are passed in, the
instance_id will be used.
CLI Examples:
.. code-block:: bash
salt-cloud -a del_tags mymachine tags=mytag,
salt-cloud -a del_tags mymachine ta... | [
"Delete",
"tags",
"for",
"a",
"resource",
".",
"Normally",
"a",
"VM",
"name",
"or",
"instance_id",
"is",
"passed",
"in",
"but",
"a",
"resource_id",
"may",
"be",
"passed",
"instead",
".",
"If",
"both",
"are",
"passed",
"in",
"the",
"instance_id",
"will",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L3253-L3302 | train | Delete tags for a resource. Normally a VM name or instance_id is passed in but a resource_id may be passed in. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/ec2.py | rename | def rename(name, kwargs, call=None):
'''
Properly rename a node. Pass in the new name as "new name".
CLI Example:
.. code-block:: bash
salt-cloud -a rename mymachine newname=yourmachine
'''
if call != 'action':
raise SaltCloudSystemExit(
'The rename action must be ... | python | def rename(name, kwargs, call=None):
'''
Properly rename a node. Pass in the new name as "new name".
CLI Example:
.. code-block:: bash
salt-cloud -a rename mymachine newname=yourmachine
'''
if call != 'action':
raise SaltCloudSystemExit(
'The rename action must be ... | [
"def",
"rename",
"(",
"name",
",",
"kwargs",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The rename action must be called with -a or --action.'",
")",
"log",
".",
"info",
"(",
"'Renaming %s to %s'... | Properly rename a node. Pass in the new name as "new name".
CLI Example:
.. code-block:: bash
salt-cloud -a rename mymachine newname=yourmachine | [
"Properly",
"rename",
"a",
"node",
".",
"Pass",
"in",
"the",
"new",
"name",
"as",
"new",
"name",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L3305-L3326 | train | Rename a node. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/ec2.py | destroy | def destroy(name, call=None):
'''
Destroy a node. Will check termination protection and warn if enabled.
CLI Example:
.. code-block:: bash
salt-cloud --destroy mymachine
'''
if call == 'function':
raise SaltCloudSystemExit(
'The destroy action must be called with -... | python | def destroy(name, call=None):
'''
Destroy a node. Will check termination protection and warn if enabled.
CLI Example:
.. code-block:: bash
salt-cloud --destroy mymachine
'''
if call == 'function':
raise SaltCloudSystemExit(
'The destroy action must be called with -... | [
"def",
"destroy",
"(",
"name",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"==",
"'function'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The destroy action must be called with -d, --destroy, '",
"'-a or --action.'",
")",
"node_metadata",
"=",
"_get_node",
"(",... | Destroy a node. Will check termination protection and warn if enabled.
CLI Example:
.. code-block:: bash
salt-cloud --destroy mymachine | [
"Destroy",
"a",
"node",
".",
"Will",
"check",
"termination",
"protection",
"and",
"warn",
"if",
"enabled",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L3329-L3430 | train | Destroys a node. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/ec2.py | reboot | def reboot(name, call=None):
'''
Reboot a node.
CLI Example:
.. code-block:: bash
salt-cloud -a reboot mymachine
'''
instance_id = _get_node(name)['instanceId']
params = {'Action': 'RebootInstances',
'InstanceId.1': instance_id}
result = aws.query(params,
... | python | def reboot(name, call=None):
'''
Reboot a node.
CLI Example:
.. code-block:: bash
salt-cloud -a reboot mymachine
'''
instance_id = _get_node(name)['instanceId']
params = {'Action': 'RebootInstances',
'InstanceId.1': instance_id}
result = aws.query(params,
... | [
"def",
"reboot",
"(",
"name",
",",
"call",
"=",
"None",
")",
":",
"instance_id",
"=",
"_get_node",
"(",
"name",
")",
"[",
"'instanceId'",
"]",
"params",
"=",
"{",
"'Action'",
":",
"'RebootInstances'",
",",
"'InstanceId.1'",
":",
"instance_id",
"}",
"result... | Reboot a node.
CLI Example:
.. code-block:: bash
salt-cloud -a reboot mymachine | [
"Reboot",
"a",
"node",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L3433-L3457 | train | Reboot a node. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/ec2.py | show_image | def show_image(kwargs, call=None):
'''
Show the details from EC2 concerning an AMI
'''
if call != 'function':
raise SaltCloudSystemExit(
'The show_image action must be called with -f or --function.'
)
params = {'ImageId.1': kwargs['image'],
'Action': 'Descr... | python | def show_image(kwargs, call=None):
'''
Show the details from EC2 concerning an AMI
'''
if call != 'function':
raise SaltCloudSystemExit(
'The show_image action must be called with -f or --function.'
)
params = {'ImageId.1': kwargs['image'],
'Action': 'Descr... | [
"def",
"show_image",
"(",
"kwargs",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'function'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The show_image action must be called with -f or --function.'",
")",
"params",
"=",
"{",
"'ImageId.1'",
":",
"kwargs"... | Show the details from EC2 concerning an AMI | [
"Show",
"the",
"details",
"from",
"EC2",
"concerning",
"an",
"AMI"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L3460-L3479 | train | Show the details from EC2 concerning an AMI | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/ec2.py | show_instance | def show_instance(name=None, instance_id=None, call=None, kwargs=None):
'''
Show the details from EC2 concerning an AMI.
Can be called as an action (which requires a name):
.. code-block:: bash
salt-cloud -a show_instance myinstance
...or as a function (which requires either a name or in... | python | def show_instance(name=None, instance_id=None, call=None, kwargs=None):
'''
Show the details from EC2 concerning an AMI.
Can be called as an action (which requires a name):
.. code-block:: bash
salt-cloud -a show_instance myinstance
...or as a function (which requires either a name or in... | [
"def",
"show_instance",
"(",
"name",
"=",
"None",
",",
"instance_id",
"=",
"None",
",",
"call",
"=",
"None",
",",
"kwargs",
"=",
"None",
")",
":",
"if",
"not",
"name",
"and",
"call",
"==",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The show_... | Show the details from EC2 concerning an AMI.
Can be called as an action (which requires a name):
.. code-block:: bash
salt-cloud -a show_instance myinstance
...or as a function (which requires either a name or instance_id):
.. code-block:: bash
salt-cloud -f show_instance my-ec2 na... | [
"Show",
"the",
"details",
"from",
"EC2",
"concerning",
"an",
"AMI",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L3482-L3516 | train | Show the details from an AMI. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/ec2.py | _extract_instance_info | def _extract_instance_info(instances):
'''
Given an instance query, return a dict of all instance data
'''
ret = {}
for instance in instances:
# items could be type dict or list (for stopped EC2 instances)
if isinstance(instance['instancesSet']['item'], list):
for item in... | python | def _extract_instance_info(instances):
'''
Given an instance query, return a dict of all instance data
'''
ret = {}
for instance in instances:
# items could be type dict or list (for stopped EC2 instances)
if isinstance(instance['instancesSet']['item'], list):
for item in... | [
"def",
"_extract_instance_info",
"(",
"instances",
")",
":",
"ret",
"=",
"{",
"}",
"for",
"instance",
"in",
"instances",
":",
"# items could be type dict or list (for stopped EC2 instances)",
"if",
"isinstance",
"(",
"instance",
"[",
"'instancesSet'",
"]",
"[",
"'item... | Given an instance query, return a dict of all instance data | [
"Given",
"an",
"instance",
"query",
"return",
"a",
"dict",
"of",
"all",
"instance",
"data"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L3583-L3621 | train | Given an instance query return a dict of all instance 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/cloud/clouds/ec2.py | _list_nodes_full | def _list_nodes_full(location=None):
'''
Return a list of the VMs that in this location
'''
provider = __active_provider_name__ or 'ec2'
if ':' in provider:
comps = provider.split(':')
provider = comps[0]
params = {'Action': 'DescribeInstances'}
instances = aws.query(params,... | python | def _list_nodes_full(location=None):
'''
Return a list of the VMs that in this location
'''
provider = __active_provider_name__ or 'ec2'
if ':' in provider:
comps = provider.split(':')
provider = comps[0]
params = {'Action': 'DescribeInstances'}
instances = aws.query(params,... | [
"def",
"_list_nodes_full",
"(",
"location",
"=",
"None",
")",
":",
"provider",
"=",
"__active_provider_name__",
"or",
"'ec2'",
"if",
"':'",
"in",
"provider",
":",
"comps",
"=",
"provider",
".",
"split",
"(",
"':'",
")",
"provider",
"=",
"comps",
"[",
"0",
... | Return a list of the VMs that in this location | [
"Return",
"a",
"list",
"of",
"the",
"VMs",
"that",
"in",
"this",
"location"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L3624-L3649 | train | Return a list of the VMs that are in this location | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/ec2.py | list_nodes_min | def list_nodes_min(location=None, call=None):
'''
Return a list of the VMs that are on the provider. Only a list of VM names,
and their state, is returned. This is the minimum amount of information
needed to check for existing VMs.
'''
if call == 'action':
raise SaltCloudSystemExit(
... | python | def list_nodes_min(location=None, call=None):
'''
Return a list of the VMs that are on the provider. Only a list of VM names,
and their state, is returned. This is the minimum amount of information
needed to check for existing VMs.
'''
if call == 'action':
raise SaltCloudSystemExit(
... | [
"def",
"list_nodes_min",
"(",
"location",
"=",
"None",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"==",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The list_nodes_min function must be called with -f or --function.'",
")",
"ret",
"=",
"{",
"}",
"... | Return a list of the VMs that are on the provider. Only a list of VM names,
and their state, is returned. This is the minimum amount of information
needed to check for existing VMs. | [
"Return",
"a",
"list",
"of",
"the",
"VMs",
"that",
"are",
"on",
"the",
"provider",
".",
"Only",
"a",
"list",
"of",
"VM",
"names",
"and",
"their",
"state",
"is",
"returned",
".",
"This",
"is",
"the",
"minimum",
"amount",
"of",
"information",
"needed",
"... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L3652-L3688 | train | Return a list of the VMs that are on the provider that are not on the provider. Only a list of VM names and their state is returned. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/ec2.py | list_nodes_select | def list_nodes_select(call=None):
'''
Return a list of the VMs that are on the provider, with select fields
'''
return salt.utils.cloud.list_nodes_select(
list_nodes_full(get_location()), __opts__['query.selection'], call,
) | python | def list_nodes_select(call=None):
'''
Return a list of the VMs that are on the provider, with select fields
'''
return salt.utils.cloud.list_nodes_select(
list_nodes_full(get_location()), __opts__['query.selection'], call,
) | [
"def",
"list_nodes_select",
"(",
"call",
"=",
"None",
")",
":",
"return",
"salt",
".",
"utils",
".",
"cloud",
".",
"list_nodes_select",
"(",
"list_nodes_full",
"(",
"get_location",
"(",
")",
")",
",",
"__opts__",
"[",
"'query.selection'",
"]",
",",
"call",
... | Return a list of the VMs that are on the provider, with select fields | [
"Return",
"a",
"list",
"of",
"the",
"VMs",
"that",
"are",
"on",
"the",
"provider",
"with",
"select",
"fields"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L3721-L3727 | train | Return a list of the VMs that are on the provider with select fields
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/ec2.py | show_term_protect | def show_term_protect(name=None, instance_id=None, call=None, quiet=False):
'''
Show the details from EC2 concerning an instance's termination protection state
'''
if call != 'action':
raise SaltCloudSystemExit(
'The show_term_protect action must be called with -a or --action.'
... | python | def show_term_protect(name=None, instance_id=None, call=None, quiet=False):
'''
Show the details from EC2 concerning an instance's termination protection state
'''
if call != 'action':
raise SaltCloudSystemExit(
'The show_term_protect action must be called with -a or --action.'
... | [
"def",
"show_term_protect",
"(",
"name",
"=",
"None",
",",
"instance_id",
"=",
"None",
",",
"call",
"=",
"None",
",",
"quiet",
"=",
"False",
")",
":",
"if",
"call",
"!=",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The show_term_protect action must... | Show the details from EC2 concerning an instance's termination protection state | [
"Show",
"the",
"details",
"from",
"EC2",
"concerning",
"an",
"instance",
"s",
"termination",
"protection",
"state"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L3730-L3764 | train | Show the details from EC2 concerning an instance s termination protection state | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/ec2.py | show_detailed_monitoring | def show_detailed_monitoring(name=None, instance_id=None, call=None, quiet=False):
'''
Show the details from EC2 regarding cloudwatch detailed monitoring.
'''
if call != 'action':
raise SaltCloudSystemExit(
'The show_detailed_monitoring action must be called with -a or --action.'
... | python | def show_detailed_monitoring(name=None, instance_id=None, call=None, quiet=False):
'''
Show the details from EC2 regarding cloudwatch detailed monitoring.
'''
if call != 'action':
raise SaltCloudSystemExit(
'The show_detailed_monitoring action must be called with -a or --action.'
... | [
"def",
"show_detailed_monitoring",
"(",
"name",
"=",
"None",
",",
"instance_id",
"=",
"None",
",",
"call",
"=",
"None",
",",
"quiet",
"=",
"False",
")",
":",
"if",
"call",
"!=",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The show_detailed_monitori... | Show the details from EC2 regarding cloudwatch detailed monitoring. | [
"Show",
"the",
"details",
"from",
"EC2",
"regarding",
"cloudwatch",
"detailed",
"monitoring",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L3767-L3789 | train | Show the details from EC2 regarding cloudwatch detailed monitoring. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/ec2.py | _toggle_term_protect | def _toggle_term_protect(name, value):
'''
Enable or Disable termination protection on a node
'''
instance_id = _get_node(name)['instanceId']
params = {'Action': 'ModifyInstanceAttribute',
'InstanceId': instance_id,
'DisableApiTermination.Value': value}
result = aws... | python | def _toggle_term_protect(name, value):
'''
Enable or Disable termination protection on a node
'''
instance_id = _get_node(name)['instanceId']
params = {'Action': 'ModifyInstanceAttribute',
'InstanceId': instance_id,
'DisableApiTermination.Value': value}
result = aws... | [
"def",
"_toggle_term_protect",
"(",
"name",
",",
"value",
")",
":",
"instance_id",
"=",
"_get_node",
"(",
"name",
")",
"[",
"'instanceId'",
"]",
"params",
"=",
"{",
"'Action'",
":",
"'ModifyInstanceAttribute'",
",",
"'InstanceId'",
":",
"instance_id",
",",
"'D... | Enable or Disable termination protection on a node | [
"Enable",
"or",
"Disable",
"termination",
"protection",
"on",
"a",
"node"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L3792-L3809 | train | Enable or disable termination protection on a node | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/ec2.py | disable_detailed_monitoring | def disable_detailed_monitoring(name, call=None):
'''
Enable/disable detailed monitoring on a node
CLI Example:
'''
if call != 'action':
raise SaltCloudSystemExit(
'The enable_term_protect action must be called with '
'-a or --action.'
)
instance_id = _g... | python | def disable_detailed_monitoring(name, call=None):
'''
Enable/disable detailed monitoring on a node
CLI Example:
'''
if call != 'action':
raise SaltCloudSystemExit(
'The enable_term_protect action must be called with '
'-a or --action.'
)
instance_id = _g... | [
"def",
"disable_detailed_monitoring",
"(",
"name",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The enable_term_protect action must be called with '",
"'-a or --action.'",
")",
"instance_id",
"=",
"_get_... | Enable/disable detailed monitoring on a node
CLI Example: | [
"Enable",
"/",
"disable",
"detailed",
"monitoring",
"on",
"a",
"node"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L3850-L3873 | train | Enable or disable detailed monitoring on a node. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/ec2.py | show_delvol_on_destroy | def show_delvol_on_destroy(name, kwargs=None, call=None):
'''
Do not delete all/specified EBS volumes upon instance termination
CLI Example:
.. code-block:: bash
salt-cloud -a show_delvol_on_destroy mymachine
'''
if call != 'action':
raise SaltCloudSystemExit(
'Th... | python | def show_delvol_on_destroy(name, kwargs=None, call=None):
'''
Do not delete all/specified EBS volumes upon instance termination
CLI Example:
.. code-block:: bash
salt-cloud -a show_delvol_on_destroy mymachine
'''
if call != 'action':
raise SaltCloudSystemExit(
'Th... | [
"def",
"show_delvol_on_destroy",
"(",
"name",
",",
"kwargs",
"=",
"None",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The show_delvol_on_destroy action must be called '",
"'with -a or --action.'",
")"... | Do not delete all/specified EBS volumes upon instance termination
CLI Example:
.. code-block:: bash
salt-cloud -a show_delvol_on_destroy mymachine | [
"Do",
"not",
"delete",
"all",
"/",
"specified",
"EBS",
"volumes",
"upon",
"instance",
"termination"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L3903-L3963 | train | Show the details of the specified EBS volumes on instance termination. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/ec2.py | keepvol_on_destroy | def keepvol_on_destroy(name, kwargs=None, call=None):
'''
Do not delete all/specified EBS volumes upon instance termination
CLI Example:
.. code-block:: bash
salt-cloud -a keepvol_on_destroy mymachine
'''
if call != 'action':
raise SaltCloudSystemExit(
'The keepvol... | python | def keepvol_on_destroy(name, kwargs=None, call=None):
'''
Do not delete all/specified EBS volumes upon instance termination
CLI Example:
.. code-block:: bash
salt-cloud -a keepvol_on_destroy mymachine
'''
if call != 'action':
raise SaltCloudSystemExit(
'The keepvol... | [
"def",
"keepvol_on_destroy",
"(",
"name",
",",
"kwargs",
"=",
"None",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The keepvol_on_destroy action must be called with -a or --action.'",
")",
"if",
"not... | Do not delete all/specified EBS volumes upon instance termination
CLI Example:
.. code-block:: bash
salt-cloud -a keepvol_on_destroy mymachine | [
"Do",
"not",
"delete",
"all",
"/",
"specified",
"EBS",
"volumes",
"upon",
"instance",
"termination"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L3966-L3988 | train | Delete all EBS volumes upon instance termination | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/ec2.py | register_image | def register_image(kwargs=None, call=None):
'''
Create an ami from a snapshot
CLI Example:
.. code-block:: bash
salt-cloud -f register_image my-ec2-config ami_name=my_ami description="my description"
root_device_name=/dev/xvda snapshot_id=snap-xxxxxxxx
'''
if call != ... | python | def register_image(kwargs=None, call=None):
'''
Create an ami from a snapshot
CLI Example:
.. code-block:: bash
salt-cloud -f register_image my-ec2-config ami_name=my_ami description="my description"
root_device_name=/dev/xvda snapshot_id=snap-xxxxxxxx
'''
if call != ... | [
"def",
"register_image",
"(",
"kwargs",
"=",
"None",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'function'",
":",
"log",
".",
"error",
"(",
"'The create_volume function must be called with -f or --function.'",
")",
"return",
"False",
"if",
"'ami_name... | Create an ami from a snapshot
CLI Example:
.. code-block:: bash
salt-cloud -f register_image my-ec2-config ami_name=my_ami description="my description"
root_device_name=/dev/xvda snapshot_id=snap-xxxxxxxx | [
"Create",
"an",
"ami",
"from",
"a",
"snapshot"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L4070-L4143 | train | Register an image in 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/cloud/clouds/ec2.py | create_volume | def create_volume(kwargs=None, call=None, wait_to_finish=False):
'''
Create a volume.
zone
The availability zone used to create the volume. Required. String.
size
The size of the volume, in GiBs. Defaults to ``10``. Integer.
snapshot
The snapshot-id from which to create th... | python | def create_volume(kwargs=None, call=None, wait_to_finish=False):
'''
Create a volume.
zone
The availability zone used to create the volume. Required. String.
size
The size of the volume, in GiBs. Defaults to ``10``. Integer.
snapshot
The snapshot-id from which to create th... | [
"def",
"create_volume",
"(",
"kwargs",
"=",
"None",
",",
"call",
"=",
"None",
",",
"wait_to_finish",
"=",
"False",
")",
":",
"if",
"call",
"!=",
"'function'",
":",
"log",
".",
"error",
"(",
"'The create_volume function must be called with -f or --function.'",
")",... | Create a volume.
zone
The availability zone used to create the volume. Required. String.
size
The size of the volume, in GiBs. Defaults to ``10``. Integer.
snapshot
The snapshot-id from which to create the volume. Integer.
type
The volume type. This can be gp2 for Gen... | [
"Create",
"a",
"volume",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L4154-L4282 | train | Create a new volume in the specified availability zone. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/ec2.py | attach_volume | def attach_volume(name=None, kwargs=None, instance_id=None, call=None):
'''
Attach a volume to an instance
'''
if call != 'action':
raise SaltCloudSystemExit(
'The attach_volume action must be called with -a or --action.'
)
if not kwargs:
kwargs = {}
if 'ins... | python | def attach_volume(name=None, kwargs=None, instance_id=None, call=None):
'''
Attach a volume to an instance
'''
if call != 'action':
raise SaltCloudSystemExit(
'The attach_volume action must be called with -a or --action.'
)
if not kwargs:
kwargs = {}
if 'ins... | [
"def",
"attach_volume",
"(",
"name",
"=",
"None",
",",
"kwargs",
"=",
"None",
",",
"instance_id",
"=",
"None",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The attach_volume action must be call... | Attach a volume to an instance | [
"Attach",
"a",
"volume",
"to",
"an",
"instance"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L4302-L4352 | train | Attach a volume to an 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/cloud/clouds/ec2.py | describe_volumes | def describe_volumes(kwargs=None, call=None):
'''
Describe a volume (or volumes)
volume_id
One or more volume IDs. Multiple IDs must be separated by ",".
TODO: Add all of the filters.
'''
if call != 'function':
log.error(
'The describe_volumes function must be calle... | python | def describe_volumes(kwargs=None, call=None):
'''
Describe a volume (or volumes)
volume_id
One or more volume IDs. Multiple IDs must be separated by ",".
TODO: Add all of the filters.
'''
if call != 'function':
log.error(
'The describe_volumes function must be calle... | [
"def",
"describe_volumes",
"(",
"kwargs",
"=",
"None",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'function'",
":",
"log",
".",
"error",
"(",
"'The describe_volumes function must be called with -f '",
"'or --function.'",
")",
"return",
"False",
"if",... | Describe a volume (or volumes)
volume_id
One or more volume IDs. Multiple IDs must be separated by ",".
TODO: Add all of the filters. | [
"Describe",
"a",
"volume",
"(",
"or",
"volumes",
")"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L4426-L4460 | train | Describe a volume or volumes. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/ec2.py | create_keypair | def create_keypair(kwargs=None, call=None):
'''
Create an SSH keypair
'''
if call != 'function':
log.error(
'The create_keypair function must be called with -f or --function.'
)
return False
if not kwargs:
kwargs = {}
if 'keyname' not in kwargs:
... | python | def create_keypair(kwargs=None, call=None):
'''
Create an SSH keypair
'''
if call != 'function':
log.error(
'The create_keypair function must be called with -f or --function.'
)
return False
if not kwargs:
kwargs = {}
if 'keyname' not in kwargs:
... | [
"def",
"create_keypair",
"(",
"kwargs",
"=",
"None",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'function'",
":",
"log",
".",
"error",
"(",
"'The create_keypair function must be called with -f or --function.'",
")",
"return",
"False",
"if",
"not",
... | Create an SSH keypair | [
"Create",
"an",
"SSH",
"keypair"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L4463-L4492 | train | Create an SSH keypair | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/ec2.py | import_keypair | def import_keypair(kwargs=None, call=None):
'''
Import an SSH public key.
.. versionadded:: 2015.8.3
'''
if call != 'function':
log.error(
'The import_keypair function must be called with -f or --function.'
)
return False
if not kwargs:
kwargs = {}
... | python | def import_keypair(kwargs=None, call=None):
'''
Import an SSH public key.
.. versionadded:: 2015.8.3
'''
if call != 'function':
log.error(
'The import_keypair function must be called with -f or --function.'
)
return False
if not kwargs:
kwargs = {}
... | [
"def",
"import_keypair",
"(",
"kwargs",
"=",
"None",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'function'",
":",
"log",
".",
"error",
"(",
"'The import_keypair function must be called with -f or --function.'",
")",
"return",
"False",
"if",
"not",
... | Import an SSH public key.
.. versionadded:: 2015.8.3 | [
"Import",
"an",
"SSH",
"public",
"key",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L4495-L4536 | train | Import an SSH public key from a file. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/ec2.py | delete_keypair | def delete_keypair(kwargs=None, call=None):
'''
Delete an SSH keypair
'''
if call != 'function':
log.error(
'The delete_keypair function must be called with -f or --function.'
)
return False
if not kwargs:
kwargs = {}
if 'keyname' not in kwargs:
... | python | def delete_keypair(kwargs=None, call=None):
'''
Delete an SSH keypair
'''
if call != 'function':
log.error(
'The delete_keypair function must be called with -f or --function.'
)
return False
if not kwargs:
kwargs = {}
if 'keyname' not in kwargs:
... | [
"def",
"delete_keypair",
"(",
"kwargs",
"=",
"None",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'function'",
":",
"log",
".",
"error",
"(",
"'The delete_keypair function must be called with -f or --function.'",
")",
"return",
"False",
"if",
"not",
... | Delete an SSH keypair | [
"Delete",
"an",
"SSH",
"keypair"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L4568-L4594 | train | Delete an SSH keypair | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/ec2.py | create_snapshot | def create_snapshot(kwargs=None, call=None, wait_to_finish=False):
'''
Create a snapshot.
volume_id
The ID of the Volume from which to create a snapshot.
description
The optional description of the snapshot.
CLI Exampe:
.. code-block:: bash
salt-cloud -f create_snaps... | python | def create_snapshot(kwargs=None, call=None, wait_to_finish=False):
'''
Create a snapshot.
volume_id
The ID of the Volume from which to create a snapshot.
description
The optional description of the snapshot.
CLI Exampe:
.. code-block:: bash
salt-cloud -f create_snaps... | [
"def",
"create_snapshot",
"(",
"kwargs",
"=",
"None",
",",
"call",
"=",
"None",
",",
"wait_to_finish",
"=",
"False",
")",
":",
"if",
"call",
"!=",
"'function'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The create_snapshot function must be called with -f '",
"'or ... | Create a snapshot.
volume_id
The ID of the Volume from which to create a snapshot.
description
The optional description of the snapshot.
CLI Exampe:
.. code-block:: bash
salt-cloud -f create_snapshot my-ec2-config volume_id=vol-351d8826
salt-cloud -f create_snapshot ... | [
"Create",
"a",
"snapshot",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L4597-L4662 | train | Creates a snapshot on the specified volume. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/ec2.py | copy_snapshot | def copy_snapshot(kwargs=None, call=None):
'''
Copy a snapshot
'''
if call != 'function':
log.error(
'The copy_snapshot function must be called with -f or --function.'
)
return False
if 'source_region' not in kwargs:
log.error('A source_region must be spe... | python | def copy_snapshot(kwargs=None, call=None):
'''
Copy a snapshot
'''
if call != 'function':
log.error(
'The copy_snapshot function must be called with -f or --function.'
)
return False
if 'source_region' not in kwargs:
log.error('A source_region must be spe... | [
"def",
"copy_snapshot",
"(",
"kwargs",
"=",
"None",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'function'",
":",
"log",
".",
"error",
"(",
"'The copy_snapshot function must be called with -f or --function.'",
")",
"return",
"False",
"if",
"'source_re... | Copy a snapshot | [
"Copy",
"a",
"snapshot"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L4696-L4736 | train | Copy a snapshot of a 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/cloud/clouds/ec2.py | describe_snapshots | def describe_snapshots(kwargs=None, call=None):
'''
Describe a snapshot (or snapshots)
snapshot_id
One or more snapshot IDs. Multiple IDs must be separated by ",".
owner
Return the snapshots owned by the specified owner. Valid values
include: self, amazon, <AWS Account ID>. Mul... | python | def describe_snapshots(kwargs=None, call=None):
'''
Describe a snapshot (or snapshots)
snapshot_id
One or more snapshot IDs. Multiple IDs must be separated by ",".
owner
Return the snapshots owned by the specified owner. Valid values
include: self, amazon, <AWS Account ID>. Mul... | [
"def",
"describe_snapshots",
"(",
"kwargs",
"=",
"None",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'function'",
":",
"log",
".",
"error",
"(",
"'The describe_snapshot function must be called with -f '",
"'or --function.'",
")",
"return",
"False",
"p... | Describe a snapshot (or snapshots)
snapshot_id
One or more snapshot IDs. Multiple IDs must be separated by ",".
owner
Return the snapshots owned by the specified owner. Valid values
include: self, amazon, <AWS Account ID>. Multiple values must be
separated by ",".
restorab... | [
"Describe",
"a",
"snapshot",
"(",
"or",
"snapshots",
")"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L4739-L4795 | train | Describe a snapshot or 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/cloud/clouds/ec2.py | get_console_output | def get_console_output(
name=None,
location=None,
instance_id=None,
call=None,
kwargs=None,
):
'''
Show the console output from the instance.
By default, returns decoded data, not the Base64-encoded data that is
actually returned from the EC2 API.
'''
... | python | def get_console_output(
name=None,
location=None,
instance_id=None,
call=None,
kwargs=None,
):
'''
Show the console output from the instance.
By default, returns decoded data, not the Base64-encoded data that is
actually returned from the EC2 API.
'''
... | [
"def",
"get_console_output",
"(",
"name",
"=",
"None",
",",
"location",
"=",
"None",
",",
"instance_id",
"=",
"None",
",",
"call",
"=",
"None",
",",
"kwargs",
"=",
"None",
",",
")",
":",
"if",
"call",
"!=",
"'action'",
":",
"raise",
"SaltCloudSystemExit"... | Show the console output from the instance.
By default, returns decoded data, not the Base64-encoded data that is
actually returned from the EC2 API. | [
"Show",
"the",
"console",
"output",
"from",
"the",
"instance",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L4798-L4848 | train | Get the console output from the 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/cloud/clouds/ec2.py | get_password_data | def get_password_data(
name=None,
kwargs=None,
instance_id=None,
call=None,
):
'''
Return password data for a Windows instance.
By default only the encrypted password data will be returned. However, if a
key_file is passed in, then a decrypted password will also be r... | python | def get_password_data(
name=None,
kwargs=None,
instance_id=None,
call=None,
):
'''
Return password data for a Windows instance.
By default only the encrypted password data will be returned. However, if a
key_file is passed in, then a decrypted password will also be r... | [
"def",
"get_password_data",
"(",
"name",
"=",
"None",
",",
"kwargs",
"=",
"None",
",",
"instance_id",
"=",
"None",
",",
"call",
"=",
"None",
",",
")",
":",
"if",
"call",
"!=",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The get_password_data acti... | Return password data for a Windows instance.
By default only the encrypted password data will be returned. However, if a
key_file is passed in, then a decrypted password will also be returned.
Note that the key_file references the private key that was used to generate
the keypair associated with this ... | [
"Return",
"password",
"data",
"for",
"a",
"Windows",
"instance",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L4851-L4932 | train | Get the encrypted password data for a Windows 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/cloud/clouds/ec2.py | update_pricing | def update_pricing(kwargs=None, call=None):
'''
Download most recent pricing information from AWS and convert to a local
JSON file.
CLI Examples:
.. code-block:: bash
salt-cloud -f update_pricing my-ec2-config
salt-cloud -f update_pricing my-ec2-config type=linux
.. versionad... | python | def update_pricing(kwargs=None, call=None):
'''
Download most recent pricing information from AWS and convert to a local
JSON file.
CLI Examples:
.. code-block:: bash
salt-cloud -f update_pricing my-ec2-config
salt-cloud -f update_pricing my-ec2-config type=linux
.. versionad... | [
"def",
"update_pricing",
"(",
"kwargs",
"=",
"None",
",",
"call",
"=",
"None",
")",
":",
"sources",
"=",
"{",
"'linux'",
":",
"'https://a0.awsstatic.com/pricing/1/ec2/linux-od.min.js'",
",",
"'rhel'",
":",
"'https://a0.awsstatic.com/pricing/1/ec2/rhel-od.min.js'",
",",
... | Download most recent pricing information from AWS and convert to a local
JSON file.
CLI Examples:
.. code-block:: bash
salt-cloud -f update_pricing my-ec2-config
salt-cloud -f update_pricing my-ec2-config type=linux
.. versionadded:: 2015.8.0 | [
"Download",
"most",
"recent",
"pricing",
"information",
"from",
"AWS",
"and",
"convert",
"to",
"a",
"local",
"JSON",
"file",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L4935-L4965 | train | Download most recent pricing information from AWS and convert to a local
JSON file. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/ec2.py | _parse_pricing | def _parse_pricing(url, name):
'''
Download and parse an individual pricing file from AWS
.. versionadded:: 2015.8.0
'''
price_js = http.query(url, text=True)
items = []
current_item = ''
price_js = re.sub(JS_COMMENT_RE, '', price_js['text'])
price_js = price_js.strip().rstrip(');... | python | def _parse_pricing(url, name):
'''
Download and parse an individual pricing file from AWS
.. versionadded:: 2015.8.0
'''
price_js = http.query(url, text=True)
items = []
current_item = ''
price_js = re.sub(JS_COMMENT_RE, '', price_js['text'])
price_js = price_js.strip().rstrip(');... | [
"def",
"_parse_pricing",
"(",
"url",
",",
"name",
")",
":",
"price_js",
"=",
"http",
".",
"query",
"(",
"url",
",",
"text",
"=",
"True",
")",
"items",
"=",
"[",
"]",
"current_item",
"=",
"''",
"price_js",
"=",
"re",
".",
"sub",
"(",
"JS_COMMENT_RE",
... | Download and parse an individual pricing file from AWS
.. versionadded:: 2015.8.0 | [
"Download",
"and",
"parse",
"an",
"individual",
"pricing",
"file",
"from",
"AWS"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L4968-L5021 | train | Download and parse an individual pricing file from AWS and return the contents of the individual pricing file | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/ec2.py | show_pricing | def show_pricing(kwargs=None, call=None):
'''
Show pricing for a particular profile. This is only an estimate, based on
unofficial pricing sources.
CLI Examples:
.. code-block:: bash
salt-cloud -f show_pricing my-ec2-config profile=my-profile
If pricing sources have not been cached, ... | python | def show_pricing(kwargs=None, call=None):
'''
Show pricing for a particular profile. This is only an estimate, based on
unofficial pricing sources.
CLI Examples:
.. code-block:: bash
salt-cloud -f show_pricing my-ec2-config profile=my-profile
If pricing sources have not been cached, ... | [
"def",
"show_pricing",
"(",
"kwargs",
"=",
"None",
",",
"call",
"=",
"None",
")",
":",
"profile",
"=",
"__opts__",
"[",
"'profiles'",
"]",
".",
"get",
"(",
"kwargs",
"[",
"'profile'",
"]",
",",
"{",
"}",
")",
"if",
"not",
"profile",
":",
"return",
... | Show pricing for a particular profile. This is only an estimate, based on
unofficial pricing sources.
CLI Examples:
.. code-block:: bash
salt-cloud -f show_pricing my-ec2-config profile=my-profile
If pricing sources have not been cached, they will be downloaded. Once they
have been cache... | [
"Show",
"pricing",
"for",
"a",
"particular",
"profile",
".",
"This",
"is",
"only",
"an",
"estimate",
"based",
"on",
"unofficial",
"pricing",
"sources",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L5024-L5115 | train | Show pricing for a particular profile | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/cloud/clouds/ec2.py | ssm_create_association | def ssm_create_association(name=None, kwargs=None, instance_id=None, call=None):
'''
Associates the specified SSM document with the specified instance
http://docs.aws.amazon.com/ssm/latest/APIReference/API_CreateAssociation.html
CLI Examples:
.. code-block:: bash
salt-cloud -a ssm_create... | python | def ssm_create_association(name=None, kwargs=None, instance_id=None, call=None):
'''
Associates the specified SSM document with the specified instance
http://docs.aws.amazon.com/ssm/latest/APIReference/API_CreateAssociation.html
CLI Examples:
.. code-block:: bash
salt-cloud -a ssm_create... | [
"def",
"ssm_create_association",
"(",
"name",
"=",
"None",
",",
"kwargs",
"=",
"None",
",",
"instance_id",
"=",
"None",
",",
"call",
"=",
"None",
")",
":",
"if",
"call",
"!=",
"'action'",
":",
"raise",
"SaltCloudSystemExit",
"(",
"'The ssm_create_association a... | Associates the specified SSM document with the specified instance
http://docs.aws.amazon.com/ssm/latest/APIReference/API_CreateAssociation.html
CLI Examples:
.. code-block:: bash
salt-cloud -a ssm_create_association ec2-instance-name ssm_document=ssm-document-name | [
"Associates",
"the",
"specified",
"SSM",
"document",
"with",
"the",
"specified",
"instance"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/ec2.py#L5118-L5166 | train | Associate the specified SSM document with the specified 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/vagrant.py | _build_machine_uri | def _build_machine_uri(machine, cwd):
'''
returns string used to fetch id names from the sdb store.
the cwd and machine name are concatenated with '?' which should
never collide with a Salt node id -- which is important since we
will be storing both in the same table.
'''
key = '{}?{}'.form... | python | def _build_machine_uri(machine, cwd):
'''
returns string used to fetch id names from the sdb store.
the cwd and machine name are concatenated with '?' which should
never collide with a Salt node id -- which is important since we
will be storing both in the same table.
'''
key = '{}?{}'.form... | [
"def",
"_build_machine_uri",
"(",
"machine",
",",
"cwd",
")",
":",
"key",
"=",
"'{}?{}'",
".",
"format",
"(",
"machine",
",",
"os",
".",
"path",
".",
"abspath",
"(",
"cwd",
")",
")",
"return",
"_build_sdb_uri",
"(",
"key",
")"
] | returns string used to fetch id names from the sdb store.
the cwd and machine name are concatenated with '?' which should
never collide with a Salt node id -- which is important since we
will be storing both in the same table. | [
"returns",
"string",
"used",
"to",
"fetch",
"id",
"names",
"from",
"the",
"sdb",
"store",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vagrant.py#L70-L79 | train | Build the URI for a given machine name | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/vagrant.py | _update_vm_info | def _update_vm_info(name, vm_):
''' store the vm_ information keyed by name '''
__utils__['sdb.sdb_set'](_build_sdb_uri(name), vm_, __opts__)
# store machine-to-name mapping, too
if vm_['machine']:
__utils__['sdb.sdb_set'](
_build_machine_uri(vm_['machine'], vm_.get('cwd', '.')),
... | python | def _update_vm_info(name, vm_):
''' store the vm_ information keyed by name '''
__utils__['sdb.sdb_set'](_build_sdb_uri(name), vm_, __opts__)
# store machine-to-name mapping, too
if vm_['machine']:
__utils__['sdb.sdb_set'](
_build_machine_uri(vm_['machine'], vm_.get('cwd', '.')),
... | [
"def",
"_update_vm_info",
"(",
"name",
",",
"vm_",
")",
":",
"__utils__",
"[",
"'sdb.sdb_set'",
"]",
"(",
"_build_sdb_uri",
"(",
"name",
")",
",",
"vm_",
",",
"__opts__",
")",
"# store machine-to-name mapping, too",
"if",
"vm_",
"[",
"'machine'",
"]",
":",
"... | store the vm_ information keyed by name | [
"store",
"the",
"vm_",
"information",
"keyed",
"by",
"name"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vagrant.py#L82-L91 | train | Store the vm_ information keyed by name | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/vagrant.py | get_vm_info | def get_vm_info(name):
'''
get the information for a VM.
:param name: salt_id name
:return: dictionary of {'machine': x, 'cwd': y, ...}.
'''
try:
vm_ = __utils__['sdb.sdb_get'](_build_sdb_uri(name), __opts__)
except KeyError:
raise SaltInvocationError(
'Probable ... | python | def get_vm_info(name):
'''
get the information for a VM.
:param name: salt_id name
:return: dictionary of {'machine': x, 'cwd': y, ...}.
'''
try:
vm_ = __utils__['sdb.sdb_get'](_build_sdb_uri(name), __opts__)
except KeyError:
raise SaltInvocationError(
'Probable ... | [
"def",
"get_vm_info",
"(",
"name",
")",
":",
"try",
":",
"vm_",
"=",
"__utils__",
"[",
"'sdb.sdb_get'",
"]",
"(",
"_build_sdb_uri",
"(",
"name",
")",
",",
"__opts__",
")",
"except",
"KeyError",
":",
"raise",
"SaltInvocationError",
"(",
"'Probable sdb driver no... | get the information for a VM.
:param name: salt_id name
:return: dictionary of {'machine': x, 'cwd': y, ...}. | [
"get",
"the",
"information",
"for",
"a",
"VM",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vagrant.py#L94-L109 | train | get the information for a VM. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/vagrant.py | get_machine_id | def get_machine_id(machine, cwd):
'''
returns the salt_id name of the Vagrant VM
:param machine: the Vagrant machine name
:param cwd: the path to Vagrantfile
:return: salt_id name
'''
name = __utils__['sdb.sdb_get'](_build_machine_uri(machine, cwd), __opts__)
return name | python | def get_machine_id(machine, cwd):
'''
returns the salt_id name of the Vagrant VM
:param machine: the Vagrant machine name
:param cwd: the path to Vagrantfile
:return: salt_id name
'''
name = __utils__['sdb.sdb_get'](_build_machine_uri(machine, cwd), __opts__)
return name | [
"def",
"get_machine_id",
"(",
"machine",
",",
"cwd",
")",
":",
"name",
"=",
"__utils__",
"[",
"'sdb.sdb_get'",
"]",
"(",
"_build_machine_uri",
"(",
"machine",
",",
"cwd",
")",
",",
"__opts__",
")",
"return",
"name"
] | returns the salt_id name of the Vagrant VM
:param machine: the Vagrant machine name
:param cwd: the path to Vagrantfile
:return: salt_id name | [
"returns",
"the",
"salt_id",
"name",
"of",
"the",
"Vagrant",
"VM"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vagrant.py#L112-L121 | train | Returns the salt_id name of the Vagrant VM
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/vagrant.py | _erase_vm_info | def _erase_vm_info(name):
'''
erase the information for a VM the we are destroying.
some sdb drivers (such as the SQLite driver we expect to use)
do not have a `delete` method, so if the delete fails, we have
to replace the with a blank entry.
'''
try:
# delete the machine record
... | python | def _erase_vm_info(name):
'''
erase the information for a VM the we are destroying.
some sdb drivers (such as the SQLite driver we expect to use)
do not have a `delete` method, so if the delete fails, we have
to replace the with a blank entry.
'''
try:
# delete the machine record
... | [
"def",
"_erase_vm_info",
"(",
"name",
")",
":",
"try",
":",
"# delete the machine record",
"vm_",
"=",
"get_vm_info",
"(",
"name",
")",
"if",
"vm_",
"[",
"'machine'",
"]",
":",
"key",
"=",
"_build_machine_uri",
"(",
"vm_",
"[",
"'machine'",
"]",
",",
"vm_"... | erase the information for a VM the we are destroying.
some sdb drivers (such as the SQLite driver we expect to use)
do not have a `delete` method, so if the delete fails, we have
to replace the with a blank entry. | [
"erase",
"the",
"information",
"for",
"a",
"VM",
"the",
"we",
"are",
"destroying",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vagrant.py#L124-L153 | train | Erase the information for a VM. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/vagrant.py | _vagrant_ssh_config | def _vagrant_ssh_config(vm_):
'''
get the information for ssh communication from the new VM
:param vm_: the VM's info as we have it now
:return: dictionary of ssh stuff
'''
machine = vm_['machine']
log.info('requesting vagrant ssh-config for VM %s', machine or '(default)')
cmd = 'vagran... | python | def _vagrant_ssh_config(vm_):
'''
get the information for ssh communication from the new VM
:param vm_: the VM's info as we have it now
:return: dictionary of ssh stuff
'''
machine = vm_['machine']
log.info('requesting vagrant ssh-config for VM %s', machine or '(default)')
cmd = 'vagran... | [
"def",
"_vagrant_ssh_config",
"(",
"vm_",
")",
":",
"machine",
"=",
"vm_",
"[",
"'machine'",
"]",
"log",
".",
"info",
"(",
"'requesting vagrant ssh-config for VM %s'",
",",
"machine",
"or",
"'(default)'",
")",
"cmd",
"=",
"'vagrant ssh-config {}'",
".",
"format",
... | get the information for ssh communication from the new VM
:param vm_: the VM's info as we have it now
:return: dictionary of ssh stuff | [
"get",
"the",
"information",
"for",
"ssh",
"communication",
"from",
"the",
"new",
"VM"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vagrant.py#L156-L176 | train | get the information for ssh communication from the new VM | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/vagrant.py | list_domains | def list_domains():
'''
Return a list of the salt_id names of all available Vagrant VMs on
this host without regard to the path where they are defined.
CLI Example:
.. code-block:: bash
salt '*' vagrant.list_domains --log-level=info
The log shows information about all known Vagrant e... | python | def list_domains():
'''
Return a list of the salt_id names of all available Vagrant VMs on
this host without regard to the path where they are defined.
CLI Example:
.. code-block:: bash
salt '*' vagrant.list_domains --log-level=info
The log shows information about all known Vagrant e... | [
"def",
"list_domains",
"(",
")",
":",
"vms",
"=",
"[",
"]",
"cmd",
"=",
"'vagrant global-status'",
"reply",
"=",
"__salt__",
"[",
"'cmd.shell'",
"]",
"(",
"cmd",
")",
"log",
".",
"info",
"(",
"'--->\\n%s'",
",",
"reply",
")",
"for",
"line",
"in",
"repl... | Return a list of the salt_id names of all available Vagrant VMs on
this host without regard to the path where they are defined.
CLI Example:
.. code-block:: bash
salt '*' vagrant.list_domains --log-level=info
The log shows information about all known Vagrant environments
on this machine.... | [
"Return",
"a",
"list",
"of",
"the",
"salt_id",
"names",
"of",
"all",
"available",
"Vagrant",
"VMs",
"on",
"this",
"host",
"without",
"regard",
"to",
"the",
"path",
"where",
"they",
"are",
"defined",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vagrant.py#L193-L223 | train | Return a list of the salt_id names of all available Vagrant VMs on this host without regard to the path where they are defined. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/vagrant.py | list_active_vms | def list_active_vms(cwd=None):
'''
Return a list of machine names for active virtual machine on the host,
which are defined in the Vagrantfile at the indicated path.
CLI Example:
.. code-block:: bash
salt '*' vagrant.list_active_vms cwd=/projects/project_1
'''
vms = []
cmd = ... | python | def list_active_vms(cwd=None):
'''
Return a list of machine names for active virtual machine on the host,
which are defined in the Vagrantfile at the indicated path.
CLI Example:
.. code-block:: bash
salt '*' vagrant.list_active_vms cwd=/projects/project_1
'''
vms = []
cmd = ... | [
"def",
"list_active_vms",
"(",
"cwd",
"=",
"None",
")",
":",
"vms",
"=",
"[",
"]",
"cmd",
"=",
"'vagrant status'",
"reply",
"=",
"__salt__",
"[",
"'cmd.shell'",
"]",
"(",
"cmd",
",",
"cwd",
"=",
"cwd",
")",
"log",
".",
"info",
"(",
"'--->\\n%s'",
","... | Return a list of machine names for active virtual machine on the host,
which are defined in the Vagrantfile at the indicated path.
CLI Example:
.. code-block:: bash
salt '*' vagrant.list_active_vms cwd=/projects/project_1 | [
"Return",
"a",
"list",
"of",
"machine",
"names",
"for",
"active",
"virtual",
"machine",
"on",
"the",
"host",
"which",
"are",
"defined",
"in",
"the",
"Vagrantfile",
"at",
"the",
"indicated",
"path",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vagrant.py#L226-L246 | train | Return a list of machine names for active virtual machine on the host | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/vagrant.py | vm_state | def vm_state(name='', cwd=None):
'''
Return list of information for all the vms indicating their state.
If you pass a VM name in as an argument then it will return info
for just the named VM, otherwise it will return all VMs defined by
the Vagrantfile in the `cwd` directory.
CLI Example:
... | python | def vm_state(name='', cwd=None):
'''
Return list of information for all the vms indicating their state.
If you pass a VM name in as an argument then it will return info
for just the named VM, otherwise it will return all VMs defined by
the Vagrantfile in the `cwd` directory.
CLI Example:
... | [
"def",
"vm_state",
"(",
"name",
"=",
"''",
",",
"cwd",
"=",
"None",
")",
":",
"if",
"name",
":",
"vm_",
"=",
"get_vm_info",
"(",
"name",
")",
"machine",
"=",
"vm_",
"[",
"'machine'",
"]",
"cwd",
"=",
"vm_",
"[",
"'cwd'",
"]",
"or",
"cwd",
"# usua... | Return list of information for all the vms indicating their state.
If you pass a VM name in as an argument then it will return info
for just the named VM, otherwise it will return all VMs defined by
the Vagrantfile in the `cwd` directory.
CLI Example:
.. code-block:: bash
salt '*' vagran... | [
"Return",
"list",
"of",
"information",
"for",
"all",
"the",
"vms",
"indicating",
"their",
"state",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vagrant.py#L273-L330 | train | Return list of information for all the VMs in the Vagrantfile that are in the specified state. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/vagrant.py | init | def init(name, # Salt_id for created VM
cwd=None, # path to find Vagrantfile
machine='', # name of machine in Vagrantfile
runas=None, # username who owns Vagrant box
start=False, # start the machine when initialized
vagrant_provider='', # vagrant provider (default=virt... | python | def init(name, # Salt_id for created VM
cwd=None, # path to find Vagrantfile
machine='', # name of machine in Vagrantfile
runas=None, # username who owns Vagrant box
start=False, # start the machine when initialized
vagrant_provider='', # vagrant provider (default=virt... | [
"def",
"init",
"(",
"name",
",",
"# Salt_id for created VM",
"cwd",
"=",
"None",
",",
"# path to find Vagrantfile",
"machine",
"=",
"''",
",",
"# name of machine in Vagrantfile",
"runas",
"=",
"None",
",",
"# username who owns Vagrant box",
"start",
"=",
"False",
",",... | Initialize a new Vagrant VM.
This inputs all the information needed to start a Vagrant VM. These settings are stored in
a Salt sdb database on the Vagrant host minion and used to start, control, and query the
guest VMs. The salt_id assigned here is the key field for that database and must be unique.
... | [
"Initialize",
"a",
"new",
"Vagrant",
"VM",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vagrant.py#L333-L380 | train | Initialize a new Vagrant VM. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/vagrant.py | stop | def stop(name):
'''
Hard shutdown the virtual machine. (vagrant halt)
CLI Example:
.. code-block:: bash
salt <host> vagrant.stop <salt_id>
'''
vm_ = get_vm_info(name)
machine = vm_['machine']
cmd = 'vagrant halt {}'.format(machine)
ret = __salt__['cmd.retcode'](cmd,
... | python | def stop(name):
'''
Hard shutdown the virtual machine. (vagrant halt)
CLI Example:
.. code-block:: bash
salt <host> vagrant.stop <salt_id>
'''
vm_ = get_vm_info(name)
machine = vm_['machine']
cmd = 'vagrant halt {}'.format(machine)
ret = __salt__['cmd.retcode'](cmd,
... | [
"def",
"stop",
"(",
"name",
")",
":",
"vm_",
"=",
"get_vm_info",
"(",
"name",
")",
"machine",
"=",
"vm_",
"[",
"'machine'",
"]",
"cmd",
"=",
"'vagrant halt {}'",
".",
"format",
"(",
"machine",
")",
"ret",
"=",
"__salt__",
"[",
"'cmd.retcode'",
"]",
"("... | Hard shutdown the virtual machine. (vagrant halt)
CLI Example:
.. code-block:: bash
salt <host> vagrant.stop <salt_id> | [
"Hard",
"shutdown",
"the",
"virtual",
"machine",
".",
"(",
"vagrant",
"halt",
")"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vagrant.py#L440-L457 | train | Hard shutdown the virtual machine. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/vagrant.py | reboot | def reboot(name, provision=False):
'''
Reboot a VM. (vagrant reload)
CLI Example:
.. code-block:: bash
salt <host> vagrant.reboot <salt_id> provision=True
:param name: The salt_id name you will use to control this VM
:param provision: (False) also re-run the Vagrant provisioning scri... | python | def reboot(name, provision=False):
'''
Reboot a VM. (vagrant reload)
CLI Example:
.. code-block:: bash
salt <host> vagrant.reboot <salt_id> provision=True
:param name: The salt_id name you will use to control this VM
:param provision: (False) also re-run the Vagrant provisioning scri... | [
"def",
"reboot",
"(",
"name",
",",
"provision",
"=",
"False",
")",
":",
"vm_",
"=",
"get_vm_info",
"(",
"name",
")",
"machine",
"=",
"vm_",
"[",
"'machine'",
"]",
"prov",
"=",
"'--provision'",
"if",
"provision",
"else",
"''",
"cmd",
"=",
"'vagrant reload... | Reboot a VM. (vagrant reload)
CLI Example:
.. code-block:: bash
salt <host> vagrant.reboot <salt_id> provision=True
:param name: The salt_id name you will use to control this VM
:param provision: (False) also re-run the Vagrant provisioning scripts. | [
"Reboot",
"a",
"VM",
".",
"(",
"vagrant",
"reload",
")"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vagrant.py#L480-L501 | train | Reboot a VM. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/vagrant.py | destroy | def destroy(name):
'''
Destroy and delete a virtual machine. (vagrant destroy -f)
This also removes the salt_id name defined by vagrant.init.
CLI Example:
.. code-block:: bash
salt <host> vagrant.destroy <salt_id>
'''
vm_ = get_vm_info(name)
machine = vm_['machine']
cmd ... | python | def destroy(name):
'''
Destroy and delete a virtual machine. (vagrant destroy -f)
This also removes the salt_id name defined by vagrant.init.
CLI Example:
.. code-block:: bash
salt <host> vagrant.destroy <salt_id>
'''
vm_ = get_vm_info(name)
machine = vm_['machine']
cmd ... | [
"def",
"destroy",
"(",
"name",
")",
":",
"vm_",
"=",
"get_vm_info",
"(",
"name",
")",
"machine",
"=",
"vm_",
"[",
"'machine'",
"]",
"cmd",
"=",
"'vagrant destroy -f {}'",
".",
"format",
"(",
"machine",
")",
"ret",
"=",
"__salt__",
"[",
"'cmd.run_all'",
"... | Destroy and delete a virtual machine. (vagrant destroy -f)
This also removes the salt_id name defined by vagrant.init.
CLI Example:
.. code-block:: bash
salt <host> vagrant.destroy <salt_id> | [
"Destroy",
"and",
"delete",
"a",
"virtual",
"machine",
".",
"(",
"vagrant",
"destroy",
"-",
"f",
")"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vagrant.py#L504-L528 | train | Destroy and delete a virtual machine. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/vagrant.py | get_ssh_config | def get_ssh_config(name, network_mask='', get_private_key=False):
r'''
Retrieve hints of how you might connect to a Vagrant VM.
:param name: the salt_id of the machine
:param network_mask: a CIDR mask to search for the VM's address
:param get_private_key: (default: False) return the key used for ss... | python | def get_ssh_config(name, network_mask='', get_private_key=False):
r'''
Retrieve hints of how you might connect to a Vagrant VM.
:param name: the salt_id of the machine
:param network_mask: a CIDR mask to search for the VM's address
:param get_private_key: (default: False) return the key used for ss... | [
"def",
"get_ssh_config",
"(",
"name",
",",
"network_mask",
"=",
"''",
",",
"get_private_key",
"=",
"False",
")",
":",
"vm_",
"=",
"get_vm_info",
"(",
"name",
")",
"ssh_config",
"=",
"_vagrant_ssh_config",
"(",
"vm_",
")",
"try",
":",
"ans",
"=",
"{",
"'k... | r'''
Retrieve hints of how you might connect to a Vagrant VM.
:param name: the salt_id of the machine
:param network_mask: a CIDR mask to search for the VM's address
:param get_private_key: (default: False) return the key used for ssh login
:return: a dict of ssh login information for the VM
C... | [
"r",
"Retrieve",
"hints",
"of",
"how",
"you",
"might",
"connect",
"to",
"a",
"Vagrant",
"VM",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/vagrant.py#L531-L632 | train | r Returns a dict of ssh login information for a VM. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/esxvm.py | vm_configured | def vm_configured(name, vm_name, cpu, memory, image, version, interfaces,
disks, scsi_devices, serial_ports, datacenter, datastore,
placement, cd_dvd_drives=None, sata_controllers=None,
advanced_configs=None, template=None, tools=True,
power_on=Fal... | python | def vm_configured(name, vm_name, cpu, memory, image, version, interfaces,
disks, scsi_devices, serial_ports, datacenter, datastore,
placement, cd_dvd_drives=None, sata_controllers=None,
advanced_configs=None, template=None, tools=True,
power_on=Fal... | [
"def",
"vm_configured",
"(",
"name",
",",
"vm_name",
",",
"cpu",
",",
"memory",
",",
"image",
",",
"version",
",",
"interfaces",
",",
"disks",
",",
"scsi_devices",
",",
"serial_ports",
",",
"datacenter",
",",
"datastore",
",",
"placement",
",",
"cd_dvd_drive... | Selects the correct operation to be executed on a virtual machine, non
existing machines will be created, existing ones will be updated if the
config differs. | [
"Selects",
"the",
"correct",
"operation",
"to",
"be",
"executed",
"on",
"a",
"virtual",
"machine",
"non",
"existing",
"machines",
"will",
"be",
"created",
"existing",
"ones",
"will",
"be",
"updated",
"if",
"the",
"config",
"differs",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/esxvm.py#L227-L312 | train | Configure a virtual machine. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/esxvm.py | vm_updated | def vm_updated(name, vm_name, cpu, memory, image, version, interfaces,
disks, scsi_devices, serial_ports, datacenter, datastore,
cd_dvd_drives=None, sata_controllers=None,
advanced_configs=None, power_on=False):
'''
Updates a virtual machine configuration if there is... | python | def vm_updated(name, vm_name, cpu, memory, image, version, interfaces,
disks, scsi_devices, serial_ports, datacenter, datastore,
cd_dvd_drives=None, sata_controllers=None,
advanced_configs=None, power_on=False):
'''
Updates a virtual machine configuration if there is... | [
"def",
"vm_updated",
"(",
"name",
",",
"vm_name",
",",
"cpu",
",",
"memory",
",",
"image",
",",
"version",
",",
"interfaces",
",",
"disks",
",",
"scsi_devices",
",",
"serial_ports",
",",
"datacenter",
",",
"datastore",
",",
"cd_dvd_drives",
"=",
"None",
",... | Updates a virtual machine configuration if there is a difference between
the given and deployed configuration. | [
"Updates",
"a",
"virtual",
"machine",
"configuration",
"if",
"there",
"is",
"a",
"difference",
"between",
"the",
"given",
"and",
"deployed",
"configuration",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/esxvm.py#L328-L421 | train | Update a virtual machine configuration. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/esxvm.py | vm_created | def vm_created(name, vm_name, cpu, memory, image, version, interfaces,
disks, scsi_devices, serial_ports, datacenter, datastore,
placement, ide_controllers=None, sata_controllers=None,
cd_dvd_drives=None, advanced_configs=None, power_on=False):
'''
Creates a virtual ... | python | def vm_created(name, vm_name, cpu, memory, image, version, interfaces,
disks, scsi_devices, serial_ports, datacenter, datastore,
placement, ide_controllers=None, sata_controllers=None,
cd_dvd_drives=None, advanced_configs=None, power_on=False):
'''
Creates a virtual ... | [
"def",
"vm_created",
"(",
"name",
",",
"vm_name",
",",
"cpu",
",",
"memory",
",",
"image",
",",
"version",
",",
"interfaces",
",",
"disks",
",",
"scsi_devices",
",",
"serial_ports",
",",
"datacenter",
",",
"datastore",
",",
"placement",
",",
"ide_controllers... | Creates a virtual machine with the given properties if it doesn't exist. | [
"Creates",
"a",
"virtual",
"machine",
"with",
"the",
"given",
"properties",
"if",
"it",
"doesn",
"t",
"exist",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/esxvm.py#L424-L484 | train | Creates a virtual machine with the given properties if it doesn t 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/esxvm.py | vm_registered | def vm_registered(vm_name, datacenter, placement, vm_file, power_on=False):
'''
Registers a virtual machine if the machine files are available on
the main datastore.
'''
result = {'name': vm_name,
'result': None,
'changes': {},
'comment': ''}
vmx_path =... | python | def vm_registered(vm_name, datacenter, placement, vm_file, power_on=False):
'''
Registers a virtual machine if the machine files are available on
the main datastore.
'''
result = {'name': vm_name,
'result': None,
'changes': {},
'comment': ''}
vmx_path =... | [
"def",
"vm_registered",
"(",
"vm_name",
",",
"datacenter",
",",
"placement",
",",
"vm_file",
",",
"power_on",
"=",
"False",
")",
":",
"result",
"=",
"{",
"'name'",
":",
"vm_name",
",",
"'result'",
":",
"None",
",",
"'changes'",
":",
"{",
"}",
",",
"'co... | Registers a virtual machine if the machine files are available on
the main datastore. | [
"Registers",
"a",
"virtual",
"machine",
"if",
"the",
"machine",
"files",
"are",
"available",
"on",
"the",
"main",
"datastore",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/esxvm.py#L487-L537 | train | Registers a virtual machine with the main datastore. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/npm.py | installed | def installed(name,
pkgs=None,
dir=None,
user=None,
force_reinstall=False,
registry=None,
env=None):
'''
Verify that the given package is installed and is at the correct version
(if specified).
.. code-block:: yaml
... | python | def installed(name,
pkgs=None,
dir=None,
user=None,
force_reinstall=False,
registry=None,
env=None):
'''
Verify that the given package is installed and is at the correct version
(if specified).
.. code-block:: yaml
... | [
"def",
"installed",
"(",
"name",
",",
"pkgs",
"=",
"None",
",",
"dir",
"=",
"None",
",",
"user",
"=",
"None",
",",
"force_reinstall",
"=",
"False",
",",
"registry",
"=",
"None",
",",
"env",
"=",
"None",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"... | Verify that the given package is installed and is at the correct version
(if specified).
.. code-block:: yaml
coffee-script:
npm.installed:
- user: someuser
coffee-script@1.0.1:
npm.installed: []
name
The package to install
.. versionchang... | [
"Verify",
"that",
"the",
"given",
"package",
"is",
"installed",
"and",
"is",
"at",
"the",
"correct",
"version",
"(",
"if",
"specified",
")",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/npm.py#L38-L223 | train | Verify that the given NPM package is installed at the correct 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/states/npm.py | removed | def removed(name, dir=None, user=None):
'''
Verify that the given package is not installed.
dir
The target directory in which to install the package, or None for
global installation
user
The user to run NPM with
.. versionadded:: 0.17.0
'''
ret = {'name': name,... | python | def removed(name, dir=None, user=None):
'''
Verify that the given package is not installed.
dir
The target directory in which to install the package, or None for
global installation
user
The user to run NPM with
.. versionadded:: 0.17.0
'''
ret = {'name': name,... | [
"def",
"removed",
"(",
"name",
",",
"dir",
"=",
"None",
",",
"user",
"=",
"None",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'result'",
":",
"None",
",",
"'comment'",
":",
"''",
",",
"'changes'",
":",
"{",
"}",
"}",
"try",
":",
"in... | Verify that the given package is not installed.
dir
The target directory in which to install the package, or None for
global installation
user
The user to run NPM with
.. versionadded:: 0.17.0 | [
"Verify",
"that",
"the",
"given",
"package",
"is",
"not",
"installed",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/npm.py#L226-L266 | train | Verify that the given package is not installed and uninstalls it. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/npm.py | bootstrap | def bootstrap(name, user=None, silent=True):
'''
Bootstraps a node.js application.
Will execute 'npm install --json' on the specified directory.
user
The user to run NPM with
.. versionadded:: 0.17.0
'''
ret = {'name': name, 'result': None, 'comment': '', 'changes': {}}
i... | python | def bootstrap(name, user=None, silent=True):
'''
Bootstraps a node.js application.
Will execute 'npm install --json' on the specified directory.
user
The user to run NPM with
.. versionadded:: 0.17.0
'''
ret = {'name': name, 'result': None, 'comment': '', 'changes': {}}
i... | [
"def",
"bootstrap",
"(",
"name",
",",
"user",
"=",
"None",
",",
"silent",
"=",
"True",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'result'",
":",
"None",
",",
"'comment'",
":",
"''",
",",
"'changes'",
":",
"{",
"}",
"}",
"if",
"__opt... | Bootstraps a node.js application.
Will execute 'npm install --json' on the specified directory.
user
The user to run NPM with
.. versionadded:: 0.17.0 | [
"Bootstraps",
"a",
"node",
".",
"js",
"application",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/npm.py#L269-L319 | train | Bootstraps a node. js application on the specified directory. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/npm.py | cache_cleaned | def cache_cleaned(name=None,
user=None,
force=False):
'''
Ensure that the given package is not cached.
If no package is specified, this ensures the entire cache is cleared.
name
The name of the package to remove from the cache, or None for all packages
... | python | def cache_cleaned(name=None,
user=None,
force=False):
'''
Ensure that the given package is not cached.
If no package is specified, this ensures the entire cache is cleared.
name
The name of the package to remove from the cache, or None for all packages
... | [
"def",
"cache_cleaned",
"(",
"name",
"=",
"None",
",",
"user",
"=",
"None",
",",
"force",
"=",
"False",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'result'",
":",
"None",
",",
"'comment'",
":",
"''",
",",
"'changes'",
":",
"{",
"}",
... | Ensure that the given package is not cached.
If no package is specified, this ensures the entire cache is cleared.
name
The name of the package to remove from the cache, or None for all packages
user
The user to run NPM with
force
Force cleaning of cache. Required for npm@5 ... | [
"Ensure",
"that",
"the",
"given",
"package",
"is",
"not",
"cached",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/npm.py#L322-L378 | train | Ensure that the given package is not cached. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/splunk_search.py | present | def present(name, profile="splunk", **kwargs):
'''
Ensure a search is present
.. code-block:: yaml
API Error Search:
splunk_search.present:
search: index=main sourcetype=blah
template: alert_5min
The following parameters are required:
name
This i... | python | def present(name, profile="splunk", **kwargs):
'''
Ensure a search is present
.. code-block:: yaml
API Error Search:
splunk_search.present:
search: index=main sourcetype=blah
template: alert_5min
The following parameters are required:
name
This i... | [
"def",
"present",
"(",
"name",
",",
"profile",
"=",
"\"splunk\"",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":",
"{",
"}",
",",
"'result'",
":",
"None",
",",
"'comment'",
":",
"''",
"}",
"target",
... | Ensure a search is present
.. code-block:: yaml
API Error Search:
splunk_search.present:
search: index=main sourcetype=blah
template: alert_5min
The following parameters are required:
name
This is the name of the search in splunk | [
"Ensure",
"a",
"search",
"is",
"present"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/splunk_search.py#L26-L87 | train | Ensure a node is present in the system. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/splunk_search.py | absent | def absent(name, profile="splunk"):
'''
Ensure a search is absent
.. code-block:: yaml
API Error Search:
splunk_search.absent
The following parameters are required:
name
This is the name of the search in splunk
'''
ret = {
'name': name,
'changes'... | python | def absent(name, profile="splunk"):
'''
Ensure a search is absent
.. code-block:: yaml
API Error Search:
splunk_search.absent
The following parameters are required:
name
This is the name of the search in splunk
'''
ret = {
'name': name,
'changes'... | [
"def",
"absent",
"(",
"name",
",",
"profile",
"=",
"\"splunk\"",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":",
"{",
"}",
",",
"'result'",
":",
"True",
",",
"'comment'",
":",
"'{0} is absent.'",
".",
"format",
"(",
"name",
"... | Ensure a search is absent
.. code-block:: yaml
API Error Search:
splunk_search.absent
The following parameters are required:
name
This is the name of the search in splunk | [
"Ensure",
"a",
"search",
"is",
"absent"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/splunk_search.py#L90-L126 | train | Ensure a node is absent in the search | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/modjk.py | _bulk_state | def _bulk_state(saltfunc, lbn, workers, profile):
'''
Generic function for bulk worker operation
'''
ret = {'name': lbn,
'result': True,
'changes': {},
'comment': ''}
if not isinstance(workers, list):
ret['result'] = False
ret['comment'] = 'workers s... | python | def _bulk_state(saltfunc, lbn, workers, profile):
'''
Generic function for bulk worker operation
'''
ret = {'name': lbn,
'result': True,
'changes': {},
'comment': ''}
if not isinstance(workers, list):
ret['result'] = False
ret['comment'] = 'workers s... | [
"def",
"_bulk_state",
"(",
"saltfunc",
",",
"lbn",
",",
"workers",
",",
"profile",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"lbn",
",",
"'result'",
":",
"True",
",",
"'changes'",
":",
"{",
"}",
",",
"'comment'",
":",
"''",
"}",
"if",
"not",
"isins... | Generic function for bulk worker operation | [
"Generic",
"function",
"for",
"bulk",
"worker",
"operation"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/modjk.py#L24-L64 | train | Generic function for bulk worker operation
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/states/modjk.py | worker_stopped | def worker_stopped(name, workers=None, profile='default'):
'''
Stop all the workers in the modjk load balancer
Example:
.. code-block:: yaml
loadbalancer:
modjk.worker_stopped:
- workers:
- app1
- app2
'''
if workers is None:
w... | python | def worker_stopped(name, workers=None, profile='default'):
'''
Stop all the workers in the modjk load balancer
Example:
.. code-block:: yaml
loadbalancer:
modjk.worker_stopped:
- workers:
- app1
- app2
'''
if workers is None:
w... | [
"def",
"worker_stopped",
"(",
"name",
",",
"workers",
"=",
"None",
",",
"profile",
"=",
"'default'",
")",
":",
"if",
"workers",
"is",
"None",
":",
"workers",
"=",
"[",
"]",
"return",
"_bulk_state",
"(",
"'modjk.bulk_stop'",
",",
"name",
",",
"workers",
"... | Stop all the workers in the modjk load balancer
Example:
.. code-block:: yaml
loadbalancer:
modjk.worker_stopped:
- workers:
- app1
- app2 | [
"Stop",
"all",
"the",
"workers",
"in",
"the",
"modjk",
"load",
"balancer"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/modjk.py#L67-L85 | train | Stop all the workers in the modjk load balancer | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/modjk.py | worker_activated | def worker_activated(name, workers=None, profile='default'):
'''
Activate all the workers in the modjk load balancer
Example:
.. code-block:: yaml
loadbalancer:
modjk.worker_activated:
- workers:
- app1
- app2
'''
if workers is None:
... | python | def worker_activated(name, workers=None, profile='default'):
'''
Activate all the workers in the modjk load balancer
Example:
.. code-block:: yaml
loadbalancer:
modjk.worker_activated:
- workers:
- app1
- app2
'''
if workers is None:
... | [
"def",
"worker_activated",
"(",
"name",
",",
"workers",
"=",
"None",
",",
"profile",
"=",
"'default'",
")",
":",
"if",
"workers",
"is",
"None",
":",
"workers",
"=",
"[",
"]",
"return",
"_bulk_state",
"(",
"'modjk.bulk_activate'",
",",
"name",
",",
"workers... | Activate all the workers in the modjk load balancer
Example:
.. code-block:: yaml
loadbalancer:
modjk.worker_activated:
- workers:
- app1
- app2 | [
"Activate",
"all",
"the",
"workers",
"in",
"the",
"modjk",
"load",
"balancer"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/modjk.py#L88-L106 | train | Activate all the workers in the modjk load balancer | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/modjk.py | worker_disabled | def worker_disabled(name, workers=None, profile='default'):
'''
Disable all the workers in the modjk load balancer
Example:
.. code-block:: yaml
loadbalancer:
modjk.worker_disabled:
- workers:
- app1
- app2
'''
if workers is None:
... | python | def worker_disabled(name, workers=None, profile='default'):
'''
Disable all the workers in the modjk load balancer
Example:
.. code-block:: yaml
loadbalancer:
modjk.worker_disabled:
- workers:
- app1
- app2
'''
if workers is None:
... | [
"def",
"worker_disabled",
"(",
"name",
",",
"workers",
"=",
"None",
",",
"profile",
"=",
"'default'",
")",
":",
"if",
"workers",
"is",
"None",
":",
"workers",
"=",
"[",
"]",
"return",
"_bulk_state",
"(",
"'modjk.bulk_disable'",
",",
"name",
",",
"workers",... | Disable all the workers in the modjk load balancer
Example:
.. code-block:: yaml
loadbalancer:
modjk.worker_disabled:
- workers:
- app1
- app2 | [
"Disable",
"all",
"the",
"workers",
"in",
"the",
"modjk",
"load",
"balancer"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/modjk.py#L109-L127 | train | Disable all the workers in the modjk load balancer | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/modjk.py | worker_recover | def worker_recover(name, workers=None, profile='default'):
'''
Recover all the workers in the modjk load balancer
Example:
.. code-block:: yaml
loadbalancer:
modjk.worker_recover:
- workers:
- app1
- app2
'''
if workers is None:
... | python | def worker_recover(name, workers=None, profile='default'):
'''
Recover all the workers in the modjk load balancer
Example:
.. code-block:: yaml
loadbalancer:
modjk.worker_recover:
- workers:
- app1
- app2
'''
if workers is None:
... | [
"def",
"worker_recover",
"(",
"name",
",",
"workers",
"=",
"None",
",",
"profile",
"=",
"'default'",
")",
":",
"if",
"workers",
"is",
"None",
":",
"workers",
"=",
"[",
"]",
"return",
"_bulk_state",
"(",
"'modjk.bulk_recover'",
",",
"name",
",",
"workers",
... | Recover all the workers in the modjk load balancer
Example:
.. code-block:: yaml
loadbalancer:
modjk.worker_recover:
- workers:
- app1
- app2 | [
"Recover",
"all",
"the",
"workers",
"in",
"the",
"modjk",
"load",
"balancer"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/modjk.py#L130-L148 | train | Recover all the workers in the modjk load balancer | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/firewalld.py | _parse_forward | def _parse_forward(mapping):
'''
Parses a port forwarding statement in the form used by this state:
from_port:to_port:protocol[:destination]
and returns a ForwardingMapping object
'''
if len(mapping.split(':')) > 3:
(srcport, destport, protocol, destaddr) = mapping.split(':')
else:... | python | def _parse_forward(mapping):
'''
Parses a port forwarding statement in the form used by this state:
from_port:to_port:protocol[:destination]
and returns a ForwardingMapping object
'''
if len(mapping.split(':')) > 3:
(srcport, destport, protocol, destaddr) = mapping.split(':')
else:... | [
"def",
"_parse_forward",
"(",
"mapping",
")",
":",
"if",
"len",
"(",
"mapping",
".",
"split",
"(",
"':'",
")",
")",
">",
"3",
":",
"(",
"srcport",
",",
"destport",
",",
"protocol",
",",
"destaddr",
")",
"=",
"mapping",
".",
"split",
"(",
"':'",
")"... | Parses a port forwarding statement in the form used by this state:
from_port:to_port:protocol[:destination]
and returns a ForwardingMapping object | [
"Parses",
"a",
"port",
"forwarding",
"statement",
"in",
"the",
"form",
"used",
"by",
"this",
"state",
":"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/firewalld.py#L129-L142 | train | Parses a port forwarding statement in the form used by this state from_port to_port protocol and destination addresses. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/firewalld.py | present | def present(name,
block_icmp=None,
prune_block_icmp=False,
default=None,
masquerade=False,
ports=None,
prune_ports=False,
port_fwd=None,
prune_port_fwd=False,
services=None,
prune_services=False,
... | python | def present(name,
block_icmp=None,
prune_block_icmp=False,
default=None,
masquerade=False,
ports=None,
prune_ports=False,
port_fwd=None,
prune_port_fwd=False,
services=None,
prune_services=False,
... | [
"def",
"present",
"(",
"name",
",",
"block_icmp",
"=",
"None",
",",
"prune_block_icmp",
"=",
"False",
",",
"default",
"=",
"None",
",",
"masquerade",
"=",
"False",
",",
"ports",
"=",
"None",
",",
"prune_ports",
"=",
"False",
",",
"port_fwd",
"=",
"None",... | Ensure a zone has specific attributes.
name
The zone to modify.
default : None
Set this zone as the default zone if ``True``.
masquerade : False
Enable or disable masquerade for a zone.
block_icmp : None
List of ICMP types to block in the zone.
prune_block_icmp :... | [
"Ensure",
"a",
"zone",
"has",
"specific",
"attributes",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/firewalld.py#L155-L236 | train | Ensure a zone is present in the specified 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/states/firewalld.py | service | def service(name,
ports=None,
protocols=None):
'''
Ensure the service exists and encompasses the specified ports and
protocols.
.. versionadded:: 2016.11.0
'''
ret = {'name': name,
'result': False,
'changes': {},
'comment': ''}
if na... | python | def service(name,
ports=None,
protocols=None):
'''
Ensure the service exists and encompasses the specified ports and
protocols.
.. versionadded:: 2016.11.0
'''
ret = {'name': name,
'result': False,
'changes': {},
'comment': ''}
if na... | [
"def",
"service",
"(",
"name",
",",
"ports",
"=",
"None",
",",
"protocols",
"=",
"None",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'result'",
":",
"False",
",",
"'changes'",
":",
"{",
"}",
",",
"'comment'",
":",
"''",
"}",
"if",
"na... | Ensure the service exists and encompasses the specified ports and
protocols.
.. versionadded:: 2016.11.0 | [
"Ensure",
"the",
"service",
"exists",
"and",
"encompasses",
"the",
"specified",
"ports",
"and",
"protocols",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/firewalld.py#L239-L335 | train | Ensure the named service exists and encompasses the specified ports and protocols. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/firewalld.py | _present | def _present(name,
block_icmp=None,
prune_block_icmp=False,
default=None,
masquerade=False,
ports=None,
prune_ports=False,
port_fwd=None,
prune_port_fwd=False,
services=None,
# TODO: prune_services=Fa... | python | def _present(name,
block_icmp=None,
prune_block_icmp=False,
default=None,
masquerade=False,
ports=None,
prune_ports=False,
port_fwd=None,
prune_port_fwd=False,
services=None,
# TODO: prune_services=Fa... | [
"def",
"_present",
"(",
"name",
",",
"block_icmp",
"=",
"None",
",",
"prune_block_icmp",
"=",
"False",
",",
"default",
"=",
"None",
",",
"masquerade",
"=",
"False",
",",
"ports",
"=",
"None",
",",
"prune_ports",
"=",
"False",
",",
"port_fwd",
"=",
"None"... | Ensure a zone has specific attributes. | [
"Ensure",
"a",
"zone",
"has",
"specific",
"attributes",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/firewalld.py#L338-L766 | train | Ensure a zone is present in the cluster | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/firewalld.py | ForwardingMapping.todict | def todict(self):
'''
Returns a pretty dictionary meant for command line output.
'''
return {
'Source port': self.srcport,
'Destination port': self.destport,
'Protocol': self.protocol,
'Destination address': self.destaddr} | python | def todict(self):
'''
Returns a pretty dictionary meant for command line output.
'''
return {
'Source port': self.srcport,
'Destination port': self.destport,
'Protocol': self.protocol,
'Destination address': self.destaddr} | [
"def",
"todict",
"(",
"self",
")",
":",
"return",
"{",
"'Source port'",
":",
"self",
".",
"srcport",
",",
"'Destination port'",
":",
"self",
".",
"destport",
",",
"'Protocol'",
":",
"self",
".",
"protocol",
",",
"'Destination address'",
":",
"self",
".",
"... | Returns a pretty dictionary meant for command line output. | [
"Returns",
"a",
"pretty",
"dictionary",
"meant",
"for",
"command",
"line",
"output",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/firewalld.py#L118-L126 | train | Returns a pretty dictionary meant for command line output. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/jenkinsmod.py | _connect | def _connect():
'''
Return server object used to interact with Jenkins.
:return: server object used to interact with Jenkins
'''
jenkins_url = __salt__['config.get']('jenkins.url') or \
__salt__['config.get']('jenkins:url') or \
__salt__['pillar.get']('jenkins.url')
jenkins_use... | python | def _connect():
'''
Return server object used to interact with Jenkins.
:return: server object used to interact with Jenkins
'''
jenkins_url = __salt__['config.get']('jenkins.url') or \
__salt__['config.get']('jenkins:url') or \
__salt__['pillar.get']('jenkins.url')
jenkins_use... | [
"def",
"_connect",
"(",
")",
":",
"jenkins_url",
"=",
"__salt__",
"[",
"'config.get'",
"]",
"(",
"'jenkins.url'",
")",
"or",
"__salt__",
"[",
"'config.get'",
"]",
"(",
"'jenkins:url'",
")",
"or",
"__salt__",
"[",
"'pillar.get'",
"]",
"(",
"'jenkins.url'",
")... | Return server object used to interact with Jenkins.
:return: server object used to interact with Jenkins | [
"Return",
"server",
"object",
"used",
"to",
"interact",
"with",
"Jenkins",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/jenkinsmod.py#L69-L92 | train | Connect to Jenkins and return the server object used to interact with Jenkins. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/jenkinsmod.py | _retrieve_config_xml | def _retrieve_config_xml(config_xml, saltenv):
'''
Helper to cache the config XML and raise a CommandExecutionError if we fail
to do so. If we successfully cache the file, return the cached path.
'''
ret = __salt__['cp.cache_file'](config_xml, saltenv)
if not ret:
raise CommandExecution... | python | def _retrieve_config_xml(config_xml, saltenv):
'''
Helper to cache the config XML and raise a CommandExecutionError if we fail
to do so. If we successfully cache the file, return the cached path.
'''
ret = __salt__['cp.cache_file'](config_xml, saltenv)
if not ret:
raise CommandExecution... | [
"def",
"_retrieve_config_xml",
"(",
"config_xml",
",",
"saltenv",
")",
":",
"ret",
"=",
"__salt__",
"[",
"'cp.cache_file'",
"]",
"(",
"config_xml",
",",
"saltenv",
")",
"if",
"not",
"ret",
":",
"raise",
"CommandExecutionError",
"(",
"'Failed to retrieve {0}'",
"... | Helper to cache the config XML and raise a CommandExecutionError if we fail
to do so. If we successfully cache the file, return the cached path. | [
"Helper",
"to",
"cache",
"the",
"config",
"XML",
"and",
"raise",
"a",
"CommandExecutionError",
"if",
"we",
"fail",
"to",
"do",
"so",
".",
"If",
"we",
"successfully",
"cache",
"the",
"file",
"return",
"the",
"cached",
"path",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/jenkinsmod.py#L95-L105 | train | Helper to retrieve the config XML from the salt 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/modules/jenkinsmod.py | job_exists | def job_exists(name=None):
'''
Check whether the job exists in configured Jenkins jobs.
:param name: The name of the job is check if it exists.
:return: True if job exists, False if job does not exist.
CLI Example:
.. code-block:: bash
salt '*' jenkins.job_exists jobname
'''
... | python | def job_exists(name=None):
'''
Check whether the job exists in configured Jenkins jobs.
:param name: The name of the job is check if it exists.
:return: True if job exists, False if job does not exist.
CLI Example:
.. code-block:: bash
salt '*' jenkins.job_exists jobname
'''
... | [
"def",
"job_exists",
"(",
"name",
"=",
"None",
")",
":",
"if",
"not",
"name",
":",
"raise",
"SaltInvocationError",
"(",
"'Required parameter \\'name\\' is missing'",
")",
"server",
"=",
"_connect",
"(",
")",
"if",
"server",
".",
"job_exists",
"(",
"name",
")",... | Check whether the job exists in configured Jenkins jobs.
:param name: The name of the job is check if it exists.
:return: True if job exists, False if job does not exist.
CLI Example:
.. code-block:: bash
salt '*' jenkins.job_exists jobname | [
"Check",
"whether",
"the",
"job",
"exists",
"in",
"configured",
"Jenkins",
"jobs",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/jenkinsmod.py#L170-L191 | train | Check whether the job exists in Jenkins jobs. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/jenkinsmod.py | get_job_info | def get_job_info(name=None):
'''
Return information about the Jenkins job.
:param name: The name of the job is check if it exists.
:return: Information about the Jenkins job.
CLI Example:
.. code-block:: bash
salt '*' jenkins.get_job_info jobname
'''
if not name:
rai... | python | def get_job_info(name=None):
'''
Return information about the Jenkins job.
:param name: The name of the job is check if it exists.
:return: Information about the Jenkins job.
CLI Example:
.. code-block:: bash
salt '*' jenkins.get_job_info jobname
'''
if not name:
rai... | [
"def",
"get_job_info",
"(",
"name",
"=",
"None",
")",
":",
"if",
"not",
"name",
":",
"raise",
"SaltInvocationError",
"(",
"'Required parameter \\'name\\' is missing'",
")",
"server",
"=",
"_connect",
"(",
")",
"if",
"not",
"job_exists",
"(",
"name",
")",
":",
... | Return information about the Jenkins job.
:param name: The name of the job is check if it exists.
:return: Information about the Jenkins job.
CLI Example:
.. code-block:: bash
salt '*' jenkins.get_job_info jobname | [
"Return",
"information",
"about",
"the",
"Jenkins",
"job",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/jenkinsmod.py#L194-L219 | train | Return information about the Jenkins job. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/jenkinsmod.py | build_job | def build_job(name=None, parameters=None):
'''
Initiate a build for the provided job.
:param name: The name of the job is check if it exists.
:param parameters: Parameters to send to the job.
:return: True is successful, otherwise raise an exception.
CLI Example:
.. code-block:: bash
... | python | def build_job(name=None, parameters=None):
'''
Initiate a build for the provided job.
:param name: The name of the job is check if it exists.
:param parameters: Parameters to send to the job.
:return: True is successful, otherwise raise an exception.
CLI Example:
.. code-block:: bash
... | [
"def",
"build_job",
"(",
"name",
"=",
"None",
",",
"parameters",
"=",
"None",
")",
":",
"if",
"not",
"name",
":",
"raise",
"SaltInvocationError",
"(",
"'Required parameter \\'name\\' is missing'",
")",
"server",
"=",
"_connect",
"(",
")",
"if",
"not",
"job_exi... | Initiate a build for the provided job.
:param name: The name of the job is check if it exists.
:param parameters: Parameters to send to the job.
:return: True is successful, otherwise raise an exception.
CLI Example:
.. code-block:: bash
salt '*' jenkins.build_job jobname | [
"Initiate",
"a",
"build",
"for",
"the",
"provided",
"job",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/jenkinsmod.py#L222-L251 | train | Initiate a build for the provided job. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/jenkinsmod.py | create_job | def create_job(name=None,
config_xml=None,
saltenv='base'):
'''
Return the configuration file.
:param name: The name of the job is check if it exists.
:param config_xml: The configuration file to use to create the job.
:param saltenv: The environment to look for the fi... | python | def create_job(name=None,
config_xml=None,
saltenv='base'):
'''
Return the configuration file.
:param name: The name of the job is check if it exists.
:param config_xml: The configuration file to use to create the job.
:param saltenv: The environment to look for the fi... | [
"def",
"create_job",
"(",
"name",
"=",
"None",
",",
"config_xml",
"=",
"None",
",",
"saltenv",
"=",
"'base'",
")",
":",
"if",
"not",
"name",
":",
"raise",
"SaltInvocationError",
"(",
"'Required parameter \\'name\\' is missing'",
")",
"if",
"job_exists",
"(",
"... | Return the configuration file.
:param name: The name of the job is check if it exists.
:param config_xml: The configuration file to use to create the job.
:param saltenv: The environment to look for the file in.
:return: The configuration file used for the job.
CLI Example:
.. code-block:: ba... | [
"Return",
"the",
"configuration",
"file",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/jenkinsmod.py#L254-L295 | train | Create a new job in the Jenkins 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/modules/jenkinsmod.py | delete_job | def delete_job(name=None):
'''
Return true is job is deleted successfully.
:param name: The name of the job to delete.
:return: Return true if job is deleted successfully.
CLI Example:
.. code-block:: bash
salt '*' jenkins.delete_job jobname
'''
if not name:
raise Sa... | python | def delete_job(name=None):
'''
Return true is job is deleted successfully.
:param name: The name of the job to delete.
:return: Return true if job is deleted successfully.
CLI Example:
.. code-block:: bash
salt '*' jenkins.delete_job jobname
'''
if not name:
raise Sa... | [
"def",
"delete_job",
"(",
"name",
"=",
"None",
")",
":",
"if",
"not",
"name",
":",
"raise",
"SaltInvocationError",
"(",
"'Required parameter \\'name\\' is missing'",
")",
"server",
"=",
"_connect",
"(",
")",
"if",
"not",
"job_exists",
"(",
"name",
")",
":",
... | Return true is job is deleted successfully.
:param name: The name of the job to delete.
:return: Return true if job is deleted successfully.
CLI Example:
.. code-block:: bash
salt '*' jenkins.delete_job jobname | [
"Return",
"true",
"is",
"job",
"is",
"deleted",
"successfully",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/jenkinsmod.py#L339-L367 | train | Delete a job from the Jenkins 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/modules/jenkinsmod.py | job_status | def job_status(name=None):
'''
Return the current status, enabled or disabled, of the job.
:param name: The name of the job to return status for
:return: Return true if enabled or false if disabled.
CLI Example:
.. code-block:: bash
salt '*' jenkins.job_status jobname
'''
i... | python | def job_status(name=None):
'''
Return the current status, enabled or disabled, of the job.
:param name: The name of the job to return status for
:return: Return true if enabled or false if disabled.
CLI Example:
.. code-block:: bash
salt '*' jenkins.job_status jobname
'''
i... | [
"def",
"job_status",
"(",
"name",
"=",
"None",
")",
":",
"if",
"not",
"name",
":",
"raise",
"SaltInvocationError",
"(",
"'Required parameter \\'name\\' is missing'",
")",
"server",
"=",
"_connect",
"(",
")",
"if",
"not",
"job_exists",
"(",
"name",
")",
":",
... | Return the current status, enabled or disabled, of the job.
:param name: The name of the job to return status for
:return: Return true if enabled or false if disabled.
CLI Example:
.. code-block:: bash
salt '*' jenkins.job_status jobname | [
"Return",
"the",
"current",
"status",
"enabled",
"or",
"disabled",
"of",
"the",
"job",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/jenkinsmod.py#L433-L456 | train | Return the current status of a job. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/jenkinsmod.py | get_job_config | def get_job_config(name=None):
'''
Return the current job configuration for the provided job.
:param name: The name of the job to return the configuration for.
:return: The configuration for the job specified.
CLI Example:
.. code-block:: bash
salt '*' jenkins.get_job_config jobname
... | python | def get_job_config(name=None):
'''
Return the current job configuration for the provided job.
:param name: The name of the job to return the configuration for.
:return: The configuration for the job specified.
CLI Example:
.. code-block:: bash
salt '*' jenkins.get_job_config jobname
... | [
"def",
"get_job_config",
"(",
"name",
"=",
"None",
")",
":",
"if",
"not",
"name",
":",
"raise",
"SaltInvocationError",
"(",
"'Required parameter \\'name\\' is missing'",
")",
"server",
"=",
"_connect",
"(",
")",
"if",
"not",
"job_exists",
"(",
"name",
")",
":"... | Return the current job configuration for the provided job.
:param name: The name of the job to return the configuration for.
:return: The configuration for the job specified.
CLI Example:
.. code-block:: bash
salt '*' jenkins.get_job_config jobname | [
"Return",
"the",
"current",
"job",
"configuration",
"for",
"the",
"provided",
"job",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/jenkinsmod.py#L459-L483 | train | Return the current job configuration for the specified job. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/jenkinsmod.py | plugin_installed | def plugin_installed(name):
'''
.. versionadded:: 2016.11.0
Return if the plugin is installed for the provided plugin name.
:param name: The name of the parameter to confirm installation.
:return: True if plugin exists, False if plugin does not exist.
CLI Example:
.. code-block:: bash
... | python | def plugin_installed(name):
'''
.. versionadded:: 2016.11.0
Return if the plugin is installed for the provided plugin name.
:param name: The name of the parameter to confirm installation.
:return: True if plugin exists, False if plugin does not exist.
CLI Example:
.. code-block:: bash
... | [
"def",
"plugin_installed",
"(",
"name",
")",
":",
"server",
"=",
"_connect",
"(",
")",
"plugins",
"=",
"server",
".",
"get_plugins",
"(",
")",
"exists",
"=",
"[",
"plugin",
"for",
"plugin",
"in",
"plugins",
".",
"keys",
"(",
")",
"if",
"name",
"in",
... | .. versionadded:: 2016.11.0
Return if the plugin is installed for the provided plugin name.
:param name: The name of the parameter to confirm installation.
:return: True if plugin exists, False if plugin does not exist.
CLI Example:
.. code-block:: bash
salt '*' jenkins.plugin_installed... | [
"..",
"versionadded",
"::",
"2016",
".",
"11",
".",
"0"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/jenkinsmod.py#L486-L511 | train | Checks if the plugin is installed for the provided plugin name. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
saltstack/salt | salt/modules/azurearm_dns.py | record_set_create_or_update | def record_set_create_or_update(name, zone_name, resource_group, record_type, **kwargs):
'''
.. versionadded:: Fluorine
Creates or updates a record set within a DNS zone.
:param name: The name of the record set, relative to the name of the zone.
:param zone_name: The name of the DNS zone (without... | python | def record_set_create_or_update(name, zone_name, resource_group, record_type, **kwargs):
'''
.. versionadded:: Fluorine
Creates or updates a record set within a DNS zone.
:param name: The name of the record set, relative to the name of the zone.
:param zone_name: The name of the DNS zone (without... | [
"def",
"record_set_create_or_update",
"(",
"name",
",",
"zone_name",
",",
"resource_group",
",",
"record_type",
",",
"*",
"*",
"kwargs",
")",
":",
"dnsconn",
"=",
"__utils__",
"[",
"'azurearm.get_client'",
"]",
"(",
"'dns'",
",",
"*",
"*",
"kwargs",
")",
"tr... | .. versionadded:: Fluorine
Creates or updates a record set within a DNS zone.
:param name: The name of the record set, relative to the name of the zone.
:param zone_name: The name of the DNS zone (without a terminating dot).
:param resource_group: The name of the resource group.
:param record_t... | [
"..",
"versionadded",
"::",
"Fluorine"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/azurearm_dns.py#L81-L130 | train | Creates or updates a record set within a DNS zone. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,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/azurearm_dns.py | record_set_delete | def record_set_delete(name, zone_name, resource_group, record_type, **kwargs):
'''
.. versionadded:: Fluorine
Deletes a record set from a DNS zone. This operation cannot be undone.
:param name: The name of the record set, relative to the name of the zone.
:param zone_name: The name of the DNS zon... | python | def record_set_delete(name, zone_name, resource_group, record_type, **kwargs):
'''
.. versionadded:: Fluorine
Deletes a record set from a DNS zone. This operation cannot be undone.
:param name: The name of the record set, relative to the name of the zone.
:param zone_name: The name of the DNS zon... | [
"def",
"record_set_delete",
"(",
"name",
",",
"zone_name",
",",
"resource_group",
",",
"record_type",
",",
"*",
"*",
"kwargs",
")",
":",
"result",
"=",
"False",
"dnsconn",
"=",
"__utils__",
"[",
"'azurearm.get_client'",
"]",
"(",
"'dns'",
",",
"*",
"*",
"k... | .. versionadded:: Fluorine
Deletes a record set from a DNS zone. This operation cannot be undone.
:param name: The name of the record set, relative to the name of the zone.
:param zone_name: The name of the DNS zone (without a terminating dot).
:param resource_group: The name of the resource group.
... | [
"..",
"versionadded",
"::",
"Fluorine"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/azurearm_dns.py#L133-L170 | train | Delete a record set from a DNS zone. | Pu7Z6IJCgH3a,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.