diff options
Diffstat (limited to 'snaps/openstack/utils/launch_utils.py')
-rw-r--r-- | snaps/openstack/utils/launch_utils.py | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/snaps/openstack/utils/launch_utils.py b/snaps/openstack/utils/launch_utils.py index 00ea822..ddaad12 100644 --- a/snaps/openstack/utils/launch_utils.py +++ b/snaps/openstack/utils/launch_utils.py @@ -53,6 +53,10 @@ from snaps.openstack.utils import deploy_utils, neutron_utils, keystone_utils from snaps.openstack.utils.nova_utils import RebootType from snaps.provisioning import ansible_utils +from warnings import warn +warn('This utility will be removed in a subsequent release', + DeprecationWarning) + logger = logging.getLogger('lanuch_utils') DEFAULT_CREDS_KEY = 'admin' @@ -464,17 +468,13 @@ def __apply_ansible_playbook(ansible_config, os_creds_dict, vm_dict, ansible_config.get('variables'), os_creds_dict, vm_dict, image_dict, flavor_dict, networks_dict, routers_dict) - retval = ansible_utils.apply_playbook( + ansible_utils.apply_playbook( ansible_config['playbook_location'], floating_ips, remote_user, ssh_priv_key_file_path=private_key_filepath, variables=variables, proxy_setting=proxy_settings) - if retval != 0: - # Not a fatal type of event - raise Exception( - 'Error applying playbook found at location - %s', - ansible_config.get('playbook_location')) - elif ansible_config.get('post_processing'): + + if 'post_processing' in ansible_config: post_proc_config = ansible_config['post_processing'] if 'sleep' in post_proc_config: time.sleep(post_proc_config['sleep']) @@ -484,8 +484,6 @@ def __apply_ansible_playbook(ansible_config, os_creds_dict, vm_dict, logger.info('Rebooting VM - %s', vm_name) vm_dict[vm_name].reboot(RebootType.hard) - return retval - def __get_connection_info(ansible_config, vm_dict): """ |