The openstack_dashboard.api.network ModuleΒΆ

Abstraction layer for networking functionalities.

Currently Nova and Quantum have duplicated features. This API layer is introduced to astract the differences between them for seamless consumption by different dashboard implementations.

class openstack_dashboard.api.network.FloatingIpManager[source]

Bases: object

Abstract class to implement Floating IP methods

The FloatingIP object returned from methods in this class must contains the following attributes:

  • id: ID of Floating IP

  • ip: Floating IP address

  • pool: ID of Floating IP pool from which the address is allocated

  • fixed_ip: Fixed IP address of a VIF associated with the address

  • port_id: ID of a VIF associated with the address

    (instance_id when Nova floating IP is used)

  • instance_id: Instance ID of an associated with the Floating IP

FloatingIpManager.allocate(pool=None)[source]

Allocates a floating IP to the tenant.

You must provide a pool name or id for which you would like to allocate an floating IP.

FloatingIpManager.associate(floating_ip_id, port_id)[source]

Associates the floating IP to the port.

port_id is a fixed IP of a instance (Nova) or a port_id attached to a VNIC of a instance.

FloatingIpManager.disassociate(floating_ip_id, port_id)[source]

Disassociates the floating IP from the port.

port_id is a fixed IP of a instance (Nova) or a port_id attached to a VNIC of a instance.

FloatingIpManager.get(floating_ip_id)[source]

Fetches the floating IP.

It returns a FloatingIp object corresponding to floating_ip_id.

FloatingIpManager.get_target_id_by_instance(instance_id)[source]

Returns a target ID of floating IP association based on a backend implementation.

FloatingIpManager.is_simple_associate_supported()[source]

Returns True if the default floating IP pool is enabled.

FloatingIpManager.list()[source]

Fetches a list all floating IPs.

A returned value is a list of FloatingIp object.

FloatingIpManager.list_pools()[source]

Fetches a list of all floating IP pools.

A list of FloatingIpPool objects is returned. FloatingIpPool object is an APIResourceWrapper/APIDictWrapper where ‘id’ and ‘name’ attributes are defined.

FloatingIpManager.list_targets()[source]

Returns a list of association targets of instance VIFs.

Each association target is represented as FloatingIpTarget object. FloatingIpTarget is a APIResourceWrapper/APIDictWrapper and ‘id’ and ‘name’ attributes must be defined in each object. FloatingIpTarget.id can be passed as port_id in associate(). FloatingIpTarget.name is displayed in Floating Ip Association Form.

FloatingIpManager.release(floating_ip_id)[source]

Releases a floating IP specified.

class openstack_dashboard.api.network.NetworkClient(request)[source]

Bases: object

openstack_dashboard.api.network.floating_ip_associate(request, floating_ip_id, port_id)[source]
openstack_dashboard.api.network.floating_ip_disassociate(request, floating_ip_id, port_id)[source]
openstack_dashboard.api.network.floating_ip_pools_list(request)[source]
openstack_dashboard.api.network.floating_ip_target_get_by_instance(request, instance_id)[source]
openstack_dashboard.api.network.floating_ip_target_list(request)[source]
openstack_dashboard.api.network.tenant_floating_ip_allocate(request, pool=None)[source]
openstack_dashboard.api.network.tenant_floating_ip_get(request, floating_ip_id)[source]
openstack_dashboard.api.network.tenant_floating_ip_list(request)[source]
openstack_dashboard.api.network.tenant_floating_ip_release(request, floating_ip_id)[source]

Previous topic

The openstack_dashboard.usage.tables Module

Next topic

The openstack_dashboard.api.glance Module

This Page