Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow to configure the default loadbalancer provider
By using a dummy loadbalancer driver it is possible to declare a default provider for opencontrail. In neutron.conf set: service_provider=LOADBALANCER:haproxy:neutron_plugin_contrail.plugins.opencontrail.loadbalancer.driver.OpencontrailLoadbalancerDummyDriver:default Then the default provider will be haproxy. If no service_provider is set the default provider will be opencontrail (the default provider created by SVC monitor) Closes-Bug: #1521625 Change-Id: I112700e04ba485f5f48855d553dc345bf4c5fe74
- Loading branch information
1 parent
182c96e
commit e3f30ba
Showing
4 changed files
with
99 additions
and
12 deletions.
There are no files selected for viewing
61 changes: 61 additions & 0 deletions
61
neutron_plugin_contrail/plugins/opencontrail/loadbalancer/driver.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
try: | ||
from neutron.services.loadbalancer.drivers import abstract_driver | ||
except ImportError: | ||
from neutron_lbaas.services.loadbalancer.drivers import abstract_driver | ||
|
||
"""Dummy LBAAS driver for OpenContrail. | ||
This allows to specify a default provider in the neutron.conf. | ||
LBAAS drivers are now in contrail svc_monitor. | ||
""" | ||
|
||
|
||
class OpencontrailLoadbalancerDummyDriver( | ||
abstract_driver.LoadBalancerAbstractDriver): | ||
|
||
def __init__(self, plugin): | ||
pass | ||
|
||
def create_vip(self, context, vip): | ||
pass | ||
|
||
def update_vip(self, context, old_vip, vip): | ||
pass | ||
|
||
def delete_vip(self, context, vip): | ||
pass | ||
|
||
def create_pool(self, context, pool): | ||
pass | ||
|
||
def update_pool(self, context, old_pool, pool): | ||
pass | ||
|
||
def delete_pool(self, context, pool): | ||
pass | ||
|
||
def stats(self, context, pool_id): | ||
pass | ||
|
||
def create_member(self, context, member): | ||
pass | ||
|
||
def update_member(self, context, old_member, member): | ||
pass | ||
|
||
def delete_member(self, context, member): | ||
pass | ||
|
||
def update_pool_health_monitor(self, context, | ||
health_monitor, | ||
pool_id): | ||
pass | ||
|
||
def create_pool_health_monitor(self, context, | ||
health_monitor, | ||
pool_id): | ||
pass | ||
|
||
def delete_pool_health_monitor(self, context, health_monitor, pool_id): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters