id
int32
0
252k
repo
stringlengths
7
55
path
stringlengths
4
127
func_name
stringlengths
1
88
original_string
stringlengths
75
19.8k
language
stringclasses
1 value
code
stringlengths
75
19.8k
code_tokens
list
docstring
stringlengths
3
17.3k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
87
242
34,600
saltstack/salt
salt/cloud/clouds/gce.py
_expand_node
def _expand_node(node): ''' Convert the libcloud Node object into something more serializable. ''' ret = {} ret.update(node.__dict__) try: del ret['extra']['boot_disk'] except Exception: # pylint: disable=W0703 pass zone = ret['extra']['zone'] ret['extra']['zone'] = ...
python
def _expand_node(node): ''' Convert the libcloud Node object into something more serializable. ''' ret = {} ret.update(node.__dict__) try: del ret['extra']['boot_disk'] except Exception: # pylint: disable=W0703 pass zone = ret['extra']['zone'] ret['extra']['zone'] = ...
[ "def", "_expand_node", "(", "node", ")", ":", "ret", "=", "{", "}", "ret", ".", "update", "(", "node", ".", "__dict__", ")", "try", ":", "del", "ret", "[", "'extra'", "]", "[", "'boot_disk'", "]", "except", "Exception", ":", "# pylint: disable=W0703", ...
Convert the libcloud Node object into something more serializable.
[ "Convert", "the", "libcloud", "Node", "object", "into", "something", "more", "serializable", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L213-L233
34,601
saltstack/salt
salt/cloud/clouds/gce.py
_expand_disk
def _expand_disk(disk): ''' Convert the libcloud Volume object into something more serializable. ''' ret = {} ret.update(disk.__dict__) zone = ret['extra']['zone'] ret['extra']['zone'] = {} ret['extra']['zone'].update(zone.__dict__) return ret
python
def _expand_disk(disk): ''' Convert the libcloud Volume object into something more serializable. ''' ret = {} ret.update(disk.__dict__) zone = ret['extra']['zone'] ret['extra']['zone'] = {} ret['extra']['zone'].update(zone.__dict__) return ret
[ "def", "_expand_disk", "(", "disk", ")", ":", "ret", "=", "{", "}", "ret", ".", "update", "(", "disk", ".", "__dict__", ")", "zone", "=", "ret", "[", "'extra'", "]", "[", "'zone'", "]", "ret", "[", "'extra'", "]", "[", "'zone'", "]", "=", "{", ...
Convert the libcloud Volume object into something more serializable.
[ "Convert", "the", "libcloud", "Volume", "object", "into", "something", "more", "serializable", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L236-L245
34,602
saltstack/salt
salt/cloud/clouds/gce.py
_expand_address
def _expand_address(addy): ''' Convert the libcloud GCEAddress object into something more serializable. ''' ret = {} ret.update(addy.__dict__) ret['extra']['zone'] = addy.region.name return ret
python
def _expand_address(addy): ''' Convert the libcloud GCEAddress object into something more serializable. ''' ret = {} ret.update(addy.__dict__) ret['extra']['zone'] = addy.region.name return ret
[ "def", "_expand_address", "(", "addy", ")", ":", "ret", "=", "{", "}", "ret", ".", "update", "(", "addy", ".", "__dict__", ")", "ret", "[", "'extra'", "]", "[", "'zone'", "]", "=", "addy", ".", "region", ".", "name", "return", "ret" ]
Convert the libcloud GCEAddress object into something more serializable.
[ "Convert", "the", "libcloud", "GCEAddress", "object", "into", "something", "more", "serializable", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L248-L255
34,603
saltstack/salt
salt/cloud/clouds/gce.py
_expand_balancer
def _expand_balancer(lb): ''' Convert the libcloud load-balancer object into something more serializable. ''' ret = {} ret.update(lb.__dict__) hc = ret['extra']['healthchecks'] ret['extra']['healthchecks'] = [] for item in hc: ret['extra']['healthchecks'].append(_expand_item(item...
python
def _expand_balancer(lb): ''' Convert the libcloud load-balancer object into something more serializable. ''' ret = {} ret.update(lb.__dict__) hc = ret['extra']['healthchecks'] ret['extra']['healthchecks'] = [] for item in hc: ret['extra']['healthchecks'].append(_expand_item(item...
[ "def", "_expand_balancer", "(", "lb", ")", ":", "ret", "=", "{", "}", "ret", ".", "update", "(", "lb", ".", "__dict__", ")", "hc", "=", "ret", "[", "'extra'", "]", "[", "'healthchecks'", "]", "ret", "[", "'extra'", "]", "[", "'healthchecks'", "]", ...
Convert the libcloud load-balancer object into something more serializable.
[ "Convert", "the", "libcloud", "load", "-", "balancer", "object", "into", "something", "more", "serializable", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L264-L301
34,604
saltstack/salt
salt/cloud/clouds/gce.py
show_instance
def show_instance(vm_name, call=None): ''' Show the details of the existing instance. ''' if call != 'action': raise SaltCloudSystemExit( 'The show_instance action must be called with -a or --action.' ) conn = get_conn() node = _expand_node(conn.ex_get_node(vm_name)) ...
python
def show_instance(vm_name, call=None): ''' Show the details of the existing instance. ''' if call != 'action': raise SaltCloudSystemExit( 'The show_instance action must be called with -a or --action.' ) conn = get_conn() node = _expand_node(conn.ex_get_node(vm_name)) ...
[ "def", "show_instance", "(", "vm_name", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'action'", ":", "raise", "SaltCloudSystemExit", "(", "'The show_instance action must be called with -a or --action.'", ")", "conn", "=", "get_conn", "(", ")", "node", ...
Show the details of the existing instance.
[ "Show", "the", "details", "of", "the", "existing", "instance", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L304-L315
34,605
saltstack/salt
salt/cloud/clouds/gce.py
avail_images
def avail_images(conn=None): ''' Return a dict of all available VM images on the cloud provider with relevant data. Note that for GCE, there are custom images within the project, but the generic images are in other projects. This returns a dict of images in the project plus images in well-know...
python
def avail_images(conn=None): ''' Return a dict of all available VM images on the cloud provider with relevant data. Note that for GCE, there are custom images within the project, but the generic images are in other projects. This returns a dict of images in the project plus images in well-know...
[ "def", "avail_images", "(", "conn", "=", "None", ")", ":", "if", "not", "conn", ":", "conn", "=", "get_conn", "(", ")", "all_images", "=", "[", "]", "# The list of public image projects can be found via:", "# % gcloud compute images list", "# and looking at the \"PROJ...
Return a dict of all available VM images on the cloud provider with relevant data. Note that for GCE, there are custom images within the project, but the generic images are in other projects. This returns a dict of images in the project plus images in well-known public projects that provide supported ...
[ "Return", "a", "dict", "of", "all", "available", "VM", "images", "on", "the", "cloud", "provider", "with", "relevant", "data", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L337-L376
34,606
saltstack/salt
salt/cloud/clouds/gce.py
__get_image
def __get_image(conn, vm_): ''' The get_image for GCE allows partial name matching and returns a libcloud object. ''' img = config.get_cloud_config_value( 'image', vm_, __opts__, default='debian-7', search_global=False) return conn.ex_get_image(img)
python
def __get_image(conn, vm_): ''' The get_image for GCE allows partial name matching and returns a libcloud object. ''' img = config.get_cloud_config_value( 'image', vm_, __opts__, default='debian-7', search_global=False) return conn.ex_get_image(img)
[ "def", "__get_image", "(", "conn", ",", "vm_", ")", ":", "img", "=", "config", ".", "get_cloud_config_value", "(", "'image'", ",", "vm_", ",", "__opts__", ",", "default", "=", "'debian-7'", ",", "search_global", "=", "False", ")", "return", "conn", ".", ...
The get_image for GCE allows partial name matching and returns a libcloud object.
[ "The", "get_image", "for", "GCE", "allows", "partial", "name", "matching", "and", "returns", "a", "libcloud", "object", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L379-L386
34,607
saltstack/salt
salt/cloud/clouds/gce.py
__get_location
def __get_location(conn, vm_): ''' Need to override libcloud to find the zone. ''' location = config.get_cloud_config_value( 'location', vm_, __opts__) return conn.ex_get_zone(location)
python
def __get_location(conn, vm_): ''' Need to override libcloud to find the zone. ''' location = config.get_cloud_config_value( 'location', vm_, __opts__) return conn.ex_get_zone(location)
[ "def", "__get_location", "(", "conn", ",", "vm_", ")", ":", "location", "=", "config", ".", "get_cloud_config_value", "(", "'location'", ",", "vm_", ",", "__opts__", ")", "return", "conn", ".", "ex_get_zone", "(", "location", ")" ]
Need to override libcloud to find the zone.
[ "Need", "to", "override", "libcloud", "to", "find", "the", "zone", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L389-L395
34,608
saltstack/salt
salt/cloud/clouds/gce.py
__get_size
def __get_size(conn, vm_): ''' Need to override libcloud to find the machine type in the proper zone. ''' size = config.get_cloud_config_value( 'size', vm_, __opts__, default='n1-standard-1', search_global=False) return conn.ex_get_size(size, __get_location(conn, vm_))
python
def __get_size(conn, vm_): ''' Need to override libcloud to find the machine type in the proper zone. ''' size = config.get_cloud_config_value( 'size', vm_, __opts__, default='n1-standard-1', search_global=False) return conn.ex_get_size(size, __get_location(conn, vm_))
[ "def", "__get_size", "(", "conn", ",", "vm_", ")", ":", "size", "=", "config", ".", "get_cloud_config_value", "(", "'size'", ",", "vm_", ",", "__opts__", ",", "default", "=", "'n1-standard-1'", ",", "search_global", "=", "False", ")", "return", "conn", "."...
Need to override libcloud to find the machine type in the proper zone.
[ "Need", "to", "override", "libcloud", "to", "find", "the", "machine", "type", "in", "the", "proper", "zone", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L398-L404
34,609
saltstack/salt
salt/cloud/clouds/gce.py
__get_tags
def __get_tags(vm_): ''' Get configured tags. ''' t = config.get_cloud_config_value( 'tags', vm_, __opts__, default='[]', search_global=False) # Consider warning the user that the tags in the cloud profile # could not be interpreted, bad formatting? try: tags = litera...
python
def __get_tags(vm_): ''' Get configured tags. ''' t = config.get_cloud_config_value( 'tags', vm_, __opts__, default='[]', search_global=False) # Consider warning the user that the tags in the cloud profile # could not be interpreted, bad formatting? try: tags = litera...
[ "def", "__get_tags", "(", "vm_", ")", ":", "t", "=", "config", ".", "get_cloud_config_value", "(", "'tags'", ",", "vm_", ",", "__opts__", ",", "default", "=", "'[]'", ",", "search_global", "=", "False", ")", "# Consider warning the user that the tags in the cloud ...
Get configured tags.
[ "Get", "configured", "tags", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L407-L422
34,610
saltstack/salt
salt/cloud/clouds/gce.py
__get_metadata
def __get_metadata(vm_): ''' Get configured metadata and add 'salt-cloud-profile'. ''' md = config.get_cloud_config_value( 'metadata', vm_, __opts__, default='{}', search_global=False) # Consider warning the user that the metadata in the cloud profile # could not be interpreted, ...
python
def __get_metadata(vm_): ''' Get configured metadata and add 'salt-cloud-profile'. ''' md = config.get_cloud_config_value( 'metadata', vm_, __opts__, default='{}', search_global=False) # Consider warning the user that the metadata in the cloud profile # could not be interpreted, ...
[ "def", "__get_metadata", "(", "vm_", ")", ":", "md", "=", "config", ".", "get_cloud_config_value", "(", "'metadata'", ",", "vm_", ",", "__opts__", ",", "default", "=", "'{}'", ",", "search_global", "=", "False", ")", "# Consider warning the user that the metadata ...
Get configured metadata and add 'salt-cloud-profile'.
[ "Get", "configured", "metadata", "and", "add", "salt", "-", "cloud", "-", "profile", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L425-L449
34,611
saltstack/salt
salt/cloud/clouds/gce.py
__get_host
def __get_host(node, vm_): ''' Return public IP, private IP, or hostname for the libcloud 'node' object ''' if __get_ssh_interface(vm_) == 'private_ips' or vm_['external_ip'] is None: ip_address = node.private_ips[0] log.info('Salt node data. Private_ip: %s', ip_address) else: ...
python
def __get_host(node, vm_): ''' Return public IP, private IP, or hostname for the libcloud 'node' object ''' if __get_ssh_interface(vm_) == 'private_ips' or vm_['external_ip'] is None: ip_address = node.private_ips[0] log.info('Salt node data. Private_ip: %s', ip_address) else: ...
[ "def", "__get_host", "(", "node", ",", "vm_", ")", ":", "if", "__get_ssh_interface", "(", "vm_", ")", "==", "'private_ips'", "or", "vm_", "[", "'external_ip'", "]", "is", "None", ":", "ip_address", "=", "node", ".", "private_ips", "[", "0", "]", "log", ...
Return public IP, private IP, or hostname for the libcloud 'node' object
[ "Return", "public", "IP", "private", "IP", "or", "hostname", "for", "the", "libcloud", "node", "object" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L452-L466
34,612
saltstack/salt
salt/cloud/clouds/gce.py
__get_network
def __get_network(conn, vm_): ''' Return a GCE libcloud network object with matching name ''' network = config.get_cloud_config_value( 'network', vm_, __opts__, default='default', search_global=False) return conn.ex_get_network(network)
python
def __get_network(conn, vm_): ''' Return a GCE libcloud network object with matching name ''' network = config.get_cloud_config_value( 'network', vm_, __opts__, default='default', search_global=False) return conn.ex_get_network(network)
[ "def", "__get_network", "(", "conn", ",", "vm_", ")", ":", "network", "=", "config", ".", "get_cloud_config_value", "(", "'network'", ",", "vm_", ",", "__opts__", ",", "default", "=", "'default'", ",", "search_global", "=", "False", ")", "return", "conn", ...
Return a GCE libcloud network object with matching name
[ "Return", "a", "GCE", "libcloud", "network", "object", "with", "matching", "name" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L469-L476
34,613
saltstack/salt
salt/cloud/clouds/gce.py
__get_subnetwork
def __get_subnetwork(vm_): ''' Get configured subnetwork. ''' ex_subnetwork = config.get_cloud_config_value( 'subnetwork', vm_, __opts__, search_global=False) return ex_subnetwork
python
def __get_subnetwork(vm_): ''' Get configured subnetwork. ''' ex_subnetwork = config.get_cloud_config_value( 'subnetwork', vm_, __opts__, search_global=False) return ex_subnetwork
[ "def", "__get_subnetwork", "(", "vm_", ")", ":", "ex_subnetwork", "=", "config", ".", "get_cloud_config_value", "(", "'subnetwork'", ",", "vm_", ",", "__opts__", ",", "search_global", "=", "False", ")", "return", "ex_subnetwork" ]
Get configured subnetwork.
[ "Get", "configured", "subnetwork", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L479-L487
34,614
saltstack/salt
salt/cloud/clouds/gce.py
__get_region
def __get_region(conn, vm_): ''' Return a GCE libcloud region object with matching name. ''' location = __get_location(conn, vm_) region = '-'.join(location.name.split('-')[:2]) return conn.ex_get_region(region)
python
def __get_region(conn, vm_): ''' Return a GCE libcloud region object with matching name. ''' location = __get_location(conn, vm_) region = '-'.join(location.name.split('-')[:2]) return conn.ex_get_region(region)
[ "def", "__get_region", "(", "conn", ",", "vm_", ")", ":", "location", "=", "__get_location", "(", "conn", ",", "vm_", ")", "region", "=", "'-'", ".", "join", "(", "location", ".", "name", ".", "split", "(", "'-'", ")", "[", ":", "2", "]", ")", "r...
Return a GCE libcloud region object with matching name.
[ "Return", "a", "GCE", "libcloud", "region", "object", "with", "matching", "name", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L490-L497
34,615
saltstack/salt
salt/cloud/clouds/gce.py
__create_orget_address
def __create_orget_address(conn, name, region): ''' Reuse or create a static IP address. Returns a native GCEAddress construct to use with libcloud. ''' try: addy = conn.ex_get_address(name, region) except ResourceNotFoundError: # pylint: disable=W0703 addr_kwargs = { ...
python
def __create_orget_address(conn, name, region): ''' Reuse or create a static IP address. Returns a native GCEAddress construct to use with libcloud. ''' try: addy = conn.ex_get_address(name, region) except ResourceNotFoundError: # pylint: disable=W0703 addr_kwargs = { ...
[ "def", "__create_orget_address", "(", "conn", ",", "name", ",", "region", ")", ":", "try", ":", "addy", "=", "conn", ".", "ex_get_address", "(", "name", ",", "region", ")", "except", "ResourceNotFoundError", ":", "# pylint: disable=W0703", "addr_kwargs", "=", ...
Reuse or create a static IP address. Returns a native GCEAddress construct to use with libcloud.
[ "Reuse", "or", "create", "a", "static", "IP", "address", ".", "Returns", "a", "native", "GCEAddress", "construct", "to", "use", "with", "libcloud", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L511-L526
34,616
saltstack/salt
salt/cloud/clouds/gce.py
_parse_allow
def _parse_allow(allow): ''' Convert firewall rule allowed user-string to specified REST API format. ''' # input=> tcp:53,tcp:80,tcp:443,icmp,tcp:4201,udp:53 # output<= [ # {"IPProtocol": "tcp", "ports": ["53","80","443","4201"]}, # {"IPProtocol": "icmp"}, # {"IPProtocol": "u...
python
def _parse_allow(allow): ''' Convert firewall rule allowed user-string to specified REST API format. ''' # input=> tcp:53,tcp:80,tcp:443,icmp,tcp:4201,udp:53 # output<= [ # {"IPProtocol": "tcp", "ports": ["53","80","443","4201"]}, # {"IPProtocol": "icmp"}, # {"IPProtocol": "u...
[ "def", "_parse_allow", "(", "allow", ")", ":", "# input=> tcp:53,tcp:80,tcp:443,icmp,tcp:4201,udp:53", "# output<= [", "# {\"IPProtocol\": \"tcp\", \"ports\": [\"53\",\"80\",\"443\",\"4201\"]},", "# {\"IPProtocol\": \"icmp\"},", "# {\"IPProtocol\": \"udp\", \"ports\": [\"53\"]},", ...
Convert firewall rule allowed user-string to specified REST API format.
[ "Convert", "firewall", "rule", "allowed", "user", "-", "string", "to", "specified", "REST", "API", "format", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L529-L563
34,617
saltstack/salt
salt/cloud/clouds/gce.py
__get_ssh_credentials
def __get_ssh_credentials(vm_): ''' Get configured SSH credentials. ''' ssh_user = config.get_cloud_config_value( 'ssh_username', vm_, __opts__, default=os.getenv('USER')) ssh_key = config.get_cloud_config_value( 'ssh_keyfile', vm_, __opts__, default=os.path.expanduser('~/.ss...
python
def __get_ssh_credentials(vm_): ''' Get configured SSH credentials. ''' ssh_user = config.get_cloud_config_value( 'ssh_username', vm_, __opts__, default=os.getenv('USER')) ssh_key = config.get_cloud_config_value( 'ssh_keyfile', vm_, __opts__, default=os.path.expanduser('~/.ss...
[ "def", "__get_ssh_credentials", "(", "vm_", ")", ":", "ssh_user", "=", "config", ".", "get_cloud_config_value", "(", "'ssh_username'", ",", "vm_", ",", "__opts__", ",", "default", "=", "os", ".", "getenv", "(", "'USER'", ")", ")", "ssh_key", "=", "config", ...
Get configured SSH credentials.
[ "Get", "configured", "SSH", "credentials", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L566-L575
34,618
saltstack/salt
salt/cloud/clouds/gce.py
delete_network
def delete_network(kwargs=None, call=None): ''' Permanently delete a network. CLI Example: .. code-block:: bash salt-cloud -f delete_network gce name=mynet ''' if call != 'function': raise SaltCloudSystemExit( 'The delete_network function must be called with -f or ...
python
def delete_network(kwargs=None, call=None): ''' Permanently delete a network. CLI Example: .. code-block:: bash salt-cloud -f delete_network gce name=mynet ''' if call != 'function': raise SaltCloudSystemExit( 'The delete_network function must be called with -f or ...
[ "def", "delete_network", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The delete_network function must be called with -f or --function.'", ")", "if", "not", "kwargs", "o...
Permanently delete a network. CLI Example: .. code-block:: bash salt-cloud -f delete_network gce name=mynet
[ "Permanently", "delete", "a", "network", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L645-L701
34,619
saltstack/salt
salt/cloud/clouds/gce.py
show_network
def show_network(kwargs=None, call=None): ''' Show the details of an existing network. CLI Example: .. code-block:: bash salt-cloud -f show_network gce name=mynet ''' if call != 'function': raise SaltCloudSystemExit( 'The show_network function must be called with -...
python
def show_network(kwargs=None, call=None): ''' Show the details of an existing network. CLI Example: .. code-block:: bash salt-cloud -f show_network gce name=mynet ''' if call != 'function': raise SaltCloudSystemExit( 'The show_network function must be called with -...
[ "def", "show_network", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The show_network function must be called with -f or --function.'", ")", "if", "not", "kwargs", "or", ...
Show the details of an existing network. CLI Example: .. code-block:: bash salt-cloud -f show_network gce name=mynet
[ "Show", "the", "details", "of", "an", "existing", "network", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L704-L725
34,620
saltstack/salt
salt/cloud/clouds/gce.py
create_fwrule
def create_fwrule(kwargs=None, call=None): ''' Create a GCE firewall rule. The 'default' network is used if not specified. CLI Example: .. code-block:: bash salt-cloud -f create_fwrule gce name=allow-http allow=tcp:80 ''' if call != 'function': raise SaltCloudSystemExit( ...
python
def create_fwrule(kwargs=None, call=None): ''' Create a GCE firewall rule. The 'default' network is used if not specified. CLI Example: .. code-block:: bash salt-cloud -f create_fwrule gce name=allow-http allow=tcp:80 ''' if call != 'function': raise SaltCloudSystemExit( ...
[ "def", "create_fwrule", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The create_fwrule function must be called with -f or --function.'", ")", "if", "not", "kwargs", "or"...
Create a GCE firewall rule. The 'default' network is used if not specified. CLI Example: .. code-block:: bash salt-cloud -f create_fwrule gce name=allow-http allow=tcp:80
[ "Create", "a", "GCE", "firewall", "rule", ".", "The", "default", "network", "is", "used", "if", "not", "specified", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L912-L986
34,621
saltstack/salt
salt/cloud/clouds/gce.py
delete_fwrule
def delete_fwrule(kwargs=None, call=None): ''' Permanently delete a firewall rule. CLI Example: .. code-block:: bash salt-cloud -f delete_fwrule gce name=allow-http ''' if call != 'function': raise SaltCloudSystemExit( 'The delete_fwrule function must be called wit...
python
def delete_fwrule(kwargs=None, call=None): ''' Permanently delete a firewall rule. CLI Example: .. code-block:: bash salt-cloud -f delete_fwrule gce name=allow-http ''' if call != 'function': raise SaltCloudSystemExit( 'The delete_fwrule function must be called wit...
[ "def", "delete_fwrule", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The delete_fwrule function must be called with -f or --function.'", ")", "if", "not", "kwargs", "or"...
Permanently delete a firewall rule. CLI Example: .. code-block:: bash salt-cloud -f delete_fwrule gce name=allow-http
[ "Permanently", "delete", "a", "firewall", "rule", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L989-L1045
34,622
saltstack/salt
salt/cloud/clouds/gce.py
show_fwrule
def show_fwrule(kwargs=None, call=None): ''' Show the details of an existing firewall rule. CLI Example: .. code-block:: bash salt-cloud -f show_fwrule gce name=allow-http ''' if call != 'function': raise SaltCloudSystemExit( 'The show_fwrule function must be calle...
python
def show_fwrule(kwargs=None, call=None): ''' Show the details of an existing firewall rule. CLI Example: .. code-block:: bash salt-cloud -f show_fwrule gce name=allow-http ''' if call != 'function': raise SaltCloudSystemExit( 'The show_fwrule function must be calle...
[ "def", "show_fwrule", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The show_fwrule function must be called with -f or --function.'", ")", "if", "not", "kwargs", "or", ...
Show the details of an existing firewall rule. CLI Example: .. code-block:: bash salt-cloud -f show_fwrule gce name=allow-http
[ "Show", "the", "details", "of", "an", "existing", "firewall", "rule", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L1048-L1069
34,623
saltstack/salt
salt/cloud/clouds/gce.py
create_hc
def create_hc(kwargs=None, call=None): ''' Create an HTTP health check configuration. CLI Example: .. code-block:: bash salt-cloud -f create_hc gce name=hc path=/healthy port=80 ''' if call != 'function': raise SaltCloudSystemExit( 'The create_hc function must be c...
python
def create_hc(kwargs=None, call=None): ''' Create an HTTP health check configuration. CLI Example: .. code-block:: bash salt-cloud -f create_hc gce name=hc path=/healthy port=80 ''' if call != 'function': raise SaltCloudSystemExit( 'The create_hc function must be c...
[ "def", "create_hc", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The create_hc function must be called with -f or --function.'", ")", "if", "not", "kwargs", "or", "'na...
Create an HTTP health check configuration. CLI Example: .. code-block:: bash salt-cloud -f create_hc gce name=hc path=/healthy port=80
[ "Create", "an", "HTTP", "health", "check", "configuration", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L1072-L1145
34,624
saltstack/salt
salt/cloud/clouds/gce.py
delete_hc
def delete_hc(kwargs=None, call=None): ''' Permanently delete a health check. CLI Example: .. code-block:: bash salt-cloud -f delete_hc gce name=hc ''' if call != 'function': raise SaltCloudSystemExit( 'The delete_hc function must be called with -f or --function.' ...
python
def delete_hc(kwargs=None, call=None): ''' Permanently delete a health check. CLI Example: .. code-block:: bash salt-cloud -f delete_hc gce name=hc ''' if call != 'function': raise SaltCloudSystemExit( 'The delete_hc function must be called with -f or --function.' ...
[ "def", "delete_hc", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The delete_hc function must be called with -f or --function.'", ")", "if", "not", "kwargs", "or", "'na...
Permanently delete a health check. CLI Example: .. code-block:: bash salt-cloud -f delete_hc gce name=hc
[ "Permanently", "delete", "a", "health", "check", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L1148-L1204
34,625
saltstack/salt
salt/cloud/clouds/gce.py
show_hc
def show_hc(kwargs=None, call=None): ''' Show the details of an existing health check. CLI Example: .. code-block:: bash salt-cloud -f show_hc gce name=hc ''' if call != 'function': raise SaltCloudSystemExit( 'The show_hc function must be called with -f or --functi...
python
def show_hc(kwargs=None, call=None): ''' Show the details of an existing health check. CLI Example: .. code-block:: bash salt-cloud -f show_hc gce name=hc ''' if call != 'function': raise SaltCloudSystemExit( 'The show_hc function must be called with -f or --functi...
[ "def", "show_hc", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The show_hc function must be called with -f or --function.'", ")", "if", "not", "kwargs", "or", "'name'"...
Show the details of an existing health check. CLI Example: .. code-block:: bash salt-cloud -f show_hc gce name=hc
[ "Show", "the", "details", "of", "an", "existing", "health", "check", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L1207-L1228
34,626
saltstack/salt
salt/cloud/clouds/gce.py
create_address
def create_address(kwargs=None, call=None): ''' Create a static address in a region. CLI Example: .. code-block:: bash salt-cloud -f create_address gce name=my-ip region=us-central1 address=IP ''' if call != 'function': raise SaltCloudSystemExit( 'The create_addres...
python
def create_address(kwargs=None, call=None): ''' Create a static address in a region. CLI Example: .. code-block:: bash salt-cloud -f create_address gce name=my-ip region=us-central1 address=IP ''' if call != 'function': raise SaltCloudSystemExit( 'The create_addres...
[ "def", "create_address", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The create_address function must be called with -f or --function.'", ")", "if", "not", "kwargs", "o...
Create a static address in a region. CLI Example: .. code-block:: bash salt-cloud -f create_address gce name=my-ip region=us-central1 address=IP
[ "Create", "a", "static", "address", "in", "a", "region", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L1231-L1286
34,627
saltstack/salt
salt/cloud/clouds/gce.py
delete_address
def delete_address(kwargs=None, call=None): ''' Permanently delete a static address. CLI Example: .. code-block:: bash salt-cloud -f delete_address gce name=my-ip ''' if call != 'function': raise SaltCloudSystemExit( 'The delete_address function must be called with...
python
def delete_address(kwargs=None, call=None): ''' Permanently delete a static address. CLI Example: .. code-block:: bash salt-cloud -f delete_address gce name=my-ip ''' if call != 'function': raise SaltCloudSystemExit( 'The delete_address function must be called with...
[ "def", "delete_address", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The delete_address function must be called with -f or --function.'", ")", "if", "not", "kwargs", "o...
Permanently delete a static address. CLI Example: .. code-block:: bash salt-cloud -f delete_address gce name=my-ip
[ "Permanently", "delete", "a", "static", "address", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L1289-L1356
34,628
saltstack/salt
salt/cloud/clouds/gce.py
show_address
def show_address(kwargs=None, call=None): ''' Show the details of an existing static address. CLI Example: .. code-block:: bash salt-cloud -f show_address gce name=mysnapshot region=us-central1 ''' if call != 'function': raise SaltCloudSystemExit( 'The show_snapsho...
python
def show_address(kwargs=None, call=None): ''' Show the details of an existing static address. CLI Example: .. code-block:: bash salt-cloud -f show_address gce name=mysnapshot region=us-central1 ''' if call != 'function': raise SaltCloudSystemExit( 'The show_snapsho...
[ "def", "show_address", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The show_snapshot function must be called with -f or --function.'", ")", "if", "not", "kwargs", "or",...
Show the details of an existing static address. CLI Example: .. code-block:: bash salt-cloud -f show_address gce name=mysnapshot region=us-central1
[ "Show", "the", "details", "of", "an", "existing", "static", "address", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L1359-L1386
34,629
saltstack/salt
salt/cloud/clouds/gce.py
create_lb
def create_lb(kwargs=None, call=None): ''' Create a load-balancer configuration. CLI Example: .. code-block:: bash salt-cloud -f create_lb gce name=lb region=us-central1 ports=80 ''' if call != 'function': raise SaltCloudSystemExit( 'The create_lb function must be ...
python
def create_lb(kwargs=None, call=None): ''' Create a load-balancer configuration. CLI Example: .. code-block:: bash salt-cloud -f create_lb gce name=lb region=us-central1 ports=80 ''' if call != 'function': raise SaltCloudSystemExit( 'The create_lb function must be ...
[ "def", "create_lb", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The create_lb function must be called with -f or --function.'", ")", "if", "not", "kwargs", "or", "'na...
Create a load-balancer configuration. CLI Example: .. code-block:: bash salt-cloud -f create_lb gce name=lb region=us-central1 ports=80
[ "Create", "a", "load", "-", "balancer", "configuration", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L1389-L1469
34,630
saltstack/salt
salt/cloud/clouds/gce.py
delete_lb
def delete_lb(kwargs=None, call=None): ''' Permanently delete a load-balancer. CLI Example: .. code-block:: bash salt-cloud -f delete_lb gce name=lb ''' if call != 'function': raise SaltCloudSystemExit( 'The delete_hc function must be called with -f or --function.'...
python
def delete_lb(kwargs=None, call=None): ''' Permanently delete a load-balancer. CLI Example: .. code-block:: bash salt-cloud -f delete_lb gce name=lb ''' if call != 'function': raise SaltCloudSystemExit( 'The delete_hc function must be called with -f or --function.'...
[ "def", "delete_lb", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The delete_hc function must be called with -f or --function.'", ")", "if", "not", "kwargs", "or", "'na...
Permanently delete a load-balancer. CLI Example: .. code-block:: bash salt-cloud -f delete_lb gce name=lb
[ "Permanently", "delete", "a", "load", "-", "balancer", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L1472-L1528
34,631
saltstack/salt
salt/cloud/clouds/gce.py
show_lb
def show_lb(kwargs=None, call=None): ''' Show the details of an existing load-balancer. CLI Example: .. code-block:: bash salt-cloud -f show_lb gce name=lb ''' if call != 'function': raise SaltCloudSystemExit( 'The show_lb function must be called with -f or --funct...
python
def show_lb(kwargs=None, call=None): ''' Show the details of an existing load-balancer. CLI Example: .. code-block:: bash salt-cloud -f show_lb gce name=lb ''' if call != 'function': raise SaltCloudSystemExit( 'The show_lb function must be called with -f or --funct...
[ "def", "show_lb", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The show_lb function must be called with -f or --function.'", ")", "if", "not", "kwargs", "or", "'name'"...
Show the details of an existing load-balancer. CLI Example: .. code-block:: bash salt-cloud -f show_lb gce name=lb
[ "Show", "the", "details", "of", "an", "existing", "load", "-", "balancer", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L1531-L1552
34,632
saltstack/salt
salt/cloud/clouds/gce.py
delete_snapshot
def delete_snapshot(kwargs=None, call=None): ''' Permanently delete a disk snapshot. CLI Example: .. code-block:: bash salt-cloud -f delete_snapshot gce name=disk-snap-1 ''' if call != 'function': raise SaltCloudSystemExit( 'The delete_snapshot function must be cal...
python
def delete_snapshot(kwargs=None, call=None): ''' Permanently delete a disk snapshot. CLI Example: .. code-block:: bash salt-cloud -f delete_snapshot gce name=disk-snap-1 ''' if call != 'function': raise SaltCloudSystemExit( 'The delete_snapshot function must be cal...
[ "def", "delete_snapshot", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The delete_snapshot function must be called with -f or --function.'", ")", "if", "not", "kwargs", ...
Permanently delete a disk snapshot. CLI Example: .. code-block:: bash salt-cloud -f delete_snapshot gce name=disk-snap-1
[ "Permanently", "delete", "a", "disk", "snapshot", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L1675-L1731
34,633
saltstack/salt
salt/cloud/clouds/gce.py
delete_disk
def delete_disk(kwargs=None, call=None): ''' Permanently delete a persistent disk. CLI Example: .. code-block:: bash salt-cloud -f delete_disk gce disk_name=pd ''' if call != 'function': raise SaltCloudSystemExit( 'The delete_disk function must be called with -f or...
python
def delete_disk(kwargs=None, call=None): ''' Permanently delete a persistent disk. CLI Example: .. code-block:: bash salt-cloud -f delete_disk gce disk_name=pd ''' if call != 'function': raise SaltCloudSystemExit( 'The delete_disk function must be called with -f or...
[ "def", "delete_disk", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The delete_disk function must be called with -f or --function.'", ")", "if", "not", "kwargs", "or", ...
Permanently delete a persistent disk. CLI Example: .. code-block:: bash salt-cloud -f delete_disk gce disk_name=pd
[ "Permanently", "delete", "a", "persistent", "disk", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L1734-L1794
34,634
saltstack/salt
salt/cloud/clouds/gce.py
create_snapshot
def create_snapshot(kwargs=None, call=None): ''' Create a new disk snapshot. Must specify `name` and `disk_name`. CLI Example: .. code-block:: bash salt-cloud -f create_snapshot gce name=snap1 disk_name=pd ''' if call != 'function': raise SaltCloudSystemExit( 'The...
python
def create_snapshot(kwargs=None, call=None): ''' Create a new disk snapshot. Must specify `name` and `disk_name`. CLI Example: .. code-block:: bash salt-cloud -f create_snapshot gce name=snap1 disk_name=pd ''' if call != 'function': raise SaltCloudSystemExit( 'The...
[ "def", "create_snapshot", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The create_snapshot function must be called with -f or --function.'", ")", "if", "not", "kwargs", ...
Create a new disk snapshot. Must specify `name` and `disk_name`. CLI Example: .. code-block:: bash salt-cloud -f create_snapshot gce name=snap1 disk_name=pd
[ "Create", "a", "new", "disk", "snapshot", ".", "Must", "specify", "name", "and", "disk_name", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L1883-L1949
34,635
saltstack/salt
salt/cloud/clouds/gce.py
show_disk
def show_disk(name=None, kwargs=None, call=None): # pylint: disable=W0613 ''' Show the details of an existing disk. CLI Example: .. code-block:: bash salt-cloud -a show_disk myinstance disk_name=mydisk salt-cloud -f show_disk gce disk_name=mydisk ''' if not kwargs or 'disk_na...
python
def show_disk(name=None, kwargs=None, call=None): # pylint: disable=W0613 ''' Show the details of an existing disk. CLI Example: .. code-block:: bash salt-cloud -a show_disk myinstance disk_name=mydisk salt-cloud -f show_disk gce disk_name=mydisk ''' if not kwargs or 'disk_na...
[ "def", "show_disk", "(", "name", "=", "None", ",", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "# pylint: disable=W0613", "if", "not", "kwargs", "or", "'disk_name'", "not", "in", "kwargs", ":", "log", ".", "error", "(", "'Must specify disk_n...
Show the details of an existing disk. CLI Example: .. code-block:: bash salt-cloud -a show_disk myinstance disk_name=mydisk salt-cloud -f show_disk gce disk_name=mydisk
[ "Show", "the", "details", "of", "an", "existing", "disk", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L1952-L1970
34,636
saltstack/salt
salt/cloud/clouds/gce.py
show_snapshot
def show_snapshot(kwargs=None, call=None): ''' Show the details of an existing snapshot. CLI Example: .. code-block:: bash salt-cloud -f show_snapshot gce name=mysnapshot ''' if call != 'function': raise SaltCloudSystemExit( 'The show_snapshot function must be call...
python
def show_snapshot(kwargs=None, call=None): ''' Show the details of an existing snapshot. CLI Example: .. code-block:: bash salt-cloud -f show_snapshot gce name=mysnapshot ''' if call != 'function': raise SaltCloudSystemExit( 'The show_snapshot function must be call...
[ "def", "show_snapshot", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'function'", ":", "raise", "SaltCloudSystemExit", "(", "'The show_snapshot function must be called with -f or --function.'", ")", "if", "not", "kwargs", "or"...
Show the details of an existing snapshot. CLI Example: .. code-block:: bash salt-cloud -f show_snapshot gce name=mysnapshot
[ "Show", "the", "details", "of", "an", "existing", "snapshot", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L1973-L1994
34,637
saltstack/salt
salt/cloud/clouds/gce.py
detach_disk
def detach_disk(name=None, kwargs=None, call=None): ''' Detach a disk from an instance. CLI Example: .. code-block:: bash salt-cloud -a detach_disk myinstance disk_name=mydisk ''' if call != 'action': raise SaltCloudSystemExit( 'The detach_Disk action must be calle...
python
def detach_disk(name=None, kwargs=None, call=None): ''' Detach a disk from an instance. CLI Example: .. code-block:: bash salt-cloud -a detach_disk myinstance disk_name=mydisk ''' if call != 'action': raise SaltCloudSystemExit( 'The detach_Disk action must be calle...
[ "def", "detach_disk", "(", "name", "=", "None", ",", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'action'", ":", "raise", "SaltCloudSystemExit", "(", "'The detach_Disk action must be called with -a or --action.'", ")", "if", "...
Detach a disk from an instance. CLI Example: .. code-block:: bash salt-cloud -a detach_disk myinstance disk_name=mydisk
[ "Detach", "a", "disk", "from", "an", "instance", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L1997-L2055
34,638
saltstack/salt
salt/cloud/clouds/gce.py
attach_disk
def attach_disk(name=None, kwargs=None, call=None): ''' Attach an existing disk to an existing instance. CLI Example: .. code-block:: bash salt-cloud -a attach_disk myinstance disk_name=mydisk mode=READ_WRITE ''' if call != 'action': raise SaltCloudSystemExit( 'The...
python
def attach_disk(name=None, kwargs=None, call=None): ''' Attach an existing disk to an existing instance. CLI Example: .. code-block:: bash salt-cloud -a attach_disk myinstance disk_name=mydisk mode=READ_WRITE ''' if call != 'action': raise SaltCloudSystemExit( 'The...
[ "def", "attach_disk", "(", "name", "=", "None", ",", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'action'", ":", "raise", "SaltCloudSystemExit", "(", "'The attach_disk action must be called with -a or --action.'", ")", "if", "...
Attach an existing disk to an existing instance. CLI Example: .. code-block:: bash salt-cloud -a attach_disk myinstance disk_name=mydisk mode=READ_WRITE
[ "Attach", "an", "existing", "disk", "to", "an", "existing", "instance", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L2058-L2134
34,639
saltstack/salt
salt/cloud/clouds/gce.py
reboot
def reboot(vm_name, call=None): ''' Call GCE 'reset' on the instance. CLI Example: .. code-block:: bash salt-cloud -a reboot myinstance ''' if call != 'action': raise SaltCloudSystemExit( 'The reboot action must be called with -a or --action.' ) conn =...
python
def reboot(vm_name, call=None): ''' Call GCE 'reset' on the instance. CLI Example: .. code-block:: bash salt-cloud -a reboot myinstance ''' if call != 'action': raise SaltCloudSystemExit( 'The reboot action must be called with -a or --action.' ) conn =...
[ "def", "reboot", "(", "vm_name", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'action'", ":", "raise", "SaltCloudSystemExit", "(", "'The reboot action must be called with -a or --action.'", ")", "conn", "=", "get_conn", "(", ")", "__utils__", "[", "'...
Call GCE 'reset' on the instance. CLI Example: .. code-block:: bash salt-cloud -a reboot myinstance
[ "Call", "GCE", "reset", "on", "the", "instance", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L2137-L2176
34,640
saltstack/salt
salt/cloud/clouds/gce.py
start
def start(vm_name, call=None): ''' Call GCE 'start on the instance. .. versionadded:: 2017.7.0 CLI Example: .. code-block:: bash salt-cloud -a start myinstance ''' if call != 'action': raise SaltCloudSystemExit( 'The start action must be called with -a or --ac...
python
def start(vm_name, call=None): ''' Call GCE 'start on the instance. .. versionadded:: 2017.7.0 CLI Example: .. code-block:: bash salt-cloud -a start myinstance ''' if call != 'action': raise SaltCloudSystemExit( 'The start action must be called with -a or --ac...
[ "def", "start", "(", "vm_name", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'action'", ":", "raise", "SaltCloudSystemExit", "(", "'The start action must be called with -a or --action.'", ")", "conn", "=", "get_conn", "(", ")", "__utils__", "[", "'cl...
Call GCE 'start on the instance. .. versionadded:: 2017.7.0 CLI Example: .. code-block:: bash salt-cloud -a start myinstance
[ "Call", "GCE", "start", "on", "the", "instance", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L2179-L2220
34,641
saltstack/salt
salt/cloud/clouds/gce.py
stop
def stop(vm_name, call=None): ''' Call GCE 'stop' on the instance. .. versionadded:: 2017.7.0 CLI Example: .. code-block:: bash salt-cloud -a stop myinstance ''' if call != 'action': raise SaltCloudSystemExit( 'The stop action must be called with -a or --actio...
python
def stop(vm_name, call=None): ''' Call GCE 'stop' on the instance. .. versionadded:: 2017.7.0 CLI Example: .. code-block:: bash salt-cloud -a stop myinstance ''' if call != 'action': raise SaltCloudSystemExit( 'The stop action must be called with -a or --actio...
[ "def", "stop", "(", "vm_name", ",", "call", "=", "None", ")", ":", "if", "call", "!=", "'action'", ":", "raise", "SaltCloudSystemExit", "(", "'The stop action must be called with -a or --action.'", ")", "conn", "=", "get_conn", "(", ")", "__utils__", "[", "'clou...
Call GCE 'stop' on the instance. .. versionadded:: 2017.7.0 CLI Example: .. code-block:: bash salt-cloud -a stop myinstance
[ "Call", "GCE", "stop", "on", "the", "instance", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L2223-L2264
34,642
saltstack/salt
salt/cloud/clouds/gce.py
destroy
def destroy(vm_name, call=None): ''' Call 'destroy' on the instance. Can be called with "-a destroy" or -d CLI Example: .. code-block:: bash salt-cloud -a destroy myinstance1 myinstance2 ... salt-cloud -d myinstance1 myinstance2 ... ''' if call and call != 'action': r...
python
def destroy(vm_name, call=None): ''' Call 'destroy' on the instance. Can be called with "-a destroy" or -d CLI Example: .. code-block:: bash salt-cloud -a destroy myinstance1 myinstance2 ... salt-cloud -d myinstance1 myinstance2 ... ''' if call and call != 'action': r...
[ "def", "destroy", "(", "vm_name", ",", "call", "=", "None", ")", ":", "if", "call", "and", "call", "!=", "'action'", ":", "raise", "SaltCloudSystemExit", "(", "'The destroy action must be called with -d or \"-a destroy\".'", ")", "conn", "=", "get_conn", "(", ")",...
Call 'destroy' on the instance. Can be called with "-a destroy" or -d CLI Example: .. code-block:: bash salt-cloud -a destroy myinstance1 myinstance2 ... salt-cloud -d myinstance1 myinstance2 ...
[ "Call", "destroy", "on", "the", "instance", ".", "Can", "be", "called", "with", "-", "a", "destroy", "or", "-", "d" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L2267-L2380
34,643
saltstack/salt
salt/cloud/clouds/gce.py
create
def create(vm_=None, call=None): ''' Create a single GCE instance from a data dict. ''' if call: raise SaltCloudSystemExit( 'You cannot create an instance with -a or -f.' ) node_info = request_instance(vm_) if isinstance(node_info, bool): raise SaltCloudSyste...
python
def create(vm_=None, call=None): ''' Create a single GCE instance from a data dict. ''' if call: raise SaltCloudSystemExit( 'You cannot create an instance with -a or -f.' ) node_info = request_instance(vm_) if isinstance(node_info, bool): raise SaltCloudSyste...
[ "def", "create", "(", "vm_", "=", "None", ",", "call", "=", "None", ")", ":", "if", "call", ":", "raise", "SaltCloudSystemExit", "(", "'You cannot create an instance with -a or -f.'", ")", "node_info", "=", "request_instance", "(", "vm_", ")", "if", "isinstance"...
Create a single GCE instance from a data dict.
[ "Create", "a", "single", "GCE", "instance", "from", "a", "data", "dict", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L2604-L2644
34,644
saltstack/salt
salt/cloud/clouds/gce.py
update_pricing
def update_pricing(kwargs=None, call=None): ''' Download most recent pricing information from GCE and save locally CLI Examples: .. code-block:: bash salt-cloud -f update_pricing my-gce-config .. versionadded:: 2015.8.0 ''' url = 'https://cloudpricingcalculator.appspot.com/static...
python
def update_pricing(kwargs=None, call=None): ''' Download most recent pricing information from GCE and save locally CLI Examples: .. code-block:: bash salt-cloud -f update_pricing my-gce-config .. versionadded:: 2015.8.0 ''' url = 'https://cloudpricingcalculator.appspot.com/static...
[ "def", "update_pricing", "(", "kwargs", "=", "None", ",", "call", "=", "None", ")", ":", "url", "=", "'https://cloudpricingcalculator.appspot.com/static/data/pricelist.json'", "price_json", "=", "salt", ".", "utils", ".", "http", ".", "query", "(", "url", ",", "...
Download most recent pricing information from GCE and save locally CLI Examples: .. code-block:: bash salt-cloud -f update_pricing my-gce-config .. versionadded:: 2015.8.0
[ "Download", "most", "recent", "pricing", "information", "from", "GCE", "and", "save", "locally" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/gce.py#L2647-L2668
34,645
saltstack/salt
salt/engines/http_logstash.py
_logstash
def _logstash(url, data): ''' Issues HTTP queries to the logstash server. ''' result = salt.utils.http.query( url, 'POST', header_dict=_HEADERS, data=salt.utils.json.dumps(data), decode=True, status=True, opts=__opts__ ) return result
python
def _logstash(url, data): ''' Issues HTTP queries to the logstash server. ''' result = salt.utils.http.query( url, 'POST', header_dict=_HEADERS, data=salt.utils.json.dumps(data), decode=True, status=True, opts=__opts__ ) return result
[ "def", "_logstash", "(", "url", ",", "data", ")", ":", "result", "=", "salt", ".", "utils", ".", "http", ".", "query", "(", "url", ",", "'POST'", ",", "header_dict", "=", "_HEADERS", ",", "data", "=", "salt", ".", "utils", ".", "json", ".", "dumps"...
Issues HTTP queries to the logstash server.
[ "Issues", "HTTP", "queries", "to", "the", "logstash", "server", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/http_logstash.py#L57-L70
34,646
saltstack/salt
salt/engines/http_logstash.py
start
def start(url, funs=None, tags=None): ''' Listen to salt events and forward them to logstash. url The Logstash endpoint. funs: ``None`` A list of functions to be compared against, looking into the ``fun`` field from the event data. This option helps to select the events ...
python
def start(url, funs=None, tags=None): ''' Listen to salt events and forward them to logstash. url The Logstash endpoint. funs: ``None`` A list of functions to be compared against, looking into the ``fun`` field from the event data. This option helps to select the events ...
[ "def", "start", "(", "url", ",", "funs", "=", "None", ",", "tags", "=", "None", ")", ":", "if", "__opts__", ".", "get", "(", "'id'", ")", ".", "endswith", "(", "'_master'", ")", ":", "instance", "=", "'master'", "else", ":", "instance", "=", "'mini...
Listen to salt events and forward them to logstash. url The Logstash endpoint. funs: ``None`` A list of functions to be compared against, looking into the ``fun`` field from the event data. This option helps to select the events generated by one or more functions. If an...
[ "Listen", "to", "salt", "events", "and", "forward", "them", "to", "logstash", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/http_logstash.py#L77-L119
34,647
saltstack/salt
salt/states/mysql_grants.py
present
def present(name, grant=None, database=None, user=None, host='localhost', grant_option=False, escape=True, revoke_first=False, ssl_option=False, **connection_args): ''' Ensure that the grant is present wi...
python
def present(name, grant=None, database=None, user=None, host='localhost', grant_option=False, escape=True, revoke_first=False, ssl_option=False, **connection_args): ''' Ensure that the grant is present wi...
[ "def", "present", "(", "name", ",", "grant", "=", "None", ",", "database", "=", "None", ",", "user", "=", "None", ",", "host", "=", "'localhost'", ",", "grant_option", "=", "False", ",", "escape", "=", "True", ",", "revoke_first", "=", "False", ",", ...
Ensure that the grant is present with the specified properties name The name (key) of the grant to add grant The grant priv_type (i.e. select,insert,update OR all privileges) database The database priv_level (i.e. db.tbl OR db.*) user The user to apply the grant to ...
[ "Ensure", "that", "the", "grant", "is", "present", "with", "the", "specified", "properties" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/mysql_grants.py#L70-L203
34,648
saltstack/salt
salt/states/mysql_grants.py
absent
def absent(name, grant=None, database=None, user=None, host='localhost', grant_option=False, escape=True, **connection_args): ''' Ensure that the grant is absent name The name (key) of the grant to add grant T...
python
def absent(name, grant=None, database=None, user=None, host='localhost', grant_option=False, escape=True, **connection_args): ''' Ensure that the grant is absent name The name (key) of the grant to add grant T...
[ "def", "absent", "(", "name", ",", "grant", "=", "None", ",", "database", "=", "None", ",", "user", "=", "None", ",", "host", "=", "'localhost'", ",", "grant_option", "=", "False", ",", "escape", "=", "True", ",", "*", "*", "connection_args", ")", ":...
Ensure that the grant is absent name The name (key) of the grant to add grant The grant priv_type (i.e. select,insert,update OR all privileges) database The database priv_level (i.e. db.tbl OR db.*) user The user to apply the grant to host The network/hos...
[ "Ensure", "that", "the", "grant", "is", "absent" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/mysql_grants.py#L206-L287
34,649
saltstack/salt
salt/modules/cassandra.py
_nodetool
def _nodetool(cmd): ''' Internal cassandra nodetool wrapper. Some functions are not available via pycassa so we must rely on nodetool. ''' nodetool = __salt__['config.option']('cassandra.nodetool') host = __salt__['config.option']('cassandra.host') return __salt__['cmd.run_stdout']('{0} -h {...
python
def _nodetool(cmd): ''' Internal cassandra nodetool wrapper. Some functions are not available via pycassa so we must rely on nodetool. ''' nodetool = __salt__['config.option']('cassandra.nodetool') host = __salt__['config.option']('cassandra.host') return __salt__['cmd.run_stdout']('{0} -h {...
[ "def", "_nodetool", "(", "cmd", ")", ":", "nodetool", "=", "__salt__", "[", "'config.option'", "]", "(", "'cassandra.nodetool'", ")", "host", "=", "__salt__", "[", "'config.option'", "]", "(", "'cassandra.host'", ")", "return", "__salt__", "[", "'cmd.run_stdout'...
Internal cassandra nodetool wrapper. Some functions are not available via pycassa so we must rely on nodetool.
[ "Internal", "cassandra", "nodetool", "wrapper", ".", "Some", "functions", "are", "not", "available", "via", "pycassa", "so", "we", "must", "rely", "on", "nodetool", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/cassandra.py#L44-L51
34,650
saltstack/salt
salt/modules/cassandra.py
_sys_mgr
def _sys_mgr(): ''' Return a pycassa system manager connection object ''' thrift_port = six.text_type(__salt__['config.option']('cassandra.THRIFT_PORT')) host = __salt__['config.option']('cassandra.host') return SystemManager('{0}:{1}'.format(host, thrift_port))
python
def _sys_mgr(): ''' Return a pycassa system manager connection object ''' thrift_port = six.text_type(__salt__['config.option']('cassandra.THRIFT_PORT')) host = __salt__['config.option']('cassandra.host') return SystemManager('{0}:{1}'.format(host, thrift_port))
[ "def", "_sys_mgr", "(", ")", ":", "thrift_port", "=", "six", ".", "text_type", "(", "__salt__", "[", "'config.option'", "]", "(", "'cassandra.THRIFT_PORT'", ")", ")", "host", "=", "__salt__", "[", "'config.option'", "]", "(", "'cassandra.host'", ")", "return",...
Return a pycassa system manager connection object
[ "Return", "a", "pycassa", "system", "manager", "connection", "object" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/cassandra.py#L54-L60
34,651
saltstack/salt
salt/modules/cassandra.py
column_families
def column_families(keyspace=None): ''' Return existing column families for all keyspaces or just the provided one. CLI Example: .. code-block:: bash salt '*' cassandra.column_families salt '*' cassandra.column_families <keyspace> ''' sys = _sys_mgr() ksps = sys.list_k...
python
def column_families(keyspace=None): ''' Return existing column families for all keyspaces or just the provided one. CLI Example: .. code-block:: bash salt '*' cassandra.column_families salt '*' cassandra.column_families <keyspace> ''' sys = _sys_mgr() ksps = sys.list_k...
[ "def", "column_families", "(", "keyspace", "=", "None", ")", ":", "sys", "=", "_sys_mgr", "(", ")", "ksps", "=", "sys", ".", "list_keyspaces", "(", ")", "if", "keyspace", ":", "if", "keyspace", "in", "ksps", ":", "return", "list", "(", "sys", ".", "g...
Return existing column families for all keyspaces or just the provided one. CLI Example: .. code-block:: bash salt '*' cassandra.column_families salt '*' cassandra.column_families <keyspace>
[ "Return", "existing", "column", "families", "for", "all", "keyspaces", "or", "just", "the", "provided", "one", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/cassandra.py#L155-L180
34,652
saltstack/salt
salt/utils/openstack/neutron.py
SaltNeutron.delete_quota
def delete_quota(self, tenant_id): ''' Delete the specified tenant's quota value ''' ret = self.network_conn.delete_quota(tenant_id=tenant_id) return ret if ret else True
python
def delete_quota(self, tenant_id): ''' Delete the specified tenant's quota value ''' ret = self.network_conn.delete_quota(tenant_id=tenant_id) return ret if ret else True
[ "def", "delete_quota", "(", "self", ",", "tenant_id", ")", ":", "ret", "=", "self", ".", "network_conn", ".", "delete_quota", "(", "tenant_id", "=", "tenant_id", ")", "return", "ret", "if", "ret", "else", "True" ]
Delete the specified tenant's quota value
[ "Delete", "the", "specified", "tenant", "s", "quota", "value" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/openstack/neutron.py#L296-L301
34,653
saltstack/salt
salt/utils/openstack/neutron.py
SaltNeutron.delete_port
def delete_port(self, port): ''' Deletes the specified port ''' port_id = self._find_port_id(port) ret = self.network_conn.delete_port(port=port_id) return ret if ret else True
python
def delete_port(self, port): ''' Deletes the specified port ''' port_id = self._find_port_id(port) ret = self.network_conn.delete_port(port=port_id) return ret if ret else True
[ "def", "delete_port", "(", "self", ",", "port", ")", ":", "port_id", "=", "self", ".", "_find_port_id", "(", "port", ")", "ret", "=", "self", ".", "network_conn", ".", "delete_port", "(", "port", "=", "port_id", ")", "return", "ret", "if", "ret", "else...
Deletes the specified port
[ "Deletes", "the", "specified", "port" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/openstack/neutron.py#L343-L349
34,654
saltstack/salt
salt/utils/openstack/neutron.py
SaltNeutron.delete_network
def delete_network(self, network): ''' Deletes the specified network ''' net_id = self._find_network_id(network) ret = self.network_conn.delete_network(network=net_id) return ret if ret else True
python
def delete_network(self, network): ''' Deletes the specified network ''' net_id = self._find_network_id(network) ret = self.network_conn.delete_network(network=net_id) return ret if ret else True
[ "def", "delete_network", "(", "self", ",", "network", ")", ":", "net_id", "=", "self", ".", "_find_network_id", "(", "network", ")", "ret", "=", "self", ".", "network_conn", ".", "delete_network", "(", "network", "=", "net_id", ")", "return", "ret", "if", ...
Deletes the specified network
[ "Deletes", "the", "specified", "network" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/openstack/neutron.py#L391-L397
34,655
saltstack/salt
salt/utils/openstack/neutron.py
SaltNeutron.delete_subnet
def delete_subnet(self, subnet): ''' Deletes the specified subnet ''' subnet_id = self._find_subnet_id(subnet) ret = self.network_conn.delete_subnet(subnet=subnet_id) return ret if ret else True
python
def delete_subnet(self, subnet): ''' Deletes the specified subnet ''' subnet_id = self._find_subnet_id(subnet) ret = self.network_conn.delete_subnet(subnet=subnet_id) return ret if ret else True
[ "def", "delete_subnet", "(", "self", ",", "subnet", ")", ":", "subnet_id", "=", "self", ".", "_find_subnet_id", "(", "subnet", ")", "ret", "=", "self", ".", "network_conn", ".", "delete_subnet", "(", "subnet", "=", "subnet_id", ")", "return", "ret", "if", ...
Deletes the specified subnet
[ "Deletes", "the", "specified", "subnet" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/openstack/neutron.py#L430-L436
34,656
saltstack/salt
salt/utils/openstack/neutron.py
SaltNeutron.delete_router
def delete_router(self, router): ''' Delete the specified router ''' router_id = self._find_router_id(router) ret = self.network_conn.delete_router(router=router_id) return ret if ret else True
python
def delete_router(self, router): ''' Delete the specified router ''' router_id = self._find_router_id(router) ret = self.network_conn.delete_router(router=router_id) return ret if ret else True
[ "def", "delete_router", "(", "self", ",", "router", ")", ":", "router_id", "=", "self", ".", "_find_router_id", "(", "router", ")", "ret", "=", "self", ".", "network_conn", ".", "delete_router", "(", "router", "=", "router_id", ")", "return", "ret", "if", ...
Delete the specified router
[ "Delete", "the", "specified", "router" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/openstack/neutron.py#L481-L487
34,657
saltstack/salt
salt/utils/openstack/neutron.py
SaltNeutron.remove_gateway_router
def remove_gateway_router(self, router): ''' Removes an external network gateway from the specified router ''' router_id = self._find_router_id(router) return self.network_conn.remove_gateway_router(router=router_id)
python
def remove_gateway_router(self, router): ''' Removes an external network gateway from the specified router ''' router_id = self._find_router_id(router) return self.network_conn.remove_gateway_router(router=router_id)
[ "def", "remove_gateway_router", "(", "self", ",", "router", ")", ":", "router_id", "=", "self", ".", "_find_router_id", "(", "router", ")", "return", "self", ".", "network_conn", ".", "remove_gateway_router", "(", "router", "=", "router_id", ")" ]
Removes an external network gateway from the specified router
[ "Removes", "an", "external", "network", "gateway", "from", "the", "specified", "router" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/openstack/neutron.py#L516-L521
34,658
saltstack/salt
salt/utils/openstack/neutron.py
SaltNeutron.create_floatingip
def create_floatingip(self, floating_network, port=None): ''' Creates a new floatingip ''' net_id = self._find_network_id(floating_network) body = {'floating_network_id': net_id} if port: port_id = self._find_port_id(port) body['port_id'] = port_id...
python
def create_floatingip(self, floating_network, port=None): ''' Creates a new floatingip ''' net_id = self._find_network_id(floating_network) body = {'floating_network_id': net_id} if port: port_id = self._find_port_id(port) body['port_id'] = port_id...
[ "def", "create_floatingip", "(", "self", ",", "floating_network", ",", "port", "=", "None", ")", ":", "net_id", "=", "self", ".", "_find_network_id", "(", "floating_network", ")", "body", "=", "{", "'floating_network_id'", ":", "net_id", "}", "if", "port", "...
Creates a new floatingip
[ "Creates", "a", "new", "floatingip" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/openstack/neutron.py#L535-L545
34,659
saltstack/salt
salt/utils/openstack/neutron.py
SaltNeutron.update_floatingip
def update_floatingip(self, floatingip_id, port=None): ''' Updates a floatingip, disassociates the floating ip if port is set to `None` ''' if port is None: body = {'floatingip': {}} else: port_id = self._find_port_id(port) body = {'flo...
python
def update_floatingip(self, floatingip_id, port=None): ''' Updates a floatingip, disassociates the floating ip if port is set to `None` ''' if port is None: body = {'floatingip': {}} else: port_id = self._find_port_id(port) body = {'flo...
[ "def", "update_floatingip", "(", "self", ",", "floatingip_id", ",", "port", "=", "None", ")", ":", "if", "port", "is", "None", ":", "body", "=", "{", "'floatingip'", ":", "{", "}", "}", "else", ":", "port_id", "=", "self", ".", "_find_port_id", "(", ...
Updates a floatingip, disassociates the floating ip if port is set to `None`
[ "Updates", "a", "floatingip", "disassociates", "the", "floating", "ip", "if", "port", "is", "set", "to", "None" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/openstack/neutron.py#L547-L558
34,660
saltstack/salt
salt/utils/openstack/neutron.py
SaltNeutron.delete_floatingip
def delete_floatingip(self, floatingip_id): ''' Deletes the specified floatingip ''' ret = self.network_conn.delete_floatingip(floatingip_id) return ret if ret else True
python
def delete_floatingip(self, floatingip_id): ''' Deletes the specified floatingip ''' ret = self.network_conn.delete_floatingip(floatingip_id) return ret if ret else True
[ "def", "delete_floatingip", "(", "self", ",", "floatingip_id", ")", ":", "ret", "=", "self", ".", "network_conn", ".", "delete_floatingip", "(", "floatingip_id", ")", "return", "ret", "if", "ret", "else", "True" ]
Deletes the specified floatingip
[ "Deletes", "the", "specified", "floatingip" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/openstack/neutron.py#L560-L565
34,661
saltstack/salt
salt/utils/openstack/neutron.py
SaltNeutron.delete_security_group
def delete_security_group(self, sec_grp): ''' Deletes the specified security group ''' sec_grp_id = self._find_security_group_id(sec_grp) ret = self.network_conn.delete_security_group(sec_grp_id) return ret if ret else True
python
def delete_security_group(self, sec_grp): ''' Deletes the specified security group ''' sec_grp_id = self._find_security_group_id(sec_grp) ret = self.network_conn.delete_security_group(sec_grp_id) return ret if ret else True
[ "def", "delete_security_group", "(", "self", ",", "sec_grp", ")", ":", "sec_grp_id", "=", "self", ".", "_find_security_group_id", "(", "sec_grp", ")", "ret", "=", "self", ".", "network_conn", ".", "delete_security_group", "(", "sec_grp_id", ")", "return", "ret",...
Deletes the specified security group
[ "Deletes", "the", "specified", "security", "group" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/openstack/neutron.py#L600-L606
34,662
saltstack/salt
salt/utils/openstack/neutron.py
SaltNeutron.delete_security_group_rule
def delete_security_group_rule(self, sec_grp_rule_id): ''' Deletes the specified security group rule ''' ret = self.network_conn.delete_security_group_rule( security_group_rule=sec_grp_rule_id) return ret if ret else True
python
def delete_security_group_rule(self, sec_grp_rule_id): ''' Deletes the specified security group rule ''' ret = self.network_conn.delete_security_group_rule( security_group_rule=sec_grp_rule_id) return ret if ret else True
[ "def", "delete_security_group_rule", "(", "self", ",", "sec_grp_rule_id", ")", ":", "ret", "=", "self", ".", "network_conn", ".", "delete_security_group_rule", "(", "security_group_rule", "=", "sec_grp_rule_id", ")", "return", "ret", "if", "ret", "else", "True" ]
Deletes the specified security group rule
[ "Deletes", "the", "specified", "security", "group", "rule" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/openstack/neutron.py#L638-L644
34,663
saltstack/salt
salt/utils/openstack/neutron.py
SaltNeutron.delete_vpnservice
def delete_vpnservice(self, vpnservice): ''' Deletes the specified VPN service ''' vpnservice_id = self._find_vpnservice_id(vpnservice) ret = self.network_conn.delete_vpnservice(vpnservice_id) return ret if ret else True
python
def delete_vpnservice(self, vpnservice): ''' Deletes the specified VPN service ''' vpnservice_id = self._find_vpnservice_id(vpnservice) ret = self.network_conn.delete_vpnservice(vpnservice_id) return ret if ret else True
[ "def", "delete_vpnservice", "(", "self", ",", "vpnservice", ")", ":", "vpnservice_id", "=", "self", ".", "_find_vpnservice_id", "(", "vpnservice", ")", "ret", "=", "self", ".", "network_conn", ".", "delete_vpnservice", "(", "vpnservice_id", ")", "return", "ret",...
Deletes the specified VPN service
[ "Deletes", "the", "specified", "VPN", "service" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/openstack/neutron.py#L680-L686
34,664
saltstack/salt
salt/utils/openstack/neutron.py
SaltNeutron.delete_ipsec_site_connection
def delete_ipsec_site_connection(self, ipsec_site_connection): ''' Deletes the specified IPsecSiteConnection ''' ipsec_site_connection_id = self._find_ipsec_site_connection_id( ipsec_site_connection) ret = self.network_conn.delete_ipsec_site_connection( ip...
python
def delete_ipsec_site_connection(self, ipsec_site_connection): ''' Deletes the specified IPsecSiteConnection ''' ipsec_site_connection_id = self._find_ipsec_site_connection_id( ipsec_site_connection) ret = self.network_conn.delete_ipsec_site_connection( ip...
[ "def", "delete_ipsec_site_connection", "(", "self", ",", "ipsec_site_connection", ")", ":", "ipsec_site_connection_id", "=", "self", ".", "_find_ipsec_site_connection_id", "(", "ipsec_site_connection", ")", "ret", "=", "self", ".", "network_conn", ".", "delete_ipsec_site_...
Deletes the specified IPsecSiteConnection
[ "Deletes", "the", "specified", "IPsecSiteConnection" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/openstack/neutron.py#L741-L749
34,665
saltstack/salt
salt/utils/openstack/neutron.py
SaltNeutron.delete_ikepolicy
def delete_ikepolicy(self, ikepolicy): ''' Deletes the specified IKEPolicy ''' ikepolicy_id = self._find_ikepolicy_id(ikepolicy) ret = self.network_conn.delete_ikepolicy(ikepolicy_id) return ret if ret else True
python
def delete_ikepolicy(self, ikepolicy): ''' Deletes the specified IKEPolicy ''' ikepolicy_id = self._find_ikepolicy_id(ikepolicy) ret = self.network_conn.delete_ikepolicy(ikepolicy_id) return ret if ret else True
[ "def", "delete_ikepolicy", "(", "self", ",", "ikepolicy", ")", ":", "ikepolicy_id", "=", "self", ".", "_find_ikepolicy_id", "(", "ikepolicy", ")", "ret", "=", "self", ".", "network_conn", ".", "delete_ikepolicy", "(", "ikepolicy_id", ")", "return", "ret", "if"...
Deletes the specified IKEPolicy
[ "Deletes", "the", "specified", "IKEPolicy" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/openstack/neutron.py#L786-L792
34,666
saltstack/salt
salt/utils/openstack/neutron.py
SaltNeutron.delete_ipsecpolicy
def delete_ipsecpolicy(self, ipseecpolicy): ''' Deletes the specified IPsecPolicy ''' ipseecpolicy_id = self._find_ipsecpolicy_id(ipseecpolicy) ret = self.network_conn.delete_ipsecpolicy(ipseecpolicy_id) return ret if ret else True
python
def delete_ipsecpolicy(self, ipseecpolicy): ''' Deletes the specified IPsecPolicy ''' ipseecpolicy_id = self._find_ipsecpolicy_id(ipseecpolicy) ret = self.network_conn.delete_ipsecpolicy(ipseecpolicy_id) return ret if ret else True
[ "def", "delete_ipsecpolicy", "(", "self", ",", "ipseecpolicy", ")", ":", "ipseecpolicy_id", "=", "self", ".", "_find_ipsecpolicy_id", "(", "ipseecpolicy", ")", "ret", "=", "self", ".", "network_conn", ".", "delete_ipsecpolicy", "(", "ipseecpolicy_id", ")", "return...
Deletes the specified IPsecPolicy
[ "Deletes", "the", "specified", "IPsecPolicy" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/openstack/neutron.py#L829-L835
34,667
saltstack/salt
salt/utils/openstack/neutron.py
SaltNeutron.create_firewall_rule
def create_firewall_rule(self, protocol, action, **kwargs): ''' Create a new firlwall rule ''' body = {'protocol': protocol, 'action': action} if 'tenant_id' in kwargs: body['tenant_id'] = kwargs['tenant_id'] if 'name' in kwargs: body['name'] = kwa...
python
def create_firewall_rule(self, protocol, action, **kwargs): ''' Create a new firlwall rule ''' body = {'protocol': protocol, 'action': action} if 'tenant_id' in kwargs: body['tenant_id'] = kwargs['tenant_id'] if 'name' in kwargs: body['name'] = kwa...
[ "def", "create_firewall_rule", "(", "self", ",", "protocol", ",", "action", ",", "*", "*", "kwargs", ")", ":", "body", "=", "{", "'protocol'", ":", "protocol", ",", "'action'", ":", "action", "}", "if", "'tenant_id'", "in", "kwargs", ":", "body", "[", ...
Create a new firlwall rule
[ "Create", "a", "new", "firlwall", "rule" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/openstack/neutron.py#L849-L870
34,668
saltstack/salt
salt/utils/openstack/neutron.py
SaltNeutron.delete_firewall_rule
def delete_firewall_rule(self, firewall_rule): ''' Deletes the specified firewall rule ''' firewall_rule_id = self._find_firewall_rule_id(firewall_rule) ret = self.network_conn.delete_firewall_rule(firewall_rule_id) return ret if ret else True
python
def delete_firewall_rule(self, firewall_rule): ''' Deletes the specified firewall rule ''' firewall_rule_id = self._find_firewall_rule_id(firewall_rule) ret = self.network_conn.delete_firewall_rule(firewall_rule_id) return ret if ret else True
[ "def", "delete_firewall_rule", "(", "self", ",", "firewall_rule", ")", ":", "firewall_rule_id", "=", "self", ".", "_find_firewall_rule_id", "(", "firewall_rule", ")", "ret", "=", "self", ".", "network_conn", ".", "delete_firewall_rule", "(", "firewall_rule_id", ")",...
Deletes the specified firewall rule
[ "Deletes", "the", "specified", "firewall", "rule" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/openstack/neutron.py#L872-L878
34,669
saltstack/salt
salt/modules/chroot.py
exist
def exist(name): ''' Return True if the chroot environment is present. ''' dev = os.path.join(name, 'dev') proc = os.path.join(name, 'proc') return all(os.path.isdir(i) for i in (name, dev, proc))
python
def exist(name): ''' Return True if the chroot environment is present. ''' dev = os.path.join(name, 'dev') proc = os.path.join(name, 'proc') return all(os.path.isdir(i) for i in (name, dev, proc))
[ "def", "exist", "(", "name", ")", ":", "dev", "=", "os", ".", "path", ".", "join", "(", "name", ",", "'dev'", ")", "proc", "=", "os", ".", "path", ".", "join", "(", "name", ",", "'proc'", ")", "return", "all", "(", "os", ".", "path", ".", "is...
Return True if the chroot environment is present.
[ "Return", "True", "if", "the", "chroot", "environment", "is", "present", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/chroot.py#L53-L59
34,670
saltstack/salt
salt/modules/chroot.py
create
def create(name): ''' Create a basic chroot environment. Note that this environment is not functional. The caller needs to install the minimal required binaries, including Python if chroot.call is called. name Path to the chroot environment CLI Example: .. code-block:: bash ...
python
def create(name): ''' Create a basic chroot environment. Note that this environment is not functional. The caller needs to install the minimal required binaries, including Python if chroot.call is called. name Path to the chroot environment CLI Example: .. code-block:: bash ...
[ "def", "create", "(", "name", ")", ":", "if", "not", "exist", "(", "name", ")", ":", "dev", "=", "os", ".", "path", ".", "join", "(", "name", ",", "'dev'", ")", "proc", "=", "os", ".", "path", ".", "join", "(", "name", ",", "'proc'", ")", "tr...
Create a basic chroot environment. Note that this environment is not functional. The caller needs to install the minimal required binaries, including Python if chroot.call is called. name Path to the chroot environment CLI Example: .. code-block:: bash salt myminion chroot.c...
[ "Create", "a", "basic", "chroot", "environment", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/chroot.py#L62-L89
34,671
saltstack/salt
salt/modules/chroot.py
call
def call(name, function, *args, **kwargs): ''' Executes a Salt function inside a chroot environment. The chroot does not need to have Salt installed, but Python is required. name Path to the chroot environment function Salt execution module function CLI Example: .. c...
python
def call(name, function, *args, **kwargs): ''' Executes a Salt function inside a chroot environment. The chroot does not need to have Salt installed, but Python is required. name Path to the chroot environment function Salt execution module function CLI Example: .. c...
[ "def", "call", "(", "name", ",", "function", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "not", "function", ":", "raise", "CommandExecutionError", "(", "'Missing function parameter'", ")", "if", "not", "exist", "(", "name", ")", ":", "rais...
Executes a Salt function inside a chroot environment. The chroot does not need to have Salt installed, but Python is required. name Path to the chroot environment function Salt execution module function CLI Example: .. code-block:: bash salt myminion chroot.call /ch...
[ "Executes", "a", "Salt", "function", "inside", "a", "chroot", "environment", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/chroot.py#L92-L165
34,672
saltstack/salt
salt/fileserver/roots.py
find_file
def find_file(path, saltenv='base', **kwargs): ''' Search the environment for the relative path. ''' if 'env' in kwargs: # "env" is not supported; Use "saltenv". kwargs.pop('env') path = os.path.normpath(path) fnd = {'path': '', 'rel': ''} if os.path.isabs(path): ...
python
def find_file(path, saltenv='base', **kwargs): ''' Search the environment for the relative path. ''' if 'env' in kwargs: # "env" is not supported; Use "saltenv". kwargs.pop('env') path = os.path.normpath(path) fnd = {'path': '', 'rel': ''} if os.path.isabs(path): ...
[ "def", "find_file", "(", "path", ",", "saltenv", "=", "'base'", ",", "*", "*", "kwargs", ")", ":", "if", "'env'", "in", "kwargs", ":", "# \"env\" is not supported; Use \"saltenv\".", "kwargs", ".", "pop", "(", "'env'", ")", "path", "=", "os", ".", "path", ...
Search the environment for the relative path.
[ "Search", "the", "environment", "for", "the", "relative", "path", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/fileserver/roots.py#L40-L106
34,673
saltstack/salt
salt/fileserver/roots.py
symlink_list
def symlink_list(load): ''' Return a dict of all symlinks based on a given path on the Master ''' if 'env' in load: # "env" is not supported; Use "saltenv". load.pop('env') ret = {} if load['saltenv'] not in __opts__['file_roots'] and '__env__' not in __opts__['file_roots']: ...
python
def symlink_list(load): ''' Return a dict of all symlinks based on a given path on the Master ''' if 'env' in load: # "env" is not supported; Use "saltenv". load.pop('env') ret = {} if load['saltenv'] not in __opts__['file_roots'] and '__env__' not in __opts__['file_roots']: ...
[ "def", "symlink_list", "(", "load", ")", ":", "if", "'env'", "in", "load", ":", "# \"env\" is not supported; Use \"saltenv\".", "load", ".", "pop", "(", "'env'", ")", "ret", "=", "{", "}", "if", "load", "[", "'saltenv'", "]", "not", "in", "__opts__", "[", ...
Return a dict of all symlinks based on a given path on the Master
[ "Return", "a", "dict", "of", "all", "symlinks", "based", "on", "a", "given", "path", "on", "the", "Master" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/fileserver/roots.py#L451-L471
34,674
saltstack/salt
salt/beacons/load.py
beacon
def beacon(config): ''' Emit the load averages of this host. Specify thresholds for each load average and only emit a beacon if any of them are exceeded. `onchangeonly`: when `onchangeonly` is True the beacon will fire events only when the load average pass one threshold. Otherwise, it wi...
python
def beacon(config): ''' Emit the load averages of this host. Specify thresholds for each load average and only emit a beacon if any of them are exceeded. `onchangeonly`: when `onchangeonly` is True the beacon will fire events only when the load average pass one threshold. Otherwise, it wi...
[ "def", "beacon", "(", "config", ")", ":", "log", ".", "trace", "(", "'load beacon starting'", ")", "_config", "=", "{", "}", "list", "(", "map", "(", "_config", ".", "update", ",", "config", ")", ")", "# Default config if not present", "if", "'emitatstartup'...
Emit the load averages of this host. Specify thresholds for each load average and only emit a beacon if any of them are exceeded. `onchangeonly`: when `onchangeonly` is True the beacon will fire events only when the load average pass one threshold. Otherwise, it will fire an event at each bea...
[ "Emit", "the", "load", "averages", "of", "this", "host", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/beacons/load.py#L78-L180
34,675
saltstack/salt
salt/modules/lxd.py
config_set
def config_set(key, value): ''' Set an LXD daemon config option CLI Examples: To listen on IPv4 and IPv6 port 8443, you can omit the :8443 its the default: .. code-block:: bash salt '*' lxd.config_set core.https_address [::]:8443 To set the server trust password: .. code-bl...
python
def config_set(key, value): ''' Set an LXD daemon config option CLI Examples: To listen on IPv4 and IPv6 port 8443, you can omit the :8443 its the default: .. code-block:: bash salt '*' lxd.config_set core.https_address [::]:8443 To set the server trust password: .. code-bl...
[ "def", "config_set", "(", "key", ",", "value", ")", ":", "cmd", "=", "'lxc config set \"{0}\" \"{1}\"'", ".", "format", "(", "key", ",", "value", ",", ")", "output", "=", "__salt__", "[", "'cmd.run'", "]", "(", "cmd", ")", "if", "'error:'", "in", "output...
Set an LXD daemon config option CLI Examples: To listen on IPv4 and IPv6 port 8443, you can omit the :8443 its the default: .. code-block:: bash salt '*' lxd.config_set core.https_address [::]:8443 To set the server trust password: .. code-block:: bash salt '*' lxd.config_...
[ "Set", "an", "LXD", "daemon", "config", "option" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L232-L263
34,676
saltstack/salt
salt/modules/lxd.py
config_get
def config_get(key): ''' Get an LXD daemon config option key : The key of the config value to retrieve CLI Examples: .. code-block:: bash salt '*' lxd.config_get core.https_address ''' cmd = 'lxc config get "{0}"'.format( key ) output = __salt__['cmd.run...
python
def config_get(key): ''' Get an LXD daemon config option key : The key of the config value to retrieve CLI Examples: .. code-block:: bash salt '*' lxd.config_get core.https_address ''' cmd = 'lxc config get "{0}"'.format( key ) output = __salt__['cmd.run...
[ "def", "config_get", "(", "key", ")", ":", "cmd", "=", "'lxc config get \"{0}\"'", ".", "format", "(", "key", ")", "output", "=", "__salt__", "[", "'cmd.run'", "]", "(", "cmd", ")", "if", "'error:'", "in", "output", ":", "raise", "CommandExecutionError", "...
Get an LXD daemon config option key : The key of the config value to retrieve CLI Examples: .. code-block:: bash salt '*' lxd.config_get core.https_address
[ "Get", "an", "LXD", "daemon", "config", "option" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L268-L292
34,677
saltstack/salt
salt/modules/lxd.py
pylxd_client_get
def pylxd_client_get(remote_addr=None, cert=None, key=None, verify_cert=True): ''' Get an pyxld client, this is not ment to be runned over the CLI. remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP Address! Examples...
python
def pylxd_client_get(remote_addr=None, cert=None, key=None, verify_cert=True): ''' Get an pyxld client, this is not ment to be runned over the CLI. remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP Address! Examples...
[ "def", "pylxd_client_get", "(", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ")", ":", "pool_key", "=", "'|'", ".", "join", "(", "(", "six", ".", "text_type", "(", "remote_addr", ")", ...
Get an pyxld client, this is not ment to be runned over the CLI. remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP Address! Examples: https://myserver.lan:8443 /var/lib/mysocket.sock cert : ...
[ "Get", "an", "pyxld", "client", "this", "is", "not", "ment", "to", "be", "runned", "over", "the", "CLI", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L298-L399
34,678
saltstack/salt
salt/modules/lxd.py
authenticate
def authenticate(remote_addr, password, cert, key, verify_cert=True): ''' Authenticate with a remote LXDaemon. remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP Address! Examples: https://myserver.lan:84...
python
def authenticate(remote_addr, password, cert, key, verify_cert=True): ''' Authenticate with a remote LXDaemon. remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP Address! Examples: https://myserver.lan:84...
[ "def", "authenticate", "(", "remote_addr", ",", "password", ",", "cert", ",", "key", ",", "verify_cert", "=", "True", ")", ":", "client", "=", "pylxd_client_get", "(", "remote_addr", ",", "cert", ",", "key", ",", "verify_cert", ")", "if", "client", ".", ...
Authenticate with a remote LXDaemon. remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP Address! Examples: https://myserver.lan:8443 password : The password of the remote. cert : PEM For...
[ "Authenticate", "with", "a", "remote", "LXDaemon", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L419-L472
34,679
saltstack/salt
salt/modules/lxd.py
container_create
def container_create(name, source, profiles=None, config=None, devices=None, architecture='x86_64', ephemeral=False, wait=True, remote_addr=None, cert=None, key=None, verify_cert=True, _raw=False): ''' Create a container na...
python
def container_create(name, source, profiles=None, config=None, devices=None, architecture='x86_64', ephemeral=False, wait=True, remote_addr=None, cert=None, key=None, verify_cert=True, _raw=False): ''' Create a container na...
[ "def", "container_create", "(", "name", ",", "source", ",", "profiles", "=", "None", ",", "config", "=", "None", ",", "devices", "=", "None", ",", "architecture", "=", "'x86_64'", ",", "ephemeral", "=", "False", ",", "wait", "=", "True", ",", "remote_add...
Create a container name : The name of the container source : Can be either a string containing an image alias: "xenial/amd64" or an dict with type "image" with alias: {"type": "image", "alias": "xenial/amd64"} or image with "fingerprint":...
[ "Create", "a", "container" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L539-L701
34,680
saltstack/salt
salt/modules/lxd.py
container_get
def container_get(name=None, remote_addr=None, cert=None, key=None, verify_cert=True, _raw=False): ''' Gets a container from the LXD name : The name of the container to get. remote_addr : An URL to a remote Server, you also have to give cert and key if ...
python
def container_get(name=None, remote_addr=None, cert=None, key=None, verify_cert=True, _raw=False): ''' Gets a container from the LXD name : The name of the container to get. remote_addr : An URL to a remote Server, you also have to give cert and key if ...
[ "def", "container_get", "(", "name", "=", "None", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ",", "_raw", "=", "False", ")", ":", "client", "=", "pylxd_client_get", "(", "remote_...
Gets a container from the LXD name : The name of the container to get. remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP Address! Examples: https://myserver.lan:8443 ...
[ "Gets", "a", "container", "from", "the", "LXD" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L704-L761
34,681
saltstack/salt
salt/modules/lxd.py
container_delete
def container_delete(name, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Delete a container name : Name of the container to delete remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its...
python
def container_delete(name, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Delete a container name : Name of the container to delete remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its...
[ "def", "container_delete", "(", "name", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ")", ":", "container", "=", "container_get", "(", "name", ",", "remote_addr", ",", "cert", ",", ...
Delete a container name : Name of the container to delete remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP Address! Examples: https://myserver.lan:8443 /var/lib/mysocket.sock cert ...
[ "Delete", "a", "container" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L764-L801
34,682
saltstack/salt
salt/modules/lxd.py
container_rename
def container_rename(name, newname, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Rename a container name : Name of the container to Rename newname : The new name of the contianer remote_addr : An URL to a remote Server, you also have t...
python
def container_rename(name, newname, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Rename a container name : Name of the container to Rename newname : The new name of the contianer remote_addr : An URL to a remote Server, you also have t...
[ "def", "container_rename", "(", "name", ",", "newname", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ")", ":", "container", "=", "container_get", "(", "name", ",", "remote_addr", ","...
Rename a container name : Name of the container to Rename newname : The new name of the contianer remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP Address! Examples: https://myserver.l...
[ "Rename", "a", "container" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L804-L850
34,683
saltstack/salt
salt/modules/lxd.py
container_state
def container_state(name=None, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Get container state remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP Address! Examples: h...
python
def container_state(name=None, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Get container state remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP Address! Examples: h...
[ "def", "container_state", "(", "name", "=", "None", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ")", ":", "client", "=", "pylxd_client_get", "(", "remote_addr", ",", "cert", ",", ...
Get container state remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP Address! Examples: https://myserver.lan:8443 /var/lib/mysocket.sock cert : PEM Formatted SSL Certificate. E...
[ "Get", "container", "state" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L853-L910
34,684
saltstack/salt
salt/modules/lxd.py
container_stop
def container_stop(name, timeout=30, force=True, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Stop a container name : Name of the container to stop remote_addr : An URL to a remote Server, you also have to give cert and key if you provide rem...
python
def container_stop(name, timeout=30, force=True, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Stop a container name : Name of the container to stop remote_addr : An URL to a remote Server, you also have to give cert and key if you provide rem...
[ "def", "container_stop", "(", "name", ",", "timeout", "=", "30", ",", "force", "=", "True", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ")", ":", "container", "=", "container_get"...
Stop a container name : Name of the container to stop remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP Address! Examples: https://myserver.lan:8443 /var/lib/mysocket.sock cert : ...
[ "Stop", "a", "container" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L953-L990
34,685
saltstack/salt
salt/modules/lxd.py
container_restart
def container_restart(name, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Restart a container name : Name of the container to restart remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and...
python
def container_restart(name, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Restart a container name : Name of the container to restart remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and...
[ "def", "container_restart", "(", "name", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ")", ":", "container", "=", "container_get", "(", "name", ",", "remote_addr", ",", "cert", ",", ...
Restart a container name : Name of the container to restart remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP Address! Examples: https://myserver.lan:8443 /var/lib/mysocket.sock cer...
[ "Restart", "a", "container" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L993-L1030
34,686
saltstack/salt
salt/modules/lxd.py
container_freeze
def container_freeze(name, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Freeze a container name : Name of the container to freeze remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its...
python
def container_freeze(name, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Freeze a container name : Name of the container to freeze remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its...
[ "def", "container_freeze", "(", "name", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ")", ":", "container", "=", "container_get", "(", "name", ",", "remote_addr", ",", "cert", ",", ...
Freeze a container name : Name of the container to freeze remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP Address! Examples: https://myserver.lan:8443 /var/lib/mysocket.sock cert ...
[ "Freeze", "a", "container" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L1033-L1070
34,687
saltstack/salt
salt/modules/lxd.py
container_unfreeze
def container_unfreeze(name, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Unfreeze a container name : Name of the container to unfreeze remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr...
python
def container_unfreeze(name, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Unfreeze a container name : Name of the container to unfreeze remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr...
[ "def", "container_unfreeze", "(", "name", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ")", ":", "container", "=", "container_get", "(", "name", ",", "remote_addr", ",", "cert", ",",...
Unfreeze a container name : Name of the container to unfreeze remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP Address! Examples: https://myserver.lan:8443 /var/lib/mysocket.sock c...
[ "Unfreeze", "a", "container" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L1073-L1110
34,688
saltstack/salt
salt/modules/lxd.py
container_migrate
def container_migrate(name, stop_and_start=False, remote_addr=None, cert=None, key=None, verify_cert=True, src_remote_addr=None, src_cert=None, ...
python
def container_migrate(name, stop_and_start=False, remote_addr=None, cert=None, key=None, verify_cert=True, src_remote_addr=None, src_cert=None, ...
[ "def", "container_migrate", "(", "name", ",", "stop_and_start", "=", "False", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ",", "src_remote_addr", "=", "None", ",", "src_cert", "=", ...
Migrate a container. If the container is running, it either must be shut down first (use stop_and_start=True) or criu must be installed on the source and destination machines. For this operation both certs need to be authenticated, use :mod:`lxd.authenticate <salt.modules.lxd.a...
[ "Migrate", "a", "container", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L1113-L1217
34,689
saltstack/salt
salt/modules/lxd.py
container_config_get
def container_config_get(name, config_key, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Get a container config value name : Name of the container config_key : The config key to retrieve remote_addr : An URL to a remote Server, you ...
python
def container_config_get(name, config_key, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Get a container config value name : Name of the container config_key : The config key to retrieve remote_addr : An URL to a remote Server, you ...
[ "def", "container_config_get", "(", "name", ",", "config_key", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ")", ":", "container", "=", "container_get", "(", "name", ",", "remote_addr"...
Get a container config value name : Name of the container config_key : The config key to retrieve remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP Address! Examples: https://myserver.l...
[ "Get", "a", "container", "config", "value" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L1220-L1259
34,690
saltstack/salt
salt/modules/lxd.py
container_config_set
def container_config_set(name, config_key, config_value, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Set a container config value name : Name of the container config_key : The config key to set config_value : The config value to s...
python
def container_config_set(name, config_key, config_value, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Set a container config value name : Name of the container config_key : The config key to set config_value : The config value to s...
[ "def", "container_config_set", "(", "name", ",", "config_key", ",", "config_value", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ")", ":", "container", "=", "container_get", "(", "name...
Set a container config value name : Name of the container config_key : The config key to set config_value : The config value to set remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP Address! ...
[ "Set", "a", "container", "config", "value" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L1262-L1307
34,691
saltstack/salt
salt/modules/lxd.py
container_config_delete
def container_config_delete(name, config_key, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Delete a container config value name : Name of the container config_key : The config key to delete remote_addr : An URL to a remote Serve...
python
def container_config_delete(name, config_key, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Delete a container config value name : Name of the container config_key : The config key to delete remote_addr : An URL to a remote Serve...
[ "def", "container_config_delete", "(", "name", ",", "config_key", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ")", ":", "container", "=", "container_get", "(", "name", ",", "remote_ad...
Delete a container config value name : Name of the container config_key : The config key to delete remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP Address! Examples: https://myserver....
[ "Delete", "a", "container", "config", "value" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L1310-L1352
34,692
saltstack/salt
salt/modules/lxd.py
container_device_get
def container_device_get(name, device_name, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Get a container device name : Name of the container device_name : The device name to retrieve remote_addr : An URL to a remote Server, you als...
python
def container_device_get(name, device_name, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Get a container device name : Name of the container device_name : The device name to retrieve remote_addr : An URL to a remote Server, you als...
[ "def", "container_device_get", "(", "name", ",", "device_name", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ")", ":", "container", "=", "container_get", "(", "name", ",", "remote_addr...
Get a container device name : Name of the container device_name : The device name to retrieve remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP Address! Examples: https://myserver.lan:8...
[ "Get", "a", "container", "device" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L1355-L1395
34,693
saltstack/salt
salt/modules/lxd.py
container_device_add
def container_device_add(name, device_name, device_type='disk', remote_addr=None, cert=None, key=None, verify_cert=True, **kwargs): ''' Add a container device name : Name of the container device_name : The devic...
python
def container_device_add(name, device_name, device_type='disk', remote_addr=None, cert=None, key=None, verify_cert=True, **kwargs): ''' Add a container device name : Name of the container device_name : The devic...
[ "def", "container_device_add", "(", "name", ",", "device_name", ",", "device_type", "=", "'disk'", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ",", "*", "*", "kwargs", ")", ":", "...
Add a container device name : Name of the container device_name : The device name to add device_type : Type of the device ** kwargs : Additional device args remote_addr : An URL to a remote Server, you also have to give cert and key if you provide...
[ "Add", "a", "container", "device" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L1398-L1449
34,694
saltstack/salt
salt/modules/lxd.py
container_device_delete
def container_device_delete(name, device_name, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Delete a container device name : Name of the container device_name : The device name to delete remote_addr : An URL to a remote Server, ...
python
def container_device_delete(name, device_name, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Delete a container device name : Name of the container device_name : The device name to delete remote_addr : An URL to a remote Server, ...
[ "def", "container_device_delete", "(", "name", ",", "device_name", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ")", ":", "container", "=", "container_get", "(", "name", ",", "remote_a...
Delete a container device name : Name of the container device_name : The device name to delete remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP Address! Examples: https://myserver.lan:...
[ "Delete", "a", "container", "device" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L1452-L1494
34,695
saltstack/salt
salt/modules/lxd.py
container_file_get
def container_file_get(name, src, dst, overwrite=False, mode=None, uid=None, gid=None, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Get a file from a container name : Name of the container src : The source file or directory...
python
def container_file_get(name, src, dst, overwrite=False, mode=None, uid=None, gid=None, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Get a file from a container name : Name of the container src : The source file or directory...
[ "def", "container_file_get", "(", "name", ",", "src", ",", "dst", ",", "overwrite", "=", "False", ",", "mode", "=", "None", ",", "uid", "=", "None", ",", "gid", "=", "None", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "="...
Get a file from a container name : Name of the container src : The source file or directory dst : The destination file or directory mode : Set file mode to octal number uid : Set file uid (owner) gid : Set file gid (group) remote_addr : ...
[ "Get", "a", "file", "from", "a", "container" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L1725-L1833
34,696
saltstack/salt
salt/modules/lxd.py
container_execute
def container_execute(name, cmd, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Execute a command list on a container. name : Name of the container cmd : Command to be executed (as a list) Example : '["ls", "-l"]' remote_ad...
python
def container_execute(name, cmd, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Execute a command list on a container. name : Name of the container cmd : Command to be executed (as a list) Example : '["ls", "-l"]' remote_ad...
[ "def", "container_execute", "(", "name", ",", "cmd", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ")", ":", "container", "=", "container_get", "(", "name", ",", "remote_addr", ",", ...
Execute a command list on a container. name : Name of the container cmd : Command to be executed (as a list) Example : '["ls", "-l"]' remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP A...
[ "Execute", "a", "command", "list", "on", "a", "container", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L1836-L1911
34,697
saltstack/salt
salt/modules/lxd.py
profile_list
def profile_list(list_names=False, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Lists all profiles from the LXD. list_names : Return a list of names instead of full blown dicts. remote_addr : An URL to a remote Server, you also have to giv...
python
def profile_list(list_names=False, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Lists all profiles from the LXD. list_names : Return a list of names instead of full blown dicts. remote_addr : An URL to a remote Server, you also have to giv...
[ "def", "profile_list", "(", "list_names", "=", "False", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ")", ":", "client", "=", "pylxd_client_get", "(", "remote_addr", ",", "cert", ","...
Lists all profiles from the LXD. list_names : Return a list of names instead of full blown dicts. remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP Address! Examples: ht...
[ "Lists", "all", "profiles", "from", "the", "LXD", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L1917-L1964
34,698
saltstack/salt
salt/modules/lxd.py
profile_create
def profile_create(name, config=None, devices=None, description=None, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Creates a profile. name : The name of the profile to get. config : A config dict or None (None = unset)....
python
def profile_create(name, config=None, devices=None, description=None, remote_addr=None, cert=None, key=None, verify_cert=True): ''' Creates a profile. name : The name of the profile to get. config : A config dict or None (None = unset)....
[ "def", "profile_create", "(", "name", ",", "config", "=", "None", ",", "devices", "=", "None", ",", "description", "=", "None", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ")", ...
Creates a profile. name : The name of the profile to get. config : A config dict or None (None = unset). Can also be a list: [{'key': 'boot.autostart', 'value': 1}, {'key': 'security.privileged', 'value': '1'}] devices : ...
[ "Creates", "a", "profile", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L1967-L2040
34,699
saltstack/salt
salt/modules/lxd.py
profile_get
def profile_get(name, remote_addr=None, cert=None, key=None, verify_cert=True, _raw=False): ''' Gets a profile from the LXD name : The name of the profile to get. remote_addr : An URL to a remote Server, you also have to give cert and key if you ...
python
def profile_get(name, remote_addr=None, cert=None, key=None, verify_cert=True, _raw=False): ''' Gets a profile from the LXD name : The name of the profile to get. remote_addr : An URL to a remote Server, you also have to give cert and key if you ...
[ "def", "profile_get", "(", "name", ",", "remote_addr", "=", "None", ",", "cert", "=", "None", ",", "key", "=", "None", ",", "verify_cert", "=", "True", ",", "_raw", "=", "False", ")", ":", "client", "=", "pylxd_client_get", "(", "remote_addr", ",", "ce...
Gets a profile from the LXD name : The name of the profile to get. remote_addr : An URL to a remote Server, you also have to give cert and key if you provide remote_addr and its a TCP Address! Examples: https://myserver.lan:8443 ...
[ "Gets", "a", "profile", "from", "the", "LXD" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/lxd.py#L2043-L2097