The only task currently supported is reboot.
Change-Id: I9089c593af30db071508a47667381238fe91e44e
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
from keystoneauth1.exceptions import Unauthorized
from snaps.config.flavor import FlavorConfig
from keystoneauth1.exceptions import Unauthorized
from snaps.config.flavor import FlavorConfig
proxy_setting=proxy_settings)
if retval != 0:
# Not a fatal type of event
proxy_setting=proxy_settings)
if retval != 0:
# Not a fatal type of event
'Unable to apply playbook found at location - %s',
ansible_config.get('playbook_location'))
'Unable to apply playbook found at location - %s',
ansible_config.get('playbook_location'))
+ elif ansible_config.get('post_processing'):
+ post_proc_config = ansible_config['post_processing']
+ if 'sleep' in post_proc_config:
+ time.sleep(post_proc_config['sleep'])
+ if 'reboot' in post_proc_config:
+ for vm_name in post_proc_config['reboot']:
+ if vm_name in vm_dict:
+ logger.info('Rebooting VM - %s', vm_name)
+ vm_dict[vm_name].reboot()
+