Previous topic

The nova.network.model Module

Next topic

The nova.network.quantum.fake_client Module

This Page

Psst... hey. You're reading the latest content, but it might be out of sync with code. You can read Nova 2011.2 docs or all OpenStack docs too.

The nova.network.quantum.client Module

class Client(host='127.0.0.1', port=9696, use_ssl=False, tenant=None, format='xml', testing_stub=None, key_file=None, cert_file=None, logger=None)

Bases: object

A base client class - derived from Glance.BaseClient

action_prefix = '/v1.1/tenants/{tenant_id}'

Action query strings

static attach_resource(*args, **kwargs)

Temporarily set format and tenant for this request

attachment_path = '/networks/%s/ports/%s/attachment'
content_type(format=None)
static create_network(*args, **kwargs)

Temporarily set format and tenant for this request

static create_port(*args, **kwargs)

Temporarily set format and tenant for this request

static delete_network(*args, **kwargs)

Temporarily set format and tenant for this request

static delete_port(*args, **kwargs)

Temporarily set format and tenant for this request

deserialize(data, status_code)
static detach_resource(*args, **kwargs)

Temporarily set format and tenant for this request

do_request(method, action, body=None, headers=None, params=None)

Connects to the server and issues a request. Returns the result data, or raises an appropriate exception if HTTP status code is not 2xx

Parameters:
  • method – HTTP method (“GET”, “POST”, “PUT”, etc...)
  • body – string of data to send, or None (default)
  • headers – mapping of key/value pairs to add as headers
  • params – dictionary of key/value pairs to add to append to action
get_connection_type()

Returns the proper connection type

get_status_code(response)

Returns the integer status code from the response, which can be either a Webob.Response (used in testing) or httplib.Response

static list_networks(*args, **kwargs)

Temporarily set format and tenant for this request

static list_ports(*args, **kwargs)

Temporarily set format and tenant for this request

network_path = '/networks/%s'
networks_path = '/networks'
port_path = '/networks/%s/ports/%s'
ports_path = '/networks/%s/ports'
serialize(data)
static set_port_state(*args, **kwargs)

Temporarily set format and tenant for this request

static show_network_details(*args, **kwargs)

Temporarily set format and tenant for this request

static show_port_attachment(*args, **kwargs)

Temporarily set format and tenant for this request

static show_port_details(*args, **kwargs)

Temporarily set format and tenant for this request

static update_network(*args, **kwargs)

Temporarily set format and tenant for this request

class JSONSerializer

Bases: object

This is a simple json-only serializer to use until we can just grab the standard serializer from the quantum library.

deserialize(data, content_type)
serialize(data, content_type)
exception QuantumIOException

Bases: exceptions.Exception

Indicates network IO trouble reaching Quantum Server

exception QuantumNotFoundException

Bases: exceptions.Exception

Indicates that Quantum Server returned a not-found error code

exception QuantumServerException

Bases: exceptions.Exception

Indicates any non-404 error from Quantum Server

api_call

A Decorator to add support for format and tenant overriding