From: tierno Date: Thu, 6 Sep 2018 11:47:11 +0000 (+0200) Subject: fix error when no size is provided at vnfd:vdus:volumes X-Git-Tag: v5.0.0~34 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F59%2F6459%2F3;p=osm%2FRO.git fix error when no size is provided at vnfd:vdus:volumes Change-Id: I092245407d4acdb75b373e40905d9fc2e2b44b20 Signed-off-by: tierno --- diff --git a/openmanod b/openmanod index 5a1701d5..367b505f 100755 --- 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 diff --git a/osm_ro/httpserver.py b/osm_ro/httpserver.py index 755ba115..b3b55b2f 100644 --- a/osm_ro/httpserver.py +++ b/osm_ro/httpserver.py @@ -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) diff --git a/osm_ro/nfvo.py b/osm_ro/nfvo.py index c231d536..c89ea796 100644 --- a/osm_ro/nfvo.py +++ b/osm_ro/nfvo.py @@ -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")