SoftLayer.network

Network Manager/helpers

copyright:
  1. 2013, SoftLayer Technologies, Inc. All rights reserved.
license:

MIT, see LICENSE for more details.

class SoftLayer.managers.network.NetworkManager(client)[source]

Manage Networks

account = None

Reference to the SoftLayer_Account API object.

add_global_ip(version=4, test_order=False)[source]

Adds a global IP address to the account.

Parameters:
  • version (int) – Specifies whether this is IPv4 or IPv6
  • test_order (bool) – If true, this will only verify the order.
add_subnet(type, quantity=None, vlan_id=None, version=4, test_order=False)[source]
assign_global_ip(id, target)[source]

Assigns a global IP address to a specified target.

Parameters:
  • id (int) – The ID of the global IP being assigned
  • target (string) – The IP address to assign
cancel_global_ip(id)[source]

Cancels the specified global IP address.

Parameters:id (int) – The ID of the global IP to be cancelled.
cancel_subnet(id)[source]

Cancels the specified subnet.

Parameters:id (int) – The ID of the subnet to be cancelled.
client = None

A valid SoftLayer.API.Client object that will be used for all actions.

edit_rwhois(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)[source]
get_rwhois()[source]

Returns the RWhois information about the current account.

Returns:A dictionary containing the account’s RWhois information.
get_subnet(id, **kwargs)[source]

Returns information about a single subnet.

Parameters:id (string) – Either the ID for the subnet or its network identifier
Returns:A dictionary of information about the subnet
get_vlan(id)[source]

Returns information about a single VLAN.

Parameters:id (int) – The unique identifier for the VLAN
Returns:A dictionary containing a large amount of information about the specified VLAN.
ip_lookup(ip)[source]

Looks up an IP address and returns network information about it.

Parameters:ip (string) – An IP address. Can be IPv4 or IPv6
Returns:A dictionary of information about the IP
list_global_ips(version=0)[source]

Returns a list of all global IP address records on the account.

Parameters:version (int) – Only returns IPs of this version (4 or 6).
list_subnets(identifier=None, datacenter=None, version=0, subnet_type=None, **kwargs)[source]

Display a list of all subnets on the account.

This provides a quick overview of all subnets including information about data center residence and the number of devices attached.

Parameters:
  • identifier (string) – If specified, the list will only contain the subnet matching this network identifier.
  • datacenter (string) – If specified, the list will only contain subnets in the specified data center.
  • version (int) – Only returns subnets of this version (4 or 6).
  • subnet_type (string) – If specified, it will only returns subnets of this type.
  • **kwargs (dict) – response-level arguments (limit, offset, etc.)
list_vlans(datacenter=None, vlan_number=None, **kwargs)[source]

Display a list of all VLANs on the account.

This provides a quick overview of all VLANs including information about data center residence and the number of devices attached.

Parameters:
  • datacenter (string) – If specified, the list will only contain VLANs in the specified data center.
  • vlan_number (int) – If specified, the list will only contain the VLAN matching this VLAN number.
  • **kwargs (dict) – response-level arguments (limit, offset, etc.)
resolve_global_ip_ids(identifier)[source]
resolve_ids(identifier)

Takes a string and tries to resolve to a list of matching ids. What exactly ‘identifier’ can be depends on the resolvers

Parameters:identifier (string) – identifying string
Returns list:
resolve_subnet_ids(identifier)[source]
resolvers = []
summary_by_datacenter()[source]

Provides a dictionary with a summary of all network information on the account, grouped by data center.

The resultant dictionary is primarily useful for statistical purposes. It contains count information rather than raw data. If you want raw information, see the list_vlans() method instead.

Returns:A dictionary keyed by data center with the data containing a series of counts for hardware, subnets, CCIs, and other objects residing within that data center.
unassign_global_ip(id)[source]

Unassigns a global IP address from a target.

Parameters:id (int) – The ID of the global IP being unassigned
vlan = None

Reference to the SoftLayer_Network_Vlan object.

Project Versions

Previous topic

SoftLayer.metadata

Next topic

SoftLayer.sshkey

This Page