Add amphorav2 to provider list

Change-Id: I10112d871a5628c99c3f2374c8451d936ab9bedb
Story: 2005072
This commit is contained in:
Ann Taraday 2019-10-17 15:28:30 +04:00
parent 6159700ab7
commit 7d0b582128
6 changed files with 13 additions and 6 deletions

View File

@ -196,6 +196,9 @@ AMPHORA_STATUSES = (
STATUS_PENDING_DELETE, STATUS_DELETED, STATUS_ERROR STATUS_PENDING_DELETE, STATUS_DELETED, STATUS_ERROR
) )
# Amphora providers list
AMPHORA_PROVIDERS = ['amphora', 'amphorav2', 'octavia']
# Flavor capabilities # Flavor capabilities
LOADBALANCER_TOPOLOGY = 'loadbalancer_topology' LOADBALANCER_TOPOLOGY = 'loadbalancer_topology'

View File

@ -108,8 +108,12 @@ OctaviaGroup = [
'octavia.api.drivers entrypoint. Example: ' 'octavia.api.drivers entrypoint. Example: '
'amphora:The Octavia Amphora driver.,' 'amphora:The Octavia Amphora driver.,'
'octavia:Deprecated alias of the Octavia ' 'octavia:Deprecated alias of the Octavia '
'Amphora driver.'), 'Amphora driver.,'
'amphorav2:The Octavia Amphora driver that uses '
'taskflow jobboard persistence.'),
default={'amphora': 'The Octavia Amphora driver.', default={'amphora': 'The Octavia Amphora driver.',
'amphorav2': 'The Octavia Amphora driver that uses '
'taskflow jobboard persistence.',
'octavia': 'Deprecated alias of the Octavia Amphora ' 'octavia': 'Deprecated alias of the Octavia Amphora '
'driver.'}), 'driver.'}),
cfg.StrOpt('loadbalancer_topology', cfg.StrOpt('loadbalancer_topology',

View File

@ -30,7 +30,7 @@ class AmphoraAPITest(test_base.LoadBalancerBaseTest):
@classmethod @classmethod
def skip_checks(cls): def skip_checks(cls):
super(AmphoraAPITest, cls).skip_checks() super(AmphoraAPITest, cls).skip_checks()
if CONF.load_balancer.provider not in ['amphora', 'octavia']: if CONF.load_balancer.provider not in const.AMPHORA_PROVIDERS:
raise cls.skipException('Amphora tests only run with the amphora ' raise cls.skipException('Amphora tests only run with the amphora '
'provider enabled.') 'provider enabled.')

View File

@ -826,7 +826,7 @@ class LoadBalancerAPITest(test_base.LoadBalancerBaseTest):
lb = self.mem_lb_client.show_loadbalancer(lb[const.ID]) lb = self.mem_lb_client.show_loadbalancer(lb[const.ID])
self.assertEqual(const.ACTIVE, lb[const.PROVISIONING_STATUS]) self.assertEqual(const.ACTIVE, lb[const.PROVISIONING_STATUS])
if CONF.load_balancer.provider in ['amphora', 'octavia']: if CONF.load_balancer.provider in const.AMPHORA_PROVIDERS:
before_amphorae = self.lb_admin_amphora_client.list_amphorae( before_amphorae = self.lb_admin_amphora_client.list_amphorae(
query_params='{loadbalancer_id}={lb_id}'.format( query_params='{loadbalancer_id}={lb_id}'.format(
loadbalancer_id=const.LOADBALANCER_ID, lb_id=lb[const.ID])) loadbalancer_id=const.LOADBALANCER_ID, lb_id=lb[const.ID]))
@ -840,7 +840,7 @@ class LoadBalancerAPITest(test_base.LoadBalancerBaseTest):
CONF.load_balancer.lb_build_interval, CONF.load_balancer.lb_build_interval,
CONF.load_balancer.lb_build_timeout) CONF.load_balancer.lb_build_timeout)
if CONF.load_balancer.provider in ['amphora', 'octavia']: if CONF.load_balancer.provider in const.AMPHORA_PROVIDERS:
after_amphorae = self.lb_admin_amphora_client.list_amphorae( after_amphorae = self.lb_admin_amphora_client.list_amphorae(
query_params='{loadbalancer_id}={lb_id}'.format( query_params='{loadbalancer_id}={lb_id}'.format(
loadbalancer_id=const.LOADBALANCER_ID, lb_id=lb[const.ID])) loadbalancer_id=const.LOADBALANCER_ID, lb_id=lb[const.ID]))

View File

@ -34,7 +34,7 @@ class AmphoraScenarioTest(test_base.LoadBalancerBaseTest):
def skip_checks(cls): def skip_checks(cls):
super(AmphoraScenarioTest, cls).skip_checks() super(AmphoraScenarioTest, cls).skip_checks()
if CONF.load_balancer.provider not in ['amphora', 'octavia']: if CONF.load_balancer.provider not in const.AMPHORA_PROVIDERS:
raise cls.skipException("Amphora tests require provider 'amphora' " raise cls.skipException("Amphora tests require provider 'amphora' "
"or 'octavia' (alias to 'amphora', " "or 'octavia' (alias to 'amphora', "
" deprecated) set") " deprecated) set")

View File

@ -31,7 +31,7 @@ class SparePoolTest(test_base.LoadBalancerBaseTestWithCompute):
def skip_checks(cls): def skip_checks(cls):
super(SparePoolTest, cls).skip_checks() super(SparePoolTest, cls).skip_checks()
if CONF.load_balancer.provider not in ['amphora', 'octavia']: if CONF.load_balancer.provider not in const.AMPHORA_PROVIDERS:
raise cls.skipException("Amphora tests require provider 'amphora' " raise cls.skipException("Amphora tests require provider 'amphora' "
"or 'octavia' (alias to 'amphora', " "or 'octavia' (alias to 'amphora', "
"deprecated) set") "deprecated) set")