This commit adds support for Designate zones. This can be used to
provide the user a drop down list of zones they can choose from when
launching apps.
This should be coupled with a commit to murano to add a new
io.murano.resources.RecordSet resource type, so that new a new DNS
record can be added for new apps.
Change-Id: I71deb3e264b2777ec4126d8e46c3ac45b9fc42c6
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.
Fix problems found.
Update local hacking checks for new flake8.
Change-Id: I7073a478d38fb46619e7a300808e9449403e704d
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
Since horizon separate module nova to _nova in commit [0],
change this for murano-dashboard.
[0]: If91cf4f30d2ddab471757129c2a74b26b6d38b1e
Change-Id: I4160342c571a5c0d952f96503de920fedc88a33b
Replace django.core.urlresolves with django.urls
(In Django 2.0) The django.core.urlresolvers module is removed
in favor of its new location, django.urls.
It was deprecated in Django 1.10:
https://docs.djangoproject.com/en/2.0/releases/1.10/#id3
Add py35dj20 job to test Django 2.0 integration.
And update the lower-constraints.
Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Co-Authored-By: Ellen Batbouta <ellen.batbouta@oracle.com>
Change-Id: I3456162c934eb48ccf180d80b5cf7ff5614221c0
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
Now horizon ThemableSelectWidget field can not display
the validation error, just make the field keep the old
can temporary fix this. Once horizon fixed,
we can revert it back.
This reverts commit 85fc5e002c.
Closes-Bug: #1711763
Change-Id: I557d38f739786597a9472c8104e1edf531e9a007
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
Following a recent patch [0], image choicefields with themable
widgets are not rendering display correctly.
This patch fixes the bug, correctly formatting the image display
names.
[0] https://review.openstack.org/#/c/452771/
Change-Id: Ide558af94cd1484f7bada414658da5d1319ab384
Closes-Bug: #1684141
Create the snapshot will copy the image's metadata,
so the snapshot image type will show in the Image table
and configure application image field.
This patch filter out the snapshot image type.
Change-Id: I4a93b75730da9a0f3a9969687e684ee8dfeff815
Closes-Bug: #1650403
This is a trivial fix, meant to align with recent Horizon change
[0], and is just an aesthetic change.
The select widgets are now themable.
[0] https://review.openstack.org/#/c/440978/
Change-Id: Ia903b1d5e72ee6ce08a5bcec3e92b561fcb8b9c6
We are getting a regex pattern and error message from UI definition
and paste them as an attribute to a input field for js validation
Change-Id: If6d69462ebc883f5c7ca8dbe18de7df6386d53ce
Implements: blueprint murano-dynamic-ui-custom-realtime-validation
Now there is no way to define initial value for flavor field.
This patch fix this.
Change-Id: I966370ced17e39fbe8570226c655fb805cc4e879
Closes-Bug: #1650406
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
Fields.
This issue only affects Python 3.0+
RuntimeError: dictionary changed size during iteration is thrown
by the function mentioned above, because it iterates over kwargs
while deleting entries from it.
Change-Id: I4523296be770bddaeffff7f7ded9501ccc42cbdd
Closes-Bug: #1638928
Before this patch clicking on an eye icon disabled javascript
validation of the password. I added to password field
the attribute 'data-type=password' and in js changed
the selector to include new attribute in the selector,
that attaches the check function.
Change-Id: Ic7e57814a68c315e570c120f31febdada73079a7
Closes-Bug: #1567859
Before this commit murano used 'murano' as the name of it's dashboard.
This is too specific and contradicts with general practice of naming
dashboards after the names of the service.
This also prevents us from re-using the same dashboard in
murano-dashboard and app-catalog-ui
Targets bp: catalog-dashboard-reorg
Change-Id: I3df3865f6bf82626325e66120c408552260c7e2b
Before this change whenever a murano-class dependency was specified in
the ui definition of a package, only packages that contained those
specific fqns were fetched from API, even though the information about
inheritance is available in the glare back-end.
With this change dashboard also fetches all the packages, that have
classes, that inherit from the specified package. This change also
alters the way absence of a package is handled. It's now specified as an
empty field with explanation, rather then a django message. This allows
having only partial dependencies and skipping optional dependencies
altogether
Change-Id: I6632f72ca260c26a116b3aa4608d9592d0f1cbce
Closes-Bug: #1585812
ClusterIPField purpose is to validate IP to belong to env's subnet.
It is now impossible since environments are not assosiated with
particular subnets, at least on the creation stage.
We can leave simple validation of IP syntax in this field.
Change-Id: I50d809d6a99176f511e376ffbb6db1011303122c
Closes-bug: #1537066
PasswordField __init__ contains string concatenations
which make translations difficult.
This commit leaves default message in case there are no custom
validators and adds a simple generic help text for the password fields in
case there are custom validators and no help_text is supplied, since the
exact contains are difficult to obtain (in case of regexp validators).
Resulting strings marked for translation are clean and should allow i18n
team to have better control over the flow of translated text.
Co-Authored-By: Kirill Zaitsev <k.zaitsev@me.com>
Closes-Bug: #1556403
Change-Id: I64f9fc4006f44ba27e776a325ff664316f3ec2ec
Currently password field has strong regexp validator.
Previously it was not possible to application author
to soften password requirements.
This commit enables overwriting default validator with
a single 'regexpValidator' or multiple (dymanicUI special argument) -
'validators'.
Implements blueprint update-password-field
Change-Id: Id417ed71dcd737636439a2beb701751aa4ec0c12
It was broken after YAQl release since YAQL expression
object contains recursive reference and deepcopy operation
failed. So need to copy such objects manually in
a separate function.
To prevent such kind of failures,
test of hot-based package was added.
Change-Id: If3fde7552d9657055aded73c4967fb6832c17536
Closes-Bug: #1498253
Currently password is copied automatically in all the fields.
If application author does not want user to enter password
two times, he may forbid field cloning with 'confirm_input' option.
Targets blueprint: update-password-field
Change-Id: I6d5544e61d76af96a5dc10cec48bc994c83add76
Replaces types with builtin functions
Replaces force_unicode with force_text
Adds six usage of .iteritems and .string_types where relevant
Updates setup.cfg entries
Targets blueprint: murano-python-3-support
Change-Id: I369f79c4258367974eb676cecb6eb1c941803503
Sometimes it is necessary to limit the upper value in
a flavor requirement.
This commit enables this opportunity.
Change-Id: I41e71313a8539ba7e89fc2448d926b8edf22ce3f
Closes-Bug: #1525844
All required changes were made: now global object is used,
arguments of registered functions were updated accordingly.
Also custom pickle objects were introduced to perform correct
serializations to keep data between requests.
Partially implements blueprint: migrate-to-yaql-vnext
Change-Id: If1e696dada7e0c2d4d593d5f27ca97f51604adfa
Before a user could pick any image, that was marked with murano
meta-data, even images that are not currently active.
This change disables (greys out) such images in the select and adds
their title with current status (i.e '(saving)')
Change-Id: I6dfa56b987fa8643750f3e2bfb54226a7c05953a
Closes-Bug: #1480984
This commit enables and fixes previously disabled E and F rules:
* E111 indentation is not a multiple of four
* E113 unexpected indentation
* E265 block comment should start with '# '
* H236 Python 3.x incompatible __metaclass__, use six.add_metaclass()
* H238 old style class declaration, use new style (inherit from `object`)
* H405 multi line docstring summary not separated with an empty line
* H701 Empty localization string
Change-Id: Ie0af0d450f81cb5bf274192e6fdce3e41ccb7f88
Closes-Bug: #1478002
Sometimes a VM should be placed to an existing network rather then to a
new network created during deployment. While our workflows support this,
there is no way for the end user to select such a network in the UI.
This patch adds a new type of the field for Murano Dynamic UI:
NetworkChoiseField. This field provides a selection of networks and
their subnetworks as a dropdown pupulated with those which are available
to the current tenant.
When the user selects an item in this list the IDs of selected network
and subnet are returned by the control and thus may passed to the
engine along with the rest of the ObjectModel, so the newly created
instances join the specified net and subnet.
The control has a default option ("Auto"): if it is selected the
returned tuple contains Null, so the ObjectModel may be constructed in a
default way. This option may be disabled by the field parameter, so
package developers may use this field to oblige the user to select some
network.
Field has some other parameters, which allow to filter the available
networks: pick only the networks matching the specific regex, exclude
murano-generated networks or replace murano-generated names with
human-readable ones.
As this new field adds new functionality to the Dynamic UI platform,
it also bumps up a minor version of the format version to 2.1.
Implements Blueprint ui-network-selection
DocImpact
Change-Id: Ie256c36523c67f27e4cb0b7c9aeed76b2abd28af
This commit removes any mention of table field from dynamic_ui and
removes floppyforms from requirements.
'table' field was introduced for MsSqlClusterServer service, that
changed significantly since then and does not use table field anymore.
See
https://github.com/murano-project/murano-app-incubator/blob/master/io.murano.windows.SqlServerCluster/UI/ui.yaml
for more details (even though the repository is deprecated).
Since no app available today uses this type of field, and no tests exist
for this type of field. There is no way to test, that it works correctly,
therefore it is very hard to transfer critical parts from floppyforms to
murano-dashboard.
'table' field depends on django-floppyforms, which is not
present in global-requirements, which is problematic and prevents us
from enabling proposal bot in murano-dashboard.
'table' field was never documented, so no documentation change is
required.
Change-Id: I638c722c2bdde411aaefa02f3d4027119de0e0bd
Closes-Bug: #1468342
This patch removes unused openstack.common modules and replaces
versionutils with oslo_log.versionutils.
This fixes the gate issue partly, by removing openstack.common.log which
in some cases could override CONF object in horizon.
Change-Id: I94972726129c256d53377320b8b632afb56b8906
Closes-Bug: #1466332
Currently help_text is rendered directly from muranopl code.
This commit escapes help_text, an other parameters, that are passed
directly to django forms from muranopl class definitions.
Also escapes initial values for object fields, that contain application
names, which come directly from users.
Change-Id: Iadd092669a13e99b0e9f0d062a1d1d9a630b00a1
Closes-Bug: #1453138
Due to the way django validates fields having a required=True fieild
almoust never makes sense. This would mean that user would not be able
to choose false for the boolean value, that the Field represents,
because django would raise an error, stating, that the field is
required.
This is especially true for fields, generated for HOT template-packages.
This patch sets required to False for dynamic_ui.
Change-Id: Ibc36017e37bb7df9f7bde2c53265237b21276fd6
Related-Bug: #1450536