'''
__author__="Alfonso Tierno, Gerardo Garcia, Pablo Montes"
__date__ ="$26-aug-2014 11:09:29$"
-__version__="0.4.43-r480"
+__version__="0.4.43-r481"
version_date="Jul 2016"
database_version="0.11" #expected database schema version
'''
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))