Search is not available for this dataset
text
stringlengths
75
104k
def edit_dedicated_fwl_rules(self, firewall_id, rules): """Edit the rules for dedicated firewall. :param integer firewall_id: the instance ID of the dedicated firewall :param list rules: the rules to be pushed on the firewall as defined by SoftLayer_Network_Firewall_U...
def edit_standard_fwl_rules(self, firewall_id, rules): """Edit the rules for standard firewall. :param integer firewall_id: the instance ID of the standard firewall :param dict rules: the rules to be pushed on the firewall """ rule_svc = self.client['Network_Firewall_Update_Req...
def get_request(self, request): """Sets token-based auth headers.""" request.headers['authenticate'] = { 'complexType': 'PortalLoginToken', 'userId': self.user_id, 'authToken': self.auth_token, } return request
def get_request(self, request): """Sets token-based auth headers.""" request.headers['authenticate'] = { 'username': self.username, 'apiKey': self.api_key, } return request
def get_request(self, request): """Sets token-based auth headers.""" request.transport_user = self.username request.transport_password = self.api_key return request
def cli(env, identifier, name, note, tag): """Edit details of an image.""" image_mgr = SoftLayer.ImageManager(env.client) data = {} if name: data['name'] = name if note: data['note'] = note if tag: data['tag'] = tag image_id = helpers.resolve_id(image_mgr.resolve_ids...
def cli(env, identifier, hardware_identifier, virtual_identifier): """Attach devices to a ticket.""" ticket_mgr = SoftLayer.TicketManager(env.client) if hardware_identifier and virtual_identifier: raise exceptions.ArgumentError("Cannot attach hardware and a virtual server at the same time") if...
def get(self, name, param=None): """Retreive a metadata attribute. :param string name: name of the attribute to retrieve. See `attribs` :param param: Required parameter for some attributes """ if name not in self.attribs: raise exceptions.SoftLayerError('Unknown met...
def _get_network(self, kind, router=True, vlans=True, vlan_ids=True): """Wrapper for getting details about networks. :param string kind: network kind. Typically 'public' or 'private' :param boolean router: flag to include router information :param boolean vlans: flag to incl...
def cli(env): """Print environment variables.""" filtered_vars = dict([(k, v) for k, v in env.vars.items() if not k.startswith('_')]) env.fout(formatting.iter_to_table(filtered_vars))
def cli(env, volume_id, snapshot_id): """Restore block volume using a given snapshot""" block_manager = SoftLayer.BlockStorageManager(env.client) success = block_manager.restore_from_snapshot(volume_id, snapshot_id) if success: click.echo('Block volume %s is being restored using snapshot %s' ...
def cli(env, crt, csr, icc, key, notes): """Add and upload SSL certificate details.""" template = { 'intermediateCertificate': '', 'certificateSigningRequest': '', 'notes': notes, } template['certificate'] = open(crt).read() template['privateKey'] = open(key).read() if c...
def cli(env, identifier, price=False, guests=False): """Get details for a virtual server.""" dhost = SoftLayer.DedicatedHostManager(env.client) table = formatting.KeyValueTable(['name', 'value']) table.align['name'] = 'r' table.align['value'] = 'l' result = dhost.get_host(identifier) resul...
def cli(env, identifier, uri, ibm_api_key): """Export an image to object storage. The URI for an object storage object (.vhd/.iso file) of the format: swift://<objectStorageAccount>@<cluster>/<container>/<objectPath> or cos://<regionName>/<bucketName>/<objectPath> if using IBM Cloud Object Storage ...
def cli(env, limit, closed=False, get_all=False): """Invoices and all that mess""" manager = AccountManager(env.client) invoices = manager.get_invoices(limit, closed, get_all) table = formatting.Table([ "Id", "Created", "Type", "Status", "Starting Balance", "Ending Balance", "Invoice Amount", ...
def convert(self, value, param, ctx): # pylint: disable=inconsistent-return-statements """Validate memory argument. Returns the memory value in megabytes.""" matches = MEMORY_RE.match(value.lower()) if matches is None: self.fail('%s is not a valid value for memory amount' % value, p...
def cli(env, identifier): """List NAS account credentials.""" nw_mgr = SoftLayer.NetworkManager(env.client) result = nw_mgr.get_nas_credentials(identifier) table = formatting.Table(['username', 'password']) table.add_row([result.get('username', 'None'), result.get('password', 'No...
def cli(env, identifier): """Detail firewall.""" mgr = SoftLayer.FirewallManager(env.client) firewall_type, firewall_id = firewall.parse_id(identifier) if firewall_type == 'vlan': rules = mgr.get_dedicated_fwl_rules(firewall_id) else: rules = mgr.get_standard_fwl_rules(firewall_id)...
def get_rules_table(rules): """Helper to format the rules into a table. :param list rules: A list containing the rules of the firewall :returns: a formatted table of the firewall rules """ table = formatting.Table(['#', 'action', 'protocol', 'src_ip', 'src_mask', 'dest...
def add_key(self, key, label, notes=None): """Adds a new SSH key to the account. :param string key: The SSH key to add :param string label: The label for the key :param string notes: Additional notes for the key :returns: A dictionary of the new key's information. """ ...
def edit_key(self, key_id, label=None, notes=None): """Edits information about an SSH key. :param int key_id: The ID of the key to edit :param string label: The new label for the key :param string notes: Notes to set or change on the key :returns: A Boolean indicating success or...
def list_keys(self, label=None): """Lists all SSH keys on the account. :param string label: Filter list based on SSH key label :returns: A list of dictionaries with information about each key """ _filter = utils.NestedDict({}) if label: _filter['sshKeys']['la...
def _get_ids_from_label(self, label): """Return sshkey IDs which match the given label.""" keys = self.list_keys() results = [] for key in keys: if key['label'] == label: results.append(key['id']) return results
def cli(env, identifier): """Download SSL certificate and key file.""" manager = SoftLayer.SSLManager(env.client) certificate = manager.get_certificate(identifier) write_cert(certificate['commonName'] + '.crt', certificate['certificate']) write_cert(certificate['commonName'] + '.key', certificate[...
def cli(env, identifier, name, all, note): """Capture one or all disks from a virtual server to a SoftLayer image.""" vsi = SoftLayer.VSManager(env.client) vs_id = helpers.resolve_id(vsi.resolve_ids, identifier, 'VS') capture = vsi.capture(vs_id, name, all, note) table = formatting.KeyValueTable(...
def get_event_logs(self, request_filter=None, log_limit=20, iterator=True): """Returns a list of event logs Example:: event_mgr = SoftLayer.EventLogManager(env.client) request_filter = event_mgr.build_filter(date_min="01/01/2019", date_max="02/01/2019") logs = event...
def build_filter(date_min=None, date_max=None, obj_event=None, obj_id=None, obj_type=None, utc_offset=None): """Returns a query filter that can be passed into EventLogManager.get_event_logs :param string date_min: Lower bound date in MM/DD/YYYY format :param string date_max: Upper bound date in...
def cli(env, zone, data, record, ttl, type): """List all records in a zone.""" manager = SoftLayer.DNSManager(env.client) table = formatting.Table(['id', 'record', 'type', 'ttl', 'data']) table.align['ttl'] = 'l' table.align['record'] = 'r' table.align['data'] = 'l' zone_id = helpers.reso...
def cli(env): """List Subject IDs for ticket creation.""" ticket_mgr = SoftLayer.TicketManager(env.client) table = formatting.Table(['id', 'subject']) for subject in ticket_mgr.list_subjects(): table.add_row([subject['id'], subject['name']]) env.fout(table)
def cli(env, **args): """Create a placement group.""" manager = PlacementManager(env.client) backend_router_id = helpers.resolve_id(manager.get_backend_router_id_from_hostname, args.get('backend_router'), 'backendRouter') ...
def cli(env, identifier, keys, permissions, hardware, virtual, logins, events): """User details.""" mgr = SoftLayer.UserManager(env.client) user_id = helpers.resolve_id(mgr.resolve_ids, identifier, 'username') object_mask = "userStatus[name], parent[id, username], apiAuthenticationKeys[authenticationKe...
def basic_info(user, keys): """Prints a table of basic user information""" table = formatting.KeyValueTable(['Title', 'Basic Information']) table.align['Title'] = 'r' table.align['Basic Information'] = 'l' table.add_row(['Id', user.get('id', '-')]) table.add_row(['Username', user.get('username...
def print_permissions(permissions): """Prints out a users permissions""" table = formatting.Table(['keyName', 'Description']) for perm in permissions: table.add_row([perm['keyName'], perm['name']]) return table
def print_access(access, title): """Prints out the hardware or virtual guests a user can access""" columns = ['id', 'hostname', 'Primary Public IP', 'Primary Private IP', 'Created'] table = formatting.Table(columns, title) for host in access: host_id = host.get('id') host_fqdn = host.g...
def print_dedicated_access(access): """Prints out the dedicated hosts a user can access""" table = formatting.Table(['id', 'Name', 'Cpus', 'Memory', 'Disk', 'Created'], 'Dedicated Access') for host in access: host_id = host.get('id') host_fqdn = host.get('name') host_cpu = host.get(...
def print_logins(logins): """Prints out the login history for a user""" table = formatting.Table(['Date', 'IP Address', 'Successufl Login?']) for login in logins: table.add_row([login.get('createDate'), login.get('ipAddress'), login.get('successFlag')]) return table
def print_events(events): """Prints out the event log for a user""" columns = ['Date', 'Type', 'IP Address', 'label', 'username'] table = formatting.Table(columns) for event in events: table.add_row([event.get('eventCreateDate'), event.get('eventName'), event.get('ipAddres...
def cli(env, columns, sortby, volume_id): """List ACLs.""" block_manager = SoftLayer.BlockStorageManager(env.client) access_list = block_manager.get_block_volume_access_list( volume_id=volume_id) table = formatting.Table(columns.columns) table.sortby = sortby for key, type_name in [('al...
def cli(env, identifier): """Sets a user's status to CANCEL_PENDING, which will immediately disable the account, and will eventually be fully removed from the account by an automated internal process. Example: slcli user delete userId """ mgr = SoftLayer.UserManager(env.client) user_id = hel...
def cli(env, identifier, crt, csr, icc, key, notes): """Edit SSL certificate.""" template = {'id': identifier} if crt: template['certificate'] = open(crt).read() if key: template['privateKey'] = open(key).read() if csr: template['certificateSigningRequest'] = open(csr).read()...
def cli(env, account_id, content_url, type, cname): """Create an origin pull mapping.""" manager = SoftLayer.CDNManager(env.client) manager.add_origin(account_id, type, content_url, cname)
def export_to_template(filename, args, exclude=None): """Exports given options to the given filename in INI format. :param filename: Filename to save options to :param dict args: Arguments to export :param list exclude (optional): Exclusion list for options that should not ...
def list(self, mask=None): """List existing placement groups Calls SoftLayer_Account::getPlacementGroups """ if mask is None: mask = "mask[id, name, createDate, rule, guestCount, backendRouter[id, hostname]]" groups = self.client.call('Account', 'getPlacementGroups'...
def get_object(self, group_id, mask=None): """Returns a PlacementGroup Object https://softlayer.github.io/reference/services/SoftLayer_Virtual_PlacementGroup/getObject """ if mask is None: mask = "mask[id, name, createDate, rule, backendRouter[id, hostname]," \ ...
def get_rule_id_from_name(self, name): """Finds the rule that matches name. SoftLayer_Virtual_PlacementGroup_Rule.getAllObjects doesn't support objectFilters. """ results = self.client.call('SoftLayer_Virtual_PlacementGroup_Rule', 'getAllObjects') return [result['id'] for result...
def get_backend_router_id_from_hostname(self, hostname): """Finds the backend router Id that matches the hostname given No way to use an objectFilter to find a backendRouter, so we have to search the hard way. """ results = self.client.call('SoftLayer_Network_Pod', 'getAllObjects') ...
def _get_id_from_name(self, name): """List placement group ids which match the given name.""" _filter = { 'placementGroups': { 'name': {'operation': name} } } mask = "mask[id, name]" results = self.client.call('Account', 'getPlacementGroups...
def cli(env): """List options for creating Reserved Capacity""" manager = CapacityManager(env.client) items = manager.get_create_options() items.sort(key=lambda term: int(term['capacity'])) table = formatting.Table(["KeyName", "Description", "Term", "Default Hourly Price Per Instance"], ...
def get_price(item): """Finds the price with the default locationGroupId""" the_price = "No Default Pricing" for price in item.get('prices', []): if not price.get('locationGroupId'): the_price = "%0.4f" % float(price['hourlyRecurringFee']) return the_price
def cli(env, keyword, package_type): """List packages that can be ordered via the placeOrder API. :: # List out all packages for ordering slcli order package-list # List out all packages with "server" in the name slcli order package-list --keyword server # Select onl...
def cli(env, **args): """Order/create a dedicated server.""" mgr = SoftLayer.HardwareManager(env.client) # Get the SSH keys ssh_keys = [] for key in args.get('key'): resolver = SoftLayer.SshKeyManager(env.client).resolve_ids key_id = helpers.resolve_id(resolver, key, 'SshKey') ...
def cli(env): """List active load balancers.""" mgr = SoftLayer.LoadBalancerManager(env.client) load_balancers = mgr.get_local_lbs() table = formatting.Table(['ID', 'VIP Address', 'Location', 'SSL Offload', ...
def cli(env, identifier): """List server credentials.""" manager = SoftLayer.HardwareManager(env.client) hardware_id = helpers.resolve_id(manager.resolve_ids, identifier, 'hardware') instance = manager.get_hardware(hardware_id) ...
def populate_host_templates(host_templates, hardware_ids=None, virtual_guest_ids=None, ip_address_ids=None, subnet_ids=None): """Populate the given host_templates array with the IDs provided :param h...
def get_package(manager, category_code): """Returns a product package based on type of storage. :param manager: The storage manager which calls this function. :param category_code: Category code of product package. :return: Returns a packaged based on type of storage. """ _filter = utils.Neste...
def get_location_id(manager, location): """Returns location id :param manager: The storage manager which calls this function. :param location: Datacenter short name :return: Returns location id """ loc_svc = manager.client['Location_Datacenter'] datacenters = loc_svc.getDatacenters(mask='ma...
def find_price_by_category(package, price_category): """Find the price in the given package that has the specified category :param package: The AsAService, Enterprise, or Performance product package :param price_category: The price category code to search for :return: Returns the price for the given ca...
def find_ent_space_price(package, category, size, tier_level): """Find the space price for the given category, size, and tier :param package: The Enterprise (Endurance) product package :param category: The category of space (endurance, replication, snapshot) :param size: The size for which a price is d...
def find_ent_endurance_tier_price(package, tier_level): """Find the price in the given package with the specified tier level :param package: The Enterprise (Endurance) product package :param tier_level: The endurance tier for which a price is desired :return: Returns the price for the given tier, or an...
def find_endurance_tier_iops_per_gb(volume): """Find the tier for the given endurance volume (IOPS per GB) :param volume: The volume for which the tier level is desired :return: Returns a float value indicating the IOPS per GB for the volume """ tier = volume['storageTierLevel'] iops_per_gb = 0...
def find_perf_space_price(package, size): """Find the price in the given package with the specified size :param package: The Performance product package :param size: The storage space size for which a price is desired :return: Returns the price for the given size, or an error if not found """ f...
def find_perf_iops_price(package, size, iops): """Find the price in the given package with the specified size and iops :param package: The Performance product package :param size: The size of storage space for which an IOPS price is desired :param iops: The number of IOPS for which a price is desired ...
def find_saas_endurance_space_price(package, size, tier_level): """Find the SaaS endurance storage space price for the size and tier :param package: The Storage As A Service product package :param size: The volume size for which a price is desired :param tier_level: The endurance tier for which a price...
def find_saas_endurance_tier_price(package, tier_level): """Find the SaaS storage tier level price for the specified tier level :param package: The Storage As A Service product package :param tier_level: The endurance tier for which a price is desired :return: Returns the price for the given tier, or a...
def find_saas_perform_space_price(package, size): """Find the SaaS performance storage space price for the given size :param package: The Storage As A Service product package :param size: The volume size for which a price is desired :return: Returns the price for the size and tier, or an error if not f...
def find_saas_perform_iops_price(package, size, iops): """Find the SaaS IOPS price for the specified size and iops :param package: The Storage As A Service product package :param size: The volume size for which a price is desired :param iops: The number of IOPS for which a price is desired :return:...
def find_saas_snapshot_space_price(package, size, tier=None, iops=None): """Find the price in the SaaS package for the desired snapshot space size :param package: The product package of the endurance storage type :param size: The snapshot space size for which a price is desired :param tier: The tier of...
def find_saas_replication_price(package, tier=None, iops=None): """Find the price in the given package for the desired replicant volume :param package: The product package of the endurance storage type :param tier: The tier of the primary storage volume :param iops: The IOPS of the primary storage volu...
def find_snapshot_schedule_id(volume, snapshot_schedule_keyname): """Find the snapshot schedule ID for the given volume and keyname :param volume: The volume for which the snapshot ID is desired :param snapshot_schedule_keyname: The keyname of the snapshot schedule :return: Returns an int value indicat...
def prepare_snapshot_order_object(manager, volume, capacity, tier, upgrade): """Prepare the snapshot space order object for the placeOrder() method :param manager: The File or Block manager calling this function :param integer volume: The volume for which snapshot space is ordered :param integer capaci...
def prepare_volume_order_object(manager, storage_type, location, size, iops, tier, snapshot_size, service_offering, volume_type, hourly_billing_flag=False): """Prepare the order object which is submitted to the placeOrder() method :param manager: ...
def prepare_replicant_order_object(manager, snapshot_schedule, location, tier, volume, volume_type): """Prepare the order object which is submitted to the placeOrder() method :param manager: The File or Block manager calling this function :param snapshot_schedule: The pri...
def prepare_duplicate_order_object(manager, origin_volume, iops, tier, duplicate_size, duplicate_snapshot_size, volume_type, hourly_billing_flag=False): """Prepare the duplicate order to submit to SoftLayer_Product::placeOrder() :param manag...
def prepare_modify_order_object(manager, volume, new_iops, new_tier, new_size): """Prepare the modification order to submit to SoftLayer_Product::placeOrder() :param manager: The File or Block manager calling this function :param volume: The volume which is being modified :param new_iops: The new IOPS ...
def cli(env, snapshot_id): """Deletes a snapshot on a given volume""" block_manager = SoftLayer.BlockStorageManager(env.client) deleted = block_manager.delete_snapshot(snapshot_id) if deleted: click.echo('Snapshot %s deleted' % snapshot_id)
def release(version, force=False): """Perform a release. Example: $ fab release:3.0.0 """ if version.startswith("v"): abort("Version should not start with 'v'") version_str = "v%s" % version clean() local("pip install wheel") puts(" * Uploading to PyPI") upload() pu...
def cli(env, volume_id, reason, immediate): """Cancel existing snapshot space for a given volume.""" file_storage_manager = SoftLayer.FileStorageManager(env.client) if not (env.skip_confirmations or formatting.no_going_back(volume_id)): raise exceptions.CLIAbort('Aborted') cancelled = file_st...
def cli(env, volume_id): """Display details for a specified volume.""" block_manager = SoftLayer.BlockStorageManager(env.client) block_volume = block_manager.get_block_volume_details(volume_id) block_volume = utils.NestedDict(block_volume) table = formatting.KeyValueTable(['Name', 'Value']) tab...
def get_by_request_id(env, request_id): """Search for event logs by request id""" mgr = SoftLayer.NetworkManager(env.client) logs = mgr.get_event_logs_by_request_id(request_id) table = formatting.Table(COLUMNS) table.align['metadata'] = "l" for log in logs: metadata = json.dumps(json....
def cli(env, title, subject_id, body, hardware_identifier, virtual_identifier, priority): """Create a support ticket.""" ticket_mgr = SoftLayer.TicketManager(env.client) if body is None: body = click.edit('\n\n' + ticket.TEMPLATE_MSG) created_ticket = ticket_mgr.create_ticket( title=tit...
def cli(env, volume_id): """Display details for a specified volume.""" file_manager = SoftLayer.FileStorageManager(env.client) file_volume = file_manager.get_file_volume_details(volume_id) file_volume = utils.NestedDict(file_volume) table = formatting.KeyValueTable(['Name', 'Value']) table.alig...
def cli(env, volume_id, replicant_id): """Failback a file volume from the given replicant volume.""" file_storage_manager = SoftLayer.FileStorageManager(env.client) success = file_storage_manager.failback_from_replicant( volume_id, replicant_id ) if success: click.echo("Fai...
def cli(env, volume_id, snapshot_id): """Restore file volume using a given snapshot""" file_manager = SoftLayer.FileStorageManager(env.client) success = file_manager.restore_from_snapshot(volume_id, snapshot_id) if success: click.echo('File volume %s is being restored using snapshot %s' ...
def cli(env): """Show current configuration.""" settings = config.get_settings_from_client(env.client) env.fout(config.config_table(settings))
def cli(env, storage_type, size, iops, tier, location, snapshot_size, service_offering, billing): """Order a file storage volume. Valid size and iops options can be found here: https://console.bluemix.net/docs/infrastructure/FileStorage/index.html#provisioning """ file_manager = SoftLayer.F...
def cli(env, **args): """Allows for creating a virtual guest in a reserved capacity.""" create_args = _parse_create_args(env.client, args) create_args['primary_disk'] = args.get('primary_disk') manager = CapacityManager(env.client) capacity_id = args.get('capacity_id') test = args.get('test') ...
def cli(env, identifier, out_file): """Prints out an SSH key to the screen.""" mgr = SoftLayer.SshKeyManager(env.client) key_id = helpers.resolve_id(mgr.resolve_ids, identifier, 'SshKey') key = mgr.get_key(key_id) if out_file: with open(path.expanduser(out_file), 'w') as pub_file: ...
def list_endpoints(self): """Lists the known object storage endpoints.""" _filter = { 'hubNetworkStorage': {'vendorName': {'operation': 'Swift'}}, } endpoints = [] network_storage = self.client.call('Account', 'getHubNetworkS...
def delete_credential(self, identifier, credential_id=None): """Delete the object storage credential. :param int id: The object storage account identifier. :param int credential_id: The credential id to be deleted. """ credential = { 'id': credential_id } ...
def cli(env, sortby, cpu, domain, datacenter, hostname, memory, network, tag, columns, limit): """List hardware servers.""" manager = SoftLayer.HardwareManager(env.client) servers = manager.list_hardware(hostname=hostname, domain=domain, ...
def cli(env, user, template): """Edit a Users details JSON strings should be enclosed in '' and each item should be enclosed in "" :Example: slcli user edit-details testUser -t '{"firstName": "Test", "lastName": "Testerson"}' """ mgr = SoftLayer.UserManager(env.client) user_id = helpers.resolv...
def cli(env, ip_address): """Find an IP address and display its subnet and device info.""" mgr = SoftLayer.NetworkManager(env.client) addr_info = mgr.ip_lookup(ip_address) if not addr_info: raise exceptions.CLIAbort('Not found') table = formatting.KeyValueTable(['name', 'value']) tab...
def cli(env, name, note, os_code, uri, ibm_api_key, root_key_crn, wrapped_dek, cloud_init, byol, is_encrypted): """Import an image. The URI for an object storage object (.vhd/.iso file) of the format: swift://<objectStorageAccount>@<cluster>/<container>/<objectPath> or cos://<regionName>/<bucke...
def cli(env, context_id, friendly_name, remote_peer, preshared_key, phase1_auth, phase1_crypto, phase1_dh, phase1_key_ttl, phase2_auth, phase2_crypto, phase2_dh, phase2_forward_secrecy, phase2_key_ttl): """Update tunnel context properties. Updates are made atomically, so either all are accepted...
def add_internal_subnet(self, context_id, subnet_id): """Add an internal subnet to a tunnel context. :param int context_id: The id-value representing the context instance. :param int subnet_id: The id-value representing the internal subnet. :return bool: True if internal subnet addition...
def add_remote_subnet(self, context_id, subnet_id): """Adds a remote subnet to a tunnel context. :param int context_id: The id-value representing the context instance. :param int subnet_id: The id-value representing the remote subnet. :return bool: True if remote subnet addition was suc...
def add_service_subnet(self, context_id, subnet_id): """Adds a service subnet to a tunnel context. :param int context_id: The id-value representing the context instance. :param int subnet_id: The id-value representing the service subnet. :return bool: True if service subnet addition was...
def create_remote_subnet(self, account_id, identifier, cidr): """Creates a remote subnet on the given account. :param string account_id: The account identifier. :param string identifier: The network identifier of the remote subnet. :param string cidr: The CIDR value of the remote subnet...
def create_translation(self, context_id, static_ip, remote_ip, notes): """Creates an address translation on a tunnel context/ :param int context_id: The id-value representing the context instance. :param string static_ip: The IP address value representing the internal side of the...
def get_tunnel_context(self, context_id, **kwargs): """Retrieves the network tunnel context instance. :param int context_id: The id-value representing the context instance. :return dict: Mapping of properties for the tunnel context. :raise SoftLayerAPIError: If a context cannot be found...