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.melange_ipam_lib Module

class nova.network.quantum.melange_ipam_lib.QuantumMelangeIPAMLib

Bases: object

Implements Quantum IP Address Management (IPAM) interface using the Melange service, which is access using the Melange web services API.

allocate_fixed_ip(context, project_id, quantum_net_id, vif_ref)

Pass call to allocate fixed IP on to Melange

create_subnet(context, label, project_id, quantum_net_id, priority, cidr=None, gateway_v6=None, cidr_v6=None, dns1=None, dns2=None)

Contact Melange and create a subnet for any non-NULL IPv4 or IPv6 subnets.

Also create a entry in the Nova networks DB, but only to store values not represented in Melange or to temporarily provide compatibility with Nova code that accesses IPAM data directly via the DB (e.g., nova-api)

deallocate_ips_by_vif(context, project_id, net_id, vif_ref)

Deallocate all fixed IPs associated with the specified virtual interface.

delete_subnets_by_net_id(context, net_id, project_id)

Find Melange block associated with the Quantum UUID, then tell Melange to delete that block.

get_network_id_by_cidr(context, cidr, project_id)

Find the Quantum UUID associated with a IPv4 CIDR address for the specified tenant.

get_project_and_global_net_ids(context, project_id)

Fetches all networks associated with this project, or that are “global” (i.e., have no project set). Returns list sorted by ‘priority’ (lowest integer value is highest priority).

get_subnets_by_net_id(context, project_id, net_id)

Returns information about the IPv4 and IPv6 subnets associated with a Quantum Network UUID.

get_v4_ips_by_interface(context, net_id, vif_id, project_id)

Returns a list of IPv4 address strings associated with the specified virtual interface.

get_v6_ips_by_interface(context, net_id, vif_id, project_id)

Returns a list of IPv6 address strings associated with the specified virtual interface.

verify_subnet_exists(context, project_id, quantum_net_id)

Confirms that a subnet exists that is associated with the specified Quantum Network UUID.

nova.network.quantum.melange_ipam_lib.get_ipam_lib(net_man)