• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Neutron
  5. Port
  6. Introduction

Introduction

Object

This interface is used to manage and perform operations on ports, including querying ports, creating a port, querying a specified port, deleting a port, and updating a port.

Object Model

Table 1 port object

Attribute

Type

CRUD

Default Value

Restriction

Description

id

Uuid-Str

R

Automatically generated

N/A

Specifies the port ID.

name

String(255)

CRU

N/A

N/A

Specifies the port name.

network_id

Uuid-Str

CR

N/A

The value must be an existing network ID.

Specifies the ID of the network to which the port belongs.

admin_state_up

Bool

CRU

true

The value can only be true or false.

Specifies the administrative status.

The value can only be true.

mac_address

String(32)

R

Automatically generated

The value must be a valid MAC address.

Specifies the port MAC address. For example, "mac_address": "fa:16:3e:9e:ff:55".

This value can only be dynamically assigned by the system.

fixed_ips

List(fixed_ips)

CRU

Automatically generated from the address pool

Only one fixed IP address can be configured for a port.

Specifies the port IP address. For example, the value is "fixed_ips": [{"subnet_id": "4dc70db6-cb7f-4200-9790-a6a910776bba", "ip_address": "192.169.25.79"}].

Only one fixed IP address can be configured for each port, and the IP address cannot be changed once configured.

device_id

String(255)

CRUD

N/A

N/A

Specifies the device ID.

This value is automatically maintained by the system and cannot be set or updated manually. The port with this field specified cannot be deleted.

device_owner

String(255)

CRUD

N/A

N/A

Specifies the DHCP, router or Nova to which a device belongs.

This value is automatically maintained by the system and cannot be set or updated manually. The port with this field specified cannot be deleted.

tenant_id

String(255)

CR

N/A

N/A

Specifies the tenant ID. Only the administrator can specify tenant_id of other tenants.

status

String(16)

R

N/A

The value can only be ACTIVE, BUILD, or DOWN.

Specifies the port status. The value can be ACTIVE, BUILD, or DOWN.

The status of a HANA SR-IOV ECS port is always DOWN.

security_groups

List(String)

CRUD

N/A

Security group UUID or left blank

Specifies the UUID of a security group. For example, "security_groups": ["a0608cbf-d047-4f54-8b28-cd7b59853fff"].

The update cannot be empty.

allowed_address_pairs

List(allow_address_pair)

CRU

N/A

N/A

Specifies the IP and MAC address pair. This is an extended attribute. For details, see Table 3.

The IP address cannot be 0.0.0.0.

Configure an independent security group for the port if a large CIDR block (subnet mask less than 24) is configured for parameter allowed_address_pairs.

extra_dhcp_opts

List(extra_dhcp_opt)

CRU

N/A

N/A

Specifies the extended DHCP option. For details, see Table 4.

binding:vif_type

String(64)

R

N/A

N/A

Specifies the port virtual interface (VIF) type. The value can be ovs or hw_veb.

This parameter is available only to administrators.

binding:vif_details

Dict

R

N/A

N/A

Specifies the VIF details. Parameter ovs_hybrid_plug specifies whether the OVS/bridge hybrid mode is used.

This parameter is unavailable to common tenants.

binding:host_id

String(255)

R

N/A

N/A

Specifies the host ID.

This parameter is available only to administrators.

binding:profile

Dict

CR

N/A

N/A

Specifies the user-defined settings.

Instructions:

  • The disable_security_groups field is in boolean type and is available to common tenants. The default value is false. In high-performance communication scenarios, you can set the parameter value to true, which makes this parameter to be available to common tenants. You can specify this attribute when creating a port. Currently, the value of this parameter can only be set to true.

Examples are as follows:

{"disable_security_groups": true },

Currently, the value of this parameter can only be set to true. If this parameter value is set to true, the FWaaS function does not take effect.

  • Other fields are available only to administrators.

binding:vnic_type

String(64)

R

normal

normal

Specifies the type of the bound vNIC.

normal: Softswitch

port_security_enabled

Bool

CRU

true

N/A

Specifies whether the security option is enabled for the port. If the option is not enabled, the security group and DHCP snooping do not take effect.

Table 2 fixed_ip object

Attribute

Type

CRUD

Default Value

Restriction

Description

subnet_id

Uuid-Str

CRU

Automatically generated

The value must be an existing subnet ID.

Specifies the ID of the subnet to which the port belongs.

This parameter cannot be updated.

ip_address

String(64)

CRU

Automatically generated

The value must be a valid IP address.

Specifies the port IP address.

This parameter cannot be updated.

Table 3 allow_address_pair object

Attribute

Type

CRUD

Default Value

Restriction

Description

ip_address

String(64)

CRU

N/A

This parameter cannot be left blank.

Specifies the IP address.

This parameter cannot be 0.0.0.0.

mac_address

String(32)

CRU

N/A

N/A

Specifies the MAC address.

Table 4 extra_dhcp_opt object

Attribute

Type

CRUD

Default Value

Restriction

Description

opt_name

String(64)

CRU

N/A

N/A

Specifies the option name.

opt_value

String(255)

CRU

N/A

N/A

Specifies the option value.