
In change Ib22753aa6ae0fedce7fb9ecf63f135fda0185c5b the port data model was updated to include a physical_network field, but this was not exposed to the user by the REST API. This change exposes the physical_network field in the REST API. The port CRUD notification object has been updated to include the physical_network field. The API reference and user guide have been updated to include information about the ports' physical network field. The API microversion has been bumped to 1.34. During a rolling upgrade from Ocata when the API service is pinned, the port physical network field is hidden from API responses, and API requests including the field are rejected. Change-Id: I7023a1d6618608c867c31396fa677d3016ca493e Partial-Bug: #1666009
104 lines
2.4 KiB
ReStructuredText
104 lines
2.4 KiB
ReStructuredText
.. -*- rst -*-
|
|
|
|
=============================================
|
|
Listing Ports by Portgroup (portgroup, ports)
|
|
=============================================
|
|
|
|
Given a Portgroup identifier (``uuid`` or ``name``), the API exposes the list
|
|
of, and details of, all Ports associated with that Portgroup.
|
|
|
|
These endpoints do not allow modification of the Ports; that should be done
|
|
by accessing the Port resources under the ``/v1/ports`` endpoint.
|
|
|
|
``/v1/portgroups/{portgroup_ident}/ports`` endpoint was added in API
|
|
microversion 1.24, if using older version, all the requests return
|
|
``Not Found (404)`` error code.
|
|
|
|
|
|
List Ports by Portgroup
|
|
=======================
|
|
|
|
.. rest_method:: GET /v1/portgroups/{portgroup_ident}/ports
|
|
|
|
Return a list of bare metal Ports associated with ``portgroup_ident``.
|
|
|
|
API microversion 1.34 added the ``physical_network`` field.
|
|
|
|
Normal response code: 200
|
|
|
|
Error codes: 400,401,403,404
|
|
|
|
Request
|
|
-------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- portgroup_ident: portgroup_ident
|
|
- fields: fields
|
|
- limit: limit
|
|
- marker: marker
|
|
- sort_dir: sort_dir
|
|
- sort_key: sort_key
|
|
|
|
Response
|
|
--------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- ports: ports
|
|
- uuid: uuid
|
|
- address: port_address
|
|
- links: links
|
|
|
|
**Example list of a Portgroup's Ports:**
|
|
|
|
.. literalinclude:: samples/portgroup-port-list-response.json
|
|
|
|
|
|
List detailed Ports by Portgroup
|
|
================================
|
|
|
|
.. rest_method:: GET /v1/portgroups/{portgroup_ident}/ports/detail
|
|
|
|
Return a detailed list of bare metal Ports associated with ``portgroup_ident``.
|
|
|
|
API microversion 1.34 added the ``physical_network`` field.
|
|
|
|
Normal response code: 200
|
|
|
|
Error codes: 400,401,403,404
|
|
|
|
Request
|
|
-------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- portgroup_ident: portgroup_ident
|
|
- limit: limit
|
|
- marker: marker
|
|
- sort_dir: sort_dir
|
|
- sort_key: sort_key
|
|
|
|
Response
|
|
--------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- ports: ports
|
|
- uuid: uuid
|
|
- address: port_address
|
|
- node_uuid: node_uuid
|
|
- local_link_connection: local_link_connection
|
|
- pxe_enabled: pxe_enabled
|
|
- physical_network: physical_network
|
|
- internal_info: internal_info
|
|
- extra: extra
|
|
- portgroup_uuid: portgroup_uuid
|
|
- created_at: created_at
|
|
- updated_at: updated_at
|
|
- links: links
|
|
|
|
**Example details of a Portgroup's Ports:**
|
|
|
|
.. literalinclude:: samples/portgroup-port-detail-response.json
|