Commit Graph

451 Commits

Author SHA1 Message Date
Radomir Dopieralski 1ea4f4d76f Add a setting for disabling dhcp agents column in the admin network view
Retrieving that information for every network can take considerable time
on large deployments with large number of networks, and for some kinds
of network drivers (ovn binary) this will be always zero anyways.

This setting lets us disable that column to speed up the networks view.

Change-Id: I1f1561916067d3f4a02f10ec9f62e8ba777a1501
2024-02-22 17:36:12 +01:00
manchandavishal 605a515ebc Drop Django 3.2 support
Django 3.2 support was dropped. Django 3.2 ends its extended support
in April 2024[1]. Considering this, horizon dropped Django 3.2 support
and used Django 4.2 as the default version of Django. It also updates
some references to Django 4.2 from Django 3.2 in the documentation.

[1] https://www.djangoproject.com/download/

Change-Id: I9fff310c5433cf96cdf0a2cd81d11a96c2a4a55b
2024-01-30 17:01:51 +05:30
Radomir Dopieralski caa99b2010 Switch to PyMemcacheCache backend
The new library is already supported in django 3.2 and gives us better
support for IPv6 addresses and encrypted connections.

Also, the same library is being used by all other OpenStack projects.

Depends-on: https://review.opendev.org/c/openstack/devstack/+/898302
Closes-Bug: #2039225
Change-Id: I964ac4d0d62dff4c1f7c1f1373763fbf23024269
2023-10-18 00:07:35 +09:00
Benjamin Lasseye cb74c8c08f Add TOTP support
This patch adds support for MFA TOTP on openstack dashboard.
A new configuration variable OPENSTACK_KEYSTONE_MFA_TOTP_ENABLED
was added false by default.
If enabled, users needing TOTP are prompted with a new form.
keystone doc: https://docs.openstack.org/keystone/latest/admin/auth-totp.html
Demonstration video : https://youtu.be/prDJJdFoMpM

Change-Id: I1047102a379c8a900a5e6840096bb671da4fd2ff
Blueprint: #totp-support
Closes-Bug: #2030477
2023-08-18 12:02:25 +00:00
Pedro Martins 1db1764749 Add NAT rules to the floating IP workflow
The floating IP workflow is now able to manage NAT
rules (portforwarding) if the floating IP is not
associated with any NICs (ports).

This patch is the one of a series of patches
to implement floating ip port forwarding with
port ranges.

The specification is defined in:
https://github.com/openstack/neutron-specs/blob/master/specs/wallaby/port-forwarding-port-ranges.rst

Implements: blueprint https://blueprints.launchpad.net/neutron/+spec/floatingips-portforwarding-ranges
Change-Id: Id715da6591124de45f41cc367bf39a6bfe190c9a
2023-03-01 10:38:16 -03:00
Andrey Kurilin c8ee8c1965 Fix applying OPENSTACK_SERVER_DEFAULT_USER_DATA value
The final revision of I86ac21bf82c1667135abd4f20fb4514da0899450 is buggy
and doesn't work.
This commit fixes it and adds a proper test.

Also, this commit updates the docs with a proper horizon version that
corresponds to Zed release (the feature was introduced before final Zed
cut so the author tried to guess the final release number).

Change-Id: Id921b69df13af3cc209236f0446d82dd30e4d8a2
2023-01-26 14:42:15 +01:00
Takashi Kajinami 9fa98969e7 Use OPENSTACK_ENDPOINT_TYPE by default
This is follow-up of I8438bedaf7cead452fc499e484d23690b48894d9 and
ensures the OPENSTACK_ENDPOINT_TYPE parameter is used when
OPENSTACK_KEYSTONE_ENDPOINT_TYPE is not set. This avoids backward-
incompatible change which affects deployments with endpoint type set
to non-default values.

Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: I94d2d3e31fc0103773fb5d3ed2f5f792e8851f78
2022-12-26 07:01:07 +09:00
Zuul 0add65eddc Merge "Add OPENSTACK_KEYSTONE_ENDPOINT_TYPE config opt" 2022-12-15 17:50:38 +00:00
Tobias Urdin b22a6d65f7 Add OPENSTACK_KEYSTONE_ENDPOINT_TYPE config opt
The [1] changed the previous behavior of Horizon by
changing the hardcoded internal endpoint type to using
OPENSTACK_ENDPOINT_TYPE so it's no longer possible to use
internal endpoint type for Keystone but public for others.

This adds the OPENSTACK_KEYSTONE_ENDPOINT_TYPE config opt
to set the endpoint type for Keystone when grabbing it from
the service catalog.

[1] https://review.opendev.org/c/openstack/horizon/+/730781

Change-Id: I8438bedaf7cead452fc499e484d23690b48894d9
2022-09-29 13:23:59 +00:00
Zuul 1a4d9e8025 Merge "Add cinder-user-facing messages for Backup" 2022-09-08 12:42:30 +00:00
Jesper Schmitz Mouridsen 20a571fdd2 Add cinder-user-facing messages for Backup
This patch adds a tab for cinder user messages for volume backups.
Cinder user messages show error details for cinder resources like if we
are unable to create a volume backup due to some failure in cinder it
will show us the reason for failure.
It also updates project and admin SnapshotDetailsTabs to use
DetailTabsGroup instead of TabGroup to improve top padding.
Also adds the fail_reason in the detail view, if backup errored.

Related-Bug https://bugs.launchpad.net/cinder/+bug/1978729

Change-Id: I4e639211043270e814fac489f915588af03f966a
2022-09-06 07:29:40 +00:00
Andrey Kurilin 3a2e82ab75 Extend settings with OPENSTACK_SERVER_DEFAULT_USER_DATA
The new setting should allow an administrator to specify default user_data
for new VMs. The default user_data can be a string template that accepts
request object which has info about the user, so the default user_data can
be personalized.

Change-Id: I86ac21bf82c1667135abd4f20fb4514da0899450
2022-09-01 19:23:00 +03:00
Andrey Kurilin e9b8d707da Add new settings to LAUNCH_INSTANCE_DEFAULTS
The new settings ``LAUNCH_INSTANCE_DEFAULTS.enable_metadata`` and
``LAUNCH_INSTANCE_DEFAULTS.enable_net_ports`` allow to hide Metadata and
Network Ports tabs from launch instance workflow.

It is implemented in the similar way to existing enable_scheduler_hints
setting and doesn't change default behaviour

Change-Id: I3d1ae5ab6cee614dd2c400f66570e320efbe6100
2022-08-29 21:39:33 +03:00
manchandavishal 65d748fb25 Deprecate Django based Panel for Images, Keypair, and roles
As discussed in the horizon meetings or in horizon PTG sessions,
horizon team agreed to deprecate django version of Images, Keypair
and Roles panel as we think that feature gaps between the two
implementations have been closed. Let's mark the Django version as
deprecated for all these panels and gather more attention
from operators.

Change-Id: I965f9dbdd5e78b52a788f73b359c1c6fbc18637e
2022-05-10 05:28:28 +09:00
Akihiro Motoki 35a490f4ec Do not assume keystone admin endpoint
keystone does not distinguish public and admin endpoints since
Train [1], so there is no need to use a separate endpoint for
keystone admin operations. admin endpoint still can be configured
but there is no functional difference anymore from other endpoints.
We do not need to require admin endpoint and can use an endpoint
specified by OPENSTACK_ENDPOINT_TYPE for all API operations.

This commit reverts commit f9bab3fe19
as we no longer need the workaround.

[1] https://review.opendev.org/c/openstack/keystone/+/664246

Closes-Bug: #1950659
Change-Id: I2660fd2df8081e1d2d9c84626037f94bd9d137a5
2022-03-25 20:06:49 +09:00
Zuul 0798bdacd3 Merge "Add SYSTEM_SCOPE_SERVICES setting that hides panels" 2022-03-24 10:36:17 +00:00
Radomir Dopieralski 6c814b241d Add SYSTEM_SCOPE_SERVICES setting that hides panels
Since not all services are ready to use the system scope token,
we need a way to disable and enable the use of system scope
token on a per-service basis. This setting let us configure
which services should use the system scope token. By default
the list is empty and system scope token is not used at all.

Change-Id: I5e0cdc7288221571f183a37b800c19dc4cff5707
2022-03-10 15:13:21 +01:00
Keigo Noha 29da801528 Change to a proper policy for Resume operation
Previously, ToggleSuspend class checked 'os-rescue' policy for resuming
an instance. To align to resume operation, this fix changes to
'os-suspend-server:resume'.

Closes-Bug: #1963652
Change-Id: If6386ecdb81fb1f0d88dab447ee81c251b9857b7
2022-03-04 17:38:20 +09:00
Hugo Brito 5d6eefa498 Create Horizon session control logic
The Multiple Simultaneous Logins Control is a feature designed
for securing Horizon dashboard sessions. The default Horizon
configuration allows the same user to login several times
(e.g. different browsers) simultaneously, that is, the same user
can have more than one active session for Horizon dashboard. When
there is the need to control the active sessions that one user can
have simultaneously, it will be possible to configure the Horizon dashboard
to disallow more than one active session per user. When multiple simultaneously
sessions are disabled, the most recent authenticated session will be considered
the valid one and the previous session will be invalidated.

The following manual tests encompass both simulteaneous session control
configuration: 'allow' and 'disconnect' and were verified with this code
change before submitting it:

Test Plan:
PASS: Verify that a user is able to login to Horizon dashboard (when
configuration is 'disconnect')
PASS: Verify that a user is able to start a second Horizon dashboard
session and the first session is finished (when configuration is
'disconnect')

Failure Path:
PASS: Verify that when a user fails to authenticate a second Horizon
dashboard session the first session stills active (when configuration is
'disconnect')

Regression:
PASS: Verify that a user is able to login to Horizon dashboard (when
configuration is default: 'allow')
PASS: Verify that a user is able to start multiple simultaneous Horizon
dashboard sessions (when configuration is default: 'allow')

Implements: blueprint handle-multiple-login-sessions-from-same-user-in-horizon
Signed-off-by: Hugo Brito <hugo.brito@windriver.com>
Co-authored-by: Thales Elero Cervi <thaleselero.cervi@windriver.com>
Change-Id: I8462aa98398dd8f27fe24d911c9bfaa7f303eb93
2022-02-28 23:48:47 +09:00
Zuul 3bc1458e60 Merge "Add Rules operation to Network QoS Policy" 2022-02-21 20:20:37 +00:00
Zuul f165de3e4f Merge "Implement pagination in admin/proj network tab" 2022-02-20 19:58:33 +00:00
zitptan aa83752f20 Add Rules operation to Network QoS Policy
Added create, edit, and delete rules operation to the
network qos policy.
Rules: Minimum-Bandwidth, DSCP-Marking, and
Bandwidth-Limit, Minimum-Packet-Rate

Partially-Implements: https://blueprints.launchpad.net/horizon/+spec/create-network-qos-policy

Change-Id: I49058036f1d78ef022d966f6b375cdc984755813
2022-02-17 13:40:39 +01:00
Rodrigo Barbieri 196de449b6 Implement pagination in admin/proj network tab
Added pagination support to the networks page under
Project and Admin Dashboard.

To accomplish so, the method network_list_for_tenant
in api/neutron.py that is used for listing networks under
the Project Dashboard was refactored to merge the different
requests for shared, non-shared and external networks while
tracking the pagination for each of those requests, so for
instance when all the shared networks are listed and paginated
then the non-shared networks are queried and so on.

For the Admin dashboard all network types are retrieved under
a single request so it is a simpler pagination logic.

Partial-Bug: #1746184
Change-Id: I96a2d6cabed47c89bdc02ec922d7f9451e5ec025
2022-02-16 18:15:48 -03:00
Zuul 8b4e31fbd6 Merge "Update default value of OPENSTACK_KEYSTONE_DEFAULT_ROLE" 2022-02-10 20:31:25 +00:00
Zuul 664d40a748 Merge "Follow-up: Drop Django based implementation of launch instance" 2022-02-02 11:33:50 +00:00
manchandavishal b430d5aa43 Follow-up: Drop Django based implementation of launch instance
This patch is a follow-up patch addressing the below comments
given on the commit 6ac31e0 :
* delete unused template files.
* Drop "config_drive" option and related code from resize instance
  step because it need to show only for Launch Instance.
* grammer correction in the release note

Change-Id: I9ab52927fc6be31d491f010e5e3d9323ddd34e9e
2022-01-31 16:22:49 +00:00
Zuul 047b81e979 Merge "Drop Django based implementation of launch instance" 2022-01-25 15:58:41 +00:00
manchandavishal 6ac31e0ba8 Drop Django based implementation of launch instance
horizon already deprecated launch instance Django based implementation
in the wallaby cycle [1]. This patch remove code for launch instance
Django based implementation as angular based implementation is the
default one from long and all features gaps between angular and Django
implementation is closed.

It also moves SetAdvanced step code to ``resize_instance.py`` as
``workflows/create_instance.py`` file is deleted and remove server_group
option from Advanced Options of resizing instance action because
"server_group" is not required while resizing an instance as per
nova-api reference [2].

Closes-Bug: #1869222

[1] https://review.opendev.org/c/openstack/horizon/+/779125
[2] https://docs.openstack.org/api-ref/compute/?expanded=resize-server-resize-action-detail#resize-server-resize-action

Change-Id: I5e01cd81f309491f1a58ea93911030366a86e3c7
2022-01-24 16:21:18 +05:30
manchandavishal a375c54186 Update default value of OPENSTACK_KEYSTONE_DEFAULT_ROLE
This patch update default value of OPENSTACK_KEYSTONE_DEFAULT_ROLE
to 'member' from '_member_'. If a user tries to create a new project now
it leads to "Could not find default role "_member_" in Keystone" error.

Also long time ago keystone-bootstrap changed the default member role
that is created to member from the legacy _member_ role. Any deployments
that might still be using _member_ should set this explicitly.

Closes-Bug: #1957173
Change-Id: I1fc7f44326b82ceb303f8d663ff0b42f0bdf7855
2022-01-17 11:21:31 +05:30
Zuul 855bd80ec8 Merge "Add system scope support to context switcher" 2022-01-15 12:06:04 +00:00
Zuul 7ba6f8519b Merge "Drop Django 2.2 support" 2022-01-15 08:36:43 +00:00
Zuul 8fe5bbc8da Merge "Use OPENSTACK_KEYSTONE_URL instead of HTTP_REFERRER" 2022-01-12 12:15:26 +00:00
Georgina Shippey 33292ca0a4 Use OPENSTACK_KEYSTONE_URL instead of HTTP_REFERRER
By using OPENSTACK_KEYSTONE_URL instead of the HTTP_REFERRER
the authentication request between Horizon and Keystone continues
to work in situations where the HTTP_REFERRER is an external keystone
endpoint that Horizon does not have access to.

Change-Id: I9c5c8d59c5f5a8570dbb563ae224d45406a73ba5
Closes-bug: #1874705
2022-01-12 08:29:29 +00:00
manchandavishal 8918bf751d Drop Django 2.2 support
Django 2.2 support was dropped. Django 2.2 ends its extended support
in April 2022[1]. Considering this, horizon dropped Django 2.2 support
and use Django 3.2 as default version of Django.

It also updates the python version from py38 to py39 for
"horizon-non-primary-django-jobs" and
"horizon-tox-python3-django" project template because py36
and py39 are now runtime for the Yoga cycle[2]. So I have updated it to
py39.

[1] https://www.djangoproject.com/download/
[2] https://review.opendev.org/c/openstack/governance/+/820195

Change-Id: I8886f12f7e51b721ac5123070086d5dcfefe4e72
2022-01-05 19:26:56 +00:00
Radomir Dopieralski 34a0159d1a Add system scope support to context switcher
Change-Id: Idd2ec7ae6e978a358b4b3639e86cadae06c90976
2021-11-26 14:09:46 +01:00
Hang Yang c7ea66bc3e Support RBAC security groups in dashboard
Get the RBAC shared security groups in the dashboard by making
an additional Neutron API call to filter by the shared field. Currently,
the dashboard only shows SGs owned by the tenant.

Depends-On: https://review.opendev.org/c/openstack/neutron/+/811242
Closes-Bug: #1907843
Change-Id: Ifa1acb3f0f6a33d0b4dc3761674e561a8d24c5c2
2021-10-18 15:27:35 -05:00
Akihiro Motoki 0f34f6e7ed Add a release note on Django 3.2 support
We consider Django 3.2 support as experimental in Xena,
but it is worth documenting it.

Change-Id: Ibdaed0f4eafd18c61289e70e41584e97d6c60dd7
2021-09-22 16:10:02 +09:00
zitptan 1800750804 Add Create QoS operation to Network QoS Panel
Enabled Network QoS panel and added a button for
creating a new network qos policy with parameters
name(string), description(maxlen-255), and
shared(checkbox)

Partially-Implements: https://blueprints.launchpad.net/horizon/+spec/create-network-qos-policy

Change-Id: Ifabfac7553ddbb65fe387187da5dd2fafad31351
2021-08-09 13:12:02 +00: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
Zuul 6d1d7f5030 Merge "Get the timezone offset for the current day instead of January 1st." 2021-03-18 13:38:49 +00:00
David Hill f60220329a Get the timezone offset for the current day instead of January 1st.
This bug only appears to be a cosmetic one where the TZ offset
would be calculated on current_year/01/01 so would remain in
daylight saving offset when displaying the timezones list.

(Note by amotoki)
The minimum version of Babel is bumped to 2.6.0
as Babel 2.3.4 returns "New Zealand Time" instead of "New Zealand
(Auckland) Time" returned from the latest Babel (2.9.0).
It is not a good idea to handle such difference in Babel in our UT
and there is no reason to stick to Bump 2.3.4.
2.6.0 was chosen as it is available in Ubuntu Focal and there is
no more reason than this.

Change-Id: I0600086cc51cf5abcf1631565e75146114189667
Closes-bug: #1822849
2021-03-18 08:29:07 +09:00
David Hill fc8603a499 Add default_availability_zone for VM creation
Add the LAUNCH_INSTANCE_DEFAULTS.default_availability_zone settings in
VM creation dashboard in order to let administrator select a default
availability zone instead of a random one when many are available.

Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: I297ff7f3c8e725c24c7f7687786c784f61f5d4e2
2021-03-13 19:28:16 +00:00
Zuul ade661e50d Merge "Deprecate Django launch instance form" 2021-03-10 18:03:27 +00:00
Zuul 3ea81ff593 Merge "Add Volume backups support for admin panel" 2021-03-09 18:51:38 +00:00
Akihiro Motoki 57380fae71 Deprecate Django launch instance form
As discussed in the horizon meeting, we think that feature gaps
between the two implementations have been closed. Let's mark
the Django version as deprecated and gather more attentions
from operators.

Change-Id: I55379c0897bad46decfabb443afe9439a31a3164
2021-03-09 15:55:35 +09:00
manchandavishal 1d39ac761f Add Volume backups support for admin panel
This commit allows admin to list/show cinder volume backups
using horizon dashboard and the user can perform the
following table action :
1. backup-restore
2. backup-delete
3. update backup-state
4. backup force-delete

Implements https://blueprints.launchpad.net/horizon/+spec/add-volume-backups-support-for-admin-panel

Change-Id: I2fea140a972eb4bd4f18ad1c83cfa4df58c23f6c
2021-03-05 00:15:08 +00:00
Zuul c756724cda Merge "Support policy-in-code and deprecated policy" 2021-03-04 22:01:52 +00:00
Zuul 394423147c Merge "Rename zh-cn and zh-tw translations to zh-hans and zh-hant" 2021-03-04 08:08:14 +00:00
Akihiro Motoki 391a660460 Rename zh-cn and zh-tw translations to zh-hans and zh-hant
See http://lists.openstack.org/pipermail/openstack-discuss/2021-February/020169.html

horizon/management/commands/pull_catalog.py is updated accordingly.
It turns out it does not work with python3, so it is fixed too.

Depends-On: https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/773689
Change-Id: I6575f1f032a06365953dbfe314abfbf9a31817cd
2021-02-18 09:57:27 +09:00
Akihiro Motoki b7bb76eb20 Support policy-in-code and deprecated policy
This commit allows horizon to handle deprecated policy rules.
The approach is explained in the document updated by this change.

oslo.policy requirement is updated. oslo.policy 3.2.0 is chosen
just because it is the first release in Victoria cycle.
requirements.txt and lower-constraints.txt are updated accordingly
including oslo.policy dependencies.

Change-Id: If5059d03f6bd7e94796065aa1b51c0c23ac85f5e
2021-01-27 14:02:27 +00:00