def setUp(self): self.dummy1 = system.DummyIface() self.dummy1.up() self.dummy1.addr_add('192.0.2.1/29') self.dummy2 = system.DummyIface() self.dummy2.up() self.dummy2.addr_add('192.0.2.9/29') self.zebra = quagga.Zebra() self.ospf_client = pyzclient.ZClient(pyzclient.ZEBRA_ROUTE_OSPF) route = pyzclient.Route(None, '192.0.2.16/29') route.add_nexthop(ifindex=self.dummy1.index) self.ospf_client.add_route(route) route = pyzclient.Route(None, '192.0.2.24/29') route.add_nexthop(ifindex=self.dummy2.index) self.ospf_client.add_route(route) route = pyzclient.Route(None, '192.0.2.32/29') route.add_nexthop(gate='192.0.2.2') self.ospf_client.add_route(route) route = pyzclient.Route(None, '192.0.2.40/29') route.add_nexthop(gate='192.0.2.3') self.ospf_client.add_route(route) self.bgp_client = pyzclient.ZClient(pyzclient.ZEBRA_ROUTE_BGP) self.route = pyzclient.Route(None, '198.51.100.128/25') self.route.rib_flags |= pyzclient.ZEBRA_FLAG_INTERNAL time.sleep(0.1)
def setUp(self): self.dummy1 = system.DummyIface() self.dummy1.up() self.dummy1.addr_add('192.0.2.1/25') self.dummy2 = system.DummyIface() self.dummy2.up() self.dummy2.addr_add('192.0.2.129/26') self.zebra = quagga.Zebra() self.zclient = pyzclient.ZClient(pyzclient.ZEBRA_ROUTE_OSPF)
def setUp(self): self.dummy1 = system.DummyIface() self.dummy1.up() self.dummy1.addr_add('192.0.2.1/29') self.dummy2 = system.DummyIface() self.dummy2.up() self.dummy2.addr_add('192.0.2.9/29') self.zebra = quagga.Zebra() self.zclient = pyzclient.ZClient(pyzclient.ZEBRA_ROUTE_OSPF) self.route = pyzclient.Route(None, '198.51.100.128/25')
def setUp(self): self.dummy1 = system.DummyIface() self.dummy1.up() self.dummy1.addr_add('2001:db8:1:1::1/64', 6) self.dummy2 = system.DummyIface() self.dummy2.up() self.dummy2.addr_add('2001:db8:1:2::1/64', 6) self.zebra = quagga.Zebra() self.zclient = pyzclient.ZClient(pyzclient.ZEBRA_ROUTE_OSPF6) self.route = pyzclient.Route(None, '2001:db8:2::/48')
def setUp(self): self.dummy1 = system.DummyIface() self.dummy1.up() self.dummy1.addr_add('2001:db8:1:1::1/64', 6) self.zebra = quagga.Zebra() self.ospf_client = pyzclient.ZClient(pyzclient.ZEBRA_ROUTE_OSPF) route = pyzclient.Route(None, '2001:db8:1:3::/64') route.add_nexthop(ifindex=self.dummy1.index) self.ospf_client.add_route(route) route = pyzclient.Route(None, '2001:db8:1:4::/64') route.add_nexthop(gate='2001:db8:1:1::2') self.ospf_client.add_route(route) route = pyzclient.Route(None, '2001:db8:1:5::/64') route.add_nexthop(gate='fe80::42') route.add_nexthop(ifindex=self.dummy1.index) self.ospf_client.add_route(route) self.bgp_client = pyzclient.ZClient(pyzclient.ZEBRA_ROUTE_BGP) self.route = pyzclient.Route(None, '2001:db8:2::/48') self.route.rib_flags |= pyzclient.ZEBRA_FLAG_INTERNAL
def setUp(self): self.dummy1 = system.DummyIface() self.dummy1.up() self.dummy1.addr_add('192.0.2.1/29') self.dummy2 = system.DummyIface() self.dummy2.up() self.dummy2.addr_add('192.0.2.9/29') self.dummy3 = system.DummyIface() self.dummy3.up() self.dummy3.addr_add('192.0.2.255/32') self.zebra = quagga.Zebra() self.zebra.config( "route-map src-test permit 10", "set src 192.0.2.255", "ip protocol ospf route-map src-test" ) self.zclient = pyzclient.ZClient(pyzclient.ZEBRA_ROUTE_OSPF) self.route = pyzclient.Route(None, '198.51.100.128/25')
def setUp(self): self.dummy = system.DummyIface() self.zebra = quagga.Zebra()