summaryrefslogtreecommitdiff
path: root/api-ref/source/baremetal-api-v1-nodes-portgroups.inc
blob: fc9cfbc2b3e856f66a94c852b6f1b46437dba690 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
.. -*- rst -*-

==============================================
Listing Portgroups by Node (nodes, portgroups)
==============================================

.. versionadded:: 1.24

Given a Node identifier (``uuid`` or ``name``), the API exposes the list of,
and details of, all Portgroups associated with that Node.

These endpoints do not allow modification of the Portgroups; that should be
done by accessing the Portgroup resources under the ``/v1/portgroups``
endpoint.

List Portgroups by Node
=======================

.. rest_method:: GET /v1/nodes/{node_ident}/portgroups

Return a list of bare metal Portgroups associated with ``node_ident``.

Normal response code: 200

Error codes: 400,401,403,404

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

    - portgroups: portgroups
    - uuid: uuid
    - address: portgroup_address
    - name: portgroup_name
    - links: links

**Example list of a Node's Portgroups:**

.. literalinclude:: samples/node-portgroup-list-response.json


List detailed Portgroups by Node
================================

.. rest_method:: GET /v1/nodes/{node_ident}/portgroups/detail

Return a detailed list of bare metal Portgroups associated with ``node_ident``.

Normal response code: 200

Error codes: 400,401,403,404

Request
-------

.. rest_parameters:: parameters.yaml

    - node_ident: node_ident
    - limit: limit
    - marker: marker
    - sort_dir: sort_dir
    - sort_key: sort_key

Response
--------

.. rest_parameters:: parameters.yaml

    - portgroups: portgroups
    - uuid: uuid
    - address: portgroup_address
    - name: portgroup_name
    - node_uuid: node_uuid
    - standalone_ports_supported: standalone_ports_supported
    - internal_info: portgroup_internal_info
    - extra: extra
    - mode: portgroup_mode
    - properties: portgroup_properties
    - ports: pg_ports
    - created_at: created_at
    - updated_at: updated_at
    - links: links

**Example details of a Node's Portgroups:**

.. literalinclude:: samples/node-portgroup-detail-response.json