def resource_setup(cls):
     super(LoadBalancerTestJSON, cls).resource_setup()
     _params = cls.manager.default_params_with_timeout_values.copy()
     for p in _params.keys():
         if p in ['service', 'region', 'endpoint_type']:
             _params.pop(p)
     cls.lbv1_client = LBV1C.get_client(cls.manager)
     cls.network = cls.create_network()
     cls.name = cls.network['name']
     cls.subnet = cls.create_subnet(cls.network)
     cls.ext_net_id = CONF.network.public_network_id
     cls.router = cls.create_router(data_utils.rand_name('router-'),
                                    admin_state_up=True,
                                    external_network_id=cls.ext_net_id,
                                    router_type='exclusive')
     cls.create_router_interface(cls.router['id'], cls.subnet['id'])
     pool_name = data_utils.rand_name('pool-')
     vip_name = data_utils.rand_name('vip-')
     cls.pool = cls.lbv1_client.create_pool(
         pool_name, "ROUND_ROBIN", "HTTP", cls.subnet['id'])['pool']
     cls.vip = cls.lbv1_client.create_vip(cls.pool['id'],
                                          subnet_id=cls.subnet['id'],
                                          name=vip_name,
                                          protocol="HTTP",
                                          protocol_port=80)['vip']
     cls.member = cls.lbv1_client.create_member(
         80, cls.pool['id'], cls._ip_version)['member']
     cls.member_address = ("10.0.9.47" if cls._ip_version == 4
                           else "2015::beef")
     cls.health_monitor = cls.lbv1_client.create_health_monitor(
         delay=4, max_retries=3, type="TCP", timeout=1)['health_monitor']
Пример #2
0
 def resource_setup(cls):
     super(LoadBalancerTestJSON, cls).resource_setup()
     _params = base_client.default_params_with_timeout_values.copy()
     for p in _params.keys():
         if p in ['service', 'region', 'endpoint_type']:
             _params.pop(p)
     cls.lbv1_client = LBV1C.get_client(cls.manager)
     cls.network = cls.create_network()
     cls.name = cls.network['name']
     cls.subnet = cls.create_subnet(cls.network)
     cls.ext_net_id = CONF.network.public_network_id
     cls.router = cls.create_router(data_utils.rand_name('router-'),
                                    admin_state_up=True,
                                    external_network_id=cls.ext_net_id,
                                    router_type='exclusive')
     cls.create_router_interface(cls.router['id'], cls.subnet['id'])
     pool_name = data_utils.rand_name('pool-')
     vip_name = data_utils.rand_name('vip-')
     cls.pool = cls.lbv1_client.create_pool(pool_name, "ROUND_ROBIN",
                                            "HTTP",
                                            cls.subnet['id'])['pool']
     cls.vip = cls.lbv1_client.create_vip(cls.pool['id'],
                                          subnet_id=cls.subnet['id'],
                                          name=vip_name,
                                          protocol="HTTP",
                                          protocol_port=80)['vip']
     cls.member = cls.lbv1_client.create_member(80, cls.pool['id'],
                                                cls._ip_version)['member']
     cls.member_address = ("10.0.9.47"
                           if cls._ip_version == 4 else "2015::beef")
     cls.health_monitor = cls.lbv1_client.create_health_monitor(
         delay=4, max_retries=3, type="TCP", timeout=1)['health_monitor']
 def setUp(self):
     super(TestLBaaSBasicOps, self).setUp()
     self.servers_keypairs = {}
     self.members = []
     self.floating_ips = {}
     self.server_ips = {}
     self.port1 = 80
     self.port2 = 88
     self.num = 50
     self.server_ips = {}
     self.server_fixed_ips = {}
     self.lbv1_client = LBV1C.get_client(self.manager)
     self._create_security_group_for_test()
     self._set_net_and_subnet()
 def setUp(self):
     super(TestLBaaSBasicOps, self).setUp()
     self.servers_keypairs = {}
     self.members = []
     self.floating_ips = {}
     self.server_ips = {}
     self.port1 = 80
     self.port2 = 88
     self.num = 50
     self.server_ips = {}
     self.server_fixed_ips = {}
     self.lbv1_client = LBV1C.get_client(self.manager)
     self._create_security_group_for_test()
     self._set_net_and_subnet()
 def setUp(self):
     super(TestLBaaSBasicOps, self).setUp()
     # https://review.openstack.org/#/c/262571/
     CONF.validation.ssh_shell_prologue = ''
     self.servers_keypairs = {}
     self.members = []
     self.floating_ips = {}
     self.server_ips = {}
     self.port1 = 80
     self.port2 = 88
     self.num = 50
     self.server_ips = {}
     self.server_fixed_ips = {}
     self.lbv1_client = LBV1C.get_client(self.manager)
     self._create_security_group_for_test()
     self._set_net_and_subnet()
Пример #6
0
 def setUp(self):
     super(TestLBaaSBasicOps, self).setUp()
     # https://review.openstack.org/#/c/262571/
     CONF.validation.ssh_shell_prologue = ''
     self.servers_keypairs = {}
     self.members = []
     self.floating_ips = {}
     self.server_ips = {}
     self.port1 = 80
     self.port2 = 88
     self.num = 50
     self.server_ips = {}
     self.server_fixed_ips = {}
     self.lbv1_client = LBV1C.get_client(self.manager)
     self._create_security_group_for_test()
     self._set_net_and_subnet()