numa_properties["hw:cpu_policy"] = "isolated"
for interface in numa.get("interfaces",() ):
if interface["dedicated"]=="yes":
- raise vimconn.HTTP_Service_Unavailable("Passthrough interfaces are not supported for the openstack connector")
+ raise vimconn.vimconnException("Passthrough interfaces are not supported for the openstack connector", http_code=vimconn.HTTP_Service_Unavailable)
#TODO, add the key 'pci_passthrough:alias"="<label at config>:<number ifaces>"' when a way to connect it is available
#create flavor
'''
self.logger.debug("Creating VM image '%s' flavor '%s' nics='%s'",image_id, flavor_id,str(net_list))
try:
- metadata=[]
+ metadata={}
net_list_vim=[]
self._reload_connection()
metadata_vpci={} #For a specific neutron plugin
net_list_vim.append({"port-id": new_port["port"]["id"]})
if metadata_vpci:
metadata = {"pci_assignement": json.dumps(metadata_vpci)}
+ if len(metadata["pci_assignement"]) >255:
+ #limit the metadata size
+ #metadata["pci_assignement"] = metadata["pci_assignement"][0:255]
+ self.logger.warn("Metadata deleted since it exceeds the expected length (255) ")
+ metadata = {}
self.logger.debug("name '%s' image_id '%s'flavor_id '%s' net_list_vim '%s' description '%s' metadata %s",
name, image_id, flavor_id, str(net_list_vim), description, str(metadata))