Port (managed_by_service==True)

This page describes operations you can perform on ports. List, and get details for.

List Port

List all visible ports.

Synchronous / Asynchronous

  • Synchronous

Request

HTTP Request Method

  • GET

HTTP Request Path

{endpoint}/v2.0/ports

HTTP Request Parameters

Parameter Style Type Format Enumeration Description Required
description query string - - Port description. no
device_id query string hyph-uuid-or-empty - The Id of device (i.e physical port id for baremetal). no
device_owner query string - - The name of the port owner no
id query string hyph-uuid - Port unique id. no
mac_address query string - - The MAC address of the port. no
name query string - - Port name. no
network_id query string hyph-uuid - The ID of network this port belongs to. no
status query string - - The port status. no
tenant_id query string non-hyph-uuid-or-empty - The owner name of port. no

Response

HTTP Response Code List

Response Code Description
200 OK
400 Bad Request
401 UnAuthorized
404 Not Found
500 Internal Server Error

HTTP Response Parameters

Parameter Type Format Description
ports array<object> Port (managed_by_service==True) -
admin_state_up boolean - Administrative state of Port (supported when device_owner starts with “compute:”)
allowed_address_pairs array<object> - Allowed address pairs
ip_address string cidr-or-ipv4 -
mac_address string - -
description string - Port description.
device_id string hyph-uuid-or-empty The Id of device (i.e physical port id for baremetal).
device_owner string - The name of the port owner
fixed_ips array<object> - List of fixes IP addresses assign to port.
ip_address string - The IP address assign to port within subnet.
subnet_id string hyph-uuid The ID of subnet from which IP address is allocated.
id string hyph-uuid Port unique id.
mac_address string - The MAC address of the port.
managed_by_service boolean - Set to true if only admin can modify it. Normal user has only read access.
name string - Port name.
network_id string hyph-uuid The ID of network this port belongs to.
status string - The port status.
tags object - Port tags.
tenant_id string non-hyph-uuid-or-empty The owner name of port.

Examples

Sample Request Body

This operation does not send a request body.

Sample Response Body

{
  "ports": [
    {
      "admin_state_up": true,
      "allowed_address_pairs": [],
      "description": "Example port 1 description.",
      "device_id": "b269b8c0-1a42-4464-9314-4396e51e5107",
      "device_owner": "compute:Tokyo-DC1",
      "fixed_ips": [
        {
          "ip_address": "10.161.54.13",
          "subnet_id": "93bb920c-19be-4026-8cc7-564bfcd41456"
        }
      ],
      "id": "81c3b7d4-eae2-4858-ab76-fa56117b8ab4",
      "mac_address": "26:8d:42:f6:c2:c4",
      "managed_by_service": true,
      "name": "Example port 1",
      "network_id": "ba199c9e-ff09-4d7d-a164-ff61c66cf01f",
      "status": "ACTIVE",
      "tags": {
        "keyword1": "value1",
        "keyword2": "value2"
      },
      "tenant_id": "6a156ddf2ecd497ca786ff2da6df5aa8"
    },
    {
      "admin_state_up": true,
      "allowed_address_pairs": [
        {
          "ip_address": "10.0.0.50",
          "mac_address": "2d:0d:9a:96:9c:eb"
        },
        {
          "ip_address": "10.0.0.51",
          "mac_address": "2d:0d:9a:14:65:6d"
        }
      ],
      "description": "Example port 2 description.",
      "device_id": "b269b8c0-1a42-4464-9314-4396e51e5107",
      "device_owner": "physical_port",
      "fixed_ips": [
        {
          "ip_address": "10.161.55.13",
          "subnet_id": "64887030-9623-4a20-bcb0-c92e8a2496ca"
        }
      ],
      "id": "268d42f6-c25c-4f24-90fe-11324f0dd7ab",
      "mac_address": "b3:e9:45:86:a9:dd",
      "managed_by_service": true,
      "name": "Example port 2",
      "network_id": "ba199c9e-ff09-4d7d-a164-ff61c66cf01f",
      "status": "DOWN",
      "tags": {
        "keyword1": "value1",
        "keyword2": "value2"
      },
      "tenant_id": "6a156ddf2ecd497ca786ff2da6df5aa8"
    }
  ]
}

Show Port

Show details for port.

Synchronous / Asynchronous

  • Synchronous

Request

HTTP Request Method

  • GET

HTTP Request Path

{endpoint}/v2.0/ports/{port (managed_by_service==True)_id}

HTTP Request Parameters

Parameter Style Type Format Enumeration Description Required
port (managed_by_service==True)_id URI string hyph-uuid - Port unique id. yes

Response

HTTP Response Code List

Response Code Description
200 OK
400 Bad Request
401 UnAuthorized
404 Not Found
500 Internal Server Error

HTTP Response Parameters

Parameter Type Format Description
port object Port (managed_by_service==True) -
admin_state_up boolean - Administrative state of Port (supported when device_owner starts with “compute:”)
allowed_address_pairs array<object> - Allowed address pairs
ip_address string cidr-or-ipv4 -
mac_address string - -
description string - Port description.
device_id string hyph-uuid-or-empty The Id of device (i.e physical port id for baremetal).
device_owner string - The name of the port owner
fixed_ips array<object> - List of fixes IP addresses assign to port.
ip_address string - The IP address assign to port within subnet.
subnet_id string hyph-uuid The ID of subnet from which IP address is allocated.
id string hyph-uuid Port unique id.
mac_address string - The MAC address of the port.
managed_by_service boolean - Set to true if only admin can modify it. Normal user has only read access.
name string - Port name.
network_id string hyph-uuid The ID of network this port belongs to.
status string - The port status.
tags object - Port tags.
tenant_id string non-hyph-uuid-or-empty The owner name of port.

Examples

Sample Request Body

This operation does not send a request body.

Sample Response Body

{
  "port": {
    "admin_state_up": true,
    "allowed_address_pairs": [],
    "description": "Example port 1 description.",
    "device_id": "b269b8c0-1a42-4464-9314-4396e51e5107",
    "device_owner": "compute:Tokyo-DC1",
    "fixed_ips": [
      {
        "ip_address": "10.161.54.13",
        "subnet_id": "93bb920c-19be-4026-8cc7-564bfcd41456"
      }
    ],
    "id": "81c3b7d4-eae2-4858-ab76-fa56117b8ab4",
    "mac_address": "26:8d:42:f6:c2:c4",
    "managed_by_service": true,
    "name": "Example port 1",
    "network_id": "ba199c9e-ff09-4d7d-a164-ff61c66cf01f",
    "status": "ACTIVE",
    "tags": {
      "keyword1": "value1",
      "keyword2": "value2"
    },
    "tenant_id": "6a156ddf2ecd497ca786ff2da6df5aa8"
  }
}