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 nova.network.quantum.client.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

Action query strings

static attach_resource(*args, **kwargs)

Temporarily set format and tenant for this request

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

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 nova.network.quantum.client.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 nova.network.quantum.client.QuantumIOException

Bases: exceptions.Exception

Indicates network IO trouble reaching Quantum Server

exception nova.network.quantum.client.QuantumNotFoundException

Bases: exceptions.Exception

Indicates that Quantum Server returned 404

exception nova.network.quantum.client.QuantumServerException

Bases: exceptions.Exception

Indicates any non-404 error from Quantum Server

nova.network.quantum.client.api_call

A Decorator to add support for format and tenant overriding