查询端口
功能介绍
查询端口详情。
请求参数
无
请求示例
GET https://{Endpoint}/v2.0/ports/791870bd-36a7-4d9b-b015-a78e9b06af08 响应参数
| 参数名称 | 类型 | 说明 |
|---|---|---|
| id | String |
|
| name | String | 端口的名称。 |
| network_id | String | 所属网络的ID。 |
| admin_state_up | Boolean |
|
| mac_address | String |
|
| fixed_ips | Array of fixed_ip objects |
|
| device_id | String |
|
| device_owner | String |
|
| tenant_id | String | 项目ID |
| status | String |
|
| security_groups | Array of strings |
|
| allowed_address_pairs | Array of allowed_address_pairs objects |
|
| extra_dhcp_opts | Array of extra_dhcp_opt objects | 扩展属性:DHCP的扩展Option,参见表6。 |
| binding:vif_details | binding:vif_details object | vif的详细信息, 参见表8 |
| binding:profile | binding:profile object |
|
| binding:vnic_type | String |
|
| port_security_enabled | Boolean | 端口安全使能标记。 取值范围:true,允许加入安全组和开启dhcp防欺骗;false,安全组和dhcp防欺骗不生效。 |
| dns_assignment | Array of dns_assignment objects |
|
| dns_name | String |
|
| project_id | String | 项目ID,请参见获取项目ID。 |
| created_at | String |
|
| updated_at | String |
|
| 参数名称 | 类型 | 说明 |
|---|---|---|
| subnet_id | String |
|
| ip_address | String |
|
| 名称 | 是否必选 | 参数类型 | 说明 |
|---|---|---|---|
| ip_address | 是 | String |
|
| mac_address | 否 | String | MAC地址。默认使用当前端口的MAC地址。 |
| 名称 | 参数类型 | 说明 |
|---|---|---|
| hostname | String | 端口hostname。 |
| ip_address | String | 端口IP地址。 |
| fqdn | String | 端口内网fqdn。 |
| 名称 | 参数类型 | 说明 |
|---|---|---|
| primary_interface | Boolean | 取值为true,表示是虚拟机的主网卡。 |
| port_filter | Boolean | 表示该网络服务提供端口过滤特性,如安全组和反MAC/IP欺骗。 |
| ovs_hybrid_plug | Boolean | 用于通知像nova这样的API消费者,应该使用OVS的混合插入策略。 |
| vlan_id | Integer | 辅助弹性网卡的vlan ID。 |
| parent_id | String | 辅助弹性网卡的宿主网卡ID。 |
| parent_device_id | String | 辅助弹性网卡的宿主网卡所属的设备ID。 |
响应示例
{
"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"
}
} 状态码
请参见状态码。
错误码
请参见错误码。