Remove leftover of --heat-type installed

Support of --heat-type installed was already removed by [1]. This
removes the remaining implementation for it.

[1] 60d17b2fa1

Change-Id: If3cc6fed8b286c48006990c84fe2ef13cd829c11
This commit is contained in:
Takashi Kajinami 2022-10-13 11:44:57 +09:00
parent 0167db8879
commit 16960e3eb2
3 changed files with 10 additions and 11 deletions

View File

@ -35,10 +35,10 @@ class TestDeleteOvercloud(deploy_fakes.TestDeployOvercloud):
@mock.patch('os.chdir', autospec=True)
@mock.patch('tempfile.mkdtemp', autospec=True)
def test_overcloud_delete(self, mock_mkdir, mock_cd, mock_run_playbook):
arglist = ["overcast", "--heat-type", "installed", "-y"]
arglist = ["overcast", "--heat-type", "native", "-y"]
verifylist = [
("stack", "overcast"),
("heat_type", "installed"),
("heat_type", "native"),
("yes", True)
]

View File

@ -72,12 +72,11 @@ class DeleteOvercloud(command.Command):
'--heat-type',
action='store',
default='pod',
choices=['installed', 'pod', 'container', 'native'],
choices=['pod', 'container', 'native'],
help=_('DEPRECATED: This option is ineffective and '
'ignored after deprecation. The type of Heat '
'process that was used to execute the deployment.\n'
'pod (Default): Use an ephemeral Heat pod.\n'
'installed: Use the system installed Heat.\n'
'container: Use an ephemeral Heat container.\n'
'native: Use an ephemeral Heat process.')
)

View File

@ -119,7 +119,7 @@ def get_hosts_and_enable_ssh_admin(stack_name, overcloud_ssh_network,
overcloud_ssh_user, overcloud_ssh_key,
overcloud_ssh_port_timeout,
working_dir, verbosity=0,
heat_type='installed'):
heat_type='pod'):
"""Enable ssh admin access.
Get a list of hosts from a given stack and enable admin ssh across all of
@ -166,7 +166,7 @@ def get_hosts_and_enable_ssh_admin(stack_name, overcloud_ssh_network,
def enable_ssh_admin(stack_name, hosts, ssh_user, ssh_key, timeout,
working_dir, verbosity=0, heat_type='installed'):
working_dir, verbosity=0, heat_type='pod'):
"""Run enable ssh admin access playbook.
:param stack_name: Stack name.
@ -199,7 +199,7 @@ def enable_ssh_admin(stack_name, hosts, ssh_user, ssh_key, timeout,
)
)
try:
if heat_type != 'installed' and tc_heat_utils.heatclient:
if tc_heat_utils.heatclient:
tc_heat_utils.heatclient.save_environment()
playbook = 'cli-enable-ssh-admin.yaml'
ansible_work_dir = os.path.join(
@ -221,7 +221,7 @@ def enable_ssh_admin(stack_name, hosts, ssh_user, ssh_key, timeout,
ansible_timeout=timeout
)
finally:
if heat_type != 'installed' and tc_heat_utils.heatclient:
if tc_heat_utils.heatclient:
tc_heat_utils.heatclient.restore_environment()
print("Enabling ssh admin - COMPLETE.")
@ -443,7 +443,7 @@ def snapshot_dir(directory):
def get_horizon_url(stack, verbosity=0,
heat_type='installed',
heat_type='pod',
working_dir=None):
"""Return horizon URL string.
@ -453,7 +453,7 @@ def get_horizon_url(stack, verbosity=0,
"""
try:
if heat_type != 'installed' and tc_heat_utils.heatclient:
if tc_heat_utils.heatclient:
tc_heat_utils.heatclient.save_environment()
playbook = 'cli-undercloud-get-horizon-url.yaml'
ansible_work_dir = os.path.join(
@ -472,7 +472,7 @@ def get_horizon_url(stack, verbosity=0,
}
)
finally:
if heat_type != 'installed' and tc_heat_utils.heatclient:
if tc_heat_utils.heatclient:
tc_heat_utils.heatclient.restore_environment()
with open(horizon_file) as f: