From: Hashir Mohammed Date: Fri, 10 Mar 2017 11:54:19 +0000 (-0500) Subject: CAL refactor- Bug fix X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F73%2F1273%2F1;p=osm%2FSO.git CAL refactor- Bug fix Reviewer: Anirudha Signed-off-by: Hashir Mohammed --- diff --git a/rwcal/plugins/vala/rwcal_openstack/rift/rwcal/openstack/utils/compute.py b/rwcal/plugins/vala/rwcal_openstack/rift/rwcal/openstack/utils/compute.py index d7658dad..55ece65c 100644 --- a/rwcal/plugins/vala/rwcal_openstack/rift/rwcal/openstack/utils/compute.py +++ b/rwcal/plugins/vala/rwcal_openstack/rift/rwcal/openstack/utils/compute.py @@ -520,9 +520,16 @@ class ComputeUtils(object): console_url(string): Console URL for VM """ console_url = None - if self._parse_vdu_state_info(vm_info) == 'ACTIVE': + if self._parse_vdu_state_info(vm_info) == 'active': try: console_url = self.driver.nova_server_console(vm_info['id']) + serv_console_url = self.driver.nova_server_console(vm_info['id']) + if 'console' in serv_console_url: + console_url = serv_console_url['console']['url'] + else: + self.log.error("Error fetching console url. This could be an Openstack issue. Console : " + str(serv_console_url)) + + except Exception as e: self.log.exception("Exception %s occured during volume list parsing", str(e)) return console_url