diff --git a/novaclient/__init__.py b/novaclient/__init__.py index 6795d8827..1530b37a7 100644 --- a/novaclient/__init__.py +++ b/novaclient/__init__.py @@ -25,4 +25,4 @@ API_MIN_VERSION = api_versions.APIVersion("2.1") # when client supported the max version, and bumped sequentially, otherwise # the client may break due to server side new version may include some # backward incompatible change. -API_MAX_VERSION = api_versions.APIVersion("2.61") +API_MAX_VERSION = api_versions.APIVersion("2.62") diff --git a/novaclient/tests/functional/v2/test_instance_action.py b/novaclient/tests/functional/v2/test_instance_action.py index a318b6e7e..93e8486ef 100644 --- a/novaclient/tests/functional/v2/test_instance_action.py +++ b/novaclient/tests/functional/v2/test_instance_action.py @@ -113,3 +113,31 @@ class TestInstanceActionCLIV258(TestInstanceActionCLI): '--changes-since=%s but got: %s\n\n' 'First instance-action-list output: %s' % (before_stop, stop_output, create_output)) + + +class TestInstanceActionCLIV262(TestInstanceActionCLIV258, + base.TenantTestBase): + """Instance action functional tests for v2.62 nova-api microversion.""" + + COMPUTE_API_VERSION = "2.62" + + def test_show_actions_with_host(self): + name = self.name_generate() + # Create server with non-admin user + server = self.another_nova('boot --flavor %s --image %s --poll %s' % + (self.flavor.name, self.image.name, name)) + server_id = self._get_value_from_the_table(server, 'id') + output = self.nova("instance-action-list %s" % server_id) + request_id = self._get_column_value_from_single_row_table( + output, "Request_ID") + + # Only the 'hostId' are exposed to non-admin + output = self.another_nova( + "instance-action %s %s" % (server_id, request_id)) + self.assertNotIn("'host'", output) + self.assertIn("'hostId'", output) + + # The 'host' and 'hostId' are exposed to admin + output = self.nova("instance-action %s %s" % (server_id, request_id)) + self.assertIn("'host'", output) + self.assertIn("'hostId'", output) diff --git a/novaclient/tests/unit/v2/test_shell.py b/novaclient/tests/unit/v2/test_shell.py index 997063416..66300c894 100644 --- a/novaclient/tests/unit/v2/test_shell.py +++ b/novaclient/tests/unit/v2/test_shell.py @@ -3634,6 +3634,7 @@ class ShellTest(utils.TestCase): 57, # There are no version-wrapped shell method changes for this. 60, # There are no client-side changes for volume multiattach. 61, # There are no version-wrapped shell method changes for this. + 62, # There are no version-wrapped shell method changes for this. ]) versions_supported = set(range(0, novaclient.API_MAX_VERSION.ver_minor + 1)) diff --git a/releasenotes/notes/microversion-v2_62-479a23f0d4307500.yaml b/releasenotes/notes/microversion-v2_62-479a23f0d4307500.yaml new file mode 100644 index 000000000..ed2948b24 --- /dev/null +++ b/releasenotes/notes/microversion-v2_62-479a23f0d4307500.yaml @@ -0,0 +1,11 @@ +--- +features: + - | + Adds support for microversion 2.62 which adds ``host`` (hostname) + and ``hostId`` (an obfuscated hashed host id string) fields to the + instance action ``GET /servers/{server_id}/os-instance-actions/{req_id}`` + API. + + The event columns are already included in the result of + "nova instance-action " command, therefore does not + have any CLI or python API binding impacts in the client.