fix error when no size is provided at vnfd:vdus:volumes 59/6459/3
authortierno <alfonso.tiernosepulveda@telefonica.com>
Thu, 6 Sep 2018 11:47:11 +0000 (13:47 +0200)
committertierno <alfonso.tiernosepulveda@telefonica.com>
Tue, 18 Sep 2018 14:46:26 +0000 (15:46 +0100)
Change-Id: I092245407d4acdb75b373e40905d9fc2e2b44b20
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
openmanod
osm_ro/httpserver.py
osm_ro/nfvo.py

index 5a1701d..367b505 100755 (executable)
--- a/openmanod
+++ b/openmanod
@@ -48,8 +48,8 @@ import osm_ro
 
 __author__ = "Alfonso Tierno, Gerardo Garcia, Pablo Montes"
 __date__ = "$26-aug-2014 11:09:29$"
-__version__ = "0.5.76-r586"
-version_date = "Ago 2018"
+__version__ = "0.5.77-r587"
+version_date = "Sep 2018"
 database_version = 32      # expected database schema version
 
 
index 755ba11..b3b55b2 100644 (file)
@@ -248,7 +248,7 @@ def format_in(default_schema, version_fields=None, version_dict_schema=None, con
             
         js_v(client_data, used_schema)
         return client_data, used_schema
-    except (ValueError, yaml.YAMLError) as exc:
+    except (TypeError, ValueError, yaml.YAMLError) as exc:
         error_text += str(exc)
         logger.error(error_text) 
         bottle.abort(HTTP_Bad_Request, error_text)
index c231d53..c89ea79 100644 (file)
@@ -722,8 +722,8 @@ def create_or_use_flavor(mydb, vims, flavor_dict, rollback_list, only_create_at_
             for index in range(0,len(devices_original)) :
                 device=devices_original[index]
                 if "image" not in device and "image name" not in device:
-                    if 'size' in device:
-                        disk_list.append({'size': device.get('size', default_volume_size), 'name': device.get('name')})
+                    if 'size' in device:
+                    disk_list.append({'size': device.get('size', default_volume_size), 'name': device.get('name')})
                     continue
                 image_dict={}
                 image_dict['name']=device.get('image name',flavor_dict['name']+str(dev_nb)+"-img")