From 8932282952f85320f364d2bdc5efd0d213019299 Mon Sep 17 00:00:00 2001 From: "Dr. Jens Harbott" Date: Fri, 13 Sep 2024 12:39:52 +0200 Subject: [PATCH] evacuate: Fix password parameter name for SDK The parameter is called admin_password on the SDK side. Change-Id: I0cd86675a884e6c2cbd3a861b8e111f961f0f336 --- openstackclient/compute/v2/server.py | 2 +- openstackclient/tests/unit/compute/v2/test_server.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/openstackclient/compute/v2/server.py b/openstackclient/compute/v2/server.py index 2820ffc270..27063b90ff 100644 --- a/openstackclient/compute/v2/server.py +++ b/openstackclient/compute/v2/server.py @@ -3840,7 +3840,7 @@ host.""" kwargs = { 'host': parsed_args.host, - 'password': parsed_args.password, + 'admin_password': parsed_args.password, } if not sdk_utils.supports_microversion(compute_client, '2.14'): diff --git a/openstackclient/tests/unit/compute/v2/test_server.py b/openstackclient/tests/unit/compute/v2/test_server.py index 951a8d0e33..06c06e5f4e 100644 --- a/openstackclient/tests/unit/compute/v2/test_server.py +++ b/openstackclient/tests/unit/compute/v2/test_server.py @@ -6974,7 +6974,7 @@ class TestServerEvacuate(TestServer): evac_args = { 'host': None, 'on_shared_storage': False, - 'password': None, + 'admin_password': None, } self._test_evacuate(args, verify_args, evac_args) @@ -6991,7 +6991,7 @@ class TestServerEvacuate(TestServer): evac_args = { 'host': None, 'on_shared_storage': False, - 'password': 'password', + 'admin_password': 'password', } self._test_evacuate(args, verify_args, evac_args) @@ -7008,7 +7008,7 @@ class TestServerEvacuate(TestServer): ('server', self.server.id), ('host', 'target-host'), ] - evac_args = {'host': host, 'password': None} + evac_args = {'host': host, 'admin_password': None} self._test_evacuate(args, verify_args, evac_args) @@ -7041,7 +7041,7 @@ class TestServerEvacuate(TestServer): evac_args = { 'host': None, 'on_shared_storage': True, - 'password': None, + 'admin_password': None, } self._test_evacuate(args, verify_args, evac_args) @@ -7072,7 +7072,7 @@ class TestServerEvacuate(TestServer): evac_args = { 'host': None, 'on_shared_storage': False, - 'password': None, + 'admin_password': None, } self._test_evacuate(args, verify_args, evac_args) mock_wait_for_status.assert_called_once_with(