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):
# 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)):
port_dict["provider_security_groups"]=[]
port_dict["security_groups"]=[]
else: # For PT PCI-PASSTHROUGH
- # VIO specific Changes
- # Current VIO release does not support port with type 'direct-physical'
- # So no need to create virtual port in case of PCI-device.
- # Will update port_dict code when support gets added in next VIO release
- if self.vim_type == "VIO":
- raise vimconn.vimconnNotSupportedException(
- "Current VIO release does not support full passthrough (PT)")
# if "vpci" in net:
# if "PF" not in metadata_vpci:
# metadata_vpci["PF"]=[]
#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