From ae65a48b753c92a91ff7f8267625f8af6400b79f Mon Sep 17 00:00:00 2001 From: tierno Date: Thu, 24 Nov 2016 16:20:05 +0100 Subject: [PATCH] Change names of VM to solve bug 26 Signed-off-by: tierno --- nfvo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nfvo.py b/nfvo.py index e529d5f2..d4935bf7 100644 --- 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" -- 2.25.1