Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.
Change-Id: I5ad2c7a44dee2e19ab2576f206c69d94126a22b1
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Co-Authored-By: zhurong <aaronzhu1121@gmail.com>
This commit makes some sensible default choices for fields
when adding and application to an environment. These are applied
to the image and keypairs fields.
In both cases, if only one option is available, then make that
the initial value selected.
In the images case, we take it a step further and if there is
only one image, make that the only choice, dropping the
'Select Image' option completely.
Change-Id: I24462374a50c1b8d83970f10278362f3dc5daf8b
Availability zones that were unavailable should have been filtered
from the list, but weren't due to incomplete filtering.
This commit specifically tests whether the AZ status is available
before allowing it in the list of choices.
This filtering mechanism is the same as how the OpenStack dashboard
'Launch Instance' dialog handles availability zone availability.
Change-Id: I8bdb38e29209aff92f51532812b409e48462a0af
nose is not actively maintained now and Django default test runner
seems to have enough features.
Horizon test setting no longer depends on nose and related stuffs.
This commit cleans up nose related dependencies.
The change was made in horizon Rocky-3,
so horizon 14.0.0.0b3 is required at least.
And murano-dashboard using unittest instead of testtools.
Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: I419e0e166ea88c3ab1203f35ffa00928cf94acb1
Depends-On: https://review.openstack.org/599156/
assertRaisesRegexp was renamed to assertRaisesRegex in Py3.2
For more details, please check:
https://docs.python.org/3/library/
unittest.html#unittest.TestCase.assertRaisesRegex
Change-Id: Ib5e52abde4cd642c3d214d3e29e8c55843983f2d
Show them in the description section right under the Flavor field
title (as quota usages + predicted increment progress bar).
Co-Authored-By: Timur Sufiev <tsufiev@gmail.com>
Co-Authored-By: Artem Tiumentcev <darland.maik@gmail.com>
Change-Id: I842cbce209ea90ab715d2e50824296a19c202a76
Add an attribute include_volumes to the volume form element. If set to
true (the default -- maintains backward compatibility), the list will
include available volumes. If set to false, the list will not include
volumes.
To display available snapshots, set attributes include_snapshots to
true and include_volumes to false.
DocImpact
Closes-Bug: #1732208
Change-Id: I243326e9a68eafcdf367a4fbbdaea7b447550b9a
in addition to existing approach where we are allowed to choose only
network with specific subnet.
It is useful when we have lots of small subnets and it is possible
to exceed amount of available IP addresses in it. In this case, we
will allow user to specify only network and delegate subnet choice
to server.
Change-Id: I23c21fe65552c0def527c98a5fa6a4eae56a6a7a
Murano provides support for attaching Cinder volumes to instances and
booting instances from existing volumes. However, there is no way for
a user to select an existing volume (or volume snapshot) using the
murano dynamic UI.
This patch provides a way to show and select available volumes or
volume snapshots.
Change-Id: Ic99443384180c8d0df33e2b7c15b8e56cd086da3
Implements: blueprint volume-selection-ui-element
Currently, the app-catalog/images view in Horizon is throwing
a 300 HttpMultipleChoices exception, with the details:
"Requested version of OpenStack Images API is not available."
Also, the glance v1 client is deprecated, so we should move to glance
v2 wherever possible.
This patch, therefore, removes glanceclient v1 dependency
from murano dashboard as much as possible, especially
given that Glance team intends on removing it from Pike [0].
The only remaining places where the glanceclient v1 is kept
are:
- in _ensure_images in muranodashboard/packages/views.py,
which uses copy_from functionality from glanceclient v1 to load
images automatically.
- done in ImportPackageWizard, which sets each package to
public if the image that was uploaded was public
[0] https://review.openstack.org/#/c/328390/
Closes-Bug: #1675171
Partially-Implements blueprint: migrate-to-glance-v2
Change-Id: Id5348bc34216d5f5ed7fbb8caf71139d64db3f61
There are number of standard Dynamic UI types that are rendered with
dropdowns: flavors, images, keypairs and availability zones.
The problem is that their values are not sorted.
For example, the image list order might be different on each form open.
Change-Id: I0e75bf6f763bb11e3494659fa8a468201606c3e1
Closes-Bug: #1642374
- Parameters is a key/value dictionary section
where keys are YAQL variable names and values can be either
a YAQL expression or a prepopulated constants. Expressions are evaluated
at the very beginning of a form lifecycle.
- Parameters are accessible using regular YAQL variable syntax ($something)
- Any values within form definitions (title, initial, required etc.) now can be a YAQL expressions that are evaluated before for is rendered but after the parameters are ready so they can be used in the form definitions
- Latest UI definition version was raised to 2.4
- Also now it is possible to provide choices for the choice type control in a form of key/value (dictionary) in addition to list of tuples
Change-Id: I41605ec829d012a69327bc09277dddee5a922bef