From ce62cc40f48f5637c83eafbb7730e3ca64860555 Mon Sep 17 00:00:00 2001 From: tierno Date: Thu, 25 Jan 2018 10:37:16 +0100 Subject: [PATCH] provide more info at ns show Change-Id: I2d9962a3ec43db9d9780c459fe0da26af9d5cbd2 Signed-off-by: tierno --- openmanod | 2 +- osm_ro/nfvo.py | 3 +-- osm_ro/nfvo_db.py | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/openmanod b/openmanod index a078e9f3..22bcacc6 100755 --- a/openmanod +++ b/openmanod @@ -48,7 +48,7 @@ import osm_ro __author__ = "Alfonso Tierno, Gerardo Garcia, Pablo Montes" __date__ = "$26-aug-2014 11:09:29$" -__version__ = "0.5.49-r559" +__version__ = "0.5.50-r560" version_date = "Jan 2018" database_version = 27 # expected database schema version diff --git a/osm_ro/nfvo.py b/osm_ro/nfvo.py index ccec6ce5..5c0fefed 100644 --- a/osm_ro/nfvo.py +++ b/osm_ro/nfvo.py @@ -3019,8 +3019,7 @@ def create_instance(mydb, tenant_id, instance_dict): for sce_vnf in sce_vnf_list: ssh_access = None if sce_vnf.get('mgmt_access'): - mgmt_access = yaml.load(sce_vnf['mgmt_access']) - ssh_access = mgmt_access['config-access']['ssh-access'] + ssh_access = sce_vnf['mgmt_access'].get('config-access', {}).get('ssh-access') vnf_availability_zones = [] for vm in sce_vnf['vms']: vm_av = vm.get('availability_zone') diff --git a/osm_ro/nfvo_db.py b/osm_ro/nfvo_db.py index f47ad162..8b72e148 100644 --- a/osm_ro/nfvo_db.py +++ b/osm_ro/nfvo_db.py @@ -936,7 +936,7 @@ class nfvo_db(db_base.db_base): # instance_vnfs cmd = "SELECT iv.uuid as uuid, iv.vnf_id as vnf_id, sv.name as vnf_name, sce_vnf_id, datacenter_id"\ - " ,datacenter_tenant_id, v.mgmt_access "\ + " ,datacenter_tenant_id, v.mgmt_access, sv.member_vnf_index "\ " FROM instance_vnfs as iv left join sce_vnfs as sv "\ "on iv.sce_vnf_id=sv.uuid join vnfs as v on iv.vnf_id=v.uuid" \ " WHERE iv.instance_scenario_id='{}'" \ -- 2.17.1