The nova.network.api Module

class API(db_driver=None)

Bases: nova.db.base.Base

API for interacting with the network manager.

add_dns_entry(context, address, name, dns_type, domain)

Create specified DNS entry for address

add_fixed_ip_to_instance(context, instance, network_id)

Adds a fixed ip to instance from specified network.

add_network_to_project(context, project_id, network_uuid=None)

Force adds another network to a project.

allocate_floating_ip(context, pool=None)

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

allocate_for_instance(context, *args, **kwargs)

Allocates all network structures for an instance.

Returns:network info as from get_instance_nw_info() below
associate_floating_ip(context, *args, **kwargs)

Associates a floating ip with a fixed ip.

ensures floating ip is allocated to the project in context

create(context, **kwargs)
create_private_dns_domain(context, domain, availability_zone)

Create a private DNS domain with nova availability zone.

create_public_dns_domain(context, domain, project=None)

Create a private DNS domain with optional nova project.

deallocate_for_instance(context, instance, **kwargs)

Deallocates all network structures related to instance.

delete(context, network_uuid)
delete_dns_domain(context, domain)

Delete the specified dns domain.

delete_dns_entry(context, name, domain)

Delete the specified dns entry.

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

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

get(context, network_uuid)
get_all(context)
get_dns_domains(context)

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

get_dns_entries_by_address(context, address, domain)

Get entries for address and domain

get_dns_entries_by_name(context, name, domain)

Get entries for name and domain

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

Returns all network info related to an instance.

get_instance_uuids_by_ip_filter(context, filters)

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, mac_address)
get_vifs_by_instance(context, instance)
modify_dns_entry(context, name, address, domain)

Create specified DNS entry for address

release_floating_ip(context, address, affect_auto_assigned=False)

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

remove_fixed_ip_from_instance(context, instance, address)

Removes a fixed ip from instance from specified network.

setup_networks_on_host(context, instance, host=None, teardown=False)

Setup or teardown the network structures on hosts related to instance

validate_networks(context, requested_networks)

validate the networks passed at the time of creating the server

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, *args, **kwargs)

Previous topic

The nova.manager Module

Next topic

The nova.network.dns_driver Module

This Page