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
Currently, "Resize instance" widget is not working because it relies on
legacy Nova API v2.46, obsoleted in Pike release. Proposed patch make
Horizon use current Nova API (>=2.47).
Closes-Bug: #1940834
Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: Id2f38acfc27cdf93cc4341422873e512aaff716a
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
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
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
Part of the removal of OPENSTACK_NOVA_EXTENSIONS_BLACKLIST (1/3)
All references of nova extensions in the python code are cleaned up.
Note that the API layer is not touched yet as it is used by the
JavaScript side.
Change-Id: I66cd0a9629253a6462aace9902ef8200b94b2a21
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
'unnecessary-comprehension' warning is emitted when
unnecessary use of a comprehension is found.
classes attribute in Action can be a tuple,
so we need list() to ensure it is a list before adding 'disabled'.
I think it is time to introduce a method in Action class or somewhere
but it should be handled separately.
Change-Id: I16a98d56b6d0bd0af234b00735c6ed576620df7e
This pylint check 'no-else-return' might be debatable.
but as far as I checked it works in most cases.
Change-Id: Ie8574d4a529454c6e050fa62a7a17ea097d00240
"Edit Port Security Groups" button is visible to all
roles on Instances.
"policy_rules" is defined in "EditPortSecurityGroups"
class to fix it.
Change-Id: I1030db9143273a7f3bc4d9f097311d2697603cfa
closes-bug: #1878218
"Rescue Instance" button is visible to all
roles on Instances.
"policy_rules" is defined in "RescueInstance"
class to fix it.
Change-Id: Iac7180f9b6099f64c26382d3968fbbc133577d45
closes-bug: #1877574
string_concat was removed in django 2.1 when it reached the end
of it's deprecation cycle. It was removed because the same behavior
can be achieved with format_lazy.
For more details see:
https://docs.djangoproject.com/en/2.2/releases/2.1/
Change-Id: I5e1c9bdfa1d0e049e0516198abbdb76be1667216
Closes-Bug: #1836671
Partial-Bug: #1789046
This commit mainly covers settings
in openstack_dashboard/dashboards/project/.
Part of blueprint ini-based-configuration
Change-Id: I22413d2fe20576a507634dc4e2d0354c7db8800a
This patch improves UX by blocking a second POST request during page
reload after "Confirm instance resize" action
Closes-Bug: #1826509
Change-Id: I80c66f7828be17ccf06840a06229c447ccb1bb67
Added functionality to the handle function in the BatchAction class
in action.py and allowed the easy changing between the alert types
and made deleting images, instances, and volumes give an info alert
rather than a success message and altered the testing parameters
Change-Id: I93251d6d12cf89a331b5c051bf4fe10a6e470f51
Closes-Bug: #1291681
The 'Time since created' column name has been shortened to 'Age'
in project instances and admin instances meaning it fits properly
in table header cell and doesn't cause table header height to
increase.
Closes-Bug: #1614287
Change-Id: I94fc9eb260050e187445abd8236ac414b885b467
Co-Authored-By: Sam Wright <swright.wellington@gmail.com>
Previously <h4> and <h5> were used for network names and the title
"Floating IPs". It caused these strings are displayed using larger fonts.
This commit changes they are rendered with same font as for others.
The following changes are also made to save spaces.
* Network name and IP addresses are displayed in a single line.
* IP addresses are sorted in the order of IPv4 first.
* The title "Floating IP" is no longer displayed (I believe an floating
IPs are still clear as they have global addresses)
Closes-Bug: #1789325
Change-Id: I5bfae9b10609628d16a5919840a56ae135739924
The prior commit for this was functional but not quite
correct. The policy rules currently in Horizon for
attach and detach of volumes don't exist in Nova and
are missing from the local copy of nova_policy.json and
from Nova generated policy files. The fix to use the
create instance copy of the rule only worked for attach
and not detach ( https://review.openstack.org/#/c/570071/ )
This commit updates detach as well, and should be correct
going forward based on the Nova policy rules at:
https://git.openstack.org/cgit/openstack/nova/tree/nova/policies/volumes_attachments.py
Change-Id: I07fccd6f12149cd88a049c46aa113dfd2b60bbaa
Closes-bug: 1772759
The attach_volume rule on the Compute Instances and Volume pages
does not match the rule in the nova_policy.json file, or what is
generated from an oslo policy generation on Nova. Update the rule
to match what is used in the default policy file, and what Nova
uses in its unit tests.
While looking at this, discovered that the detach_volume has a
similar problem, with no rule that matches at all. It may make sense
to have detach volume use similar permissions to attach
Change-Id: I40c709c7bb0c8538b56624dbfff1faea2eba9ee6
Closes-bug: 1772759
This commit adds a new action "Edit Port Security Groups"
which jumps the interfaces tab of the instance detail page.
In addition, a warning message is added to the "Edit Security Groups"
form because if a user change security groups as an instance level
the change will be applied to all interfaces of the instance, so
it would be nice if we can provide a good navigation to a page
of editting security groups per port.
Previously, UpdateMembersStep does not support help_text_template option.
To use a bold tag in the added help message, we need to use a template
instead of help_text, so _workflow_step_update_members.html is updated.
Closes-Bug: #1750147
Change-Id: I71437a376b94cab90df0e423aa7e1d2d0d8387ee
W503 line break before binary operator
Looking at the code base, it sounds okay to follow this check.
Change-Id: Id511e0104dc6de5b204021661d4a8776ca6d3658
We previously supported so-called "Simple FIP disassociation"
which allows users to disassociate and release a FIP in a single action.
We no longer support nova-network based features, but I believe it is worth
implemented even in a neutron-only era. This patch introduces a checkbox
"Release floating IP" to support this with neutron.
At the same time, this patch also fixes a bug that the existing FIP
disassociation action disassociates and releases a first FIP of
a requested server. Even though it is a rare case where a single
server has multiple FIPs, this is a bug. After this patch, FIPs
associated with the requested server are listed in the form and
a user can select an FIP to be disassociated.
This patch drops a setting parameter 'simple_ip_management' without
deprecation notice. This is actually no side effect because this setting
just toggled the FIP disassociate action in the instance table and
it provides nothing more than that. We can do the same thing by
the policy file.
Change-Id: Ie8053bdd3a3e4c7897c7c906788d40c2a1d3f708
Closes-Bug: #1226003
(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
Remove the option to detach_interface from running instances for
non-admin users.
Change-Id: Id641bde457e8723ace0bc1e49aab2c46b2227485
Closes-bug: #1690790
FloatingIpTarget was introduced but it was used partially.
This commit clean up the remaining logic of FIP target ID calculation.
Related-Bug: #1725657
Change-Id: I4b93b9a7a3977b042bb9c3200923c5c2fa84476d
This patch is going to remove the quota check for "Launch Instance" button,
because:
1. For some reasons, the quota check/allowed of the launch instance button
will be called 2 times, which takes about 0.14 seconds based on our prod
env (prod API with local horizon)
2. The launch instance form will do the quota check again, so user will
not be able to create instance and don't have to wait resp from nova if
the quota has been exceeded. See https://ibb.co/kor5Tw and
https://ibb.co/kKm8Fb
Partial-Bug: #1662347
Change-Id: I0c4aaf6da29145856f4ab307e40a91c4b47b2135
At the current moment user can not suspend an
instance from the instance "Details" page if the
instance does not belong to the first page of the
instances list. This is fixed.
Co-Authored-By: Ivan Kolodyazhny <e0ne@e0ne.info>
Co-Authored-By: Vladislav Kuzmin <vkuzmin@mirantis.com>
Change-Id: I4d805e4a65e838242af38677cbb9efefc498a96f
Closes-Bug: #1553142
Previously some filters have '=' and some do not.
This commit ensures all filters have '='.
Only exception is 'Changed Since'. In this case, no '=' is correct
as it means '>='.
Change-Id: I0cb0e39ed80d2caf9509d4d2ec3e3e6957bf56f4
Closes-Bug: #1709882
If cinder not enabled, we cannot attach/detach volume for an instance.
So it's better not show the drop list.
Change-Id: I09578998c8f1a97bd24fb6043258b94e8f37bc09
Closes-bug: #1703511
Updated the template used for LinkAction to add the css class for
destructive action if action_type is set to "danger".
Removed the action_type for live migration action because it is
not a destructive action.
Change-Id: Ib957597aa065df4c8a65303b1dc95a5c762ae3d3
Closes-bug: #1704014
Added a column to show the locked status on project/admin instances table.
There will be a locked or unlocked icon with help tooltip if nova 2.9 or
above is used. See openstack_dashboard/api/microversions.py
Added the locked field on project/admin instance details panel.
Change-Id: If31ae281d2782c71cd6112f3bd6228647a6130e4
Closes-bug: #1593903
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
This commit drops Nova security group dependency from
the dashboard implementation.
security group support in the nova API wrapper will be dropped
in a separate patch.
Also removes api.network.security_group_backend()
as it is no longer needed.
Partially implement blueprint drop-nova-network
Change-Id: I224010eb59068a7cc4f97c2453d499adde7644b4
This commit drops Nova floating IP dependency from
the dashboard implementation.
* Use neutron policy for floating IP operations.
* SimpleAssociateIP is supported only by Nova API,
so the action was removed in this patch.
Floating IP support in the nova API wrapper will be dropped
in a separate patch.
Partially implement blueprint drop-nova-network
Change-Id: I1610fb9aa2212b3f34814fdb9894b715a5211d9c
This patch hides filter choice IPv6 under Project->Instances
and Admin->Instances if OPENSTACK_NEUTRON_NETWORK.enable_ipv6
is set to False
Closes-bug: #1588071
Change-Id: Ibdccb94c2cbc07a8dbbe02f72ca7c8b6a36360f7
This patch adds microversion support to Horizon, as well as
documentation, service references, tests and an example.
Implements: blueprint microversion-support
Change-Id: Ic5aa559dbc13aa84d8e4a14b68f26f5d84183fa9