Merge "Fix wrong nova-manage command in upgrade check"
This commit is contained in:
@@ -264,8 +264,8 @@ class UpgradeCommands(upgradecheck.UpgradeCommands):
|
|||||||
msg = (_("""
|
msg = (_("""
|
||||||
Instances found without hw_machine_type set. This warning can be ignored if
|
Instances found without hw_machine_type set. This warning can be ignored if
|
||||||
your environment does not contain libvirt based compute hosts.
|
your environment does not contain libvirt based compute hosts.
|
||||||
Use the `nova-manage machine_type list_unset` command to list these instances.
|
Use the `nova-manage libvirt list_unset_machine_type` command to list these
|
||||||
For more details see the following:
|
instances. For more details see the following:
|
||||||
https://docs.openstack.org/nova/latest/admin/hw-machine-type.html"""))
|
https://docs.openstack.org/nova/latest/admin/hw-machine-type.html"""))
|
||||||
return upgradecheck.Result(upgradecheck.Code.WARNING, msg)
|
return upgradecheck.Result(upgradecheck.Code.WARNING, msg)
|
||||||
|
|
||||||
|
@@ -331,8 +331,8 @@ class LibvirtMachineTypeTest(base.ServersTestBase):
|
|||||||
self._unset_machine_type(server_shelved_without['id'])
|
self._unset_machine_type(server_shelved_without['id'])
|
||||||
|
|
||||||
# Assert that both _without instances are listed by
|
# Assert that both _without instances are listed by
|
||||||
# get_instances_without_type as used by `nova-manage machine_type
|
# get_instances_without_type as used by `nova-manage libvirt
|
||||||
# list_unset` and `nova-status upgrade check`
|
# list_unset_machine_type` and `nova-status upgrade check`
|
||||||
instances = machine_type_utils.get_instances_without_type(self.context)
|
instances = machine_type_utils.get_instances_without_type(self.context)
|
||||||
instance_uuids = [i.uuid for i in instances]
|
instance_uuids = [i.uuid for i in instances]
|
||||||
self.assertIn(
|
self.assertIn(
|
||||||
@@ -357,8 +357,9 @@ class LibvirtMachineTypeTest(base.ServersTestBase):
|
|||||||
instances[0].uuid
|
instances[0].uuid
|
||||||
)
|
)
|
||||||
|
|
||||||
# Manually update the machine type of server_shelved_without using
|
# Manually update the machine type of server_shelved_without
|
||||||
# machine_type_utils as used by `nova-manage machine_type update`
|
# using machine_type_utils as used by the nova-manage libvirt
|
||||||
|
# update_machine_type command
|
||||||
machine_type_utils.update_machine_type(
|
machine_type_utils.update_machine_type(
|
||||||
self.context,
|
self.context,
|
||||||
server_shelved_without['id'],
|
server_shelved_without['id'],
|
||||||
|
Reference in New Issue
Block a user