- "params": {"uuid": vnf['vnf']['uuid']}})
-
- #load the scenario definition
- with open(scenario_file[0], 'r') as stream:
- scenario_descriptor = yaml.load(stream)
- networks = scenario_descriptor['scenario']['networks']
- networks[test_config["mgmt_net"]] = networks.pop('mgmt')
- logger.debug("Scenario descriptor: {}".format(scenario_descriptor))
- scenario = test_config["client"].create_scenario(descriptor=scenario_descriptor)
- logger.debug(scenario)
- self.__class__.to_delete_list.insert(0,{"item": "scenario", "function": test_config["client"].delete_scenario,
- "params":{"uuid": scenario['scenario']['uuid']} })
- self.__class__.scenario_uuid = scenario['scenario']['uuid']
+ "params": {"uuid": vnf_uuid}})
+
+ # load the scenario definition
+ for scenario_descriptor in scenario_descriptors:
+ # networks = scenario_descriptor['scenario']['networks']
+ # networks[test_config["mgmt_net"]] = networks.pop('mgmt')
+ logger.debug("Scenario descriptor: {}".format(scenario_descriptor))
+ scenario = test_config["client"].create_scenario(descriptor=scenario_descriptor)
+ logger.debug(scenario)
+ if 'scenario' in scenario:
+ scenario_uuid = scenario['scenario']['uuid']
+ else:
+ scenario_uuid = scenario['nsd'][0]['uuid']
+ self.__class__.to_delete_list.insert(0, {"item": "scenario",
+ "function": test_config["client"].delete_scenario,
+ "params": {"uuid": scenario_uuid}})
+ self.__class__.scenario_uuids.append(scenario_uuid)