def skip_checks(cls):
     super(BaseTestCase, cls).skip_checks()
     cfg = config.network
     if not test.is_extension_enabled("lbaasv2", "network"):
         msg = "LBaaS Extension is not enabled"
         raise cls.skipException(msg)
     if not (cfg.tenant_networks_reachable or cfg.public_network_id):
         msg = 'Either tenant_networks_reachable must be "true", or ' "public_network_id must be defined."
         raise cls.skipException(msg)
 def resource_setup(cls):
     super(LBaaSAgentSchedulerTestJSON, cls).resource_setup()
     if not test.is_extension_enabled('lbaas_agent_scheduler', 'network'):
         msg = "LBaaS Agent Scheduler Extension not enabled."
         raise cls.skipException(msg)
     cls.network = cls.create_network()
     cls.subnet = cls.create_subnet(cls.network)
     pool_name = data_utils.rand_name('pool-')
     cls.pool = cls.create_pool(pool_name, "ROUND_ROBIN",
                                "HTTP", cls.subnet)
Exemple #3
0
 def skip_checks(cls):
     super(BaseTestCase, cls).skip_checks()
     cfg = config.network
     if not test.is_extension_enabled('lbaasv2', 'network'):
         msg = 'LBaaS Extension is not enabled'
         raise cls.skipException(msg)
     if not (cfg.tenant_networks_reachable or cfg.public_network_id):
         msg = ('Either tenant_networks_reachable must be "true", or '
                'public_network_id must be defined.')
         raise cls.skipException(msg)
 def resource_setup(cls):
     super(LBaaSAgentSchedulerTestJSON, cls).resource_setup()
     if not test.is_extension_enabled('lbaas_agent_scheduler', 'network'):
         msg = "LBaaS Agent Scheduler Extension not enabled."
         raise cls.skipException(msg)
     cls.network = cls.create_network()
     cls.subnet = cls.create_subnet(cls.network)
     pool_name = data_utils.rand_name('pool-')
     cls.pool = cls.create_pool(pool_name, "ROUND_ROBIN", "HTTP",
                                cls.subnet)
 def resource_setup(cls):
     super(TestPools, cls).resource_setup()
     if not test.is_extension_enabled('lbaas', 'network'):
         msg = "lbaas extension not enabled."
         raise cls.skipException(msg)
     network_name = data_utils.rand_name('network-')
     cls.network = cls.create_network(network_name)
     cls.subnet = cls.create_subnet(cls.network)
     cls.load_balancer = cls._create_load_balancer(
         tenant_id=cls.subnet.get('tenant_id'),
         vip_subnet_id=cls.subnet.get('id'))
 def resource_setup(cls):
     super(TestPools, cls).resource_setup()
     if not test.is_extension_enabled('lbaas', 'network'):
         msg = "lbaas extension not enabled."
         raise cls.skipException(msg)
     network_name = data_utils.rand_name('network-')
     cls.network = cls.create_network(network_name)
     cls.subnet = cls.create_subnet(cls.network)
     cls.load_balancer = cls._create_load_balancer(
         tenant_id=cls.subnet.get('tenant_id'),
         vip_subnet_id=cls.subnet.get('id'))
 def resource_setup(cls):
     super(LoadBalancersTestJSON, cls).resource_setup()
     if not test.is_extension_enabled("lbaas", "network"):
         msg = "lbaas extension not enabled."
         raise cls.skipException(msg)
     network_name = data_utils.rand_name("network")
     cls.network = cls.create_network(network_name)
     cls.subnet = cls.create_subnet(cls.network)
     cls.create_lb_kwargs = {"tenant_id": cls.subnet["tenant_id"], "vip_subnet_id": cls.subnet["id"]}
     cls.load_balancer = cls._create_active_load_balancer(**cls.create_lb_kwargs)
     cls.load_balancer_id = cls.load_balancer["id"]
 def resource_setup(cls):
     super(LoadBalancerAdminTestJSON, cls).resource_setup()
     if not test.is_extension_enabled('lbaas', 'network'):
         msg = "lbaas extension not enabled."
         raise cls.skipException(msg)
     cls.force_tenant_isolation = True
     manager = cls.get_client_manager()
     cls.client = manager.network_client
     cls.tenant_id = manager.credentials.tenant_id
     cls.network = cls.create_network()
     cls.subnet = cls.create_subnet(cls.network)
     cls.pool = cls.create_pool(data_utils.rand_name('pool-'),
                                "ROUND_ROBIN", "HTTP", cls.subnet)
 def resource_setup(cls):
     super(LoadBalancersTestJSON, cls).resource_setup()
     if not test.is_extension_enabled('lbaas', 'network'):
         msg = "lbaas extension not enabled."
         raise cls.skipException(msg)
     network_name = data_utils.rand_name('network')
     cls.network = cls.create_network(network_name)
     cls.subnet = cls.create_subnet(cls.network)
     cls.create_lb_kwargs = {'tenant_id': cls.subnet['tenant_id'],
                             'vip_subnet_id': cls.subnet['id']}
     cls.load_balancer = \
         cls._create_active_load_balancer(**cls.create_lb_kwargs)
     cls.load_balancer_id = cls.load_balancer['id']
Exemple #10
0
 def resource_setup(cls):
     super(AdminStateTests, cls).resource_setup()
     if not test.is_extension_enabled("lbaasv2", "network"):
         msg = "lbaas extension not enabled."
         raise cls.skipException(msg)
     network_name = data_utils.rand_name("network-")
     cls.network = cls.create_network(network_name)
     cls.subnet = cls.create_subnet(cls.network)
     cls.tenant_id = cls.subnet.get("tenant_id")
     cls.subnet_id = cls.subnet.get("id")
     cls.protocol = "HTTP"
     cls.port = 8081
     cls.lb_algorithm = "ROUND_ROBIN"
     cls.address = "127.0.0.1"
 def resource_setup(cls):
     super(AdminStateTests, cls).resource_setup()
     if not test.is_extension_enabled("lbaasv2", "network"):
         msg = "lbaas extension not enabled."
         raise cls.skipException(msg)
     network_name = data_utils.rand_name('network-')
     cls.network = cls.create_network(network_name)
     cls.subnet = cls.create_subnet(cls.network)
     cls.tenant_id = cls.subnet.get('tenant_id')
     cls.subnet_id = cls.subnet.get('id')
     cls.protocol = 'HTTP'
     cls.port = 8081
     cls.lb_algorithm = 'ROUND_ROBIN'
     cls.address = '127.0.0.1'
Exemple #12
0
 def resource_setup(cls):
     super(LoadBalancersTestJSON, cls).resource_setup()
     if not test.is_extension_enabled('lbaas', 'network'):
         msg = "lbaas extension not enabled."
         raise cls.skipException(msg)
     network_name = data_utils.rand_name('network')
     cls.network = cls.create_network(network_name)
     cls.subnet = cls.create_subnet(cls.network)
     cls.create_lb_kwargs = {
         'tenant_id': cls.subnet['tenant_id'],
         'vip_subnet_id': cls.subnet['id']
     }
     cls.load_balancer = \
         cls._create_active_load_balancer(**cls.create_lb_kwargs)
     cls.load_balancer_id = cls.load_balancer['id']
 def resource_setup(cls):
     super(TestHealthMonitors, cls).resource_setup()
     if not test.is_extension_enabled("lbaas", "network"):
         msg = "lbaas extension not enabled."
         raise cls.skipException(msg)
     network_name = data_utils.rand_name("network-")
     cls.network = cls.create_network(network_name)
     cls.subnet = cls.create_subnet(cls.network)
     cls.load_balancer = cls._create_load_balancer(
         tenant_id=cls.subnet.get("tenant_id"), vip_subnet_id=cls.subnet.get("id")
     )
     cls.listener = cls._create_listener(
         loadbalancer_id=cls.load_balancer.get("id"), protocol="HTTP", protocol_port=80
     )
     cls.pool = cls._create_pool(protocol="HTTP", lb_algorithm="ROUND_ROBIN", listener_id=cls.listener.get("id"))
 def resource_setup(cls):
     super(TestHealthMonitors, cls).resource_setup()
     if not test.is_extension_enabled('lbaas', 'network'):
         msg = "lbaas extension not enabled."
         raise cls.skipException(msg)
     network_name = data_utils.rand_name('network-')
     cls.network = cls.create_network(network_name)
     cls.subnet = cls.create_subnet(cls.network)
     cls.load_balancer = cls._create_load_balancer(
         tenant_id=cls.subnet.get('tenant_id'),
         vip_subnet_id=cls.subnet.get('id'))
     cls.listener = cls._create_listener(
         loadbalancer_id=cls.load_balancer.get('id'),
         protocol='HTTP',
         protocol_port=80)
     cls.pool = cls._create_pool(protocol='HTTP',
                                 lb_algorithm='ROUND_ROBIN',
                                 listener_id=cls.listener.get('id'))
 def resource_setup(cls):
     super(ListenersTestJSON, cls).resource_setup()
     if not test.is_extension_enabled('lbaas', 'network'):
         msg = "lbaas extension not enabled."
         raise cls.skipException(msg)
     network_name = data_utils.rand_name('network-')
     cls.network = cls.create_network(network_name)
     cls.subnet = cls.create_subnet(cls.network)
     cls.create_lb_kwargs = {'tenant_id': cls.subnet['tenant_id'],
                             'vip_subnet_id': cls.subnet['id']}
     cls.load_balancer = cls._create_active_load_balancer(
         **cls.create_lb_kwargs)
     cls.protocol = 'HTTP'
     cls.port = 80
     cls.load_balancer_id = cls.load_balancer['id']
     cls.create_listener_kwargs = {'loadbalancer_id': cls.load_balancer_id,
                                   'protocol': cls.protocol,
                                   'protocol_port': cls.port}
     cls.listener = cls._create_listener(**cls.create_listener_kwargs)
     cls.listener_id = cls.listener['id']
Exemple #16
0
 def resource_setup(cls):
     super(ListenersTestJSON, cls).resource_setup()
     if not test.is_extension_enabled('lbaas', 'network'):
         msg = "lbaas extension not enabled."
         raise cls.skipException(msg)
     network_name = data_utils.rand_name('network-')
     cls.network = cls.create_network(network_name)
     cls.subnet = cls.create_subnet(cls.network)
     cls.create_lb_kwargs = {'tenant_id': cls.subnet['tenant_id'],
                             'vip_subnet_id': cls.subnet['id']}
     cls.load_balancer = cls._create_active_load_balancer(
         **cls.create_lb_kwargs)
     cls.protocol = 'HTTP'
     cls.port = 80
     cls.load_balancer_id = cls.load_balancer['id']
     cls.create_listener_kwargs = {'loadbalancer_id': cls.load_balancer_id,
                                   'protocol': cls.protocol,
                                   'protocol_port': cls.port}
     cls.listener = cls._create_listener(
         **cls.create_listener_kwargs)
     cls.listener_id = cls.listener['id']
 def resource_setup(cls):
     super(MemberTestJSON, cls).resource_setup()
     if not test.is_extension_enabled("lbaas", "network"):
         msg = "lbaas extension not enabled."
         raise cls.skipException(msg)
     network_name = data_utils.rand_name('network-')
     cls.network = cls.create_network(network_name)
     cls.subnet = cls.create_subnet(cls.network)
     cls.tenant_id = cls.subnet.get('tenant_id')
     cls.subnet_id = cls.subnet.get('id')
     cls.load_balancer = cls._create_active_load_balancer(
         tenant_id=cls.tenant_id,
         vip_subnet_id=cls.subnet.get('id'))
     cls.load_balancer_id = cls.load_balancer.get("id")
     cls.listener = cls._create_listener(
         loadbalancer_id=cls.load_balancer.get('id'),
         protocol='HTTP', protocol_port=80)
     cls.listener_id = cls.listener.get('id')
     cls.pool = cls._create_pool(protocol='HTTP',
                                 tenant_id=cls.tenant_id,
                                 lb_algorithm='ROUND_ROBIN',
                                 listener_id=cls.listener_id)
     cls.pool_id = cls.pool.get('id')
 def resource_setup(cls):
     super(MemberTestJSON, cls).resource_setup()
     if not test.is_extension_enabled("lbaas", "network"):
         msg = "lbaas extension not enabled."
         raise cls.skipException(msg)
     network_name = data_utils.rand_name('network-')
     cls.network = cls.create_network(network_name)
     cls.subnet = cls.create_subnet(cls.network)
     cls.tenant_id = cls.subnet.get('tenant_id')
     cls.subnet_id = cls.subnet.get('id')
     cls.load_balancer = cls._create_active_load_balancer(
         tenant_id=cls.tenant_id, vip_subnet_id=cls.subnet.get('id'))
     cls.load_balancer_id = cls.load_balancer.get("id")
     cls.listener = cls._create_listener(
         loadbalancer_id=cls.load_balancer.get('id'),
         protocol='HTTP',
         protocol_port=80)
     cls.listener_id = cls.listener.get('id')
     cls.pool = cls._create_pool(protocol='HTTP',
                                 tenant_id=cls.tenant_id,
                                 lb_algorithm='ROUND_ROBIN',
                                 listener_id=cls.listener_id)
     cls.pool_id = cls.pool.get('id')
 def resource_setup(cls):
     super(LoadBalancerTestJSON, cls).resource_setup()
     if not test.is_extension_enabled('lbaas', 'network'):
         msg = "lbaas extension not enabled."
         raise cls.skipException(msg)
     cls.network = cls.create_network()
     cls.name = cls.network['name']
     cls.subnet = cls.create_subnet(cls.network)
     pool_name = data_utils.rand_name('pool-')
     vip_name = data_utils.rand_name('vip-')
     cls.pool = cls.create_pool(pool_name, "ROUND_ROBIN",
                                "HTTP", cls.subnet)
     cls.vip = cls.create_vip(name=vip_name,
                              protocol="HTTP",
                              protocol_port=80,
                              subnet=cls.subnet,
                              pool=cls.pool)
     cls.member = cls.create_member(80, cls.pool, cls._ip_version)
     cls.member_address = ("10.0.9.47" if cls._ip_version == 4
                           else "2015::beef")
     cls.health_monitor = cls.create_health_monitor(delay=4,
                                                    max_retries=3,
                                                    Type="TCP",
                                                    timeout=1)
Exemple #20
0
 def resource_setup(cls):
     super(QuotasTest, cls).resource_setup()
     if not test.is_extension_enabled('quotas', 'network'):
         msg = "quotas extension not enabled."
         raise cls.skipException(msg)
     cls.identity_admin_client = cls.manager.identity_client