Enhance sdn-assist reporting
Change-Id: I77d4600bc45f0eb64c849d38a4246df24c276707
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
diff --git a/osm_ro/httpserver.py b/osm_ro/httpserver.py
index 6c7e720..381016c 100644
--- a/osm_ro/httpserver.py
+++ b/osm_ro/httpserver.py
@@ -1539,19 +1539,15 @@
'''get instances details, can use both uuid or name'''
logger.debug('FROM %s %s %s', bottle.request.remote_addr, bottle.request.method, bottle.request.url)
try:
+
#check valid tenant_id
if tenant_id != "any":
nfvo.check_tenant(mydb, tenant_id)
if tenant_id == "any":
tenant_id = None
- #obtain data (first time is only to check that the instance exists)
- instance_dict = mydb.get_instance_scenario(instance_id, tenant_id, verbose=True)
- try:
- nfvo.refresh_instance(mydb, tenant_id, instance_dict)
- except (nfvo.NfvoException, db_base_Exception) as e:
- logger.warn("nfvo.refresh_instance couldn't refresh the status of the instance: %s" % str(e))
- # obtain data with results upated
- instance = mydb.get_instance_scenario(instance_id, tenant_id, verbose=True)
+
+ instance = nfvo.get_instance_id(mydb, tenant_id, instance_id)
+
# Workaround to SO, convert vnfs:vms:interfaces:ip_address from ";" separated list to report the first value
for vnf in instance.get("vnfs", ()):
for vm in vnf.get("vms", ()):