Add VPN service: List only routers with external gateway

Change-Id: Ice5a586624af43a744e81f4f68397a960909a9b4
Closes-Bug: #1747041
This commit is contained in:
Akihiro Motoki 2018-02-03 02:16:03 +09:00
parent e4ed12078b
commit 1bc087ac49
1 changed files with 2 additions and 0 deletions

View File

@ -69,6 +69,8 @@ class AddVPNServiceAction(workflows.Action):
_('Unable to retrieve routers list.'))
routers = []
for r in routers:
if not r.external_gateway_info:
continue
router_id_choices.append((r.id, r.name))
self.fields['router_id'].choices = router_id_choices
return router_id_choices