Commit Graph

36 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
Brian Rosmaita b58ac2894b Drop cinder v2 API support
Cinder v2 API is deprecated since pike release. Along with the removal
of cinder v2 API support in cinderclient (change I335db5c1799e drops
v2 support), this commit drops cinder v2 support in horizon.

The next release of python-cinderclient drops v2 support,
so horizon needs to use v3 classes.

Includes a workaround in unit tests for two cinderclient.v3 classes
that are missing in the cinderclient releases prior to 8.0.0.  The
workaround can be removed once cinderclient change I335db5c1799edb2
is merged and released.

Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: Iab0f097fab6696462572dc6ea53767c91e5411b1
2021-07-19 08:00:58 -04:00
Robin Cernin 31f7fc6bb2 Deprecate exceptions.check_message
exceptions.handle() is used in most cases consistently.
check_message() is a legacy which was introduced when exceptions
were not well classified. exceptions.handle() should cover all
common error scenarios and there is no role played by check_messages().
Let's clean up its usage and deprecate it for the future removal.

Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: I545b6c666d13d39cf5287ccc7c972dc746faf2fb
Closes-Bug: #1339885
2019-12-23 20:12:30 +09:00
Akihiro Motoki e750c9d060 admin info: check required service for network tab
Previously the network tab of Admin Info panel did not check
the availability of the network service.

Change-Id: I3117b00762a0257f67a34af89ac65f82d4e563ee
Closes-Bug: #1791296
2018-09-08 19:00:20 +00:00
Ivan Kolodyazhny a774fa30dd Use Cinder API v3 by default
Cinder API v3 was introduced several releases ago and is backward
compatible with API v2 so it's safe to swith to use it.

Change-Id: I550e6c59bb14c17da78d7b2abcde5783b2b6825d
Closes-Bug: #1728761
2017-12-18 15:34:41 +02:00
Akihiro Motoki eac3e7032a Drop Heat related code from horizon
Orchestration tab in the admin info panel needs a discussion.
It seems not to be covered by heat-dashboard yet.

blueprint heat-dashboard-split-out

Change-Id: I56e6edb1f2ac72e2f42d0e9f3291308e67f24cad
2017-12-05 07:38:55 +00:00
Béla Vancsics 2e738b23df Remove unused variable
TrivialFix

Change-Id: I2f5ab522f66015704238bcc4a58608edf17805a6
2017-03-08 09:05:56 +01:00
Huachao Mao dbe502042f fix some pylint warnings
Change-Id: I65c5111fe3466ab250473546a951d2c86b130131
2016-12-22 07:17:13 +08:00
eric 5934d83b04 Improve system info page
This change adds region info and all the url types,
and also removes enabled (which never did anything).

Change-Id: I7594d2b3d1e9826ec66bac379059171150155c4b
Closes-bug: #1497448
2016-05-26 15:52:38 +00:00
IWAMOTO Toshihiro 2e59431227 Look for volumev2 endpoints instead of volume
Volumes tabs should be enabled when volumev2 endpoint is registered.
Currently, Horizon considers no volume service is running if there
is no V1 endpoint, which doesn't make sense as Horizon no longer
supports the cinder V1 protocol.

Co-Authored-By: itxaka <itxaka@redhat.com>
Change-Id: I35d821eedb75f73f9330ed11f921694104eed0c6
Closes-Bug: 1415712
2016-02-23 11:47:25 +01:00
jingliuqing 564d912e69 Refactor the admin tabs code
Partial-Bug: #1475119
Change-Id: I3329a09fee2b472ac50bd409e3c5613926d1e39f
2015-07-16 03:57:17 +00:00
Kanagaraj Manickam d34fe26cf8 Add orchestration service status reporting
System Information panel is updated with new tab called
Orchestration Services to report the heat engines status.

Implements blueprint heat-engine-status-report

Change-Id: Ibb6985c74dfb0b23a5ef94febde127a673ab0e38
2015-02-25 00:23:36 +05:30
Sergio Cazzolato b2dd9ded59 Revert "Remove the update default quotas feature"
This reverts commit ed586a0355.

The quota_class subcommand in python-novaclient was used to set default
quota values so it shouldn't have been removed. As now it is being
restored, the defaults quota panel is being restored too.

Related mailing list thread on the topic:
http://lists.openstack.org/pipermail/openstack-dev/2014-May/035383.html

Resolved merge conflicts by hand in:
openstack_dashboard/api/cinder.py
openstack_dashboard/dashboards/admin/info/tabs.py
openstack_dashboard/dashboards/admin/info/tests.py

Updated translatable segments to match refactors in
openstack_dashboard/dashboards/admin/defaults/workflows.py
openstack_dashboard/dashboards/admin/defaults/tables.py

Fixed most egregious post-merge styling errors in
openstack_dashboard/dashboards/admin/defaults/templates/defaults/index.html
(probably should have been separate, but I just couldn't let it out that way!)

Removed unrelated file that was allowed to be part of the original commit
doc/source/topics/settings.rst

Co-Authored-By: Doug Fish <drfish@us.ibm.com>
Change-Id: Ic4c4ecec843c7ea9afd0db36ce0eb15952da15b3
Partial-Bug: #1299517
2014-09-30 18:12:02 +09:00
Radomir Dopieralski 0eca7449cc Fix Flake8 style warnings in openstack_dashboard/
Warnings H904, H307 and H405 are new or considerably changed, and will
be fixed in a separate patch.

Closes-bug: #1349820
Partial-bug: #1347472

Change-Id: I4fd28990dacf16f03a4eaa6074ef59c37f1a2c14
2014-07-30 14:13:24 +02:00
Akihiro Motoki cc25bd6026 Remove per-feature extension check method in api/neutron
Change-Id: Ie1309d5a51e86a37c640e169d66c73724fc1c9ff
Closes-Bug: #1348075
2014-07-25 01:45:55 +09:00
Justin Pomeroy 407c17b38a Tolerate service catalog and endpoint connection errors
This is a fix for the issues encountered when a service is not
configured or a service endpoint is not reachable. This fix
will add tolerance for these errors so that an error message is
displayed but the dashboard page will still load, not an error page.
This makes it easier for the user to recover by allowing them to
go to a different page, select a different region, or logout. This
makes sense in many cases such as when a region only contains an
image service endpoint, or when a single endpoint is not reachable
for whatever reason.

It also adds permissions to the panels that require compute or
image services so that the dashboard will not display them if
the service is not configured.

To test these changes you will need to set up your keystone service
catalog so that not all services are available in all regions, or
some of the service endpoints are not reachable.

Change-Id: Ie04699d1fb1d4db13a7f4dcf1bdfd23bf21aab80
Closes-Bug: 1323811
Closes-Bug: 1207636
2014-07-21 08:38:53 -05:00
Nachi Ueno 5179d99800 Check neutron agent extension support in Info page
Some neutron plugin don't support agent extension, and
Horizon show 404 error on admin info page.
In this commit, we are going to add check if agent
extension supported or not.
Closes-bug: 1331032

Change-Id: I5cd3ec747c650fc2b826d55f39be618eca1b7caa
2014-06-25 18:15:37 +00:00
Santiago Baldassin 03ed6e1ad1 Display cinder services in System Info
This change includes cinder services in the system info
panel so that users can check which are the cinder services
and their status

Implements: blueprint cinder-service-list
Co-Authored-By: Leandro Costantino <leandro.i.costantino@intel.com>
Change-Id: Ic3594621ff956ef5aa76fb6617b5339f56015248
2014-06-05 15:23:09 -03:00
Sergio Cazzolato ed586a0355 Remove the update default quotas feature
The default quota panel has been moved to a tab in the system
info panel.
The update default quotas feature has been removed.
The cinder quota-class methods have been removed to keep consistency.
The test cases and the apis for nova and cinder have been modified
according the change.

This change is done to support the change:
I1110022d6f628d03aaf363da707f2d2ef1600437

Change-Id: I193c7209d9681b6d69afe0d996153ac86850d243
Closes-Bug: #1292589
2014-03-26 12:19:21 -03:00
Facundo Farias ed1525bc91 Host aggregates panel.
On this panel, aggregates could be added, deleted and edited.
This patch takes the aggregates panel out of System Info and
puts it back in the main admin panel list, as now, aggregates
are not static information. The host can be associated to a
host aggregate on this panel as well.

Change-Id: I4ef2d87c33981db36d4ebd3de2f4841cdfa9dbfd
Closes-Bug: #1261932
Implements: blueprint manage-host-aggregates
Co-Authored-By: Santiago Baldassin <santiago.b.baldassin@intel.com>
Co-Authored-By: Alejandro Paredes <alejandro.e.paredes@intel.com>
2014-03-04 15:25:32 +00:00
Radomir Dopieralski 028332da4a Remove #noqa from most common imports and add them to import_exceptions
We have a lot of import with #noqa that is there to ignore h302,
because it's traditional to import and use a name directly, instead
of a whole module. This hides other errors and gives people the
impression that it's actually fine to import non-modules, you just
have to slap #noqa on those lines.

I went through the code and identified about a dozen names that are
most commonly imported this way. I remove the #noqa tag from them,
and added them to the list in import_exceptions.

I also removed a few unused imports that were revealed in the process.

Change-Id: I27afb8e2b1d4759ec974ded9464d8f010312ee78
2014-01-07 12:26:35 +01:00
Christian Berendt 240419544f added Network Agents to System Info panel
Added a new tab to the System Info panel showing all Network Agents.

fixes bug #1204375

Change-Id: I9c23105dde8528749275aba70065384dec354fb7
2013-09-03 14:03:08 +09:00
liyingjun 5f8e370f2d Allow admins to update default quotas
Add update default quotas form to edit the default quotas.

Move the editable default quotas tab to a new panel called
"Defaults".

Implements blueprint edit-default-quota

Change-Id: I6e3806226cd2f699f16b93c25e294bc67883738f
2013-08-29 23:18:08 +08:00
Tatiana Mazur 953d1b9793 Enable H302 check
This patch replaces some method imports with module imports and
makes H302 test enabled.

Fixes bug 1188531

Change-Id: Ibfbddeaa19cbbb244da58ffd5c918c41f03a0c65
2013-08-22 17:39:09 +04:00
Gabriel Hurley c4ac732aa9 Adds availability zone info to System Info panel
Also moves the host aggregates data into System Info panel
because it's exactly the type of static information that
belongs there, and it reduces a significant amount of
boilerplate.

Incidentally adds a new table feature to make listing
out unordered lists of items easier.

Implements blueprint show-zone-for-admin

Change-Id: Id8fb5c9615b018135a5d90eaa82eb80ff63bb7dc
2013-08-19 23:13:10 -07:00
Julie Pichon 913ff38b6d Hide default Floating IPs quotas with Neutron
It is not possible to access the default quotas via an API for
Neutron. Remove the quota in that case for now, as it comes from Nova
and could cause confusion.

Partial-Bug: #1109140

Change-Id: If8df21b4ecbe541ce53790578820e22f36c32260
2013-08-14 00:01:01 +01:00
Kieran Spear 242c8df495 Enable H201: do not write "except:"
Fixes all occurrences of this. We have a custom exception handler
in Horizon anyway that only catches ClientException in most of these
cases, but this commit lets us gate on the other cases.

Change-Id: Iea3dc13817f3e5b775b2024424bf3a906da5584b
Closes-Bug: #1211657
2013-08-13 17:21:32 +10:00
Christian Berendt 699926413c added Compute Services to System Info panel
Added a new tab to the System Info panel showing all Compute Services.

fixes bug #1198247

Change-Id: I7389652cff37a1282cff48c919ab36b645fbee88
2013-07-24 09:33:24 +02:00
Tatiana Mazur 3087c3486b Enable H304 check
This patch replaces relative imports with full paths and
makes H304 test enabled.

Fixes bug 1188535

Change-Id: I47254cf9a790727102f7993d0fd107da514983df
2013-07-16 18:49:56 +04:00
David Lyle 917591428e Region selector enabling multi-region support.
This patch adds a region selector dropdown
at the top of both the Project and Admin dashboards if
more than one region is available in the user's service
catalog.  The user is allowed to choose from any region
available in the service catalog. By selecting a region,
the user is limited to accessing endpoints in that
region only as long as the go through api.base.url_for

If there are more than one endpoint for a service in a
region the first in the catalog is returned.  Further
work on the blueprint will handle that complexity.

Supporting Keystone v2.0 and v3 catalog formats.

Partially implements blueprint multiple-service-endpoints

Change-Id: I1ab6539c7c5f4b1ae4b1716059370e86b6ca4d2e
2013-06-20 14:01:10 -06:00
Matthias Runge cea720e793 Sort imports alphabetically
This patch also re-organizes imports to import one per line.

Change-Id: Ia958e3a30a48d4308d08d51df243c1272425c316
Fixes: bug 1188529
Fixes: bug 1188537
2013-06-14 12:05:55 +02:00
Matthias Runge 4ac70a732a remove unused imports
In the move to make flake8 tests stricter, we need a code
cleanup earlier.
This removes all unused imports and also enables tests to prevent
them for the future.

This patch also includes the checks on __init__.py files.

Change-Id: I34055803f7c4726682ac6fb95cc5b50ba761fec8
Fixes: bug 1188134
2013-06-13 07:51:10 +02:00
Kieran Spear 1935a3d8d2 Check if volume service is enabled in quota update
Quotas fail to load on the project quota update form in the
admin dashboard when the volume service is disabled.

Change the get_default_quota_data and get_tenant_quota_data functions
to always check for a disabled volume service, so we don't have to
remember to do it every time we call the functions.

Moved *QUOTA_FIELDS to usage/quotas.py to avoid a circular import.

Fixes bug #1155878.

Change-Id: I7150c4d7c318b6199ff03825cf5d770c7741b379
2013-03-19 12:06:16 +11:00
Wu Wenxiang e765f4e588 Reduce duplicate definitions about quota sets
Use unified definitions of "quota sets" instead of dispersed
    duplicated definitions.

Change-Id: I7de5bd77d187e7353c154ea89a8b259c309f0faa
2013-03-18 22:06:20 +08:00
Matthias Runge 24367e6cea Avoid cinder calls, when cinder is unavailable
When a volume service is not available, then a cinder client can not
be created. This patch skips the calls, so that dashboard doesn't
break any more.

Change-Id: Ic5d029302d10b453257b452ba78541febf8e4c96
Fixes bug 1084137
2012-12-12 09:59:01 +01:00
Gabriel Hurley 2f98befe3f Reworks quotas and services panels into System Info panel.
This is a step towards combining all the "read only" data about
an OpenStack cloud into one place for admin inspection.

Implements blueprint system-info-panel.

Change-Id: I2dc52a855c1c8a488fb9c66b82e0faca765b3812
2012-11-17 15:49:17 -08:00