Merge "Remove leftover of --heat-type installed"
This commit is contained in:
commit
254753402b
@ -35,10 +35,10 @@ class TestDeleteOvercloud(deploy_fakes.TestDeployOvercloud):
|
|||||||
@mock.patch('os.chdir', autospec=True)
|
@mock.patch('os.chdir', autospec=True)
|
||||||
@mock.patch('tempfile.mkdtemp', autospec=True)
|
@mock.patch('tempfile.mkdtemp', autospec=True)
|
||||||
def test_overcloud_delete(self, mock_mkdir, mock_cd, mock_run_playbook):
|
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 = [
|
verifylist = [
|
||||||
("stack", "overcast"),
|
("stack", "overcast"),
|
||||||
("heat_type", "installed"),
|
("heat_type", "native"),
|
||||||
("yes", True)
|
("yes", True)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -72,12 +72,11 @@ class DeleteOvercloud(command.Command):
|
|||||||
'--heat-type',
|
'--heat-type',
|
||||||
action='store',
|
action='store',
|
||||||
default='pod',
|
default='pod',
|
||||||
choices=['installed', 'pod', 'container', 'native'],
|
choices=['pod', 'container', 'native'],
|
||||||
help=_('DEPRECATED: This option is ineffective and '
|
help=_('DEPRECATED: This option is ineffective and '
|
||||||
'ignored after deprecation. The type of Heat '
|
'ignored after deprecation. The type of Heat '
|
||||||
'process that was used to execute the deployment.\n'
|
'process that was used to execute the deployment.\n'
|
||||||
'pod (Default): Use an ephemeral Heat pod.\n'
|
'pod (Default): Use an ephemeral Heat pod.\n'
|
||||||
'installed: Use the system installed Heat.\n'
|
|
||||||
'container: Use an ephemeral Heat container.\n'
|
'container: Use an ephemeral Heat container.\n'
|
||||||
'native: Use an ephemeral Heat process.')
|
'native: Use an ephemeral Heat process.')
|
||||||
)
|
)
|
||||||
|
@ -119,7 +119,7 @@ def get_hosts_and_enable_ssh_admin(stack_name, overcloud_ssh_network,
|
|||||||
overcloud_ssh_user, overcloud_ssh_key,
|
overcloud_ssh_user, overcloud_ssh_key,
|
||||||
overcloud_ssh_port_timeout,
|
overcloud_ssh_port_timeout,
|
||||||
working_dir, verbosity=0,
|
working_dir, verbosity=0,
|
||||||
heat_type='installed'):
|
heat_type='pod'):
|
||||||
"""Enable ssh admin access.
|
"""Enable ssh admin access.
|
||||||
|
|
||||||
Get a list of hosts from a given stack and enable admin ssh across all of
|
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,
|
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.
|
"""Run enable ssh admin access playbook.
|
||||||
|
|
||||||
:param stack_name: Stack name.
|
:param stack_name: Stack name.
|
||||||
@ -199,7 +199,7 @@ def enable_ssh_admin(stack_name, hosts, ssh_user, ssh_key, timeout,
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
if heat_type != 'installed' and tc_heat_utils.heatclient:
|
if tc_heat_utils.heatclient:
|
||||||
tc_heat_utils.heatclient.save_environment()
|
tc_heat_utils.heatclient.save_environment()
|
||||||
playbook = 'cli-enable-ssh-admin.yaml'
|
playbook = 'cli-enable-ssh-admin.yaml'
|
||||||
ansible_work_dir = os.path.join(
|
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
|
ansible_timeout=timeout
|
||||||
)
|
)
|
||||||
finally:
|
finally:
|
||||||
if heat_type != 'installed' and tc_heat_utils.heatclient:
|
if tc_heat_utils.heatclient:
|
||||||
tc_heat_utils.heatclient.restore_environment()
|
tc_heat_utils.heatclient.restore_environment()
|
||||||
print("Enabling ssh admin - COMPLETE.")
|
print("Enabling ssh admin - COMPLETE.")
|
||||||
|
|
||||||
@ -443,7 +443,7 @@ def snapshot_dir(directory):
|
|||||||
|
|
||||||
|
|
||||||
def get_horizon_url(stack, verbosity=0,
|
def get_horizon_url(stack, verbosity=0,
|
||||||
heat_type='installed',
|
heat_type='pod',
|
||||||
working_dir=None):
|
working_dir=None):
|
||||||
"""Return horizon URL string.
|
"""Return horizon URL string.
|
||||||
|
|
||||||
@ -453,7 +453,7 @@ def get_horizon_url(stack, verbosity=0,
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if heat_type != 'installed' and tc_heat_utils.heatclient:
|
if tc_heat_utils.heatclient:
|
||||||
tc_heat_utils.heatclient.save_environment()
|
tc_heat_utils.heatclient.save_environment()
|
||||||
playbook = 'cli-undercloud-get-horizon-url.yaml'
|
playbook = 'cli-undercloud-get-horizon-url.yaml'
|
||||||
ansible_work_dir = os.path.join(
|
ansible_work_dir = os.path.join(
|
||||||
@ -472,7 +472,7 @@ def get_horizon_url(stack, verbosity=0,
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
finally:
|
finally:
|
||||||
if heat_type != 'installed' and tc_heat_utils.heatclient:
|
if tc_heat_utils.heatclient:
|
||||||
tc_heat_utils.heatclient.restore_environment()
|
tc_heat_utils.heatclient.restore_environment()
|
||||||
|
|
||||||
with open(horizon_file) as f:
|
with open(horizon_file) as f:
|
||||||
|
Loading…
Reference in New Issue
Block a user