Allow peer_id and peer_address input formats other than IP address

This patch add support the attributes of IPsec connection to be
able get more formats like FQDN other than IP format as bug report

Change-Id: I32f20f7cb4407f32978e6ae2bd7b93ea54ce784e
Closes-bug: #1261127
This commit is contained in:
Cao Xuan Hoang 2017-11-07 10:40:54 +07:00
parent 2e9b823a21
commit 9ba0382e8d
3 changed files with 14 additions and 16 deletions

View File

@ -258,18 +258,14 @@ class UpdateIPsecSiteConnection(forms.SelfHandlingForm):
widget=forms.TextInput(attrs={'readonly': 'readonly'}))
description = forms.CharField(
required=False, max_length=80, label=_("Description"))
peer_address = forms.IPField(
peer_address = forms.CharField(
label=_("Peer gateway public IPv4/IPv6 Address or FQDN"),
help_text=_("Peer gateway public IPv4/IPv6 address or FQDN for "
"the VPN Connection"),
version=forms.IPv4 | forms.IPv6,
mask=False)
peer_id = forms.IPField(
"the VPN Connection"),)
peer_id = forms.CharField(
label=_("Peer router identity for authentication (Peer ID)"),
help_text=_("Peer router identity for authentication. "
"Can be IPv4/IPv6 address, e-mail, key ID, or FQDN"),
version=forms.IPv4 | forms.IPv6,
mask=False)
"Can be IPv4/IPv6 address, e-mail, key ID, or FQDN"),)
peer_cidrs = forms.MultiIPField(
required=False,
label=_("Remote peer subnet(s)"),

View File

@ -432,18 +432,14 @@ class AddIPsecSiteConnectionAction(workflows.Action):
label=_("IKE policy associated with this connection"))
ipsecpolicy_id = forms.ChoiceField(
label=_("IPsec policy associated with this connection"))
peer_address = forms.IPField(
peer_address = forms.CharField(
label=_("Peer gateway public IPv4/IPv6 Address or FQDN"),
help_text=_("Peer gateway public IPv4/IPv6 address or FQDN for "
"the VPN Connection"),
version=forms.IPv4 | forms.IPv6,
mask=False)
peer_id = forms.IPField(
"the VPN Connection"),)
peer_id = forms.CharField(
label=_("Peer router identity for authentication (Peer ID)"),
help_text=_("Peer router identity for authentication. "
"Can be IPv4/IPv6 address, e-mail, key ID, or FQDN"),
version=forms.IPv4 | forms.IPv6,
mask=False)
"Can be IPv4/IPv6 address, e-mail, key ID, or FQDN"),)
peer_ep_group_id = forms.ChoiceField(
required=False,
label=_("Endpoint Group for remote peer CIDR(s)"),

View File

@ -0,0 +1,6 @@
---
fixes:
- |
Add support the attributes of IPsec site connection to be able to get
more formats like FQDN other than IP format. For more information, see
bug `1261127 <https://launchpad.net/bugs/1261127>`_.