ABCs in collections should be imported from collections.abc and direct
import from collections is deprecated since Python 3.3.
Change-Id: Ifb983fa478120a95760bf0cb78994210acdbe8e8
The yaql function, decrypt_data, in the file, yaql_functions.py,
sets the config option, barbican_endpoint_type, to internal.
This allows Murano to work when TLS is enabled.
Change-Id: Id9d82d7bbedcef87bdc9865ec55511d4e1f65507
Closes-Bug: #1775035
Adds a new yaql function 'decryptData' which pairs with 'encryptData' on
the dashboard side.
Requires a valid secret storage backend (e.g. Barbican) to be configured
via Castellan in murano.conf, e.g.
[key_manager]
auth_type = keystone_password
auth_url = <auth_url>
username = <username>
password = <password>
project_id = <project_id>
user_domain_name = <user_domain_name>
Murano will still work fine without this config but the encrypt/decrypt
functions will be unavailable.
Partially-Implements blueprint: allow-encrypting-of-muranopl-properties
Depends-On: I1be3a1e11e3f4c2170062927ad359bf679eb25d9
Change-Id: I09416b6d35ed2dafa823eca98262a4e23081e6eb
Don't add murano.tests.unit.dsl.test_engine_yaql_functions to
tox.ini. The test requires a new release of yaql to get the last
Python 3 fix (change Ia262ca3ff9ffaad618bde9c1157559e7320434ee).
Blueprint: murano-python-3-support
Change-Id: I8a42e9b31b13bd5075708c32130b1c2997971cb6
config() function returns information from murano.conf.
But since it contains sensitive information like passwords
it creates a security issue for Murano because any app can
get access to that information. However the function is
used by the core library to get RabbitMQ credentials.
This commit makes the function available to Core Library
only which currently identified by the name (io.murano)
but in the future will be identified by the package signature.
Change-Id: I3fe5c153f931decc59bc8bf9eb87c78d459a64fa
Closes-Bug: #1506807
With this commit most of the Python 3 compatibility
issues in murano-engine are resolved.
If run on yaql with https://review.openstack.org/#/c/286110/
fix all of the unit tests except for one success.
The only failing test is base64 encoding/decoding test
which require rethink of resource management to get away
from string types for binary content
Change-Id: Iee87d27fe4f04118202de07f376d41fbf2c90f54
Use 'range', 'reduce', 'map', 'cStringIO' from six.moves
for python3 compatibility.
Blueprint murano-python-3-support
Change-Id: I823c44d51db72ddb30a14f5755d781eca0d91e50
The builtin basestring abstract type was removed in python3,
use str instead, we need to use six.string_types to replace
the basestring for py3 compatibility.
This patch was generated by the following tool using 'basestring'
option.
https://github.com/haypo/sixer
Command:
python sixer.py -w basestring murano/
This also adds a check to murano/hacking/checks.py that should
catch this error in the future.
Blueprint murano-python-3-support
Change-Id: I26c236ce6dd2fffd6a4ca50e55ad62deb01bd9dd
This also adds a check to murano/hacking/checks.py that
should catch this error in the future.
Blueprint murano-python-3-support
Change-Id: Ib8b2b91a40577d18739f0c1bf2c37b7cf4060560
The Unicode type is 'unicode' in Python 2 and 'str' on Python 3.
This patch replaces unicode with six.text_type to make Murano
more compatible with Python 3. Also it replaces the tuple
'(str, unicode)' with six.string_types for instance comparision.
Blueprint murano-python-3-support
Change-Id: I4db27afdb556ec30dd36d7d4e170055274edfa8b
Since python 2.2, use of types module is not prefered way to
access the type hence it is replaced by using names of built-in
factory functions.
Change-Id: Ibdcc1ae75204f67076edab5edcffe94a9f1f1d8e
Implements: blueprint replace-types-module-with-new-style-classes
1.1 is the same as 1.0 but packages with format other than
MuranoPL/1.0 (or just 1.0) will be rejected by Murano Kilo.
As a result it will be possible to specify that application
require yaql 1.0 which was introduce in Liberty.
MuranoPL/1.2 differs in that it has yaql legacy mode turned
off and several functions are now cannot be called as
MuranoObject methods. It is recommended to start development
of new applications using 1.2 format
Change-Id: Ie68cc0c37f198c10eeac79ed349f9d9d420e038f
Implements-Blueprint: muranopl-format-version-upgrade
This commit reworks mechanism how context chain
is built at each point. The goal was to make
entire chain be dependent on format version
number. This would allow for example to use
yaql 1.0 legacy mode context for MuranoPL/1.0
and not to use it for 2.0.
Not the entire chain is built on demand up to the
root instead of attaching to existed parent context
as it was before. DSL host (engine) is no more
required to have custom MuranoDslExecutor implementation
but a new ContextManager interface that is used
to control contexts on each layer. Engine uses
this interface to register system classes and
engine level yaql functions. Also a ContextManager
is a foundation for method mocking because now
all MuranoPL methods are yaql functions stored
in context and with ContextManager it is possible
to inject/replace function in each scope (
global, package, class, object)
Partially implements: blueprint murano-versioning
Change-Id: I0a553e8044061fe780a83bc04d70b8f80580988f
* Code migrated to yaql 1.0.0
* New MuranoPL object initialization
* Lots of refactoring
See referenced specs for more information
Implements: blueprint migrate-to-yaql-vnext
Implements: blueprint object-construction
Depends-on: I7f314634ab5f08a521e51082d5c84dffca4b0b5c
Closes-Bug: #1454264
Change-Id: I740a4f83c76d8b56a1da585a739d770ef823a524
In the several places the CONF variable is used from the murano.config.
This patch declares the local CONF variable and uses the oslo_config library.
Change-Id: I1f9a42f7f2cf7fef2cf0d63b185428dfddd9e78e
Also refactores networking code to move networking code from
Instance so that different types of network can be represented by
single simple interface
Implements: blueprint join-existing-neutron-networks
Change-Id: I90afcea6b1c12d7f6f564d8524f5c0d30e1b4686
It was possible to have
- $l: $list.skip($start)
- Return: $l.take($count)
but not $list.skip($start).take($count)
Change-Id: I58709f9c994ad22497ff23662a1fc0c9c2d1e88d
Closes-Bug: #1365146
Add list.skip(count) and list.take(count) functions to collect only
a part of original list.
Change-Id: Ic730713f0baad64385e37b36e378615482c7a75d
Closes-bug: #1362892
Murano uses Heat to allocate OpenStack resources by creating and
updating one Heat stack. All changes to stack are stored in shared
variable exposed via call to environment.stack.updateStack.
Allocation of resources needed by Instance class is done in several calls
to environment.stack.updateStack therefor in case of simultaneous deployment
of two instances of class Instance race condition is possible.
Instance class was rewritten to have only one call to stack.updateStack
that is going to eliminate possible race condition.
P.S. This change also introduce new function mergeWith that can merge
two dicts.
Change-Id: Ib3b0be04e7d0b6107466bd5837278a12f01cf766
Closes-Bug: #1364824
YAQL 0.2.3 contains one small change that would allow to
forbid usage of uninitialized local variables
Also removed YAQL function binding that is available in
YAQL 0.2.3 out of the box
Change-Id: I96f455e50add8666c4e65eb421bea5af57055485
Adds support for packages consisting of single HOT template.
Most of HOT features are supported with exception of
environments, attachments and JSON parameter type.
Implements: blueprint hot-packages
Change-Id: I927af0e96f1613e8843ac47844e9c19fa00fdaa6