Commit Graph

55 Commits

Author SHA1 Message Date
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
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
Ravi Shekhar Jethani
d99904e38b Python3: Replace dict.iterkeys with six.iterkeys
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: I172e257d0b8a89eff89e35a2f87bb42d769cad62
2016-01-18 10:27:23 +00:00
Ravi Shekhar Jethani
859888d62a Python3: Replace dict.iteritems with six.iteritems
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
2016-01-15 03:15:23 -08:00
Jenkins
a8aa604c06 Merge "Fix error in app io.murano.apps.demo.DemoApp" 2016-01-14 23:47:47 +00:00
Madhuri Kumari
91a683ba1e Correct filename
File contrib/plugins/murano_exampleplugin/requiremenets.txt has been
named incorrectly. This patch corrects the name to
contrib/plugins/murano_exampleplugin/requirements.txt.

Change-Id: I7b0de987fed334b4bde0b31d85ae3f8915db744b
2016-01-12 09:50:03 +00:00
Madhuri Kumari
c3e99f1bb1 Fix error in app io.murano.apps.demo.DemoApp
Deployment of io.murano.apps.demo.DemoApp fails due to
wrong arguments passed to get_client method.
This patch fixes the problem.

Change-Id: Ic6aa9d9cdc03eec4b9670445c5d978ea80202953
Closes-Bug: #1532724
2016-01-11 15:53:47 +05:30
Stan Lagun
e3e5a74a6d Documentation for Cloudify plugin and example application
Documentation was improved and re-formatted.
Also LICENSE file for the plugin itself was added (previously
only demo application had it)

Change-Id: Ie0b3618ee8c25cdea4ab12fcae1b95257bf7cb85
2015-11-12 04:27:09 +03:00
earthmant
9e05008d2d Adding Cloudify apps library and Example App
Cloudify Application library package required for all Cloudify applications.
Example Application is for people to try it out in their murano instance.

Partially-Implements: Blueprint support-tosca-cloudify-format
Change-Id: I877423e53d93e3062ed34f7de4d0a33f9093ac0a
2015-11-02 15:29:47 +00:00
earthmant
44778cfc14 Adding the Cloudify Plugin Files
This plugin allows murano to deploy TOSCA applications using Cloudify.

Partially-Implements: Blueprint support-tosca-cloudify-format
Change-Id: I9eee5546016cea6503383b39536aee956597ed36
2015-11-02 15:29:36 +00:00
Stan Lagun
55f3c3e5ab Adds plugin dependency for plugin demo app
Change-Id: I1c62a4429ffa7fe1fc9a65e8618c921b46a95b10
Closes-Bug: #1506418
2015-10-15 13:37:24 +03:00
Alexander Tivelkov
e49b22b6b5 Fixed a typo in example plugin config
Wrong config section was returned by the init_config function which
could potentially cause exceptions during plugin loading.
This has been fixed.

Change-Id: I41883507225c8df0a8d0c17c1c3b8dabc66d055b
2015-10-14 18:37:40 +03:00
Alexander Tivelkov
df95ad397e Added the support of Glance Artifact Repository
Murano's application packages can now be stored either in database
(using murano-api) or in Glance Artifact repository (so-called Glance
V3 api). This patch adds an experimental support of the latter
approach to murano engine.

As all the difference between these two storages is incapsulated in
the murano client, engine just needs to configure it properly by
passing an instance of glance v3 client on creation. This is
controlled by a 'packages_service' parameter of 'packages_opts'
configuration group. It is set to 'murano' by default and indicates
the usage of old, database-backed storage. If set to 'glance', the
murano client will encapsulate glance v3 connector and thus the
packages will be accessed from Glance Artifact Repository.

The settings of Glance client are also added to the configuration, as
well as a client factory to generate the client. As these settings may
now conflict with the settings "demo plugin", the appropriate
configuration section is renamed in the latter.

This patch also contains a couple of utility functions to transform
partial semver version specs into non-partial ones and - further - to
a set of Glance query parameters needed to filter the artifacts based
on that spec.

Change-Id: I690467e43b6b63850ebecef756635241e623554c
Implements-blueprint: artifact-repository-support
2015-09-09 19:15:25 +00:00
Stan Lagun
425766a7f8 Migration to yaql 1.0
* Code migrated to yaql 1.0.0
* New MuranoPL object initialization
* Lots of refactoring

See referenced specs for more information

Implements: blueprint migrate-to-yaql-vnext
Implements: blueprint object-construction
Depends-on: I7f314634ab5f08a521e51082d5c84dffca4b0b5c
Closes-Bug: #1454264

Change-Id: I740a4f83c76d8b56a1da585a739d770ef823a524
2015-08-25 16:08:08 +03:00
Nikolay Starodubtsev
65301e5a40 Fix minor typos in murano example plugin
While switching from murano.common.config to oslo_config some
entries were missed. This patch fixes it.

Change-Id: I13998aa60b424cc314c4af77bfbac808d29023f1
2015-08-07 16:39:53 +03:00