30db55b17e57953d4aaf057f45b6c67ebefec4a4
Commit Graph

72 Commits

Author SHA1 Message Date
Ivan Anfimov
deae0c3bb0 Fix small mistakes in phrase
tenant replaced to project
Change-Id: Iefa611cbffedd89eb882daedd910e16755bece0e
Signed-off-by: Ivan Anfimov <lazekteam@gmail.com>
2025年08月17日 23:29:48 +00:00
elajkat
19f326c9d6 pyupgrade changes for Python3.9+
As discussed at the Epoxy PTG meeting, run an automated
upgrade tool to make code python 3.9+ compliant.
Result of running:
$ pyupgrade --py39-plus $(git ls-files | grep ".py$")
Fixed PEP8 errors introduced by pyupgrade by running:
$ autopep8 --select=E127,E128,E501 --max-line-length 79 -r \
 --in-place networking_bgpvpn
Also did manual updates as necessary to fix other errors
and warnings after above commands.
Inspired by Octavia and Nova [0].
[0] https://review.opendev.org/c/openstack/nova/+/896986
Change-Id: Iac7a039ad6924de14aba8f391ff904785c089df7
2024年10月30日 13:04:54 +01:00
Slawek Kaplonski
2a996982d6 Fix trailing whitespaces and replace tabs with 4 spaces
Those changes are done just to make pre-commit hook happy.
TrivialFix
Change-Id: I8e21f41626bcd34c7ff490ea9ac6d7eb40316013
2024年05月27日 15:23:21 +02:00
Takashi Kajinami
da4923014d Replace CRLF by LF
... because LF is commonly used as newline code.
Change-Id: If238971837e7732068bb935c16b2a9a160d9a9a1
2024年05月18日 14:11:51 +09:00
Takashi Kajinami
0370650d9b Drop x bit from dashboard files
None of these files need to be executable.
Change-Id: I65e80a4b2a1136558c060da46b22189c1ed50c7d
2024年01月26日 00:21:40 +09:00
elajkat
2244a10a9c Dashboard: change ugettext_lazy to gettext_lazy
With django 4 some of the imports were changed, adopt
bgpvpn_dashboard to these changes.
Change-Id: If2728626f227a8cb4023cb2395c4c440e92347db
2024年01月25日 15:24:46 +01:00
Zuul
03265a1050 Merge "Address RemovedInDjango40Warning" 2022年08月09日 12:09:05 +00:00
OpenStack Proposal Bot
b13051d1f1 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html
Change-Id: I9cf01144b3cd623856a564c8eb1048e5935fb256
2022年06月21日 03:30:03 +00:00
manchandavishal
d44be7d590 Address RemovedInDjango40Warning
In Django 3.1, django.conf.urls.url() is deprecated
in favor of django.urls.re_path(). For more info see [1]
These were already replaced in Horizon repo by [2].
[1] https://docs.djangoproject.com/en/4.0/releases/3.1/#id2
[2] https://review.opendev.org/c/openstack/horizon/+/827093
Change-Id: Id90e65ce8ad132b4518e3f979b4d7ad8917ce267
2022年05月02日 17:40:23 +05:30
OpenStack Proposal Bot
05f14532b5 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html
Change-Id: I4d015cfe8b97e0fc1259d47c89f4b0704accb61c
2021年02月24日 07:18:33 +00:00
manchandavishal
9e7c5124d4 Cleanup for Refactor-error-messages
This patch is a clean-up patch for refactor-error-messages bp
which remove the exception message from base message otherwise
the same exception message display twice like
this https://ibb.co/XyFWMdz .
Depends-On: https://review.opendev.org/#/c/708069/
Change-Id: Ic7061cd293b238c497f0f4343aa3cc0e7996d5a0
2020年09月11日 07:55:41 +00:00
elajkat
96c266c9a7 Switch to hacking 3.0.1
Make the code compatible with hacking rules:
* import order problems
* line break before/after binary operator (for this added ignore for
W504, line break after binary operator
* indentation problems
I removed the rule N530 (Direct neutron imports not allowed), as that is
a longer story.
As a side-effect use newer pylint version, and fix the problems reported
Change-Id: I701c89ecc890a1d866815b5401cd4c022c51c9c4
Depends-On: https://review.opendev.org/#/c/708965/ 
2020年07月28日 09:03:19 +00:00
Sean McGinnis
e15e405e2f Use unittest.mock instead of third party mock
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.
Change-Id: I2cf3afe0ce833e5d85563a6b10f9ac71f3b8c485
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020年05月19日 06:23:45 -05:00
OpenStack Proposal Bot
3fa26d6888 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html
Change-Id: I49c675d4a8bfcba05757d9e052bddde881f0beea
2019年12月22日 07:36:58 +00:00
Akihiro Motoki
892c9f980b Drop nose dependencies
Horizon test setting no longer depends on nose and related stuffs.
This commit cleans up nose related dependencies.
The change was made in horizon Rocky-3,
so horizon 14.0.0.0b3 is required at least.
Filenames of test modules need to start with test_*
so that Django test runner detects them.
There is no test defined but it would be nice to adjust the filename.
Change-Id: I794e10b2c3c2c7004f7b58ff8c8904d4537a23d9
2018年09月09日 03:42:01 +09:00
Chuck Short
bbee944caa Remove dead code
Now that mox has been removed we can remove the create_stubs
helper function as well.
Change-Id: Iec1e633c41b8b35f429ce532fc64967aa9db5b43
Signed-off-by: Chuck Short <chucks@redhat.com>
2018年09月06日 12:14:06 +00:00
Chuck Short
532465a09d Remove use_mox directive
As of horizon 14.0.0.0b2 or later the use_mox directive is unecessary so we can remove it.
Change-Id: Ie2f2cdecb7893480697dafad0a9a6a96fcc54a74
Signed-off-by: Chuck Short <chucks@redhat.com>
2018年08月28日 12:06:12 +00:00
Cédric Savignan
72304dd9bb [dashboard] Remove old buttons to create/delete associations
Changes 553444 and 536899 adds new buttons and
tabs to create and delete network and router
associations.
The old way to handle the associations is
not needed anymore.
Change-Id: I856b2b5e8025fe685da78882a5c3822f88796017
2018年07月05日 17:16:46 +02:00
Akihiro Motoki
09a9bc3318 dashboard: Fix test failures caused by django test runner
Recently horizon test configuration was changed to use
the Django default test runner because nose is in maintenance mode
for the past several years [1]. Django testcase and testtools are
incompatible, so bgpvpn_dashboard testcases now fail.
In addition, bgpvpn_dashboard/test/test.py is unnecessary
and it causes the test failure too, so this file will be
dropped by this commit.
[1] horizon commit 1f80d94459856a8c477310cc0fe4b0e165d8c0c1
Change-Id: I45ff876871d7dcb82f284061b3a7225dd65c771b
Closes-Bug: #1776223 
2018年06月12日 09:18:26 +09:00
Akihiro Motoki
3712e2dee6 Django 2.0 support
Replaces django.core.urlresolves with django.urls.
(In Django 2.0) The django.core.urlresolvers module is removed
in favor of its new location, django.urls.
It was deprecated in Django 1.10:
https://docs.djangoproject.com/en/2.0/releases/1.10/#id3
The arguments of include() has been changed in Django 1.9
and the older style was dropped in Django 2.0.
https://docs.djangoproject.com/en/2.0/releases/1.9/#passing-a-3-tuple-or-an-app-name-to-include
Add py35dj20 job to test Django 2.0 integration.
Change-Id: I1cdfc19c9fae5cad1adac0867f65d2ae15385d87
2018年05月14日 02:46:58 +00:00
Cédric Savignan
11b337c23d [dashboard] Modify bgpvpn router associations
This patch add a button "create router association" in bgpvpn panels.
It open a form to add only one network association with optionals parameters.
The bgpvpn overview details is more complete. There is
now a router associations tab which list all the router
associations. It's possible to delete each router
association and to update it.
Change-Id: Idd5af2ce2d4d864882c6191d648d16d9d9bcf35f
Partially-Implements: blueprint routes-control
2018年04月25日 10:53:36 +02:00
Cédric Savignan
6eae473fd4 [dashboard] Modify bgpvpn network associations
This patch adds a button "create network association" in bgpvpn panels. It
opens a form to add only one network association.
The bgpvpn overview details is more complete. There is now a
network associations tab which list all the network associations. It's
possible to delete each network association. It's inspired by the network
panel which include subnets and ports tabs on the overview of a network.
It will be easier in the future to add others associations as routers and
ports with the same logical with new tab in bgpvpn overview details.
Change-Id: I6280b53558b6b52081ee6d629e8f3963d8dfc346
2018年04月25日 10:53:36 +02:00
Thomas Morin
89683e8fc4 dashboard: use new neutronclient
This change updates the call to neutronclient to use
the BGPVPN methods natively defined in python-neutronclient,
rather than the ones defined by the dynamic extension to
neutronclient from networking-bgpvpn (which are deprecated).
Also removes use of mox at the same time.
This change also makes the lower constraint job use
neutron, horizon, networking-odl and networking-bagpipe
from git, which is required to unbreak the CI right now.
Change-Id: I7d399466f6577e4dd55b1a0fa5a92aab15e6eebb
Partial-Bug: 1761691
2018年04月24日 16:12:11 +02:00
Cédric Savignan
dfbfdee26a [dashboard] Refactoring some common code
Class BgpvpnTable between admin and project panel has
some common code. This patch inherit BgpvpnTable class
from project in BgpvpnTable Admin table.
Change-Id: I6c59f79334ef22afb8160aee44c244c6f5fc9b15
2018年03月23日 14:44:50 +01:00
OpenStack Proposal Bot
6eac5c3da0 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html
Change-Id: I47a0f8bf1b85a5b9e666e2d776dc7085a77eae63
2018年03月01日 07:21:58 +00:00
OpenStack Proposal Bot
e7b1b33a47 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html
Change-Id: I4e329194e78b59fd2ec364b24b85dfaf7a50b075
2018年02月13日 07:29:38 +00:00
OpenStack Proposal Bot
63a6cf453f Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html
Change-Id: I42962136db49e7491bba13d374b93f1289db88b8
2018年02月10日 06:26:53 +00:00
Zuul
50f16a1261 Merge "[bgpvpn_dashboard] Fix bug when a network or router name doesn't exist" 2018年01月18日 17:16:47 +00:00
Cédric Savignan
2d477cd4bd [bgpvpn_dashboard] Fix bug when a network or router name doesn't exist
In the popup Update Networks Association the field network can be empty
when a network has no name. Same thing for the routers.
The fix displays the id when name doesn't exist.
Change-Id: I71d4bf3f74997a1d0bf1e84e93d88ac5c22678fc
Closes-Bug:1742948
2018年01月15日 15:28:31 +01:00
Cédric Savignan
bf4b752caf [bgpvpn_dashboard] Minor typo fix
Fix minors errors in some message information
Change-Id: Ib4e1828c3e6ca5dcfe5b0e916f239d67d5514c94
2018年01月12日 15:22:26 +01:00
Cédric Savignan
32b74ed36d Fix minor problem in bgpvpn_dashboard unit test
Method network_association_list was called instead
router_association_list.
Change-Id: I0418f436ff1f45ec2d7644bbf6851b24d2e180f1
2018年01月08日 15:47:10 +01:00
OpenStack Proposal Bot
b1ccc21df6 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html
Change-Id: Iad2622a3cbc9c5c3eae640eafd2fa1378f5583da
2017年12月21日 06:40:05 +00:00
OpenStack Proposal Bot
f96e500e54 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html
Change-Id: I1744f34c5012c5c3c4fe1b184b53569d538a0a8d
2017年12月08日 19:29:21 +00:00
Cédric Savignan
ea4f9d118d Improve message information for translation
Some error messages aren't fully compatible for a
translation in an other language.
This patch change few messages to allow a better translation.
Change-Id: Iab3d470133f500eb9e9daa5996ca54c6b36be5e3
2017年12月06日 16:01:19 +01:00
OpenStack Proposal Bot
e289789620 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html
Change-Id: I15bc4cf75f909b4848f0e769c6a61ceadc9539cc
2017年12月01日 06:58:31 +00:00
OpenStack Proposal Bot
3c930bb951 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html
Change-Id: Ib4ce01068dc0da05e708924e7185cd3e1f3a5c9d
2017年11月30日 06:58:50 +00:00
OpenStack Proposal Bot
4bb661fb83 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html
Change-Id: I9b5a61c8283611ff2912dcfbcd19a603eaaad6ac
2017年11月28日 07:13:58 +00:00
Cédric Savignan
2da0226980 Remove policy check
The fields route targets should always been formated
even if the user is not a admin.
Check if admin is connected is useless here.
Change-Id: I9111ddc364b004ce757cdd665147df3fc23784cc
Closes-Bug: 1730678
2017年11月20日 11:49:07 +01:00
Cédric Savignan
08698f8833 dashboard: impossible to add a bgpvpn with a empty route target
If the route targets, import targets or export targets are empty in the
django form, the creation or modification of the bgpvpn failed.
The neutron server return a error (Invalid input for export_targets.
Reason: '' is not a valid input.)
The route_targets are not correctly formatted and a empty string is sent
instead an empty list when the fields route_targets are empty in the form.
Change-Id: I3b233f68c12795713daf6c1a00042730eea84c56
Closes-Bug: 1730678
2017年11月07日 16:23:40 +01:00
Zuul
c0a40e5ba1 Merge "dashboard: Add unit tests for bgpvpn_dashboard" 2017年10月31日 09:46:47 +00:00
Zuul
546d5b46a0 Merge "dashboard: edit variable containing Regex RT" 2017年10月20日 15:46:55 +00:00
Cédric Savignan
a747b60067 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
2017年10月20日 11:50:30 +02:00
Cédric Savignan
1ec99243ca dashboard: Add unit tests for bgpvpn_dashboard
Unit tests for dashboard elements regarding BGP VPN.
Test dashboard elements (except workflows) only for
a admin user.
Change-Id: I5bd6b154725a60a94d98e2e64ca8fba95ec20c80
2017年10月11日 11:18:02 +02:00
Cédric Savignan
9ca3781e87 dashboard: introduce usage of the policy file
The policy check framework is added in the
devstack installation.
Documentation modified for a manuel installation.
Change-Id: I0791e329f41feca79ebe2f31321d1ce02ac44ec3
2017年09月29日 16:43:40 +02:00
Cédric Savignan
4da0842a97 dashboard: clean code in forms.py
Patch 476532 has removed some lines but everything
was not removed. It's useless now to get the bgpvpn_id and
the tenant_id. These data was useful only when we were (uselessly)
checking if the name of BGPVPN was already used by an other BGPBPN.
Change-Id: I587077744968ab08b0b5b359a4ec8efa51963c34
2017年09月26日 09:04:07 +02:00
Cédric Savignan
42d3eb3fdc dashboard: fix bug about route target validation
- When a route target is incorrect in the create or update form
a popup message should indicate that validation of this field failed.
This message doesn't display and instead a generic error is returned.
It's a mistake to convert the route_target which is charfield type to
a list in the clean method.
This, need to be done after in the handle method when the datas are "cleaned".
- Fix also bad behavior when a admin user update a BGPVPN. In some cases
update doesn't work when the RT field are edited.
Closes-Bug: 1716941
Closes-Bug: 1716689
Change-Id: I5fa5a15ddf90bc2a38645c54132cc6b57e9b797a
2017年09月21日 09:24:21 +02:00
Jenkins
a5840832dd Merge "Using neutron-lib hacking rules" 2017年07月24日 10:12:16 +00:00
Jenkins
998f426ddd Merge "dashboard: change admin panel" 2017年07月24日 10:11:51 +00:00
Cédric Savignan
dd01bac39b dashboard: refactor views
Refactoring code of the project and admin views.py files.
Instead of calling all networks, routers and tenants
before the loop, each needed resources is called inside the loop.
Change-Id: Iae584e06dd07f2f7f128fceb9d7b8b9a2e0350b2
2017年07月19日 14:44:26 +02:00
Cédric Savignan
8abfbe3a5c dashboard: change admin panel
BGPVPN Interconnections admin panel was in system group.
This change put the BGPVPN panel in the network group.
Change-Id: I872e49c4e1aa84f328070272ae3fec014e083d1c
Closes-Bug: 1702641
2017年07月13日 11:26:10 +02:00