Support a timeout argument when instantiating a bigswitch plugin
The timeout argument overwrites the timeout value set in the config file. The change permits any standalone script to interact with the bigswitch controller through the quantum plugin with customized timeout value without changing the plugin behavior. Fixes: bug #1195923 Change-Id: I17954e70d661e7e7d5156c34c08b7c96bb3203ce
This commit is contained in:
parent
67548e10f0
commit
bc4c382f11
@ -333,7 +333,7 @@ class QuantumRestProxyV2(db_base_plugin_v2.QuantumDbPluginV2,
|
||||
|
||||
supported_extension_aliases = ["router", "binding", "router_rules"]
|
||||
|
||||
def __init__(self):
|
||||
def __init__(self, server_timeout=None):
|
||||
LOG.info(_('QuantumRestProxy: Starting plugin. Version=%s'),
|
||||
version_string_with_vcs())
|
||||
|
||||
@ -347,9 +347,11 @@ class QuantumRestProxyV2(db_base_plugin_v2.QuantumDbPluginV2,
|
||||
server_auth = cfg.CONF.RESTPROXY.server_auth
|
||||
server_ssl = cfg.CONF.RESTPROXY.server_ssl
|
||||
sync_data = cfg.CONF.RESTPROXY.sync_data
|
||||
timeout = cfg.CONF.RESTPROXY.server_timeout
|
||||
quantum_id = cfg.CONF.RESTPROXY.quantum_id
|
||||
self.add_meta_server_route = cfg.CONF.RESTPROXY.add_meta_server_route
|
||||
timeout = cfg.CONF.RESTPROXY.server_timeout
|
||||
if server_timeout is not None:
|
||||
timeout = server_timeout
|
||||
|
||||
# validate config
|
||||
assert servers is not None, 'Servers not defined. Aborting plugin'
|
||||
|
Loading…
Reference in New Issue
Block a user