The nova.network.api Module

class API(**kwargs)

Bases: nova.db.base.Base

API for doing networking via the nova-network network manager.

This is a pluggable module - other implementations do networking via other services (such as Quantum).

add_dns_entry(context, *args, **kwargs)

Create specified DNS entry for address.

add_fixed_ip_to_instance(context, *args, **kwargs)

Adds a fixed ip to instance from specified network.

add_network_to_project(context, *args, **kwargs)

Force adds another network to a project.

allocate_floating_ip(context, *args, **kwargs)

Adds (allocates) a floating ip to a project from a pool.

allocate_for_instance(context, *args, **kwargs)

Allocates all network structures for an instance.

TODO(someone): document the rest of these parameters.

Parameters:macs – None or a set of MAC addresses that the instance should use. macs is supplied by the hypervisor driver (contrast with requested_networks which is user supplied).
Returns:network info as from get_instance_nw_info() below
allocate_port_for_instance(context, instance, port_id, network_id=None, requested_ip=None, conductor_api=None)
associate(context, *args, **kwargs)

Associate or disassociate host or project to network.

associate_floating_ip(context, *args, **kwargs)

Associates a floating ip with a fixed ip.

Ensures floating ip is allocated to the project in context. Does not verify ownership of the fixed ip. Caller is assumed to have checked that the instance is properly owned.

create(context, *args, **kwargs)
create_private_dns_domain(context, *args, **kwargs)

Create a private DNS domain with nova availability zone.

create_public_dns_domain(context, *args, **kwargs)

Create a public DNS domain with optional nova project.

deallocate_for_instance(context, *args, **kwargs)

Deallocates all network structures related to instance.

deallocate_port_for_instance(context, instance, port_id, conductor_api=None)
delete(context, *args, **kwargs)
delete_dns_domain(context, *args, **kwargs)

Delete the specified dns domain.

delete_dns_entry(context, *args, **kwargs)

Delete the specified dns entry.

disassociate(context, *args, **kwargs)
disassociate_floating_ip(context, *args, **kwargs)

Disassociates a floating ip from fixed ip it is associated with.

get(context, *args, **kwargs)
get_all(context, *args, **kwargs)
get_backdoor_port(context, *args, **kwargs)
get_dns_domains(context, *args, **kwargs)

Returns a list of available dns domains. These can be used to create DNS entries for floating ips.

get_dns_entries_by_address(context, *args, **kwargs)

Get entries for address and domain.

get_dns_entries_by_name(context, *args, **kwargs)

Get entries for name and domain.

get_fixed_ip(context, *args, **kwargs)
get_fixed_ip_by_address(context, *args, **kwargs)
get_floating_ip(context, *args, **kwargs)
get_floating_ip_by_address(context, *args, **kwargs)
get_floating_ip_pools(context, *args, **kwargs)
get_floating_ips_by_fixed_address(context, *args, **kwargs)
get_floating_ips_by_project(context, *args, **kwargs)
get_instance_id_by_floating_address(context, *args, **kwargs)
get_instance_nw_info(context, *args, **kwargs)

Returns all network info related to an instance.

get_instance_uuids_by_ip_filter(context, *args, **kwargs)

Returns a list of dicts in the form of {‘instance_uuid’: uuid, ‘ip’: ip} that matched the ip_filter

get_vif_by_mac_address(context, *args, **kwargs)
get_vifs_by_instance(context, *args, **kwargs)
list_ports(*args, **kwargs)
migrate_instance_finish(context, *args, **kwargs)

Finish migrating the network of an instance.

migrate_instance_start(context, *args, **kwargs)

Start to migrate the network of an instance.

modify_dns_entry(context, *args, **kwargs)

Create specified DNS entry for address.

release_floating_ip(context, *args, **kwargs)

Removes (deallocates) a floating ip with address from a project.

remove_fixed_ip_from_instance(context, *args, **kwargs)

Removes a fixed ip from instance from specified network.

setup_networks_on_host(context, *args, **kwargs)

Setup or teardown the network structures on hosts related to instance

show_port(*args, **kwargs)
validate_networks(context, *args, **kwargs)

validate the networks passed at the time of creating the server

check_policy(context, action)
refresh_cache(f)

Decorator to update the instance_info_cache

Requires context and instance as function args

update_instance_cache_with_nw_info(api, context, instance, nw_info=None, conductor_api=None, update_cells=True)
wrap_check_policy(func)

Check policy corresponding to the wrapped methods prior to execution.

Previous topic

The nova.netconf Module

Next topic

The nova.network.api_deprecated Module

This Page