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.

get_meta(key, default=None)

calls get(key, default) on self[‘meta’].

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.

fixed_ips()

Returns all fixed_ips without floating_ips attached.

floating_ips()

Returns all floating_ips.

classmethod hydrate(network_info)
json()
legacy()

Return the legacy network_info representation of self

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, type=None, devname=None, ovs_interfaceid=None, qbh_params=None, qbg_params=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': {...}}]
class VIF8021QbgParams(managerid, typeid, typeidversion, instanceid)

Bases: nova.network.model.Model

Represents the parameters for a 802.1qbg VIF.

class VIF8021QbhParams(profileid)

Bases: nova.network.model.Model

Represents the parameters for a 802.1qbh VIF.

ensure_string_keys(d)

Previous topic

The nova.network.minidns Module

Next topic

The nova.network.noop_dns_driver Module

This Page