def create_dependencies(self, fw, state):
        if fw._version_info < (7, 0, 0):
            raise ValueError('IkeGateway not supported for version < 7.0')

        state.lbi = network.LoopbackInterface(
            'loopback.{0}'.format(random.randint(5, 20)),
            ipv6_enabled=True,
        )
        state.lbi.add(network.IPv6Address(testlib.random_ipv6()))
        state.lbi.add(network.IPv6Address(testlib.random_ipv6()))
        fw.add(state.lbi)
        state.lbi.create()
Exemplo n.º 2
0
    def create_dependencies(self, fw, state):
        if fw._version_info < (7, 0, 0):
            raise ValueError('IkeGateway not supported for version < 7.0')

        state.lbi = network.LoopbackInterface(
            'loopback.{0}'.format(random.randint(5, 20)),
            ipv6_enabled=True,
        )
        state.lbi.add(network.IPv6Address(testlib.random_ipv6()))
        state.lbi.add(network.IPv6Address(testlib.random_ipv6()))
        fw.add(state.lbi)
        state.lbi.create()
 def setup_state_obj(self, fw, state):
     ip = testlib.random_ipv6('')
     state.obj = network.StaticRouteV6(
         testlib.random_name(),
         destination=ip + '/64',
         nexthop_type='ipv6-address',
         nexthop=ip + '1',
         interface=state.eth,
         admin_dist=random.randint(100, 200),
         metric=random.randint(1, 65535),
     )
     state.vr.add(state.obj)
Exemplo n.º 4
0
 def setup_state_obj(self, fw, state):
     ip = testlib.random_ipv6('')
     state.obj = network.StaticRouteV6(
         testlib.random_name(),
         destination=ip + '/64',
         nexthop_type='ipv6-address',
         nexthop=ip + '1',
         interface=state.eth,
         admin_dist=random.randint(100, 200),
         metric=random.randint(1, 65535),
     )
     state.vr.add(state.obj)
 def update_state_obj(self, fw, state):
     state.obj.destination = testlib.random_ipv6('/64')
     state.obj.nexthop_type = 'discard'
     state.obj.nexthop = None
     state.obj.interface = None
 def setup_state_obj(self, fw, state):
     state.obj = network.IPv6Address(
         testlib.random_ipv6(),
         False, True, False, True, 2420000, 604800, True, False)
     state.parent.add(state.obj)
Exemplo n.º 7
0
 def update_state_obj(self, fw, state):
     state.obj.destination = testlib.random_ipv6('/64')
     state.obj.nexthop_type = 'discard'
     state.obj.nexthop = None
     state.obj.interface = None
Exemplo n.º 8
0
 def setup_state_obj(self, fw, state):
     state.obj = network.IPv6Address(testlib.random_ipv6(), False, True,
                                     False, True, 2420000, 604800, True,
                                     False)
     state.parent.add(state.obj)