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: Ibe28b6b6bf3927e80816f0c5f1cb972fb6e2374b
1.As mentioned in [1], we should avoid using six.iteritems to achieve
iterators. We can use dict.items instead, as it will return iterators
in PY3 as well. And dict.items/keys will more readable.
2.In py2, the performance about list should be negligible, see the
link [2].
[1] https://wiki.openstack.org/wiki/Python3
[2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html
Change-Id: I45fa65427318e1c35bb521de46e81ea12ca7b770
* Single universal ClientManager class was dropped in favor of
of individual in-context methods to create OS clients without
ClientManager restrictions.
* Environment class was renamed to ExecutionSession to avoid
common confusion with io.murano.Environment
* execution_session_local module was introduced to simplify
keep of per-execution session (per-deployment) data. This
is similar to thread-locals with the difference that there can
be many threads in single session.
* All OS-clients related code was migrated to keystone client
sessions and API v3 (except for GLARE and Mistral that doesn't
support sessions). This increases performance and solves
authentication problems that could be caused by token expiration
even with trusts enabled.
* [DEFAULT]/home_region setting was introduced instead of
[murano]/region_for_services to configure what region
should be used by the clients by default (where Murano API
resides). All client factories respect this setting.
Change-Id: If02c7e5d7d39574d0621e0e8dc27d1f501a31984
In python3, map() returns an iterator that caused error:
AttributeError: 'map' object has no attribute 'insert'
Targets blueprint: murano-python-3-support
Change-Id: Id0b1e545bf2ce11c0e4fd29faa5d19bad29c2173
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
Now thw flake8 did not check W503 and E402 errors,
1.E402 module level import not at top of file
2.W503 line break before binary operator
This patch fix it
Change-Id: Ieae4f2f23d2aa0fd1e19ef770c2f1ce6aef30f79
Base class for modify actions.
Entry points based action registration.
Action manager loads and execute actions.
Out-of-the-box actions implementation.
Partially implements: blueprint policy-based-env-modification
Change-Id: Ib148c5f2b7efb1186d77f5461ef9324cca1287c2
With this change MuranoPackage becomes first-class DSL citizen.
Packages have version, runtime_version (that is specified
in Format attribute of the manifest file) and a list of classes.
Previously engine used to have package loader which had most
of "load" functionality and class loader that mostly acted as an
adapter from package loader to interface that DSL used to
get classes. Now class loader is gone and is replaced with
package loader at the DSL level. Package loader is responsible
for loading packages by either package or class name (as it was
before) plus semantic_version spec (for example ">=1.2,<2.0").
Package loader can now keep track of several versions of the same
package.
Also packages now have requirements with version specs.
All class names that are encountered in application code are
looked up within requirements only. As a consequence
packages that use other packages without referencing
them explicitly will become broken. An exception from this rule
is core library which is referenced automatically.
Partially implements: blueprint murano-versioning
Change-Id: I8789ba45b6210e71bf4977a766f82b66d2a2d270
To follow latest community practices we need to use oslo_log in
murano instead of handcrafted libs.
Unsupported log level 'audit' was changed to 'info'.
Change-Id: I40c0f3790e34bf80d0b63554e86b3cbc019eefca
Simulation purges data populated by murano driver in congress.
Test creates rules as its prerequisites.
Change-Id: Ia002b60ad5ba0d831e73b69f660a38c4f5e35f20
Closes-Bug: #1439595
Following changes were made in congress mapping of murano objects:
Relationship "services" is created for environment and its applications.
Property tenant_id on environment is no longer needed.
Ownerships respect embedded objects within the tree.
Change-Id: I846d4d2be9ebf2fd7d5b75ea8e36eed87e56a633
Closes-Bug: #1439591
Since rule recursion is not supported by Congress now,
we have to deal with relationships traversal in different way.
There will be murano:connected(source_id, target_id) table
in congress murano policy which contains directly and
indirectly connected objects in environment.
Closes-Bug: #1434530
Change-Id: If2bab9d91a8dea5b08b231ce95f15af3ccd7f85f
Remove gettextutils in favor of oslo.i18n suite for
internationalization purposes. Wrap murano.common.i18n around
oslo.i18n. Mark all logs messages of levels higher than
DEBUG for translation with _/_LI/_LW/_LE/_LC to conform with
oslo.i18n guidelines.
Change-Id: I09a2e2fc802e404f5c59fa4edd2a2124ad24101a
Implements: blueprint organize-translation
* E128 continuation line under-indented for visual indent
* H501 don't use locals() for formatting strings. to also check
* H402 first line of docstring should end with punctuation
* E122 continuation line missing indentation or outdented
* E713 test for membership should be 'not in'
Change-Id: I4a30350778a4452075e468400effcbc4155d24d8
Adds ModelPolicyEnforcer that calls congress client (added by commit 2ea56d5b).
Enforcer called only when config property set to true (default false).
Integration test will follow in the next commit (https://review.openstack.org/#/c/147515).
Partially Implements blueprint policy-enforcement-point
Change-Id: Ie53b985ba759c3297e2fe2228bd48fce220ea32f