Commit Graph

11 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
Alexander Tivelkov 81eebd12ad Ability to retrieve current/owner user/project
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
2016-11-24 02:07:34 -08:00
Felipe Monteiro bf586063f3 Fix invalid SessionState.deploying reference in services actions.
Currently, update_task in murano.services.actions references
SessionState.deploying, which is invalid.

Change-Id: Idab7138c877e10987e7edf2c3a845897b2219a93
Closes-Bug: #1629361
2016-09-30 11:21:13 -04:00
Valerii Kovalchuk 7d186c191d Implement API call and RPC call for static actions
Static public methods can be called synchronously through the
API call without creating environment, object instances and
database records. It is proposed to make RPC call as the single
request-responce for now.
However async API and RPC calls may also be implemented later
exploiting the same pattern as for calling instance methods.
New call can be done through client method (see
Ib6a60f8e33c5d3593a55db9f758e94e27f0a4445)
Tempest and unit tests are added.

APIImpact
Implements: blueprint static-actions
Change-Id: I17ab2eba0fd6c42309667f42d0644d21940ab02d
2016-07-07 17:21:59 +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
zhurong c4d1f7e687 Remove arguments "{}" and "[]" in function definitions
remove mutable default arguments "{}" and "[]" in function definitions
refer to:http://docs.python-guide.org/en/latest/writing/gotchas/

Change-Id: Ib03d9820a259b2cbd83aa8bd675ac6153cf78ebd
Closes-Bug: #1527080
2015-12-19 01:10:30 +08:00
Andrew Pashkin 2106494d41 Fixed 500 error in get_result API handler
If there is no task in DB with environemnt id and task id passed in
handler, a server error was returned by the API.

This patch fixes this bug.

Closes-Bug: #162206
Change-Id: I9fd84a963a1eacf8ab2aa428cfb4365f80fff02b
2015-03-26 15:59:19 +00:00
Stan Lagun 73f8368024 Adds API to obtain action result
Also adds File type to core library for common convention type for files

Partially implements: blueprint actions-return-result

Change-Id: I5cbfb9ed6f4ae56e931815841f9c042f25a1d0ca
2015-03-02 14:08:36 +03: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
Ekaterina Fedorova d6a3a2b2e6 Enable H202, H402, H404 rules
* H202 assertRaises Exception too broad
* H402 one line docstring needs punctuation
* H404 multi line docstring should start without a leading new line

Change-Id: I2f662b8b97d14daa501620c8237bf93bd2251243
2014-09-01 09:10:51 +00:00
Stan Lagun e47ef4e849 Adds REST API endpoint for action execution
Deployment is replaced with a more generic concept called 'action'.
Action can be performed on any object of Object Model.
Actions are marked with 'Usage: Action' in MuranoPL code. They can have arguments.
List of available actions can be obtained from Object Model itself after initial deployment.
This commit adds ability to REST API invoke actions by providing its unique id (from OM) and parameters.
Also refactors API code to use tasks.

Change-Id: If21809340bb799af58a8d1a2d148e52565028970
Partially-Implements: blueprint application-actions
2014-08-27 17:09:29 +04:00