Exemplo n.º 1
0
 def test_output_service_generation(self):
     """
     Checks if service project files are created.
     :return:
     """
     args = parse_args(["-c", TEST_PED_FILE, "-v"])
     p = ProfileManager(args)
     extract_son_package(p._load_ped_file(p.args.config), p.son_pkg_input_dir)
     p.son_pkg_input = SonataServicePackage.load(p.son_pkg_input_dir)
     p.service_experiments, p.function_experiments = p._generate_experiment_specifications(
         p._load_ped_file(p.args.config))
     p.generate_experiment_services()
     self.assertTrue(os.path.exists(
         os.path.join(p.son_pkg_service_dir, "func_fw_throughput_00000")))
     self.assertTrue(os.path.exists(
         os.path.join(p.son_pkg_service_dir, "func_fw_throughput_00000/project.yml")))
     self.assertTrue(os.path.exists(
         os.path.join(p.son_pkg_service_dir, "func_fw_throughput_00000/sources/nsd/sonata-fw-vtc-service.yml")))
     self.assertTrue(os.path.exists(
         os.path.join(p.son_pkg_service_dir, "func_fw_throughput_00000/sources/vnf/fw-vnf/fw-vnf.yml")))
     self.assertTrue(os.path.exists(
         os.path.join(p.son_pkg_service_dir, "func_fw_throughput_00000/sources/vnf/vtc-vnf/vtc-vnf.yml")))
Exemplo n.º 2
0
 def test_output_service_generation(self):
     """
     Checks if service project files are created.
     :return:
     """
     args = parse_args(["-c", TEST_PED_FILE, "-v"])
     p = ProfileManager(args)
     extract_son_package(p._load_ped_file(p.args.config),
                         p.son_pkg_input_dir)
     p.son_pkg_input = SonataServicePackage.load(p.son_pkg_input_dir)
     p.service_experiments, p.function_experiments = p._generate_experiment_specifications(
         p._load_ped_file(p.args.config))
     p.generate_experiment_services()
     self.assertTrue(
         os.path.exists(
             os.path.join(p.son_pkg_service_dir,
                          "func_fw_throughput_00000")))
     self.assertTrue(
         os.path.exists(
             os.path.join(p.son_pkg_service_dir,
                          "func_fw_throughput_00000/project.yml")))
     self.assertTrue(
         os.path.exists(
             os.path.join(
                 p.son_pkg_service_dir,
                 "func_fw_throughput_00000/sources/nsd/sonata-fw-vtc-service.yml"
             )))
     self.assertTrue(
         os.path.exists(
             os.path.join(
                 p.son_pkg_service_dir,
                 "func_fw_throughput_00000/sources/vnf/fw-vnf/fw-vnf.yml")))
     self.assertTrue(
         os.path.exists(
             os.path.join(
                 p.son_pkg_service_dir,
                 "func_fw_throughput_00000/sources/vnf/vtc-vnf/vtc-vnf.yml")
         ))