As of the oslo.context 4.0.0 release, RequestContext objects no
longer have a tenant attribute, instead expecting callers to use
project_id for that purpose. Update all context.tenant references to
context.project_id in order to facilitate this transition.
Change-Id: I2830ccf840bf4d1d8a516287adee51c46d2a5583
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
Probably the most common format for documenting arguments is reST field
lists [1]. This change updates some docstrings to comply with the field
lists syntax.
[1] http://sphinx-doc.org/domains.html#info-field-lists
Change-Id: I75a16629617c4e96ec2983108642025319d3deca
Added an ability to retrieve information about the current user,
current project, environment owner (both user and project)
from keystone. Appropriate information (including
extra fields but excluding internal system data) is fetched from
Keystone using the same service credentials that are used to validate
tokens, create trusts etc.
- io.murano.User and io.murano.Project classes were added.
- Both classes have 2 static methods to get current and environment
owner object of appropriate class
- Object model now contains project_id/user_id of the user who
created the environment
- Deployment task contains project_id (renamed from tenant_id)
and user_id of the user who initiated the deployment
Change-Id: Ic7e24c1d2b669ed315851047bcdb27e075cfc56b
Previously, list packages with parameter 'search',
search content in any attributes, but packages are unordered
With this change, packages are ordered.
Such as: list package with 'search=mysql'
the packages whose name like 'mysql' are ahead of others
whose afn like 'mysql',and so on
Change-Id: Iecc3038ac40e731788975cff0cdf7d42e7f97112
Closes-Bug:#1467487
Previously the statservice saved db with the error, because
requests_per_tenant was a dictionary. JSON.dumps() fixes it.
Change-Id: Iee92d9fa1ebbec3e28fc37b8252b3e3d88a8d995
Closes-Bug: #1632619
Since environment edits are implemented with jsonpatch which is unable
to replace non-existing dictionary keys it is better to initialize
environments with already existing 'metadata' block, so it may be
modified without ned to care about its existence.
Targets-blueprint: metadata-assignment-and-propagation
Change-Id: I04922b5933de388a16bc1f3b59008aad426a9aff
models.ApiStats.
Currently, stats.Statistics.create() erroneously sets 2 incorrect
attributes for an instance of models.ApiStats. These attributes
are:
1) `stats.request_per_tenant`
2) `stats.request_per_second`
These attributes have been changed to:
1) `stats.requests_per_tenant` (plural)
2) `stats.requests_per_second` (plural)
This change aligns with the currently correct attribute reference:
- `stats.errors_per_second`
These changes also align with the correct attribute definitions
in models.ApiStats which are: `requests_per_tenant` (plural)
and `requests_per_second` (plural), respectively.
Change-Id: I7c8a0ff2580ee4d5e8f5336425ed1af040a97e8a
Closes-Bug: #1630782
in cf_connections.
An unexpected keyword, 'synchronized', is passed to the
function delete from delete_environment_from_space.
This fix removes 'synchronized' arg from the call to
delete.
Change-Id: I065dc1a81dc0c23cc9a264399a99255e8272b07d
Closes-Bug: #1630747
Rewrite docstrings in murano/common/wsgi.py to make it
more clear. Fix typo in other files.
TrivialFix
Change-Id: Iaa6bde5f3b0356b6ac9e67f39ebf0f7feff4ee45
Previously we changed description column in environment
table from TEXT to LONGTEXT but forgot to do the same
for similar column in the task task table
Change-Id: I3a2bd0204a9fac2d583d8742ca72868bd20c49b4
Closes-Bug: #1616997
Expose a new [networking]/driver option to allow overriding the
network driver.
Our use case is that we have multiple external networks and
floating IP pools in our cells environment, which Murano does not
yet allow you to select. This option allows us to move back to
Nova networking where we have code to handle this automatically.
Change-Id: Ic4e806dc72283fce6348ab1e2966ba3a618f91dc
Closes-Bug: #1617096
In some part in the code we import objects.
In the Openstack style guidelines they recommend to import only modules.
http://docs.openstack.org/developer/hacking/#imports
Change-Id: I80c70abd2f6973e1285eb7af2871d40d0a276712
1.Add the devstack support for new cfapi
2.service broker use separate paste file
3.service broker use separate db
Closes-Bug: #1500777
Closes-Bug: #1500827
Change-Id: I2842828fe14878e6ff5ac194473f2ffa619370df
partial-implement: bp separate-service-broker-from-murano
Current environment and environment template information miss a description
field to describe its functionality. Fixing this request implies to provide
an extra field in both environment and environment template for that
information, for instance called text, since description includes the object json.
Change-Id: Ic7dc5f420f453a3f4fa2769860b4a603ab14eaad
Closes-Bug: #1588276
Updating an application/service in a environment template
does not work and return 404 error. This patchs solves that
bug.
Change-Id: I03f51c45512c4282ef99ddc1ed9ba55460827a94
Closes-Bug: #1587833
Deleting an application/service in a environment template
does not work and murano got blocked. This patch solves that
bug.
Closes-Bug: #1587809
Change-Id: I871e3b0eca82c14354b9c7ff2abce90da7cb21b0
1) Create separate config use the separate config.py
to use: tox -egencfconfig
2) Create separate db for murano service broker
to use: tox -e venv murano-cfapi-db-manage \
--config-file etc/murano/murano-cfapi.conf upgrade
Change-Id: Ifd3551ace000e496d99725f46dbead62f7ef64b0
partial-implement: bp separate-service-broker-from-murano
Create all stuff which is needed for cf db migration: models, migration
This will be used to generate a new service broker db.
This is the first step in separation service broker db from
murano db.
partial-implement: bp separate-service-broker-from-murano
Change-Id: I2a71c0e864fb806c73287293eac04746ef6b2cae
We use DATETIME SQL type for created/updated columns
everywhere through the database. In SQL standard
DATETIME defaults to DATETIME(6) which is 6 digit
fraction second part. However MySQL defaults it
to DATETIME(0) for backward compatibility. In result
status messages timestamps get rounded to the
second boundary and if there are several status
messages were generated within a second
after table sort they might be shown in a different
order.
This commit adds MySQL migration that increases
resolution for the status table and adds subseconds
to the generated status repor timestamps.
Change-Id: Ice8c2d82c6a320c7f73c27f4c60c87bef55b8d95
Related-Bug: #1462270
Object model is stored in database in the columns of type TEXT. In
MySQL database this type of column is limited by default and cannot
hold data structures which are large enough.
This patch adds an extra migration which alters appropriate columns in
database when the mysql is used. The column type is explicitly set to
LONGTEXT.
Change-Id: Ic04fb99469edc087cc12d4c78a983484ae49a6c1
Closes-bug: #1567863
* 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
Add `session.begin(nested=True` inside get tags to prevent duplicate
tags creation if murano executes in amount of threads.
Change-Id: I10968e2f2f758a5904943d273a9302a5cfb1a8c9
Closes-Bug: #1498097
The current command used for alter a column (drop or alter) missing
the compatibility with sqllite. Solution, pass by using batch alembic.
Read http://alembic.readthedocs.org/en/latest/batch.html for more info.
Change-Id: I32c5cecaad111f2bde559de74ecefa339739b994
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
Search with name only matches package name and
search with keyword can matches names, tags ..etc
Change-Id: Ia86befcf0a126f4e532c847df44170a898b38824
Closes-Bug: #1500865