Merge "System host-upgrade has inadequate semantic checks"
This commit is contained in:
commit
b4648c0142
@ -171,6 +171,7 @@ class HostTest(test_shell.ShellTest):
|
||||
|
||||
def test_kube_host_upgrade_control_plane(self):
|
||||
self.make_env()
|
||||
self.ihost_manager_list_result = [ihost(None, FAKE_IHOST_2, True)]
|
||||
self.kube_host_upgrade_manager_list_result = [
|
||||
KubeHostUpgrade(None, FAKE_KUBE_HOST_UPGRADE, True),
|
||||
KubeHostUpgrade(None, FAKE_KUBE_HOST_UPGRADE_2, True),
|
||||
@ -196,6 +197,7 @@ class HostTest(test_shell.ShellTest):
|
||||
|
||||
def test_kube_host_upgrade_kubelet(self):
|
||||
self.make_env()
|
||||
self.ihost_manager_list_result = [ihost(None, FAKE_IHOST_2, True)]
|
||||
self.kube_host_upgrade_manager_list_result = [
|
||||
KubeHostUpgrade(None, FAKE_KUBE_HOST_UPGRADE, True),
|
||||
KubeHostUpgrade(None, FAKE_KUBE_HOST_UPGRADE_2, True),
|
||||
|
@ -760,6 +760,7 @@ def do_host_bulk_export(cc, args):
|
||||
help="Force the downgrade operation ")
|
||||
def do_host_downgrade(cc, args):
|
||||
"""Perform software downgrade for the specified host."""
|
||||
ihost_utils._find_ihost(cc, args.hostid)
|
||||
system_type, system_mode = utils._get_system_info(cc)
|
||||
simplex = system_mode == constants.SYSTEM_MODE_SIMPLEX
|
||||
|
||||
@ -789,6 +790,7 @@ def do_host_downgrade(cc, args):
|
||||
help="Force the upgrade operation ")
|
||||
def do_host_upgrade(cc, args):
|
||||
"""Perform software upgrade for a host."""
|
||||
ihost_utils._find_ihost(cc, args.hostid)
|
||||
system_type, system_mode = utils._get_system_info(cc)
|
||||
simplex = system_mode == constants.SYSTEM_MODE_SIMPLEX
|
||||
|
||||
@ -822,6 +824,7 @@ def do_host_upgrade(cc, args):
|
||||
help="Force the kubernetes upgrade operation ")
|
||||
def do_kube_host_upgrade(cc, args):
|
||||
"""Perform kubernetes upgrade for a host."""
|
||||
ihost_utils._find_ihost(cc, args.hostid)
|
||||
|
||||
if args.component == 'control-plane':
|
||||
host = cc.ihost.kube_upgrade_control_plane(args.hostid, args.force)
|
||||
|
Loading…
Reference in New Issue
Block a user