Add the metadata lb back

The router will be added a load balancer for metadata, so we need
to keep it when we create lb using lbaas v2 api.

Change-Id: If1b0a36570cd9330c695604ed181fde0996e2eee
This commit is contained in:
yuyangbj 2016-03-28 10:30:59 +08:00
parent dadec94d83
commit 932c0140a8

View File

@ -253,9 +253,9 @@ def get_lbaas_fw_section_id(vcns):
def enable_edge_acceleration(vcns, edge_id):
with locking.LockManager.get_lock(edge_id):
config = {
'accelerationEnabled': True,
'enabled': True,
'featureType': 'loadbalancer_4.0'}
# Query the existing load balancer config in case metadata lb is set
_, config = vcns.get_loadbalancer_config(edge_id)
config['accelerationEnabled'] = True
config['enabled'] = True
config['featureType'] = 'loadbalancer_4.0'
vcns.enable_service_loadbalancer(edge_id, config)