def setUp(self):
     logg.Logger(logging.INFO, logging.DEBUG)
     self.job_list_path = "{}/job_list.html".format(
         tests.get_resources_path())
     self.log_path = "{}/console.log".format(tests.get_resources_path())
     self.report = console.ConsoleReports(
         "https://logs.opendaylight.org/releng/vex-yul-odl-jenkins-1",
         "netvirt-csit-1node-0cmb-1ctl-2cmp-openstack-queens-upstream-stateful-fluorine"
     )
Beispiel #2
0
 def setUp(self):
     logg.Logger(logging.INFO, logging.DEBUG)
     logger.info("Test: {}".format(self.id()))
     self.job_list_html_path = "{}/job_list.html".format(
         tests.get_resources_path())
     self.console_log_path = "{}/console.log".format(
         tests.get_resources_path())
     self.excepts_log_path = "{}/odl1_exceptions.txt".format(
         tests.get_resources_path())
Beispiel #3
0
 def setUp(self):
     logg.Logger(logging.INFO, logging.DEBUG)
     logger.info("Test: {}".format(self.id()))
     self.job_list_path = "{}/job_list.html".format(
         tests.get_resources_path())
     self.log_path = "{}/odl1_exceptions.txt".format(
         tests.get_resources_path())
     self.report = excepts.ExceptsReports(
         "https://logs.opendaylight.org/releng/vex-yul-odl-jenkins-1",
         "netvirt-csit-1node-0cmb-1ctl-2cmp-openstack-queens-upstream-stateful-fluorine"
     )
Beispiel #4
0
 def test_analyze_nodes_cli(self):
     parser = root_cli.create_parser()
     args = parser.parse_args([
         "netvirt", "analyze", "nodes", "-p",
         "--path=" + tests.get_resources_path()
     ])
     with capture.capture(args.func, args) as output:
         self.assertTrue("203251201875890" in output)
Beispiel #5
0
 def test_show_neutron2(self):
     parser = root_cli.create_parser()
     args = parser.parse_args([
         "show", "neutron", "ports", "-p",
         "--path=" + tests.get_resources_path()
     ])
     with capture.capture(args.func, args) as output:
         self.assertTrue("8e3c262e-7b45-4222-ac4e-528db75e5516" in output)
Beispiel #6
0
 def test_show_idpools_cli(self):
     parser = root_cli.create_parser()
     args = parser.parse_args([
         "netvirt", "show", "id-pools", "-p",
         "--path=" + tests.get_resources_path(), "all"
     ])
     with capture.capture(args.func, args) as output:
         self.assertTrue("interfaces" in output)
Beispiel #7
0
 def test_analyze_tunnels(self):
     parser = root_cli.create_parser()
     args = parser.parse_args([
         "netvirt", "analyze", "tunnels", "-p",
         "--path=" + tests.get_resources_path()
     ])
     with capture.capture(args.func, args) as output:
         self.assertTrue("..All" in output)
         self.assertTrue("up" in output)
Beispiel #8
0
    def test_get_models(self):
        files.rmdir(self.args.path)

        with requests_mock.Mocker() as mrequests:
            for res in self.args.modules:
                args2 = Args(path=tests.get_resources_path(), pretty_print=True)
                filename = model.make_filename_from_resource(args2, res)
                data = files.read(filename)
                url_path = model.make_url_path_from_resource(res)
                url_root, _ = model.make_url_parts(self.args, None)
                mrequests.register_uri('GET', '/'.join((url_root, url_path)), text=data)

            models.get_models(self.args)
            # assert each model has been saved to a file
            for res in self.args.modules:
                filename = model.make_filename_from_resource(self.args, res)
                self.assertTrue(os.path.isfile(filename))
Beispiel #9
0
 def test_read_json(self):
     filename = "{}/config___elan__elan-instances.json".format(
         tests.get_resources_path())
     data = files.read_json(filename)
     self.assertEqual(len(data), 1)
Beispiel #10
0
 def setUp(self):
     logg.Logger(logging.INFO, logging.INFO)
     self.filename = "{}/flow_dumps.1.txt".format(
         tests.get_resources_path())
     self.outpath = "/tmp/flow_dumps.1.out.txt"
Beispiel #11
0
 def setUp(self):
     logg.Logger(logging.INFO, logging.INFO)
     self.filename = "{}/flow_dumps.1.txt".format(tests.get_resources_path())
     self.data = request.read_file(self.filename)
     self.flows = ovs_flows.Flows(self.data)
Beispiel #12
0
 def setUp(self):
     logg.Logger(logging.INFO, logging.INFO)
     self.args = tests.Args(path=tests.get_resources_path())
Beispiel #13
0
 def __init__(self):
     self.filename = "{}/flow_dumps.1.txt".format(
         tests.get_resources_path())
     self.data = files.readlines(self.filename)
Beispiel #14
0
 def test_flows_ovs_file(self):
     infile = "{}/flow_dumps.1.txt".format(tests.get_resources_path())
     args = ["ovs", "--infile", infile, "/tmp/flow_dumps.1.out.txt"]
     cli.main("ovs", args)
Beispiel #15
0
 def setUp(self):
     logg.Logger(logging.INFO, logging.INFO)
     self.filename = "{}/flow_dumps.1.txt".format(tests.get_resources_path())
     self.outpath = "/tmp/flow_dumps.1.out.txt"
Beispiel #16
0
 def setUp(self):
     logg.Logger(logging.INFO, logging.INFO)
     self.filename = "{}/flow_dumps.1.txt".format(tests.get_resources_path())
     self.data = files.readlines(self.filename)
     self.flow_table = OvsFlowTable(self.data, "ovs", "dpid", "name")
Beispiel #17
0
 def setUp(self):
     logg.Logger(logging.INFO, logging.INFO)
     self.filename = "{}/flow_dumps.1.txt".format(tests.get_resources_path())
     self.data = request.read_file(self.filename)
     self.flows = ovs_flows.Flows(self.data)
Beispiel #18
0
 def setUp(self):
     logg.Logger(logging.INFO, logging.INFO)
     self.args = tests.Args(path=tests.get_resources_path(),
                            ifname="98c2e265-b4f2-40a5-8f31-2fb5d2b2baf6")
Beispiel #19
0
 def test_analyze_nodes(self):
     parser = root_cli.create_parser()
     args = parser.parse_args(["analyze", "nodes", "-p", "--path=" + tests.get_resources_path()])
     with capture.capture(args.func, args) as output:
         self.assertTrue("203251201875890" in output)
Beispiel #20
0
 def setUp(self):
     logg.Logger(logging.INFO, logging.INFO)
     self.args = tests.Args(path=tests.get_resources_path())