dashboard: edit variable containing Regex RT

This modification have to be done further to
change 504148. Otherwise the Regex for the
validation of Route Target is not correcty used.
Depends-On: Idb97459c6d37ce027b6fef4f15883017120095e2
Closes-Bug: 1717512
Related-Bug: 1717233
Change-Id: Ifb530ad63fed96b4447d5443d712f8fc978899ce
This commit is contained in:
Cédric Savignan
2017年09月15日 15:16:37 +02:00
parent 53e8451b9e
commit a747b60067

View File

@@ -16,7 +16,9 @@
from django.core.urlresolvers import reverse_lazy
from django.core.validators import RegexValidator
from django.utils.translation import ugettext_lazy as _
from horizon import forms
from openstack_dashboard import api
from bgpvpn_dashboard.common import bgpvpn as bgpvpn_common
@@ -25,7 +27,13 @@ from networking_bgpvpn.neutron.services.common import constants
from bgpvpn_dashboard.dashboards.project.bgpvpn import forms \
as project_forms
RTRD_REGEX = constants.RTRD_REGEX[4:-1]
if constants.RTRD_REGEX[0] == '^' and constants.RTRD_REGEX[-1] == '$':
RTRD_REGEX = constants.RTRD_REGEX[1:-1]
else:
msg = _("Bug, inconsistency between neutron-lib and "
"networking-bgpvpn for RTRD regex")
raise Exception(msg)
RTRDS_REGEX = '^%s( *, *%s)*$' % (RTRD_REGEX, RTRD_REGEX)
Reference in New Issue
openstack/networking-bgpvpn
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.

The note is not visible to the blocked user.