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
All strings are considered as unicode strings in python 3,
so we no longer need "u" prefix (u'...').
Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: I796d2fcdca066475bbf29d25cbf2aa67b2b2178b
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
This pylint check 'no-else-return' might be debatable.
but as far as I checked it works in most cases.
Change-Id: Ie8574d4a529454c6e050fa62a7a17ea097d00240
Kyestone V2 support was removed in Train, so it's safe to do such cleanup.
* Functions which just return horizon settings are dropped and
the settings are referred directly now.
* The service catalog in the sample test data is updated to match
the format of the keystone API v3.
* Related to the above change of the sample service catalog,
openstack_dashboard.test.unit.api.test_keystone.ServiceAPITests is
updated to specify the region name explicitly because 'RegionTwo'
endpoint is no longer the second entry of the endpoint list in the
keystone API v3.
Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: Ib60f360c96341fa5c618595f4a9bfdfe7ec5ae83
Keystone V2 API was deprecated in Stein release in Horizon and
removed from Keystone in Queens release.
Change-Id: I917e273d3174adf0874e516b3d635ccb8ba58a27
This commit converts the quota update workflow tab into
a separate workflow. After this change, admin cannot set
a project's quotas in the project creation workflow,
but the admin can update its quotas just after creating a project,
so I think it is not a problem.
Because of splitting quota update from a project create/update workflow,
our unit tests has been simplified significantly. Previously we needed
tests for **combination** of create/update project and quota update,
but we now need only tests for create/update project and quota update
separately.
Part of blueprint horizon-plugin-tab-for-info-and-quotas
Change-Id: I7b95428e89ddc1c7a85a1162db29cef9a9674129
(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
As Nova's API is unified to os_compute_api, the API policies are also
updated to use this format, Horizon needs to use Nova policy enforce
rules in the codebase. This patch also update nova_policy.json using
oslo-config-generator for Nova policy file.
Co-Authored-By: Rob Cresswell <robert.cresswell@outlook.com>
Implements: blueprint update-nova-enforce-policies
Change-Id: Id7d01a39930c88592301a5035f0befe5293a78fa
There are two Enabled column definitions, remove
the one attached to v3 enabled (unrelated to v3 too).
Closes-Bug: #1633288
Change-Id: I8ba74eba843b72ba1d55c5237d2972c45057afb7
Implements server-side filtering in Identity->Projects
Projects (Only V3 supports server filtering)
Users (Only V3 supports server filtering)
Groups
Roles
This filtering method allows a user to filter by
several fields:
- Name
- UUID
- Enabled
Cannot implement filter by email ttps://review.openstack.org/#/c/110970/
Implements blueprint: server-side-filtering
Co-Authored-By: Daniel Castellanos <luis.daniel.castellanos@intel.com>
Change-Id: I37d6afdef84593e2779d21bec0c2f55e2794ab78
Adds a word-break class that can be added to tables to prevent large
column values breaking the table shape.
Change-Id: Icca10d9c29254d176dc7f8b7c039bc19c3f52c72
Related-Bug: 1565724
Closes-Bug: 1584785
As per agreed in Austin summit and then confirmed in the midcycle,
the inline_edit form/functionality is more an issue than a solution.
It leads to many bugs and UX is not the best.
Implements: blueprint remove-table-inline-edit
Change-Id: I91394e4a63afadb66659b6b7c04cb7f8da948ff8
Adds conditional block to nova quotas to exclude them if nova is not
enabled; adds 'permission' checks to the project overview and
access_and_security panels to only enable them if compute is enabled;
adds permission checks on compute and image to the admin overview
and metadef panels; disables 'modify quota' and 'view usage' project
actions; disables 'update defaults' if there are no quotas available.
The 'access and security' panel still appears (under Compute) but
tabs other than the keystone endpoint and RC download tab are hidden.
Closes-Bug: #1580116
Change-Id: I1b2ddee0395ad9f55692111604b31618c4eaf69e
Same as a project list on header area, hide project switch menu
in project list page when project is disabled.
Change-Id: I9e8d893cf6e89f4c5c32d5e3e687977ef3000631
Closes-bug: #1562488
This patch supports using domain scoped tokens against keystone v3.
Use Cases:
Cloud Admin - view and manage identity resources across domains
Domain Admin - view and manage identity resources in the domain logged in
User - view identity project in the domain logged in
Regression:
Supports keystone v2 through local_settings.py configuration
Supports keystone v3 with multidomain = False
Supports keystone v3 with mulitdomain = True
Relates to https://review.openstack.org/#/c/141153/
Background on how to test is here
https://wiki.openstack.org/wiki/Horizon/DomainWorkFlow
Co-Authored-By: Brad Pokorny <Brad_Pokorny@symantec.com>
Co-Authored-By: Brian Tully <brian.tully@hp.com>
Co-Authored-By: Michael Hagedorn <mike.hagedorn@hp.com>
Co-Authored-By: woomatt <matt.wood@hp.com>
Partially Implements: blueprint domain-scoped-tokens
Closes-Bug: #1413851
Change-Id: Iaa19bfef9b0c70304ff81d083c62b218b2d02479
This change does a policy check for each row, to determine if
the link should be displayed or not.
Change-Id: Ia07c88216cdeb81c87da5c813bafb85e43c58e14
Closes-Bug: #1494548
Closes-Bug: #1418246
The caching is done only per process, so the cleanup during logout
does not really work since the during could be handled by another
process. So the cache will just keep on growing.
Change-Id: I793fbee44eb5f9befc316efe6716971b0e32172b
Partial-Bug: #1451943
This patch add the detail page for the "Projects" (Identity -> Projects)
table/resource. So when user clicks on the project name, it will show
the drill down details to the end user.
Change-Id: I00589f139570758f5645e7862de36487ca844b34
Closes-bug: #1380600
Disabling user's current project is like shooting yourself in the foot
- once it's done, it's irreversible in the current tenant because it's
no longer possible to edit any Project/User/etc. Thus it is forbidden
both when using Edit Project modal or when inline-editing the
corresponding cell at Projects table.
Closes-Bug: #1398331
Change-Id: Iacca383f1d982a9b16c41c9f945fdcdde9f803a1
Use function for clean cache (from openstack_auth), after project
members were changed(for project cache is invalidated).
Now, in the header bar, show only active projects.
Change-Id: Ia2561b591b4f3de29a14aaa4b666b16fc1d4cec8
Closes-Bug: #1393659
Change "Modify Users" to "Manage Members" in the Project, Group and
Domain Panels in-row Actions. This allows us to be consistent with the
tab headings in both panels.
Change-Id: I7f99624efe623d3cb7fe5861c9cd8ceab8ca3661
Closes-bug: #1398224
In the context selection dropdown, there is currently an always disabled
link to do more advanced filtering. The original intent was to open a
modal to do more advanced context selection. With the use of RBAC in a
previous bp, the Identity->Projects panel is always accessible. This
panel provides the entire project list for the user. We can just use
this to provide the larger project list to select from.
Change-Id: I0d6674e75785206f3be48c8bf004a29906bb6860
Closes-Bug: #1382650
Moving identity panels to their own dashboard.
RBAC is now used to determine the data to load in the identity
dashboard. Using the default policy file, a user with role member
will now be able to see their project list.
Also, adding a policy check mechanism at the panel and dashboard
level to determine which panels and dashboards the user can access.
Implements blueprint separate-identity-dash
Change-Id: I7ebfec2bf6e44899bec79d3b23c90d56a976200f