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" )
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())
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" )
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)
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)
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)
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)
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))
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)
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"
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)
def setUp(self): logg.Logger(logging.INFO, logging.INFO) self.args = tests.Args(path=tests.get_resources_path())
def __init__(self): self.filename = "{}/flow_dumps.1.txt".format( tests.get_resources_path()) self.data = files.readlines(self.filename)
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)
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"
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")
def setUp(self): logg.Logger(logging.INFO, logging.INFO) self.args = tests.Args(path=tests.get_resources_path(), ifname="98c2e265-b4f2-40a5-8f31-2fb5d2b2baf6")
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)