Commit Graph

9 Commits

Author SHA1 Message Date
Akihiro Motoki cd7c1b5110 Address RemovedInDjango40Warning (2)
django.utils.translation.ugettext(), ugettext_lazy(), ugettext_noop(),
ungettext(), and ungettext_lazy() are deprecated in favor of the
functions that they’re aliases for: django.utils.translation.gettext(),
gettext_lazy(), gettext_noop(), ngettext(), and ngettext_lazy().

https://docs.djangoproject.com/en/4.0/releases/3.0/#id3

Change-Id: I77878f84e9d10cf6a136dada81eabf4e18676250
2022-02-04 16:22:07 +09:00
Akihiro Motoki e5d09edc20 Use python3-style super()
In python3, super() does not always require a class and self reference.
In other words, super() is enough for most cases.
This is much simpler and it is time to switch it to the newer style.

pylint provides a check for this.
Let's enable 'super-with-arguments' check.

NOTE: _prepare_mappings() method of FormRegion in
openstack_dashboard/test/integration_tests/regions/forms.py is refactored.
super() (without explicit class and self referece) does not work when
a subclass method calls a same method in a parent class multiple times.
It looks better to prepare a separate method to provide a common logic.

Change-Id: Id9512a14be9f20dbd5ebd63d446570c7b7c825ff
2020-10-15 14:37:20 +09:00
Sam Wright 90aa4b2b7e SG creation user taken straight to edit rules
When the user creates a security group they are taken straight to
manage security group and can select and make changes to rules.

Change-Id: I2b3422e7816fabf59aca87a76f19cba96f01bddc
closes-bug: #1292084
2019-01-07 09:59:39 +00:00
Akihiro Motoki e477eafa45 django2: Replace 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 depreacted in Django 1.10:
https://docs.djangoproject.com/en/2.0/releases/1.10/#id3

blueprint django2-support
Change-Id: I46ab5c325491274b8eaffbf848e5d80f83c2fd26
2018-02-17 01:36:48 +09:00
Akihiro Motoki 1afba5f082 Sort security group rules more meaningfully
At now, security gorup rules are sorted based on ip_protocol and
from_port by default, but there are more higher level classification
like direction and ethertype (like IPv4, IPv6).
This commit improves the default sort order in more meaningful order.

Also improves the handling of IP protocol which can be a string,
an integer or None. Sorting in python 3 assumes all corresponding
values have a same type, so we need to ensure IP protocols in all rules
have a same type, so IP protocol fields are converted into a string
before sorting.

Change-Id: Ia45830e9953e92141a3ce91a78dd338960b5ac11
Closes-Bug: #1264738
2017-10-14 10:31:47 +00:00
Akihiro Motoki af3b7e4134 flake8-import-order: Ensure to place project imports last
To ensure project imports are placed after third party import,
we need to specify application-import-names.
Previously flake8-import-check checks only standard imports or not.

Change-Id: I9beb2105f686dc7d9aebfce8e21c5e182698e2fe
2017-09-20 01:19:38 +00:00
Akihiro Motoki 9067ae8b0f Move SG and FIP API wrapper to api.neutron
We no longer need to have SG and FIP API wrapper in api.network
as we only supports a single network back-end.

Completes blueprint drop-nova-network

Change-Id: I4e59d897508b497a3cd2ae2fda93b30b786610dc
2017-06-04 17:51:25 +00:00
zhurong b1a9078404 Update the access_and_security url
Since this bp reorganise-access-and-security,
move access_and_security to separate panel,
there are some places url need to change too.

Closes-Bug: #1679895

Change-Id: I59560c479ad77d2452484b2138065a003451f376
2017-04-05 03:33:50 +00:00
Rob Cresswell e2698063e2 Move Security Groups into its own panel
This patch moves the Security Groups tab from the Access and Security
panel into its own panel under the Network panel group. As this is the
last tab in Access and Security, that panel is also removed by this
patch.

Change-Id: Id29c7ce635d46383742aec140def265d4b249aa5
Implements: blueprint reorganise-access-and-security
2017-02-02 13:19:21 +11:00