From: tierno Date: Thu, 24 Nov 2016 15:20:05 +0000 (+0100) Subject: Change names of VM to solve bug 26 X-Git-Tag: v1.0.2~2 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=ae65a48b753c92a91ff7f8267625f8af6400b79f;p=osm%2FRO.git Change names of VM to solve bug 26 Signed-off-by: tierno --- 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"