Commit Graph

156 Commits

Author SHA1 Message Date
zhurong 4ee6474502 Fix the exceptions import
Change-Id: I804daa0e2b3c8f7a9d421449afcf1e057b8c63c8
2022-01-17 08:18:10 +00:00
zhurong 035f4e3073 Remove six usage murano/contrib
Change-Id: I55cbf3c09aaf60918d5b97b0e8621b47016d0333
2020-04-19 17:59:38 -07:00
Zuul 5c482cae3e Merge "Sync python-glanceclient version" 2020-04-13 01:42:18 +00:00
Zuul bbc7339e8e Merge "Sync python-magnumclient" 2020-04-13 01:42:16 +00:00
Zuul eb013a31f3 Merge "Sync heat-translator and tosca-parser version" 2020-04-13 01:41:38 +00:00
zhurong 3ae53b7f2f Sync heat-translator and tosca-parser version
Change-Id: I603e2b20798e52808ef32ccd52b5638c15c22d6b
2020-04-11 00:21:22 -07:00
zhurong 0304eb2858 Sync python-glanceclient version
Change-Id: Ie82b9cb003ebb333582d97973e3420de73ae4b13
2020-04-11 00:19:31 -07:00
zhurong 1c02f36cf0 Sync python-magnumclient
Change-Id: Ib5670ca5cb74ce4a86fc7a4731545ce20c395e35
2020-04-11 00:17:27 -07:00
zhurong ac2e17363b Clean muranoartifact py2 support
Change-Id: Ia800fd87df5cb95f95c6758df2dd20060bef62d6
2020-04-11 00:14:18 -07:00
sunqingliang6 dc44b56dd7 fix typos
Change-Id: I01a73325ad1240805f1402352c7244eff3253cc3
2018-06-25 17:15:34 +08:00
Stan Lagun 6674e065da Use secure path join
Change-Id: If0eeef8b025b1f3be863728a8def81d944873ac5
Closes-bug: #1729214
2017-11-01 16:49:05 -07:00
Paul Bourke 9248605e67 Add decryptData yaql function to murano engine
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
2017-07-21 13:32:13 +01:00
M V P Nitesh 580677eedc Replace six.iteritems() with .items()
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
2017-05-03 09:17:18 +00:00
Tetiana Lashchova 6a8e88de82 Use sys.maxsize instead of sys.maxint
The sys.maxint constant was removed in python 3 and now it's
better to use sys.maxsize.
https://docs.python.org/3/whatsnew/3.0.html#integers

Change-Id: I5af1537ae04a16454f20040e01ec64a6454171a2
Closes-Bug: #1628830
2016-09-29 11:57:33 +03:00
Stan Lagun acd269f9b2 Update clients with multi-region support
Clients for various OpenStack services
were updated so that it would be
possible to specify region name explicitly.

If it is not provided then for clients that are
used internally by the core library it is taken
from the current region. Otherwise the default
environment region is used.

Change-Id: I289c7f8dc93a30ba1d5aa06d9da29a6af1308b9a
2016-08-29 13:18:40 -07:00
Jenkins 400b532441 Merge "Fix error in Magnum-app" 2016-07-01 08:42:12 +00:00
Madhuri Kumari 2c165ee7a4 Update namespaces for MagnumBay application
Replace io.murano.apps with com.intel.magnum

Change-Id: I16e3a335209ce5664541abce4be1ac7691bd6cd4
Partially-Implements: blueprint fix-fqn-usage
2016-06-30 20:30:41 +05:30
Madhuri Kumari 65902f9993 Fix error in Magnum-app
Magnum has changed its service name from 'containers' to 'container-infra'
which leads to failure of Magnum-app. So this fix changes the service
name in magnum_plugin.

Change-Id: If6a2d90e0f7071737ebdf722a565353a8b891d01
Closes-bug: #1595511
2016-06-29 23:41:11 +05:30
Tetiana Lashchova d5dc0f476f [Plugins] Updated from global requirements
Change-Id: Ibb8466471acd8a810da7376f87309415b8fed4d0
2016-06-27 16:30:48 +03:00
Jenkins 9b319d0fee Merge "Use a correct config option in example plugin" 2016-06-23 13:37:40 +00:00
Jenkins c720d62da0 Merge "Add io.murano namespace to demo app for example plugin" 2016-06-23 13:37:29 +00:00
Tetiana Lashchova c25ef037ec Use a correct config option in example plugin
CONF does not have option 'api_version'.
Use CONF.images.api_version instead of CONF.api_version.

Change-Id: I44e89023631c43d3cca8213650037de508875cdd
Closes-Bug: #1595220
2016-06-22 17:55:24 +03:00
Tetiana Lashchova 7cc34e831b Add io.murano namespace to demo app for example plugin
Change-Id: I0a7fa28f0b56efa74478ea63fe4060c63957493b
Closes-Bug: #1595207
2016-06-22 17:33:52 +03:00
Tetiana Lashchova 88d92b52e1 Remove version from example and heat-translator plugins
Remove explicit version definition to avoid errors of version mismatch
using pbr.

Change-Id: I73cfef4fb015f9b37a833f059497354af2622032
Closes-Bug: #1595130
2016-06-22 13:28:11 +03:00
Jenkins d68a913cd1 Merge "Update version of source files in cloudify example app" 2016-06-15 11:52:36 +00:00
Jenkins 4ee846902f Merge "Update version of cloudify client in cloudify plugin requirements" 2016-06-15 08:24:25 +00:00
Valerii Kovalchuk 0ce227ea29 Update version of source files in cloudify example app
To work with the latest Cloudify test environment, resource files
of NodeCellar example murano application should have version 3.2.1.
This patch fixes it in the app's README file, so user will use
correct version of files.

Change-Id: I9c663c94a8112512c30f4f7ad8d0f8af5048bf46
Closes-bug: #1587957
2016-06-14 13:51:42 +00:00
Hongbin Lu 596b551520 Magnum plugin: import exceptions robustly
Magnum will remove all modules under magnumclient/openstack [1].
This plugin needs to update the import path.

[1] https://review.openstack.org/#/c/327200/

Change-Id: I3ec10edbaa6ed92d8875f990ca3be6e339d81310
2016-06-08 16:35:24 -05:00
Valerii Kovalchuk badc06234e Update version of cloudify client in cloudify plugin requirements
To be able to use the latest Cloudify test environment, it is
needed to have Cloudify Python client of version 3.2.0.

Change-Id: I006718fd6f458e3c214a5c78701e99a4e348a731
Closes-bug: #1587952
2016-06-01 18:33:25 +03:00
Alexander Tivelkov afa85b3c21 Added package references to generated UIs
Generated UIs of the non-muranoPL packages (HOT, cloudify_tosca and
CSAR) reference the type of object model's object by class FQNs.
However, when these packages are uploaded to glare, their class
contents are not indexed since the client which uploads them has no
knowledge of the generated classes.

To workaround this issue it is proposed to reference objects not just
by class FQNs but to include the package FQN and the version, so the
engine does not have to rely on Glare's indexes.

Change-Id: I6175e89b68bcdfc29d33ae3616d6ecba662f2509
Partial-bug: #1565805
2016-05-24 21:35:46 +03:00
Jenkins 0bae45a31b Merge "Correct wrong import statement in Magnum App" 2016-05-19 12:29:36 +00:00
Madhuri Kumari c659b2dbb5 Correct wrong import statement in Magnum App
This patch fixes a wrong import statement in
contrib/plugins/magnum_plugin/magnum_plugin/__init__.py where it
tried to import client from magnumclient which is actually invalid.

Change-Id: I24a1c03de25e514a870a12f47f478d6b7f816975
Closes-bug: #1572139
2016-05-18 17:30:45 +00:00
Jenkins 1e035214a8 Merge "Remove explicit version from magnum plugin" 2016-05-18 10:51:25 +00:00
Valerii Kovalchuk ca9a6ed261 Remove explicit version from magnum plugin
Remove explicit version definition to avoid errors of version mismatch
using pbr.

Change-Id: I19a263d0e66bcbcddc1a9d6fdd4457b708e45bd9
Closes-bug: #1572123
2016-05-06 15:50:38 +03:00
ZhiQiang Fan 2460acb793 [Trivial] Remove unnecessary executable privilege
There are modules, not script, no need to set executable flag.

Change-Id: I93cb22ead401d2fa1f2d90dcee5bf01a89a3430f
2016-04-29 20:03:02 +08:00
Jenkins a4721781ee Merge "Fix error on deleting Magnum App" 2016-04-17 20:01:47 +00:00
Stan Lagun 612a25371d Heat stack deletion for HOT/TOSCA packages was fixed
HeatStack class expects to be owned by some other and uses it to find
OpenStack region name it belongs to. If there is no owner provided then
the default region is used which is random for multi-region setups.

MuranoPL code that was generated from HOT and TOSCA provided that owner
on "deploy" phase but not on "destroy". So the stack that was
successfully created earlier could never be deleted in multi-region
OpenStack installations for non-default region.

Change-Id: I19ca0c7129b073fdd852b22a6a7f84f7ee377ee7
Closes-Bug: #1565777
2016-04-05 15:33:06 +00:00
Tetiana Lashchova 73370b658d Fix links for samples in heat-transtator plugin
Change-Id: I6d225047c21deda43435d7171b9b7b5e8811399b
2016-03-31 17:32:26 +03:00
Madhuri Kumari 49893c833f Fix error on deleting Magnum App
Currently Murano fails to delete Magnum bay due to missing
bay_ident attribute in case when Magnum bay status is CREATE_FAILED.
This patch fixs this issue.

Change-Id: Iecbd0464bd8839f1a9f9ce428d7eaa1e130c9b2d
Closes-bug: #1566725
2016-03-21 15:00:29 +05:30
Jenkins 256344bd02 Merge "App to deploy Magnum Bay." 2016-03-17 01:18:43 +00:00
Madhuri Kumari b87dbb4e96 App to deploy Magnum Bay.
This app uses python-magnumclient to deploy a Magnum Bay.
This bay can any of Kubernetes, Swarm and Mesos.

Change-Id: Ifa8ad6142c86c416fb7cbadc07d548061c18f79b
Partially-Implements: blueprint magnum-murano-rationalization
2016-03-16 23:28:47 +03:00
Vahid Hashemian c812ace2fe Import and deploy TOSCA CSAR packages
Add a custom plugin to support importing Murano application definition
archives of TOSCA CSAR files into Murano application catalog, and
deploy them through the catalog to Heat.

Co-Authored-By: Tetiana Lashchova <tlashchova@mirantis.com>
Change-Id: Ibb9b7f22853040ef1c453db2cebae727f6514286
Partially-Implements: blueprint support-tosca-format
2016-03-16 05:47:26 +00:00
Stan Lagun 322ba88742 Added property to associate environment with OS region
The Environment class got two additional properties:

region - name of the region where environment should be deployed. If
null then home region is used.

regionConfigs - config property (taken from class config) that specifies
region parameters. It is a dictionary of a form regionName -> regionSettings.
Currently the only setting available is a agentRabbitMq that is itself
a dictionary containing the same options as [rabbitmq] section of murano.conf

Thus the configuration file io.murano.Environment.yaml may look like:

 regionConfigs:
   RegionOne:
     agentRabbitMq:
       host: rabbitMqHostName
       port: 5672
       login: murano
       password: murano
       virtual_host: /
       ssl: false
       ca_certs: null

Implements Blueprint: assign-environment-to-region
Change-Id: I3c84c96f8eeae738f83ed7b3691be38100b30e1d
2016-03-03 18:25:47 +03:00
Stan Lagun 4f9ab7a321 Refactoring of smart-types defined in DSL
* MuranoType and MuranoObjectParameterType smart types
  were merged into a single smart type because their functionality overlap
  to a large degree. New smart type is called MuranoObjectParameter
* Other smart types were renamed to have the same name pattern:
   ThisParameterType -> ThisParameter,
   InterfacesParameterType -> InterfacesParameter
* For MuranoObjectInterface instead of saying obj.data().propertyName
   the syntax now is obj.properties.propertyName

Change-Id: I3c925d1ba1a4ac0864987377a3e90c6f166823a7
2016-02-25 02:06:38 +03:00
Stan Lagun fc76b3b1b4 Major refactoring of how OS clients are created and managed
* 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
2016-02-20 17:59:11 +03:00
Kirill Zaitsev 93931f487c Update glare definitions path
Glare has been moved to a separate service and has been
renamed/refactored into glare namespace. This commit updates murano
plugin accordingly.

Related bp: move-v3-to-glare

Change-Id: Ie51440ef7dab044f2ac3ab1f06cbf93402cf1103
2016-02-12 17:32:51 +03:00
venkatamahesh 92b1fc2b37 Use uppercase 'S' in OpenStack
Change-Id: I9cf21e65045f07a2b0ca3e6cdd6afcf54bbfc589
2016-02-04 15:34:53 +05:30
Ravi Shekhar Jethani 7ea4442e9c Fix import order of modules
Make corrections in import order for six, yaml, eventlet and
greenlet as per OpenStack import standards [1].

[1] http://docs.openstack.org/developer/hacking/#import-order-template

Change-Id: I26feb4adb81e8b07a7a36ac7f0a6235536a8c119
2016-01-24 23:34:03 -08:00
Jenkins b18eb81329 Merge "Python3:Replace iter.next() with next(iter)" 2016-01-19 03:58:54 +00:00
Bo Wang af8a9f10b2 Python3:Replace iter.next() with next(iter)
function next() of iterator is not available in python3.
ref:http://www.diveintopython3.net/porting-code-to-python-3-with-2to3.html

Targets blueprint: murano-python-3-support

Change-Id: I8cb74520187ba532ad98b86b6ac15737a6cc9bee
2016-01-19 00:46:16 +08:00