ironic/api-ref/source/baremetal-api-v1-nodes-ports.inc
Mark Goddard 02fff930fb Expose ports' physical network attribute in API
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
2017-07-19 17:29:20 +01:00

100 lines
2.0 KiB
ReStructuredText

.. -*- rst -*-
====================================
Listing Ports by Node (nodes, ports)
====================================
Given a Node identifier (``uuid`` or ``name``), the API exposes the list of,
and details of, all Ports associated with that Node.
These endpoints do not allow modification of the Ports; that should be done
by accessing the Port resources under the ``/v1/ports`` endpoint.
List Ports by Node
===================
.. rest_method:: GET /v1/nodes/{node_ident}/ports
Return a list of bare metal Ports associated with ``node_ident``.
API microversion 1.34 added the ``physical_network`` field.
Normal response code: 200
Error codes: TBD
Request
-------
.. rest_parameters:: parameters.yaml
- node_ident: node_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 Node's Ports:**
.. literalinclude:: samples/node-port-list-response.json
List detailed Ports by Node
===========================
.. rest_method:: GET /v1/nodes/{node_ident}/ports/detail
Return a detailed list of bare metal Ports associated with ``node_ident``.
API microversion 1.34 added the ``physical_network`` field.
Normal response code: 200
Error codes: TBD
Request
-------
.. rest_parameters:: parameters.yaml
- node_ident: node_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
- node_uuid: node_uuid
- local_link_connection: local_link_connection
- pxe_enabled: pxe_enabled
- physical_network: physical_network
- internal_info: internal_info
- extra: extra
- created_at: created_at
- updated_at: updated_at
- links: links
**Example details of a Node's Ports:**
.. literalinclude:: samples/node-port-detail-response.json