From e205450a22fe3df7ea908fcdf9a2c109c132097b Mon Sep 17 00:00:00 2001 From: lloretgalleg Date: Wed, 24 Feb 2021 12:06:57 +0000 Subject: [PATCH] Fix bug 1449: Preexisting flavor deleted Change-Id: I98283117f99e8d9e3d795961654b603c644d9d48 Signed-off-by: lloretgalleg --- RO/osm_ro/nfvo.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/RO/osm_ro/nfvo.py b/RO/osm_ro/nfvo.py index a7b15a29..a617709f 100644 --- a/RO/osm_ro/nfvo.py +++ b/RO/osm_ro/nfvo.py @@ -1801,7 +1801,9 @@ def delete_vnf(mydb,tenant_id,vnf_id,datacenter=None,vim_tenant=None): #delelte at VIM c = mydb.get_rows(FROM='datacenters_flavors', WHERE={'flavor_id': flavor}) for flavor_vim in c: - if not flavor_vim['created']: # skip this flavor because not created by openmano + # skip this flavor because not created by openmano + # field created in the database is a string, must do a string comparison + if flavor_vim['created'] != "true": continue # look for vim myvim = None -- 2.25.1