def setup_interface_route_table(self, obj=None, name=None, cleanup=True, **kwargs): """ Create interface route table and optionally add it to obj obj : Example : PortFixture instance """ name = name or get_random_name("irtb") intf_route_table = InterfaceRouteTableFixture( name=name, cleanup=cleanup, connections=self.connections, **kwargs ) intf_route_table.setUp() if cleanup: self.sleep(1) self.addCleanup(intf_route_table.cleanUp) if obj: self.add_interface_route_table(obj, intf_route_table.obj, cleanup) return intf_route_table
def create_interface_route_table(self, rvn_uuid, prefixes, community_action=None): name = 'irt' + rvn_uuid irt_fixture = self.useFixture(InterfaceRouteTableFixture( connections=self.connections, name=name, prefixes=prefixes, community_action=community_action)) irt_fixture.setUp() return irt_fixture
def setup_interface_route_table(self, obj=None, name=None, cleanup=True, **kwargs): ''' Create interface route table and optionally add it to obj obj : Example : PortFixture instance ''' name = name or get_random_name('irtb') intf_route_table = InterfaceRouteTableFixture( name=name, cleanup=cleanup, connections=self.connections, **kwargs) intf_route_table.setUp() if cleanup: self.sleep(1) self.addCleanup(intf_route_table.cleanUp) if obj: self.add_interface_route_table(obj, intf_route_table.obj, cleanup) return intf_route_table
def createIntfRouteTable(self): self.intf_fixture = {} if not hasattr(self.topo, 'intf_route_table_params'): return self for intf in self.topo.intf_route_table_list: self.intf_fixture[intf] = self.useFixture( InterfaceRouteTableFixture( connections=self.project_connections, inputs=self.project_inputs, name=intf, prefixes=self.topo.intf_route_table_params[intf]['prefixes'], community=self.topo.intf_route_table_params[intf]['community'])) return self