Change names of VM to solve bug 26 10/710/2
authortierno <alfonso.tiernosepulveda@telefonica.com>
Thu, 24 Nov 2016 15:20:05 +0000 (16:20 +0100)
committertierno <alfonso.tiernosepulveda@telefonica.com>
Thu, 24 Nov 2016 16:17:57 +0000 (17:17 +0100)
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
nfvo.py

diff --git a/nfvo.py b/nfvo.py
index e529d5f..d4935bf 100644 (file)
--- a/nfvo.py
+++ b/nfvo.py
@@ -1405,7 +1405,7 @@ def start_scenario(mydb, tenant_id, scenario_id, instance_scenario_name, instanc
                 i += 1
                 myVMDict = {}
                 #myVMDict['name'] = "%s-%s-%s" % (scenarioDict['name'],sce_vnf['name'], vm['name'])
-                myVMDict['name'] = "%s.%s.%d" % (instance_scenario_name,sce_vnf['name'],i)
+                myVMDict['name'] = "{}.{}.{}".format(instance_scenario_name,sce_vnf['name'],chr(96+i))
                 #myVMDict['description'] = vm['description']
                 myVMDict['description'] = myVMDict['name'][0:99]
                 if not startvms:
@@ -1907,7 +1907,7 @@ def create_instance(mydb, tenant_id, instance_dict):
             for vm in sce_vnf['vms']:
                 i += 1
                 myVMDict = {}
-                myVMDict['name'] = "%s.%s.%d" % (instance_name,sce_vnf['name'],i)
+                myVMDict['name'] = "{}.{}.{}".format(instance_name,sce_vnf['name'],chr(96+i))
                 myVMDict['description'] = myVMDict['name'][0:99]
 #                if not startvms:
 #                    myVMDict['start'] = "no"