Use neutron-lib constants for agent mode
... instead of using hard-coded strings. Change-Id: I65e7461bcc3111d7ba0a621bd993a52812a31bdc Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
@@ -52,8 +52,10 @@ class IPsecVpnDriverCallBack:
|
|||||||
# right agent to deploy the vpn service. In the
|
# right agent to deploy the vpn service. In the
|
||||||
# case of distributed the vpn service should reside
|
# case of distributed the vpn service should reside
|
||||||
# only on a dvr_snat node.
|
# only on a dvr_snat node.
|
||||||
agent_mode = agent_conf.get('agent_mode', 'legacy')
|
agent_mode = agent_conf.get(
|
||||||
if not agent.admin_state_up or agent_mode == 'dvr':
|
'agent_mode', lib_constants.L3_AGENT_MODE_LEGACY)
|
||||||
|
if (not agent.admin_state_up or
|
||||||
|
agent_mode == lib_constants.L3_AGENT_MODE_DVR):
|
||||||
return []
|
return []
|
||||||
query = context.session.query(vpn_models.VPNService)
|
query = context.session.query(vpn_models.VPNService)
|
||||||
query = query.join(vpn_models.IPsecSiteConnection)
|
query = query.join(vpn_models.IPsecSiteConnection)
|
||||||
|
|||||||
Reference in New Issue
Block a user