summaryrefslogtreecommitdiff
path: root/api-ref
diff options
context:
space:
mode:
authorTzu-Mainn Chen <tzumainn@redhat.com>2020-01-07 22:25:08 +0000
committerTzu-Mainn Chen <tzumainn@redhat.com>2020-04-07 15:33:42 +0000
commit602a467a04a0cae3a2d65ba45bfd70eabd4c105a (patch)
tree0ea7dc920b01415d1c2588ccdfcff6b1f8c8e89e /api-ref
parentb148cabdb2cc6810b09e8bfbc500d15969c0f164 (diff)
downloadironic-602a467a04a0cae3a2d65ba45bfd70eabd4c105a.tar.gz
Add node lessee field
This change adds a `lessee` field to nodes, and exposes it to policy. It also updates the non-admin node list API to match for both owner and lessee; and updates the allocation conductor to match owner allocations with nodes with the appropriate lessee. Change-Id: Ib31b49c7143ec8fd6cb486fc24038215b197c418 Story: 2006506 Task: 37930
Diffstat (limited to 'api-ref')
-rw-r--r--api-ref/source/baremetal-api-v1-nodes.inc19
-rw-r--r--api-ref/source/parameters.yaml6
-rw-r--r--api-ref/source/samples/node-create-response.json1
-rw-r--r--api-ref/source/samples/node-show-response.json1
-rw-r--r--api-ref/source/samples/node-update-driver-info-response.json1
-rw-r--r--api-ref/source/samples/nodes-list-details-response.json2
6 files changed, 30 insertions, 0 deletions
diff --git a/api-ref/source/baremetal-api-v1-nodes.inc b/api-ref/source/baremetal-api-v1-nodes.inc
index 78e8a0f1c..49d5cf436 100644
--- a/api-ref/source/baremetal-api-v1-nodes.inc
+++ b/api-ref/source/baremetal-api-v1-nodes.inc
@@ -101,6 +101,9 @@ supplied when the Node is created, or the resource may be updated later.
.. versionadded:: 1.52
Introduced the ``allocation_uuid`` field.
+.. versionadded:: 1.65
+ Introduced the ``lessee`` field.
+
Normal response codes: 201
Error codes: 400,403,406
@@ -131,6 +134,7 @@ Request
- vendor_interface: req_vendor_interface
- owner: owner
- description: n_description
+ - lessee: lessee
**Example Node creation request with a dynamic driver:**
@@ -201,6 +205,7 @@ microversion 1.48.
- protected_reason: protected_reason
- conductor: conductor
- owner: owner
+ - lessee: lessee
- description: n_description
- allocation_uuid: allocation_uuid
@@ -260,6 +265,9 @@ provision state, and maintenance setting for each Node.
.. versionadded:: 1.51
Introduced the ``description`` field.
+.. versionadded:: 1.65
+ Introduced the ``lessee`` field.
+
Normal response codes: 200
Error codes: 400,403,406
@@ -279,6 +287,7 @@ Request
- conductor: r_conductor
- fault: r_fault
- owner: owner
+ - lessee: lessee
- description_contains: r_description_contains
- fields: fields
- limit: limit
@@ -347,6 +356,9 @@ Nova instance, eg. with a request to ``v1/nodes/detail?instance_uuid={NOVA INSTA
.. versionadded:: 1.52
Introduced the ``allocation_uuid`` field.
+.. versionadded:: 1.65
+ Introduced the ``lessee`` field.
+
Normal response codes: 200
Error codes: 400,403,406
@@ -366,6 +378,7 @@ Request
- conductor_group: r_conductor_group
- conductor: r_conductor
- owner: owner
+ - lessee: lessee
- description_contains: r_description_contains
- limit: limit
- marker: marker
@@ -423,6 +436,7 @@ Response
- protected: protected
- protected_reason: protected_reason
- owner: owner
+ - lessee: lessee
- description: n_description
- conductor: conductor
- allocation_uuid: allocation_uuid
@@ -474,6 +488,9 @@ only the specified set.
.. versionadded:: 1.61
Introduced the ``retired`` and ``retired_reason`` fields.
+.. versionadded:: 1.65
+ Introduced the ``lessee`` field.
+
Normal response codes: 200
Error codes: 400,403,404,406
@@ -537,6 +554,7 @@ Response
- protected: protected
- protected_reason: protected_reason
- owner: owner
+ - lessee: lessee
- description: n_description
- conductor: conductor
- allocation_uuid: allocation_uuid
@@ -632,6 +650,7 @@ Response
- protected: protected
- protected_reason: protected_reason
- owner: owner
+ - lessee: lessee
- description: n_description
- conductor: conductor
- allocation_uuid: allocation_uuid
diff --git a/api-ref/source/parameters.yaml b/api-ref/source/parameters.yaml
index 4967fc61d..59567b488 100644
--- a/api-ref/source/parameters.yaml
+++ b/api-ref/source/parameters.yaml
@@ -910,6 +910,12 @@ last_error:
in: body
required: true
type: string
+lessee:
+ description: |
+ A string or UUID of the tenant who is leasing the object.
+ in: body
+ required: false
+ type: string
links:
description: |
A list of relative links. Includes the self and
diff --git a/api-ref/source/samples/node-create-response.json b/api-ref/source/samples/node-create-response.json
index 84932a235..214305d0e 100644
--- a/api-ref/source/samples/node-create-response.json
+++ b/api-ref/source/samples/node-create-response.json
@@ -23,6 +23,7 @@
"instance_info": {},
"instance_uuid": null,
"last_error": null,
+ "lessee": null,
"links": [
{
"href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d",
diff --git a/api-ref/source/samples/node-show-response.json b/api-ref/source/samples/node-show-response.json
index 3a520c96b..9cb1931b0 100644
--- a/api-ref/source/samples/node-show-response.json
+++ b/api-ref/source/samples/node-show-response.json
@@ -26,6 +26,7 @@
"instance_info": {},
"instance_uuid": null,
"last_error": null,
+ "lessee": null,
"links": [
{
"href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d",
diff --git a/api-ref/source/samples/node-update-driver-info-response.json b/api-ref/source/samples/node-update-driver-info-response.json
index 05665a3dc..f7d2d88ee 100644
--- a/api-ref/source/samples/node-update-driver-info-response.json
+++ b/api-ref/source/samples/node-update-driver-info-response.json
@@ -27,6 +27,7 @@
"instance_info": {},
"instance_uuid": null,
"last_error": null,
+ "lessee": null,
"links": [
{
"href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d",
diff --git a/api-ref/source/samples/nodes-list-details-response.json b/api-ref/source/samples/nodes-list-details-response.json
index 870a62558..90dc72a2a 100644
--- a/api-ref/source/samples/nodes-list-details-response.json
+++ b/api-ref/source/samples/nodes-list-details-response.json
@@ -28,6 +28,7 @@
"instance_info": {},
"instance_uuid": "5344a3e2-978a-444e-990a-cbf47c62ef88",
"last_error": null,
+ "lessee": null,
"links": [
{
"href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d",
@@ -132,6 +133,7 @@
"instance_info": {},
"instance_uuid": null,
"last_error": null,
+ "lessee": null,
"links": [
{
"href": "http://127.0.0.1:6385/v1/nodes/2b045129-a906-46af-bc1a-092b294b3428",