Commit Graph

21 Commits

Author SHA1 Message Date
Jeremy Stanley 398b2d86d5 Tenant to project migration for RequestContext
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
2022-03-29 12:43:00 +00:00
zhurong 5470550b5e Let admin can delete user's environment
Now admin can see the list of user's environments,
but can't delete them. There will gives the 403 Forbidden.
This patch let admin can delete user's environment.

Change-Id: Ic208ae586427bb3eb9ce4749870158ccdfb09d76
Closes-Bug: #1654103
2017-01-11 17:46:53 +08:00
LiuNanke af7d1cdedb Use method ensure_tree from oslo.utils
we don't have to def ensure_tree, because Oslo.utils 1.8
provides the function and just use it.I also deleted the
code in tests/unit/.

Change-Id: I61e9d87e6dde5b7a52e7b6399f4be6e8d5fca340
2016-11-14 19:45:48 +08:00
zhangyanxian efc1d695e9 Fix a typo in utils.py
TrivialFix

Change-Id: Ia22e31c78abf45fb9e7bff144c41f19c961dab28
2016-09-21 09:31:06 +00:00
OpenStack Proposal Bot bc8943c8cc Modified docstrings to comply with pep8 H405 style check
Closes-Bug: #1563270

Change-Id: I987d846f1a86ecee1fcfb0f99877563a10481478
2016-05-10 20:18:23 +00:00
Kirill Zaitsev 39409c6ff0 Allow murano to run under windows
fcntl module is only needed on non-windows OS's and is not available on
windows. This commit restores ability to launch murano under windows.

Implements bp: murano-engine-package-cache

Change-Id: I70a17070b9c80d4f220f459a732ecf45f9d70e81
2016-02-01 16:58:01 +03:00
Kirill Zaitsev 4da3b5751a Attempt deleting stale packages from cache at download time
This commit modifies cleanup method of API package loader to include
cleaning up of stale downloaded packages. This is done with respect to
IPC and green-thread usage locks.

Implements blueprint: murano-engine-package-cache

Change-Id: I09a08c3646c32666893b5ed35463f8ec5e413284
2016-01-28 14:15:05 +03:00
Akanksha 1ca86fd418 Return 403 instead of 401 HTTP Response
401 Unauthorized is the HTTP status code used for authentication
errors for eg. Missing or Bad Authentication. 403 Forbidden
response is used for denying permission to access resources
for a correctly authenticated user.
This fix corrects the mistake in the api.

Change-Id: I0903b226cfe32a7aed69d265a27ca21d7cc9b98e
Closes-Bug:1477013
2015-10-23 19:21:27 +05:30
Nikolay Starodubtsev 975bcc4a98 Log refactoring close to new logging spec
* correct log levels
* correct log messages

partial-bug: 1419872
partial-implements-bp: unified-style-logging

Change-Id: I80c2b4c809dc52125f9f4a3beec0cd3b6c4c1213
2015-09-09 20:54:26 +03:00
Ekaterina Chernova 9702e9914a Update response codes to expected ones
When session id or body were not provided - forbidden code was raised.
That may lead to confusion and make debuggind difficult.

This commit fixes error codes and provides explanation is responses.

API specification is updated.

Closes-Bug #1491785

Change-Id: I87d60a1a7d049ee7d482dd76ceeb9f446b452fca
2015-09-09 16:32:29 +03:00
Kirill Zaitsev b2b224ce48 Check session validity during env show api call
Moves the session check to utils file, together with check_env and
applies the check during environment show API call, thus raising correct
errors in case supplied session id is invalid or belongs to a different
environment

Change-Id: Ic10956b604cfc7243f07774e9da11caaf18794cd
Closes-Bug: #1481099
2015-08-05 02:10:48 +03:00
leizhang f7dc6cb0a5 Remove duplicated check env code
Remove duplicated check environment code, use verify_env decorator or
check_env from utils. Note that tenant checks now return 403 instead 
of 401.

Closes-Bug: #1479570
Change-Id: I1964a9933394df133ab0559542f0c5dafd56e9a6
2015-07-31 01:25:16 +00:00
leizhang b5b39becc0 Check tenant id during abandoning of an env
Add code to check whether current tenant matches the env's tentant

Change-Id: Ia6c291261de8951dc779394b993e646ed0c0a9d9
Closes-Bug: #1464219
SecurityImpact
2015-07-22 11:14:24 +08:00
Nikolay Starodubtsev de5ed2115a Switch to oslo_log
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
2015-07-15 11:20:45 +03:00
Henar Muñoz Frutos 58dbdd25d3 Functional tests for environment template functionality
It has the functional tests for the blueprint environment-template, including the management
of environment templates (creation, deletion, updating) and the creation of an environment
from the template.

Change-Id: I8fc5c7e1f6a4354b47f087fe141442ab604cfdd9
2015-03-18 09:08:18 +01:00
Henar Muñoz Frutos ee92ea2b78 Extension API for environment templates
Change-Id: I505faef25b8b7062e37725331222ef9729492e3f
2015-03-02 10:40:38 +01:00
Kirill Zaitsev 4e036191ff Use oslo.i18n for translation
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
2015-02-19 18:51:22 +03:00
Dmitrii Dovbii a55acc1266 Remove #noqa from gettextutils imports
Removed #noqa from gettextutils and added them to import_exceptions.
I think it is better to specify option in one place (tox.ini) than
every time take care that you do not forget to specify this tag.

Also removed a few unused imports that were revealed in the process.

Change-Id: Ic4ca9cf374870075a36b88269ff8aea5a8e24a90
2014-11-14 19:43:14 +02:00
Stan Lagun c301b5e763 Environment in delete failed state was in progress forever
Deletion sessions were in 'deploying' state instead of 'deleting'.
Because of this such sessions could not be found by RPC result
processing code and remained in 'deploying' status causing UI
to display progress bar forever.

Also there were 2 duplicate SessionStates enums in the code with
and the second copy was outdated and didn't contained DELETING
status as well as other new session statuses. Because buggy code
was using that outdated enum it was necessary to merge both enums
into single declaration

Change-Id: I852f1f3dd1051c7b40afaa2575a4335b0f3c3104
Closes-Bug: #1386068
2014-11-10 18:43:55 +00:00
Stan Lagun 56b2d5df27 Fixes silent deletion of environments
Now environment deletion is done as a regular deployment that can fail.
Environments that are deleted, but deletion process has failed remain in database
and shown in dashboard with status 'delete failure'. Environments that are being deleted
has status 'deleting' and do not disappear before they really got deleted on engine side

Also improved status reporting for environments. Now it also reports status of last deployment -
'deploy failure', 'delete failure'

P.S. Functional tests were slightly refactored and fixed to reflect changes
in deletion logic

Change-Id: I05625dd71f7ca9559bb88319b26b122214f15019
Closes-Bug: #1325101
2014-08-19 12:52:52 +04:00
Ruslan Kamaldinov 86a4c4710d Rename muranoapi to murano
Partially-implements blueprint: rename-murano-api-to-murano

Change-Id: I2d7f52ef4073bce800cedc77f81f5d242c4d5d98
2014-05-27 15:14:44 +04:00