Management Plane API >
Troubleshooting And Monitoring
>
Port Connection
Get networking entities between two logical ports with VIF attachment
Request:
Method:
GET
URI Path(s):
/api/v1/logical-ports/<lport-id>/forwarding-path
Request Headers:
n/a
Query Parameters:
PortConnectionRequestParameters
+
PortConnectionRequestParameters
(
schema
)
Name
Description
Type
Notes
peer_port_id
ID of peer port
string
Required
Request Body:
n/a
Example Request:
GET https://<nsx-mgr>/api/v1/logical-ports/3d57aeb9-0bd0-4940-9087-02b227d4401b/forwarding-path?peer_port_id=40dd5385-201f-4fc7-8329-c82a10439da0
Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
PortConnectionEntities
+
PortConnectionEntities
(
schema
)
Name
Description
Type
Notes
containers
PortConnectionContainersEntities
Required
edge_node_groups
array of
PortConnectionEdgeNodeGroup
errors
array of
PortConnectionError
Required
hypervisors
array of
PortConnectionHypervisor
Required
logical_switches
array of
PortConnectionLogicalSwitch
Required
physical_hosts
PortConnectionBMEntities
routers
array of
PortConnectionRouter
tunnels
array of
PortConnectionTunnel
Required
vms
array of
VirtualMachine
Required
Example Response:
{ "logical_switches":[ { "id":"b59d2745-d01b-4457-8f2e-d7b098918081", "resource":{ "resource_type":"LogicalSwitch", "tags":[ ], "id":"b59d2745-d01b-4457-8f2e-d7b098918081", "display_name":"sw2-topo2", "description":"", "resource_type":"LogicalSwitch", "transport_zone_id":"2d8ff7f9-1c04-41ab-995d-1d21ec160581", "replication_mode":"MTEP", "admin_state":"UP", "vni":64392, "switching_profile_ids":[ { "value":"64814784-7896-3901-9741-badeff705639", "key":"IpDiscoverySwitchingProfile" }, { "value":"93b4b7e8-f116-415d-a50c-3364611b5d09", "key":"PortMirroringSwitchingProfile" }, { "value":"f313290b-eba8-4262-bd93-fab5026e9495", "key":"QosSwitchingProfile" } ], "_last_modified_user":"admin", "_last_modified_time":1428592659083, "_create_time":1428592659083, "_create_user":"admin", "_revision":0, "_schema":"/v1/schema/LogicalSwitch" }, "vm_ports":[ { "tags":[ ], "id":"3d57aeb9-0bd0-4940-9087-02b227d4401b", "display_name":"port-sw2-topo2", "description":"", "resource_type":"LogicalPort", "logical_switch_id":"b59d2745-d01b-4457-8f2e-d7b098918081", "admin_state":"UP", "attachment":{ "id":"41c585fd-e2c4-42e7-a2c8-cd3ae52fe971", "attachment_type":"VIF" }, "switching_profile_ids":[ { "value":"64814784-7896-3901-9741-badeff705639", "key":"IpDiscoverySwitchingProfile" }, { "value":"93b4b7e8-f116-415d-a50c-3364611b5d09", "key":"PortMirroringSwitchingProfile" }, { "value":"f313290b-eba8-4262-bd93-fab5026e9495", "key":"QosSwitchingProfile" } ], "_last_modified_user":"admin", "_last_modified_time":1428647140837, "_create_time":1428647140837, "_create_user":"admin", "_revision":0 } ], "router_ports":[ { "id":"dda02061-9248-4fc2-9c29-f2c3bb7f9a4c", "display_name":"SwitchPort_p2-t1-topo2", "description":"Switch port created for logical router port.", "resource_type":"LogicalPort", "logical_switch_id":"b59d2745-d01b-4457-8f2e-d7b098918081", "admin_state":"UP", "attachment":{ "id":"c11208c2-c384-46b0-9cac-1e8f37016575", "attachment_type":"LOGICALROUTER" }, "switching_profile_ids":[ { "value":"64814784-7896-3901-9741-badeff705639", "key":"IpDiscoverySwitchingProfile" }, { "value":"93b4b7e8-f116-415d-a50c-3364611b5d09", "key":"PortMirroringSwitchingProfile" }, { "value":"f313290b-eba8-4262-bd93-fab5026e9495", "key":"QosSwitchingProfile" } ], "_last_modified_user":"system", "_last_modified_time":1428646868158, "_create_time":1428646867242, "_create_user":"admin", "_revision":1 } ], "vm_vnics":[ { "id":"564d5bed-bcb9-54bc-2896-7f7955c03e30-4001", "resource_type":"VirtualNetworkInterface", "mac_address":"00:0c:29:c0:3e:3a", "device_key":"4001", "external_id":"564d5bed-bcb9-54bc-2896-7f7955c03e30-4001", "device_name":"Network adapter 2", "lport_attachment_id":"41c585fd-e2c4-42e7-a2c8-cd3ae52fe971", "owner_vm_id":"b93fc7e9-092e-4a44-a6a6-34515ec7a127" } ] }, { "id":"5af2abf1-7451-4035-8c14-9220ddf64009", "resource":{ "resource_type":"LogicalSwitch", "tags":[ ], "id":"5af2abf1-7451-4035-8c14-9220ddf64009", "display_name":"sw1-topo2", "description":"", "resource_type":"LogicalSwitch", "transport_zone_id":"2d8ff7f9-1c04-41ab-995d-1d21ec160581", "replication_mode":"MTEP", "admin_state":"UP", "vni":17288, "switching_profile_ids":[ { "value":"64814784-7896-3901-9741-badeff705639", "key":"IpDiscoverySwitchingProfile" }, { "value":"93b4b7e8-f116-415d-a50c-3364611b5d09", "key":"PortMirroringSwitchingProfile" }, { "value":"f313290b-eba8-4262-bd93-fab5026e9495", "key":"QosSwitchingProfile" } ], "_last_modified_user":"admin", "_last_modified_time":1428592648858, "_create_time":1428592648858, "_create_user":"admin", "_revision":0, "_schema":"/v1/schema/LogicalSwitch" }, "vm_ports":[ { "tags":[ ], "id":"40dd5385-201f-4fc7-8329-c82a10439da0", "display_name":"port-sw1-topo2", "description":"", "resource_type":"LogicalPort", "logical_switch_id":"5af2abf1-7451-4035-8c14-9220ddf64009", "admin_state":"UP", "attachment":{ "id":"5e784f5f-8cc7-487f-b306-a2ccb4fb4703", "attachment_type":"VIF" }, "switching_profile_ids":[ { "value":"64814784-7896-3901-9741-badeff705639", "key":"IpDiscoverySwitchingProfile" }, { "value":"93b4b7e8-f116-415d-a50c-3364611b5d09", "key":"PortMirroringSwitchingProfile" }, { "value":"f313290b-eba8-4262-bd93-fab5026e9495", "key":"QosSwitchingProfile" } ], "_last_modified_user":"admin", "_last_modified_time":1428647191961, "_create_time":1428647114937, "_create_user":"admin", "_revision":1 } ], "router_ports":[ { "id":"c70feda2-b1f1-4967-9443-621056c675fa", "display_name":"SwitchPort_p1-t1-topo2", "description":"Switch port created for logical router port.", "resource_type":"LogicalPort", "logical_switch_id":"5af2abf1-7451-4035-8c14-9220ddf64009", "admin_state":"UP", "attachment":{ "id":"39fa7d1e-2f51-477b-bfcd-4bf8eb50fbf1", "attachment_type":"LOGICALROUTER" }, "switching_profile_ids":[ { "value":"64814784-7896-3901-9741-badeff705639", "key":"IpDiscoverySwitchingProfile" }, { "value":"93b4b7e8-f116-415d-a50c-3364611b5d09", "key":"PortMirroringSwitchingProfile" }, { "value":"f313290b-eba8-4262-bd93-fab5026e9495", "key":"QosSwitchingProfile" } ], "_last_modified_user":"system", "_last_modified_time":1428647023195, "_create_time":1428647020639, "_create_user":"admin", "_revision":1 } ], "vm_vnics":[ { "id":"564d55c8-bc14-fb09-b00c-00f05669610f-4001", "resource_type":"VirtualNetworkInterface", "mac_address":"00:0c:29:69:61:19", "device_key":"4001", "external_id":"564d55c8-bc14-fb09-b00c-00f05669610f-4001", "device_name":"Network adapter 2", "lport_attachment_id":"5e784f5f-8cc7-487f-b306-a2ccb4fb4703", "owner_vm_id":"6dfa0964-2aa6-47b8-85cd-5a5debd0492e" } ] } ], "hypervisors":[ { "id":"f87ae89c-de7e-11e4-b13f-711bec13050a", "resource":{ "resource_type":"TransportNode", "id":"bf73b615-b50f-42cf-b417-9b721395dd34", "display_name":"bf73b615-b50f-42cf-b417-9b721395dd34", "resource_type":"TransportNode", "host_switches":[ { "pnics":[ { "device_name":"vmnic1", "uplink_name":"uplink1" } ], "host_switch_profile_ids":[ { "value":"c103027b-d605-43cc-9abc-ec719e9bd9c0", "key":"UplinkHostSwitchProfile" } ], "host_switch_name":"nsxvswitch" } ], "transport_zone_endpoints":[ { "transport_zone_id":"2d8ff7f9-1c04-41ab-995d-1d21ec160581" } ], "node_id":"f87ae89c-de7e-11e4-b13f-711bec13050a", "_last_modified_user":"admin", "_last_modified_time":1428559814141, "_create_time":1428559814141, "_create_user":"admin", "_revision":0 } }, { "id":"eb0ac74a-de7e-11e4-a12e-dfd0843ec1da", "resource":{ "resource_type":"TransportNode", "id":"92d47efe-c80a-4f66-8a0f-c7e0684c343f", "display_name":"92d47efe-c80a-4f66-8a0f-c7e0684c343f", "resource_type":"TransportNode", "host_switches":[ { "pnics":[ { "device_name":"vmnic1", "uplink_name":"uplink1" } ], "host_switch_profile_ids":[ { "value":"c103027b-d605-43cc-9abc-ec719e9bd9c0", "key":"UplinkHostSwitchProfile" } ], "host_switch_name":"nsxvswitch" } ], "transport_zone_endpoints":[ { "transport_zone_id":"2d8ff7f9-1c04-41ab-995d-1d21ec160581" } ], "node_id":"eb0ac74a-de7e-11e4-a12e-dfd0843ec1da", "_last_modified_user":"admin", "_last_modified_time":1428559798859, "_create_time":1428559798859, "_create_user":"admin", "_revision":0 } } ], "vms":[ { "id":"b93fc7e9-092e-4a44-a6a6-34515ec7a127", "display_name":"2-vm_RHEL63_srv_64-local-448-1993928d-33f9-419d-83ff-763b90017896", "resource_type":"VirtualMachine", "external_id":"564d5bed-bcb9-54bc-2896-7f7955c03e30564d5bed-bcb9-54bc-2896-7f7955c03e30", "host_id":"f87ae89c-de7e-11e4-b13f-711bec13050a", "compute_ids":[ "instanceUuid:1993928d-33f9-419d-83ff-763b90017896", "biosUuid:564d5bed-bcb9-54bc-2896-7f7955c03e30", "moIdOnHost:1" ], "type":"REGULAR" }, { "id":"6dfa0964-2aa6-47b8-85cd-5a5debd0492e", "display_name":"1-vm_RHEL63_srv_64-local-448-fe77dd6b-bc33-4f81-88f9-01cec60205e7", "resource_type":"VirtualMachine", "external_id":"564d55c8-bc14-fb09-b00c-00f05669610f564d55c8-bc14-fb09-b00c-00f05669610f", "host_id":"eb0ac74a-de7e-11e4-a12e-dfd0843ec1da", "compute_ids":[ "instanceUuid:fe77dd6b-bc33-4f81-88f9-01cec60205e7", "biosUuid:564d55c8-bc14-fb09-b00c-00f05669610f", "moIdOnHost:1" ], "type":"REGULAR" } ], "routers":[ { "id":"f98fe386-6015-47cd-85da-de6b816ca37e", "resource":{ "resource_type":"LogicalRouter", "id":"f98fe386-6015-47cd-85da-de6b816ca37e", "display_name":"t1-topo2", "resource_type":"LogicalRouter", "router_type":"TIER1", "_last_modified_user":"admin", "_last_modified_time":1428646876929, "_create_time":1428646672257, "_create_user":"admin", "_revision":2 }, "downlink_ports":[ { "resource_type":"LogicalRouterDownLinkPort", "id":"c11208c2-c384-46b0-9cac-1e8f37016575", "display_name":"p2-t1-topo2", "mac_address":"02:50:56:56:44:52", "logical_router_id":"f98fe386-6015-47cd-85da-de6b816ca37e", "linked_logical_switch_port_id":"dda02061-9248-4fc2-9c29-f2c3bb7f9a4c", "_last_modified_user":"admin", "_last_modified_time":1428646867250, "_create_time":1428646867250, "_create_user":"admin", "_revision":0 }, { "resource_type":"LogicalRouterDownLinkPort", "id":"39fa7d1e-2f51-477b-bfcd-4bf8eb50fbf1", "display_name":"p1-t1-topo2", "mac_address":"02:50:56:56:44:52", "logical_router_id":"f98fe386-6015-47cd-85da-de6b816ca37e", "linked_logical_switch_port_id":"c70feda2-b1f1-4967-9443-621056c675fa", "_last_modified_user":"admin", "_last_modified_time":1428647020649, "_create_time":1428646837970, "_create_user":"admin", "_revision":1 } ] } ], "containers" : { "logical_ports" : [ { "resource_type" : "LogicalPort", "description" : "", "id" : "2c34040d-37eb-43c2-a387-9b7fe34104ca", "display_name" : "CIF_PARENT_LP", "tags" : [ ], "attachment" : { "attachment_type" : "VIF", "id" : "7d828b7a-f430-411e-af8f-a4c01bac0b59" }, "admin_state" : "UP", "logical_switch_id" : "0edc9a57-a825-4770-a861-1f21c07a8bbd", "address_bindings" : [ ], "switching_profile_ids" : [ { "value" : "fbc4fb17-83d9-4b53-a286-ccdf04301888", "key" : "SwitchSecuritySwitchingProfile" }, { "value" : "fad98876-d7ff-11e4-b9d6-1681e6b88ec1", "key" : "SpoofGuardSwitchingProfile" }, { "value" : "64814784-7896-3901-9741-badeff705639", "key" : "IpDiscoverySwitchingProfile" }, { "value" : "1e7101c8-cfef-415a-9c8c-ce3d8dd078fb", "key" : "MacManagementSwitchingProfile" }, { "value" : "93b4b7e8-f116-415d-a50c-3364611b5d09", "key" : "PortMirroringSwitchingProfile" }, { "value" : "f313290b-eba8-4262-bd93-fab5026e9495", "key" : "QosSwitchingProfile" } ], "_create_time" : 1486506956171, "_last_modified_user" : "admin", "_system_owned" : false, "_last_modified_time" : 1486506956171, "_create_user" : "admin", "_revision" : 0 } ] } }
Required Permissions:
execute
Feature:
tools_port_connection
Additional Errors:
301 Moved Permanently
307 Temporary Redirect
400 Bad Request
403 Forbidden
409 Conflict
500 Internal Server Error
503 Service Unavailable