Querying a Port
Function
This API is used to query details about a specified port.
Request Message
None
Response Message
Parameter |
Type |
Description |
---|---|---|
port |
Object |
Specifies the port object list. For details, see Table 3. |
Attribute |
Type |
Description |
---|---|---|
id |
String |
Specifies the port ID. A maximum of 255 characters are allowed. This parameter is not mandatory when you query ports. |
name |
String |
Specifies the port name. |
network_id |
String |
Specifies the ID of the network to which the port belongs. |
admin_state_up |
Boolean |
Specifies the administrative status. The value can only be true. |
mac_address |
String |
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 |
Array of fixed_ip objects |
Specifies the port IP address. For details, see Table 4. For example, the value is "fixed_ips": [{"subnet_id": "4dc70db6-cb7f-4200-9790-a6a910776bba", "ip_address": "192.169.25.79"}]. |
device_id |
String |
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 |
Specifies the DHCP, router or Nova to which a device belongs. This parameter value cannot be updated. You can only set device_owner to neutron:VIP_PORT for a virtual IP address port during port creation. If this parameter of a port is not left blank, the port can only be deleted when this parameter value is neutron:VIP_PORT. The port with this field specified cannot be deleted. |
tenant_id |
String |
Specifies the project ID. |
status |
String |
Specifies the port status. The value can be ACTIVE, BUILD, or DOWN. The status of a HANA SR-IOV VM port is always DOWN. |
security_groups |
Array of strings |
Specifies the UUID of the security group, for example, "security_groups": ["a0608cbf-d047-4f54-8b28-cd7b59853fff"]. This is an extended attribute. This parameter cannot be left blank. |
allowed_address_pairs |
Array of allow_address_pair objects |
Specifies the IP address and MAC address pair. This is an extended attribute. For details, see Table 5. Instructions:
|
extra_dhcp_opts |
Array of extra_dhcp_opt objects |
Specifies the extended DHCP option. This is an extended attribute. For details, see Table 6. |
binding:vif_details |
Object |
Specifies the VIF details. Parameter ovs_hybrid_plug specifies whether the OVS/bridge hybrid mode is used. |
binding:profile |
Object |
Specifies the user-defined settings. This is an extended attribute. Instructions:
|
binding:vnic_type |
String |
Specifies the type of the bound vNIC. normal: Softswitch |
project_id |
String |
Specifies the project ID. For details about how to obtain a project ID, see Obtaining a Project ID. |
created_at |
String |
Specifies the time (UTC) when the port is created. Format: yyyy-MM-ddTHH:mm:ss |
updated_at |
String |
Specifies the time (UTC) when the port is updated. Format: yyyy-MM-ddTHH:mm:ss |
Attribute |
Type |
Description |
---|---|---|
subnet_id |
String |
Specifies the ID of the subnet to which the port belongs. This parameter cannot be updated. |
ip_address |
String |
Specifies the port IP address. This parameter cannot be updated. |
Attribute |
Type |
Description |
---|---|---|
ip_address |
String |
Specifies the IP address. This parameter cannot be 0.0.0.0. |
mac_address |
String |
Specifies the MAC address. |
Attribute |
Type |
Description |
---|---|---|
opt_name |
String |
Specifies the option name. |
opt_value |
String |
Specifies the option value. |
Name |
Type |
Description |
---|---|---|
disable_security_groups |
Boolean |
Specifies that the FWaaS function is disabled. In high-performance communication scenarios, the value can be set to true. You can specify the value when creating a port. Currently, the value of this parameter can only be set to true. |
Name |
Type |
Description |
---|---|---|
ovs_hybrid_plug |
Boolean |
Specifies whether the OVS/bridge hybrid mode is used. |
Example:
Example request
GET https://{Endpoint}/v2.0/ports/791870bd-36a7-4d9b-b015-a78e9b06af08
Example response
{ "port": { "id": "791870bd-36a7-4d9b-b015-a78e9b06af08", "name": "port-test", "status": "DOWN", "admin_state_up": true, "fixed_ips": [], "mac_address": "fa:16:3e:01:e0:b2", "network_id": "00ae08c5-f727-49ab-ad4b-b069398aa171", "tenant_id": "db82c9e1415a464ea68048baa8acc6b8", "project_id": "db82c9e1415a464ea68048baa8acc6b8", "device_id": "", "device_owner": "", "security_groups": [ "d0d58aa9-cda9-414c-9c52-6c3daf8534e6" ], "extra_dhcp_opts": [], "allowed_address_pairs": [], "binding:vnic_type": "normal", "binding:vif_details": {}, "binding:profile": {}, "port_security_enabled": true, "created_at": "2018-09-13T01:43:41", "updated_at": "2018-09-13T01:43:41" } }
Status Code
See Status Codes.
Error Code
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot