summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-07-16 14:49:42 +0000
committerGerrit Code Review <review@openstack.org>2018-07-16 14:49:42 +0000
commit364ce2c3c60aa533ca69ca0833e728c78b1f530c (patch)
tree5bdc5a828ce11dcd2aa03062951de5e81a2fbffc
parentebdc6fc9a03394b029d416e3d259fa6db374e8b2 (diff)
parent052ad71866e744ab2c62d26738ce710009aae8f9 (diff)
downloadpython-ironicclient-364ce2c3c60aa533ca69ca0833e728c78b1f530c.tar.gz
Merge "Support node's deploy_step field"
-rw-r--r--ironicclient/common/http.py2
-rw-r--r--ironicclient/shell.py2
-rw-r--r--ironicclient/tests/functional/osc/v1/test_baremetal_node_fields.py1
-rw-r--r--ironicclient/tests/functional/test_json_response.py1
-rw-r--r--ironicclient/tests/unit/osc/v1/test_baremetal_node.py3
-rw-r--r--ironicclient/tests/unit/v1/test_node_shell.py1
-rw-r--r--ironicclient/v1/resource_fields.py3
-rw-r--r--releasenotes/notes/node-deploy-step-061e8925dfee3918.yaml9
8 files changed, 19 insertions, 3 deletions
diff --git a/ironicclient/common/http.py b/ironicclient/common/http.py
index 038c0ca..19d180c 100644
--- a/ironicclient/common/http.py
+++ b/ironicclient/common/http.py
@@ -43,7 +43,7 @@ from ironicclient import exc
# http://specs.openstack.org/openstack/ironic-specs/specs/kilo/api-microversions.html # noqa
# for full details.
DEFAULT_VER = '1.9'
-LAST_KNOWN_API_VERSION = 42
+LAST_KNOWN_API_VERSION = 44
LATEST_VERSION = '1.{}'.format(LAST_KNOWN_API_VERSION)
LOG = logging.getLogger(__name__)
diff --git a/ironicclient/shell.py b/ironicclient/shell.py
index 8343216..03f813a 100644
--- a/ironicclient/shell.py
+++ b/ironicclient/shell.py
@@ -38,7 +38,7 @@ from ironicclient.common import utils
from ironicclient import exc
-LAST_KNOWN_API_VERSION = 34
+LAST_KNOWN_API_VERSION = http.LAST_KNOWN_API_VERSION
LATEST_VERSION = '1.{}'.format(LAST_KNOWN_API_VERSION)
diff --git a/ironicclient/tests/functional/osc/v1/test_baremetal_node_fields.py b/ironicclient/tests/functional/osc/v1/test_baremetal_node_fields.py
index 79f3a2d..dd19958 100644
--- a/ironicclient/tests/functional/osc/v1/test_baremetal_node_fields.py
+++ b/ironicclient/tests/functional/osc/v1/test_baremetal_node_fields.py
@@ -82,6 +82,7 @@ class TestNodeShowFields(base.TestCase):
rows = ['console_enabled',
'clean_step',
'created_at',
+ 'deploy_step',
'driver',
'driver_info',
'driver_internal_info',
diff --git a/ironicclient/tests/functional/test_json_response.py b/ironicclient/tests/functional/test_json_response.py
index 73ecc12..3588268 100644
--- a/ironicclient/tests/functional/test_json_response.py
+++ b/ironicclient/tests/functional/test_json_response.py
@@ -45,6 +45,7 @@ class TestNodeJsonResponse(base.FunctionalTestBase):
"maintenance_reason": {"type": ["string", "null"]},
"provision_state": {"type": "string"},
"clean_step": {"type": "object"},
+ "deploy_step": {"type": "object"},
"uuid": {"type": "string"},
"console_enabled": {"type": "boolean"},
"target_provision_state": {"type": ["string", "null"]},
diff --git a/ironicclient/tests/unit/osc/v1/test_baremetal_node.py b/ironicclient/tests/unit/osc/v1/test_baremetal_node.py
index 589aa7b..bc12c03 100644
--- a/ironicclient/tests/unit/osc/v1/test_baremetal_node.py
+++ b/ironicclient/tests/unit/osc/v1/test_baremetal_node.py
@@ -594,7 +594,7 @@ class TestBaremetalList(TestBaremetal):
)
collist = ('Chassis UUID', 'Created At', 'Clean Step',
- 'Console Enabled', 'Driver', 'Driver Info',
+ 'Console Enabled', 'Deploy Step', 'Driver', 'Driver Info',
'Driver Internal Info', 'Extra', 'Instance Info',
'Instance UUID', 'Last Error', 'Maintenance',
'Maintenance Reason', 'Fault',
@@ -621,6 +621,7 @@ class TestBaremetalList(TestBaremetal):
'',
'',
'',
+ '',
baremetal_fakes.baremetal_instance_uuid,
'',
baremetal_fakes.baremetal_maintenance,
diff --git a/ironicclient/tests/unit/v1/test_node_shell.py b/ironicclient/tests/unit/v1/test_node_shell.py
index 636b6bf..df50d86 100644
--- a/ironicclient/tests/unit/v1/test_node_shell.py
+++ b/ironicclient/tests/unit/v1/test_node_shell.py
@@ -37,6 +37,7 @@ class NodeShellTest(utils.BaseTestCase):
'clean_step',
'created_at',
'console_enabled',
+ 'deploy_step',
'driver',
'driver_info',
'driver_internal_info',
diff --git a/ironicclient/v1/resource_fields.py b/ironicclient/v1/resource_fields.py
index dbbbb3d..a14306c 100644
--- a/ironicclient/v1/resource_fields.py
+++ b/ironicclient/v1/resource_fields.py
@@ -53,6 +53,7 @@ class Resource(object):
'default_rescue_interface': 'Default Rescue Interface',
'default_storage_interface': 'Default Storage Interface',
'default_vendor_interface': 'Default Vendor Interface',
+ 'deploy_step': 'Deploy Step',
'description': 'Description',
'driver': 'Driver',
'driver_info': 'Driver Info',
@@ -201,6 +202,7 @@ NODE_DETAILED_RESOURCE = Resource(
'created_at',
'clean_step',
'console_enabled',
+ 'deploy_step',
'driver',
'driver_info',
'driver_internal_info',
@@ -246,6 +248,7 @@ NODE_DETAILED_RESOURCE = Resource(
# internal to ironic. See bug #1443003 for more details.
'chassis_uuid',
'clean_step',
+ 'deploy_step',
'driver_info',
'driver_internal_info',
'extra',
diff --git a/releasenotes/notes/node-deploy-step-061e8925dfee3918.yaml b/releasenotes/notes/node-deploy-step-061e8925dfee3918.yaml
new file mode 100644
index 0000000..39ba639
--- /dev/null
+++ b/releasenotes/notes/node-deploy-step-061e8925dfee3918.yaml
@@ -0,0 +1,9 @@
+---
+features:
+ - |
+ Adds support for a node's ``deploy_step`` (read-only) field.
+ The deploy step indicates which step is being performed
+ during the deployment/provisioning of a node.
+ It is available starting with Bare Metal API version 1.44.
+ For more details, see
+ `story 1753128 <https://storyboard.openstack.org/#!/story/1753128>`_.