pyrax
Python Bindings for the Rackspace Cloud
|
This is the base client for creating and managing Cloud Networks. More...
Public Member Functions | |
def | __init__ |
def | create |
Wraps the basic create() call to handle specific failures. | |
def | delete |
Wraps the standard delete() method to catch expected exceptions and raise the appropriate pyrax exceptions. | |
def | find_network_by_label |
This is inefficient; it gets all the networks and then filters on the client side to find the matching name. | |
def | get_server_networks |
Creates the dict of network UUIDs required by Cloud Servers when creating a new server with isolated networks. | |
Public Attributes | |
name | |
PUBLIC_NET_ID | |
SERVICE_NET_ID | |
PSEUDO_NETWORKS | |
Static Public Attributes | |
find_network_by_name = find_network_by_label |
This is the base client for creating and managing Cloud Networks.
def __init__ | ( | self, | |
args, | |||
kwargs | |||
) |
Reimplemented in FakeCloudNetworkClient.
def create | ( | self, | |
label = None , |
|||
name = None , |
|||
cidr = None |
|||
) |
Wraps the basic create() call to handle specific failures.
def delete | ( | self, | |
network | |||
) |
Wraps the standard delete() method to catch expected exceptions and raise the appropriate pyrax exceptions.
Reimplemented from BaseClient.
def find_network_by_label | ( | self, | |
label | |||
) |
This is inefficient; it gets all the networks and then filters on the client side to find the matching name.
def get_server_networks | ( | self, | |
network, | |||
public = False , |
|||
private = False , |
|||
key = None |
|||
) |
Creates the dict of network UUIDs required by Cloud Servers when creating a new server with isolated networks.
By default, the UUID values are returned with the key of "net-id", which is what novaclient expects. Other tools may require different values, such as 'uuid'. If that is the case, pass the desired key as the 'key' parameter.
By default only this network is included. If you wish to create a server that has either the public (internet) or private (ServiceNet) networks, you have to pass those parameters in with values of True.
find_network_by_name = find_network_by_label [static] |
Reimplemented from BaseClient.