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
1,500
softlayer/softlayer-python
SoftLayer/CLI/virt/placementgroup/create_options.py
cli
def cli(env): """List options for creating a placement group.""" manager = PlacementManager(env.client) routers = manager.get_routers() env.fout(get_router_table(routers)) rules = manager.get_all_rules() env.fout(get_rule_table(rules))
python
def cli(env): """List options for creating a placement group.""" manager = PlacementManager(env.client) routers = manager.get_routers() env.fout(get_router_table(routers)) rules = manager.get_all_rules() env.fout(get_rule_table(rules))
[ "def", "cli", "(", "env", ")", ":", "manager", "=", "PlacementManager", "(", "env", ".", "client", ")", "routers", "=", "manager", ".", "get_routers", "(", ")", "env", ".", "fout", "(", "get_router_table", "(", "routers", ")", ")", "rules", "=", "manag...
List options for creating a placement group.
[ "List", "options", "for", "creating", "a", "placement", "group", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/CLI/virt/placementgroup/create_options.py#L13-L21
1,501
softlayer/softlayer-python
SoftLayer/CLI/virt/placementgroup/create_options.py
get_router_table
def get_router_table(routers): """Formats output from _get_routers and returns a table. """ table = formatting.Table(['Datacenter', 'Hostname', 'Backend Router Id'], "Available Routers") for router in routers: datacenter = router['topLevelLocation']['longName'] table.add_row([datacenter, rou...
python
def get_router_table(routers): """Formats output from _get_routers and returns a table. """ table = formatting.Table(['Datacenter', 'Hostname', 'Backend Router Id'], "Available Routers") for router in routers: datacenter = router['topLevelLocation']['longName'] table.add_row([datacenter, rou...
[ "def", "get_router_table", "(", "routers", ")", ":", "table", "=", "formatting", ".", "Table", "(", "[", "'Datacenter'", ",", "'Hostname'", ",", "'Backend Router Id'", "]", ",", "\"Available Routers\"", ")", "for", "router", "in", "routers", ":", "datacenter", ...
Formats output from _get_routers and returns a table.
[ "Formats", "output", "from", "_get_routers", "and", "returns", "a", "table", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/CLI/virt/placementgroup/create_options.py#L24-L30
1,502
softlayer/softlayer-python
SoftLayer/CLI/virt/placementgroup/create_options.py
get_rule_table
def get_rule_table(rules): """Formats output from get_all_rules and returns a table. """ table = formatting.Table(['Id', 'KeyName'], "Rules") for rule in rules: table.add_row([rule['id'], rule['keyName']]) return table
python
def get_rule_table(rules): """Formats output from get_all_rules and returns a table. """ table = formatting.Table(['Id', 'KeyName'], "Rules") for rule in rules: table.add_row([rule['id'], rule['keyName']]) return table
[ "def", "get_rule_table", "(", "rules", ")", ":", "table", "=", "formatting", ".", "Table", "(", "[", "'Id'", ",", "'KeyName'", "]", ",", "\"Rules\"", ")", "for", "rule", "in", "rules", ":", "table", ".", "add_row", "(", "[", "rule", "[", "'id'", "]",...
Formats output from get_all_rules and returns a table.
[ "Formats", "output", "from", "get_all_rules", "and", "returns", "a", "table", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/CLI/virt/placementgroup/create_options.py#L33-L38
1,503
softlayer/softlayer-python
SoftLayer/CLI/virt/detail.py
_cli_helper_dedicated_host
def _cli_helper_dedicated_host(env, result, table): """Get details on dedicated host for a virtual server.""" dedicated_host_id = utils.lookup(result, 'dedicatedHost', 'id') if dedicated_host_id: table.add_row(['dedicated_host_id', dedicated_host_id]) # Try to find name of dedicated host ...
python
def _cli_helper_dedicated_host(env, result, table): """Get details on dedicated host for a virtual server.""" dedicated_host_id = utils.lookup(result, 'dedicatedHost', 'id') if dedicated_host_id: table.add_row(['dedicated_host_id', dedicated_host_id]) # Try to find name of dedicated host ...
[ "def", "_cli_helper_dedicated_host", "(", "env", ",", "result", ",", "table", ")", ":", "dedicated_host_id", "=", "utils", ".", "lookup", "(", "result", ",", "'dedicatedHost'", ",", "'id'", ")", "if", "dedicated_host_id", ":", "table", ".", "add_row", "(", "...
Get details on dedicated host for a virtual server.
[ "Get", "details", "on", "dedicated", "host", "for", "a", "virtual", "server", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/CLI/virt/detail.py#L148-L162
1,504
softlayer/softlayer-python
SoftLayer/CLI/virt/ready.py
cli
def cli(env, identifier, wait): """Check if a virtual server is ready.""" vsi = SoftLayer.VSManager(env.client) vs_id = helpers.resolve_id(vsi.resolve_ids, identifier, 'VS') ready = vsi.wait_for_ready(vs_id, wait) if ready: env.fout("READY") else: raise exceptions.CLIAbort("Inst...
python
def cli(env, identifier, wait): """Check if a virtual server is ready.""" vsi = SoftLayer.VSManager(env.client) vs_id = helpers.resolve_id(vsi.resolve_ids, identifier, 'VS') ready = vsi.wait_for_ready(vs_id, wait) if ready: env.fout("READY") else: raise exceptions.CLIAbort("Inst...
[ "def", "cli", "(", "env", ",", "identifier", ",", "wait", ")", ":", "vsi", "=", "SoftLayer", ".", "VSManager", "(", "env", ".", "client", ")", "vs_id", "=", "helpers", ".", "resolve_id", "(", "vsi", ".", "resolve_ids", ",", "identifier", ",", "'VS'", ...
Check if a virtual server is ready.
[ "Check", "if", "a", "virtual", "server", "is", "ready", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/CLI/virt/ready.py#L16-L25
1,505
softlayer/softlayer-python
SoftLayer/CLI/block/replication/failover.py
cli
def cli(env, volume_id, replicant_id, immediate): """Failover a block volume to the given replicant volume.""" block_storage_manager = SoftLayer.BlockStorageManager(env.client) success = block_storage_manager.failover_to_replicant( volume_id, replicant_id, immediate ) if su...
python
def cli(env, volume_id, replicant_id, immediate): """Failover a block volume to the given replicant volume.""" block_storage_manager = SoftLayer.BlockStorageManager(env.client) success = block_storage_manager.failover_to_replicant( volume_id, replicant_id, immediate ) if su...
[ "def", "cli", "(", "env", ",", "volume_id", ",", "replicant_id", ",", "immediate", ")", ":", "block_storage_manager", "=", "SoftLayer", ".", "BlockStorageManager", "(", "env", ".", "client", ")", "success", "=", "block_storage_manager", ".", "failover_to_replicant...
Failover a block volume to the given replicant volume.
[ "Failover", "a", "block", "volume", "to", "the", "given", "replicant", "volume", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/CLI/block/replication/failover.py#L17-L30
1,506
softlayer/softlayer-python
SoftLayer/CLI/dedicatedhost/cancel.py
cli
def cli(env, identifier): """Cancel a dedicated host server immediately""" mgr = SoftLayer.DedicatedHostManager(env.client) host_id = helpers.resolve_id(mgr.resolve_ids, identifier, 'dedicated host') if not (env.skip_confirmations or formatting.no_going_back(host_id)): raise exceptions.CLIAbo...
python
def cli(env, identifier): """Cancel a dedicated host server immediately""" mgr = SoftLayer.DedicatedHostManager(env.client) host_id = helpers.resolve_id(mgr.resolve_ids, identifier, 'dedicated host') if not (env.skip_confirmations or formatting.no_going_back(host_id)): raise exceptions.CLIAbo...
[ "def", "cli", "(", "env", ",", "identifier", ")", ":", "mgr", "=", "SoftLayer", ".", "DedicatedHostManager", "(", "env", ".", "client", ")", "host_id", "=", "helpers", ".", "resolve_id", "(", "mgr", ".", "resolve_ids", ",", "identifier", ",", "'dedicated h...
Cancel a dedicated host server immediately
[ "Cancel", "a", "dedicated", "host", "server", "immediately" ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/CLI/dedicatedhost/cancel.py#L16-L28
1,507
softlayer/softlayer-python
SoftLayer/managers/image.py
ImageManager.get_image
def get_image(self, image_id, **kwargs): """Get details about an image. :param int image: The ID of the image. :param dict \\*\\*kwargs: response-level options (mask, limit, etc.) """ if 'mask' not in kwargs: kwargs['mask'] = IMAGE_MASK return self.vgbdtg.ge...
python
def get_image(self, image_id, **kwargs): """Get details about an image. :param int image: The ID of the image. :param dict \\*\\*kwargs: response-level options (mask, limit, etc.) """ if 'mask' not in kwargs: kwargs['mask'] = IMAGE_MASK return self.vgbdtg.ge...
[ "def", "get_image", "(", "self", ",", "image_id", ",", "*", "*", "kwargs", ")", ":", "if", "'mask'", "not", "in", "kwargs", ":", "kwargs", "[", "'mask'", "]", "=", "IMAGE_MASK", "return", "self", ".", "vgbdtg", ".", "getObject", "(", "id", "=", "imag...
Get details about an image. :param int image: The ID of the image. :param dict \\*\\*kwargs: response-level options (mask, limit, etc.)
[ "Get", "details", "about", "an", "image", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/image.py#L30-L39
1,508
softlayer/softlayer-python
SoftLayer/managers/image.py
ImageManager.list_private_images
def list_private_images(self, guid=None, name=None, **kwargs): """List all private images. :param string guid: filter based on GUID :param string name: filter based on name :param dict \\*\\*kwargs: response-level options (mask, limit, etc.) """ if 'mask' not in kwargs: ...
python
def list_private_images(self, guid=None, name=None, **kwargs): """List all private images. :param string guid: filter based on GUID :param string name: filter based on name :param dict \\*\\*kwargs: response-level options (mask, limit, etc.) """ if 'mask' not in kwargs: ...
[ "def", "list_private_images", "(", "self", ",", "guid", "=", "None", ",", "name", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "'mask'", "not", "in", "kwargs", ":", "kwargs", "[", "'mask'", "]", "=", "IMAGE_MASK", "_filter", "=", "utils", "....
List all private images. :param string guid: filter based on GUID :param string name: filter based on name :param dict \\*\\*kwargs: response-level options (mask, limit, etc.)
[ "List", "all", "private", "images", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/image.py#L48-L70
1,509
softlayer/softlayer-python
SoftLayer/managers/image.py
ImageManager.list_public_images
def list_public_images(self, guid=None, name=None, **kwargs): """List all public images. :param string guid: filter based on GUID :param string name: filter based on name :param dict \\*\\*kwargs: response-level options (mask, limit, etc.) """ if 'mask' not in kwargs: ...
python
def list_public_images(self, guid=None, name=None, **kwargs): """List all public images. :param string guid: filter based on GUID :param string name: filter based on name :param dict \\*\\*kwargs: response-level options (mask, limit, etc.) """ if 'mask' not in kwargs: ...
[ "def", "list_public_images", "(", "self", ",", "guid", "=", "None", ",", "name", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "'mask'", "not", "in", "kwargs", ":", "kwargs", "[", "'mask'", "]", "=", "IMAGE_MASK", "_filter", "=", "utils", "."...
List all public images. :param string guid: filter based on GUID :param string name: filter based on name :param dict \\*\\*kwargs: response-level options (mask, limit, etc.)
[ "List", "all", "public", "images", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/image.py#L72-L91
1,510
softlayer/softlayer-python
SoftLayer/managers/image.py
ImageManager._get_ids_from_name_public
def _get_ids_from_name_public(self, name): """Get public images which match the given name.""" results = self.list_public_images(name=name) return [result['id'] for result in results]
python
def _get_ids_from_name_public(self, name): """Get public images which match the given name.""" results = self.list_public_images(name=name) return [result['id'] for result in results]
[ "def", "_get_ids_from_name_public", "(", "self", ",", "name", ")", ":", "results", "=", "self", ".", "list_public_images", "(", "name", "=", "name", ")", "return", "[", "result", "[", "'id'", "]", "for", "result", "in", "results", "]" ]
Get public images which match the given name.
[ "Get", "public", "images", "which", "match", "the", "given", "name", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/image.py#L93-L96
1,511
softlayer/softlayer-python
SoftLayer/managers/image.py
ImageManager._get_ids_from_name_private
def _get_ids_from_name_private(self, name): """Get private images which match the given name.""" results = self.list_private_images(name=name) return [result['id'] for result in results]
python
def _get_ids_from_name_private(self, name): """Get private images which match the given name.""" results = self.list_private_images(name=name) return [result['id'] for result in results]
[ "def", "_get_ids_from_name_private", "(", "self", ",", "name", ")", ":", "results", "=", "self", ".", "list_private_images", "(", "name", "=", "name", ")", "return", "[", "result", "[", "'id'", "]", "for", "result", "in", "results", "]" ]
Get private images which match the given name.
[ "Get", "private", "images", "which", "match", "the", "given", "name", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/image.py#L98-L101
1,512
softlayer/softlayer-python
SoftLayer/managers/image.py
ImageManager.edit
def edit(self, image_id, name=None, note=None, tag=None): """Edit image related details. :param int image_id: The ID of the image :param string name: Name of the Image. :param string note: Note of the image. :param string tag: Tags of the image to be updated to. """ ...
python
def edit(self, image_id, name=None, note=None, tag=None): """Edit image related details. :param int image_id: The ID of the image :param string name: Name of the Image. :param string note: Note of the image. :param string tag: Tags of the image to be updated to. """ ...
[ "def", "edit", "(", "self", ",", "image_id", ",", "name", "=", "None", ",", "note", "=", "None", ",", "tag", "=", "None", ")", ":", "obj", "=", "{", "}", "if", "name", ":", "obj", "[", "'name'", "]", "=", "name", "if", "note", ":", "obj", "["...
Edit image related details. :param int image_id: The ID of the image :param string name: Name of the Image. :param string note: Note of the image. :param string tag: Tags of the image to be updated to.
[ "Edit", "image", "related", "details", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/image.py#L103-L121
1,513
softlayer/softlayer-python
SoftLayer/managers/image.py
ImageManager.import_image_from_uri
def import_image_from_uri(self, name, uri, os_code=None, note=None, ibm_api_key=None, root_key_crn=None, wrapped_dek=None, cloud_init=False, byol=False, is_encrypted=False): """Import a new image from object storage. ...
python
def import_image_from_uri(self, name, uri, os_code=None, note=None, ibm_api_key=None, root_key_crn=None, wrapped_dek=None, cloud_init=False, byol=False, is_encrypted=False): """Import a new image from object storage. ...
[ "def", "import_image_from_uri", "(", "self", ",", "name", ",", "uri", ",", "os_code", "=", "None", ",", "note", "=", "None", ",", "ibm_api_key", "=", "None", ",", "root_key_crn", "=", "None", ",", "wrapped_dek", "=", "None", ",", "cloud_init", "=", "Fals...
Import a new image from object storage. :param string name: Name of the new image :param string uri: The URI for an object storage object (.vhd/.iso file) of the format: swift://<objectStorageAccount>@<cluster>/<container>/<objectPath> or (.vhd/.iso/.raw file) of the...
[ "Import", "a", "new", "image", "from", "object", "storage", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/image.py#L123-L170
1,514
softlayer/softlayer-python
SoftLayer/managers/image.py
ImageManager.export_image_to_uri
def export_image_to_uri(self, image_id, uri, ibm_api_key=None): """Export image into the given object storage :param int image_id: The ID of the image :param string uri: The URI for object storage of the format swift://<objectStorageAccount>@<cluster>/<container>/<objectPath> ...
python
def export_image_to_uri(self, image_id, uri, ibm_api_key=None): """Export image into the given object storage :param int image_id: The ID of the image :param string uri: The URI for object storage of the format swift://<objectStorageAccount>@<cluster>/<container>/<objectPath> ...
[ "def", "export_image_to_uri", "(", "self", ",", "image_id", ",", "uri", ",", "ibm_api_key", "=", "None", ")", ":", "if", "'cos://'", "in", "uri", ":", "return", "self", ".", "vgbdtg", ".", "copyToIcos", "(", "{", "'uri'", ":", "uri", ",", "'ibmApiKey'", ...
Export image into the given object storage :param int image_id: The ID of the image :param string uri: The URI for object storage of the format swift://<objectStorageAccount>@<cluster>/<container>/<objectPath> or cos://<regionName>/<bucketName>/<objectPath> if using IBM Cloud ...
[ "Export", "image", "into", "the", "given", "object", "storage" ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/image.py#L172-L189
1,515
softlayer/softlayer-python
SoftLayer/CLI/object_storage/credential/delete.py
cli
def cli(env, identifier, credential_id): """Delete the credential of an Object Storage Account.""" mgr = SoftLayer.ObjectStorageManager(env.client) credential = mgr.delete_credential(identifier, credential_id=credential_id) env.fout(credential)
python
def cli(env, identifier, credential_id): """Delete the credential of an Object Storage Account.""" mgr = SoftLayer.ObjectStorageManager(env.client) credential = mgr.delete_credential(identifier, credential_id=credential_id) env.fout(credential)
[ "def", "cli", "(", "env", ",", "identifier", ",", "credential_id", ")", ":", "mgr", "=", "SoftLayer", ".", "ObjectStorageManager", "(", "env", ".", "client", ")", "credential", "=", "mgr", ".", "delete_credential", "(", "identifier", ",", "credential_id", "=...
Delete the credential of an Object Storage Account.
[ "Delete", "the", "credential", "of", "an", "Object", "Storage", "Account", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/CLI/object_storage/credential/delete.py#L15-L21
1,516
softlayer/softlayer-python
SoftLayer/managers/vs_capacity.py
CapacityManager.list
def list(self): """List Reserved Capacities""" mask = """mask[availableInstanceCount, occupiedInstanceCount, instances[id, billingItem[description, hourlyRecurringFee]], instanceCount, backendRouter[datacenter]]""" results = self.client.call('Account', 'getReservedCapacityGroups', mask=mask) ...
python
def list(self): """List Reserved Capacities""" mask = """mask[availableInstanceCount, occupiedInstanceCount, instances[id, billingItem[description, hourlyRecurringFee]], instanceCount, backendRouter[datacenter]]""" results = self.client.call('Account', 'getReservedCapacityGroups', mask=mask) ...
[ "def", "list", "(", "self", ")", ":", "mask", "=", "\"\"\"mask[availableInstanceCount, occupiedInstanceCount,\ninstances[id, billingItem[description, hourlyRecurringFee]], instanceCount, backendRouter[datacenter]]\"\"\"", "results", "=", "self", ".", "client", ".", "call", "(", "'A...
List Reserved Capacities
[ "List", "Reserved", "Capacities" ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/vs_capacity.py#L46-L51
1,517
softlayer/softlayer-python
SoftLayer/managers/vs_capacity.py
CapacityManager.get_object
def get_object(self, identifier, mask=None): """Get a Reserved Capacity Group :param int identifier: Id of the SoftLayer_Virtual_ReservedCapacityGroup :param string mask: override default object Mask """ if mask is None: mask = "mask[instances[billingItem[item[keyNam...
python
def get_object(self, identifier, mask=None): """Get a Reserved Capacity Group :param int identifier: Id of the SoftLayer_Virtual_ReservedCapacityGroup :param string mask: override default object Mask """ if mask is None: mask = "mask[instances[billingItem[item[keyNam...
[ "def", "get_object", "(", "self", ",", "identifier", ",", "mask", "=", "None", ")", ":", "if", "mask", "is", "None", ":", "mask", "=", "\"mask[instances[billingItem[item[keyName],category], guest], backendRouter[datacenter]]\"", "result", "=", "self", ".", "client", ...
Get a Reserved Capacity Group :param int identifier: Id of the SoftLayer_Virtual_ReservedCapacityGroup :param string mask: override default object Mask
[ "Get", "a", "Reserved", "Capacity", "Group" ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/vs_capacity.py#L53-L62
1,518
softlayer/softlayer-python
SoftLayer/managers/vs_capacity.py
CapacityManager.get_create_options
def get_create_options(self): """List available reserved capacity plans""" mask = "mask[attributes,prices[pricingLocationGroup]]" results = self.ordering_manager.list_items(self.capacity_package, mask=mask) return results
python
def get_create_options(self): """List available reserved capacity plans""" mask = "mask[attributes,prices[pricingLocationGroup]]" results = self.ordering_manager.list_items(self.capacity_package, mask=mask) return results
[ "def", "get_create_options", "(", "self", ")", ":", "mask", "=", "\"mask[attributes,prices[pricingLocationGroup]]\"", "results", "=", "self", ".", "ordering_manager", ".", "list_items", "(", "self", ".", "capacity_package", ",", "mask", "=", "mask", ")", "return", ...
List available reserved capacity plans
[ "List", "available", "reserved", "capacity", "plans" ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/vs_capacity.py#L64-L68
1,519
softlayer/softlayer-python
SoftLayer/managers/vs_capacity.py
CapacityManager.get_available_routers
def get_available_routers(self, dc=None): """Pulls down all backendRouterIds that are available :param string dc: A specific location to get routers for, like 'dal13'. :returns list: A list of locations where RESERVED_CAPACITY can be ordered. """ mask = "mask[locations]" ...
python
def get_available_routers(self, dc=None): """Pulls down all backendRouterIds that are available :param string dc: A specific location to get routers for, like 'dal13'. :returns list: A list of locations where RESERVED_CAPACITY can be ordered. """ mask = "mask[locations]" ...
[ "def", "get_available_routers", "(", "self", ",", "dc", "=", "None", ")", ":", "mask", "=", "\"mask[locations]\"", "# Step 1, get the package id", "package", "=", "self", ".", "ordering_manager", ".", "get_package_by_key", "(", "self", ".", "capacity_package", ",", ...
Pulls down all backendRouterIds that are available :param string dc: A specific location to get routers for, like 'dal13'. :returns list: A list of locations where RESERVED_CAPACITY can be ordered.
[ "Pulls", "down", "all", "backendRouterIds", "that", "are", "available" ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/vs_capacity.py#L70-L98
1,520
softlayer/softlayer-python
SoftLayer/managers/vs_capacity.py
CapacityManager.create
def create(self, name, backend_router_id, flavor, instances, test=False): """Orders a Virtual_ReservedCapacityGroup :param string name: Name for the new reserved capacity :param int backend_router_id: This selects the pod. See create_options for a list :param string flavor: Capacity Key...
python
def create(self, name, backend_router_id, flavor, instances, test=False): """Orders a Virtual_ReservedCapacityGroup :param string name: Name for the new reserved capacity :param int backend_router_id: This selects the pod. See create_options for a list :param string flavor: Capacity Key...
[ "def", "create", "(", "self", ",", "name", ",", "backend_router_id", ",", "flavor", ",", "instances", ",", "test", "=", "False", ")", ":", "# Since orderManger needs a DC id, just send in 0, the API will ignore it", "args", "=", "(", "self", ".", "capacity_package", ...
Orders a Virtual_ReservedCapacityGroup :param string name: Name for the new reserved capacity :param int backend_router_id: This selects the pod. See create_options for a list :param string flavor: Capacity KeyName, see create_options for a list :param int instances: Number of guest thi...
[ "Orders", "a", "Virtual_ReservedCapacityGroup" ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/vs_capacity.py#L100-L123
1,521
softlayer/softlayer-python
SoftLayer/managers/vs_capacity.py
CapacityManager.create_guest
def create_guest(self, capacity_id, test, guest_object): """Turns an empty Reserve Capacity into a real Virtual Guest :param int capacity_id: ID of the RESERVED_CAPACITY_GROUP to create this guest into :param bool test: True will use verifyOrder, False will use placeOrder :param diction...
python
def create_guest(self, capacity_id, test, guest_object): """Turns an empty Reserve Capacity into a real Virtual Guest :param int capacity_id: ID of the RESERVED_CAPACITY_GROUP to create this guest into :param bool test: True will use verifyOrder, False will use placeOrder :param diction...
[ "def", "create_guest", "(", "self", ",", "capacity_id", ",", "test", ",", "guest_object", ")", ":", "vs_manager", "=", "VSManager", "(", "self", ".", "client", ")", "mask", "=", "\"mask[instances[id, billingItem[id, item[id,keyName]]], backendRouter[id, datacenter[name]]]...
Turns an empty Reserve Capacity into a real Virtual Guest :param int capacity_id: ID of the RESERVED_CAPACITY_GROUP to create this guest into :param bool test: True will use verifyOrder, False will use placeOrder :param dictionary guest_object: Below is the minimum info you need to send in ...
[ "Turns", "an", "empty", "Reserve", "Capacity", "into", "a", "real", "Virtual", "Guest" ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/vs_capacity.py#L125-L165
1,522
softlayer/softlayer-python
SoftLayer/CLI/virt/capacity/list.py
cli
def cli(env): """List Reserved Capacity groups.""" manager = CapacityManager(env.client) result = manager.list() table = formatting.Table( ["ID", "Name", "Capacity", "Flavor", "Location", "Created"], title="Reserved Capacity" ) for r_c in result: occupied_string = "#" * i...
python
def cli(env): """List Reserved Capacity groups.""" manager = CapacityManager(env.client) result = manager.list() table = formatting.Table( ["ID", "Name", "Capacity", "Flavor", "Location", "Created"], title="Reserved Capacity" ) for r_c in result: occupied_string = "#" * i...
[ "def", "cli", "(", "env", ")", ":", "manager", "=", "CapacityManager", "(", "env", ".", "client", ")", "result", "=", "manager", ".", "list", "(", ")", "table", "=", "formatting", ".", "Table", "(", "[", "\"ID\"", ",", "\"Name\"", ",", "\"Capacity\"", ...
List Reserved Capacity groups.
[ "List", "Reserved", "Capacity", "groups", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/CLI/virt/capacity/list.py#L12-L32
1,523
softlayer/softlayer-python
SoftLayer/CLI/order/place_quote.py
cli
def cli(env, package_keyname, location, preset, name, send_email, complex_type, extras, order_items): """Place a quote. This CLI command is used for creating a quote of the specified package in the given location (denoted by a datacenter's long name). Orders made via the CLI can then be conver...
python
def cli(env, package_keyname, location, preset, name, send_email, complex_type, extras, order_items): """Place a quote. This CLI command is used for creating a quote of the specified package in the given location (denoted by a datacenter's long name). Orders made via the CLI can then be conver...
[ "def", "cli", "(", "env", ",", "package_keyname", ",", "location", ",", "preset", ",", "name", ",", "send_email", ",", "complex_type", ",", "extras", ",", "order_items", ")", ":", "manager", "=", "ordering", ".", "OrderingManager", "(", "env", ".", "client...
Place a quote. This CLI command is used for creating a quote of the specified package in the given location (denoted by a datacenter's long name). Orders made via the CLI can then be converted to be made programmatically by calling SoftLayer.OrderingManager.place_quote() with the same keynames. P...
[ "Place", "a", "quote", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/CLI/order/place_quote.py#L30-L96
1,524
softlayer/softlayer-python
SoftLayer/CLI/order/quote_list.py
cli
def cli(env): """List all active quotes on an account""" table = formatting.Table([ 'Id', 'Name', 'Created', 'Expiration', 'Status', 'Package Name', 'Package Id' ]) table.align['Name'] = 'l' table.align['Package Name'] = 'r' table.align['Package Id'] = 'l' manager = ordering.Orderin...
python
def cli(env): """List all active quotes on an account""" table = formatting.Table([ 'Id', 'Name', 'Created', 'Expiration', 'Status', 'Package Name', 'Package Id' ]) table.align['Name'] = 'l' table.align['Package Name'] = 'r' table.align['Package Id'] = 'l' manager = ordering.Orderin...
[ "def", "cli", "(", "env", ")", ":", "table", "=", "formatting", ".", "Table", "(", "[", "'Id'", ",", "'Name'", ",", "'Created'", ",", "'Expiration'", ",", "'Status'", ",", "'Package Name'", ",", "'Package Id'", "]", ")", "table", ".", "align", "[", "'N...
List all active quotes on an account
[ "List", "all", "active", "quotes", "on", "an", "account" ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/CLI/order/quote_list.py#L13-L36
1,525
softlayer/softlayer-python
SoftLayer/CLI/image/delete.py
cli
def cli(env, identifier): """Delete an image.""" image_mgr = SoftLayer.ImageManager(env.client) image_id = helpers.resolve_id(image_mgr.resolve_ids, identifier, 'image') image_mgr.delete_image(image_id)
python
def cli(env, identifier): """Delete an image.""" image_mgr = SoftLayer.ImageManager(env.client) image_id = helpers.resolve_id(image_mgr.resolve_ids, identifier, 'image') image_mgr.delete_image(image_id)
[ "def", "cli", "(", "env", ",", "identifier", ")", ":", "image_mgr", "=", "SoftLayer", ".", "ImageManager", "(", "env", ".", "client", ")", "image_id", "=", "helpers", ".", "resolve_id", "(", "image_mgr", ".", "resolve_ids", ",", "identifier", ",", "'image'...
Delete an image.
[ "Delete", "an", "image", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/CLI/image/delete.py#L14-L20
1,526
softlayer/softlayer-python
SoftLayer/CLI/loadbal/service_add.py
cli
def cli(env, identifier, enabled, port, weight, healthcheck_type, ip_address): """Adds a new load balancer service.""" mgr = SoftLayer.LoadBalancerManager(env.client) loadbal_id, group_id = loadbal.parse_id(identifier) # check if the IP is valid ip_address_id = None if ip_address: ip_...
python
def cli(env, identifier, enabled, port, weight, healthcheck_type, ip_address): """Adds a new load balancer service.""" mgr = SoftLayer.LoadBalancerManager(env.client) loadbal_id, group_id = loadbal.parse_id(identifier) # check if the IP is valid ip_address_id = None if ip_address: ip_...
[ "def", "cli", "(", "env", ",", "identifier", ",", "enabled", ",", "port", ",", "weight", ",", "healthcheck_type", ",", "ip_address", ")", ":", "mgr", "=", "SoftLayer", ".", "LoadBalancerManager", "(", "env", ".", "client", ")", "loadbal_id", ",", "group_id...
Adds a new load balancer service.
[ "Adds", "a", "new", "load", "balancer", "service", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/CLI/loadbal/service_add.py#L31-L53
1,527
softlayer/softlayer-python
SoftLayer/shell/core.py
cli
def cli(ctx, env): """Enters a shell for slcli.""" # Set up the environment env = copy.deepcopy(env) env.load_modules_from_python(routes.ALL_ROUTES) env.aliases.update(routes.ALL_ALIASES) env.vars['global_args'] = ctx.parent.params env.vars['is_shell'] = True env.vars['last_exit_code'] ...
python
def cli(ctx, env): """Enters a shell for slcli.""" # Set up the environment env = copy.deepcopy(env) env.load_modules_from_python(routes.ALL_ROUTES) env.aliases.update(routes.ALL_ALIASES) env.vars['global_args'] = ctx.parent.params env.vars['is_shell'] = True env.vars['last_exit_code'] ...
[ "def", "cli", "(", "ctx", ",", "env", ")", ":", "# Set up the environment", "env", "=", "copy", ".", "deepcopy", "(", "env", ")", "env", ".", "load_modules_from_python", "(", "routes", ".", "ALL_ROUTES", ")", "env", ".", "aliases", ".", "update", "(", "r...
Enters a shell for slcli.
[ "Enters", "a", "shell", "for", "slcli", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/shell/core.py#L34-L88
1,528
softlayer/softlayer-python
SoftLayer/shell/core.py
get_env_args
def get_env_args(env): """Yield options to inject into the slcli command from the environment.""" for arg, val in env.vars.get('global_args', {}).items(): if val is True: yield '--%s' % arg elif isinstance(val, int): for _ in range(val): yield '--%s' % arg...
python
def get_env_args(env): """Yield options to inject into the slcli command from the environment.""" for arg, val in env.vars.get('global_args', {}).items(): if val is True: yield '--%s' % arg elif isinstance(val, int): for _ in range(val): yield '--%s' % arg...
[ "def", "get_env_args", "(", "env", ")", ":", "for", "arg", ",", "val", "in", "env", ".", "vars", ".", "get", "(", "'global_args'", ",", "{", "}", ")", ".", "items", "(", ")", ":", "if", "val", "is", "True", ":", "yield", "'--%s'", "%", "arg", "...
Yield options to inject into the slcli command from the environment.
[ "Yield", "options", "to", "inject", "into", "the", "slcli", "command", "from", "the", "environment", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/shell/core.py#L91-L102
1,529
softlayer/softlayer-python
SoftLayer/CLI/virt/placementgroup/delete.py
cli
def cli(env, identifier, purge): """Delete a placement group. Placement Group MUST be empty before you can delete it. IDENTIFIER can be either the Name or Id of the placement group you want to view """ manager = PlacementManager(env.client) group_id = helpers.resolve_id(manager.resolve_ids, id...
python
def cli(env, identifier, purge): """Delete a placement group. Placement Group MUST be empty before you can delete it. IDENTIFIER can be either the Name or Id of the placement group you want to view """ manager = PlacementManager(env.client) group_id = helpers.resolve_id(manager.resolve_ids, id...
[ "def", "cli", "(", "env", ",", "identifier", ",", "purge", ")", ":", "manager", "=", "PlacementManager", "(", "env", ".", "client", ")", "group_id", "=", "helpers", ".", "resolve_id", "(", "manager", ".", "resolve_ids", ",", "identifier", ",", "'placement_...
Delete a placement group. Placement Group MUST be empty before you can delete it. IDENTIFIER can be either the Name or Id of the placement group you want to view
[ "Delete", "a", "placement", "group", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/CLI/virt/placementgroup/delete.py#L19-L49
1,530
softlayer/softlayer-python
SoftLayer/CLI/vpn/ipsec/translation/update.py
cli
def cli(env, context_id, translation_id, static_ip, remote_ip, note): """Update an address translation for an IPSEC tunnel context. A separate configuration request should be made to realize changes on network devices. """ manager = SoftLayer.IPSECManager(env.client) succeeded = manager.update_...
python
def cli(env, context_id, translation_id, static_ip, remote_ip, note): """Update an address translation for an IPSEC tunnel context. A separate configuration request should be made to realize changes on network devices. """ manager = SoftLayer.IPSECManager(env.client) succeeded = manager.update_...
[ "def", "cli", "(", "env", ",", "context_id", ",", "translation_id", ",", "static_ip", ",", "remote_ip", ",", "note", ")", ":", "manager", "=", "SoftLayer", ".", "IPSECManager", "(", "env", ".", "client", ")", "succeeded", "=", "manager", ".", "update_trans...
Update an address translation for an IPSEC tunnel context. A separate configuration request should be made to realize changes on network devices.
[ "Update", "an", "address", "translation", "for", "an", "IPSEC", "tunnel", "context", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/CLI/vpn/ipsec/translation/update.py#L31-L46
1,531
softlayer/softlayer-python
SoftLayer/shell/cmd_help.py
cli
def cli(ctx, env): """Print shell help text.""" env.out("Welcome to the SoftLayer shell.") env.out("") formatter = formatting.HelpFormatter() commands = [] shell_commands = [] for name in cli_core.cli.list_commands(ctx): command = cli_core.cli.get_command(ctx, name) if comma...
python
def cli(ctx, env): """Print shell help text.""" env.out("Welcome to the SoftLayer shell.") env.out("") formatter = formatting.HelpFormatter() commands = [] shell_commands = [] for name in cli_core.cli.list_commands(ctx): command = cli_core.cli.get_command(ctx, name) if comma...
[ "def", "cli", "(", "ctx", ",", "env", ")", ":", "env", ".", "out", "(", "\"Welcome to the SoftLayer shell.\"", ")", "env", ".", "out", "(", "\"\"", ")", "formatter", "=", "formatting", ".", "HelpFormatter", "(", ")", "commands", "=", "[", "]", "shell_com...
Print shell help text.
[ "Print", "shell", "help", "text", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/shell/cmd_help.py#L15-L40
1,532
softlayer/softlayer-python
SoftLayer/CLI/hardware/reload.py
cli
def cli(env, identifier, postinstall, key): """Reload operating system on a server.""" hardware = SoftLayer.HardwareManager(env.client) hardware_id = helpers.resolve_id(hardware.resolve_ids, identifier, 'hardware') key_list = [] ...
python
def cli(env, identifier, postinstall, key): """Reload operating system on a server.""" hardware = SoftLayer.HardwareManager(env.client) hardware_id = helpers.resolve_id(hardware.resolve_ids, identifier, 'hardware') key_list = [] ...
[ "def", "cli", "(", "env", ",", "identifier", ",", "postinstall", ",", "key", ")", ":", "hardware", "=", "SoftLayer", ".", "HardwareManager", "(", "env", ".", "client", ")", "hardware_id", "=", "helpers", ".", "resolve_id", "(", "hardware", ".", "resolve_id...
Reload operating system on a server.
[ "Reload", "operating", "system", "on", "a", "server", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/CLI/hardware/reload.py#L20-L36
1,533
softlayer/softlayer-python
SoftLayer/CLI/loadbal/service_edit.py
cli
def cli(env, identifier, enabled, port, weight, healthcheck_type, ip_address): """Edit the properties of a service group.""" mgr = SoftLayer.LoadBalancerManager(env.client) loadbal_id, service_id = loadbal.parse_id(identifier) # check if any input is provided if ((not any([ip_address, weight, por...
python
def cli(env, identifier, enabled, port, weight, healthcheck_type, ip_address): """Edit the properties of a service group.""" mgr = SoftLayer.LoadBalancerManager(env.client) loadbal_id, service_id = loadbal.parse_id(identifier) # check if any input is provided if ((not any([ip_address, weight, por...
[ "def", "cli", "(", "env", ",", "identifier", ",", "enabled", ",", "port", ",", "weight", ",", "healthcheck_type", ",", "ip_address", ")", ":", "mgr", "=", "SoftLayer", ".", "LoadBalancerManager", "(", "env", ".", "client", ")", "loadbal_id", ",", "service_...
Edit the properties of a service group.
[ "Edit", "the", "properties", "of", "a", "service", "group", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/CLI/loadbal/service_edit.py#L25-L52
1,534
softlayer/softlayer-python
SoftLayer/CLI/subnet/list.py
cli
def cli(env, sortby, datacenter, identifier, subnet_type, network_space, ipv4, ipv6): """List subnets.""" mgr = SoftLayer.NetworkManager(env.client) table = formatting.Table([ 'id', 'identifier', 'type', 'network_space', 'datacenter', 'vlan_id', 'IPs', 'hardware', 'vs', ]) table.so...
python
def cli(env, sortby, datacenter, identifier, subnet_type, network_space, ipv4, ipv6): """List subnets.""" mgr = SoftLayer.NetworkManager(env.client) table = formatting.Table([ 'id', 'identifier', 'type', 'network_space', 'datacenter', 'vlan_id', 'IPs', 'hardware', 'vs', ]) table.so...
[ "def", "cli", "(", "env", ",", "sortby", ",", "datacenter", ",", "identifier", ",", "subnet_type", ",", "network_space", ",", "ipv4", ",", "ipv6", ")", ":", "mgr", "=", "SoftLayer", ".", "NetworkManager", "(", "env", ".", "client", ")", "table", "=", "...
List subnets.
[ "List", "subnets", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/CLI/subnet/list.py#L32-L72
1,535
softlayer/softlayer-python
SoftLayer/CLI/firewall/add.py
cli
def cli(env, target, firewall_type, high_availability): """Create new firewall. TARGET: Id of the server the firewall will protect """ mgr = SoftLayer.FirewallManager(env.client) if not env.skip_confirmations: if firewall_type == 'vlan': pkg = mgr.get_dedicated_package(ha_enab...
python
def cli(env, target, firewall_type, high_availability): """Create new firewall. TARGET: Id of the server the firewall will protect """ mgr = SoftLayer.FirewallManager(env.client) if not env.skip_confirmations: if firewall_type == 'vlan': pkg = mgr.get_dedicated_package(ha_enab...
[ "def", "cli", "(", "env", ",", "target", ",", "firewall_type", ",", "high_availability", ")", ":", "mgr", "=", "SoftLayer", ".", "FirewallManager", "(", "env", ".", "client", ")", "if", "not", "env", ".", "skip_confirmations", ":", "if", "firewall_type", "...
Create new firewall. TARGET: Id of the server the firewall will protect
[ "Create", "new", "firewall", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/CLI/firewall/add.py#L22-L58
1,536
softlayer/softlayer-python
SoftLayer/CLI/cdn/purge.py
cli
def cli(env, account_id, content_url): """Purge cached files from all edge nodes. Examples: slcli cdn purge 97794 http://example.com/cdn/file.txt slcli cdn purge 97794 http://example.com/cdn/file.txt https://dal01.example.softlayer.net/image.png """ manager = SoftLayer.CDNManager(env...
python
def cli(env, account_id, content_url): """Purge cached files from all edge nodes. Examples: slcli cdn purge 97794 http://example.com/cdn/file.txt slcli cdn purge 97794 http://example.com/cdn/file.txt https://dal01.example.softlayer.net/image.png """ manager = SoftLayer.CDNManager(env...
[ "def", "cli", "(", "env", ",", "account_id", ",", "content_url", ")", ":", "manager", "=", "SoftLayer", ".", "CDNManager", "(", "env", ".", "client", ")", "content_list", "=", "manager", ".", "purge_content", "(", "account_id", ",", "content_url", ")", "ta...
Purge cached files from all edge nodes. Examples: slcli cdn purge 97794 http://example.com/cdn/file.txt slcli cdn purge 97794 http://example.com/cdn/file.txt https://dal01.example.softlayer.net/image.png
[ "Purge", "cached", "files", "from", "all", "edge", "nodes", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/CLI/cdn/purge.py#L15-L34
1,537
softlayer/softlayer-python
SoftLayer/CLI/order/package_locations.py
cli
def cli(env, package_keyname): """List Datacenters a package can be ordered in. Use the location Key Name to place orders """ manager = ordering.OrderingManager(env.client) table = formatting.Table(COLUMNS) locations = manager.package_locations(package_keyname) for region in locations: ...
python
def cli(env, package_keyname): """List Datacenters a package can be ordered in. Use the location Key Name to place orders """ manager = ordering.OrderingManager(env.client) table = formatting.Table(COLUMNS) locations = manager.package_locations(package_keyname) for region in locations: ...
[ "def", "cli", "(", "env", ",", "package_keyname", ")", ":", "manager", "=", "ordering", ".", "OrderingManager", "(", "env", ".", "client", ")", "table", "=", "formatting", ".", "Table", "(", "COLUMNS", ")", "locations", "=", "manager", ".", "package_locati...
List Datacenters a package can be ordered in. Use the location Key Name to place orders
[ "List", "Datacenters", "a", "package", "can", "be", "ordered", "in", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/CLI/order/package_locations.py#L15-L32
1,538
softlayer/softlayer-python
SoftLayer/CLI/rwhois/edit.py
cli
def cli(env, abuse, address1, address2, city, company, country, firstname, lastname, postal, public, state): """Edit the RWhois data on the account.""" mgr = SoftLayer.NetworkManager(env.client) update = { 'abuse_email': abuse, 'address1': address1, 'address2': address2, ...
python
def cli(env, abuse, address1, address2, city, company, country, firstname, lastname, postal, public, state): """Edit the RWhois data on the account.""" mgr = SoftLayer.NetworkManager(env.client) update = { 'abuse_email': abuse, 'address1': address1, 'address2': address2, ...
[ "def", "cli", "(", "env", ",", "abuse", ",", "address1", ",", "address2", ",", "city", ",", "company", ",", "country", ",", "firstname", ",", "lastname", ",", "postal", ",", "public", ",", "state", ")", ":", "mgr", "=", "SoftLayer", ".", "NetworkManage...
Edit the RWhois data on the account.
[ "Edit", "the", "RWhois", "data", "on", "the", "account", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/CLI/rwhois/edit.py#L26-L55
1,539
softlayer/softlayer-python
SoftLayer/CLI/order/quote.py
cli
def cli(env, quote, **args): """View and Order a quote \f :note: The hostname and domain are split out from the fully qualified domain name. If you want to order multiple servers, you need to specify each FQDN. Postinstall, userdata, and sshkeys are applied to all servers in an ord...
python
def cli(env, quote, **args): """View and Order a quote \f :note: The hostname and domain are split out from the fully qualified domain name. If you want to order multiple servers, you need to specify each FQDN. Postinstall, userdata, and sshkeys are applied to all servers in an ord...
[ "def", "cli", "(", "env", ",", "quote", ",", "*", "*", "args", ")", ":", "table", "=", "formatting", ".", "Table", "(", "[", "'Id'", ",", "'Name'", ",", "'Created'", ",", "'Expiration'", ",", "'Status'", "]", ")", "create_args", "=", "_parse_create_arg...
View and Order a quote \f :note: The hostname and domain are split out from the fully qualified domain name. If you want to order multiple servers, you need to specify each FQDN. Postinstall, userdata, and sshkeys are applied to all servers in an order. :: slcli order quo...
[ "View", "and", "Order", "a", "quote" ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/CLI/order/quote.py#L81-L130
1,540
softlayer/softlayer-python
SoftLayer/managers/block.py
BlockStorageManager.authorize_host_to_volume
def authorize_host_to_volume(self, volume_id, hardware_ids=None, virtual_guest_ids=None, ip_address_ids=None, **kwargs): """Authorizes hosts to Block Storage Volumes :para...
python
def authorize_host_to_volume(self, volume_id, hardware_ids=None, virtual_guest_ids=None, ip_address_ids=None, **kwargs): """Authorizes hosts to Block Storage Volumes :para...
[ "def", "authorize_host_to_volume", "(", "self", ",", "volume_id", ",", "hardware_ids", "=", "None", ",", "virtual_guest_ids", "=", "None", ",", "ip_address_ids", "=", "None", ",", "*", "*", "kwargs", ")", ":", "host_templates", "=", "[", "]", "storage_utils", ...
Authorizes hosts to Block Storage Volumes :param volume_id: The Block volume to authorize hosts to :param hardware_ids: A List of SoftLayer_Hardware ids :param virtual_guest_ids: A List of SoftLayer_Virtual_Guest ids :param ip_address_ids: A List of SoftLayer_Network_Subnet_IpAddress id...
[ "Authorizes", "hosts", "to", "Block", "Storage", "Volumes" ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/block.py#L154-L177
1,541
softlayer/softlayer-python
SoftLayer/managers/block.py
BlockStorageManager.order_replicant_volume
def order_replicant_volume(self, volume_id, snapshot_schedule, location, tier=None, os_type=None): """Places an order for a replicant block volume. :param volume_id: The ID of the primary volume to be replicated :param snapshot_schedule: The primary volume's snaps...
python
def order_replicant_volume(self, volume_id, snapshot_schedule, location, tier=None, os_type=None): """Places an order for a replicant block volume. :param volume_id: The ID of the primary volume to be replicated :param snapshot_schedule: The primary volume's snaps...
[ "def", "order_replicant_volume", "(", "self", ",", "volume_id", ",", "snapshot_schedule", ",", "location", ",", "tier", "=", "None", ",", "os_type", "=", "None", ")", ":", "block_mask", "=", "'billingItem[activeChildren,hourlyFlag],'", "'storageTierLevel,osType,staasVer...
Places an order for a replicant block volume. :param volume_id: The ID of the primary volume to be replicated :param snapshot_schedule: The primary volume's snapshot schedule to use for replication :param location: The location for the ordered replicant volume ...
[ "Places", "an", "order", "for", "a", "replicant", "block", "volume", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/block.py#L224-L260
1,542
softlayer/softlayer-python
SoftLayer/managers/block.py
BlockStorageManager.order_duplicate_volume
def order_duplicate_volume(self, origin_volume_id, origin_snapshot_id=None, duplicate_size=None, duplicate_iops=None, duplicate_tier_level=None, duplicate_snapshot_size=None, hourly_billing_flag=F...
python
def order_duplicate_volume(self, origin_volume_id, origin_snapshot_id=None, duplicate_size=None, duplicate_iops=None, duplicate_tier_level=None, duplicate_snapshot_size=None, hourly_billing_flag=F...
[ "def", "order_duplicate_volume", "(", "self", ",", "origin_volume_id", ",", "origin_snapshot_id", "=", "None", ",", "duplicate_size", "=", "None", ",", "duplicate_iops", "=", "None", ",", "duplicate_tier_level", "=", "None", ",", "duplicate_snapshot_size", "=", "Non...
Places an order for a duplicate block volume. :param origin_volume_id: The ID of the origin volume to be duplicated :param origin_snapshot_id: Origin snapshot ID to use for duplication :param duplicate_size: Size/capacity for the duplicate volume :param duplicate_iops: The IOPS per GB f...
[ "Places", "an", "order", "for", "a", "duplicate", "block", "volume", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/block.py#L262-L304
1,543
softlayer/softlayer-python
SoftLayer/managers/block.py
BlockStorageManager.order_modified_volume
def order_modified_volume(self, volume_id, new_size=None, new_iops=None, new_tier_level=None): """Places an order for modifying an existing block volume. :param volume_id: The ID of the volume to be modified :param new_size: The new size/capacity for the volume :param new_iops: The new ...
python
def order_modified_volume(self, volume_id, new_size=None, new_iops=None, new_tier_level=None): """Places an order for modifying an existing block volume. :param volume_id: The ID of the volume to be modified :param new_size: The new size/capacity for the volume :param new_iops: The new ...
[ "def", "order_modified_volume", "(", "self", ",", "volume_id", ",", "new_size", "=", "None", ",", "new_iops", "=", "None", ",", "new_tier_level", "=", "None", ")", ":", "mask_items", "=", "[", "'id'", ",", "'billingItem'", ",", "'storageType[keyName]'", ",", ...
Places an order for modifying an existing block volume. :param volume_id: The ID of the volume to be modified :param new_size: The new size/capacity for the volume :param new_iops: The new IOPS for the volume :param new_tier_level: The new tier level for the volume :return: Retu...
[ "Places", "an", "order", "for", "modifying", "an", "existing", "block", "volume", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/block.py#L306-L333
1,544
softlayer/softlayer-python
SoftLayer/managers/block.py
BlockStorageManager.order_block_volume
def order_block_volume(self, storage_type, location, size, os_type, iops=None, tier_level=None, snapshot_size=None, service_offering='storage_as_a_service', hourly_billing_flag=False): """Places an order for a block volume. ...
python
def order_block_volume(self, storage_type, location, size, os_type, iops=None, tier_level=None, snapshot_size=None, service_offering='storage_as_a_service', hourly_billing_flag=False): """Places an order for a block volume. ...
[ "def", "order_block_volume", "(", "self", ",", "storage_type", ",", "location", ",", "size", ",", "os_type", ",", "iops", "=", "None", ",", "tier_level", "=", "None", ",", "snapshot_size", "=", "None", ",", "service_offering", "=", "'storage_as_a_service'", ",...
Places an order for a block volume. :param storage_type: 'performance' or 'endurance' :param location: Datacenter in which to order iSCSI volume :param size: Size of the desired volume, in GB :param os_type: OS Type to use for volume alignment, see help for list :param iops: Num...
[ "Places", "an", "order", "for", "a", "block", "volume", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/block.py#L343-L369
1,545
softlayer/softlayer-python
SoftLayer/managers/block.py
BlockStorageManager.create_snapshot
def create_snapshot(self, volume_id, notes='', **kwargs): """Creates a snapshot on the given block volume. :param integer volume_id: The id of the volume :param string notes: The notes or "name" to assign the snapshot :return: Returns the id of the new snapshot """ retu...
python
def create_snapshot(self, volume_id, notes='', **kwargs): """Creates a snapshot on the given block volume. :param integer volume_id: The id of the volume :param string notes: The notes or "name" to assign the snapshot :return: Returns the id of the new snapshot """ retu...
[ "def", "create_snapshot", "(", "self", ",", "volume_id", ",", "notes", "=", "''", ",", "*", "*", "kwargs", ")", ":", "return", "self", ".", "client", ".", "call", "(", "'Network_Storage'", ",", "'createSnapshot'", ",", "notes", ",", "id", "=", "volume_id...
Creates a snapshot on the given block volume. :param integer volume_id: The id of the volume :param string notes: The notes or "name" to assign the snapshot :return: Returns the id of the new snapshot
[ "Creates", "a", "snapshot", "on", "the", "given", "block", "volume", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/block.py#L371-L380
1,546
softlayer/softlayer-python
SoftLayer/managers/block.py
BlockStorageManager.order_snapshot_space
def order_snapshot_space(self, volume_id, capacity, tier, upgrade, **kwargs): """Orders snapshot space for the given block volume. :param integer volume_id: The id of the volume :param integer capacity: The capacity to order, in GB :param float tier: The tie...
python
def order_snapshot_space(self, volume_id, capacity, tier, upgrade, **kwargs): """Orders snapshot space for the given block volume. :param integer volume_id: The id of the volume :param integer capacity: The capacity to order, in GB :param float tier: The tie...
[ "def", "order_snapshot_space", "(", "self", ",", "volume_id", ",", "capacity", ",", "tier", ",", "upgrade", ",", "*", "*", "kwargs", ")", ":", "block_mask", "=", "'id,billingItem[location,hourlyFlag],'", "'storageType[keyName],storageTierLevel,provisionedIops,'", "'staasV...
Orders snapshot space for the given block volume. :param integer volume_id: The id of the volume :param integer capacity: The capacity to order, in GB :param float tier: The tier level of the block volume, in IOPS per GB :param boolean upgrade: Flag to indicate if this order is an upgra...
[ "Orders", "snapshot", "space", "for", "the", "given", "block", "volume", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/block.py#L382-L402
1,547
softlayer/softlayer-python
SoftLayer/managers/block.py
BlockStorageManager.enable_snapshots
def enable_snapshots(self, volume_id, schedule_type, retention_count, minute, hour, day_of_week, **kwargs): """Enables snapshots for a specific block volume at a given schedule :param integer volume_id: The id of the volume :param string schedule_type: 'HOURLY'|'DAILY'|...
python
def enable_snapshots(self, volume_id, schedule_type, retention_count, minute, hour, day_of_week, **kwargs): """Enables snapshots for a specific block volume at a given schedule :param integer volume_id: The id of the volume :param string schedule_type: 'HOURLY'|'DAILY'|...
[ "def", "enable_snapshots", "(", "self", ",", "volume_id", ",", "schedule_type", ",", "retention_count", ",", "minute", ",", "hour", ",", "day_of_week", ",", "*", "*", "kwargs", ")", ":", "return", "self", ".", "client", ".", "call", "(", "'Network_Storage'",...
Enables snapshots for a specific block volume at a given schedule :param integer volume_id: The id of the volume :param string schedule_type: 'HOURLY'|'DAILY'|'WEEKLY' :param integer retention_count: Number of snapshots to be kept :param integer minute: Minute when to take snapshot ...
[ "Enables", "snapshots", "for", "a", "specific", "block", "volume", "at", "a", "given", "schedule" ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/block.py#L443-L463
1,548
softlayer/softlayer-python
SoftLayer/managers/block.py
BlockStorageManager.disable_snapshots
def disable_snapshots(self, volume_id, schedule_type): """Disables snapshots for a specific block volume at a given schedule :param integer volume_id: The id of the volume :param string schedule_type: 'HOURLY'|'DAILY'|'WEEKLY' :return: Returns whether successfully disabled or not ...
python
def disable_snapshots(self, volume_id, schedule_type): """Disables snapshots for a specific block volume at a given schedule :param integer volume_id: The id of the volume :param string schedule_type: 'HOURLY'|'DAILY'|'WEEKLY' :return: Returns whether successfully disabled or not ...
[ "def", "disable_snapshots", "(", "self", ",", "volume_id", ",", "schedule_type", ")", ":", "return", "self", ".", "client", ".", "call", "(", "'Network_Storage'", ",", "'disableSnapshots'", ",", "schedule_type", ",", "id", "=", "volume_id", ")" ]
Disables snapshots for a specific block volume at a given schedule :param integer volume_id: The id of the volume :param string schedule_type: 'HOURLY'|'DAILY'|'WEEKLY' :return: Returns whether successfully disabled or not
[ "Disables", "snapshots", "for", "a", "specific", "block", "volume", "at", "a", "given", "schedule" ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/block.py#L465-L474
1,549
softlayer/softlayer-python
SoftLayer/managers/block.py
BlockStorageManager.list_volume_schedules
def list_volume_schedules(self, volume_id): """Lists schedules for a given volume :param integer volume_id: The id of the volume :return: Returns list of schedules assigned to a given volume """ volume_detail = self.client.call( 'Network_Storage', 'getObj...
python
def list_volume_schedules(self, volume_id): """Lists schedules for a given volume :param integer volume_id: The id of the volume :return: Returns list of schedules assigned to a given volume """ volume_detail = self.client.call( 'Network_Storage', 'getObj...
[ "def", "list_volume_schedules", "(", "self", ",", "volume_id", ")", ":", "volume_detail", "=", "self", ".", "client", ".", "call", "(", "'Network_Storage'", ",", "'getObject'", ",", "id", "=", "volume_id", ",", "mask", "=", "'schedules[type,properties[type]]'", ...
Lists schedules for a given volume :param integer volume_id: The id of the volume :return: Returns list of schedules assigned to a given volume
[ "Lists", "schedules", "for", "a", "given", "volume" ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/block.py#L476-L488
1,550
softlayer/softlayer-python
SoftLayer/managers/block.py
BlockStorageManager.restore_from_snapshot
def restore_from_snapshot(self, volume_id, snapshot_id): """Restores a specific volume from a snapshot :param integer volume_id: The id of the volume :param integer snapshot_id: The id of the restore point :return: Returns whether succesfully restored or not """ return ...
python
def restore_from_snapshot(self, volume_id, snapshot_id): """Restores a specific volume from a snapshot :param integer volume_id: The id of the volume :param integer snapshot_id: The id of the restore point :return: Returns whether succesfully restored or not """ return ...
[ "def", "restore_from_snapshot", "(", "self", ",", "volume_id", ",", "snapshot_id", ")", ":", "return", "self", ".", "client", ".", "call", "(", "'Network_Storage'", ",", "'restoreFromSnapshot'", ",", "snapshot_id", ",", "id", "=", "volume_id", ")" ]
Restores a specific volume from a snapshot :param integer volume_id: The id of the volume :param integer snapshot_id: The id of the restore point :return: Returns whether succesfully restored or not
[ "Restores", "a", "specific", "volume", "from", "a", "snapshot" ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/block.py#L490-L499
1,551
softlayer/softlayer-python
SoftLayer/managers/block.py
BlockStorageManager.cancel_block_volume
def cancel_block_volume(self, volume_id, reason='No longer needed', immediate=False): """Cancels the given block storage volume. :param integer volume_id: The volume ID :param string reason: The reason for cancellation :param boole...
python
def cancel_block_volume(self, volume_id, reason='No longer needed', immediate=False): """Cancels the given block storage volume. :param integer volume_id: The volume ID :param string reason: The reason for cancellation :param boole...
[ "def", "cancel_block_volume", "(", "self", ",", "volume_id", ",", "reason", "=", "'No longer needed'", ",", "immediate", "=", "False", ")", ":", "block_volume", "=", "self", ".", "get_block_volume_details", "(", "volume_id", ",", "mask", "=", "'mask[id,billingItem...
Cancels the given block storage volume. :param integer volume_id: The volume ID :param string reason: The reason for cancellation :param boolean immediate_flag: Cancel immediately or on anniversary date
[ "Cancels", "the", "given", "block", "storage", "volume", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/block.py#L501-L526
1,552
softlayer/softlayer-python
SoftLayer/managers/block.py
BlockStorageManager.failover_to_replicant
def failover_to_replicant(self, volume_id, replicant_id, immediate=False): """Failover to a volume replicant. :param integer volume_id: The id of the volume :param integer replicant_id: ID of replicant to failover to :param boolean immediate: Flag indicating if failover is immediate ...
python
def failover_to_replicant(self, volume_id, replicant_id, immediate=False): """Failover to a volume replicant. :param integer volume_id: The id of the volume :param integer replicant_id: ID of replicant to failover to :param boolean immediate: Flag indicating if failover is immediate ...
[ "def", "failover_to_replicant", "(", "self", ",", "volume_id", ",", "replicant_id", ",", "immediate", "=", "False", ")", ":", "return", "self", ".", "client", ".", "call", "(", "'Network_Storage'", ",", "'failoverToReplicant'", ",", "replicant_id", ",", "immedia...
Failover to a volume replicant. :param integer volume_id: The id of the volume :param integer replicant_id: ID of replicant to failover to :param boolean immediate: Flag indicating if failover is immediate :return: Returns whether failover was successful or not
[ "Failover", "to", "a", "volume", "replicant", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/block.py#L528-L538
1,553
softlayer/softlayer-python
SoftLayer/managers/block.py
BlockStorageManager.failback_from_replicant
def failback_from_replicant(self, volume_id, replicant_id): """Failback from a volume replicant. :param integer volume_id: The id of the volume :param integer replicant_id: ID of replicant to failback from :return: Returns whether failback was successful or not """ retu...
python
def failback_from_replicant(self, volume_id, replicant_id): """Failback from a volume replicant. :param integer volume_id: The id of the volume :param integer replicant_id: ID of replicant to failback from :return: Returns whether failback was successful or not """ retu...
[ "def", "failback_from_replicant", "(", "self", ",", "volume_id", ",", "replicant_id", ")", ":", "return", "self", ".", "client", ".", "call", "(", "'Network_Storage'", ",", "'failbackFromReplicant'", ",", "replicant_id", ",", "id", "=", "volume_id", ")" ]
Failback from a volume replicant. :param integer volume_id: The id of the volume :param integer replicant_id: ID of replicant to failback from :return: Returns whether failback was successful or not
[ "Failback", "from", "a", "volume", "replicant", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/block.py#L540-L549
1,554
softlayer/softlayer-python
SoftLayer/managers/block.py
BlockStorageManager.set_credential_password
def set_credential_password(self, access_id, password): """Sets the password for an access host :param integer access_id: id of the access host :param string password: password to set """ return self.client.call('Network_Storage_Allowed_Host', 'setCredentialPassword', ...
python
def set_credential_password(self, access_id, password): """Sets the password for an access host :param integer access_id: id of the access host :param string password: password to set """ return self.client.call('Network_Storage_Allowed_Host', 'setCredentialPassword', ...
[ "def", "set_credential_password", "(", "self", ",", "access_id", ",", "password", ")", ":", "return", "self", ".", "client", ".", "call", "(", "'Network_Storage_Allowed_Host'", ",", "'setCredentialPassword'", ",", "password", ",", "id", "=", "access_id", ")" ]
Sets the password for an access host :param integer access_id: id of the access host :param string password: password to set
[ "Sets", "the", "password", "for", "an", "access", "host" ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/block.py#L551-L559
1,555
softlayer/softlayer-python
SoftLayer/managers/block.py
BlockStorageManager.create_or_update_lun_id
def create_or_update_lun_id(self, volume_id, lun_id): """Set the LUN ID on a volume. :param integer volume_id: The id of the volume :param integer lun_id: LUN ID to set on the volume :return: a SoftLayer_Network_Storage_Property object """ return self.client.call('Networ...
python
def create_or_update_lun_id(self, volume_id, lun_id): """Set the LUN ID on a volume. :param integer volume_id: The id of the volume :param integer lun_id: LUN ID to set on the volume :return: a SoftLayer_Network_Storage_Property object """ return self.client.call('Networ...
[ "def", "create_or_update_lun_id", "(", "self", ",", "volume_id", ",", "lun_id", ")", ":", "return", "self", ".", "client", ".", "call", "(", "'Network_Storage'", ",", "'createOrUpdateLunId'", ",", "lun_id", ",", "id", "=", "volume_id", ")" ]
Set the LUN ID on a volume. :param integer volume_id: The id of the volume :param integer lun_id: LUN ID to set on the volume :return: a SoftLayer_Network_Storage_Property object
[ "Set", "the", "LUN", "ID", "on", "a", "volume", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/block.py#L561-L569
1,556
softlayer/softlayer-python
SoftLayer/CLI/summary.py
cli
def cli(env, sortby): """Account summary.""" mgr = SoftLayer.NetworkManager(env.client) datacenters = mgr.summary_by_datacenter() table = formatting.Table(COLUMNS) table.sortby = sortby for name, datacenter in datacenters.items(): table.add_row([ name, datacent...
python
def cli(env, sortby): """Account summary.""" mgr = SoftLayer.NetworkManager(env.client) datacenters = mgr.summary_by_datacenter() table = formatting.Table(COLUMNS) table.sortby = sortby for name, datacenter in datacenters.items(): table.add_row([ name, datacent...
[ "def", "cli", "(", "env", ",", "sortby", ")", ":", "mgr", "=", "SoftLayer", ".", "NetworkManager", "(", "env", ".", "client", ")", "datacenters", "=", "mgr", ".", "summary_by_datacenter", "(", ")", "table", "=", "formatting", ".", "Table", "(", "COLUMNS"...
Account summary.
[ "Account", "summary", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/CLI/summary.py#L25-L44
1,557
softlayer/softlayer-python
SoftLayer/managers/ordering.py
OrderingManager.get_packages_of_type
def get_packages_of_type(self, package_types, mask=None): """Get packages that match a certain type. Each ordering package has a type, so return all packages that match the types we are looking for :param list package_types: List of strings representing the package ...
python
def get_packages_of_type(self, package_types, mask=None): """Get packages that match a certain type. Each ordering package has a type, so return all packages that match the types we are looking for :param list package_types: List of strings representing the package ...
[ "def", "get_packages_of_type", "(", "self", ",", "package_types", ",", "mask", "=", "None", ")", ":", "_filter", "=", "{", "'type'", ":", "{", "'keyName'", ":", "{", "'operation'", ":", "'in'", ",", "'options'", ":", "[", "{", "'name'", ":", "'data'", ...
Get packages that match a certain type. Each ordering package has a type, so return all packages that match the types we are looking for :param list package_types: List of strings representing the package type keynames we are interested in. :param str...
[ "Get", "packages", "that", "match", "a", "certain", "type", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/ordering.py#L40-L65
1,558
softlayer/softlayer-python
SoftLayer/managers/ordering.py
OrderingManager.filter_outlet_packages
def filter_outlet_packages(packages): """Remove packages designated as OUTLET. Those type of packages must be handled in a different way, and they are not supported at the moment. :param packages: Dictionary of packages. Name and description keys must be presen...
python
def filter_outlet_packages(packages): """Remove packages designated as OUTLET. Those type of packages must be handled in a different way, and they are not supported at the moment. :param packages: Dictionary of packages. Name and description keys must be presen...
[ "def", "filter_outlet_packages", "(", "packages", ")", ":", "non_outlet_packages", "=", "[", "]", "for", "package", "in", "packages", ":", "if", "all", "(", "[", "'OUTLET'", "not", "in", "package", ".", "get", "(", "'description'", ",", "''", ")", ".", "...
Remove packages designated as OUTLET. Those type of packages must be handled in a different way, and they are not supported at the moment. :param packages: Dictionary of packages. Name and description keys must be present in each of them.
[ "Remove", "packages", "designated", "as", "OUTLET", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/ordering.py#L68-L85
1,559
softlayer/softlayer-python
SoftLayer/managers/ordering.py
OrderingManager.get_only_active_packages
def get_only_active_packages(packages): """Return only active packages. If a package is active, it is eligible for ordering This will inspect the 'isActive' property on the provided packages :param packages: Dictionary of packages, isActive key must be present """ acti...
python
def get_only_active_packages(packages): """Return only active packages. If a package is active, it is eligible for ordering This will inspect the 'isActive' property on the provided packages :param packages: Dictionary of packages, isActive key must be present """ acti...
[ "def", "get_only_active_packages", "(", "packages", ")", ":", "active_packages", "=", "[", "]", "for", "package", "in", "packages", ":", "if", "package", "[", "'isActive'", "]", ":", "active_packages", ".", "append", "(", "package", ")", "return", "active_pack...
Return only active packages. If a package is active, it is eligible for ordering This will inspect the 'isActive' property on the provided packages :param packages: Dictionary of packages, isActive key must be present
[ "Return", "only", "active", "packages", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/ordering.py#L88-L103
1,560
softlayer/softlayer-python
SoftLayer/managers/ordering.py
OrderingManager.get_package_by_type
def get_package_by_type(self, package_type, mask=None): """Get a single package of a given type. Syntactic sugar to retrieve a single package of a given type. If multiple packages share the given type, this will return the first one returned by the API. If no packages are found,...
python
def get_package_by_type(self, package_type, mask=None): """Get a single package of a given type. Syntactic sugar to retrieve a single package of a given type. If multiple packages share the given type, this will return the first one returned by the API. If no packages are found,...
[ "def", "get_package_by_type", "(", "self", ",", "package_type", ",", "mask", "=", "None", ")", ":", "packages", "=", "self", ".", "get_packages_of_type", "(", "[", "package_type", "]", ",", "mask", ")", "if", "len", "(", "packages", ")", "==", "0", ":", ...
Get a single package of a given type. Syntactic sugar to retrieve a single package of a given type. If multiple packages share the given type, this will return the first one returned by the API. If no packages are found, returns None :param string package_type: representing the...
[ "Get", "a", "single", "package", "of", "a", "given", "type", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/ordering.py#L105-L119
1,561
softlayer/softlayer-python
SoftLayer/managers/ordering.py
OrderingManager.get_package_id_by_type
def get_package_id_by_type(self, package_type): """Return the package ID of a Product Package with a given type. :param string package_type: representing the package type key name we are interested in :raises ValueError: when no package of the given type is found """ mask = "ma...
python
def get_package_id_by_type(self, package_type): """Return the package ID of a Product Package with a given type. :param string package_type: representing the package type key name we are interested in :raises ValueError: when no package of the given type is found """ mask = "ma...
[ "def", "get_package_id_by_type", "(", "self", ",", "package_type", ")", ":", "mask", "=", "\"mask[id, name, description, isActive, type[keyName]]\"", "package", "=", "self", ".", "get_package_by_type", "(", "package_type", ",", "mask", ")", "if", "package", ":", "retu...
Return the package ID of a Product Package with a given type. :param string package_type: representing the package type key name we are interested in :raises ValueError: when no package of the given type is found
[ "Return", "the", "package", "ID", "of", "a", "Product", "Package", "with", "a", "given", "type", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/ordering.py#L121-L133
1,562
softlayer/softlayer-python
SoftLayer/managers/ordering.py
OrderingManager.get_quotes
def get_quotes(self): """Retrieve a list of active quotes. :returns: a list of SoftLayer_Billing_Order_Quote """ mask = "mask[order[id,items[id,package[id,keyName]]]]" quotes = self.client['Account'].getActiveQuotes(mask=mask) return quotes
python
def get_quotes(self): """Retrieve a list of active quotes. :returns: a list of SoftLayer_Billing_Order_Quote """ mask = "mask[order[id,items[id,package[id,keyName]]]]" quotes = self.client['Account'].getActiveQuotes(mask=mask) return quotes
[ "def", "get_quotes", "(", "self", ")", ":", "mask", "=", "\"mask[order[id,items[id,package[id,keyName]]]]\"", "quotes", "=", "self", ".", "client", "[", "'Account'", "]", ".", "getActiveQuotes", "(", "mask", "=", "mask", ")", "return", "quotes" ]
Retrieve a list of active quotes. :returns: a list of SoftLayer_Billing_Order_Quote
[ "Retrieve", "a", "list", "of", "active", "quotes", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/ordering.py#L135-L142
1,563
softlayer/softlayer-python
SoftLayer/managers/ordering.py
OrderingManager.get_quote_details
def get_quote_details(self, quote_id): """Retrieve quote details. :param quote_id: ID number of target quote """ mask = "mask[order[id,items[package[id,keyName]]]]" quote = self.client['Billing_Order_Quote'].getObject(id=quote_id, mask=mask) return quote
python
def get_quote_details(self, quote_id): """Retrieve quote details. :param quote_id: ID number of target quote """ mask = "mask[order[id,items[package[id,keyName]]]]" quote = self.client['Billing_Order_Quote'].getObject(id=quote_id, mask=mask) return quote
[ "def", "get_quote_details", "(", "self", ",", "quote_id", ")", ":", "mask", "=", "\"mask[order[id,items[package[id,keyName]]]]\"", "quote", "=", "self", ".", "client", "[", "'Billing_Order_Quote'", "]", ".", "getObject", "(", "id", "=", "quote_id", ",", "mask", ...
Retrieve quote details. :param quote_id: ID number of target quote
[ "Retrieve", "quote", "details", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/ordering.py#L144-L152
1,564
softlayer/softlayer-python
SoftLayer/managers/ordering.py
OrderingManager.get_order_container
def get_order_container(self, quote_id): """Generate an order container from a quote object. :param quote_id: ID number of target quote """ quote = self.client['Billing_Order_Quote'] container = quote.getRecalculatedOrderContainer(id=quote_id) return container
python
def get_order_container(self, quote_id): """Generate an order container from a quote object. :param quote_id: ID number of target quote """ quote = self.client['Billing_Order_Quote'] container = quote.getRecalculatedOrderContainer(id=quote_id) return container
[ "def", "get_order_container", "(", "self", ",", "quote_id", ")", ":", "quote", "=", "self", ".", "client", "[", "'Billing_Order_Quote'", "]", "container", "=", "quote", ".", "getRecalculatedOrderContainer", "(", "id", "=", "quote_id", ")", "return", "container" ...
Generate an order container from a quote object. :param quote_id: ID number of target quote
[ "Generate", "an", "order", "container", "from", "a", "quote", "object", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/ordering.py#L154-L162
1,565
softlayer/softlayer-python
SoftLayer/managers/ordering.py
OrderingManager.generate_order_template
def generate_order_template(self, quote_id, extra, quantity=1): """Generate a complete order template. :param int quote_id: ID of target quote :param dictionary extra: Overrides for the defaults of SoftLayer_Container_Product_Order :param int quantity: Number of items to order. ...
python
def generate_order_template(self, quote_id, extra, quantity=1): """Generate a complete order template. :param int quote_id: ID of target quote :param dictionary extra: Overrides for the defaults of SoftLayer_Container_Product_Order :param int quantity: Number of items to order. ...
[ "def", "generate_order_template", "(", "self", ",", "quote_id", ",", "extra", ",", "quantity", "=", "1", ")", ":", "if", "not", "isinstance", "(", "extra", ",", "dict", ")", ":", "raise", "ValueError", "(", "\"extra is not formatted properly\"", ")", "containe...
Generate a complete order template. :param int quote_id: ID of target quote :param dictionary extra: Overrides for the defaults of SoftLayer_Container_Product_Order :param int quantity: Number of items to order.
[ "Generate", "a", "complete", "order", "template", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/ordering.py#L164-L181
1,566
softlayer/softlayer-python
SoftLayer/managers/ordering.py
OrderingManager.verify_quote
def verify_quote(self, quote_id, extra): """Verifies that a quote order is valid. :: extras = { 'hardware': {'hostname': 'test', 'domain': 'testing.com'}, 'quantity': 2 } manager = ordering.OrderingManager(env.client) resu...
python
def verify_quote(self, quote_id, extra): """Verifies that a quote order is valid. :: extras = { 'hardware': {'hostname': 'test', 'domain': 'testing.com'}, 'quantity': 2 } manager = ordering.OrderingManager(env.client) resu...
[ "def", "verify_quote", "(", "self", ",", "quote_id", ",", "extra", ")", ":", "container", "=", "self", ".", "generate_order_template", "(", "quote_id", ",", "extra", ")", "clean_container", "=", "{", "}", "# There are a few fields that wil cause exceptions in the XML ...
Verifies that a quote order is valid. :: extras = { 'hardware': {'hostname': 'test', 'domain': 'testing.com'}, 'quantity': 2 } manager = ordering.OrderingManager(env.client) result = manager.verify_quote(12345, extras) :...
[ "Verifies", "that", "a", "quote", "order", "is", "valid", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/ordering.py#L183-L210
1,567
softlayer/softlayer-python
SoftLayer/managers/ordering.py
OrderingManager.order_quote
def order_quote(self, quote_id, extra): """Places an order using a quote :: extras = { 'hardware': {'hostname': 'test', 'domain': 'testing.com'}, 'quantity': 2 } manager = ordering.OrderingManager(env.client) result = mana...
python
def order_quote(self, quote_id, extra): """Places an order using a quote :: extras = { 'hardware': {'hostname': 'test', 'domain': 'testing.com'}, 'quantity': 2 } manager = ordering.OrderingManager(env.client) result = mana...
[ "def", "order_quote", "(", "self", ",", "quote_id", ",", "extra", ")", ":", "container", "=", "self", ".", "generate_order_template", "(", "quote_id", ",", "extra", ")", "return", "self", ".", "client", ".", "call", "(", "'SoftLayer_Billing_Order_Quote'", ",",...
Places an order using a quote :: extras = { 'hardware': {'hostname': 'test', 'domain': 'testing.com'}, 'quantity': 2 } manager = ordering.OrderingManager(env.client) result = manager.order_quote(12345, extras) :param int ...
[ "Places", "an", "order", "using", "a", "quote" ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/ordering.py#L212-L230
1,568
softlayer/softlayer-python
SoftLayer/managers/ordering.py
OrderingManager.get_package_by_key
def get_package_by_key(self, package_keyname, mask=None): """Get a single package with a given key. If no packages are found, returns None :param package_keyname: string representing the package key name we are interested in. :param string mask: Mask to specify the properties we want t...
python
def get_package_by_key(self, package_keyname, mask=None): """Get a single package with a given key. If no packages are found, returns None :param package_keyname: string representing the package key name we are interested in. :param string mask: Mask to specify the properties we want t...
[ "def", "get_package_by_key", "(", "self", ",", "package_keyname", ",", "mask", "=", "None", ")", ":", "_filter", "=", "{", "'keyName'", ":", "{", "'operation'", ":", "package_keyname", "}", "}", "packages", "=", "self", ".", "package_svc", ".", "getAllObject...
Get a single package with a given key. If no packages are found, returns None :param package_keyname: string representing the package key name we are interested in. :param string mask: Mask to specify the properties we want to retrieve
[ "Get", "a", "single", "package", "with", "a", "given", "key", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/ordering.py#L232-L246
1,569
softlayer/softlayer-python
SoftLayer/managers/ordering.py
OrderingManager.list_categories
def list_categories(self, package_keyname, **kwargs): """List the categories for the given package. :param str package_keyname: The package for which to get the categories. :returns: List of categories associated with the package """ get_kwargs = {} get_kwargs['mask'] = ...
python
def list_categories(self, package_keyname, **kwargs): """List the categories for the given package. :param str package_keyname: The package for which to get the categories. :returns: List of categories associated with the package """ get_kwargs = {} get_kwargs['mask'] = ...
[ "def", "list_categories", "(", "self", ",", "package_keyname", ",", "*", "*", "kwargs", ")", ":", "get_kwargs", "=", "{", "}", "get_kwargs", "[", "'mask'", "]", "=", "kwargs", ".", "get", "(", "'mask'", ",", "CATEGORY_MASK", ")", "if", "'filter'", "in", ...
List the categories for the given package. :param str package_keyname: The package for which to get the categories. :returns: List of categories associated with the package
[ "List", "the", "categories", "for", "the", "given", "package", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/ordering.py#L248-L262
1,570
softlayer/softlayer-python
SoftLayer/managers/ordering.py
OrderingManager.list_items
def list_items(self, package_keyname, **kwargs): """List the items for the given package. :param str package_keyname: The package for which to get the items. :returns: List of items in the package """ get_kwargs = {} get_kwargs['mask'] = kwargs.get('mask', ITEM_MASK) ...
python
def list_items(self, package_keyname, **kwargs): """List the items for the given package. :param str package_keyname: The package for which to get the items. :returns: List of items in the package """ get_kwargs = {} get_kwargs['mask'] = kwargs.get('mask', ITEM_MASK) ...
[ "def", "list_items", "(", "self", ",", "package_keyname", ",", "*", "*", "kwargs", ")", ":", "get_kwargs", "=", "{", "}", "get_kwargs", "[", "'mask'", "]", "=", "kwargs", ".", "get", "(", "'mask'", ",", "ITEM_MASK", ")", "if", "'filter'", "in", "kwargs...
List the items for the given package. :param str package_keyname: The package for which to get the items. :returns: List of items in the package
[ "List", "the", "items", "for", "the", "given", "package", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/ordering.py#L264-L279
1,571
softlayer/softlayer-python
SoftLayer/managers/ordering.py
OrderingManager.list_packages
def list_packages(self, **kwargs): """List active packages. :returns: List of active packages. """ get_kwargs = {} get_kwargs['mask'] = kwargs.get('mask', PACKAGE_MASK) if 'filter' in kwargs: get_kwargs['filter'] = kwargs['filter'] packages = self....
python
def list_packages(self, **kwargs): """List active packages. :returns: List of active packages. """ get_kwargs = {} get_kwargs['mask'] = kwargs.get('mask', PACKAGE_MASK) if 'filter' in kwargs: get_kwargs['filter'] = kwargs['filter'] packages = self....
[ "def", "list_packages", "(", "self", ",", "*", "*", "kwargs", ")", ":", "get_kwargs", "=", "{", "}", "get_kwargs", "[", "'mask'", "]", "=", "kwargs", ".", "get", "(", "'mask'", ",", "PACKAGE_MASK", ")", "if", "'filter'", "in", "kwargs", ":", "get_kwarg...
List active packages. :returns: List of active packages.
[ "List", "active", "packages", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/ordering.py#L281-L295
1,572
softlayer/softlayer-python
SoftLayer/managers/ordering.py
OrderingManager.list_presets
def list_presets(self, package_keyname, **kwargs): """Gets active presets for the given package. :param str package_keyname: The package for which to get presets :returns: A list of package presets that can be used for ordering """ get_kwargs = {} get_kwargs['mask'] = k...
python
def list_presets(self, package_keyname, **kwargs): """Gets active presets for the given package. :param str package_keyname: The package for which to get presets :returns: A list of package presets that can be used for ordering """ get_kwargs = {} get_kwargs['mask'] = k...
[ "def", "list_presets", "(", "self", ",", "package_keyname", ",", "*", "*", "kwargs", ")", ":", "get_kwargs", "=", "{", "}", "get_kwargs", "[", "'mask'", "]", "=", "kwargs", ".", "get", "(", "'mask'", ",", "PRESET_MASK", ")", "if", "'filter'", "in", "kw...
Gets active presets for the given package. :param str package_keyname: The package for which to get presets :returns: A list of package presets that can be used for ordering
[ "Gets", "active", "presets", "for", "the", "given", "package", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/ordering.py#L297-L313
1,573
softlayer/softlayer-python
SoftLayer/managers/ordering.py
OrderingManager.get_preset_by_key
def get_preset_by_key(self, package_keyname, preset_keyname, mask=None): """Gets a single preset with the given key.""" preset_operation = '_= %s' % preset_keyname _filter = { 'activePresets': { 'keyName': { 'operation': preset_operation ...
python
def get_preset_by_key(self, package_keyname, preset_keyname, mask=None): """Gets a single preset with the given key.""" preset_operation = '_= %s' % preset_keyname _filter = { 'activePresets': { 'keyName': { 'operation': preset_operation ...
[ "def", "get_preset_by_key", "(", "self", ",", "package_keyname", ",", "preset_keyname", ",", "mask", "=", "None", ")", ":", "preset_operation", "=", "'_= %s'", "%", "preset_keyname", "_filter", "=", "{", "'activePresets'", ":", "{", "'keyName'", ":", "{", "'op...
Gets a single preset with the given key.
[ "Gets", "a", "single", "preset", "with", "the", "given", "key", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/ordering.py#L315-L338
1,574
softlayer/softlayer-python
SoftLayer/managers/ordering.py
OrderingManager.get_price_id_list
def get_price_id_list(self, package_keyname, item_keynames, core=None): """Converts a list of item keynames to a list of price IDs. This function is used to convert a list of item keynames into a list of price IDs that are used in the Product_Order verifyOrder() and placeOrder() functio...
python
def get_price_id_list(self, package_keyname, item_keynames, core=None): """Converts a list of item keynames to a list of price IDs. This function is used to convert a list of item keynames into a list of price IDs that are used in the Product_Order verifyOrder() and placeOrder() functio...
[ "def", "get_price_id_list", "(", "self", ",", "package_keyname", ",", "item_keynames", ",", "core", "=", "None", ")", ":", "mask", "=", "'id, itemCategory, keyName, prices[categories]'", "items", "=", "self", ".", "list_items", "(", "package_keyname", ",", "mask", ...
Converts a list of item keynames to a list of price IDs. This function is used to convert a list of item keynames into a list of price IDs that are used in the Product_Order verifyOrder() and placeOrder() functions. :param str package_keyname: The package associated with the prices ...
[ "Converts", "a", "list", "of", "item", "keynames", "to", "a", "list", "of", "price", "IDs", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/ordering.py#L340-L389
1,575
softlayer/softlayer-python
SoftLayer/managers/ordering.py
OrderingManager.get_item_price_id
def get_item_price_id(core, prices): """get item price id""" price_id = None for price in prices: if not price['locationGroupId']: capacity_min = int(price.get('capacityRestrictionMinimum', -1)) capacity_max = int(price.get('capacityRestrictionMaximum'...
python
def get_item_price_id(core, prices): """get item price id""" price_id = None for price in prices: if not price['locationGroupId']: capacity_min = int(price.get('capacityRestrictionMinimum', -1)) capacity_max = int(price.get('capacityRestrictionMaximum'...
[ "def", "get_item_price_id", "(", "core", ",", "prices", ")", ":", "price_id", "=", "None", "for", "price", "in", "prices", ":", "if", "not", "price", "[", "'locationGroupId'", "]", ":", "capacity_min", "=", "int", "(", "price", ".", "get", "(", "'capacit...
get item price id
[ "get", "item", "price", "id" ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/ordering.py#L392-L405
1,576
softlayer/softlayer-python
SoftLayer/managers/ordering.py
OrderingManager.get_preset_prices
def get_preset_prices(self, preset): """Get preset item prices. Retrieve a SoftLayer_Product_Package_Preset record. :param int preset: preset identifier. :returns: A list of price IDs associated with the given preset_id. """ mask = 'mask[prices[item]]' prices ...
python
def get_preset_prices(self, preset): """Get preset item prices. Retrieve a SoftLayer_Product_Package_Preset record. :param int preset: preset identifier. :returns: A list of price IDs associated with the given preset_id. """ mask = 'mask[prices[item]]' prices ...
[ "def", "get_preset_prices", "(", "self", ",", "preset", ")", ":", "mask", "=", "'mask[prices[item]]'", "prices", "=", "self", ".", "package_preset", ".", "getObject", "(", "id", "=", "preset", ",", "mask", "=", "mask", ")", "return", "prices" ]
Get preset item prices. Retrieve a SoftLayer_Product_Package_Preset record. :param int preset: preset identifier. :returns: A list of price IDs associated with the given preset_id.
[ "Get", "preset", "item", "prices", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/ordering.py#L407-L419
1,577
softlayer/softlayer-python
SoftLayer/managers/ordering.py
OrderingManager.get_item_prices
def get_item_prices(self, package_id): """Get item prices. Retrieve a SoftLayer_Product_Package item prices record. :param int package_id: package identifier. :returns: A list of price IDs associated with the given package. """ mask = 'mask[pricingLocationGroup[locatio...
python
def get_item_prices(self, package_id): """Get item prices. Retrieve a SoftLayer_Product_Package item prices record. :param int package_id: package identifier. :returns: A list of price IDs associated with the given package. """ mask = 'mask[pricingLocationGroup[locatio...
[ "def", "get_item_prices", "(", "self", ",", "package_id", ")", ":", "mask", "=", "'mask[pricingLocationGroup[locations]]'", "prices", "=", "self", ".", "package_svc", ".", "getItemPrices", "(", "id", "=", "package_id", ",", "mask", "=", "mask", ")", "return", ...
Get item prices. Retrieve a SoftLayer_Product_Package item prices record. :param int package_id: package identifier. :returns: A list of price IDs associated with the given package.
[ "Get", "item", "prices", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/ordering.py#L421-L433
1,578
softlayer/softlayer-python
SoftLayer/managers/ordering.py
OrderingManager.verify_order
def verify_order(self, package_keyname, location, item_keynames, complex_type=None, hourly=True, preset_keyname=None, extras=None, quantity=1): """Verifies an order with the given package and prices. This function takes in parameters needed for an order and verifies the order ...
python
def verify_order(self, package_keyname, location, item_keynames, complex_type=None, hourly=True, preset_keyname=None, extras=None, quantity=1): """Verifies an order with the given package and prices. This function takes in parameters needed for an order and verifies the order ...
[ "def", "verify_order", "(", "self", ",", "package_keyname", ",", "location", ",", "item_keynames", ",", "complex_type", "=", "None", ",", "hourly", "=", "True", ",", "preset_keyname", "=", "None", ",", "extras", "=", "None", ",", "quantity", "=", "1", ")",...
Verifies an order with the given package and prices. This function takes in parameters needed for an order and verifies the order to ensure the given items are compatible with the given package. :param str package_keyname: The keyname for the package being ordered :param str location: ...
[ "Verifies", "an", "order", "with", "the", "given", "package", "and", "prices", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/ordering.py#L435-L464
1,579
softlayer/softlayer-python
SoftLayer/managers/ordering.py
OrderingManager.place_order
def place_order(self, package_keyname, location, item_keynames, complex_type=None, hourly=True, preset_keyname=None, extras=None, quantity=1): """Places an order with the given package and prices. This function takes in parameters needed for an order and places the order. :...
python
def place_order(self, package_keyname, location, item_keynames, complex_type=None, hourly=True, preset_keyname=None, extras=None, quantity=1): """Places an order with the given package and prices. This function takes in parameters needed for an order and places the order. :...
[ "def", "place_order", "(", "self", ",", "package_keyname", ",", "location", ",", "item_keynames", ",", "complex_type", "=", "None", ",", "hourly", "=", "True", ",", "preset_keyname", "=", "None", ",", "extras", "=", "None", ",", "quantity", "=", "1", ")", ...
Places an order with the given package and prices. This function takes in parameters needed for an order and places the order. :param str package_keyname: The keyname for the package being ordered :param str location: The datacenter location string for ordering (Ex: DALLAS13) :param li...
[ "Places", "an", "order", "with", "the", "given", "package", "and", "prices", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/ordering.py#L466-L494
1,580
softlayer/softlayer-python
SoftLayer/managers/ordering.py
OrderingManager.place_quote
def place_quote(self, package_keyname, location, item_keynames, complex_type=None, preset_keyname=None, extras=None, quantity=1, quote_name=None, send_email=False): """Place a quote with the given package and prices. This function takes in parameters needed for an order and places t...
python
def place_quote(self, package_keyname, location, item_keynames, complex_type=None, preset_keyname=None, extras=None, quantity=1, quote_name=None, send_email=False): """Place a quote with the given package and prices. This function takes in parameters needed for an order and places t...
[ "def", "place_quote", "(", "self", ",", "package_keyname", ",", "location", ",", "item_keynames", ",", "complex_type", "=", "None", ",", "preset_keyname", "=", "None", ",", "extras", "=", "None", ",", "quantity", "=", "1", ",", "quote_name", "=", "None", "...
Place a quote with the given package and prices. This function takes in parameters needed for an order and places the quote. :param str package_keyname: The keyname for the package being ordered :param str location: The datacenter location string for ordering (Ex: DALLAS13) :param list...
[ "Place", "a", "quote", "with", "the", "given", "package", "and", "prices", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/ordering.py#L496-L527
1,581
softlayer/softlayer-python
SoftLayer/managers/ordering.py
OrderingManager.generate_order
def generate_order(self, package_keyname, location, item_keynames, complex_type=None, hourly=True, preset_keyname=None, extras=None, quantity=1): """Generates an order with the given package and prices. This function takes in parameters needed for an order and generates an order ...
python
def generate_order(self, package_keyname, location, item_keynames, complex_type=None, hourly=True, preset_keyname=None, extras=None, quantity=1): """Generates an order with the given package and prices. This function takes in parameters needed for an order and generates an order ...
[ "def", "generate_order", "(", "self", ",", "package_keyname", ",", "location", ",", "item_keynames", ",", "complex_type", "=", "None", ",", "hourly", "=", "True", ",", "preset_keyname", "=", "None", ",", "extras", "=", "None", ",", "quantity", "=", "1", ")...
Generates an order with the given package and prices. This function takes in parameters needed for an order and generates an order dictionary. This dictionary can then be used in either verify or placeOrder(). :param str package_keyname: The keyname for the package being ordered :param...
[ "Generates", "an", "order", "with", "the", "given", "package", "and", "prices", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/ordering.py#L529-L588
1,582
softlayer/softlayer-python
SoftLayer/managers/ordering.py
OrderingManager.package_locations
def package_locations(self, package_keyname): """List datacenter locations for a package keyname :param str package_keyname: The package for which to get the items. :returns: List of locations a package is orderable in """ mask = "mask[description, keyname, locations]" ...
python
def package_locations(self, package_keyname): """List datacenter locations for a package keyname :param str package_keyname: The package for which to get the items. :returns: List of locations a package is orderable in """ mask = "mask[description, keyname, locations]" ...
[ "def", "package_locations", "(", "self", ",", "package_keyname", ")", ":", "mask", "=", "\"mask[description, keyname, locations]\"", "package", "=", "self", ".", "get_package_by_key", "(", "package_keyname", ",", "mask", "=", "'id'", ")", "regions", "=", "self", "...
List datacenter locations for a package keyname :param str package_keyname: The package for which to get the items. :returns: List of locations a package is orderable in
[ "List", "datacenter", "locations", "for", "a", "package", "keyname" ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/ordering.py#L590-L601
1,583
softlayer/softlayer-python
SoftLayer/managers/ordering.py
OrderingManager.get_location_id
def get_location_id(self, location): """Finds the location ID of a given datacenter This is mostly used so either a dc name, or regions keyname can be used when ordering :param str location: Region Keyname (DALLAS13) or datacenter name (dal13) :returns: integer id of the datacenter ...
python
def get_location_id(self, location): """Finds the location ID of a given datacenter This is mostly used so either a dc name, or regions keyname can be used when ordering :param str location: Region Keyname (DALLAS13) or datacenter name (dal13) :returns: integer id of the datacenter ...
[ "def", "get_location_id", "(", "self", ",", "location", ")", ":", "if", "isinstance", "(", "location", ",", "int", ")", ":", "return", "location", "mask", "=", "\"mask[id,name,regions[keyname]]\"", "if", "match", "(", "r'[a-zA-Z]{3}[0-9]{2}'", ",", "location", "...
Finds the location ID of a given datacenter This is mostly used so either a dc name, or regions keyname can be used when ordering :param str location: Region Keyname (DALLAS13) or datacenter name (dal13) :returns: integer id of the datacenter
[ "Finds", "the", "location", "ID", "of", "a", "given", "datacenter" ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/ordering.py#L603-L621
1,584
softlayer/softlayer-python
SoftLayer/managers/network.py
NetworkManager.add_global_ip
def add_global_ip(self, version=4, test_order=False): """Adds a global IP address to the account. :param int version: Specifies whether this is IPv4 or IPv6 :param bool test_order: If true, this will only verify the order. """ # This method is here to improve the public interfac...
python
def add_global_ip(self, version=4, test_order=False): """Adds a global IP address to the account. :param int version: Specifies whether this is IPv4 or IPv6 :param bool test_order: If true, this will only verify the order. """ # This method is here to improve the public interfac...
[ "def", "add_global_ip", "(", "self", ",", "version", "=", "4", ",", "test_order", "=", "False", ")", ":", "# This method is here to improve the public interface from a user's", "# perspective since ordering a single global IP through the subnet", "# interface is not intuitive.", "r...
Adds a global IP address to the account. :param int version: Specifies whether this is IPv4 or IPv6 :param bool test_order: If true, this will only verify the order.
[ "Adds", "a", "global", "IP", "address", "to", "the", "account", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/network.py#L58-L68
1,585
softlayer/softlayer-python
SoftLayer/managers/network.py
NetworkManager.add_securitygroup_rule
def add_securitygroup_rule(self, group_id, remote_ip=None, remote_group=None, direction=None, ethertype=None, port_max=None, port_min=None, protocol=None): """Add a rule to a security group :param int group_id:...
python
def add_securitygroup_rule(self, group_id, remote_ip=None, remote_group=None, direction=None, ethertype=None, port_max=None, port_min=None, protocol=None): """Add a rule to a security group :param int group_id:...
[ "def", "add_securitygroup_rule", "(", "self", ",", "group_id", ",", "remote_ip", "=", "None", ",", "remote_group", "=", "None", ",", "direction", "=", "None", ",", "ethertype", "=", "None", ",", "port_max", "=", "None", ",", "port_min", "=", "None", ",", ...
Add a rule to a security group :param int group_id: The ID of the security group to add this rule to :param str remote_ip: The remote IP or CIDR to enforce the rule on :param int remote_group: The remote security group ID to enforce the rule on :param st...
[ "Add", "a", "rule", "to", "a", "security", "group" ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/network.py#L70-L101
1,586
softlayer/softlayer-python
SoftLayer/managers/network.py
NetworkManager.add_securitygroup_rules
def add_securitygroup_rules(self, group_id, rules): """Add rules to a security group :param int group_id: The ID of the security group to add the rules to :param list rules: The list of rule dictionaries to add """ if not isinstance(rules, list): raise TypeError("The...
python
def add_securitygroup_rules(self, group_id, rules): """Add rules to a security group :param int group_id: The ID of the security group to add the rules to :param list rules: The list of rule dictionaries to add """ if not isinstance(rules, list): raise TypeError("The...
[ "def", "add_securitygroup_rules", "(", "self", ",", "group_id", ",", "rules", ")", ":", "if", "not", "isinstance", "(", "rules", ",", "list", ")", ":", "raise", "TypeError", "(", "\"The rules provided must be a list of dictionaries\"", ")", "return", "self", ".", ...
Add rules to a security group :param int group_id: The ID of the security group to add the rules to :param list rules: The list of rule dictionaries to add
[ "Add", "rules", "to", "a", "security", "group" ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/network.py#L103-L111
1,587
softlayer/softlayer-python
SoftLayer/managers/network.py
NetworkManager.add_subnet
def add_subnet(self, subnet_type, quantity=None, vlan_id=None, version=4, test_order=False): """Orders a new subnet :param str subnet_type: Type of subnet to add: private, public, global :param int quantity: Number of IPs in the subnet :param int vlan_id: VLAN id for ...
python
def add_subnet(self, subnet_type, quantity=None, vlan_id=None, version=4, test_order=False): """Orders a new subnet :param str subnet_type: Type of subnet to add: private, public, global :param int quantity: Number of IPs in the subnet :param int vlan_id: VLAN id for ...
[ "def", "add_subnet", "(", "self", ",", "subnet_type", ",", "quantity", "=", "None", ",", "vlan_id", "=", "None", ",", "version", "=", "4", ",", "test_order", "=", "False", ")", ":", "package", "=", "self", ".", "client", "[", "'Product_Package'", "]", ...
Orders a new subnet :param str subnet_type: Type of subnet to add: private, public, global :param int quantity: Number of IPs in the subnet :param int vlan_id: VLAN id for the subnet to be placed into :param int version: 4 for IPv4, 6 for IPv6 :param bool test_order: If true, th...
[ "Orders", "a", "new", "subnet" ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/network.py#L113-L171
1,588
softlayer/softlayer-python
SoftLayer/managers/network.py
NetworkManager.assign_global_ip
def assign_global_ip(self, global_ip_id, target): """Assigns a global IP address to a specified target. :param int global_ip_id: The ID of the global IP being assigned :param string target: The IP address to assign """ return self.client['Network_Subnet_IpAddress_Global'].route(...
python
def assign_global_ip(self, global_ip_id, target): """Assigns a global IP address to a specified target. :param int global_ip_id: The ID of the global IP being assigned :param string target: The IP address to assign """ return self.client['Network_Subnet_IpAddress_Global'].route(...
[ "def", "assign_global_ip", "(", "self", ",", "global_ip_id", ",", "target", ")", ":", "return", "self", ".", "client", "[", "'Network_Subnet_IpAddress_Global'", "]", ".", "route", "(", "target", ",", "id", "=", "global_ip_id", ")" ]
Assigns a global IP address to a specified target. :param int global_ip_id: The ID of the global IP being assigned :param string target: The IP address to assign
[ "Assigns", "a", "global", "IP", "address", "to", "a", "specified", "target", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/network.py#L173-L180
1,589
softlayer/softlayer-python
SoftLayer/managers/network.py
NetworkManager.attach_securitygroup_components
def attach_securitygroup_components(self, group_id, component_ids): """Attaches network components to a security group. :param int group_id: The ID of the security group :param list component_ids: The IDs of the network components to attach """ return self.security_group.attachN...
python
def attach_securitygroup_components(self, group_id, component_ids): """Attaches network components to a security group. :param int group_id: The ID of the security group :param list component_ids: The IDs of the network components to attach """ return self.security_group.attachN...
[ "def", "attach_securitygroup_components", "(", "self", ",", "group_id", ",", "component_ids", ")", ":", "return", "self", ".", "security_group", ".", "attachNetworkComponents", "(", "component_ids", ",", "id", "=", "group_id", ")" ]
Attaches network components to a security group. :param int group_id: The ID of the security group :param list component_ids: The IDs of the network components to attach
[ "Attaches", "network", "components", "to", "a", "security", "group", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/network.py#L191-L198
1,590
softlayer/softlayer-python
SoftLayer/managers/network.py
NetworkManager.cancel_global_ip
def cancel_global_ip(self, global_ip_id): """Cancels the specified global IP address. :param int id: The ID of the global IP to be cancelled. """ service = self.client['Network_Subnet_IpAddress_Global'] ip_address = service.getObject(id=global_ip_id, mask='billingItem') ...
python
def cancel_global_ip(self, global_ip_id): """Cancels the specified global IP address. :param int id: The ID of the global IP to be cancelled. """ service = self.client['Network_Subnet_IpAddress_Global'] ip_address = service.getObject(id=global_ip_id, mask='billingItem') ...
[ "def", "cancel_global_ip", "(", "self", ",", "global_ip_id", ")", ":", "service", "=", "self", ".", "client", "[", "'Network_Subnet_IpAddress_Global'", "]", "ip_address", "=", "service", ".", "getObject", "(", "id", "=", "global_ip_id", ",", "mask", "=", "'bil...
Cancels the specified global IP address. :param int id: The ID of the global IP to be cancelled.
[ "Cancels", "the", "specified", "global", "IP", "address", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/network.py#L200-L209
1,591
softlayer/softlayer-python
SoftLayer/managers/network.py
NetworkManager.cancel_subnet
def cancel_subnet(self, subnet_id): """Cancels the specified subnet. :param int subnet_id: The ID of the subnet to be cancelled. """ subnet = self.get_subnet(subnet_id, mask='id, billingItem.id') if "billingItem" not in subnet: raise exceptions.SoftLayerError("subnet...
python
def cancel_subnet(self, subnet_id): """Cancels the specified subnet. :param int subnet_id: The ID of the subnet to be cancelled. """ subnet = self.get_subnet(subnet_id, mask='id, billingItem.id') if "billingItem" not in subnet: raise exceptions.SoftLayerError("subnet...
[ "def", "cancel_subnet", "(", "self", ",", "subnet_id", ")", ":", "subnet", "=", "self", ".", "get_subnet", "(", "subnet_id", ",", "mask", "=", "'id, billingItem.id'", ")", "if", "\"billingItem\"", "not", "in", "subnet", ":", "raise", "exceptions", ".", "Soft...
Cancels the specified subnet. :param int subnet_id: The ID of the subnet to be cancelled.
[ "Cancels", "the", "specified", "subnet", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/network.py#L211-L221
1,592
softlayer/softlayer-python
SoftLayer/managers/network.py
NetworkManager.create_securitygroup
def create_securitygroup(self, name=None, description=None): """Creates a security group. :param string name: The name of the security group :param string description: The description of the security group """ create_dict = {'name': name, 'description': description} ret...
python
def create_securitygroup(self, name=None, description=None): """Creates a security group. :param string name: The name of the security group :param string description: The description of the security group """ create_dict = {'name': name, 'description': description} ret...
[ "def", "create_securitygroup", "(", "self", ",", "name", "=", "None", ",", "description", "=", "None", ")", ":", "create_dict", "=", "{", "'name'", ":", "name", ",", "'description'", ":", "description", "}", "return", "self", ".", "security_group", ".", "c...
Creates a security group. :param string name: The name of the security group :param string description: The description of the security group
[ "Creates", "a", "security", "group", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/network.py#L223-L231
1,593
softlayer/softlayer-python
SoftLayer/managers/network.py
NetworkManager.detach_securitygroup_components
def detach_securitygroup_components(self, group_id, component_ids): """Detaches network components from a security group. :param int group_id: The ID of the security group :param list component_ids: The IDs of the network components to detach """ return self.security_group.detac...
python
def detach_securitygroup_components(self, group_id, component_ids): """Detaches network components from a security group. :param int group_id: The ID of the security group :param list component_ids: The IDs of the network components to detach """ return self.security_group.detac...
[ "def", "detach_securitygroup_components", "(", "self", ",", "group_id", ",", "component_ids", ")", ":", "return", "self", ".", "security_group", ".", "detachNetworkComponents", "(", "component_ids", ",", "id", "=", "group_id", ")" ]
Detaches network components from a security group. :param int group_id: The ID of the security group :param list component_ids: The IDs of the network components to detach
[ "Detaches", "network", "components", "from", "a", "security", "group", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/network.py#L248-L255
1,594
softlayer/softlayer-python
SoftLayer/managers/network.py
NetworkManager.edit_rwhois
def edit_rwhois(self, abuse_email=None, address1=None, address2=None, city=None, company_name=None, country=None, first_name=None, last_name=None, postal_code=None, private_residence=None, state=None): """Edit rwhois record.""" update = {} ...
python
def edit_rwhois(self, abuse_email=None, address1=None, address2=None, city=None, company_name=None, country=None, first_name=None, last_name=None, postal_code=None, private_residence=None, state=None): """Edit rwhois record.""" update = {} ...
[ "def", "edit_rwhois", "(", "self", ",", "abuse_email", "=", "None", ",", "address1", "=", "None", ",", "address2", "=", "None", ",", "city", "=", "None", ",", "company_name", "=", "None", ",", "country", "=", "None", ",", "first_name", "=", "None", ","...
Edit rwhois record.
[ "Edit", "rwhois", "record", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/network.py#L257-L283
1,595
softlayer/softlayer-python
SoftLayer/managers/network.py
NetworkManager.edit_securitygroup
def edit_securitygroup(self, group_id, name=None, description=None): """Edit security group details. :param int group_id: The ID of the security group :param string name: The name of the security group :param string description: The description of the security group """ ...
python
def edit_securitygroup(self, group_id, name=None, description=None): """Edit security group details. :param int group_id: The ID of the security group :param string name: The name of the security group :param string description: The description of the security group """ ...
[ "def", "edit_securitygroup", "(", "self", ",", "group_id", ",", "name", "=", "None", ",", "description", "=", "None", ")", ":", "successful", "=", "False", "obj", "=", "{", "}", "if", "name", ":", "obj", "[", "'name'", "]", "=", "name", "if", "descri...
Edit security group details. :param int group_id: The ID of the security group :param string name: The name of the security group :param string description: The description of the security group
[ "Edit", "security", "group", "details", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/network.py#L285-L302
1,596
softlayer/softlayer-python
SoftLayer/managers/network.py
NetworkManager.edit_securitygroup_rule
def edit_securitygroup_rule(self, group_id, rule_id, remote_ip=None, remote_group=None, direction=None, ethertype=None, port_max=None, port_min=None, protocol=None): """Edit a security group rule. :param int...
python
def edit_securitygroup_rule(self, group_id, rule_id, remote_ip=None, remote_group=None, direction=None, ethertype=None, port_max=None, port_min=None, protocol=None): """Edit a security group rule. :param int...
[ "def", "edit_securitygroup_rule", "(", "self", ",", "group_id", ",", "rule_id", ",", "remote_ip", "=", "None", ",", "remote_group", "=", "None", ",", "direction", "=", "None", ",", "ethertype", "=", "None", ",", "port_max", "=", "None", ",", "port_min", "=...
Edit a security group rule. :param int group_id: The ID of the security group the rule belongs to :param int rule_id: The ID of the rule to edit :param str remote_ip: The remote IP or CIDR to enforce the rule on :param int remote_group: The remote security group ID to enforce ...
[ "Edit", "a", "security", "group", "rule", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/network.py#L304-L342
1,597
softlayer/softlayer-python
SoftLayer/managers/network.py
NetworkManager.ip_lookup
def ip_lookup(self, ip_address): """Looks up an IP address and returns network information about it. :param string ip_address: An IP address. Can be IPv4 or IPv6 :returns: A dictionary of information about the IP """ obj = self.client['Network_Subnet_IpAddress'] return ...
python
def ip_lookup(self, ip_address): """Looks up an IP address and returns network information about it. :param string ip_address: An IP address. Can be IPv4 or IPv6 :returns: A dictionary of information about the IP """ obj = self.client['Network_Subnet_IpAddress'] return ...
[ "def", "ip_lookup", "(", "self", ",", "ip_address", ")", ":", "obj", "=", "self", ".", "client", "[", "'Network_Subnet_IpAddress'", "]", "return", "obj", ".", "getByIpAddress", "(", "ip_address", ",", "mask", "=", "'hardware, virtualGuest'", ")" ]
Looks up an IP address and returns network information about it. :param string ip_address: An IP address. Can be IPv4 or IPv6 :returns: A dictionary of information about the IP
[ "Looks", "up", "an", "IP", "address", "and", "returns", "network", "information", "about", "it", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/network.py#L344-L352
1,598
softlayer/softlayer-python
SoftLayer/managers/network.py
NetworkManager.get_securitygroup
def get_securitygroup(self, group_id, **kwargs): """Returns the information about the given security group. :param string id: The ID for the security group :returns: A diction of information about the security group """ if 'mask' not in kwargs: kwargs['mask'] = ( ...
python
def get_securitygroup(self, group_id, **kwargs): """Returns the information about the given security group. :param string id: The ID for the security group :returns: A diction of information about the security group """ if 'mask' not in kwargs: kwargs['mask'] = ( ...
[ "def", "get_securitygroup", "(", "self", ",", "group_id", ",", "*", "*", "kwargs", ")", ":", "if", "'mask'", "not", "in", "kwargs", ":", "kwargs", "[", "'mask'", "]", "=", "(", "'id,'", "'name,'", "'description,'", "'''rules[id, remoteIp, remoteGroupId,\n ...
Returns the information about the given security group. :param string id: The ID for the security group :returns: A diction of information about the security group
[ "Returns", "the", "information", "about", "the", "given", "security", "group", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/network.py#L361-L389
1,599
softlayer/softlayer-python
SoftLayer/managers/network.py
NetworkManager.get_subnet
def get_subnet(self, subnet_id, **kwargs): """Returns information about a single subnet. :param string id: Either the ID for the subnet or its network identifier :returns: A dictionary of information about the subnet """ if 'mask' not in kwargs: ...
python
def get_subnet(self, subnet_id, **kwargs): """Returns information about a single subnet. :param string id: Either the ID for the subnet or its network identifier :returns: A dictionary of information about the subnet """ if 'mask' not in kwargs: ...
[ "def", "get_subnet", "(", "self", ",", "subnet_id", ",", "*", "*", "kwargs", ")", ":", "if", "'mask'", "not", "in", "kwargs", ":", "kwargs", "[", "'mask'", "]", "=", "DEFAULT_SUBNET_MASK", "return", "self", ".", "subnet", ".", "getObject", "(", "id", "...
Returns information about a single subnet. :param string id: Either the ID for the subnet or its network identifier :returns: A dictionary of information about the subnet
[ "Returns", "information", "about", "a", "single", "subnet", "." ]
9f181be08cc3668353b05a6de0cb324f52cff6fa
https://github.com/softlayer/softlayer-python/blob/9f181be08cc3668353b05a6de0cb324f52cff6fa/SoftLayer/managers/network.py#L391-L401