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
Fix the getImageType function to handle edge case
when image_type attribute is present but is an
empty string.
Closes-Bug: 1993579
Change-Id: Ie08cf1010d64ff927515b4792e9b052a76b6344d
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
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
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
Community images which are not owned by a focused project are not
included in the normal image list API (i.e., without specifying
"community" as visibility), so we need an extra call of the image
list API specifying "community" visibility in a filter.
It was originally fixed by [1] but was dropped in [2].
The main motivation of [2] is to address "Duplicates in a repeater
are not allowed" error in the JavaScript console.
The approach of [2] was to drop multiple glance API calls, but
the right solution would be to check duplicated images included
in both API calls. This situation with duplicated images happens
when a community image is owned by a focused project. In such case,
the community image is included in the responses of both API calls.
This commit adds a logic to check image IDs already processed.
[1] https://review.opendev.org/c/openstack/horizon/+/614688
[2] https://review.opendev.org/c/openstack/horizon/+/640762
Closes-Bug: #1914045
Related-Bug: #1779250
Related-Bug: #1818508
Change-Id: I2ed1b6064ddd6f62818d6112e98e5d5a98beae9d
This patch allows to set admin password at Angular Launch Instance
dialog when 'can_set_password' is true in OPENSTACK_HYPERVISOR_FEATURES.
Closes-Bug: #1439905
Closes-Bug: #1609777
Change-Id: I3307521df524da30b910f0001165cefa2be6c8bb
This patch updates outdated JavaScript dev dependencies.
The latest Jasmine version makes nested beforeEach and unhandled
promise rejection fail, this was fixed.
Also, the latest Jasmine version runs tests in random order by default,
random is set to false for now to prevent tests failures.
Finally, the latest Jasmine version supports a new configuration option
failSpecWithNoExpectations. By default, this option is set to false and
Jasmine reports specs that have no expectations as passed. Setting this
option to true tells Jasmine to report specs without as expectations as
failed. For now, it is set to false for openstack-dashboard tests, this
should be changed in future.
Change-Id: I04d5c3ce7f7e0a9a38251e975b68bfa1998e556f
Part of the removal of OPENSTACK_NOVA_EXTENSIONS_BLACKLIST (2/3)
References to nova extensions are cleaned up.
The logic to fetch nova extension list is finally dropped.
Change-Id: If4876634276eff37ab0a18a49e6e97851d41911b
This introduces a new config option `DEFAULT_BOOT_SOURCE` to allow
operators to configure a default instance boot source.
Change-Id: Ia9b0d1d24ae69958b6606b9a645bd54f70b3aacc
Implements: blueprint default-instance-boot-source
When creating a server using an existing volume or volume snapshot,
horizon specified a device_name 'vda'.
However the device name depends on bus type or something and
this causes incorrect volume information in the instance detail page
(and nova volume-attachments CLI output).
For detail background, see bug 1560965.
block_device_mapping v1 required device_name but it is no longer
required to specify device_name 'vda' in block_device_mapping v2
in Nova create-server API.
This commit changes to use block_device_mapping v2 so that
we can avoid specifying device_name.
Change-Id: Ice1a6bb2dcddab0a89c99f345d1f2cd101955b28
Partial-Bug: #1560965
Using a scsi decorated image with:
hw_disk_bus='scsi'
hw_scsi_model='virtio-scsi'
This solve the case where an instance is
launched with 'image' selected as boot
source with a new volume. This will result
in /dev/vda instead of /dev/sda as it
should.
Not specifying device name in
setFinalSpecBootImageToVolume() leaves the
decision to nova to determine it.
Example:
-------
VM boot volume without scsi meta data decoration:
Attached To
0a0cd660-7ce3-4033-9983-2e1099edc5f0 on /dev/vda
VM boot volume with scsi meta data decoration:
Attached To
91f50dbc-8bdf-4293-84ea-fc5df27b5ee4 on /dev/sda
--------
Note: This commit doesn't address cases for
where instances are launched using existing
volume and snapshot, this will involve more
work to migrate the code from BDMv1 to BDMv2.
Closes-Bug #1560965
Change-Id: I9d114c2c2e6736a8f1a8092afa568f930b656f09
This patch removes a redundant image API call, which caused
images to be loaded twice in the UI. Image filtering for
snapshot/'normal' images has been merged into a single iteration
for the sake of optimization.
Additionally, tests have been changed to more comprehensively
check which data is loaded into which data structures during
model population. Code redundancy has also been removed in
tests.
Change-Id: Ie78900dae54ff63d41b7ddca3fa83f627d4260c4
Closes-Bug: #1818508
This commit updates several places where image information is processed
and extends support for the 'community' image visibility value.
Some support did exist already, which was mostly just the main Images
tab of the dashboard, but this commit also includes support for:
- image name in the instances list/details
- 'Community' visibility label in the Images tab
- Listing of community images in launch instance wizard
Closes-Bug: #1779250
Change-Id: Iedea0b7d20313837a72a2759511251a7bb324869
In launch instance modal, when a user selects 'Instance Snapshots',
not all snapshots are listed. The snapshots which are created from
an instance with new volume or an instance created from volume
or volume snapshot don't have 'image_type' but 'block_device_mapping'.
So, judging only by image_type is not enough.
Change-Id: I7e175b6a7260ca3d82560427a8f742f8cfa35565
Closes-Bug: #1627619
This adds a new option named hide_create_volume to the
LAUNCH_INSTANCE_DEFAULTS dict.
With this option you can select if you want to hide
the "Create New Volume" option to your users and have
it rely on the default value that is provide with the
create_volume option.
This is currently the only way to make sure the end-users
utilizing the web interface is forced to spawn a volume-backed
instance until Nova supports Cinder as a images backend.
Change-Id: I3a78593ada0d39cc7f1e30fb0a6300887b7b1a00
The volume snapshot of non-bootable volume could not be as the instance source.
But now,when we select volume snapshot as source, not only bootable volume
snapshots but also non-bootable ones show up.
Change-Id: I36cd02f34029eedb693047a1bf3f01dad05aa1b3
Closes-Bug: #1748724
In Nova Compute API microversion 2.19, you can specify a “description”
attribute when creating, rebuilding, or updating a server instance. This
description can be retrieved by getting server details, or list details
for servers, this patch adds support for this attribute for instance in
horizon.
Change-Id: Ic9217234021d236aee8295915f1a9c3c544396b0
Implement-blueprint: support-description-for-instance
Ethernet trunks (network interfaces having a vlan tag) cannot be used
as a boot interface. This is a DHCP/PXE limitation. So instead the
interface without the vlan tag can be used. In neutron's nomenclature
they are the trunk parents. It is also an OpenStack limitation. Subports
should not be passed to 'openstack server create --nic ...'. But if you
do, there's no clear error message about it. Please see Armando's
analysis here why:
https://bugs.launchpad.net/neutron/+bug/1636485/comments/9
The server part of this patch signals port kind (i.e. plain, trunkparent,
trunksubport) so the launch widget can easily filter out trunksubports,
what are not suitable for boot interface.
Change-Id: Ie3a6710eeffefcb472c569898d0f1f1554e599f7
Partially-Implements: blueprint neutron-trunk-ui
Signed-off-by: Ferenc Cserepkei <ferenc.cserepkei@ericsson.com>
The old implementation did not wait for the
promise to resolve before doing the call, thus
ignoring the policy.
Change-Id: I2a7a55ddf287e660371dd6b268953a75afa2a380
Closes-Bug: #1702925
Added two charts for Number of Volumes and Total Volume Storage quotas
on Angular launch instance modal when cinder is enabled.
The charts reflect the volume usage of the new instances to be created
as the user changes the configuration on the modal.
Updated the chart styling for the charts to align better.
Change-Id: Ie744ada2317624153fcfdf9abdf4d7b26996a35e
Partially-implements: blueprint launch-instance-volume-quotas
This patch adds the ability to configure the default "create volume"
value when launching an instance with Cinder enabled.
Co-Authored-By: Rob Cresswell <robert.cresswell@outlook.com>
Closes-Bug: 1678109
Change-Id: I272f7f1b20cc1276976c464a82d1776de92d17e7
In general, in the case where there is no cinder v1 endpoint created
(or deleted - use openstack service delete cinder to reproduce) certain
volume related menu entries are not displayed
This patch add a a new function to check cinder v2/v3 endpoints instead
of only checking the v1 endpoint in instance launch model.
Also, in the image panel, instead of checking v1 endpoint,
it should check v2 and v3 as well.
Change-Id: I642b2f62bb9502f958593c9fcad76e21ee1c80ad
Closes-Bug: #1670789
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
"Create new volume" option is supported when image snapshot
is chosen as a boot source in Nova API. It is worth supporting
this option in Horizon.
Change-Id: I4f7fc6f850d9830557fca833ee9abea1f5b9f0bf
Closes-Bug: #1627416
Co-Authored-By: Kenji-i<ken-ishii@sx.jp.nec.com>
A previous patch altered the defaults in the angular Launch Instance,
but didn't account for those running without Cinder. This patch fixes
those assumptions.
Co-Authored-By: Rob Cresswell <robert.cresswell@outlook.com>
Change-Id: I8dc54fa40fa7eb8ae95a13741405f2a80337b33d
Closes-Bug: 1585761
In the Angular Launch Instance, if there is more than one availability zone,
default to the option for the Nova scheduler to pick. This is a regression
from the legacy Launch Instance feature.
If you want to simulate testing the logic with multiple avaiability zones,
go to: .../launch-instance/launch-instance-model.service.js line 785 and add:
model.availabilityZones.push({label: 'another one', value: 'another one'});
Change-Id: Ib81447382bc9d43e33ce97f78c085d2a94ff2018
Closes-Bug: 1613900
Adds new configs to LAUNCH_INSTANCE_DEFAULTS to configure
which sources are available when launching an instance.
Provides an info message if no boot sources are enabled.
Prevents doing extra calls if a boot source is disabled.
Adds tests to check for the proper filling of allowedBootSources.
Removes one test as the object being checked no longer exists.
Co-Authored-By: Brad Pokorny <brad_pokorny@symantec.com>
Co-Authored-By: Yosef Hoffman <yh128t@att.com>
Change-Id: I90f76c34dbfb20cb54d5f3e599052388bd0dba39
Implements: blueprint configurable-boot-sources
Running eslint is effectively useless nowdays because of the
overwhelming number of warnings returned.
This patch fixes the existing "space-in-parens" errors.
I've decided to only fix those errors here to keep the patch small, and
not destroy any chance of success by needing to rebase every 5 minutes.
Other fixes will be incoming.
Change-Id: Ie9292da293eea6a93751e6c17d24068b66c5d62a
Partial-Bug: #1554824
Allow users to choose a server group when booting a VM. Adds
an optional workflow step to the launch instance workflow that
shows the available server groups and details about each group.
The ability to choose a server groups already exists for the
legacy launch instance workflow as a dropdown list, but having
it as a separate step in the angular workflow provides the added
capability of seeing group details.
To test this patch, create a server group via the nova CLI. Example:
nova server-group-create group1 affinity
And use the angular launch instance workflow to select a server
group. To validate the new instance was added to the server group,
use the nova CLI:
nova server-group-get [ID of server group]
Change-Id: I651817850ef8a5afec047a9a481843a5eddbf5a9
Implements: blueprint nova-server-groups
Nova doesnt allow to boot from a network which has
no subnet, so we should not show those networks on the
new instance launch angular panel.
On the python launch instance this was solved in patch
1b6807baf3
Change-Id: I8b94d45e95f8e22b579d04f6cec7345d947f8e12
Closes-Bug: #1237711
https://review.openstack.org/#/c/323623/ added a few new defaults to the
Launch Instance but didn't add any tests, so the backport is blocked on
coverage. Rather than lower coverage, we should just add the tests and
squash the two commits in the backport.
Fastest way to verify is to generate coverage in master, look at the
lines added by https://review.openstack.org/#/c/323623/ (red) then apply
this patch and run again. You'll see they are all white.
Change-Id: I07d2f5ebcb1771a548c0066699194ea619e7461c
Related-Bug: #1587681
The code for updating the Volume Size error in the Launch Instance
source step appears to be incorrect. This patch updates and improves the
handling to also bump the current value to the minimum for the chosen
image (rather than just a form field error). Also changed the default to
create a new volume, as it was advised that this is the more common
workflow.
Change-Id: Iecb679d967b2285776278f23018e4151ebb18df2
Closes-Bug: 1568866
This adds the Scheduler Hints step to the angular Launch Instance
workflow and allows specifying arbitrary hints when launching an
instance. It also displays available hints from the glance metadata
definitions catalog OS::Nova::Server namespace that use the
"scheduler_hints" properties target.
Implements: blueprint add-scheduler-hints
Change-Id: Ic33c31e645f45b7a4cbdf13e9a115c96399d5e32
bumps the eslint version to 1.10.3 which fixes a lot of
issues, especially rules not working as expected
or being ignored and brings the js code up to date to
comply with those rules.
Change-Id: I1234e7991f98d4ceb0c5333dc036c6a30206ff64
Adds a new step to the new instance launch
with the available ports.
The operator can add or remove ports to be
attached to the instance on boot.
This allows the operator to use ports
at launch instead or together with a network.
Adds tests and modifies other tests to take
into account the new number of steps and the
new addition to the model.
Change-Id: I29fdce433a5a8a9e3ebedbd1a1d96399890e4c6c
Implements: blueprint allow-launching-ports
This adds a setting that can be used to specify the default value
for the Configuration Drive option when launching an instance.
Closes-Bug: #1537106
Change-Id: If402d3331158b462bece27fa6fce2bdb7f6a4a2e
This adds the Metadata page to the angular Launch Instance wizard and
allows users to add metadata to an instance when launching.
Limits will only be enforced once this patch merges:
https://review.openstack.org/209680
Implements: blueprint add-server-metadata
Change-Id: If4202e2e0c934d969ebfb1a566cb04848ad1c28e
"Delete" is being used almost everywhere in OpenStack Dashboard
except the instance panel. Using "Delete" looks more consistent.
In addition, "Delete" tells non-native English speakers that
deleted instances will be no longer usable again compared to
"Terminate".
DocImpact
Closes-Bug: #1502773
Change-Id: Idccaf3c45566f20f11d02ada64c1d3934a6f3002