From 4592d2c78fc4c814b4b7a08d400eddcd1c25ad19 Mon Sep 17 00:00:00 2001 From: Pavlo Shchelokovskyy Date: Fri, 15 Jul 2022 14:03:18 +0300 Subject: [PATCH] Fix server evacuate command I don't think it has ever worked in fact.. The server.evacuate() in novaclient returns not a Server() instance, but a TupleWithMeta() object, that has no .to_dict() method [0] used in _prep_server_detail() function. [0] https://review.opendev.org/c/openstack/python-novaclient/+/276639 Change-Id: I22f9ac072eb1b0bfd1263a256e9bea4500c03290 Story: 2010204 Task: 45928 --- openstackclient/compute/v2/server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openstackclient/compute/v2/server.py b/openstackclient/compute/v2/server.py index b02ee6ff7f..81d50b25c1 100644 --- a/openstackclient/compute/v2/server.py +++ b/openstackclient/compute/v2/server.py @@ -3335,7 +3335,7 @@ host.""") server = utils.find_resource( compute_client.servers, parsed_args.server) - server = server.evacuate(**kwargs) + server.evacuate(**kwargs) if parsed_args.wait: if utils.wait_for_status( @@ -3350,7 +3350,7 @@ host.""") raise SystemExit details = _prep_server_detail( - compute_client, image_client, server, refresh=False) + compute_client, image_client, server, refresh=True) return zip(*sorted(details.items()))