openstack.network.v2.port

The Port Class

The Port class inherits from Resource.

class openstack.network.v2.port.Port(_synchronized=False, connection=None, **attrs)

The base resource

Parameters:
  • _synchronized (bool) – This is not intended to be used directly. See new() and existing().

  • connection (openstack.connection.Connection) – Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

resource_key = 'port'

Singular form of key for resource.

resources_key = 'ports'

Plural form of key for resource.

base_path = '/ports'

The base part of the URI for this resource.

allow_create = True

Allow create operation for this resource.

allow_fetch = True

Allow get operation for this resource.

allow_commit = True

Allow update operation for this resource.

allow_delete = True

Allow delete operation for this resource.

allow_list = True

Allow list operation for this resource.

allowed_address_pairs

Allowed address pairs list. Dictionary key ip_address is required and key mac_address is optional.

binding_host_id

The ID of the host where the port is allocated. In some cases, different implementations can run on different hosts.

binding_profile

A dictionary the enables the application running on the specified host to pass and receive vif port-specific information to the plug-in. Type: dict

binding_vif_details

Read-only. A dictionary that enables the application to pass information about functions that the Networking API provides. To enable or disable port filtering features such as security group and anti-MAC/IP spoofing, specify port_filter: True or port_filter: False. Type: dict

binding_vif_type

Read-only. The vif type for the specified port.

binding_vnic_type

The vnic type that is bound to the neutron port.

In POST and PUT operations, specify a value of normal (virtual nic), direct (pci passthrough), or macvtap (virtual interface with a tap-like software interface). These values support SR-IOV PCI passthrough networking. The ML2 plug-in supports the vnic_type.

In GET operations, the binding:vnic_type extended attribute is visible to only port owners and administrative users.

created_at

Timestamp when the port was created.

data_plane_status

Underlying data plane status of this port.

description

The port description.

device_id

Device ID of this port.

device_owner

Device owner of this port (e.g. network:dhcp).

dns_assignment

DNS assignment for the port.

dns_domain

DNS domain assigned to the port.

dns_name

DNS name for the port.

extra_dhcp_opts

Extra DHCP options.

fixed_ips

IP addresses for the port. Includes the IP address and subnet ID.

is_admin_state_up

The administrative state of the port, which is up True or down False. Type: bool

is_port_security_enabled

The port security status, which is enabled True or disabled False. Type: bool Default: False

mac_address

The MAC address of an allowed address pair.

name

The port name.

network_id

The ID of the attached network.

numa_affinity_policy

The NUMA affinity policy defined for this port.

project_id

The ID of the project who owns the network. Only administrative users can specify a project ID other than their own.

tenant_id

Tenant_id (deprecated attribute).

Whether to propagate uplink status of the port. Type: bool

qos_policy_id

The ID of the QoS policy attached to the port.

security_group_ids

The IDs of any attached security groups. Type: list of strs of the security group IDs

status

The port status. Value is ACTIVE or DOWN.

trunk_details

Read-only. The trunk referring to this parent port and its subports. Present for trunk parent ports if trunk-details extension is loaded. Type: dict with keys: trunk_id, sub_ports. sub_ports is a list of dicts with keys: port_id, segmentation_type, segmentation_id, mac_address

trusted

Status of the trusted VIF setting, this value is added to the binding:profile field and passed to services which needs, it, like Nova

updated_at

Timestamp when the port was last updated.