X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_ro%2Fnfvo_db.py;h=c34a44f9a7a7fa783de0b2bd4ada523b9b71fe96;hb=61bee6e9151452e0798c7fab389ac4b7f7672b77;hp=80697a3d2859fac39973adbbaf41b55f786229dc;hpb=54467bb7f4edec1fa4fe195fe4ccf34fea5d7f9e;p=osm%2FRO.git diff --git a/osm_ro/nfvo_db.py b/osm_ro/nfvo_db.py index 80697a3d..c34a44f9 100644 --- a/osm_ro/nfvo_db.py +++ b/osm_ro/nfvo_db.py @@ -582,7 +582,7 @@ class nfvo_db(db_base.db_base): if scenario_dict["cloud_config"]: scenario_dict["cloud-config"] = yaml.load(scenario_dict["cloud_config"]) del scenario_dict["cloud_config"] - #sce_vnfs + # sce_vnfs cmd = "SELECT uuid,name,member_vnf_index,vnf_id,description FROM sce_vnfs WHERE scenario_id='{}' "\ "ORDER BY created_at".format(scenario_dict['uuid']) self.logger.debug(cmd) @@ -606,7 +606,7 @@ class nfvo_db(db_base.db_base): self.cur.execute(cmd) vnf['interfaces'] = self.cur.fetchall() # vms - cmd = "SELECT vms.uuid as uuid, flavor_id, image_id, vms.name as name," \ + cmd = "SELECT vms.uuid as uuid, flavor_id, image_id, image_list, vms.name as name," \ " vms.description as description, vms.boot_data as boot_data, count," \ " vms.availability_zone as availability_zone" \ " FROM vnfs join vms on vnfs.uuid=vms.vnf_id" \ @@ -620,6 +620,10 @@ class nfvo_db(db_base.db_base): vm["boot_data"] = yaml.safe_load(vm["boot_data"]) else: del vm["boot_data"] + if vm["image_list"]: + vm["image_list"] = yaml.safe_load(vm["image_list"]) + else: + del vm["image_list"] if datacenter_vim_id!=None: cmd = "SELECT vim_id FROM datacenters_images WHERE image_id='{}' AND datacenter_vim_id='{}'".format(vm['image_id'],datacenter_vim_id) self.logger.debug(cmd) @@ -668,7 +672,7 @@ class nfvo_db(db_base.db_base): raise db_base.db_base_Exception("More than one ip-profile found with this criteria: net_id='{}'".format(vnf_net['uuid']), db_base.HTTP_Bad_Request) #sce_nets - cmd = "SELECT uuid,name,type,external,description" \ + cmd = "SELECT uuid,name,type,external,description,vim_network_name" \ " FROM sce_nets WHERE scenario_id='{}'" \ " ORDER BY created_at ".format(scenario_dict['uuid']) self.logger.debug(cmd)