X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=RO-VIM-openstack%2Fosm_rovim_openstack%2Fvimconn_openstack.py;h=f1cccf643548df6d4ac4f583d7b246f1c7cccb79;hb=refs%2Ftags%2Fv7.1.0rc4;hp=ff43346064f66f0ec146f74236470321c553386a;hpb=4af0d54a246b1305f32774c27ae0f585c843afad;p=osm%2FRO.git diff --git a/RO-VIM-openstack/osm_rovim_openstack/vimconn_openstack.py b/RO-VIM-openstack/osm_rovim_openstack/vimconn_openstack.py index ff433460..f1cccf64 100644 --- a/RO-VIM-openstack/osm_rovim_openstack/vimconn_openstack.py +++ b/RO-VIM-openstack/osm_rovim_openstack/vimconn_openstack.py @@ -72,8 +72,8 @@ netStatus2manoFormat={'ACTIVE':'ACTIVE','PAUSED':'PAUSED','INACTIVE':'INACTIVE', supportedClassificationTypes = ['legacy_flow_classifier'] #global var to have a timeout creating and deleting volumes -volume_timeout = 600 -server_timeout = 600 +volume_timeout = 1800 +server_timeout = 1800 class SafeDumper(yaml.SafeDumper): @@ -395,17 +395,17 @@ class vimconnector(vimconn.vimconnector): # method before the implemented VIM connectors are called. def _format_exception(self, exception): - '''Transform a keystone, nova, neutron exception into a vimconn exception''' + """Transform a keystone, nova, neutron exception into a vimconn exception discovering the cause""" - message_error = exception.message + message_error = str(exception) if isinstance(exception, (neExceptions.NetworkNotFoundClient, nvExceptions.NotFound, ksExceptions.NotFound, gl1Exceptions.HTTPNotFound)): raise vimconn.vimconnNotFoundException(type(exception).__name__ + ": " + message_error) elif isinstance(exception, (HTTPException, gl1Exceptions.HTTPException, gl1Exceptions.CommunicationError, - ConnectionError, ksExceptions.ConnectionError, neExceptions.ConnectionFailed)): + ConnectionError, ksExceptions.ConnectionError, neExceptions.ConnectionFailed)): raise vimconn.vimconnConnectionException(type(exception).__name__ + ": " + message_error) - elif isinstance(exception, (KeyError, nvExceptions.BadRequest, ksExceptions.BadRequest)): + elif isinstance(exception, (KeyError, nvExceptions.BadRequest, ksExceptions.BadRequest)): raise vimconn.vimconnException(type(exception).__name__ + ": " + message_error) elif isinstance(exception, (nvExceptions.ClientException, ksExceptions.ClientException, neExceptions.NeutronException)): @@ -1665,7 +1665,7 @@ class vimconnector(vimconn.vimconnector): #if network is of type vlan and port is of type direct (sr-iov) then set vlan id network = self.neutron.show_network(port["network_id"]) if network['network'].get('provider:network_type') == 'vlan' and \ - port.get("binding:vnic_type") == "direct": + port.get("binding:vnic_type") in ("direct", "direct-physical"): interface["vlan"] = network['network'].get('provider:segmentation_id') ips=[] #look for floating ip address