Previous topic

The nova.network.minidns Module

Next topic

The nova.network.quantum.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.model Module

class FixedIP(floating_ips=None, **kwargs)

Bases: nova.network.model.IP

Represents a Fixed IP address in Nova

add_floating_ip(floating_ip)
floating_ip_addresses()
classmethod hydrate(fixed_ip)
class IP(address=None, type=None, **kwargs)

Bases: nova.network.model.Model

Represents an IP address in Nova

classmethod hydrate(ip)
is_in_subnet(subnet)
class Model

Bases: dict

Defines some necessary structures for most of the network models

set_meta(kwargs)
class Network(id=None, bridge=None, label=None, subnets=None, **kwargs)

Bases: nova.network.model.Model

Represents a Network in Nova

add_subnet(subnet)
classmethod hydrate(network)
class NetworkInfo

Bases: list

Stores and manipulates network information for a Nova instance

as_cache()
fixed_ips()

Returns all fixed_ips without floating_ips attached

floating_ips()

Returns all floating_ips

classmethod hydrate(network_info)
class Route(cidr=None, gateway=None, interface=None, **kwargs)

Bases: nova.network.model.Model

Represents an IP Route in Nova

classmethod hydrate(route)
class Subnet(cidr=None, dns=None, gateway=None, ips=None, routes=None, **kwargs)

Bases: nova.network.model.Model

Represents a Subnet in Nova

add_dns(dns)
add_ip(ip)
add_route(new_route)
as_netaddr()

Convience function to get cidr as a netaddr object

classmethod hydrate(subnet)
class VIF(id=None, address=None, network=None, **kwargs)

Bases: nova.network.model.Model

Represents a Virtual Interface in Nova

fixed_ips()
floating_ips()
classmethod hydrate(vif)
labeled_ips()

Returns the list of all IPs

The return value looks like this flat structure:

{'network_label': 'my_network',
 'network_id': 'n8v29837fn234782f08fjxk3ofhb84',
 'ips': [{'address': '123.123.123.123',
          'version': 4,
          'type: 'fixed',
          'meta': {...}},
         {'address': '124.124.124.124',
          'version': 4,
          'type': 'floating',
          'meta': {...}},
         {'address': 'fe80::4',
          'version': 6,
          'type': 'fixed',
          'meta': {...}}]
ensure_string_keys(d)