Merge "add enabled/disable on lbaas listener"
This commit is contained in:
commit
e196b84fbb
@ -90,7 +90,8 @@ def listener_to_edge_vse(context, listener, vip_address, default_pool,
|
|||||||
'defaultPoolId': default_pool,
|
'defaultPoolId': default_pool,
|
||||||
'accelerationEnabled': (
|
'accelerationEnabled': (
|
||||||
listener['protocol'] == lb_const.LB_PROTOCOL_TCP),
|
listener['protocol'] == lb_const.LB_PROTOCOL_TCP),
|
||||||
'applicationProfileId': app_profile_id}
|
'applicationProfileId': app_profile_id,
|
||||||
|
'enabled': listener['admin_state_up']}
|
||||||
|
|
||||||
# Add the L7 policies
|
# Add the L7 policies
|
||||||
if listener['l7_policies']:
|
if listener['l7_policies']:
|
||||||
|
@ -51,7 +51,8 @@ EDGE_VIP_ID = 'vip-aaa'
|
|||||||
EDGE_VIP_DEF = {'protocol': 'http', 'name': 'vip_' + LISTENER_ID,
|
EDGE_VIP_DEF = {'protocol': 'http', 'name': 'vip_' + LISTENER_ID,
|
||||||
'connectionLimit': 0, 'defaultPoolId': None,
|
'connectionLimit': 0, 'defaultPoolId': None,
|
||||||
'ipAddress': LB_VIP, 'port': 80, 'accelerationEnabled': False,
|
'ipAddress': LB_VIP, 'port': 80, 'accelerationEnabled': False,
|
||||||
'applicationProfileId': EDGE_APP_PROFILE_ID, 'description': ''}
|
'applicationProfileId': EDGE_APP_PROFILE_ID, 'description': '',
|
||||||
|
'enabled': True}
|
||||||
LISTENER_BINDING = {'loadbalancer_id': LB_ID,
|
LISTENER_BINDING = {'loadbalancer_id': LB_ID,
|
||||||
'listener_id': LISTENER_ID,
|
'listener_id': LISTENER_ID,
|
||||||
'app_profile_id': EDGE_APP_PROFILE_ID,
|
'app_profile_id': EDGE_APP_PROFILE_ID,
|
||||||
@ -117,7 +118,8 @@ class BaseTestEdgeLbaasV2(base.BaseTestCase):
|
|||||||
self.listener = lb_models.Listener(LISTENER_ID, LB_TENANT_ID,
|
self.listener = lb_models.Listener(LISTENER_ID, LB_TENANT_ID,
|
||||||
'l-name', '', None, LB_ID,
|
'l-name', '', None, LB_ID,
|
||||||
'HTTP', protocol_port=80,
|
'HTTP', protocol_port=80,
|
||||||
loadbalancer=self.lb)
|
loadbalancer=self.lb,
|
||||||
|
admin_state_up=True)
|
||||||
self.sess_persist = lb_models.SessionPersistence(type='HTTP_COOKIE')
|
self.sess_persist = lb_models.SessionPersistence(type='HTTP_COOKIE')
|
||||||
self.pool = lb_models.Pool(POOL_ID, LB_TENANT_ID, 'pool-name', '',
|
self.pool = lb_models.Pool(POOL_ID, LB_TENANT_ID, 'pool-name', '',
|
||||||
None, 'HTTP', 'ROUND_ROBIN',
|
None, 'HTTP', 'ROUND_ROBIN',
|
||||||
@ -449,7 +451,8 @@ class TestEdgeLbaasV2Listener(BaseTestEdgeLbaasV2):
|
|||||||
new_listener = lb_models.Listener(LISTENER_ID, LB_TENANT_ID,
|
new_listener = lb_models.Listener(LISTENER_ID, LB_TENANT_ID,
|
||||||
'l-name', '', None, LB_ID,
|
'l-name', '', None, LB_ID,
|
||||||
'HTTP', protocol_port=8000,
|
'HTTP', protocol_port=8000,
|
||||||
loadbalancer=self.lb)
|
loadbalancer=self.lb,
|
||||||
|
admin_state_up=True)
|
||||||
new_listener.default_pool = self.pool
|
new_listener.default_pool = self.pool
|
||||||
|
|
||||||
with mock.patch.object(nsxv_db, 'get_nsxv_lbaas_listener_binding'
|
with mock.patch.object(nsxv_db, 'get_nsxv_lbaas_listener_binding'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user