Commit Graph

140 Commits

Author SHA1 Message Date
Akihiro Motoki a0a85dd176 Fix tempest and pep8 tests
Fix tempest jobs to properly use tempest-horizon as tempest-plugin in
job configuration.

Flake8 3.8.0 fixed a few bugs so that additional issues are marked, fix
these.

Co-Authored-By: Andreas Jaeger <aj@suse.com>
Change-Id: I2aca3286ea2cc1ade567087786781952489d6efa
2020-05-12 18:49:34 +02:00
白子玉 3f7fc68085 Changed default identity url to horizon
The keystone doesn't use 5000 port anymore from Newton version. And all
 the references should be changed together.

Change-Id: I3f02686ab5b3abf48f129fde92e90427ca148317
2019-12-06 18:41:38 +08:00
Akihiro Motoki 7e95e1601f Move default values defined in settings.py to defaults.py
Some remaining default values of openstack_dashboard are still defined
in settings.py. This commit moves them to openstack_dashboard/defaults.py.
If the default values are same as those defined in horizon,
they are just dropped.

Part of blueprint ini-based-configuration
Change-Id: I723a8f9064450972d4510ac9e8b423f3041d1cac
2019-09-12 15:05:56 +09:00
Akihiro Motoki 2f1e1899d3 Define default settings explicitly (openstack_dashboard 5/5)
This commit mainly covers settings in the remaining files
under openstack_dashboard.

Note that HORIZON_CONFIG, horizon and openstack_auth are not covered.
They will be covered by follow-up patches.

Part of blueprint ini-based-configuration
Change-Id: Ibd70e030445a073d9a62da9867850f4893135a89
2019-07-08 18:20:32 +09:00
Akihiro Motoki fcdc67b819 Define default settings explicitly (openstack_dashboard 3/5)
This commit mainly covers settings
in openstack_dashboard/dashboards/project/.

Part of blueprint ini-based-configuration
Change-Id: I22413d2fe20576a507634dc4e2d0354c7db8800a
2019-07-03 14:54:16 +09:00
Zuul acc36f4958 Merge "Define default settings explicitly (openstack_dashboard 1/5)" 2019-05-29 17:38:13 +00:00
Akihiro Motoki 431fd6c16b Drop cinder consistency group support
Cinder consistency group has been replaced by the generic group feature.
Horizon support of the generic group (in the project dashboard) is
available since Rocky release and it covers all existing support
for consistency group in horizon.

The consistency group support is horizon was marked as deprecated
in Stein release [1].

This commit drops the consistency group support.

[1] https://review.openstack.org/#/c/626846/

Change-Id: I11187d2b03b7e0033a6c6ba3f8be25b8b5e4dd74
2019-05-03 18:16:23 +00:00
Akihiro Motoki 9c19b07a26 Define default settings explicitly (openstack_dashboard 1/5)
Currently horizon defines default values of settings in the logic
using getattr(settings, <setting name>, <default value>) and
it is not easy to handle the default values of available settings.

This commit starts the effort to define default settings explicitly.
This is a preparation for ini-based-configurations.

It covers settings in openstack_dashboard/api.

Part of blueprint ini-based-configuration
Change-Id: Id4c3287f0a572fd14ea93b54bcab8fabda39e583
2019-04-24 02:32:47 +09:00
Zuul 188fd6dc19 Merge "Add RBAC policies feature to horizon dashboard" 2019-01-04 16:27:14 +00:00
shutingm d65ebe2054 Add RBAC policies feature to horizon dashboard
Add RBAC Policies panel to support Role-Based Access Control
functionality.

Implements: blueprint rbac-policies
Change-Id: I883ad629d735dadf49e8bf9c50475050fdfcf797
2019-01-02 17:05:07 +08:00
Akihiro Motoki 372b75c222 Do not load openstack_dashboard.settings in unit tests
The previous behavior depends on different values for
SELECTABLE_THEMES and it seems this is the reason that test_themes
imported openstack_dashboard.settings.
If we override a value in django.conf.settings, we can use
override_settings decorator. This commit uses it and
we can now avoid importing openstack_dashboard.settings in UT.

Change-Id: Id1b7b7e431b86e725ad897613ca38f423a67e52d
Closes-Bug: #1809842
2018-12-28 23:06:38 +09:00
Akihiro Motoki 32d463a298 Generic volume group support
This commit adds cinder generic group support.
Consistency group support are not shown if the generic group
support is available.

blueprint cinder-generic-volume-groups
Change-Id: I038eeaf2508926f18b6053db0082a8aa3f3e20c6
2018-06-09 06:39:18 +00:00
Ivan Kolodyazhny ee95bf15d9 Fix selenuim-headless tests
This patch leave selenuim-headless non-voting since it was broken for a
while so we should be sure that it's stable enough.

Related blueprint: improve-horizon-testing
Change-Id: Ic2a877a4eefc2f10fb25e64c387b81fc18302a2a
2018-06-08 12:22:10 +00:00
Ivan Kolodyazhny 1f80d94459 Use default Django test runner instead of nose
Nose has been in maintenance mode for the past several years. It has
issue with exit code [1] which leads to false positive results for our
seleniun-headless job.

This patch changes test runner for Horizon tests and does the following
things:

* Django test runner  executes test in a different order than Nose does.
  That's why we've got an issue with side-effect in
  horizon.tests.unit.tables.test_tables.MyToggleAction class. This patch
  adds workaround to it.
* Rename filename of test files to names starting with 'test_'
  so that the django test runner can find tests expectedly.
* '--with-html-output' option is temporary dropped and will be added in
  a following patch.
* Integraion tests is marked via django.test.tag mechanism which is
  introduced in Django 1.10
* 'selenium-headless' is broken now because we don't have geckodriver on
  gates, this patch makes it non-voting.
* 'tox -e cover' is fixed
* Remove @memorized decorator from
  dashboards.project.images.images.tables.filter_tenant_ids function.

[1] https://github.com/nose-devs/nose/issues/984

Depends-On: https://review.openstack.org/572095
Depends-On: https://review.openstack.org/572124
Depends-On: https://review.openstack.org/572390
Depends-On: https://review.openstack.org/572391

Related blueprint: improve-horizon-testing
Change-Id: I7fb2fd7dd40f301ea822154b9809a9a07610c507
2018-06-08 15:21:12 +03:00
Zuul 10f51dfb74 Merge "Add support for application credentials" 2018-04-26 12:40:11 +00:00
Colleen Murphy 2d69444bad Add support for application credentials
This patch adds support for creating application credentials in
keystone[1]. Application credentials can be created by any user for
themselves. An application credential is created for the currently
selected project. A user may provide their own secret for the application
credential, or may allow keystone to generate a secret for them. After
the application credential is created, the secret is revealed once to
the user. At that point they may download a clouds.yaml or openrc file
that contains the application credential secret and will enable them to
use it to authenticate. The secret is not revealed again.

[1] https://docs.openstack.org/keystone/latest/user/application_credentials.html

bp application-credentials

Depends-On: https://review.openstack.org/557927
Depends-On: https://review.openstack.org/557932
Change-Id: Ida2e836cf81d2b96e0b66afed29a900c312223a4
2018-04-26 09:32:00 +02:00
Akihiro Motoki f0f028ca35 Fix E402 warnings
E402 module level import not at top of file

Change-Id: Ia8425ffe5b1325d00ae482d99b6764fd0fcbf822
2018-04-11 18:57:28 +09:00
Akihiro Motoki 71993e3c98 Drop deprecated settings
- HORIZON_IMAGES_ALLOW_UPLOAD (deprecated in Newton)
- CUSTOM_THEME_PATH (deprecated in Mitaka)
- DEFAULT_THEME_PATH (deprecated in Mitaka)
- OPENSTACK_TOKEN_HASH_ENABLED (deprecated in Mitaka)
- TOKEN_DELETION_DISABLED
  (not documented but it was marked as deprecated in Ocata
   in django-openstack-auth commit 5810f9c6)

The related logics related to dropped deprecated settings
have been dropped too.

- custom_path and default_path of get_available_themes() were
  dropped as they are no longer needed in favor of
  the removal of CUSTOM_THEME_PATH and DEFAULT_THEME_PATH.
- Unused remove_project_cache(), is_token_deletion_disabled()
  and delete_token() have been dropped.

Change-Id: Ic9406623cc092884c4136f78fb967b129bfda487
2018-03-23 18:37:02 +09:00
Akihiro Motoki 64b67ac9e9 Update the doc links to the newest ones
The docstring of getExtensions service in cinder.service.js
was a copy from nova service and not correct. The docstring was
updated based on the current cinder v2 API.

Thanks to a recent improvement in reno, touching release notes
in older releases in the master branch no longer polute the rendered
release notes. Changing URLs (or other things) in the master branch
does not affect the rendered release notes, but updating URLs to the
latest would help avoiding mechanical patches of updating links :)

Change-Id: I2aec3adeb400323d42a3a5083f8bc0798eeff917
2018-03-20 16:22:05 +09:00
Zuul da089052b0 Merge "Add angular server groups panel" 2018-03-16 14:15:29 +00:00
wei.ying ce283b4a31 Add angular server groups panel
This patch adds angular server groups panel under the
project->compute panel group.

To be added in subsequent patches:
 - Create Action
 - Delete Action
 - Detais

To view the server groups panel only the 'ServerGroups' nova API
extension is available.

Change-Id: Ide9f54439c52cce9642c2dd417f9e7a8ad98e846
Implements: blueprint ng-server-groups
2018-03-10 17:29:41 +08:00
Akihiro Motoki d936ba4c31 Suppress unnecessary logging output in UTs
Change-Id: I2e36cc3401f406535dce24f0759a2ba402ca71f6
2018-03-03 07:33:23 +09:00
David Gutman 3f585d3b1e Views accessible via url even if user doesn't match policy rules
When a user doesn't match the policy rules of a panel then the panel tab
is removed from the menu of the left, but panel views are still
accessible using directly the url (ex /admin/flavors/).

In most of the case, views won't work correctly because of the lack of
right in the backend, but it may cause trouble when you play with
policies.

I think it could be more elegant to return directly a "You are not
authorized to access this page" from the frontend when user try to
access a view of a panel (via url) without matching the policy rules.

Change-Id: I7bc93fed29568adfc14d5bcadfc8728d3b5cf633
Closes-Bug: #1741051
2018-02-02 21:24:33 +09:00
Lajos Katona aa669f0d02 Trunks panel: admin panel
Enable admin panel for trunks. For the admin panel the delete action and
the readonly operations are enabled (table view and details view).

Change-Id: Icfc01612cc60798e4b0ff7379a9c8b83d3f1d60b
Implements: blueprint neutron-trunk-ui
2018-01-29 20:24:05 +01:00
Akihiro Motoki cd49510878 Updating default keystone API verson to 3
The keystone API version 3 has become the default API version
for a long time and our CI already uses keystone v3 API only.

In addition, our documentation recommended to use the cached session,
so switching the default API version to 3 does not hit the limitation
on the maximum size of session data when using the cookie-based
sessions.

This is based on django_opensatck_auth review
https://review.openstack.org/#/c/158384/

Implements blueprint: default-keystone-api-3
Change-Id: I79e9fbd3567cc69468694dbf043fecf422347c7e
2017-12-21 03:24:07 +09:00
Diana Whitten 958e522d40 Added SELECTABLE_THEMES setting
Currently themes machinery works in such way that if we rely on
default theme in our branded theme, we have to include them both into
AVAILABLE_THEMES setting, otherwise default theme assets will be
unavailable and the branded theme assets compilation will fail. On
the other hand, mentioning them both leads to theme picker being
shown - which we would like to avoid (per marketing wish).

SELECTABLE_THEMES setting was added to allow limiting the user facing
themes by configuration.

Closes-bug: #1564543
Co-Authored-By: Ivan Kolodyazhny <e0ne@e0ne.info>

Change-Id: Ic00a9201d2d352685b1089a37a25987b75d6636d
2017-07-26 11:52:35 +01:00
Akihiro Motoki 385870317a Split out FWaaS dashboard
Implement blueprint split-out-neutron-xaas-dashboards
Change-Id: Ieaca88dbe28cc2330d9b333082ff7e92c91e8639
2017-06-27 14:20:03 +00:00
Akihiro Motoki 1d6a217da1 Split out VPNaaS dashboard
Implement blueprint split-out-neutron-xaas-dashboards
Change-Id: Ib304ddef381d80011f7030fdd5049aab0e901ae6
2017-06-27 14:20:03 +00:00
Jenkins 41d6a5352e Merge "HTML test report only when nosehtmloutput is installed" 2017-06-13 17:48:48 +00:00
Akihiro Motoki 4ab2877d1f HTML test report only when nosehtmloutput is installed
Most horizon plugins import openstack_dashboard.test.settings
in their test settings, but they do not necessarily have nosehtmloutput
in test-reqs. Assuming nosehtmloutput potentially breaks plugins tests,
we check the availability of htmloutput module (from nosehtmloutput)
and specify --with-html-output option if available.

Change-Id: I62502d28c75f823c47edb9de83932363cc2be99f
Closes-Bug: #1697731
2017-06-13 16:53:06 +00:00
Beth Elwell 12fe351823 Adds basic angular QoS panel to Horizon
This patch adds the QoS panel which displays Neutron QoS policies.
This patch allows read only view of the policies, displaying the name,
id, description and shared status of each policy. Policy actions and
rules to be added in follow-up patches.

To test:
Neutron's QoS plugin must be enabled in your setup.
To enable the QoS plugin in devstack please add the following lines
in the local.conf

    enable_plugin neutron git://git.openstack.org/openstack/neutron
    enable_service q-qos

and rebuild your stack (./stack.sh).

Create some qos policies via CLI (neutron qos-policy-create policy1).
now you can list the policies using this patch.

Based on initial commit: https://review.openstack.org/#/c/247997
Co-Authored-By: Masco <mkaliyam@redhat.com>
Co-Authored-By: Rob Cresswell <robert.cresswell@outlook.com>

Change-Id: If46aeb04879d91a1a9305a94a23cecea2041d378
Implements: blueprint network-bandwidth-limiting-qos
2017-06-13 16:36:29 +01:00
Jenkins e3720c6d8b Merge "Generate unit test HTML reports" 2017-06-13 11:09:52 +00:00
Jenkins 29943d5e85 Merge "hacking: Specify white list rules in noqa explicity" 2017-05-29 15:10:51 +00:00
Akihiro Motoki 5273c27a75 hacking: Specify white list rules in noqa explicity
If 'noqa' is specified all hacking checks are disabled.
It is better to ignore specific rules explicitly rather than
ignoring all. The recent flake8 supports this [1].

[1] http://flake8.pycqa.org/en/latest/user/ignoring-errors.html

Change-Id: I74246adb4d1d2613c2703cf519428b64d00e59bb
2017-05-24 03:03:41 +00:00
Lajos Katona 3524b3d4f7 New readonly panel for trunks
Enable display of trunks on the project dashboard.

To test it devstack needs to have neutron with trunk support, eg:

 local.conf:
 enable_plugin neutron https://git.openstack.org/openstack/neutron
 enable_service q-trunk

No special horizon config is needed. As long as the 'trunk'
API extension is available (openstack extension show trunk)
the panel should automatically appear under Project/Network/Trunks.

Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Co-Authored-By: Bence Romsics <bence.romsics@ericsson.com>
Change-Id: Iacb83f22f81e09457953622e61065f0bb2c27407
Partially-Implements: blueprint neutron-trunk-ui
2017-05-24 02:34:33 +00:00
Akihiro Motoki 65951cf1b9 Generate unit test HTML reports
Currently we need to check unit test results by opening console.html.
HTML reports would be nice for this purpose.

Note that the infra CI post script stores '*nose_results.html',
so the filenames need to end with 'nose_results.html'.

--with-html-output option is not available for python 3. I am not sure
the reason at now, but I think it is worth enabling it for python 2.

Change-Id: Icea8d21d0cf93f99f577e6609e9ced166a55609a
2017-05-04 07:23:40 +00:00
Akihiro Motoki b0a5f30248 Testing: mock add_panel_mocks() more flexible
Tis commit enhances openstack_dashboard.test.helpers.TestCase
.add_panel_mocks() method to more flexible way.
Now the mock definitions are defined in the test settings and
setUp() in unit tests and selenium tests sets up mocks defined in
the test settings TEST_GLOBAL_MOCKS_ON_PANELS.

This is a preparation for drop of deprecated options (enable_firewall
and enable_vpn). They were marked as deprecated long ago, but they are
still kept just because we need a lot of changes in unit tests if dropped.
By this change, we no longer need to use settings just for testing.

enable_firewall/enable_vpn=False are dropped (default is True)
to confirm this change works well.

Related-Bug: #1687185
Change-Id: I0a5ebcf8d75e704420d3a5af46fde268a59aa9ec
2017-04-29 11:50:43 +00:00
Rob Cresswell a8f17150bf Remove all remaining vendor specific code
There's some vendor specific code still lingering from several cycles
ago. This patch removes all usage of it, all related tests, and all
default settings.

Implements: blueprint horizon-vendor-split
Change-Id: Ic0bb84f547b07b130480e587bd365f6e7805dfb5
2017-03-22 20:23:12 +00:00
chen.qiaomin@99cloud.net 001c2a1879 Adding identity ng-roles panel
This patch adds an angular roles table.

To be added in subsequent patches:
 - Actions
 - filterFacets
 - Integration to Searchlight

To test, v3 needs to be enabled in local_settings.py and
 set 'roles_panel' to True in settings.py

Change-Id: Ie0eb168774f15536c778917abeb293e79d3b34e8
Co-Authored-By: Allen <chen.qiaomin@99cloud.net>
Co-Authored-By: kenji-i <ken-ishii@sx.jp.nec.com>
Co-Authored-By: Richard Jones <r1chardj0n3s@gmail.com>
Partially-implements: blueprint ng-roles
2017-01-04 11:54:59 -08:00
Timur Sufiev 4ceeef5376 Add the Profiler panel to the Developer dashboard
Provide both pythonic Django part and the static assets (angular
directives and styles) for the new panel.

DEPLOY NOTES:

To enable panel itself, copy
openstack_dashboard/local/local_settings.d/_9030_profiler_settings.py.example
file from the previous commit to
openstack_dashboard/local/local_settings.d/_9030_profiler_settings.py
and copy openstack_dashboard/contrib/developer/enabled/_9030_profiler.py
to openstack_dashboard/local/enabled/_9030_profiler.py

To support storing profiler data on server-side, MongoDB cluster needs
to be installed on Devstack host (default configuration), see
https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/#install-mongodb-community-edition
for instructions. Then, change net:bindIp: key to 0.0.0.0 inside
/etc/mongod.conf and invoke `sudo service mongod restart` for the
changes to have an effect.

Implements-blueprint: openstack-profiler-at-developer-dashboard
Change-Id: Ice7b8b4b4decad2c45a9edef3f3c4cc2ff759de4
2016-12-01 22:29:16 +03:00
Jenkins a340ca2402 Merge "Removing deprecated Swift UI code" 2016-11-24 07:55:17 +00:00
Rob Cresswell df68cfad4a Remove local/enabled from test settings
Change-Id: I46e4c6c70b212e1389e126c35f756b4f0cf6959c
Closes-Bug: 1639876
2016-11-22 13:59:46 +00:00
David Lyle 9f75312b07 Removing deprecated Swift UI code
The move to the angularJS based UI for swift as the default occurred
two releases ago in Mitaka. This patch removes the dead code.

Change-Id: I0322808aeacab5406c0dd3f4b19bed50bc0ff089
2016-11-17 16:00:00 -07:00
Jenkins 22b71f7c26 Merge "Drop LBaaS v1 dashboard" 2016-11-10 15:50:45 +00:00
Jenkins d6beeb370a Merge "Fix logspam in django 1.9 and django 1.10 tests" 2016-11-09 00:43:08 +00:00
Akihiro Motoki 7e64a1cef1 Drop LBaaS v1 dashboard
LBaaS v1 feature was removed from neutron-lbaas in Newton.
There is no reason we have LBaaS v1 dashboard in Ocata or later.

Change-Id: Ic7d4ceea1943c3721500ce4b7f769b9dba28a359
Closes-Bug: #1624655
2016-10-18 08:57:26 +09:00
Jenkins 06c4bc80a7 Merge "Flavors panel can switch to Angular" 2016-10-14 20:13:13 +00:00
Jenkins 4c3798a996 Merge "add ploop type to the list of image backends" 2016-10-13 06:11:47 +00:00
Matt Borland e8e84c2db4 Flavors panel can switch to Angular
This patch enables all of the features for the Flavors panel to use Angular but
disables it, so that it is easy to switch on/off.

Note that we add integration test switches since it can't read the Django
conf.

Note that I changed the common tests to allow for testing of api calls that
don't produce error toasts, because we needed better branch coverage, and
the deleteFlavor api wasn't fully branch-tested.

Change-Id: I92b1b57bd486e5eb87179cb8d44b7551e9de2e0f
Partially-Implements: blueprint ng-flavors
2016-10-11 15:49:55 -07:00
Maxim Nestratov 142cfab720 add ploop type to the list of image backends
Ploop is a disk loopback block device, which is used by OpenVZ/Virtuozzo
containers, described here: https://openvz.org/Ploop
This type of backend is supported since Virtuozzo support was added in
Kilo release. Implemented as a part of
https://blueprints.launchpad.net/nova/+spec/pcs-support
then pcs was renamed to virtuozzo
https://blueprints.launchpad.net/nova/+spec/rename-pcs-to-virtuozzo

Change-Id: Ica7852f8b5d45938b66ae7ef71b4713eb2dd2a3c
2016-10-06 19:30:10 +03:00