From: garciadeblas Date: Mon, 11 Dec 2017 15:07:07 +0000 (+0100) Subject: Default flavor disk size set to 0 instead of 1 X-Git-Tag: v3.0.3~17 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=79d1a1a9ed0b952750af7f8701da7e525b4715fd;p=osm%2FRO.git Default flavor disk size set to 0 instead of 1 Change-Id: If64cc3c132f224c0b8cb457e1992fadb9c11de23 Signed-off-by: garciadeblas --- diff --git a/osm_ro/nfvo.py b/osm_ro/nfvo.py index 494a01d6..5edd55f1 100644 --- a/osm_ro/nfvo.py +++ b/osm_ro/nfvo.py @@ -621,7 +621,7 @@ def create_or_use_image(mydb, vims, image_dict, rollback_list, only_create_at_vi def create_or_use_flavor(mydb, vims, flavor_dict, rollback_list, only_create_at_vim=False, return_on_error = None): - temp_flavor_dict= {'disk':flavor_dict.get('disk',1), + temp_flavor_dict= {'disk':flavor_dict.get('disk',0), 'ram':flavor_dict.get('ram'), 'vcpus':flavor_dict.get('vcpus'), } @@ -1071,7 +1071,7 @@ def new_vnfd_v3(mydb, tenant_id, vnf_descriptor): "name": get_str(vdu, "name", 250) + "-flv", "vcpus": int(vdu["vm-flavor"].get("vcpu-count", 1)), "ram": int(vdu["vm-flavor"].get("memory-mb", 1)), - "disk": int(vdu["vm-flavor"].get("storage-gb", 1)), + "disk": int(vdu["vm-flavor"].get("storage-gb", 0)), } # TODO revise the case of several numa-node-policy node extended = {} @@ -1120,7 +1120,7 @@ def new_vnfd_v3(mydb, tenant_id, vnf_descriptor): extended_text = yaml.safe_dump(extended, default_flow_style=True, width=256) db_flavor["extended"] = extended_text # look if flavor exist - temp_flavor_dict = {'disk': db_flavor.get('disk', 1), + temp_flavor_dict = {'disk': db_flavor.get('disk', 0), 'ram': db_flavor.get('ram'), 'vcpus': db_flavor.get('vcpus'), 'extended': db_flavor.get('extended') @@ -1262,7 +1262,7 @@ def new_vnf(mydb, tenant_id, vnf_descriptor): myflavorDict["description"] = VNFCitem["description"] myflavorDict["ram"] = vnfc.get("ram", 0) myflavorDict["vcpus"] = vnfc.get("vcpus", 0) - myflavorDict["disk"] = vnfc.get("disk", 1) + myflavorDict["disk"] = vnfc.get("disk", 0) myflavorDict["extended"] = {} devices = vnfc.get("devices") @@ -1398,7 +1398,7 @@ def new_vnf_v02(mydb, tenant_id, vnf_descriptor): myflavorDict["description"] = VNFCitem["description"] myflavorDict["ram"] = vnfc.get("ram", 0) myflavorDict["vcpus"] = vnfc.get("vcpus", 0) - myflavorDict["disk"] = vnfc.get("disk", 1) + myflavorDict["disk"] = vnfc.get("disk", 0) myflavorDict["extended"] = {} devices = vnfc.get("devices") diff --git a/osm_ro/vimconn_openstack.py b/osm_ro/vimconn_openstack.py index 117171eb..3fd9f562 100644 --- a/osm_ro/vimconn_openstack.py +++ b/osm_ro/vimconn_openstack.py @@ -714,7 +714,7 @@ class vimconnector(vimconn.vimconnector): new_flavor=self.nova.flavors.create(name, ram, vcpus, - flavor_data.get('disk',1), + flavor_data.get('disk',0), is_public=flavor_data.get('is_public', True) ) #add metadata diff --git a/osm_ro/vimconn_vmware.py b/osm_ro/vimconn_vmware.py index 09f6827c..562cfcca 100644 --- a/osm_ro/vimconn_vmware.py +++ b/osm_ro/vimconn_vmware.py @@ -801,7 +801,7 @@ class vimconnector(vimconn.vimconnector): new_flavor=flavor_data ram = flavor_data.get(FLAVOR_RAM_KEY, 1024) cpu = flavor_data.get(FLAVOR_VCPUS_KEY, 1) - disk = flavor_data.get(FLAVOR_DISK_KEY, 1) + disk = flavor_data.get(FLAVOR_DISK_KEY, 0) if not isinstance(ram, int): raise vimconn.vimconnException("Non-integer value for ram")