Esempio n. 1
0
 def create_pc(self):
     """
     Create a basic PortChannel used as setup for test cases
     """
     if1 = Interface('eth1/8')
     if2 = Interface('eth1/5')
     pc = PortChannel('444')
     pc.attach(if1)
     pc.attach(if2)
     return pc
Esempio n. 2
0
    def create_ipv6(self):
        int1 = Interface('eth1/1')
        int2 = Interface('eth1/2')
        pc1 = PortChannel('211')
        ipv6 = IPV6()
        ipv6.add_interface_address(int1,
                                   '2004:0DB8::1/10',
                                   link_local='FE83::1')
        ipv6.add_interface_address(int2, '2104:0DB8::1/11')
        ipv6.add_interface_address(int2, '2002:0DB8::1/12')
        ipv6.add_interface_address(pc1, '2022:0DB8::1/13')

        return ipv6
Esempio n. 3
0
 def create_ipv6_route(self):
     # Create Interfaces
     int1 = Interface('eth1/1')
     int2 = Interface('eth1/2')
     # Create a L3 port channel
     pc1 = PortChannel('211', layer='Layer3')
     route = IPV6Route('2000:0::0/12')
     route.add_next_hop('234E:44::1',
                        int1,
                        vrf='default',
                        track_id='0',
                        tag='1')
     route.add_next_hop('234E:44::2', int2)
     route.add_next_hop('234E:44::4',
                        pc1,
                        vrf='default',
                        track_id='1',
                        tag='2')
     return route
Esempio n. 4
0
 def config_vlan(self):
     # Create one port channel
     pc1 = PortChannel('444')
     # Enable above created vlans on the port channel
     pc1.set_access_vlan('vlan-111')
     return pc1