[10/10] incubator-ariatosca git commit: ARIA-254 Create of multiple nodes per template

2017-06-16 Thread emblemparade
ARIA-254 Create of multiple nodes per template

* New aria.Scaling policy (and "scaling" role)
* NodeTemplate model no longer stores scaling values (default_instances,
etc.) but instead fetches them from applicable scaling policies
* Some code cleanup


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/b7ec71e6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/b7ec71e6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/b7ec71e6

Branch: refs/heads/ARIA-254-multiple-nodes-per-template
Commit: b7ec71e62b588385dc95e7c284011c7949de57b6
Parents: e6cf67e
Author: Tal Liron 
Authored: Thu Jun 1 14:17:17 2017 -0500
Committer: Tal Liron 
Committed: Fri Jun 16 17:27:32 2017 -0500

--
 aria/cli/commands/workflows.py  |   4 +-
 aria/cli/execution_logging.py   |   4 +-
 aria/core.py|   2 +-
 aria/modeling/orchestration.py  |  12 +-
 aria/modeling/relationship.py   |   2 +-
 aria/modeling/service_changes.py|   8 +-
 aria/modeling/service_common.py |   2 +-
 aria/modeling/service_instance.py   |  59 +++
 aria/modeling/service_template.py   | 153 +--
 aria/modeling/types.py  |   4 +-
 aria/orchestrator/workflow_runner.py|   2 +-
 aria/orchestrator/workflows/executor/celery.py  |   2 +-
 aria/orchestrator/workflows/executor/process.py |   2 +-
 aria/orchestrator/workflows/executor/thread.py  |   2 +-
 aria/storage/core.py|   2 +-
 .../profiles/aria-1.0/aria-1.0.yaml |  25 ++-
 .../simple_v1_0/assignments.py  |   8 +
 .../simple_v1_0/data_types.py   |  22 ++-
 .../simple_v1_0/definitions.py  |   8 +
 .../aria_extension_tosca/simple_v1_0/filters.py |   2 +
 .../aria_extension_tosca/simple_v1_0/misc.py|  10 ++
 .../simple_v1_0/modeling/__init__.py|   3 -
 .../simple_v1_0/presentation/extensible.py  |   1 +
 .../presentation/field_validators.py|  20 +++
 .../simple_v1_0/presentation/types.py   |   2 +
 .../simple_v1_0/presenter.py|   3 +-
 .../simple_v1_0/templates.py|   8 +-
 .../aria_extension_tosca/simple_v1_0/types.py   |  10 +-
 tests/end2end/test_hello_world.py   |   2 +-
 tests/end2end/test_nodecellar.py|   2 +-
 tests/mock/models.py|   8 +-
 tests/modeling/test_mixins.py   |   3 -
 tests/modeling/test_models.py   |  20 +--
 tests/orchestrator/context/test_operation.py|   2 +-
 .../node-cellar/node-cellar.yaml|   1 +
 .../node-cellar/types/openstack.yaml|   3 +-
 36 files changed, 286 insertions(+), 137 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b7ec71e6/aria/cli/commands/workflows.py
--
diff --git a/aria/cli/commands/workflows.py b/aria/cli/commands/workflows.py
index 221dbc4..baab973 100644
--- a/aria/cli/commands/workflows.py
+++ b/aria/cli/commands/workflows.py
@@ -42,7 +42,7 @@ def show(workflow_name, service_name, model_storage, logger):
 logger.info('Retrieving workflow {0} for service {1}'.format(
 workflow_name, service_name))
 service = model_storage.service.get_by_name(service_name)
-workflow = next((wf for wf in service.workflows.values() if
+workflow = next((wf for wf in service.workflows.itervalues() if
  wf.name == workflow_name), None)
 if not workflow:
 raise AriaCliError(
@@ -91,7 +91,7 @@ def list(service_name, model_storage, logger):
 """
 logger.info('Listing workflows for service {0}...'.format(service_name))
 service = model_storage.service.get_by_name(service_name)
-workflows_list = sorted(service.workflows.values(), key=lambda w: w.name)
+workflows_list = sorted(service.workflows.itervalues(), key=lambda w: 
w.name)
 
 defaults = {
 'service_template_name': service.service_template_name,

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b7ec71e6/aria/cli/execution_logging.py
--
diff --git a/aria/cli/execution_logging.py b/aria/cli/execution_logging.py
index 248ff7c..467123c 100644
--- a/aria/cli/execution_logging.py
+++ b/aria/cli/execution_logging.py
@@ -106,11 +106,11 @@ def stylize_log(item, mark_pattern):
 if item.task:
 # operation task
 implementation = item.task.function
-inputs = 

[04/10] incubator-ariatosca git commit: ARIA-275 Update NFV profile to csd04

2017-06-16 Thread emblemparade
ARIA-275 Update NFV profile to csd04

This update was done according to:
http://docs.oasis-open.org/tosca/tosca-nfv/v1.0/csd04/tosca-nfv-v1.0-csd04.html

We resolved some inconsistencies of csd04 with the TOSCA spec, and within csd04 
itself. Wherever we resolved such inconsistencies, we added a detailed
comment describing our reasoning.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/1e883c57
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/1e883c57
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/1e883c57

Branch: refs/heads/ARIA-254-multiple-nodes-per-template
Commit: 1e883c57abb733b10e13f0b7005cf564886d3fb1
Parents: 22f6e9e
Author: Avia Efrat 
Authored: Sun Jun 4 22:11:10 2017 +0300
Committer: Avia Efrat 
Committed: Mon Jun 12 22:24:04 2017 +0300

--
 .../profiles/tosca-simple-1.0/artifacts.yaml|   8 +-
 .../profiles/tosca-simple-1.0/capabilities.yaml |   2 +-
 .../profiles/tosca-simple-1.0/data.yaml |   2 +-
 .../profiles/tosca-simple-1.0/groups.yaml   |   2 +-
 .../profiles/tosca-simple-1.0/interfaces.yaml   |   2 +-
 .../profiles/tosca-simple-1.0/nodes.yaml|   2 +-
 .../profiles/tosca-simple-1.0/policies.yaml |  10 +-
 .../tosca-simple-1.0/relationships.yaml |   2 +-
 .../tosca-simple-nfv-1.0/artifacts.yaml |  84 +
 .../tosca-simple-nfv-1.0/capabilities.yaml  |  99 ++
 .../profiles/tosca-simple-nfv-1.0/data.yaml | 305 ++---
 .../profiles/tosca-simple-nfv-1.0/groups.yaml   |  56 
 .../profiles/tosca-simple-nfv-1.0/nodes.yaml| 323 ---
 .../tosca-simple-nfv-1.0/relationships.yaml |  37 +--
 .../tosca-simple-nfv-1.0.yaml   |   2 +-
 15 files changed, 604 insertions(+), 332 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/1e883c57/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/artifacts.yaml
--
diff --git 
a/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/artifacts.yaml 
b/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/artifacts.yaml
index af99340..cfb0df5 100644
--- a/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/artifacts.yaml
+++ b/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/artifacts.yaml
@@ -17,7 +17,7 @@ artifact_types:
 
   tosca.artifacts.Root:
 _extensions:
-  shorthand_name: Root # ARIA NOTE: ommitted in the spec
+  shorthand_name: Root # ARIA NOTE: omitted in the spec
   type_qualified_name: tosca:Root
   specification: tosca-simple-1.0
   specification_section: 5.3.1
@@ -41,7 +41,7 @@ artifact_types:
   
   tosca.artifacts.Deployment:
 _extensions:
-  shorthand_name: Deployment # ARIA NOTE: ommitted in the spec
+  shorthand_name: Deployment # ARIA NOTE: omitted in the spec
   type_qualified_name: tosca:Deployment
   specification: tosca-simple-1.0
   specification_section: 5.3.3.1
@@ -67,7 +67,7 @@ artifact_types:
   
   tosca.artifacts.Deployment.Image.VM:
 _extensions:
-  shorthand_name: Deployment.VM # ARIA NOTE: ommitted in the spec
+  shorthand_name: Deployment.VM # ARIA NOTE: omitted in the spec
   type_qualified_name: tosca:Deployment.VM
   specification: tosca-simple-1.0
   specification_section: 5.3.3.4
@@ -85,7 +85,7 @@ artifact_types:
   
   tosca.artifacts.Implementation:
 _extensions:
-  shorthand_name: Implementation # ARIA NOTE: ommitted in the spec
+  shorthand_name: Implementation # ARIA NOTE: omitted in the spec
   type_qualified_name: tosca:Implementation
   specification: tosca-simple-1.0
   specification_section: 5.3.4.1

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/1e883c57/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/capabilities.yaml
--
diff --git 
a/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/capabilities.yaml 
b/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/capabilities.yaml
index 0b81a16..30abe10 100644
--- 
a/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/capabilities.yaml
+++ 
b/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/capabilities.yaml
@@ -17,7 +17,7 @@ capability_types:
 
   tosca.capabilities.Root:
 _extensions:
-  shorthand_name: Root # ARIA NOTE: ommitted in the spec
+  shorthand_name: Root # ARIA NOTE: omitted in the spec
   type_qualified_name: tosca:Root
   specification: tosca-simple-1.0
   specification_section: 5.4.1


[06/10] incubator-ariatosca git commit: ARIA-54 Prepare for ARIA packaging

2017-06-16 Thread emblemparade
ARIA-54 Prepare for ARIA packaging

Preparations for ARIA packaging:
 - Added CHANGELOG file
 - Added CONTRIBUTING file
 - Added DISCLAIMER file
 - Updated Makefile
 - Converted README from md to rst for PyPI compatiability
 - Removed outdated TODO file
 - Added long_description, download_url to setup.py metadata
 - Modified setup.py url metadata to point at ASF domain
 - Added more badges to README


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/e6cf67ec
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/e6cf67ec
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/e6cf67ec

Branch: refs/heads/ARIA-254-multiple-nodes-per-template
Commit: e6cf67ec1230bf46febc11d65122ee3c0eeebc10
Parents: 2149a5e
Author: Ran Ziv 
Authored: Mon Jun 5 13:24:49 2017 +0300
Committer: Ran Ziv 
Committed: Thu Jun 15 12:03:59 2017 +0300

--
 CHANGELOG.rst |   4 ++
 CONTRIBUTING  |   3 +
 DISCLAIMER|  10 
 MANIFEST.in   |  10 +++-
 Makefile  |  56 --
 README.md | 120 --
 README.rst| 140 +
 TODO.md   |   8 ---
 docs/conf.py  |   3 +-
 docs/requirements.txt |   4 +-
 setup.py  |   8 ++-
 11 files changed, 214 insertions(+), 152 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/e6cf67ec/CHANGELOG.rst
--
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
new file mode 100644
index 000..6abb1af
--- /dev/null
+++ b/CHANGELOG.rst
@@ -0,0 +1,4 @@
+0.1.0
+-
+
+ * Initial release.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/e6cf67ec/CONTRIBUTING
--
diff --git a/CONTRIBUTING b/CONTRIBUTING
new file mode 100644
index 000..4124003
--- /dev/null
+++ b/CONTRIBUTING
@@ -0,0 +1,3 @@
+Contribution guide is available on our Confluence:
+
+https://cwiki.apache.org/confluence/display/ARIATOSCA/Contributing+to+ARIA
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/e6cf67ec/DISCLAIMER
--
diff --git a/DISCLAIMER b/DISCLAIMER
new file mode 100644
index 000..358d8e1
--- /dev/null
+++ b/DISCLAIMER
@@ -0,0 +1,10 @@
+Apache AriaTosca is an effort undergoing incubation at the Apache Software
+Foundation (ASF), sponsored by the Apache Incubator.
+
+Incubation is required of all newly accepted projects until a further review
+indicates that the infrastructure, communications, and decision making process
+have stabilized in a manner consistent with other successful ASF projects.
+
+While incubation status is not necessarily a reflection of the completeness
+or stability of the code, it does indicate that the project has yet to be
+fully endorsed by the ASF.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/e6cf67ec/MANIFEST.in
--
diff --git a/MANIFEST.in b/MANIFEST.in
index 6c79a3a..877a7dd 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,4 +1,10 @@
-include requirements.txt
-include VERSION
+include CONTRIBUTING
 include LICENSE
+include NOTICE
+include VERSION
+include CHANGELOG.rst
+include README.rst
+include requirements.txt
+recursive-include docs/html *
 recursive-include examples *
+prune docs/html/.doctrees

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/e6cf67ec/Makefile
--
diff --git a/Makefile b/Makefile
index 3bafd3b..a857ca7 100644
--- a/Makefile
+++ b/Makefile
@@ -13,34 +13,54 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-EXTENSIONS=extensions
-DOCS=docs
-HTML=docs/html
+EXTENSIONS = ./extensions
+DIST = ./dist
+DOCS = ./docs
+HTML = ./docs/html
+EASY_INSTALL_PTH = $(VIRTUAL_ENV)/lib/python2.7/site-packages/easy-install.pth
+PYTHON_VERSION = $$(python -V 2>&1 | cut -f2 -d' ' | cut -f1,2 -d'.' 
--output-delimiter='')
 
-.PHONY: clean aria-requirements docs-requirements docs
-.DEFAULT_GOAL = test
+.DEFAULT_GOAL = install
+.PHONY: clean install install-virtual docs test dist deploy
 
 clean:
-   rm -rf "$(HTML)" .tox .coverage*
+   rm -rf "$(DIST)" "$(HTML)" .tox .coverage*
-find . -type f -name '.coverage' -delete
-find . -type d -name '.coverage' -exec rm -rf {} \; 2>/dev/null
-find . -type d -name '*.egg-info' -exec rm 

[03/10] incubator-ariatosca git commit: ARIA-166 Update README file

2017-06-16 Thread emblemparade
ARIA-166 Update README file


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/22f6e9ef
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/22f6e9ef
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/22f6e9ef

Branch: refs/heads/ARIA-254-multiple-nodes-per-template
Commit: 22f6e9efd5300f33bee51a1c1622c22b1531bbf5
Parents: 5afa2f7
Author: Ran Ziv 
Authored: Thu Jun 8 18:26:29 2017 +0300
Committer: Ran Ziv 
Committed: Mon Jun 12 19:08:44 2017 +0300

--
 README.md | 231 +++--
 1 file changed, 75 insertions(+), 156 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/22f6e9ef/README.md
--
diff --git a/README.md b/README.md
index e534645..6aee414 100644
--- a/README.md
+++ b/README.md
@@ -1,201 +1,120 @@
 ARIA
 
 
-[![Build 
Status](https://travis-ci.org/apache/incubator-ariatosca.svg?branch=master)](https://travis-ci.org/apache/incubator-ariatosca)
-[![Appveyor Build 
Status](https://ci.appveyor.com/api/projects/status/ltv89jk63ahiu306?svg=true)](https://ci.appveyor.com/project/ApacheSoftwareFoundation/incubator-ariatosca/history)
-[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
+[![Build 
Status](https://img.shields.io/travis/apache/incubator-ariatosca/master.svg)](https://travis-ci.org/apache/incubator-ariatosca)
+[![Appveyor Build 
Status](https://img.shields.io/appveyor/ci/ApacheSoftwareFoundation/incubator-ariatosca/master.svg)](https://ci.appveyor.com/project/ApacheSoftwareFoundation/incubator-ariatosca/history)
+[![License](https://img.shields.io/github/license/apache/incubator-ariatosca.svg)](http://www.apache.org/licenses/LICENSE-2.0)
+[![PyPI 
release](https://img.shields.io/pypi/v/ariatosca.svg)](https://pypi.python.org/pypi/ariatosca)
+![Python Versions](https://img.shields.io/pypi/pyversions/ariatosca.svg)
+![Wheel](https://img.shields.io/pypi/wheel/ariatosca.svg)
+![Contributors](https://img.shields.io/github/contributors/apache/incubator-ariatosca.svg)
+[![Open Pull 
Requests](https://img.shields.io/github/issues-pr/apache/incubator-ariatosca.svg)](https://github.com/apache/incubator-ariatosca/pulls)
+[![Closed Pull 
Requests](https://img.shields.io/github/issues-pr-closed-raw/apache/incubator-ariatosca.svg)](https://github.com/apache/incubator-ariatosca/pulls?q=is%3Apr+is%3Aclosed)
 
 
-[ARIA](http://ariatosca.org/) is a minimal TOSCA orchestrator, as well as a 
platform for building
-TOSCA-based products. Its features can be accessed via a well-documented 
Python API.
+What is ARIA?
+
 
-On its own, ARIA provides built-in tools for blueprint validation and for 
creating ready-to-run
-service instances. 
+[ARIA](http://ariatosca.incubator.apache.org/) is a an open-source, 
[TOSCA](https://www.oasis-open.org/committees/tosca/)-based, lightweight 
library and CLI for orchestration and for consumption by projects building 
TOSCA-based solutions for resources and services orchestration.
 
-ARIA adheres strictly and meticulously to the
-[TOSCA Simple Profile v1.0 cos01 
specification](http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html),
-providing state-of-the-art validation at seven different levels:
+ARIA can be utilized by any organization that wants to implement TOSCA-based 
orchestration in its solutions, whether a multi-cloud enterprise application, 
or an NFV or SDN solution for multiple virtual infrastructure managers.
 
-
-Platform errors. E.g. network, hardware, or even an internal bug in ARIA 
(let us know,
-   please!).
-Syntax and format errors. E.g. non-compliant YAML, XML, JSON.
-Field validation. E.g. assigning a string where an integer is expected, 
using a list instead of
-   a dict.
-Relationships between fields within a type. This is "grammar" as it 
applies to rules for
-setting the values of fields in relation to each other.
-Relationships between types. E.g. referring to an unknown type, causing a 
type inheritance
-loop.
-Topology. These errors happen if requirements and capabilities cannot be 
matched in order to
-   assemble a valid topology.
-External dependencies. These errors happen if requirement/capability 
matching fails due to
-external resources missing, e.g. the lack of a valid virtual machine, API 
credentials, etc.
- 
-
+With ARIA, you can utilize TOSCA's cloud portability out-of-the-box, to 
develop, test and run your applications, from template to deployment.
 
-Validation errors include a plain English message and when relevant 

[05/10] incubator-ariatosca git commit: ARIA-276 Support model instrumentation for workflows

2017-06-16 Thread emblemparade
ARIA-276 Support model instrumentation for workflows


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/2149a5ee
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/2149a5ee
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/2149a5ee

Branch: refs/heads/ARIA-254-multiple-nodes-per-template
Commit: 2149a5ee0c4656a253f54db20f279197961588c1
Parents: 1e883c5
Author: max-orlov 
Authored: Thu Jun 8 09:52:31 2017 +0300
Committer: max-orlov 
Committed: Tue Jun 13 14:34:41 2017 +0300

--
 aria/orchestrator/context/common.py |   7 +
 aria/orchestrator/context/operation.py  |   7 -
 aria/orchestrator/decorators.py |   5 +-
 aria/orchestrator/workflows/api/task.py |   2 -
 aria/orchestrator/workflows/core/task.py|  12 +-
 aria/storage/collection_instrumentation.py  |  46 +--
 .../context/test_collection_instrumentation.py  | 325 ---
 .../context/test_context_instrumentation.py | 108 ++
 tests/orchestrator/context/test_serialize.py|  20 +-
 tests/orchestrator/context/test_workflow.py |  93 --
 .../orchestrator/execution_plugin/test_local.py |  26 +-
 tests/orchestrator/execution_plugin/test_ssh.py |  50 +--
 .../workflows/builtin/test_execute_operation.py |   9 +-
 .../orchestrator/workflows/core/test_engine.py  |  88 +++--
 .../executor/test_process_executor_extension.py |  24 +-
 .../test_process_executor_tracked_changes.py|  26 +-
 .../storage/test_collection_instrumentation.py  | 257 +++
 17 files changed, 627 insertions(+), 478 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/2149a5ee/aria/orchestrator/context/common.py
--
diff --git a/aria/orchestrator/context/common.py 
b/aria/orchestrator/context/common.py
index c98e026..f4df317 100644
--- a/aria/orchestrator/context/common.py
+++ b/aria/orchestrator/context/common.py
@@ -36,6 +36,13 @@ class BaseContext(object):
 Base context object for workflow and operation
 """
 
+INSTRUMENTATION_FIELDS = (
+modeling.models.Node.attributes,
+modeling.models.Node.properties,
+modeling.models.NodeTemplate.attributes,
+modeling.models.NodeTemplate.properties
+)
+
 class PrefixedLogger(object):
 def __init__(self, base_logger, task_id=None):
 self._logger = base_logger

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/2149a5ee/aria/orchestrator/context/operation.py
--
diff --git a/aria/orchestrator/context/operation.py 
b/aria/orchestrator/context/operation.py
index af7220d..efdc04d 100644
--- a/aria/orchestrator/context/operation.py
+++ b/aria/orchestrator/context/operation.py
@@ -29,13 +29,6 @@ class BaseOperationContext(common.BaseContext):
 Context object used during operation creation and execution
 """
 
-INSTRUMENTATION_FIELDS = (
-aria.modeling.models.Node.attributes,
-aria.modeling.models.Node.properties,
-aria.modeling.models.NodeTemplate.attributes,
-aria.modeling.models.NodeTemplate.properties
-)
-
 def __init__(self, task_id, actor_id, **kwargs):
 self._task_id = task_id
 self._actor_id = actor_id

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/2149a5ee/aria/orchestrator/decorators.py
--
diff --git a/aria/orchestrator/decorators.py b/aria/orchestrator/decorators.py
index 80f6962..389bfb8 100644
--- a/aria/orchestrator/decorators.py
+++ b/aria/orchestrator/decorators.py
@@ -49,8 +49,9 @@ def workflow(func=None, suffix_template=''):
 workflow_parameters.setdefault('ctx', ctx)
 workflow_parameters.setdefault('graph', 
task_graph.TaskGraph(workflow_name))
 validate_function_arguments(func, workflow_parameters)
-with context.workflow.current.push(ctx):
-func(**workflow_parameters)
+with ctx.model.instrument(*ctx.INSTRUMENTATION_FIELDS):
+with context.workflow.current.push(ctx):
+func(**workflow_parameters)
 return workflow_parameters['graph']
 return _wrapper
 

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/2149a5ee/aria/orchestrator/workflows/api/task.py
--
diff --git a/aria/orchestrator/workflows/api/task.py 
b/aria/orchestrator/workflows/api/task.py
index bcba56e..ca125a8 100644
--- a/aria/orchestrator/workflows/api/task.py
+++ b/aria/orchestrator/workflows/api/task.py
@@ 

[02/10] incubator-ariatosca git commit: ARIA-199 Add "services outputs" CLI command

2017-06-16 Thread emblemparade
ARIA-199 Add "services outputs" CLI command

* Also add an output to hello world example


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/5afa2f7f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/5afa2f7f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/5afa2f7f

Branch: refs/heads/ARIA-254-multiple-nodes-per-template
Commit: 5afa2f7fe11977593009b6da25733fa8dd61a1e9
Parents: cd83073
Author: Tal Liron 
Authored: Fri Jun 2 14:20:28 2017 -0500
Committer: Tal Liron 
Committed: Wed Jun 7 14:42:35 2017 -0500

--
 aria/cli/commands/services.py   | 23 -
 aria/modeling/models.py |  4 +--
 examples/hello-world/helloworld.yaml| 16 
 tests/cli/test_services.py  | 26 ++--
 tests/end2end/test_hello_world.py   |  1 +
 tests/mock/models.py| 21 ++--
 .../node-cellar/node-cellar.yaml| 12 +
 7 files changed, 76 insertions(+), 27 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/5afa2f7f/aria/cli/commands/services.py
--
diff --git a/aria/cli/commands/services.py b/aria/cli/commands/services.py
index 476387c..ae5895a 100644
--- a/aria/cli/commands/services.py
+++ b/aria/cli/commands/services.py
@@ -192,17 +192,16 @@ def outputs(service_name, model_storage, logger):
 """
 logger.info('Showing outputs for service {0}...'.format(service_name))
 service = model_storage.service.get_by_name(service_name)
-#TODO fix this section..
-outputs_def = service.outputs
-response = model_storage.service.outputs.get(service_name)
-outputs_ = StringIO()
-for output_name, output in response.outputs.iteritems():
-outputs_.write(' - "{0}":{1}'.format(output_name, os.linesep))
-description = outputs_def[output_name].get('description', '')
-outputs_.write(' Description: {0}{1}'.format(description,
- os.linesep))
-outputs_.write(' Value: {0}{1}'.format(output, os.linesep))
-logger.info(outputs_.getvalue())
+
+if service.outputs:
+outputs_string = StringIO()
+for output_name, output in service.outputs.iteritems():
+outputs_string.write(' - "{0}":{1}'.format(output_name, 
os.linesep))
+outputs_string.write(' Description: 
{0}{1}'.format(output.description, os.linesep))
+outputs_string.write(' Value: {0}{1}'.format(output.value, 
os.linesep))
+logger.info(outputs_string.getvalue())
+else:
+logger.info('\tNo outputs')
 
 
 @services.command(name='inputs',
@@ -218,10 +217,12 @@ def inputs(service_name, model_storage, logger):
 """
 logger.info('Showing inputs for service {0}...'.format(service_name))
 service = model_storage.service.get_by_name(service_name)
+
 if service.inputs:
 inputs_string = StringIO()
 for input_name, input_ in service.inputs.iteritems():
 inputs_string.write(' - "{0}":{1}'.format(input_name, os.linesep))
+inputs_string.write(' Description: 
{0}{1}'.format(input_.description, os.linesep))
 inputs_string.write(' Value: {0}{1}'.format(input_.value, 
os.linesep))
 logger.info(inputs_string.getvalue())
 else:

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/5afa2f7f/aria/modeling/models.py
--
diff --git a/aria/modeling/models.py b/aria/modeling/models.py
index 4102090..f30b86f 100644
--- a/aria/modeling/models.py
+++ b/aria/modeling/models.py
@@ -268,7 +268,7 @@ class Argument(aria_declarative_base, 
orchestration.ArgumentBase):
 
 
 # See also __all__ at the top of this file
-models_to_register = [
+models_to_register = (
 # Service template models
 ServiceTemplate,
 NodeTemplate,
@@ -317,4 +317,4 @@ models_to_register = [
 Task,
 Log,
 Argument
-]
+)

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/5afa2f7f/examples/hello-world/helloworld.yaml
--
diff --git a/examples/hello-world/helloworld.yaml 
b/examples/hello-world/helloworld.yaml
index be78401..d3369b7 100644
--- a/examples/hello-world/helloworld.yaml
+++ b/examples/hello-world/helloworld.yaml
@@ -1,13 +1,14 @@
 tosca_definitions_version: tosca_simple_yaml_1_0
 
 node_types:
-  web_server:
+
+  WebServer:
 derived_from: tosca.nodes.Root
 capabilities:
   host:
 type: 

[09/10] incubator-ariatosca git commit: Temp

2017-06-16 Thread emblemparade
Temp


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/334ea74e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/334ea74e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/334ea74e

Branch: refs/heads/ARIA-254-multiple-nodes-per-template
Commit: 334ea74e9829e5174103aab20145737879e2e09f
Parents: ba4460e
Author: Tal Liron 
Authored: Wed Jun 14 11:50:01 2017 -0500
Committer: Tal Liron 
Committed: Fri Jun 16 17:27:32 2017 -0500

--
 aria/parser/presentation/fields.py   | 4 
 .../simple_v1_0/modeling/capabilities.py | 8 ++--
 2 files changed, 10 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/334ea74e/aria/parser/presentation/fields.py
--
diff --git a/aria/parser/presentation/fields.py 
b/aria/parser/presentation/fields.py
index 7f85723..060c576 100644
--- a/aria/parser/presentation/fields.py
+++ b/aria/parser/presentation/fields.py
@@ -680,6 +680,10 @@ class Field(object):
 # object dict
 
 def _get_object_dict(self, presentation, raw, value, context):
+if self.cls.__name__ == 'CapabilityAssignment':
+print '>>p', presentation._name
+print '>>v', value
+print '>>r', raw
 if not isinstance(value, dict):
 raise InvalidValueError('%s is not a dict: %s' % (self.full_name, 
safe_repr(value)),
 locator=self.get_locator(raw))

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/334ea74e/extensions/aria_extension_tosca/simple_v1_0/modeling/capabilities.py
--
diff --git 
a/extensions/aria_extension_tosca/simple_v1_0/modeling/capabilities.py 
b/extensions/aria_extension_tosca/simple_v1_0/modeling/capabilities.py
index 18a4541..e61fc81 100644
--- a/extensions/aria_extension_tosca/simple_v1_0/modeling/capabilities.py
+++ b/extensions/aria_extension_tosca/simple_v1_0/modeling/capabilities.py
@@ -129,14 +129,18 @@ def get_template_capabilities(context, presentation):
 if capability_name in capability_assignments:
 capability_assignment = capability_assignments[capability_name]
 
+print
+print presentation._name
+print 'raw1', our_capability_assignment._raw
+print 'raw2', 
presentation._raw['capabilities'][our_capability_assignment._name]
+
 # Assign properties
 values = get_assigned_and_defined_parameter_values(context,

our_capability_assignment,
'property')
 
-print presentation._name
 print 'our', [(k, v.value) for k, v in 
our_capability_assignment.properties.iteritems()]
-print 'ass', [(k, v.value.value) for k, v in 
capability_assignment.properties.iteritems()]
+print 'def', [(k, v.value.value) for k, v in 
capability_assignment.properties.iteritems()]
 print 'val', [(k, v.value) for k, v in values.iteritems()]
 
 if values:



[07/10] incubator-ariatosca git commit: wip

2017-06-16 Thread emblemparade
wip


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/ba4460e2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/ba4460e2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/ba4460e2

Branch: refs/heads/ARIA-254-multiple-nodes-per-template
Commit: ba4460e2cefce13536114b0b5ad6072da5281dc5
Parents: b7ec71e
Author: Tal Liron 
Authored: Tue Jun 13 14:50:17 2017 -0500
Committer: Tal Liron 
Committed: Fri Jun 16 17:27:32 2017 -0500

--
 aria/modeling/service_template.py   | 62 +++-
 aria/parser/presentation/presentation.py| 12 +++-
 .../profiles/aria-1.0/aria-1.0.yaml | 23 ++--
 .../profiles/tosca-simple-1.0/capabilities.yaml |  1 +
 .../simple_v1_0/modeling/capabilities.py| 15 +++--
 .../node-cellar/node-cellar.yaml| 20 ---
 6 files changed, 99 insertions(+), 34 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ba4460e2/aria/modeling/service_template.py
--
diff --git a/aria/modeling/service_template.py 
b/aria/modeling/service_template.py
index dfef8d6..c9c7c6c 100644
--- a/aria/modeling/service_template.py
+++ b/aria/modeling/service_template.py
@@ -305,7 +305,8 @@ class ServiceTemplateBase(TemplateModelMixin):
 utils.instantiate_dict(self, service.meta_data, self.meta_data)
 
 for node_template in self.node_templates.itervalues():
-for _ in range(node_template.default_instances):
+print 'scaling', node_template.name, 
node_template.scaling['default_instances'] 
+for _ in range(node_template.scaling['default_instances']):
 node = node_template.instantiate(container)
 service.nodes[node.name] = node
 
@@ -581,12 +582,6 @@ class NodeTemplateBase(TemplateModelMixin):
 console.puts(context.style.meta(self.description))
 with context.style.indent:
 console.puts('Type: 
{0}'.format(context.style.type(self.type.name)))
-console.puts('Instances: {0:d} ({1:d}{2})'.format(
-self.default_instances,
-self.min_instances,
-' to {0:d}'.format(self.max_instances)
-if self.max_instances is not None
-else ' or more'))
 utils.dump_dict_values(self.properties, 'Properties')
 utils.dump_dict_values(self.attributes, 'Attributes')
 utils.dump_interfaces(self.interface_templates)
@@ -620,18 +615,53 @@ class NodeTemplateBase(TemplateModelMixin):
 return '{name}_{index}'.format(name=self.name, index=self.next_index)
 
 @property
-def default_instances(self):
-# TODO: currently finds the first matching policy; but we should emit 
a validation error
-# if more than one policy applies to the same node
+def scaling(self):
+scaling = {
+   'min_instances': 0,
+   'max_instances': 1,
+   'default_instances': 1}
+
+def extract_property(properties, name):
+prop = properties.get(name)
+if (prop is not None) and (prop.type_name == 'integer') and 
(prop.value is not None):
+scaling[name] = prop.value
+
+def extract_properties(properties):
+extract_property(properties, 'min_instances')
+extract_property(properties, 'max_instances')
+extract_property(properties, 'default_instances')
+
+# TODO: currently finds the first matches capability or policy; but we 
should emit a
+# validation error if more than one applies to the same node
+
+# From our scaling capabilities
+for capability_template in self.capability_templates.itervalues():
+if capability_template.type.role == 'scaling':
+extract_properties(capability_template.properties)
+
+# From service scaling policies (will override capabilities)
 for policy_template in 
self.service_template.policy_templates.itervalues():
 if policy_template.type.role == 'scaling':
 if policy_template.is_for_node_template(self.name):
-default_instances = 
policy_template.properties.get('default_instances')
-if (default_instances is not None) \
-and (default_instances.type_name == 'integer'):
-return default_instances.value
-break
-return 1
+extract_properties(policy_template.properties)
+
+# Validate
+if (scaling['min_instances'] < 0) or \
+(scaling['max_instances'] < 0) 

[08/10] incubator-ariatosca git commit: Finally works

2017-06-16 Thread emblemparade
Finally works


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/76aa0843
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/76aa0843
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/76aa0843

Branch: refs/heads/ARIA-254-multiple-nodes-per-template
Commit: 76aa0843fc872ed759aa3c7282b45c75e576d82b
Parents: 334ea74
Author: Tal Liron 
Authored: Fri Jun 16 17:27:05 2017 -0500
Committer: Tal Liron 
Committed: Fri Jun 16 17:27:32 2017 -0500

--
 aria/modeling/service_template.py   | 21 +
 aria/parser/presentation/fields.py  |  4 --
 .../profiles/aria-1.0/aria-1.0.yaml |  2 +
 .../simple_v1_0/modeling/artifacts.py   |  4 +-
 .../simple_v1_0/modeling/capabilities.py| 47 +---
 .../simple_v1_0/modeling/interfaces.py  |  8 ++--
 .../simple_v1_0/modeling/parameters.py  |  5 ++-
 tests/end2end/test_nodecellar.py|  2 +-
 .../node-cellar/node-cellar.yaml| 38 +---
 .../node-cellar/types/nodejs.yaml   |  1 +
 10 files changed, 81 insertions(+), 51 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/76aa0843/aria/modeling/service_template.py
--
diff --git a/aria/modeling/service_template.py 
b/aria/modeling/service_template.py
index c9c7c6c..633b5bc 100644
--- a/aria/modeling/service_template.py
+++ b/aria/modeling/service_template.py
@@ -305,7 +305,6 @@ class ServiceTemplateBase(TemplateModelMixin):
 utils.instantiate_dict(self, service.meta_data, self.meta_data)
 
 for node_template in self.node_templates.itervalues():
-print 'scaling', node_template.name, 
node_template.scaling['default_instances'] 
 for _ in range(node_template.scaling['default_instances']):
 node = node_template.instantiate(container)
 service.nodes[node.name] = node
@@ -616,12 +615,11 @@ class NodeTemplateBase(TemplateModelMixin):
 
 @property
 def scaling(self):
-scaling = {
-   'min_instances': 0,
-   'max_instances': 1,
-   'default_instances': 1}
+scaling = {}
 
 def extract_property(properties, name):
+if name in scaling:
+return
 prop = properties.get(name)
 if (prop is not None) and (prop.type_name == 'integer') and 
(prop.value is not None):
 scaling[name] = prop.value
@@ -631,21 +629,28 @@ class NodeTemplateBase(TemplateModelMixin):
 extract_property(properties, 'max_instances')
 extract_property(properties, 'default_instances')
 
-# TODO: currently finds the first matches capability or policy; but we 
should emit a
-# validation error if more than one applies to the same node
+def default_property(name, value):
+if name not in scaling:
+scaling[name] = value
 
 # From our scaling capabilities
 for capability_template in self.capability_templates.itervalues():
 if capability_template.type.role == 'scaling':
 extract_properties(capability_template.properties)
 
-# From service scaling policies (will override capabilities)
+# From service scaling policies
 for policy_template in 
self.service_template.policy_templates.itervalues():
 if policy_template.type.role == 'scaling':
 if policy_template.is_for_node_template(self.name):
 extract_properties(policy_template.properties)
 
+# Defaults
+default_property('min_instances', 0)
+default_property('max_instances', 1)
+default_property('default_instances', 1)
+
 # Validate
+# pylint: disable=too-many-boolean-expressions
 if (scaling['min_instances'] < 0) or \
 (scaling['max_instances'] < 0) or \
 (scaling['default_instances'] < 0) or \

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/76aa0843/aria/parser/presentation/fields.py
--
diff --git a/aria/parser/presentation/fields.py 
b/aria/parser/presentation/fields.py
index 060c576..7f85723 100644
--- a/aria/parser/presentation/fields.py
+++ b/aria/parser/presentation/fields.py
@@ -680,10 +680,6 @@ class Field(object):
 # object dict
 
 def _get_object_dict(self, presentation, raw, value, context):
-if self.cls.__name__ == 'CapabilityAssignment':
-print '>>p', presentation._name
-print '>>v', value
-  

[01/10] incubator-ariatosca git commit: ARIA-213 sporadic tests failures over locked database issue [Forced Update!]

2017-06-16 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-254-multiple-nodes-per-template f5f5852ad -> 76aa0843f 
(forced update)


ARIA-213 sporadic tests failures over locked database issue

Increased the timeout for acquiring database lock (for sqlite based db).


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/cd830731
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/cd830731
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/cd830731

Branch: refs/heads/ARIA-254-multiple-nodes-per-template
Commit: cd830731bff21e836b5e661623b269aa40f92f52
Parents: 180e0a1
Author: max-orlov 
Authored: Tue Jun 6 17:05:21 2017 +0300
Committer: max-orlov 
Committed: Wed Jun 7 17:21:01 2017 +0300

--
 aria/storage/sql_mapi.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/cd830731/aria/storage/sql_mapi.py
--
diff --git a/aria/storage/sql_mapi.py b/aria/storage/sql_mapi.py
index 4d7e233..bb6223a 100644
--- a/aria/storage/sql_mapi.py
+++ b/aria/storage/sql_mapi.py
@@ -405,7 +405,8 @@ def init_storage(base_dir, filename='db.sqlite'):
 
 path=os.path.join(base_dir, filename))
 
-engine = create_engine(uri)
+engine = create_engine(uri, connect_args=dict(timeout=15))
+
 session_factory = orm.sessionmaker(bind=engine)
 session = orm.scoped_session(session_factory=session_factory)
 



[4/5] incubator-ariatosca git commit: Fix Makefile and docs

2017-06-14 Thread emblemparade
Fix Makefile and docs


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/306fc5d0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/306fc5d0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/306fc5d0

Branch: refs/heads/ARIA-54-prepare-aria-packaging
Commit: 306fc5d08da02b4ebc2c98ce1e6b33cb67143e7a
Parents: 98b27ef
Author: Tal Liron 
Authored: Tue Jun 13 16:05:19 2017 -0500
Committer: Tal Liron 
Committed: Wed Jun 14 11:50:25 2017 -0500

--
 MANIFEST.in   |  12 ++---
 Makefile  |  40 ++-
 README.rst| 118 ++---
 docs/conf.py  |   3 +-
 docs/requirements.txt |   4 +-
 setup.cfg |   2 +
 6 files changed, 88 insertions(+), 91 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/306fc5d0/MANIFEST.in
--
diff --git a/MANIFEST.in b/MANIFEST.in
index dd16e28..13c9506 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,9 +1,9 @@
-include CHANGELOG.rst
-include CONTRIBUTING
 include LICENSE
 include NOTICE
-include README.rst
-include requirements.txt
+include CONTRIBUTING
 include VERSION
-recursive-include docs *
-recursive-include examples *
\ No newline at end of file
+include CHANGELOG.rst
+include requirements.txt
+recursive-include docs/html *
+recursive-include examples *
+prune docs/html/.doctrees

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/306fc5d0/Makefile
--
diff --git a/Makefile b/Makefile
index 3bafd3b..6022169 100644
--- a/Makefile
+++ b/Makefile
@@ -13,34 +13,50 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-EXTENSIONS=extensions
-DOCS=docs
-HTML=docs/html
+EXTENSIONS = ./extensions
+DIST = ./dist
+DOCS = ./docs
+HTML = ./docs/html
+EASY_INSTALL_PTH = $(VIRTUAL_ENV)/lib/python2.7/site-packages/easy-install.pth
 
-.PHONY: clean aria-requirements docs-requirements docs
 .DEFAULT_GOAL = test
+.PHONY: clean install install-virtual requirements docs-requirements 
test-requirements docs test dist deploy
 
 clean:
-   rm -rf "$(HTML)" .tox .coverage*
+   rm -rf "$(DIST)" "$(HTML)" .tox .coverage*
-find . -type f -name '.coverage' -delete
-find . -type d -name '.coverage' -exec rm -rf {} \; 2>/dev/null
-find . -type d -name '*.egg-info' -exec rm -rf {} \; 2>/dev/null
 
 install:
-   pip install --upgrade .
+   pip install .
 
-requirements:
-   pip install --upgrade --requirement requirements.txt
+install-virtual:
+   pip install --editable .
+   
+   # "pip install --editable" will not add our extensions to the path, so 
we will patch the virtualenv
+   EXTENSIONS_PATH="$$(head -n 1 "$(EASY_INSTALL_PTH)")/extensions" && \
+   if ! grep -Fxq "$$EXTENSIONS_PATH" "$(EASY_INSTALL_PTH)"; then \
+   echo "$$EXTENSIONS_PATH" >> "$(EASY_INSTALL_PTH)"; \
+   fi
 
 docs-requirements:
pip install --upgrade --requirement "$(DOCS)/requirements.txt"
 
 test-requirements:
-   pip install tox==2.5.0
+   pip install --upgrade tox>=2.7.0
 
-docs: docs-requirements requirements
+docs: docs-requirements
rm -rf "$(HTML)"
sphinx-build -b html "$(DOCS)" "$(HTML)"
 
-test: test-requirements requirements
-   PYTHONPATH="$(EXTENSIONS):$(PYTHONPATH)" tox
+test: test-requirements
+   tox -e py27
+
+dist: docs
+   python ./setup.py sdist bdist_wheel
+
+deploy:
+   pip install --upgrade twine>=1.9.1
+   gpg --detach-sign -a "$(DIST)"/*
+   twine upload "$(DIST)"/*

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/306fc5d0/README.rst
--
diff --git a/README.rst b/README.rst
index 91cdc3c..8af13a5 100644
--- a/README.rst
+++ b/README.rst
@@ -1,124 +1,103 @@
 ARIA
 
 
-|Build Status| |Appveyor Build Status| |License| |PyPI release| |Python
-Versions| |Wheel| |Contributors| |Open Pull Requests| |Closed Pull
-Requests|
+|Build Status| |Appveyor Build Status| |License| |PyPI release| |Python 
Versions| |Wheel|
+|Contributors| |Open Pull Requests| |Closed Pull Requests|
+
 
 What is ARIA?
 -
 
 `ARIA `__ is a an open-source,
-`TOSCA `__-based,
-lightweight library and CLI for orchestration and for consumption by
-projects building TOSCA-based solutions for resources and services
-orchestration.
+`TOSCA `__-based, lightweight 

[2/5] incubator-ariatosca git commit: ARIA-276 Support model instrumentation for workflows

2017-06-14 Thread emblemparade
ARIA-276 Support model instrumentation for workflows


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/2149a5ee
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/2149a5ee
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/2149a5ee

Branch: refs/heads/ARIA-54-prepare-aria-packaging
Commit: 2149a5ee0c4656a253f54db20f279197961588c1
Parents: 1e883c5
Author: max-orlov 
Authored: Thu Jun 8 09:52:31 2017 +0300
Committer: max-orlov 
Committed: Tue Jun 13 14:34:41 2017 +0300

--
 aria/orchestrator/context/common.py |   7 +
 aria/orchestrator/context/operation.py  |   7 -
 aria/orchestrator/decorators.py |   5 +-
 aria/orchestrator/workflows/api/task.py |   2 -
 aria/orchestrator/workflows/core/task.py|  12 +-
 aria/storage/collection_instrumentation.py  |  46 +--
 .../context/test_collection_instrumentation.py  | 325 ---
 .../context/test_context_instrumentation.py | 108 ++
 tests/orchestrator/context/test_serialize.py|  20 +-
 tests/orchestrator/context/test_workflow.py |  93 --
 .../orchestrator/execution_plugin/test_local.py |  26 +-
 tests/orchestrator/execution_plugin/test_ssh.py |  50 +--
 .../workflows/builtin/test_execute_operation.py |   9 +-
 .../orchestrator/workflows/core/test_engine.py  |  88 +++--
 .../executor/test_process_executor_extension.py |  24 +-
 .../test_process_executor_tracked_changes.py|  26 +-
 .../storage/test_collection_instrumentation.py  | 257 +++
 17 files changed, 627 insertions(+), 478 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/2149a5ee/aria/orchestrator/context/common.py
--
diff --git a/aria/orchestrator/context/common.py 
b/aria/orchestrator/context/common.py
index c98e026..f4df317 100644
--- a/aria/orchestrator/context/common.py
+++ b/aria/orchestrator/context/common.py
@@ -36,6 +36,13 @@ class BaseContext(object):
 Base context object for workflow and operation
 """
 
+INSTRUMENTATION_FIELDS = (
+modeling.models.Node.attributes,
+modeling.models.Node.properties,
+modeling.models.NodeTemplate.attributes,
+modeling.models.NodeTemplate.properties
+)
+
 class PrefixedLogger(object):
 def __init__(self, base_logger, task_id=None):
 self._logger = base_logger

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/2149a5ee/aria/orchestrator/context/operation.py
--
diff --git a/aria/orchestrator/context/operation.py 
b/aria/orchestrator/context/operation.py
index af7220d..efdc04d 100644
--- a/aria/orchestrator/context/operation.py
+++ b/aria/orchestrator/context/operation.py
@@ -29,13 +29,6 @@ class BaseOperationContext(common.BaseContext):
 Context object used during operation creation and execution
 """
 
-INSTRUMENTATION_FIELDS = (
-aria.modeling.models.Node.attributes,
-aria.modeling.models.Node.properties,
-aria.modeling.models.NodeTemplate.attributes,
-aria.modeling.models.NodeTemplate.properties
-)
-
 def __init__(self, task_id, actor_id, **kwargs):
 self._task_id = task_id
 self._actor_id = actor_id

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/2149a5ee/aria/orchestrator/decorators.py
--
diff --git a/aria/orchestrator/decorators.py b/aria/orchestrator/decorators.py
index 80f6962..389bfb8 100644
--- a/aria/orchestrator/decorators.py
+++ b/aria/orchestrator/decorators.py
@@ -49,8 +49,9 @@ def workflow(func=None, suffix_template=''):
 workflow_parameters.setdefault('ctx', ctx)
 workflow_parameters.setdefault('graph', 
task_graph.TaskGraph(workflow_name))
 validate_function_arguments(func, workflow_parameters)
-with context.workflow.current.push(ctx):
-func(**workflow_parameters)
+with ctx.model.instrument(*ctx.INSTRUMENTATION_FIELDS):
+with context.workflow.current.push(ctx):
+func(**workflow_parameters)
 return workflow_parameters['graph']
 return _wrapper
 

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/2149a5ee/aria/orchestrator/workflows/api/task.py
--
diff --git a/aria/orchestrator/workflows/api/task.py 
b/aria/orchestrator/workflows/api/task.py
index bcba56e..ca125a8 100644
--- a/aria/orchestrator/workflows/api/task.py
+++ b/aria/orchestrator/workflows/api/task.py
@@ -108,8 

[5/5] incubator-ariatosca git commit: Fixes, added support for building requirements.txt

2017-06-14 Thread emblemparade
Fixes, added support for building requirements.txt


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/4a2e521c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/4a2e521c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/4a2e521c

Branch: refs/heads/ARIA-54-prepare-aria-packaging
Commit: 4a2e521ccbceeb84e8c637f778d72a0934aad722
Parents: 306fc5d
Author: Tal Liron 
Authored: Wed Jun 14 12:53:14 2017 -0500
Committer: Tal Liron 
Committed: Wed Jun 14 12:53:14 2017 -0500

--
 Makefile  | 24 ++--
 docs/requirements.txt |  2 +-
 setup.cfg |  2 --
 3 files changed, 15 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/4a2e521c/Makefile
--
diff --git a/Makefile b/Makefile
index 6022169..46e212e 100644
--- a/Makefile
+++ b/Makefile
@@ -18,9 +18,10 @@ DIST = ./dist
 DOCS = ./docs
 HTML = ./docs/html
 EASY_INSTALL_PTH = $(VIRTUAL_ENV)/lib/python2.7/site-packages/easy-install.pth
+PYTHON_VERSION = $$(python -V 2>&1 | cut -f2 -d' ' | cut -f1,2 -d'.' 
--output-delimiter='')
 
 .DEFAULT_GOAL = test
-.PHONY: clean install install-virtual requirements docs-requirements 
test-requirements docs test dist deploy
+.PHONY: clean install install-virtual docs test dist deploy
 
 clean:
rm -rf "$(DIST)" "$(HTML)" .tox .coverage*
@@ -40,18 +41,17 @@ install-virtual:
echo "$$EXTENSIONS_PATH" >> "$(EASY_INSTALL_PTH)"; \
fi
 
-docs-requirements:
-   pip install --upgrade --requirement "$(DOCS)/requirements.txt"
-
-test-requirements:
-   pip install --upgrade tox>=2.7.0
-
-docs: docs-requirements
+docs:
+   pip install --requirement "$(DOCS)/requirements.txt"
rm -rf "$(HTML)"
sphinx-build -b html "$(DOCS)" "$(HTML)"
 
-test: test-requirements
-   tox -e py27
+test:
+   pip install --upgrade tox>=2.7.0
+   tox -e pylint_code
+   tox -e pylint_tests
+   tox -e py$(PYTHON_VERSION)
+   tox -e py$(PYTHON_VERSION)e2e
 
 dist: docs
python ./setup.py sdist bdist_wheel
@@ -60,3 +60,7 @@ deploy:
pip install --upgrade twine>=1.9.1
gpg --detach-sign -a "$(DIST)"/*
twine upload "$(DIST)"/*
+
+./requirements.txt: ./requirements.in
+   pip install --upgrade pip-tools>=1.9.0 
+   pip-compile --output-file ./requirements.txt ./requirements.in

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/4a2e521c/docs/requirements.txt
--
diff --git a/docs/requirements.txt b/docs/requirements.txt
index df32b86..fa4c334 100644
--- a/docs/requirements.txt
+++ b/docs/requirements.txt
@@ -10,5 +10,5 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-Sphinx>=1.6.2
+Sphinx>=1.6.2, <2.0.0
 sphinx_rtd_theme>=0.2.4

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/4a2e521c/setup.cfg
--
diff --git a/setup.cfg b/setup.cfg
deleted file mode 100644
index 3c6e79c..000
--- a/setup.cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-[bdist_wheel]
-universal=1



[3/5] incubator-ariatosca git commit: ARIA-54 Prepare for ARIA packaging

2017-06-14 Thread emblemparade
ARIA-54 Prepare for ARIA packaging

Preparations for ARIA packaging:
 - Added CHANGELOG file
 - Added CONTRIBUTING file
 - Added DISCLAIMER file
 - Converted README from md to rst for PyPI compatiability
 - Removed outdated TODO file
 - Added long_description, download_url to setup.py metadata
 - Modified setup.py url metadata to point at ASF domain
 - Added more badges to README


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/98b27ef5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/98b27ef5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/98b27ef5

Branch: refs/heads/ARIA-54-prepare-aria-packaging
Commit: 98b27ef5bfa3aa197860e37f91e447ad789f9e70
Parents: 2149a5e
Author: Ran Ziv 
Authored: Mon Jun 5 13:24:49 2017 +0300
Committer: Tal Liron 
Committed: Wed Jun 14 11:50:25 2017 -0500

--
 CHANGELOG.rst |   4 ++
 CONTRIBUTING  |   3 +
 DISCLAIMER|  10 
 MANIFEST.in   |   9 ++-
 README.md | 120 ---
 README.rst| 162 +
 TODO.md   |   8 ---
 setup.py  |   8 ++-
 8 files changed, 193 insertions(+), 131 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/98b27ef5/CHANGELOG.rst
--
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
new file mode 100644
index 000..6abb1af
--- /dev/null
+++ b/CHANGELOG.rst
@@ -0,0 +1,4 @@
+0.1.0
+-
+
+ * Initial release.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/98b27ef5/CONTRIBUTING
--
diff --git a/CONTRIBUTING b/CONTRIBUTING
new file mode 100644
index 000..4124003
--- /dev/null
+++ b/CONTRIBUTING
@@ -0,0 +1,3 @@
+Contribution guide is available on our Confluence:
+
+https://cwiki.apache.org/confluence/display/ARIATOSCA/Contributing+to+ARIA
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/98b27ef5/DISCLAIMER
--
diff --git a/DISCLAIMER b/DISCLAIMER
new file mode 100644
index 000..358d8e1
--- /dev/null
+++ b/DISCLAIMER
@@ -0,0 +1,10 @@
+Apache AriaTosca is an effort undergoing incubation at the Apache Software
+Foundation (ASF), sponsored by the Apache Incubator.
+
+Incubation is required of all newly accepted projects until a further review
+indicates that the infrastructure, communications, and decision making process
+have stabilized in a manner consistent with other successful ASF projects.
+
+While incubation status is not necessarily a reflection of the completeness
+or stability of the code, it does indicate that the project has yet to be
+fully endorsed by the ASF.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/98b27ef5/MANIFEST.in
--
diff --git a/MANIFEST.in b/MANIFEST.in
index 6c79a3a..dd16e28 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,4 +1,9 @@
+include CHANGELOG.rst
+include CONTRIBUTING
+include LICENSE
+include NOTICE
+include README.rst
 include requirements.txt
 include VERSION
-include LICENSE
-recursive-include examples *
+recursive-include docs *
+recursive-include examples *
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/98b27ef5/README.md
--
diff --git a/README.md b/README.md
deleted file mode 100644
index 6aee414..000
--- a/README.md
+++ /dev/null
@@ -1,120 +0,0 @@
-ARIA
-
-
-[![Build 
Status](https://img.shields.io/travis/apache/incubator-ariatosca/master.svg)](https://travis-ci.org/apache/incubator-ariatosca)
-[![Appveyor Build 
Status](https://img.shields.io/appveyor/ci/ApacheSoftwareFoundation/incubator-ariatosca/master.svg)](https://ci.appveyor.com/project/ApacheSoftwareFoundation/incubator-ariatosca/history)
-[![License](https://img.shields.io/github/license/apache/incubator-ariatosca.svg)](http://www.apache.org/licenses/LICENSE-2.0)
-[![PyPI 
release](https://img.shields.io/pypi/v/ariatosca.svg)](https://pypi.python.org/pypi/ariatosca)
-![Python Versions](https://img.shields.io/pypi/pyversions/ariatosca.svg)
-![Wheel](https://img.shields.io/pypi/wheel/ariatosca.svg)
-![Contributors](https://img.shields.io/github/contributors/apache/incubator-ariatosca.svg)
-[![Open Pull 
Requests](https://img.shields.io/github/issues-pr/apache/incubator-ariatosca.svg)](https://github.com/apache/incubator-ariatosca/pulls)
-[![Closed Pull 

incubator-ariatosca git commit: Fix Makefile and docs [Forced Update!]

2017-06-13 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-54-prepare-aria-packaging 336d8fdc4 -> 428a5f76c (forced 
update)


Fix Makefile and docs


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/428a5f76
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/428a5f76
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/428a5f76

Branch: refs/heads/ARIA-54-prepare-aria-packaging
Commit: 428a5f76c2a66cfdb0ae12782321b53c8a165f0f
Parents: af530de
Author: Tal Liron 
Authored: Tue Jun 13 16:05:19 2017 -0500
Committer: Tal Liron 
Committed: Tue Jun 13 16:31:22 2017 -0500

--
 MANIFEST.in   |  12 ++---
 Makefile  |  40 ++-
 README.rst| 118 ++---
 docs/conf.py  |   3 +-
 docs/requirements.txt |   4 +-
 setup.cfg |   2 +
 6 files changed, 88 insertions(+), 91 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/428a5f76/MANIFEST.in
--
diff --git a/MANIFEST.in b/MANIFEST.in
index dd16e28..13c9506 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,9 +1,9 @@
-include CHANGELOG.rst
-include CONTRIBUTING
 include LICENSE
 include NOTICE
-include README.rst
-include requirements.txt
+include CONTRIBUTING
 include VERSION
-recursive-include docs *
-recursive-include examples *
\ No newline at end of file
+include CHANGELOG.rst
+include requirements.txt
+recursive-include docs/html *
+recursive-include examples *
+prune docs/html/.doctrees

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/428a5f76/Makefile
--
diff --git a/Makefile b/Makefile
index 3bafd3b..6022169 100644
--- a/Makefile
+++ b/Makefile
@@ -13,34 +13,50 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-EXTENSIONS=extensions
-DOCS=docs
-HTML=docs/html
+EXTENSIONS = ./extensions
+DIST = ./dist
+DOCS = ./docs
+HTML = ./docs/html
+EASY_INSTALL_PTH = $(VIRTUAL_ENV)/lib/python2.7/site-packages/easy-install.pth
 
-.PHONY: clean aria-requirements docs-requirements docs
 .DEFAULT_GOAL = test
+.PHONY: clean install install-virtual requirements docs-requirements 
test-requirements docs test dist deploy
 
 clean:
-   rm -rf "$(HTML)" .tox .coverage*
+   rm -rf "$(DIST)" "$(HTML)" .tox .coverage*
-find . -type f -name '.coverage' -delete
-find . -type d -name '.coverage' -exec rm -rf {} \; 2>/dev/null
-find . -type d -name '*.egg-info' -exec rm -rf {} \; 2>/dev/null
 
 install:
-   pip install --upgrade .
+   pip install .
 
-requirements:
-   pip install --upgrade --requirement requirements.txt
+install-virtual:
+   pip install --editable .
+   
+   # "pip install --editable" will not add our extensions to the path, so 
we will patch the virtualenv
+   EXTENSIONS_PATH="$$(head -n 1 "$(EASY_INSTALL_PTH)")/extensions" && \
+   if ! grep -Fxq "$$EXTENSIONS_PATH" "$(EASY_INSTALL_PTH)"; then \
+   echo "$$EXTENSIONS_PATH" >> "$(EASY_INSTALL_PTH)"; \
+   fi
 
 docs-requirements:
pip install --upgrade --requirement "$(DOCS)/requirements.txt"
 
 test-requirements:
-   pip install tox==2.5.0
+   pip install --upgrade tox>=2.7.0
 
-docs: docs-requirements requirements
+docs: docs-requirements
rm -rf "$(HTML)"
sphinx-build -b html "$(DOCS)" "$(HTML)"
 
-test: test-requirements requirements
-   PYTHONPATH="$(EXTENSIONS):$(PYTHONPATH)" tox
+test: test-requirements
+   tox -e py27
+
+dist: docs
+   python ./setup.py sdist bdist_wheel
+
+deploy:
+   pip install --upgrade twine>=1.9.1
+   gpg --detach-sign -a "$(DIST)"/*
+   twine upload "$(DIST)"/*

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/428a5f76/README.rst
--
diff --git a/README.rst b/README.rst
index 91cdc3c..8af13a5 100644
--- a/README.rst
+++ b/README.rst
@@ -1,124 +1,103 @@
 ARIA
 
 
-|Build Status| |Appveyor Build Status| |License| |PyPI release| |Python
-Versions| |Wheel| |Contributors| |Open Pull Requests| |Closed Pull
-Requests|
+|Build Status| |Appveyor Build Status| |License| |PyPI release| |Python 
Versions| |Wheel|
+|Contributors| |Open Pull Requests| |Closed Pull Requests|
+
 
 What is ARIA?
 -
 
 `ARIA `__ is a an open-source,
-`TOSCA `__-based,
-lightweight library and CLI for orchestration and for consumption by
-projects building 

incubator-ariatosca git commit: Fix Makefile and docs [Forced Update!]

2017-06-13 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-54-prepare-aria-packaging 960e4554e -> 336d8fdc4 (forced 
update)


Fix Makefile and docs


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/336d8fdc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/336d8fdc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/336d8fdc

Branch: refs/heads/ARIA-54-prepare-aria-packaging
Commit: 336d8fdc43570b98bd65191a6a278e5090ec5163
Parents: af530de
Author: Tal Liron 
Authored: Tue Jun 13 16:05:19 2017 -0500
Committer: Tal Liron 
Committed: Tue Jun 13 16:14:19 2017 -0500

--
 MANIFEST.in   |  12 ++---
 Makefile  |  40 ++-
 README.rst| 118 ++---
 docs/conf.py  |   3 +-
 docs/requirements.txt |   4 +-
 setup.cfg |   2 +
 6 files changed, 88 insertions(+), 91 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/336d8fdc/MANIFEST.in
--
diff --git a/MANIFEST.in b/MANIFEST.in
index dd16e28..13c9506 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,9 +1,9 @@
-include CHANGELOG.rst
-include CONTRIBUTING
 include LICENSE
 include NOTICE
-include README.rst
-include requirements.txt
+include CONTRIBUTING
 include VERSION
-recursive-include docs *
-recursive-include examples *
\ No newline at end of file
+include CHANGELOG.rst
+include requirements.txt
+recursive-include docs/html *
+recursive-include examples *
+prune docs/html/.doctrees

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/336d8fdc/Makefile
--
diff --git a/Makefile b/Makefile
index 3bafd3b..a83b695 100644
--- a/Makefile
+++ b/Makefile
@@ -13,34 +13,50 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-EXTENSIONS=extensions
-DOCS=docs
-HTML=docs/html
+EXTENSIONS = ./extensions
+DIST = ./dist
+DOCS = ./docs
+HTML = ./docs/html
+EGG_LINK = $(VIRTUAL_ENV)/local/lib/python2.7/site-packages/aria.egg-link
 
-.PHONY: clean aria-requirements docs-requirements docs
 .DEFAULT_GOAL = test
+.PHONY: clean install install-virtual requirements docs-requirements 
test-requirements docs test dist deploy
 
 clean:
-   rm -rf "$(HTML)" .tox .coverage*
+   rm -rf "$(DIST)" "$(HTML)" .tox .coverage*
-find . -type f -name '.coverage' -delete
-find . -type d -name '.coverage' -exec rm -rf {} \; 2>/dev/null
-find . -type d -name '*.egg-info' -exec rm -rf {} \; 2>/dev/null
 
 install:
-   pip install --upgrade .
+   pip install .
 
-requirements:
-   pip install --upgrade --requirement requirements.txt
+install-virtual:
+   pip install --editable .
+   
+   # "pip install --editable" will not add our extensions to the path, so 
we will patch the virtualenv
+   EXTENSIONS_PATH="$$(head -n 1 "$(EGG_LINK)")/extensions" && \
+   if ! grep -Fxq "$$EXTENSIONS_PATH" "$(EGG_LINK)"; then \
+   printf "\n$$EXTENSIONS_PATH" >> "$(EGG_LINK)"; \
+   fi
 
 docs-requirements:
pip install --upgrade --requirement "$(DOCS)/requirements.txt"
 
 test-requirements:
-   pip install tox==2.5.0
+   pip install --upgrade tox>=2.7.0
 
-docs: docs-requirements requirements
+docs: docs-requirements
rm -rf "$(HTML)"
sphinx-build -b html "$(DOCS)" "$(HTML)"
 
-test: test-requirements requirements
-   PYTHONPATH="$(EXTENSIONS):$(PYTHONPATH)" tox
+test: test-requirements
+   tox -e py27
+
+dist: docs
+   python ./setup.py sdist bdist_wheel
+
+deploy:
+   pip install --upgrade twine>=1.9.1
+   gpg --detach-sign -a "$(DIST)"/*
+   twine upload "$(DIST)"/*

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/336d8fdc/README.rst
--
diff --git a/README.rst b/README.rst
index 91cdc3c..8af13a5 100644
--- a/README.rst
+++ b/README.rst
@@ -1,124 +1,103 @@
 ARIA
 
 
-|Build Status| |Appveyor Build Status| |License| |PyPI release| |Python
-Versions| |Wheel| |Contributors| |Open Pull Requests| |Closed Pull
-Requests|
+|Build Status| |Appveyor Build Status| |License| |PyPI release| |Python 
Versions| |Wheel|
+|Contributors| |Open Pull Requests| |Closed Pull Requests|
+
 
 What is ARIA?
 -
 
 `ARIA `__ is a an open-source,
-`TOSCA `__-based,
-lightweight library and CLI for orchestration and for consumption by
-projects building TOSCA-based solutions for resources 

incubator-ariatosca git commit: Fix Makefile and docs [Forced Update!]

2017-06-13 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-54-prepare-aria-packaging 77476a67b -> 960e4554e (forced 
update)


Fix Makefile and docs


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/960e4554
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/960e4554
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/960e4554

Branch: refs/heads/ARIA-54-prepare-aria-packaging
Commit: 960e4554e113b902cb8f61d0ddadd1471064399f
Parents: af530de
Author: Tal Liron 
Authored: Tue Jun 13 16:05:19 2017 -0500
Committer: Tal Liron 
Committed: Tue Jun 13 16:10:56 2017 -0500

--
 MANIFEST.in   |  12 ++---
 Makefile  |  40 ++-
 README.rst| 118 ++---
 docs/conf.py  |   3 +-
 docs/requirements.txt |   4 +-
 setup.cfg |   2 +
 6 files changed, 88 insertions(+), 91 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/960e4554/MANIFEST.in
--
diff --git a/MANIFEST.in b/MANIFEST.in
index dd16e28..13c9506 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,9 +1,9 @@
-include CHANGELOG.rst
-include CONTRIBUTING
 include LICENSE
 include NOTICE
-include README.rst
-include requirements.txt
+include CONTRIBUTING
 include VERSION
-recursive-include docs *
-recursive-include examples *
\ No newline at end of file
+include CHANGELOG.rst
+include requirements.txt
+recursive-include docs/html *
+recursive-include examples *
+prune docs/html/.doctrees

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/960e4554/Makefile
--
diff --git a/Makefile b/Makefile
index 3bafd3b..a455c8d 100644
--- a/Makefile
+++ b/Makefile
@@ -13,34 +13,50 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-EXTENSIONS=extensions
-DOCS=docs
-HTML=docs/html
+EXTENSIONS = ./extensions
+DIST = ./dist
+DOCS = ./docs
+HTML = ./docs/html
+EGG_LINK = $(VIRTUAL_ENV)/local/lib/python2.7/site-packages/aria.egg-link
 
-.PHONY: clean aria-requirements docs-requirements docs
 .DEFAULT_GOAL = test
+.PHONY: clean install install-virtual requirements docs-requirements 
test-requirements docs test dist deploy
 
 clean:
-   rm -rf "$(HTML)" .tox .coverage*
+   rm -rf "$(DIST)" "$(HTML)" .tox .coverage*
-find . -type f -name '.coverage' -delete
-find . -type d -name '.coverage' -exec rm -rf {} \; 2>/dev/null
-find . -type d -name '*.egg-info' -exec rm -rf {} \; 2>/dev/null
 
 install:
-   pip install --upgrade .
+   pip install .
 
-requirements:
-   pip install --upgrade --requirement requirements.txt
+install-virtual:
+   pip install --editable .
+   
+   # "pip install --editable" will not add our extensions to the path, so 
we will patch the virtualenv
+   EXTENSIONS_PATH="$$(head -n 1 "$(EGG_LINK)")/extensions" && \
+   if ! grep -Fxq "$$EXTENSIONS_PATH" "$(EGG_LINK)"; then \
+   printf "\n$$EXTENSIONS_PATH" >> "$(EGG_LINK)"; \
+   fi
 
 docs-requirements:
pip install --upgrade --requirement "$(DOCS)/requirements.txt"
 
 test-requirements:
-   pip install tox==2.5.0
+   pip install --upgrade tox>=2.7.0
 
-docs: docs-requirements requirements
+docs: docs-requirements
rm -rf "$(HTML)"
sphinx-build -b html "$(DOCS)" "$(HTML)"
 
-test: test-requirements requirements
-   PYTHONPATH="$(EXTENSIONS):$(PYTHONPATH)" tox
+test: test-requirements
+   tox -e py27
+
+dist: docs
+   python ./setup.py sdist bdist_wheel
+   gpg --detach-sign -a "$(DIST)"/*
+
+deploy:
+   pip install --upgrade twine>=1.9.1
+   twine upload "$(DIST)"/*

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/960e4554/README.rst
--
diff --git a/README.rst b/README.rst
index 91cdc3c..8af13a5 100644
--- a/README.rst
+++ b/README.rst
@@ -1,124 +1,103 @@
 ARIA
 
 
-|Build Status| |Appveyor Build Status| |License| |PyPI release| |Python
-Versions| |Wheel| |Contributors| |Open Pull Requests| |Closed Pull
-Requests|
+|Build Status| |Appveyor Build Status| |License| |PyPI release| |Python 
Versions| |Wheel|
+|Contributors| |Open Pull Requests| |Closed Pull Requests|
+
 
 What is ARIA?
 -
 
 `ARIA `__ is a an open-source,
-`TOSCA `__-based,
-lightweight library and CLI for orchestration and for consumption by
-projects building TOSCA-based solutions for resources 

incubator-ariatosca git commit: Fix Makefile and docs [Forced Update!]

2017-06-13 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-54-prepare-aria-packaging c41945751 -> 77476a67b (forced 
update)


Fix Makefile and docs


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/77476a67
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/77476a67
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/77476a67

Branch: refs/heads/ARIA-54-prepare-aria-packaging
Commit: 77476a67bd5f54627abd42bdc5e5a17c4baeb0a6
Parents: af530de
Author: Tal Liron 
Authored: Tue Jun 13 16:05:19 2017 -0500
Committer: Tal Liron 
Committed: Tue Jun 13 16:10:07 2017 -0500

--
 MANIFEST.in   |  12 ++---
 Makefile  |  40 ++-
 README.rst| 118 ++---
 docs/conf.py  |   3 +-
 docs/requirements.txt |   4 +-
 setup.cfg |   2 +
 6 files changed, 88 insertions(+), 91 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/77476a67/MANIFEST.in
--
diff --git a/MANIFEST.in b/MANIFEST.in
index dd16e28..13c9506 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,9 +1,9 @@
-include CHANGELOG.rst
-include CONTRIBUTING
 include LICENSE
 include NOTICE
-include README.rst
-include requirements.txt
+include CONTRIBUTING
 include VERSION
-recursive-include docs *
-recursive-include examples *
\ No newline at end of file
+include CHANGELOG.rst
+include requirements.txt
+recursive-include docs/html *
+recursive-include examples *
+prune docs/html/.doctrees

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/77476a67/Makefile
--
diff --git a/Makefile b/Makefile
index 3bafd3b..a455c8d 100644
--- a/Makefile
+++ b/Makefile
@@ -13,34 +13,50 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-EXTENSIONS=extensions
-DOCS=docs
-HTML=docs/html
+EXTENSIONS = ./extensions
+DIST = ./dist
+DOCS = ./docs
+HTML = ./docs/html
+EGG_LINK = $(VIRTUAL_ENV)/local/lib/python2.7/site-packages/aria.egg-link
 
-.PHONY: clean aria-requirements docs-requirements docs
 .DEFAULT_GOAL = test
+.PHONY: clean install install-virtual requirements docs-requirements 
test-requirements docs test dist deploy
 
 clean:
-   rm -rf "$(HTML)" .tox .coverage*
+   rm -rf "$(DIST)" "$(HTML)" .tox .coverage*
-find . -type f -name '.coverage' -delete
-find . -type d -name '.coverage' -exec rm -rf {} \; 2>/dev/null
-find . -type d -name '*.egg-info' -exec rm -rf {} \; 2>/dev/null
 
 install:
-   pip install --upgrade .
+   pip install .
 
-requirements:
-   pip install --upgrade --requirement requirements.txt
+install-virtual:
+   pip install --editable .
+   
+   # "pip install --editable" will not add our extensions to the path, so 
we will patch the virtualenv
+   EXTENSIONS_PATH="$$(head -n 1 "$(EGG_LINK)")/extensions" && \
+   if ! grep -Fxq "$$EXTENSIONS_PATH" "$(EGG_LINK)"; then \
+   printf "\n$$EXTENSIONS_PATH" >> "$(EGG_LINK)"; \
+   fi
 
 docs-requirements:
pip install --upgrade --requirement "$(DOCS)/requirements.txt"
 
 test-requirements:
-   pip install tox==2.5.0
+   pip install --upgrade tox>=2.7.0
 
-docs: docs-requirements requirements
+docs: docs-requirements
rm -rf "$(HTML)"
sphinx-build -b html "$(DOCS)" "$(HTML)"
 
-test: test-requirements requirements
-   PYTHONPATH="$(EXTENSIONS):$(PYTHONPATH)" tox
+test: test-requirements
+   tox -e py27
+
+dist: docs
+   python ./setup.py sdist bdist_wheel
+   gpg --detach-sign -a "$(DIST)"/*
+
+deploy:
+   pip install --upgrade twine>=1.9.1
+   twine upload "$(DIST)"/*

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/77476a67/README.rst
--
diff --git a/README.rst b/README.rst
index 91cdc3c..8af13a5 100644
--- a/README.rst
+++ b/README.rst
@@ -1,124 +1,103 @@
 ARIA
 
 
-|Build Status| |Appveyor Build Status| |License| |PyPI release| |Python
-Versions| |Wheel| |Contributors| |Open Pull Requests| |Closed Pull
-Requests|
+|Build Status| |Appveyor Build Status| |License| |PyPI release| |Python 
Versions| |Wheel|
+|Contributors| |Open Pull Requests| |Closed Pull Requests|
+
 
 What is ARIA?
 -
 
 `ARIA `__ is a an open-source,
-`TOSCA `__-based,
-lightweight library and CLI for orchestration and for consumption by
-projects building TOSCA-based solutions for resources 

incubator-ariatosca git commit: Fix Makefile and docs [Forced Update!]

2017-06-13 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-54-prepare-aria-packaging 257b584b4 -> c41945751 (forced 
update)


Fix Makefile and docs


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/c4194575
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/c4194575
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/c4194575

Branch: refs/heads/ARIA-54-prepare-aria-packaging
Commit: c41945751d01dd1520a2aaf0b0c0935af3debf6a
Parents: af530de
Author: Tal Liron 
Authored: Tue Jun 13 16:05:19 2017 -0500
Committer: Tal Liron 
Committed: Tue Jun 13 16:07:45 2017 -0500

--
 MANIFEST.in   |  12 ++---
 Makefile  |  39 ++-
 README.rst| 118 ++---
 docs/conf.py  |   3 +-
 docs/requirements.txt |   4 +-
 setup.cfg |   2 +
 6 files changed, 87 insertions(+), 91 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/c4194575/MANIFEST.in
--
diff --git a/MANIFEST.in b/MANIFEST.in
index dd16e28..13c9506 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,9 +1,9 @@
-include CHANGELOG.rst
-include CONTRIBUTING
 include LICENSE
 include NOTICE
-include README.rst
-include requirements.txt
+include CONTRIBUTING
 include VERSION
-recursive-include docs *
-recursive-include examples *
\ No newline at end of file
+include CHANGELOG.rst
+include requirements.txt
+recursive-include docs/html *
+recursive-include examples *
+prune docs/html/.doctrees

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/c4194575/Makefile
--
diff --git a/Makefile b/Makefile
index 3bafd3b..c2d7856 100644
--- a/Makefile
+++ b/Makefile
@@ -13,34 +13,49 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-EXTENSIONS=extensions
-DOCS=docs
-HTML=docs/html
+EXTENSIONS = ./extensions
+DIST = ./dist
+DOCS = ./docs
+HTML = ./docs/html
+EGG_LINK = $(VIRTUAL_ENV)/local/lib/python2.7/site-packages/aria.egg-link
 
-.PHONY: clean aria-requirements docs-requirements docs
 .DEFAULT_GOAL = test
+.PHONY: clean install install-virtual requirements docs-requirements 
test-requirements docs test dist deploy
 
 clean:
-   rm -rf "$(HTML)" .tox .coverage*
+   rm -rf "$(DIST)" "$(HTML)" .tox .coverage*
-find . -type f -name '.coverage' -delete
-find . -type d -name '.coverage' -exec rm -rf {} \; 2>/dev/null
-find . -type d -name '*.egg-info' -exec rm -rf {} \; 2>/dev/null
 
 install:
-   pip install --upgrade .
+   pip install .
 
-requirements:
-   pip install --upgrade --requirement requirements.txt
+install-virtual:
+   pip install --editable .
+   
+   # "pip install --editable" will not add our extensions to the path, so 
we will patch the virtualenv
+   EXTENSIONS_PATH="$$(head -n 1 "$(EGG_LINK)")/extensions" && \
+   if ! grep -Fxq "$$EXTENSIONS_PATH" "$(EGG_LINK)"; then \
+   printf "\n$$EXTENSIONS_PATH" >> "$(EGG_LINK)"; \
+   fi
 
 docs-requirements:
pip install --upgrade --requirement "$(DOCS)/requirements.txt"
 
 test-requirements:
-   pip install tox==2.5.0
+   pip install --upgrade tox>=2.7.0
 
-docs: docs-requirements requirements
+docs: docs-requirements
rm -rf "$(HTML)"
sphinx-build -b html "$(DOCS)" "$(HTML)"
 
-test: test-requirements requirements
-   PYTHONPATH="$(EXTENSIONS):$(PYTHONPATH)" tox
+test: test-requirements
+   tox -e py27
+
+dist: docs
+   python ./setup.py sdist bdist_wheel
+   gpg --detach-sign -a "$(DIST)"/*
+
+deploy:
+   twine upload "$(DIST)"/*

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/c4194575/README.rst
--
diff --git a/README.rst b/README.rst
index 91cdc3c..8af13a5 100644
--- a/README.rst
+++ b/README.rst
@@ -1,124 +1,103 @@
 ARIA
 
 
-|Build Status| |Appveyor Build Status| |License| |PyPI release| |Python
-Versions| |Wheel| |Contributors| |Open Pull Requests| |Closed Pull
-Requests|
+|Build Status| |Appveyor Build Status| |License| |PyPI release| |Python 
Versions| |Wheel|
+|Contributors| |Open Pull Requests| |Closed Pull Requests|
+
 
 What is ARIA?
 -
 
 `ARIA `__ is a an open-source,
-`TOSCA `__-based,
-lightweight library and CLI for orchestration and for consumption by
-projects building TOSCA-based solutions for resources and services
-orchestration.
+`TOSCA 

incubator-ariatosca git commit: Fix Makefile and docs

2017-06-13 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-54-prepare-aria-packaging af530de47 -> 257b584b4


Fix Makefile and docs


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/257b584b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/257b584b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/257b584b

Branch: refs/heads/ARIA-54-prepare-aria-packaging
Commit: 257b584b44e06cde8f1a0b5902a4dcf1c7a616a5
Parents: af530de
Author: Tal Liron 
Authored: Tue Jun 13 16:05:19 2017 -0500
Committer: Tal Liron 
Committed: Tue Jun 13 16:05:19 2017 -0500

--
 MANIFEST.in   |  12 ++---
 Makefile  |  39 ++-
 README.rst| 118 ++---
 docs/conf.py  |   3 +-
 docs/requirements.txt |   4 +-
 setup.cfg |   2 +
 6 files changed, 87 insertions(+), 91 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/257b584b/MANIFEST.in
--
diff --git a/MANIFEST.in b/MANIFEST.in
index dd16e28..13c9506 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,9 +1,9 @@
-include CHANGELOG.rst
-include CONTRIBUTING
 include LICENSE
 include NOTICE
-include README.rst
-include requirements.txt
+include CONTRIBUTING
 include VERSION
-recursive-include docs *
-recursive-include examples *
\ No newline at end of file
+include CHANGELOG.rst
+include requirements.txt
+recursive-include docs/html *
+recursive-include examples *
+prune docs/html/.doctrees

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/257b584b/Makefile
--
diff --git a/Makefile b/Makefile
index 3bafd3b..c16ce5d 100644
--- a/Makefile
+++ b/Makefile
@@ -13,34 +13,49 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-EXTENSIONS=extensions
-DOCS=docs
-HTML=docs/html
+EXTENSIONS = ./extensions
+DIST = ./dist
+DOCS = ./docs
+HTML = ./docs/html
+EGG_LINK = $(VIRTUAL_ENV)/local/lib/python2.7/site-packages/aria.egg-link
 
-.PHONY: clean aria-requirements docs-requirements docs
 .DEFAULT_GOAL = test
+.PHONY: clean install install-virtual requirements docs-requirements 
test-requirements docs test dist deploy
 
 clean:
-   rm -rf "$(HTML)" .tox .coverage*
+   rm -rf "$(DIST)" "$(HTML)" .tox .coverage*
-find . -type f -name '.coverage' -delete
-find . -type d -name '.coverage' -exec rm -rf {} \; 2>/dev/null
-find . -type d -name '*.egg-info' -exec rm -rf {} \; 2>/dev/null
 
 install:
-   pip install --upgrade .
+   pip install .
 
-requirements:
-   pip install --upgrade --requirement requirements.txt
+install-virtual:
+   pip install --editable .
+   
+   # "pip install --editable" will not add our extensions to the path, so 
we will patch the virtualenv
+   EXTENSIONS_PATH="$$(head -n 1 "$(EGG_LINK)")/extensions" && \
+   if ! grep -Fxq "$$EXTENSIONS_PATH" "$(EGG_LINK)"; then \
+   printf "\n$$EXTENSIONS_PATH" >> "$(EGG_LINK)"; \
+   fi
 
 docs-requirements:
pip install --upgrade --requirement "$(DOCS)/requirements.txt"
 
 test-requirements:
-   pip install tox==2.5.0
+   pip install --upgrade tox>=2.7.0
 
-docs: docs-requirements requirements
+docs: install-virtual docs-requirements
rm -rf "$(HTML)"
sphinx-build -b html "$(DOCS)" "$(HTML)"
 
-test: test-requirements requirements
-   PYTHONPATH="$(EXTENSIONS):$(PYTHONPATH)" tox
+test: test-requirements
+   tox -e py27
+
+dist: docs
+   python ./setup.py sdist bdist_wheel
+   gpg --detach-sign -a "$(DIST)"/*
+
+deploy:
+   twine upload "$(DIST)"/*

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/257b584b/README.rst
--
diff --git a/README.rst b/README.rst
index 91cdc3c..8af13a5 100644
--- a/README.rst
+++ b/README.rst
@@ -1,124 +1,103 @@
 ARIA
 
 
-|Build Status| |Appveyor Build Status| |License| |PyPI release| |Python
-Versions| |Wheel| |Contributors| |Open Pull Requests| |Closed Pull
-Requests|
+|Build Status| |Appveyor Build Status| |License| |PyPI release| |Python 
Versions| |Wheel|
+|Contributors| |Open Pull Requests| |Closed Pull Requests|
+
 
 What is ARIA?
 -
 
 `ARIA `__ is a an open-source,
-`TOSCA `__-based,
-lightweight library and CLI for orchestration and for consumption by
-projects building TOSCA-based solutions for resources and services
-orchestration.
+`TOSCA 

[11/13] incubator-ariatosca git commit: Remove tosca.nodes.nfv.FP, as it does not appear in csd04

2017-06-12 Thread emblemparade
Remove tosca.nodes.nfv.FP, as it does not appear in csd04


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/0a224811
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/0a224811
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/0a224811

Branch: refs/heads/ARIA-275-update-NFV-profile-to-csd04
Commit: 0a2248111548d8faadfb85832a2324de58ac471d
Parents: 41c9f25
Author: Avia Efrat 
Authored: Tue Jun 6 00:45:31 2017 +0300
Committer: Avia Efrat 
Committed: Tue Jun 6 22:33:10 2017 +0300

--
 .../profiles/tosca-simple-nfv-1.0/nodes.yaml| 20 
 1 file changed, 20 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/0a224811/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/nodes.yaml
--
diff --git 
a/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/nodes.yaml 
b/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/nodes.yaml
index b123aab..5bd002d 100644
--- a/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/nodes.yaml
+++ b/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/nodes.yaml
@@ -321,26 +321,6 @@ node_types:
   # monitoring_parameters:
 # modeled as ad hoc (named) capabilities in node template
 
-  tosca.nodes.nfv.FP:
-_extensions:
-  shorthand_name: FP # ARIA NOTE: the spec must be mistaken here, says "VL"
-  type_qualified_name: tosca:FP
-  specification: tosca-simple-nfv-1.0
-  specification_section: 10.5.1
-  specification_url: 
'http://docs.oasis-open.org/tosca/tosca-nfv/v1.0/csd03/tosca-nfv-v1.0-csd03.html#_Toc447714722'
-description: >-
-  The NFV FP node type represents a logical network forwarding path entity 
as defined by [ETSI GS NFV-MAN 001 v1.1.1].
-derived_from: tosca.nodes.Root
-properties:
-  policy:
-description: >-
-  A policy or rule to apply to the NFP
-type: string
-required: false
-requirements:
-  - forwarder:
-  capability: tosca.capabilities.nfv.Forwarder
-
   tosca.nodes.nfv.VL.ELine:
 _extensions:
   shorthand_name: VL.ELine # ARIA NOTE: omitted in the spec



[12/13] incubator-ariatosca git commit: Merge branch 'ARIA-275-update-NFV-profile-to-csd04' of https://git-wip-us.apache.org/repos/asf/incubator-ariatosca into ARIA-275-update-NFV-profile-to-csd04

2017-06-12 Thread emblemparade
Merge branch 'ARIA-275-update-NFV-profile-to-csd04' of 
https://git-wip-us.apache.org/repos/asf/incubator-ariatosca into 
ARIA-275-update-NFV-profile-to-csd04


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/a62f4c23
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/a62f4c23
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/a62f4c23

Branch: refs/heads/ARIA-275-update-NFV-profile-to-csd04
Commit: a62f4c239a6b94232e11224411d7b8a6e9217966
Parents: 5e8044d 9240e20
Author: Tal Liron 
Authored: Wed Jun 7 15:32:25 2017 -0500
Committer: Tal Liron 
Committed: Wed Jun 7 15:32:25 2017 -0500

--
 aria/cli/commands/services.py   | 23 -
 aria/modeling/models.py |  4 +--
 aria/storage/sql_mapi.py|  3 ++-
 examples/hello-world/helloworld.yaml| 16 
 tests/cli/test_services.py  | 26 ++--
 tests/end2end/test_hello_world.py   |  1 +
 tests/mock/models.py| 21 ++--
 .../node-cellar/node-cellar.yaml| 12 +
 8 files changed, 78 insertions(+), 28 deletions(-)
--




[02/13] incubator-ariatosca git commit: remove two relationship types

2017-06-12 Thread emblemparade
remove two relationship types

- tosca.relationships.nfv.ForwardsTo
- tosca.relationships.nfv.VirtualLinksTo

They are not present in csd04.
The changelog at the end of csd04 states:
"Deleted NSD related content, v1.0 will only cover VNFD model."
The second relationship was a part of the NSD model.
The first relationship was a part of the VNFFGD model, which probably
also got deleted, since it is not the VNFD model.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/bdf117c5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/bdf117c5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/bdf117c5

Branch: refs/heads/ARIA-275-update-NFV-profile-to-csd04
Commit: bdf117c5163525e48538695825d8035e493e4058
Parents: 7bffd18
Author: Avia Efrat 
Authored: Tue Jun 6 01:05:13 2017 +0300
Committer: Avia Efrat 
Committed: Tue Jun 6 22:33:10 2017 +0300

--
 .../tosca-simple-nfv-1.0/relationships.yaml | 35 
 1 file changed, 7 insertions(+), 28 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/bdf117c5/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/relationships.yaml
--
diff --git 
a/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/relationships.yaml
 
b/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/relationships.yaml
index b745735..6cf0f6e 100644
--- 
a/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/relationships.yaml
+++ 
b/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/relationships.yaml
@@ -20,8 +20,8 @@ relationship_types:
   shorthand_name: VirtualBindsTo
   type_qualified_name: tosca:VirtualBindsTo
   specification: tosca-simple-nfv-1.0
-  specification_section: 8.4.1
-  specification_url: 
'http://docs.oasis-open.org/tosca/tosca-nfv/v1.0/csd03/tosca-nfv-v1.0-csd03.html#_Toc419290234'
+  specification_section: 5.7.1
+  specification_url: 
'http://docs.oasis-open.org/tosca/tosca-nfv/v1.0/csd04/tosca-nfv-v1.0-csd04.html#_Toc482896074'
 description: >-
   This relationship type represents an association relationship between 
VDU and CP node types.
 derived_from: tosca.relationships.DependsOn
@@ -32,33 +32,12 @@ relationship_types:
   shorthand_name: Monitor
   type_qualified_name: tosca:Monitor
   specification: tosca-simple-nfv-1.0
-  specification_section: 8.4.2
-  specification_url: 
'http://docs.oasis-open.org/tosca/tosca-nfv/v1.0/csd03/tosca-nfv-v1.0-csd03.html#_Toc418607880'
+  specification_section: 5.7.2
+  specification_url: 
'http://docs.oasis-open.org/tosca/tosca-nfv/v1.0/csd04/tosca-nfv-v1.0-csd04.html#_Toc482896075'
 description: >-
   This relationship type represents an association relationship to the 
Metric capability of VDU node types.
 derived_from: tosca.relationships.ConnectsTo
 valid_target_types: [ tosca.capabilities.nfv.Metric ]
-
-  tosca.relationships.nfv.ForwardsTo:
-_extensions:
-  shorthand_name: ForwardsTo
-  type_qualified_name: tosca:ForwardsTo
-  specification: tosca-simple-nfv-1.0
-  specification_section: 10.4.1
-  specification_url: 
'http://docs.oasis-open.org/tosca/tosca-nfv/v1.0/csd03/tosca-nfv-v1.0-csd03.html#_Toc447714720'
-description: >-
-  This relationship type represents a traffic flow between two connection 
point node types.
-derived_from: tosca.relationships.Root
-valid_target_types: [ tosca.capabilities.nfv.Forwarder ]
-
-  tosca.relationships.nfv.VirtualLinksTo:
-_extensions:
-  shorthand_name: VirtualLinksTo
-  type_qualified_name: tosca:VirtualLinksTo
-  specification: tosca-simple-nfv-1.0
-  specification_section: 11.4.1
-  specification_url: 
'http://docs.oasis-open.org/tosca/tosca-nfv/v1.0/csd03/tosca-nfv-v1.0-csd03.html#_Toc447714737'
-description: >-
-  This relationship type represents an association relationship between 
VNFs and VL node types.
-derived_from: tosca.relationships.DependsOn
-valid_target_types: [ tosca.capabilities.nfv.VirtualLinkable ]
+# ARIA NOTE: csd04 lacks the definition of tosca.relationships.nfv.Monitor 
(the derived_from and
+# valid_target_types). It took the liberty of copying their values from 
csd03 as I feel they
+# just got lost in an extensive cut-and-paste session that took place 
between csd03 and csd04.



[03/13] incubator-ariatosca git commit: Removed the virtual link (VL) node types, as they do not appear in csd04

2017-06-12 Thread emblemparade
Removed the virtual link (VL) node types, as they do not appear in csd04


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/7bffd188
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/7bffd188
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/7bffd188

Branch: refs/heads/ARIA-275-update-NFV-profile-to-csd04
Commit: 7bffd1881f26cd086e885424332f2f70f2db9faa
Parents: 0a22481
Author: Avia Efrat 
Authored: Tue Jun 6 00:50:47 2017 +0300
Committer: Avia Efrat 
Committed: Tue Jun 6 22:33:10 2017 +0300

--
 .../profiles/tosca-simple-nfv-1.0/nodes.yaml| 109 ++-
 1 file changed, 35 insertions(+), 74 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/7bffd188/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/nodes.yaml
--
diff --git 
a/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/nodes.yaml 
b/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/nodes.yaml
index 5bd002d..2e1b634 100644
--- a/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/nodes.yaml
+++ b/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/nodes.yaml
@@ -192,41 +192,41 @@ node_types:
   specification: tosca-simple-nfv-1.0
   specification_section: 5.9.4
   specification_url: 
'http://docs.oasis-open.org/tosca/tosca-nfv/v1.0/csd04/tosca-nfv-v1.0-csd04.html#_Toc482896081'
-  derived_from: tosca.nodes.Root
-  description: >-
-The TOSCA nfv.Cpd node represents network connectivity to a compute 
resource or a VL as defined
-by [ETSI GS NFV-IFA 011]. This is an abstract type used as parent for the 
various Cpd types.
-  derived_from: tosca.nodes.Root
-  properties:
-layer_protocol:
-  description: Identifies which protocol the connection point uses for 
connectivity purposes
-  type: string
-  constraints:
-- valid_values: [ ethernet, mpls, odu2, ipv4, ipv6, pseudo_wire ]
-  required: false
-role: # Name in ETSI NFV IFA011 v0.7.3 cpRole
-  description: >-
-Identifies the role of the port in the context of the traffic flow 
patterns in the VNF or
-parent NS. For example a VNF with a tree flow pattern within the VNF 
will have legal cpRoles
-of ROOT and LEAF
-  type: string
-  constraints:
-- valid_values: [ root, leaf ]
-  required: false
-description:
-  description: >-
-Provides human-readable information on the purpose of the connection 
point
-(e.g. connection point for control plane traffic).
-  type: string
-  required: false
-address_data:
-  description: >-
-Provides information on the addresses to be assigned to the connection 
point(s) instantiated
-from this Connection Point Descriptor.
-  type: list
-  entry_schema:
-type: tosca.datatype.nfv.AddressData
-  required: false
+derived_from: tosca.nodes.Root
+description: >-
+  The TOSCA nfv.Cpd node represents network connectivity to a compute 
resource or a VL as defined
+  by [ETSI GS NFV-IFA 011]. This is an abstract type used as parent for 
the various Cpd types.
+
+properties:
+  layer_protocol:
+description: Identifies which protocol the connection point uses for 
connectivity purposes
+type: string
+constraints:
+  - valid_values: [ ethernet, mpls, odu2, ipv4, ipv6, pseudo_wire ]
+required: false
+  role: # Name in ETSI NFV IFA011 v0.7.3 cpRole
+description: >-
+  Identifies the role of the port in the context of the traffic flow 
patterns in the VNF or
+  parent NS. For example a VNF with a tree flow pattern within the VNF 
will have legal cpRoles
+  of ROOT and LEAF
+type: string
+constraints:
+  - valid_values: [ root, leaf ]
+required: false
+  description:
+description: >-
+  Provides human-readable information on the purpose of the connection 
point
+  (e.g. connection point for control plane traffic).
+type: string
+required: false
+  address_data:
+description: >-
+  Provides information on the addresses to be assigned to the 
connection point(s) instantiated
+  from this Connection Point Descriptor.
+type: list
+entry_schema:
+  type: tosca.datatype.nfv.AddressData
+required: false
 
   tosca.nodes.nfv.VduCpd:
 _extensions:
@@ -320,42 +320,3 @@ node_types:
 
   # monitoring_parameters:
 # modeled as ad hoc (named) capabilities in node template
-
-  tosca.nodes.nfv.VL.ELine:
-  

[01/13] incubator-ariatosca git commit: Address more non-consistent issues of csd04

2017-06-12 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-275-update-NFV-profile-to-csd04 9240e20ec -> 692f61299


Address more non-consistent issues of csd04


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/5e8044d4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/5e8044d4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/5e8044d4

Branch: refs/heads/ARIA-275-update-NFV-profile-to-csd04
Commit: 5e8044d4b8c937da6bdfcaac27314415a2f4a982
Parents: c8e4986
Author: Avia Efrat 
Authored: Tue Jun 6 22:32:02 2017 +0300
Committer: Avia Efrat 
Committed: Tue Jun 6 22:33:10 2017 +0300

--
 .../tosca-simple-nfv-1.0/artifacts.yaml |  76 +++
 .../tosca-simple-nfv-1.0/capabilities.yaml  |   2 +-
 .../profiles/tosca-simple-nfv-1.0/data.yaml |   2 +-
 .../profiles/tosca-simple-nfv-1.0/nodes.yaml| 206 +++
 .../tosca-simple-nfv-1.0.yaml   |   1 +
 5 files changed, 204 insertions(+), 83 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/5e8044d4/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/artifacts.yaml
--
diff --git 
a/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/artifacts.yaml 
b/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/artifacts.yaml
new file mode 100644
index 000..2e68f57
--- /dev/null
+++ 
b/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/artifacts.yaml
@@ -0,0 +1,76 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+artifact_types:
+  tosca.artifacts.nfv.SwImage:
+_extensions:
+  shorthand_name: SwImage
+  type_qualified_name: tosca:SwImage
+  specification: tosca-simple-nfv-1.0
+  specification_section: 5.4.1
+  specification_url: 
'http://docs.oasis-open.org/tosca/tosca-nfv/v1.0/csd04/tosca-nfv-v1.0-csd04.html#_Toc482896067'
+derived_from: tosca.artifacts.Deployment.Image
+properties:
+  name:
+description: Name of this software image
+type: string
+required: true
+  version:
+description: Version of this software image
+type: string
+required: true
+  checksum:
+description: Checksum of the software image file
+type: string
+  container_format:
+description: >-
+  The container format describes the container file format in which 
software image is provided
+type: string
+required: true
+  disk_format:
+description: The disk format of a software image is the format of the 
underlying disk image
+type: string
+required: true
+  min_disk:
+description: The minimal disk size requirement for this software image.
+type: scalar-unit.size
+required: true
+  min_ram:
+description: The minimal disk size requirement for this software image.
+type: scalar-unit.size
+required: false
+  size: # ARIA NOTE: section [5.4.1.1 Properties] calls this field 'Size'.
+description: The size of this software image
+type: scalar-unit.size
+required: true
+  sw_image:
+description: A reference to the actual software image within VNF 
Package, or url.
+type: string
+required: true
+  operating_system:
+description: Identifies the operating system used in the software 
image.
+type: string
+required: false
+  supported _virtualization_enviroment:
+description: >-
+  Identifies the virtualization environments (e.g. hypervisor) 
compatible with this software
+  image
+type: list
+entry_schema:
+  type: string
+required: false
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/5e8044d4/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/capabilities.yaml

[08/13] incubator-ariatosca git commit: Add tosca.capabilites.nfv.VirtualCompute

2017-06-12 Thread emblemparade
Add tosca.capabilites.nfv.VirtualCompute


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/41c9f25e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/41c9f25e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/41c9f25e

Branch: refs/heads/ARIA-275-update-NFV-profile-to-csd04
Commit: 41c9f25ec920ad53c8b70699ea36a9b9d1a68980
Parents: 15b9054
Author: Avia Efrat 
Authored: Tue Jun 6 00:39:54 2017 +0300
Committer: Avia Efrat 
Committed: Tue Jun 6 22:33:10 2017 +0300

--
 .../tosca-simple-nfv-1.0/capabilities.yaml  | 26 
 1 file changed, 26 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/41c9f25e/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/capabilities.yaml
--
diff --git 
a/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/capabilities.yaml
 
b/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/capabilities.yaml
index 375ba13..6f50f61 100644
--- 
a/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/capabilities.yaml
+++ 
b/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/capabilities.yaml
@@ -62,3 +62,29 @@ capability_types:
   A node type that includes the VirtualLinkable capability indicates that 
it can be pointed by
   tosca.relationships.nfv.VirtualLinksTo relationship type.
 derived_from: tosca.capabilities.Node
+
+  tosca.capabilites.nfv.VirtualCompute:
+_extensions:
+  shorthand_name: VirtualCompute
+  type_qualified_name: tosca:VirtualCompute
+  specification: tosca-simple-nfv-1.0
+  specification_section: 5.5.3
+  specification_url: 
'http://docs.oasis-open.org/tosca/tosca-nfv/v1.0/csd04/tosca-nfv-v1.0-csd04.html#_Toc482896071'
+derived_from: tosca.capabilities.Root
+properties:
+  requested_additional_capabilities:
+# ARIA NOTE: in section [5.5.3.1 Properties] the name of this property 
is
+# "request_additional_capabilities", and its type is not a map, but 
tosca.datatypes.nfv.RequestedAdditionalCapability
+description: Describes additional capability for a particular VDU.
+type: map
+entry_schema:
+   type: tosca.datatypes.nfv.RequestedAdditionalCapability
+required: false
+  virtual_memory:
+description: Describes virtual memory of the virtualized compute
+type: tosca.datatypes.nfv.VirtualMemory
+required: true
+  virtual_cpu:
+description: Describes virtual CPU(s) of the virtualized compute.
+type: tosca.datatypes.nfv.VirtualCpu
+required: true



[07/13] incubator-ariatosca git commit: Add tosca.nodes.nfv.VDU.Compute and tosca.nodes.nfv.VDU.VirtualStorage

2017-06-12 Thread emblemparade
Add tosca.nodes.nfv.VDU.Compute and tosca.nodes.nfv.VDU.VirtualStorage


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/15b9054e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/15b9054e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/15b9054e

Branch: refs/heads/ARIA-275-update-NFV-profile-to-csd04
Commit: 15b9054e219ca7176e5d2cbbfee8f2cd114e3f0d
Parents: 794af1c
Author: Avia Efrat 
Authored: Tue Jun 6 00:30:13 2017 +0300
Committer: Avia Efrat 
Committed: Tue Jun 6 22:33:10 2017 +0300

--
 .../profiles/tosca-simple-nfv-1.0/data.yaml |   2 +-
 .../profiles/tosca-simple-nfv-1.0/nodes.yaml| 180 ++-
 2 files changed, 176 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/15b9054e/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/data.yaml
--
diff --git 
a/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/data.yaml 
b/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/data.yaml
index cf35cba..cec230c 100644
--- a/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/data.yaml
+++ b/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/data.yaml
@@ -99,7 +99,7 @@ data_types:
   instantiated from the parent Connection Point Descriptor.
 type: tosca.datatypes.nfv.L3AddressData
 required: false
-# ARIA NOTE: states under the "constraints" column in the properties 
table:
+# ARIA NOTE: the spec states under the "constraints" column in the 
properties table:
 # "Shall be present when the addressType is ip_address."
 
   tosca.datatypes.nfv.VirtualNetworkInterfaceRequirements:

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/15b9054e/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/nodes.yaml
--
diff --git 
a/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/nodes.yaml 
b/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/nodes.yaml
index d0ccadd..b123aab 100644
--- a/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/nodes.yaml
+++ b/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/nodes.yaml
@@ -15,6 +15,176 @@
 
 node_types:
 
+  tosca.nodes.nfv.VDU.Compute:
+_extensions:
+  shorthand_name: VDU.Compute
+  type_qualified_name: tosca:VDU.Compute
+  specification: tosca-simple-nfv-1.0
+  specification_section: 5.9.2
+  specification_url: 
'http://docs.oasis-open.org/tosca/tosca-nfv/v1.0/csd04/tosca-nfv-v1.0-csd04.html#_Toc482896079'
+description: >-
+  The TOSCA nfv.VDU.Compute node type represents the virtual compute part 
of a VDU entity which
+  it mainly describes the deployment and operational behavior of a VNF 
component (VNFC), as
+  defined by [ETSI NFV IFA011].
+derived_from: tosca.nodes.Compute
+properties:
+  name:
+description: Human readable name of the Vdu
+type: string
+required: true
+  description:
+description: Human readable description of the Vdu
+type: string
+required: true
+  boot_order:
+description: >-
+  The key indicates the boot index (lowest index defines highest boot 
priority).
+  The Value references a descriptor from which a valid boot device is 
created e.g.
+  VirtualStorageDescriptor from which a VirtualStorage instance is 
created. If no boot order
+  is defined the default boot order defined in the VIM or NFVI shall 
be used.
+type: type: # explicit index (boot index) not necessary, contrary to 
IFA011
+  entry_schema:
+type: string
+required: false
+  nfvi_constraints:
+description: >-
+  Describes constraints on the NFVI for the VNFC instance(s) created 
from this Vdu.
+  For example, aspects of a secure hosting environment for the VNFC 
instance that involve
+  additional entities or processes. More software images can be 
attached to the
+  virtualization container using virtual_storage.
+type: list
+entry_schema:
+  type: string
+required: false
+  configurable_properties:
+description: Describes the configurable properties of all VNFC 
instances based on this VDU.
+type: map
+entry_schema:
+  type: tosca.datatypes.nfv.VnfcConfigurableProperties
+required: true
+attributes: # ARIA NOTE: The attributes are only described in section 
[5.9.2.5 Definition], but
+# are 

[13/13] incubator-ariatosca git commit: Cleanup and streamlining

2017-06-12 Thread emblemparade
Cleanup and streamlining


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/692f6129
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/692f6129
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/692f6129

Branch: refs/heads/ARIA-275-update-NFV-profile-to-csd04
Commit: 692f61299722b81158a24bf0e9fcd49df7e37487
Parents: a62f4c2
Author: Tal Liron 
Authored: Mon Jun 12 12:48:46 2017 -0500
Committer: Tal Liron 
Committed: Mon Jun 12 12:48:46 2017 -0500

--
 .../tosca-simple-nfv-1.0/artifacts.yaml |  38 ++--
 .../tosca-simple-nfv-1.0/capabilities.yaml  |  12 +-
 .../profiles/tosca-simple-nfv-1.0/data.yaml |  83 
 .../profiles/tosca-simple-nfv-1.0/nodes.yaml| 202 +--
 .../tosca-simple-nfv-1.0/relationships.yaml |   8 +-
 5 files changed, 131 insertions(+), 212 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/692f6129/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/artifacts.yaml
--
diff --git 
a/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/artifacts.yaml 
b/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/artifacts.yaml
index 2e68f57..2427d9f 100644
--- 
a/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/artifacts.yaml
+++ 
b/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/artifacts.yaml
@@ -14,6 +14,7 @@
 # limitations under the License.
 
 artifact_types:
+
   tosca.artifacts.nfv.SwImage:
 _extensions:
   shorthand_name: SwImage
@@ -24,53 +25,60 @@ artifact_types:
 derived_from: tosca.artifacts.Deployment.Image
 properties:
   name:
-description: Name of this software image
+description: >-
+  Name of this software image.
 type: string
 required: true
   version:
-description: Version of this software image
+description: >-
+  Version of this software image.
 type: string
 required: true
   checksum:
-description: Checksum of the software image file
+description: >-
+  Checksum of the software image file.
 type: string
   container_format:
 description: >-
-  The container format describes the container file format in which 
software image is provided
+  The container format describes the container file format in which 
software image is
+  provided.
 type: string
 required: true
   disk_format:
-description: The disk format of a software image is the format of the 
underlying disk image
+description: >-
+  The disk format of a software image is the format of the underlying 
disk image.
 type: string
 required: true
   min_disk:
-description: The minimal disk size requirement for this software image.
+description: >-
+  The minimal disk size requirement for this software image.
 type: scalar-unit.size
 required: true
   min_ram:
-description: The minimal disk size requirement for this software image.
+description: >-
+  The minimal disk size requirement for this software image.
 type: scalar-unit.size
 required: false
-  size: # ARIA NOTE: section [5.4.1.1 Properties] calls this field 'Size'.
-description: The size of this software image
+  size: # ARIA NOTE: section [5.4.1.1 Properties] calls this field 'Size'
+description: >-
+  The size of this software image
 type: scalar-unit.size
 required: true
   sw_image:
-description: A reference to the actual software image within VNF 
Package, or url.
+description: >-
+  A reference to the actual software image within VNF Package, or url.
 type: string
 required: true
   operating_system:
-description: Identifies the operating system used in the software 
image.
+description: >-
+  Identifies the operating system used in the software image.
 type: string
 required: false
   supported _virtualization_enviroment:
 description: >-
   Identifies the virtualization environments (e.g. hypervisor) 
compatible with this software
-  image
+  image.
 type: list
 entry_schema:
   type: string
 required: false
-
-
-

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/692f6129/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/capabilities.yaml

[06/13] incubator-ariatosca git commit: Fixed WD04, Rev04 (2016-11-14) and WD04, Rev05 (2017-1-17)

2017-06-12 Thread emblemparade
Fixed WD04, Rev04 (2016-11-14) and WD04, Rev05 (2017-1-17)


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/794af1c8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/794af1c8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/794af1c8

Branch: refs/heads/ARIA-275-update-NFV-profile-to-csd04
Commit: 794af1c8ef3b9e53cf4beec3fdf87ac0c1799623
Parents: ca3dc4a
Author: Avia Efrat 
Authored: Mon Jun 5 16:36:52 2017 +0300
Committer: Avia Efrat 
Committed: Tue Jun 6 22:33:10 2017 +0300

--
 .../tosca-simple-nfv-1.0/capabilities.yaml  |  45 
 .../profiles/tosca-simple-nfv-1.0/data.yaml |  75 -
 .../profiles/tosca-simple-nfv-1.0/nodes.yaml| 112 +--
 3 files changed, 5 insertions(+), 227 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/794af1c8/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/capabilities.yaml
--
diff --git 
a/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/capabilities.yaml
 
b/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/capabilities.yaml
index 6bc6b67..375ba13 100644
--- 
a/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/capabilities.yaml
+++ 
b/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/capabilities.yaml
@@ -15,51 +15,6 @@
 
 capability_types:
 
-  tosca.capabilities.Compute.Container.Architecture:
-_extensions:
-  shorthand_name: Compute.Container.Architecture
-  type_qualified_name: tosca:Compute.Container.Architecture
-  specification: tosca-simple-nfv-1.0
-  specification_section: 8.2.1
-  specification_url: 
'http://docs.oasis-open.org/tosca/tosca-nfv/v1.0/csd03/tosca-nfv-v1.0-csd03.html#DEFN_TYPE_CAPABILITIES_CONTAINER'
-description: >-
-  Enhance compute architecture capability that needs to be typically use 
for performance sensitive NFV workloads.
-derived_from: tosca.capabilities.Container
-properties:
-  mem_page_size:
-description: >-
-  Describe page size of the VM:
-  
-  * small page size is typically 4KB
-  * large page size is typically 2MB
-  * any page size maps to system default
-  * custom MB value: sets TLB size to this specific value
-type: string
-# ARIA NOTE: seems wrong in the spec
-#constraints:
-#  - [ normal, huge ]
-  cpu_allocation:
-description: >-
-  Describes CPU allocation requirements like dedicated CPUs (cpu 
pinning), socket count, thread count, etc.
-type: tosca.datatypes.compute.Container.Architecture.CPUAllocation
-required: false
-  numa_node_count:
-description: >-
-  Specifies the symmetric count of NUMA nodes to expose to the VM. 
vCPU and Memory equally split across this number of
-  NUMA.
-  
-  NOTE: the map of numa_nodes should not be specified.
-type: integer
-required: false 
-  numa_nodes:
-description: >-
-  Asymmetric allocation of vCPU and Memory across the specific NUMA 
nodes (CPU sockets and memory banks).
-  
-  NOTE: symmetric numa_node_count should not be specified.
-type: map
-entry_schema: tosca.datatypes.compute.Container.Architecture.NUMA
-required: false
-
   tosca.capabilities.nfv.VirtualBindable:
 _extensions:
   shorthand_name: VirtualBindable

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/794af1c8/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/data.yaml
--
diff --git 
a/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/data.yaml 
b/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/data.yaml
index f6a07ef..cf35cba 100644
--- a/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/data.yaml
+++ b/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/data.yaml
@@ -303,78 +303,3 @@ data_types:
 entry_schema:
   type: string
 required: false
-
-  tosca.datatypes.compute.Container.Architecture.CPUAllocation:
-_extensions:
-  shorthand_name: Container.Architecture.CPUAllocation # seems to be a 
mistake in the spec; the norm is to add a "Container.Architecture." prefix
-  type_qualified_name: tosca:Container.Architecture.CPUAllocation
-  specification: tosca-simple-nfv-1.0
-  specification_section: 8.3.1
-description: >-
-  Granular CPU allocation requirements for NFV workloads.
-derived_from: tosca.datatypes.Root
-properties:
-  

[10/13] incubator-ariatosca git commit: Remove two capability types

2017-06-12 Thread emblemparade
Remove two capability types

- tosca.capabilities.nfv.Forwarder
- tosca.capabilities.nfv.VirtualLinkable

They are not present in csd04.
The changelog at the end of csd04 states:
"Deleted NSD related content, v1.0 will only cover VNFD model."
The second capability was a part of the NSD model.
The first capability was a part of the VNFFGD model, which probably
also got deleted, since it is not the VNFD model.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/6bad650e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/6bad650e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/6bad650e

Branch: refs/heads/ARIA-275-update-NFV-profile-to-csd04
Commit: 6bad650eb673edd07b1aafca68dd3106a3774e42
Parents: bdf117c
Author: Avia Efrat 
Authored: Tue Jun 6 01:26:08 2017 +0300
Committer: Avia Efrat 
Committed: Tue Jun 6 22:33:10 2017 +0300

--
 .../tosca-simple-nfv-1.0/capabilities.yaml  | 32 +++-
 1 file changed, 4 insertions(+), 28 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/6bad650e/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/capabilities.yaml
--
diff --git 
a/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/capabilities.yaml
 
b/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/capabilities.yaml
index 6f50f61..db6a62b 100644
--- 
a/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/capabilities.yaml
+++ 
b/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/capabilities.yaml
@@ -20,8 +20,8 @@ capability_types:
   shorthand_name: VirtualBindable
   type_qualified_name: tosca:VirtualBindable
   specification: tosca-simple-nfv-1.0
-  specification_section: 8.2.2
-  specification_url: 
'http://docs.oasis-open.org/tosca/tosca-nfv/v1.0/csd03/tosca-nfv-v1.0-csd03.html#_Toc419290220'
+  specification_section: 5.5.1
+  specification_url: 
'http://docs.oasis-open.org/tosca/tosca-nfv/v1.0/csd04/tosca-nfv-v1.0-csd04.html#_Toc482896069'
 description: >-
   A node type that includes the VirtualBindable capability indicates that 
it can be pointed by
   tosca.relationships.nfv.VirtualBindsTo relationship type.
@@ -32,37 +32,13 @@ capability_types:
   shorthand_name: Metric
   type_qualified_name: tosca:Metric
   specification: tosca-simple-nfv-1.0
-  specification_section: 8.2.3
-  specification_url: 
'http://docs.oasis-open.org/tosca/tosca-nfv/v1.0/csd03/tosca-nfv-v1.0-csd03.html#_Toc418607874'
+  specification_section: 5.5.2
+  specification_url: 
'http://docs.oasis-open.org/tosca/tosca-nfv/v1.0/csd04/tosca-nfv-v1.0-csd04.html#_Toc482896070'
 description: >-
   A node type that includes the Metric capability indicates that it can be 
monitored using an nfv.relationships.Monitor
   relationship type.
 derived_from: tosca.capabilities.Endpoint
 
-  tosca.capabilities.nfv.Forwarder:
-_extensions:
-  shorthand_name: Forwarder
-  type_qualified_name: tosca:Forwarder
-  specification: tosca-simple-nfv-1.0
-  specification_section: 10.3.1
-  specification_url: 
'http://docs.oasis-open.org/tosca/tosca-nfv/v1.0/csd03/tosca-nfv-v1.0-csd03.html#_Toc447714718'
-description: >-
-  A node type that includes the Forwarder capability indicates that it can 
be pointed by tosca.relationships.nfv.FowardsTo
-  relationship type.
-derived_from: tosca.capabilities.Root
-
-  tosca.capabilities.nfv.VirtualLinkable:
-_extensions:
-  shorthand_name: VirtualLinkable
-  type_qualified_name: tosca:VirtualLinkable
-  specification: tosca-simple-nfv-1.0
-  specification_section: 11.3.1
-  specification_url: 
'http://docs.oasis-open.org/tosca/tosca-nfv/v1.0/csd03/tosca-nfv-v1.0-csd03.html#_Toc447714735'
-description: >-
-  A node type that includes the VirtualLinkable capability indicates that 
it can be pointed by
-  tosca.relationships.nfv.VirtualLinksTo relationship type.
-derived_from: tosca.capabilities.Node
-
   tosca.capabilites.nfv.VirtualCompute:
 _extensions:
   shorthand_name: VirtualCompute



[incubator-ariatosca] Git Push Summary

2017-06-07 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-199-cli-service-output [deleted] 5afa2f7fe


incubator-ariatosca git commit: ARIA-199 Add "services outputs" CLI command

2017-06-07 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/master cd830731b -> 5afa2f7fe


ARIA-199 Add "services outputs" CLI command

* Also add an output to hello world example


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/5afa2f7f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/5afa2f7f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/5afa2f7f

Branch: refs/heads/master
Commit: 5afa2f7fe11977593009b6da25733fa8dd61a1e9
Parents: cd83073
Author: Tal Liron 
Authored: Fri Jun 2 14:20:28 2017 -0500
Committer: Tal Liron 
Committed: Wed Jun 7 14:42:35 2017 -0500

--
 aria/cli/commands/services.py   | 23 -
 aria/modeling/models.py |  4 +--
 examples/hello-world/helloworld.yaml| 16 
 tests/cli/test_services.py  | 26 ++--
 tests/end2end/test_hello_world.py   |  1 +
 tests/mock/models.py| 21 ++--
 .../node-cellar/node-cellar.yaml| 12 +
 7 files changed, 76 insertions(+), 27 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/5afa2f7f/aria/cli/commands/services.py
--
diff --git a/aria/cli/commands/services.py b/aria/cli/commands/services.py
index 476387c..ae5895a 100644
--- a/aria/cli/commands/services.py
+++ b/aria/cli/commands/services.py
@@ -192,17 +192,16 @@ def outputs(service_name, model_storage, logger):
 """
 logger.info('Showing outputs for service {0}...'.format(service_name))
 service = model_storage.service.get_by_name(service_name)
-#TODO fix this section..
-outputs_def = service.outputs
-response = model_storage.service.outputs.get(service_name)
-outputs_ = StringIO()
-for output_name, output in response.outputs.iteritems():
-outputs_.write(' - "{0}":{1}'.format(output_name, os.linesep))
-description = outputs_def[output_name].get('description', '')
-outputs_.write(' Description: {0}{1}'.format(description,
- os.linesep))
-outputs_.write(' Value: {0}{1}'.format(output, os.linesep))
-logger.info(outputs_.getvalue())
+
+if service.outputs:
+outputs_string = StringIO()
+for output_name, output in service.outputs.iteritems():
+outputs_string.write(' - "{0}":{1}'.format(output_name, 
os.linesep))
+outputs_string.write(' Description: 
{0}{1}'.format(output.description, os.linesep))
+outputs_string.write(' Value: {0}{1}'.format(output.value, 
os.linesep))
+logger.info(outputs_string.getvalue())
+else:
+logger.info('\tNo outputs')
 
 
 @services.command(name='inputs',
@@ -218,10 +217,12 @@ def inputs(service_name, model_storage, logger):
 """
 logger.info('Showing inputs for service {0}...'.format(service_name))
 service = model_storage.service.get_by_name(service_name)
+
 if service.inputs:
 inputs_string = StringIO()
 for input_name, input_ in service.inputs.iteritems():
 inputs_string.write(' - "{0}":{1}'.format(input_name, os.linesep))
+inputs_string.write(' Description: 
{0}{1}'.format(input_.description, os.linesep))
 inputs_string.write(' Value: {0}{1}'.format(input_.value, 
os.linesep))
 logger.info(inputs_string.getvalue())
 else:

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/5afa2f7f/aria/modeling/models.py
--
diff --git a/aria/modeling/models.py b/aria/modeling/models.py
index 4102090..f30b86f 100644
--- a/aria/modeling/models.py
+++ b/aria/modeling/models.py
@@ -268,7 +268,7 @@ class Argument(aria_declarative_base, 
orchestration.ArgumentBase):
 
 
 # See also __all__ at the top of this file
-models_to_register = [
+models_to_register = (
 # Service template models
 ServiceTemplate,
 NodeTemplate,
@@ -317,4 +317,4 @@ models_to_register = [
 Task,
 Log,
 Argument
-]
+)

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/5afa2f7f/examples/hello-world/helloworld.yaml
--
diff --git a/examples/hello-world/helloworld.yaml 
b/examples/hello-world/helloworld.yaml
index be78401..d3369b7 100644
--- a/examples/hello-world/helloworld.yaml
+++ b/examples/hello-world/helloworld.yaml
@@ -1,13 +1,14 @@
 tosca_definitions_version: tosca_simple_yaml_1_0
 
 node_types:
-  web_server:
+
+  WebServer:
 derived_from: 

[1/2] incubator-ariatosca git commit: ARIA-213 sporadic tests failures over locked database issue [Forced Update!]

2017-06-07 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-199-cli-service-output 3e8186ba4 -> 5afa2f7fe (forced update)


ARIA-213 sporadic tests failures over locked database issue

Increased the timeout for acquiring database lock (for sqlite based db).


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/cd830731
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/cd830731
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/cd830731

Branch: refs/heads/ARIA-199-cli-service-output
Commit: cd830731bff21e836b5e661623b269aa40f92f52
Parents: 180e0a1
Author: max-orlov 
Authored: Tue Jun 6 17:05:21 2017 +0300
Committer: max-orlov 
Committed: Wed Jun 7 17:21:01 2017 +0300

--
 aria/storage/sql_mapi.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/cd830731/aria/storage/sql_mapi.py
--
diff --git a/aria/storage/sql_mapi.py b/aria/storage/sql_mapi.py
index 4d7e233..bb6223a 100644
--- a/aria/storage/sql_mapi.py
+++ b/aria/storage/sql_mapi.py
@@ -405,7 +405,8 @@ def init_storage(base_dir, filename='db.sqlite'):
 
 path=os.path.join(base_dir, filename))
 
-engine = create_engine(uri)
+engine = create_engine(uri, connect_args=dict(timeout=15))
+
 session_factory = orm.sessionmaker(bind=engine)
 session = orm.scoped_session(session_factory=session_factory)
 



[incubator-ariatosca] Git Push Summary

2017-06-07 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-128-test-engine-failures [deleted] 3dadc9f64


[incubator-ariatosca] Git Push Summary

2017-06-07 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-92-plugin-in-implementation-string [deleted] a7e7826ed


[5/5] incubator-ariatosca git commit: ARIA-254 Create of multiple nodes per template

2017-06-06 Thread emblemparade
ARIA-254 Create of multiple nodes per template

* New aria.Scaling policy (and "scaling" role)
* NodeTemplate model no longer stores scaling values (default_instances,
etc.) but instead fetches them from applicable scaling policies
* Some code cleanup


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/f5f5852a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/f5f5852a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/f5f5852a

Branch: refs/heads/ARIA-254-multiple-nodes-per-template
Commit: f5f5852ad61a59c1904a9316b4e4b31e2553c6e5
Parents: 180e0a1
Author: Tal Liron 
Authored: Thu Jun 1 14:17:17 2017 -0500
Committer: Tal Liron 
Committed: Tue Jun 6 14:53:59 2017 -0500

--
 aria/cli/commands/workflows.py  |   4 +-
 aria/cli/execution_logging.py   |   4 +-
 aria/core.py|   2 +-
 aria/modeling/orchestration.py  |  12 +-
 aria/modeling/relationship.py   |   2 +-
 aria/modeling/service_changes.py|   8 +-
 aria/modeling/service_common.py |   2 +-
 aria/modeling/service_instance.py   |  59 +++
 aria/modeling/service_template.py   | 153 +--
 aria/modeling/types.py  |   4 +-
 aria/orchestrator/workflow_runner.py|   2 +-
 aria/orchestrator/workflows/executor/celery.py  |   2 +-
 aria/orchestrator/workflows/executor/process.py |   2 +-
 aria/orchestrator/workflows/executor/thread.py  |   2 +-
 aria/storage/core.py|   2 +-
 .../profiles/aria-1.0/aria-1.0.yaml |  25 ++-
 .../simple_v1_0/assignments.py  |   8 +
 .../simple_v1_0/data_types.py   |  22 ++-
 .../simple_v1_0/definitions.py  |   8 +
 .../aria_extension_tosca/simple_v1_0/filters.py |   2 +
 .../aria_extension_tosca/simple_v1_0/misc.py|  10 ++
 .../simple_v1_0/modeling/__init__.py|   3 -
 .../simple_v1_0/presentation/extensible.py  |   1 +
 .../presentation/field_validators.py|  20 +++
 .../simple_v1_0/presentation/types.py   |   2 +
 .../simple_v1_0/presenter.py|   3 +-
 .../simple_v1_0/templates.py|   8 +-
 .../aria_extension_tosca/simple_v1_0/types.py   |  10 +-
 tests/end2end/test_hello_world.py   |   2 +-
 tests/end2end/test_nodecellar.py|   2 +-
 tests/mock/models.py|   8 +-
 tests/modeling/test_mixins.py   |   3 -
 tests/modeling/test_models.py   |  20 +--
 tests/orchestrator/context/test_operation.py|   2 +-
 .../node-cellar/node-cellar.yaml|   1 +
 .../node-cellar/types/openstack.yaml|   3 +-
 36 files changed, 286 insertions(+), 137 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/f5f5852a/aria/cli/commands/workflows.py
--
diff --git a/aria/cli/commands/workflows.py b/aria/cli/commands/workflows.py
index 221dbc4..baab973 100644
--- a/aria/cli/commands/workflows.py
+++ b/aria/cli/commands/workflows.py
@@ -42,7 +42,7 @@ def show(workflow_name, service_name, model_storage, logger):
 logger.info('Retrieving workflow {0} for service {1}'.format(
 workflow_name, service_name))
 service = model_storage.service.get_by_name(service_name)
-workflow = next((wf for wf in service.workflows.values() if
+workflow = next((wf for wf in service.workflows.itervalues() if
  wf.name == workflow_name), None)
 if not workflow:
 raise AriaCliError(
@@ -91,7 +91,7 @@ def list(service_name, model_storage, logger):
 """
 logger.info('Listing workflows for service {0}...'.format(service_name))
 service = model_storage.service.get_by_name(service_name)
-workflows_list = sorted(service.workflows.values(), key=lambda w: w.name)
+workflows_list = sorted(service.workflows.itervalues(), key=lambda w: 
w.name)
 
 defaults = {
 'service_template_name': service.service_template_name,

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/f5f5852a/aria/cli/execution_logging.py
--
diff --git a/aria/cli/execution_logging.py b/aria/cli/execution_logging.py
index 248ff7c..467123c 100644
--- a/aria/cli/execution_logging.py
+++ b/aria/cli/execution_logging.py
@@ -106,11 +106,11 @@ def stylize_log(item, mark_pattern):
 if item.task:
 # operation task
 implementation = item.task.function
-inputs = 

[2/5] incubator-ariatosca git commit: ARIA-180 Separate Parameter models and change relationships

2017-06-06 Thread emblemparade
ARIA-180 Separate Parameter models and change relationships

First, the Parameter model was separated in 6 individual models:
Input, Output, Property, Attribute, Configuration, Argument.

The first four models are TOSCA-related, and we needed to separate them
as according to the TOSCA spec, all four of these represent different
things, and have different fields.

The other two models (Configuration, Argument) are
orchestration-related, as and such are not supposed to represent the
same object as the TOSCA-related objects.

Second, up until now, the relationships of the then-Parameter models
were many-to-many to any other object related to them. This was a problem,
as logically the relationships were one-to-many (from the other models
to the Parameter models).
In this commit, we changed them to one-to-many. In addition, separating
the Parameter models allowed us to more accurately represent the relationship 
of each individual Parameter-model with its related models.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/b6d3c43b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/b6d3c43b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/b6d3c43b

Branch: refs/heads/ARIA-254-multiple-nodes-per-template
Commit: b6d3c43ba42ccc3fa7287aff132c83563abea035
Parents: 9174f94
Author: Avia Efrat 
Authored: Sun May 21 16:28:30 2017 +0300
Committer: Avia Efrat 
Committed: Sun Jun 4 15:40:03 2017 +0300

--
 aria/modeling/mixins.py | 216 +-
 aria/modeling/models.py |  42 +-
 aria/modeling/orchestration.py  |  37 +-
 aria/modeling/service_changes.py|  12 -
 aria/modeling/service_common.py | 423 +++
 aria/modeling/service_instance.py   | 177 
 aria/modeling/service_template.py   | 164 +++
 aria/modeling/utils.py  |   6 +-
 .../context/collection_instrumentation.py   |  10 +-
 .../execution_plugin/instantiation.py   |  36 +-
 aria/orchestrator/workflow_runner.py|   4 +-
 aria/orchestrator/workflows/api/task.py |   6 +-
 aria/orchestrator/workflows/executor/dry.py |   2 +-
 examples/hello-world/helloworld.yaml|   2 +-
 .../simple_v1_0/modeling/__init__.py|  71 ++--
 tests/cli/test_service_templates.py |   2 +-
 tests/mock/models.py|  21 +-
 tests/mock/topology.py  |   8 +-
 tests/modeling/test_models.py   |  49 ++-
 .../context/test_collection_instrumentation.py  |  64 +--
 tests/orchestrator/context/test_toolbelt.py |   2 +-
 tests/orchestrator/test_workflow_runner.py  |  14 +-
 .../workflows/executor/test_executor.py |   2 +-
 tests/storage/test_model_storage.py |   6 +-
 tox.ini |   2 -
 25 files changed, 867 insertions(+), 511 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b6d3c43b/aria/modeling/mixins.py
--
diff --git a/aria/modeling/mixins.py b/aria/modeling/mixins.py
index 38c812d..c98a866 100644
--- a/aria/modeling/mixins.py
+++ b/aria/modeling/mixins.py
@@ -23,10 +23,14 @@ from sqlalchemy.ext import associationproxy
 from sqlalchemy import (
 Column,
 Integer,
-Text
+Text,
+PickleType
 )
 
-from . import utils
+from ..parser.consumption import ConsumptionContext
+from ..utils import console, collections, caching, formatting
+from ..utils.type import canonical_type_name, full_type_name
+from . import utils, functions
 
 
 class ModelMixin(object):
@@ -140,3 +144,211 @@ class TemplateModelMixin(InstanceModelMixin):
 
 def instantiate(self, container):
 raise NotImplementedError
+
+
+class ParameterMixin(TemplateModelMixin, caching.HasCachedMethods):
 #pylint: disable=abstract-method
+"""
+Represents a typed value. The value can contain nested intrinsic functions.
+
+This model can be used as the ``container_holder`` argument for 
:func:`functions.evaluate`.
+
+:ivar name: Name
+:vartype name: basestring
+:ivar type_name: Type name
+:vartype type_name: basestring
+:ivar value: Value
+:ivar description: Description
+:vartype description: basestring
+"""
+
+__tablename__ = 'parameter'
+
+name = Column(Text)
+type_name = Column(Text)
+description = Column(Text)
+_value = Column(PickleType)
+
+@property
+def value(self):
+value = self._value
+if value is not None:
+

[4/5] incubator-ariatosca git commit: ARIA-262 Inconsistent node attributes behavior

2017-06-06 Thread emblemparade
ARIA-262 Inconsistent node attributes behavior

Inroduced a more comprehensive way to instrument relationship attributes.

Old behavior instrumented attributes only if they were accessed directly from 
the
parent model. Traversing the storage made the access to an attribute 
inconsistent.

The new solution enables encapsulating the attributes disregarding the way they
were retrieved.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/180e0a1c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/180e0a1c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/180e0a1c

Branch: refs/heads/ARIA-254-multiple-nodes-per-template
Commit: 180e0a1cf1ad6da0ddd611b90a58e71acbea52e7
Parents: e4d0036
Author: max-orlov 
Authored: Wed May 31 21:07:49 2017 +0300
Committer: max-orlov 
Committed: Tue Jun 6 15:20:12 2017 +0300

--
 .../context/collection_instrumentation.py   | 242 ---
 aria/orchestrator/context/operation.py  |  21 +-
 aria/orchestrator/context/toolbelt.py   |   6 +-
 aria/orchestrator/decorators.py |   6 +-
 .../execution_plugin/ctx_proxy/server.py|  17 +-
 aria/storage/api.py |  10 +
 aria/storage/collection_instrumentation.py  | 306 +++
 aria/storage/core.py|  15 +
 aria/storage/sql_mapi.py|  14 +-
 aria/utils/imports.py   |   2 +-
 .../context/test_collection_instrumentation.py  | 150 ++---
 .../execution_plugin/test_ctx_proxy_server.py   |   2 +-
 tests/orchestrator/execution_plugin/test_ssh.py |  10 +-
 tests/orchestrator/workflows/core/test_task.py  |   2 +-
 .../executor/test_process_executor_extension.py |   3 +-
 15 files changed, 490 insertions(+), 316 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/180e0a1c/aria/orchestrator/context/collection_instrumentation.py
--
diff --git a/aria/orchestrator/context/collection_instrumentation.py 
b/aria/orchestrator/context/collection_instrumentation.py
deleted file mode 100644
index 8f80d4a..000
--- a/aria/orchestrator/context/collection_instrumentation.py
+++ /dev/null
@@ -1,242 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from functools import partial
-
-from aria.modeling import models
-
-
-class _InstrumentedCollection(object):
-
-def __init__(self,
- model,
- parent,
- field_name,
- seq=None,
- is_top_level=True,
- **kwargs):
-self._model = model
-self._parent = parent
-self._field_name = field_name
-self._is_top_level = is_top_level
-self._load(seq, **kwargs)
-
-@property
-def _raw(self):
-raise NotImplementedError
-
-def _load(self, seq, **kwargs):
-"""
-Instantiates the object from existing seq.
-
-:param seq: the original sequence to load from
-:return:
-"""
-raise NotImplementedError
-
-def _set(self, key, value):
-"""
-set the changes for the current object (not in the db)
-
-:param key:
-:param value:
-:return:
-"""
-raise NotImplementedError
-
-def _del(self, collection, key):
-raise NotImplementedError
-
-def _instrument(self, key, value):
-"""
-Instruments any collection to track changes (and ease of access)
-:param key:
-:param value:
-:return:
-"""
-if isinstance(value, _InstrumentedCollection):
-return value
-elif isinstance(value, dict):
-instrumentation_cls = _InstrumentedDict
-elif isinstance(value, list):
-instrumentation_cls = _InstrumentedList
-else:
-return value
-
-return 

[1/5] incubator-ariatosca git commit: ARIA-180 Separate Parameter models and change relationships [Forced Update!]

2017-06-06 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-254-multiple-nodes-per-template eee540cbb -> f5f5852ad 
(forced update)


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b6d3c43b/tests/cli/test_service_templates.py
--
diff --git a/tests/cli/test_service_templates.py 
b/tests/cli/test_service_templates.py
index 7e86896..cc0150e 100644
--- a/tests/cli/test_service_templates.py
+++ b/tests/cli/test_service_templates.py
@@ -215,7 +215,7 @@ class TestServiceTemplatesInputs(TestCliBase):
 
 def test_inputs_existing_inputs(self, monkeypatch, mock_storage):
 monkeypatch.setattr(_Environment, 'model_storage', mock_storage)
-input = mock_models.create_parameter(name='input1', value='value1')
+input = mock_models.create_input(name='input1', value='value1')
 st = mock_models.create_service_template(inputs={'input1': input})
 monkeypatch.setattr(mock_storage.service_template, 'get_by_name',
 mock.MagicMock(return_value=st))

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b6d3c43b/tests/mock/models.py
--
diff --git a/tests/mock/models.py b/tests/mock/models.py
index 50aa340..56a6e3e 100644
--- a/tests/mock/models.py
+++ b/tests/mock/models.py
@@ -94,7 +94,7 @@ def create_service_with_dependencies(include_execution=False,
 service.executions = [execution]
 execution.id = '1'
 if include_input:
-input = create_parameter(name='input1', value='value1')
+input = create_input(name='input1', value='value1')
 service.inputs = {'input1': input}
 if include_node:
 node_template = create_node_template(service_template=service_template)
@@ -110,7 +110,7 @@ def 
create_node_template_with_dependencies(include_node=False, include_property=
 service = create_service(service_template=service_template)
 create_node(dependency_node_template=node_template, service=service)
 if include_property:
-node_template.properties = {'prop1': create_parameter(name='prop1', 
value='value1')}
+node_template.properties = {'prop1': create_property(name='prop1', 
value='value1')}
 return node_template
 
 
@@ -120,7 +120,7 @@ def create_node_with_dependencies(include_attribute=False):
 node_template.service_template.services[0] = 
create_service(node_template.service_template)
 node = create_node(node_template, 
node_template.service_template.services[0])
 if include_attribute:
-node.attributes['attribute1'] = models.Parameter.wrap('attribute1', 
'value1')   # pylint: disable=unsubscriptable-object
+node.attributes['attribute1'] = models.Attribute.wrap('attribute1', 
'value1')   # pylint: disable=unsubscriptable-object
 return node
 
 
@@ -227,7 +227,7 @@ def create_interface(service, interface_name, 
operation_name, operation_kwargs=N
 
 if operation_kwargs and operation_kwargs.get('arguments'):
 operation_kwargs['arguments'] = dict(
-(argument_name, models.Parameter.wrap(argument_name, 
argument_value))
+(argument_name, models.Argument.wrap(argument_name, 
argument_value))
 for argument_name, argument_value in 
operation_kwargs['arguments'].iteritems()
 if argument_value is not None)
 
@@ -278,9 +278,16 @@ def create_plugin_specification(name='test_plugin', 
version='0.1'):
 )
 
 
-def create_parameter(name, value):
-p = models.Parameter()
-return p.wrap(name, value)
+def _create_parameter(name, value, model_cls):
+return model_cls.wrap(name, value)
+
+
+def create_property(name, value):
+return _create_parameter(name, value, model_cls=models.Property)
+
+
+def create_input(name, value):
+return _create_parameter(name, value, model_cls=models.Input)
 
 
 def _dictify(item):

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b6d3c43b/tests/mock/topology.py
--
diff --git a/tests/mock/topology.py b/tests/mock/topology.py
index ab08dbd..9f0521f 100644
--- a/tests/mock/topology.py
+++ b/tests/mock/topology.py
@@ -28,8 +28,8 @@ def create_simple_topology_single_node(model_storage, 
create_operation):
 'Standard', 'create',
 operation_kwargs=dict(
 function=create_operation,
-arguments={'key': aria_models.Parameter.wrap('key', 'create'),
-   'value': aria_models.Parameter.wrap('value', True)})
+arguments={'key': aria_models.Argument.wrap('key', 'create'),
+   'value': aria_models.Argument.wrap('value', True)})
 )
 node_template.interface_templates[interface_template.name] = 
interface_template # pylint: disable=unsubscriptable-object
 
@@ -39,8 +39,8 @@ def 

[4/5] incubator-ariatosca git commit: ARIA-262 Inconsistent node attributes behavior

2017-06-06 Thread emblemparade
ARIA-262 Inconsistent node attributes behavior

Inroduced a more comprehensive way to instrument relationship attributes.

Old behavior instrumented attributes only if they were accessed directly from 
the
parent model. Traversing the storage made the access to an attribute 
inconsistent.

The new solution enables encapsulating the attributes disregarding the way they
were retrieved.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/180e0a1c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/180e0a1c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/180e0a1c

Branch: refs/heads/ARIA-260-send-interface-inputs
Commit: 180e0a1cf1ad6da0ddd611b90a58e71acbea52e7
Parents: e4d0036
Author: max-orlov 
Authored: Wed May 31 21:07:49 2017 +0300
Committer: max-orlov 
Committed: Tue Jun 6 15:20:12 2017 +0300

--
 .../context/collection_instrumentation.py   | 242 ---
 aria/orchestrator/context/operation.py  |  21 +-
 aria/orchestrator/context/toolbelt.py   |   6 +-
 aria/orchestrator/decorators.py |   6 +-
 .../execution_plugin/ctx_proxy/server.py|  17 +-
 aria/storage/api.py |  10 +
 aria/storage/collection_instrumentation.py  | 306 +++
 aria/storage/core.py|  15 +
 aria/storage/sql_mapi.py|  14 +-
 aria/utils/imports.py   |   2 +-
 .../context/test_collection_instrumentation.py  | 150 ++---
 .../execution_plugin/test_ctx_proxy_server.py   |   2 +-
 tests/orchestrator/execution_plugin/test_ssh.py |  10 +-
 tests/orchestrator/workflows/core/test_task.py  |   2 +-
 .../executor/test_process_executor_extension.py |   3 +-
 15 files changed, 490 insertions(+), 316 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/180e0a1c/aria/orchestrator/context/collection_instrumentation.py
--
diff --git a/aria/orchestrator/context/collection_instrumentation.py 
b/aria/orchestrator/context/collection_instrumentation.py
deleted file mode 100644
index 8f80d4a..000
--- a/aria/orchestrator/context/collection_instrumentation.py
+++ /dev/null
@@ -1,242 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from functools import partial
-
-from aria.modeling import models
-
-
-class _InstrumentedCollection(object):
-
-def __init__(self,
- model,
- parent,
- field_name,
- seq=None,
- is_top_level=True,
- **kwargs):
-self._model = model
-self._parent = parent
-self._field_name = field_name
-self._is_top_level = is_top_level
-self._load(seq, **kwargs)
-
-@property
-def _raw(self):
-raise NotImplementedError
-
-def _load(self, seq, **kwargs):
-"""
-Instantiates the object from existing seq.
-
-:param seq: the original sequence to load from
-:return:
-"""
-raise NotImplementedError
-
-def _set(self, key, value):
-"""
-set the changes for the current object (not in the db)
-
-:param key:
-:param value:
-:return:
-"""
-raise NotImplementedError
-
-def _del(self, collection, key):
-raise NotImplementedError
-
-def _instrument(self, key, value):
-"""
-Instruments any collection to track changes (and ease of access)
-:param key:
-:param value:
-:return:
-"""
-if isinstance(value, _InstrumentedCollection):
-return value
-elif isinstance(value, dict):
-instrumentation_cls = _InstrumentedDict
-elif isinstance(value, list):
-instrumentation_cls = _InstrumentedList
-else:
-return value
-
-return 

[2/5] incubator-ariatosca git commit: ARIA-180 Separate Parameter models and change relationships

2017-06-06 Thread emblemparade
ARIA-180 Separate Parameter models and change relationships

First, the Parameter model was separated in 6 individual models:
Input, Output, Property, Attribute, Configuration, Argument.

The first four models are TOSCA-related, and we needed to separate them
as according to the TOSCA spec, all four of these represent different
things, and have different fields.

The other two models (Configuration, Argument) are
orchestration-related, as and such are not supposed to represent the
same object as the TOSCA-related objects.

Second, up until now, the relationships of the then-Parameter models
were many-to-many to any other object related to them. This was a problem,
as logically the relationships were one-to-many (from the other models
to the Parameter models).
In this commit, we changed them to one-to-many. In addition, separating
the Parameter models allowed us to more accurately represent the relationship 
of each individual Parameter-model with its related models.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/b6d3c43b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/b6d3c43b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/b6d3c43b

Branch: refs/heads/ARIA-260-send-interface-inputs
Commit: b6d3c43ba42ccc3fa7287aff132c83563abea035
Parents: 9174f94
Author: Avia Efrat 
Authored: Sun May 21 16:28:30 2017 +0300
Committer: Avia Efrat 
Committed: Sun Jun 4 15:40:03 2017 +0300

--
 aria/modeling/mixins.py | 216 +-
 aria/modeling/models.py |  42 +-
 aria/modeling/orchestration.py  |  37 +-
 aria/modeling/service_changes.py|  12 -
 aria/modeling/service_common.py | 423 +++
 aria/modeling/service_instance.py   | 177 
 aria/modeling/service_template.py   | 164 +++
 aria/modeling/utils.py  |   6 +-
 .../context/collection_instrumentation.py   |  10 +-
 .../execution_plugin/instantiation.py   |  36 +-
 aria/orchestrator/workflow_runner.py|   4 +-
 aria/orchestrator/workflows/api/task.py |   6 +-
 aria/orchestrator/workflows/executor/dry.py |   2 +-
 examples/hello-world/helloworld.yaml|   2 +-
 .../simple_v1_0/modeling/__init__.py|  71 ++--
 tests/cli/test_service_templates.py |   2 +-
 tests/mock/models.py|  21 +-
 tests/mock/topology.py  |   8 +-
 tests/modeling/test_models.py   |  49 ++-
 .../context/test_collection_instrumentation.py  |  64 +--
 tests/orchestrator/context/test_toolbelt.py |   2 +-
 tests/orchestrator/test_workflow_runner.py  |  14 +-
 .../workflows/executor/test_executor.py |   2 +-
 tests/storage/test_model_storage.py |   6 +-
 tox.ini |   2 -
 25 files changed, 867 insertions(+), 511 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b6d3c43b/aria/modeling/mixins.py
--
diff --git a/aria/modeling/mixins.py b/aria/modeling/mixins.py
index 38c812d..c98a866 100644
--- a/aria/modeling/mixins.py
+++ b/aria/modeling/mixins.py
@@ -23,10 +23,14 @@ from sqlalchemy.ext import associationproxy
 from sqlalchemy import (
 Column,
 Integer,
-Text
+Text,
+PickleType
 )
 
-from . import utils
+from ..parser.consumption import ConsumptionContext
+from ..utils import console, collections, caching, formatting
+from ..utils.type import canonical_type_name, full_type_name
+from . import utils, functions
 
 
 class ModelMixin(object):
@@ -140,3 +144,211 @@ class TemplateModelMixin(InstanceModelMixin):
 
 def instantiate(self, container):
 raise NotImplementedError
+
+
+class ParameterMixin(TemplateModelMixin, caching.HasCachedMethods):
 #pylint: disable=abstract-method
+"""
+Represents a typed value. The value can contain nested intrinsic functions.
+
+This model can be used as the ``container_holder`` argument for 
:func:`functions.evaluate`.
+
+:ivar name: Name
+:vartype name: basestring
+:ivar type_name: Type name
+:vartype type_name: basestring
+:ivar value: Value
+:ivar description: Description
+:vartype description: basestring
+"""
+
+__tablename__ = 'parameter'
+
+name = Column(Text)
+type_name = Column(Text)
+description = Column(Text)
+_value = Column(PickleType)
+
+@property
+def value(self):
+value = self._value
+if value is not None:
+evaluation = 

[5/5] incubator-ariatosca git commit: ARIA-260 Send interface inputs as arguments

2017-06-06 Thread emblemparade
ARIA-260 Send interface inputs as arguments


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/2e50cfa4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/2e50cfa4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/2e50cfa4

Branch: refs/heads/ARIA-260-send-interface-inputs
Commit: 2e50cfa4047b653661acf75fbbe0596571e0837b
Parents: 180e0a1
Author: Tal Liron 
Authored: Fri Jun 2 13:35:21 2017 -0500
Committer: Tal Liron 
Committed: Tue Jun 6 14:16:08 2017 -0500

--
 aria/modeling/service_instance.py   | 18 
 aria/modeling/utils.py  |  4 ++
 tests/instantiation/__init__.py | 14 ++
 tests/instantiation/test_configuration.py   | 48 
 .../node-cellar/node-cellar.yaml| 22 +++--
 5 files changed, 93 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/2e50cfa4/aria/modeling/service_instance.py
--
diff --git a/aria/modeling/service_instance.py 
b/aria/modeling/service_instance.py
index 2bf9872..4f1712c 100644
--- a/aria/modeling/service_instance.py
+++ b/aria/modeling/service_instance.py
@@ -1742,19 +1742,19 @@ class OperationBase(InstanceModelMixin):
 # In the future plugins may be able to add their own 
"configure_operation" hook that
 # can validate the configuration and otherwise create specially 
derived arguments. For
 # now, we just send all configuration parameters as arguments 
without validation.
-configurations_as_arguments = {}
-for configuration in self.configurations.itervalues():
-configurations_as_arguments[configuration.name] = 
configuration.as_argument()
+utils.instantiate_dict(self, self.arguments,
+   
utils.dict_as_arguments(self.configurations))
 
-utils.instantiate_dict(self, self.arguments, 
configurations_as_arguments)
+if self.interface is not None:
+# Send all interface inputs as extra arguments
+# ("interface" is None for workflow operations)
+# Note that they will override existing arguments of the same names
+utils.instantiate_dict(self, self.arguments,
+   
utils.dict_as_arguments(self.interface.inputs))
 
 # Send all inputs as extra arguments
 # Note that they will override existing arguments of the same names
-inputs_as_arguments = {}
-for input in self.inputs.itervalues():
-inputs_as_arguments[input.name] = input.as_argument()
-
-utils.instantiate_dict(self, self.arguments, inputs_as_arguments)
+utils.instantiate_dict(self, self.arguments, 
utils.dict_as_arguments(self.inputs))
 
 # Check for reserved arguments
 from ..orchestrator.decorators import 
OPERATION_DECORATOR_RESERVED_ARGUMENTS

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/2e50cfa4/aria/modeling/utils.py
--
diff --git a/aria/modeling/utils.py b/aria/modeling/utils.py
index 43be410..02fde23 100644
--- a/aria/modeling/utils.py
+++ b/aria/modeling/utils.py
@@ -201,6 +201,10 @@ def dump_interfaces(interfaces, name='Interfaces'):
 interface.dump()
 
 
+def dict_as_arguments(the_dict):
+return OrderedDict((name, value.as_argument()) for name, value in 
the_dict.iteritems())
+
+
 class classproperty(object):   
 # pylint: disable=invalid-name
 def __init__(self, f):
 self._func = f

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/2e50cfa4/tests/instantiation/__init__.py
--
diff --git a/tests/instantiation/__init__.py b/tests/instantiation/__init__.py
new file mode 100644
index 000..ae1e83e
--- /dev/null
+++ b/tests/instantiation/__init__.py
@@ -0,0 +1,14 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on 

[3/5] incubator-ariatosca git commit: ARIA-64 Remove PyYAML dependency

2017-06-06 Thread emblemparade
ARIA-64 Remove PyYAML dependency


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/e4d00368
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/e4d00368
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/e4d00368

Branch: refs/heads/ARIA-260-send-interface-inputs
Commit: e4d003680acc1dc4bc442a044a5feb0688475b46
Parents: b6d3c43
Author: Tal Liron 
Authored: Fri Jun 2 12:39:00 2017 -0500
Committer: Ran Ziv 
Committed: Tue Jun 6 11:50:09 2017 +0300

--
 aria/cli/config/config.py | 2 +-
 aria/cli/inputs.py| 2 +-
 requirements.in   | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/e4d00368/aria/cli/config/config.py
--
diff --git a/aria/cli/config/config.py b/aria/cli/config/config.py
index 8c4214c..d584fad 100644
--- a/aria/cli/config/config.py
+++ b/aria/cli/config/config.py
@@ -15,8 +15,8 @@
 
 
 import os
-import yaml
 import pkg_resources
+from ruamel import yaml
 
 from jinja2.environment import Template
 

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/e4d00368/aria/cli/inputs.py
--
diff --git a/aria/cli/inputs.py b/aria/cli/inputs.py
index 0ff48dc..4d46ebb 100644
--- a/aria/cli/inputs.py
+++ b/aria/cli/inputs.py
@@ -15,7 +15,7 @@
 
 import os
 import glob
-import yaml
+from ruamel import yaml
 
 from .env import logger
 from .exceptions import AriaCliError

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/e4d00368/requirements.in
--
diff --git a/requirements.in b/requirements.in
index ab06d93..54e8714 100644
--- a/requirements.in
+++ b/requirements.in
@@ -13,7 +13,6 @@
 # In order to create the requirements.txt file, execute
 # pip-compile --output-file requirements.txt requirements.in (pip-tools 
package is needed).
 
-PyYAML<3.13
 requests>=2.3.0, <2.14.0
 networkx>=1.9, <1.10 # version 1.10 dropped support of python 2.6
 retrying>=1.3.0, <1.4.0



[1/5] incubator-ariatosca git commit: ARIA-180 Separate Parameter models and change relationships [Forced Update!]

2017-06-06 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-260-send-interface-inputs a733be67b -> 2e50cfa40 (forced 
update)


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b6d3c43b/tests/cli/test_service_templates.py
--
diff --git a/tests/cli/test_service_templates.py 
b/tests/cli/test_service_templates.py
index 7e86896..cc0150e 100644
--- a/tests/cli/test_service_templates.py
+++ b/tests/cli/test_service_templates.py
@@ -215,7 +215,7 @@ class TestServiceTemplatesInputs(TestCliBase):
 
 def test_inputs_existing_inputs(self, monkeypatch, mock_storage):
 monkeypatch.setattr(_Environment, 'model_storage', mock_storage)
-input = mock_models.create_parameter(name='input1', value='value1')
+input = mock_models.create_input(name='input1', value='value1')
 st = mock_models.create_service_template(inputs={'input1': input})
 monkeypatch.setattr(mock_storage.service_template, 'get_by_name',
 mock.MagicMock(return_value=st))

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b6d3c43b/tests/mock/models.py
--
diff --git a/tests/mock/models.py b/tests/mock/models.py
index 50aa340..56a6e3e 100644
--- a/tests/mock/models.py
+++ b/tests/mock/models.py
@@ -94,7 +94,7 @@ def create_service_with_dependencies(include_execution=False,
 service.executions = [execution]
 execution.id = '1'
 if include_input:
-input = create_parameter(name='input1', value='value1')
+input = create_input(name='input1', value='value1')
 service.inputs = {'input1': input}
 if include_node:
 node_template = create_node_template(service_template=service_template)
@@ -110,7 +110,7 @@ def 
create_node_template_with_dependencies(include_node=False, include_property=
 service = create_service(service_template=service_template)
 create_node(dependency_node_template=node_template, service=service)
 if include_property:
-node_template.properties = {'prop1': create_parameter(name='prop1', 
value='value1')}
+node_template.properties = {'prop1': create_property(name='prop1', 
value='value1')}
 return node_template
 
 
@@ -120,7 +120,7 @@ def create_node_with_dependencies(include_attribute=False):
 node_template.service_template.services[0] = 
create_service(node_template.service_template)
 node = create_node(node_template, 
node_template.service_template.services[0])
 if include_attribute:
-node.attributes['attribute1'] = models.Parameter.wrap('attribute1', 
'value1')   # pylint: disable=unsubscriptable-object
+node.attributes['attribute1'] = models.Attribute.wrap('attribute1', 
'value1')   # pylint: disable=unsubscriptable-object
 return node
 
 
@@ -227,7 +227,7 @@ def create_interface(service, interface_name, 
operation_name, operation_kwargs=N
 
 if operation_kwargs and operation_kwargs.get('arguments'):
 operation_kwargs['arguments'] = dict(
-(argument_name, models.Parameter.wrap(argument_name, 
argument_value))
+(argument_name, models.Argument.wrap(argument_name, 
argument_value))
 for argument_name, argument_value in 
operation_kwargs['arguments'].iteritems()
 if argument_value is not None)
 
@@ -278,9 +278,16 @@ def create_plugin_specification(name='test_plugin', 
version='0.1'):
 )
 
 
-def create_parameter(name, value):
-p = models.Parameter()
-return p.wrap(name, value)
+def _create_parameter(name, value, model_cls):
+return model_cls.wrap(name, value)
+
+
+def create_property(name, value):
+return _create_parameter(name, value, model_cls=models.Property)
+
+
+def create_input(name, value):
+return _create_parameter(name, value, model_cls=models.Input)
 
 
 def _dictify(item):

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b6d3c43b/tests/mock/topology.py
--
diff --git a/tests/mock/topology.py b/tests/mock/topology.py
index ab08dbd..9f0521f 100644
--- a/tests/mock/topology.py
+++ b/tests/mock/topology.py
@@ -28,8 +28,8 @@ def create_simple_topology_single_node(model_storage, 
create_operation):
 'Standard', 'create',
 operation_kwargs=dict(
 function=create_operation,
-arguments={'key': aria_models.Parameter.wrap('key', 'create'),
-   'value': aria_models.Parameter.wrap('value', True)})
+arguments={'key': aria_models.Argument.wrap('key', 'create'),
+   'value': aria_models.Argument.wrap('value', True)})
 )
 node_template.interface_templates[interface_template.name] = 
interface_template # pylint: disable=unsubscriptable-object
 
@@ -39,8 +39,8 @@ def 

incubator-ariatosca git commit: ARIA-199 Add "services outputs" CLI command [Forced Update!]

2017-06-06 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-199-cli-service-output 7b665a23f -> 3e8186ba4 (forced update)


ARIA-199 Add "services outputs" CLI command

* Also add an output to hello world example


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/3e8186ba
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/3e8186ba
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/3e8186ba

Branch: refs/heads/ARIA-199-cli-service-output
Commit: 3e8186ba44518991207ea3a6377aec7327018180
Parents: 180e0a1
Author: Tal Liron 
Authored: Fri Jun 2 14:20:28 2017 -0500
Committer: Tal Liron 
Committed: Tue Jun 6 10:17:58 2017 -0500

--
 aria/cli/commands/services.py   | 23 -
 aria/modeling/models.py |  4 +--
 examples/hello-world/helloworld.yaml| 16 
 tests/cli/test_services.py  | 26 ++--
 tests/end2end/test_hello_world.py   |  1 +
 tests/mock/models.py| 21 ++--
 .../node-cellar/node-cellar.yaml| 12 +
 7 files changed, 76 insertions(+), 27 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/3e8186ba/aria/cli/commands/services.py
--
diff --git a/aria/cli/commands/services.py b/aria/cli/commands/services.py
index 476387c..ae5895a 100644
--- a/aria/cli/commands/services.py
+++ b/aria/cli/commands/services.py
@@ -192,17 +192,16 @@ def outputs(service_name, model_storage, logger):
 """
 logger.info('Showing outputs for service {0}...'.format(service_name))
 service = model_storage.service.get_by_name(service_name)
-#TODO fix this section..
-outputs_def = service.outputs
-response = model_storage.service.outputs.get(service_name)
-outputs_ = StringIO()
-for output_name, output in response.outputs.iteritems():
-outputs_.write(' - "{0}":{1}'.format(output_name, os.linesep))
-description = outputs_def[output_name].get('description', '')
-outputs_.write(' Description: {0}{1}'.format(description,
- os.linesep))
-outputs_.write(' Value: {0}{1}'.format(output, os.linesep))
-logger.info(outputs_.getvalue())
+
+if service.outputs:
+outputs_string = StringIO()
+for output_name, output in service.outputs.iteritems():
+outputs_string.write(' - "{0}":{1}'.format(output_name, 
os.linesep))
+outputs_string.write(' Description: 
{0}{1}'.format(output.description, os.linesep))
+outputs_string.write(' Value: {0}{1}'.format(output.value, 
os.linesep))
+logger.info(outputs_string.getvalue())
+else:
+logger.info('\tNo outputs')
 
 
 @services.command(name='inputs',
@@ -218,10 +217,12 @@ def inputs(service_name, model_storage, logger):
 """
 logger.info('Showing inputs for service {0}...'.format(service_name))
 service = model_storage.service.get_by_name(service_name)
+
 if service.inputs:
 inputs_string = StringIO()
 for input_name, input_ in service.inputs.iteritems():
 inputs_string.write(' - "{0}":{1}'.format(input_name, os.linesep))
+inputs_string.write(' Description: 
{0}{1}'.format(input_.description, os.linesep))
 inputs_string.write(' Value: {0}{1}'.format(input_.value, 
os.linesep))
 logger.info(inputs_string.getvalue())
 else:

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/3e8186ba/aria/modeling/models.py
--
diff --git a/aria/modeling/models.py b/aria/modeling/models.py
index 4102090..f30b86f 100644
--- a/aria/modeling/models.py
+++ b/aria/modeling/models.py
@@ -268,7 +268,7 @@ class Argument(aria_declarative_base, 
orchestration.ArgumentBase):
 
 
 # See also __all__ at the top of this file
-models_to_register = [
+models_to_register = (
 # Service template models
 ServiceTemplate,
 NodeTemplate,
@@ -317,4 +317,4 @@ models_to_register = [
 Task,
 Log,
 Argument
-]
+)

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/3e8186ba/examples/hello-world/helloworld.yaml
--
diff --git a/examples/hello-world/helloworld.yaml 
b/examples/hello-world/helloworld.yaml
index be78401..d3369b7 100644
--- a/examples/hello-world/helloworld.yaml
+++ b/examples/hello-world/helloworld.yaml
@@ -1,13 +1,14 @@
 tosca_definitions_version: tosca_simple_yaml_1_0
 
 

[2/3] incubator-ariatosca git commit: ARIA-262 Inconsistent node attributes behavior

2017-06-06 Thread emblemparade
ARIA-262 Inconsistent node attributes behavior

Inroduced a more comprehensive way to instrument relationship attributes.

Old behavior instrumented attributes only if they were accessed directly from 
the
parent model. Traversing the storage made the access to an attribute 
inconsistent.

The new solution enables encapsulating the attributes disregarding the way they
were retrieved.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/180e0a1c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/180e0a1c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/180e0a1c

Branch: refs/heads/ARIA-199-cli-service-output
Commit: 180e0a1cf1ad6da0ddd611b90a58e71acbea52e7
Parents: e4d0036
Author: max-orlov 
Authored: Wed May 31 21:07:49 2017 +0300
Committer: max-orlov 
Committed: Tue Jun 6 15:20:12 2017 +0300

--
 .../context/collection_instrumentation.py   | 242 ---
 aria/orchestrator/context/operation.py  |  21 +-
 aria/orchestrator/context/toolbelt.py   |   6 +-
 aria/orchestrator/decorators.py |   6 +-
 .../execution_plugin/ctx_proxy/server.py|  17 +-
 aria/storage/api.py |  10 +
 aria/storage/collection_instrumentation.py  | 306 +++
 aria/storage/core.py|  15 +
 aria/storage/sql_mapi.py|  14 +-
 aria/utils/imports.py   |   2 +-
 .../context/test_collection_instrumentation.py  | 150 ++---
 .../execution_plugin/test_ctx_proxy_server.py   |   2 +-
 tests/orchestrator/execution_plugin/test_ssh.py |  10 +-
 tests/orchestrator/workflows/core/test_task.py  |   2 +-
 .../executor/test_process_executor_extension.py |   3 +-
 15 files changed, 490 insertions(+), 316 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/180e0a1c/aria/orchestrator/context/collection_instrumentation.py
--
diff --git a/aria/orchestrator/context/collection_instrumentation.py 
b/aria/orchestrator/context/collection_instrumentation.py
deleted file mode 100644
index 8f80d4a..000
--- a/aria/orchestrator/context/collection_instrumentation.py
+++ /dev/null
@@ -1,242 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from functools import partial
-
-from aria.modeling import models
-
-
-class _InstrumentedCollection(object):
-
-def __init__(self,
- model,
- parent,
- field_name,
- seq=None,
- is_top_level=True,
- **kwargs):
-self._model = model
-self._parent = parent
-self._field_name = field_name
-self._is_top_level = is_top_level
-self._load(seq, **kwargs)
-
-@property
-def _raw(self):
-raise NotImplementedError
-
-def _load(self, seq, **kwargs):
-"""
-Instantiates the object from existing seq.
-
-:param seq: the original sequence to load from
-:return:
-"""
-raise NotImplementedError
-
-def _set(self, key, value):
-"""
-set the changes for the current object (not in the db)
-
-:param key:
-:param value:
-:return:
-"""
-raise NotImplementedError
-
-def _del(self, collection, key):
-raise NotImplementedError
-
-def _instrument(self, key, value):
-"""
-Instruments any collection to track changes (and ease of access)
-:param key:
-:param value:
-:return:
-"""
-if isinstance(value, _InstrumentedCollection):
-return value
-elif isinstance(value, dict):
-instrumentation_cls = _InstrumentedDict
-elif isinstance(value, list):
-instrumentation_cls = _InstrumentedList
-else:
-return value
-
-return 

[3/3] incubator-ariatosca git commit: ARIA-199 Add "services outputs" CLI command

2017-06-06 Thread emblemparade
ARIA-199 Add "services outputs" CLI command

* Also add an output to hello world example


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/7b665a23
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/7b665a23
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/7b665a23

Branch: refs/heads/ARIA-199-cli-service-output
Commit: 7b665a23f68b88cb1c6dac16d75d05dfe4cafed8
Parents: 180e0a1
Author: Tal Liron 
Authored: Fri Jun 2 14:20:28 2017 -0500
Committer: Tal Liron 
Committed: Tue Jun 6 09:00:06 2017 -0500

--
 aria/cli/commands/services.py   | 23 -
 aria/modeling/models.py |  4 +--
 examples/hello-world/helloworld.yaml| 16 
 tests/cli/test_services.py  | 26 ++--
 tests/mock/models.py| 21 ++--
 .../node-cellar/node-cellar.yaml| 12 +
 6 files changed, 75 insertions(+), 27 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/7b665a23/aria/cli/commands/services.py
--
diff --git a/aria/cli/commands/services.py b/aria/cli/commands/services.py
index 476387c..ae5895a 100644
--- a/aria/cli/commands/services.py
+++ b/aria/cli/commands/services.py
@@ -192,17 +192,16 @@ def outputs(service_name, model_storage, logger):
 """
 logger.info('Showing outputs for service {0}...'.format(service_name))
 service = model_storage.service.get_by_name(service_name)
-#TODO fix this section..
-outputs_def = service.outputs
-response = model_storage.service.outputs.get(service_name)
-outputs_ = StringIO()
-for output_name, output in response.outputs.iteritems():
-outputs_.write(' - "{0}":{1}'.format(output_name, os.linesep))
-description = outputs_def[output_name].get('description', '')
-outputs_.write(' Description: {0}{1}'.format(description,
- os.linesep))
-outputs_.write(' Value: {0}{1}'.format(output, os.linesep))
-logger.info(outputs_.getvalue())
+
+if service.outputs:
+outputs_string = StringIO()
+for output_name, output in service.outputs.iteritems():
+outputs_string.write(' - "{0}":{1}'.format(output_name, 
os.linesep))
+outputs_string.write(' Description: 
{0}{1}'.format(output.description, os.linesep))
+outputs_string.write(' Value: {0}{1}'.format(output.value, 
os.linesep))
+logger.info(outputs_string.getvalue())
+else:
+logger.info('\tNo outputs')
 
 
 @services.command(name='inputs',
@@ -218,10 +217,12 @@ def inputs(service_name, model_storage, logger):
 """
 logger.info('Showing inputs for service {0}...'.format(service_name))
 service = model_storage.service.get_by_name(service_name)
+
 if service.inputs:
 inputs_string = StringIO()
 for input_name, input_ in service.inputs.iteritems():
 inputs_string.write(' - "{0}":{1}'.format(input_name, os.linesep))
+inputs_string.write(' Description: 
{0}{1}'.format(input_.description, os.linesep))
 inputs_string.write(' Value: {0}{1}'.format(input_.value, 
os.linesep))
 logger.info(inputs_string.getvalue())
 else:

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/7b665a23/aria/modeling/models.py
--
diff --git a/aria/modeling/models.py b/aria/modeling/models.py
index 4102090..f30b86f 100644
--- a/aria/modeling/models.py
+++ b/aria/modeling/models.py
@@ -268,7 +268,7 @@ class Argument(aria_declarative_base, 
orchestration.ArgumentBase):
 
 
 # See also __all__ at the top of this file
-models_to_register = [
+models_to_register = (
 # Service template models
 ServiceTemplate,
 NodeTemplate,
@@ -317,4 +317,4 @@ models_to_register = [
 Task,
 Log,
 Argument
-]
+)

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/7b665a23/examples/hello-world/helloworld.yaml
--
diff --git a/examples/hello-world/helloworld.yaml 
b/examples/hello-world/helloworld.yaml
index be78401..d3369b7 100644
--- a/examples/hello-world/helloworld.yaml
+++ b/examples/hello-world/helloworld.yaml
@@ -1,13 +1,14 @@
 tosca_definitions_version: tosca_simple_yaml_1_0
 
 node_types:
-  web_server:
+
+  WebServer:
 derived_from: tosca.nodes.Root
 capabilities:
   host:
 type: tosca.capabilities.Container
 
-  web_app:
+  WebApp:
 

[1/3] incubator-ariatosca git commit: ARIA-64 Remove PyYAML dependency [Forced Update!]

2017-06-06 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-199-cli-service-output 12216189f -> 7b665a23f (forced update)


ARIA-64 Remove PyYAML dependency


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/e4d00368
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/e4d00368
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/e4d00368

Branch: refs/heads/ARIA-199-cli-service-output
Commit: e4d003680acc1dc4bc442a044a5feb0688475b46
Parents: b6d3c43
Author: Tal Liron 
Authored: Fri Jun 2 12:39:00 2017 -0500
Committer: Ran Ziv 
Committed: Tue Jun 6 11:50:09 2017 +0300

--
 aria/cli/config/config.py | 2 +-
 aria/cli/inputs.py| 2 +-
 requirements.in   | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/e4d00368/aria/cli/config/config.py
--
diff --git a/aria/cli/config/config.py b/aria/cli/config/config.py
index 8c4214c..d584fad 100644
--- a/aria/cli/config/config.py
+++ b/aria/cli/config/config.py
@@ -15,8 +15,8 @@
 
 
 import os
-import yaml
 import pkg_resources
+from ruamel import yaml
 
 from jinja2.environment import Template
 

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/e4d00368/aria/cli/inputs.py
--
diff --git a/aria/cli/inputs.py b/aria/cli/inputs.py
index 0ff48dc..4d46ebb 100644
--- a/aria/cli/inputs.py
+++ b/aria/cli/inputs.py
@@ -15,7 +15,7 @@
 
 import os
 import glob
-import yaml
+from ruamel import yaml
 
 from .env import logger
 from .exceptions import AriaCliError

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/e4d00368/requirements.in
--
diff --git a/requirements.in b/requirements.in
index ab06d93..54e8714 100644
--- a/requirements.in
+++ b/requirements.in
@@ -13,7 +13,6 @@
 # In order to create the requirements.txt file, execute
 # pip-compile --output-file requirements.txt requirements.in (pip-tools 
package is needed).
 
-PyYAML<3.13
 requests>=2.3.0, <2.14.0
 networkx>=1.9, <1.10 # version 1.10 dropped support of python 2.6
 retrying>=1.3.0, <1.4.0



incubator-ariatosca git commit: ARIA-199 Add "services outputs" CLI command [Forced Update!]

2017-06-05 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-199-cli-service-output b758e6618 -> 12216189f (forced update)


ARIA-199 Add "services outputs" CLI command

* Also add an output to hello world example


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/12216189
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/12216189
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/12216189

Branch: refs/heads/ARIA-199-cli-service-output
Commit: 12216189fba9287a03efdab6ffec29a2bc47bc09
Parents: b6d3c43
Author: Tal Liron 
Authored: Fri Jun 2 14:20:28 2017 -0500
Committer: Tal Liron 
Committed: Mon Jun 5 15:22:10 2017 -0500

--
 aria/cli/commands/services.py   | 23 -
 aria/modeling/models.py |  4 +--
 examples/hello-world/helloworld.yaml| 16 
 tests/cli/test_services.py  | 26 ++--
 tests/mock/models.py| 21 ++--
 .../node-cellar/node-cellar.yaml| 12 +
 6 files changed, 75 insertions(+), 27 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/12216189/aria/cli/commands/services.py
--
diff --git a/aria/cli/commands/services.py b/aria/cli/commands/services.py
index 476387c..ae5895a 100644
--- a/aria/cli/commands/services.py
+++ b/aria/cli/commands/services.py
@@ -192,17 +192,16 @@ def outputs(service_name, model_storage, logger):
 """
 logger.info('Showing outputs for service {0}...'.format(service_name))
 service = model_storage.service.get_by_name(service_name)
-#TODO fix this section..
-outputs_def = service.outputs
-response = model_storage.service.outputs.get(service_name)
-outputs_ = StringIO()
-for output_name, output in response.outputs.iteritems():
-outputs_.write(' - "{0}":{1}'.format(output_name, os.linesep))
-description = outputs_def[output_name].get('description', '')
-outputs_.write(' Description: {0}{1}'.format(description,
- os.linesep))
-outputs_.write(' Value: {0}{1}'.format(output, os.linesep))
-logger.info(outputs_.getvalue())
+
+if service.outputs:
+outputs_string = StringIO()
+for output_name, output in service.outputs.iteritems():
+outputs_string.write(' - "{0}":{1}'.format(output_name, 
os.linesep))
+outputs_string.write(' Description: 
{0}{1}'.format(output.description, os.linesep))
+outputs_string.write(' Value: {0}{1}'.format(output.value, 
os.linesep))
+logger.info(outputs_string.getvalue())
+else:
+logger.info('\tNo outputs')
 
 
 @services.command(name='inputs',
@@ -218,10 +217,12 @@ def inputs(service_name, model_storage, logger):
 """
 logger.info('Showing inputs for service {0}...'.format(service_name))
 service = model_storage.service.get_by_name(service_name)
+
 if service.inputs:
 inputs_string = StringIO()
 for input_name, input_ in service.inputs.iteritems():
 inputs_string.write(' - "{0}":{1}'.format(input_name, os.linesep))
+inputs_string.write(' Description: 
{0}{1}'.format(input_.description, os.linesep))
 inputs_string.write(' Value: {0}{1}'.format(input_.value, 
os.linesep))
 logger.info(inputs_string.getvalue())
 else:

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/12216189/aria/modeling/models.py
--
diff --git a/aria/modeling/models.py b/aria/modeling/models.py
index 4102090..f30b86f 100644
--- a/aria/modeling/models.py
+++ b/aria/modeling/models.py
@@ -268,7 +268,7 @@ class Argument(aria_declarative_base, 
orchestration.ArgumentBase):
 
 
 # See also __all__ at the top of this file
-models_to_register = [
+models_to_register = (
 # Service template models
 ServiceTemplate,
 NodeTemplate,
@@ -317,4 +317,4 @@ models_to_register = [
 Task,
 Log,
 Argument
-]
+)

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/12216189/examples/hello-world/helloworld.yaml
--
diff --git a/examples/hello-world/helloworld.yaml 
b/examples/hello-world/helloworld.yaml
index be78401..d3369b7 100644
--- a/examples/hello-world/helloworld.yaml
+++ b/examples/hello-world/helloworld.yaml
@@ -1,13 +1,14 @@
 tosca_definitions_version: tosca_simple_yaml_1_0
 
 node_types:
-  web_server:
+
+  WebServer:
 derived_from: 

incubator-ariatosca git commit: ARIA-199 Add "services outputs" CLI command [Forced Update!]

2017-06-05 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-199-cli-service-output 10d87e56c -> b758e6618 (forced update)


ARIA-199 Add "services outputs" CLI command

* Also add an output to hello world example


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/b758e661
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/b758e661
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/b758e661

Branch: refs/heads/ARIA-199-cli-service-output
Commit: b758e6618c1d13043e788127c25e3a94e0b56c2a
Parents: b6d3c43
Author: Tal Liron 
Authored: Fri Jun 2 14:20:28 2017 -0500
Committer: Tal Liron 
Committed: Mon Jun 5 12:50:45 2017 -0500

--
 aria/cli/commands/services.py   | 23 -
 aria/modeling/models.py |  4 +--
 examples/hello-world/helloworld.yaml| 16 
 tests/cli/test_services.py  | 26 ++--
 tests/mock/models.py| 21 ++--
 .../node-cellar/node-cellar.yaml| 12 +
 6 files changed, 75 insertions(+), 27 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b758e661/aria/cli/commands/services.py
--
diff --git a/aria/cli/commands/services.py b/aria/cli/commands/services.py
index 476387c..ae5895a 100644
--- a/aria/cli/commands/services.py
+++ b/aria/cli/commands/services.py
@@ -192,17 +192,16 @@ def outputs(service_name, model_storage, logger):
 """
 logger.info('Showing outputs for service {0}...'.format(service_name))
 service = model_storage.service.get_by_name(service_name)
-#TODO fix this section..
-outputs_def = service.outputs
-response = model_storage.service.outputs.get(service_name)
-outputs_ = StringIO()
-for output_name, output in response.outputs.iteritems():
-outputs_.write(' - "{0}":{1}'.format(output_name, os.linesep))
-description = outputs_def[output_name].get('description', '')
-outputs_.write(' Description: {0}{1}'.format(description,
- os.linesep))
-outputs_.write(' Value: {0}{1}'.format(output, os.linesep))
-logger.info(outputs_.getvalue())
+
+if service.outputs:
+outputs_string = StringIO()
+for output_name, output in service.outputs.iteritems():
+outputs_string.write(' - "{0}":{1}'.format(output_name, 
os.linesep))
+outputs_string.write(' Description: 
{0}{1}'.format(output.description, os.linesep))
+outputs_string.write(' Value: {0}{1}'.format(output.value, 
os.linesep))
+logger.info(outputs_string.getvalue())
+else:
+logger.info('\tNo outputs')
 
 
 @services.command(name='inputs',
@@ -218,10 +217,12 @@ def inputs(service_name, model_storage, logger):
 """
 logger.info('Showing inputs for service {0}...'.format(service_name))
 service = model_storage.service.get_by_name(service_name)
+
 if service.inputs:
 inputs_string = StringIO()
 for input_name, input_ in service.inputs.iteritems():
 inputs_string.write(' - "{0}":{1}'.format(input_name, os.linesep))
+inputs_string.write(' Description: 
{0}{1}'.format(input_.description, os.linesep))
 inputs_string.write(' Value: {0}{1}'.format(input_.value, 
os.linesep))
 logger.info(inputs_string.getvalue())
 else:

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b758e661/aria/modeling/models.py
--
diff --git a/aria/modeling/models.py b/aria/modeling/models.py
index 4102090..f30b86f 100644
--- a/aria/modeling/models.py
+++ b/aria/modeling/models.py
@@ -268,7 +268,7 @@ class Argument(aria_declarative_base, 
orchestration.ArgumentBase):
 
 
 # See also __all__ at the top of this file
-models_to_register = [
+models_to_register = (
 # Service template models
 ServiceTemplate,
 NodeTemplate,
@@ -317,4 +317,4 @@ models_to_register = [
 Task,
 Log,
 Argument
-]
+)

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b758e661/examples/hello-world/helloworld.yaml
--
diff --git a/examples/hello-world/helloworld.yaml 
b/examples/hello-world/helloworld.yaml
index be78401..d3369b7 100644
--- a/examples/hello-world/helloworld.yaml
+++ b/examples/hello-world/helloworld.yaml
@@ -1,13 +1,14 @@
 tosca_definitions_version: tosca_simple_yaml_1_0
 
 node_types:
-  web_server:
+
+  WebServer:
 derived_from: 

[2/3] incubator-ariatosca git commit: ARIA-180 Separate Parameter models and change relationships

2017-06-05 Thread emblemparade
ARIA-180 Separate Parameter models and change relationships

First, the Parameter model was separated in 6 individual models:
Input, Output, Property, Attribute, Configuration, Argument.

The first four models are TOSCA-related, and we needed to separate them
as according to the TOSCA spec, all four of these represent different
things, and have different fields.

The other two models (Configuration, Argument) are
orchestration-related, as and such are not supposed to represent the
same object as the TOSCA-related objects.

Second, up until now, the relationships of the then-Parameter models
were many-to-many to any other object related to them. This was a problem,
as logically the relationships were one-to-many (from the other models
to the Parameter models).
In this commit, we changed them to one-to-many. In addition, separating
the Parameter models allowed us to more accurately represent the relationship 
of each individual Parameter-model with its related models.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/b6d3c43b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/b6d3c43b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/b6d3c43b

Branch: refs/heads/ARIA-199-cli-service-output
Commit: b6d3c43ba42ccc3fa7287aff132c83563abea035
Parents: 9174f94
Author: Avia Efrat 
Authored: Sun May 21 16:28:30 2017 +0300
Committer: Avia Efrat 
Committed: Sun Jun 4 15:40:03 2017 +0300

--
 aria/modeling/mixins.py | 216 +-
 aria/modeling/models.py |  42 +-
 aria/modeling/orchestration.py  |  37 +-
 aria/modeling/service_changes.py|  12 -
 aria/modeling/service_common.py | 423 +++
 aria/modeling/service_instance.py   | 177 
 aria/modeling/service_template.py   | 164 +++
 aria/modeling/utils.py  |   6 +-
 .../context/collection_instrumentation.py   |  10 +-
 .../execution_plugin/instantiation.py   |  36 +-
 aria/orchestrator/workflow_runner.py|   4 +-
 aria/orchestrator/workflows/api/task.py |   6 +-
 aria/orchestrator/workflows/executor/dry.py |   2 +-
 examples/hello-world/helloworld.yaml|   2 +-
 .../simple_v1_0/modeling/__init__.py|  71 ++--
 tests/cli/test_service_templates.py |   2 +-
 tests/mock/models.py|  21 +-
 tests/mock/topology.py  |   8 +-
 tests/modeling/test_models.py   |  49 ++-
 .../context/test_collection_instrumentation.py  |  64 +--
 tests/orchestrator/context/test_toolbelt.py |   2 +-
 tests/orchestrator/test_workflow_runner.py  |  14 +-
 .../workflows/executor/test_executor.py |   2 +-
 tests/storage/test_model_storage.py |   6 +-
 tox.ini |   2 -
 25 files changed, 867 insertions(+), 511 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b6d3c43b/aria/modeling/mixins.py
--
diff --git a/aria/modeling/mixins.py b/aria/modeling/mixins.py
index 38c812d..c98a866 100644
--- a/aria/modeling/mixins.py
+++ b/aria/modeling/mixins.py
@@ -23,10 +23,14 @@ from sqlalchemy.ext import associationproxy
 from sqlalchemy import (
 Column,
 Integer,
-Text
+Text,
+PickleType
 )
 
-from . import utils
+from ..parser.consumption import ConsumptionContext
+from ..utils import console, collections, caching, formatting
+from ..utils.type import canonical_type_name, full_type_name
+from . import utils, functions
 
 
 class ModelMixin(object):
@@ -140,3 +144,211 @@ class TemplateModelMixin(InstanceModelMixin):
 
 def instantiate(self, container):
 raise NotImplementedError
+
+
+class ParameterMixin(TemplateModelMixin, caching.HasCachedMethods):
 #pylint: disable=abstract-method
+"""
+Represents a typed value. The value can contain nested intrinsic functions.
+
+This model can be used as the ``container_holder`` argument for 
:func:`functions.evaluate`.
+
+:ivar name: Name
+:vartype name: basestring
+:ivar type_name: Type name
+:vartype type_name: basestring
+:ivar value: Value
+:ivar description: Description
+:vartype description: basestring
+"""
+
+__tablename__ = 'parameter'
+
+name = Column(Text)
+type_name = Column(Text)
+description = Column(Text)
+_value = Column(PickleType)
+
+@property
+def value(self):
+value = self._value
+if value is not None:
+evaluation = 

[1/3] incubator-ariatosca git commit: ARIA-180 Separate Parameter models and change relationships [Forced Update!]

2017-06-05 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-199-cli-service-output 79b94e1f9 -> 10d87e56c (forced update)


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b6d3c43b/tests/cli/test_service_templates.py
--
diff --git a/tests/cli/test_service_templates.py 
b/tests/cli/test_service_templates.py
index 7e86896..cc0150e 100644
--- a/tests/cli/test_service_templates.py
+++ b/tests/cli/test_service_templates.py
@@ -215,7 +215,7 @@ class TestServiceTemplatesInputs(TestCliBase):
 
 def test_inputs_existing_inputs(self, monkeypatch, mock_storage):
 monkeypatch.setattr(_Environment, 'model_storage', mock_storage)
-input = mock_models.create_parameter(name='input1', value='value1')
+input = mock_models.create_input(name='input1', value='value1')
 st = mock_models.create_service_template(inputs={'input1': input})
 monkeypatch.setattr(mock_storage.service_template, 'get_by_name',
 mock.MagicMock(return_value=st))

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b6d3c43b/tests/mock/models.py
--
diff --git a/tests/mock/models.py b/tests/mock/models.py
index 50aa340..56a6e3e 100644
--- a/tests/mock/models.py
+++ b/tests/mock/models.py
@@ -94,7 +94,7 @@ def create_service_with_dependencies(include_execution=False,
 service.executions = [execution]
 execution.id = '1'
 if include_input:
-input = create_parameter(name='input1', value='value1')
+input = create_input(name='input1', value='value1')
 service.inputs = {'input1': input}
 if include_node:
 node_template = create_node_template(service_template=service_template)
@@ -110,7 +110,7 @@ def 
create_node_template_with_dependencies(include_node=False, include_property=
 service = create_service(service_template=service_template)
 create_node(dependency_node_template=node_template, service=service)
 if include_property:
-node_template.properties = {'prop1': create_parameter(name='prop1', 
value='value1')}
+node_template.properties = {'prop1': create_property(name='prop1', 
value='value1')}
 return node_template
 
 
@@ -120,7 +120,7 @@ def create_node_with_dependencies(include_attribute=False):
 node_template.service_template.services[0] = 
create_service(node_template.service_template)
 node = create_node(node_template, 
node_template.service_template.services[0])
 if include_attribute:
-node.attributes['attribute1'] = models.Parameter.wrap('attribute1', 
'value1')   # pylint: disable=unsubscriptable-object
+node.attributes['attribute1'] = models.Attribute.wrap('attribute1', 
'value1')   # pylint: disable=unsubscriptable-object
 return node
 
 
@@ -227,7 +227,7 @@ def create_interface(service, interface_name, 
operation_name, operation_kwargs=N
 
 if operation_kwargs and operation_kwargs.get('arguments'):
 operation_kwargs['arguments'] = dict(
-(argument_name, models.Parameter.wrap(argument_name, 
argument_value))
+(argument_name, models.Argument.wrap(argument_name, 
argument_value))
 for argument_name, argument_value in 
operation_kwargs['arguments'].iteritems()
 if argument_value is not None)
 
@@ -278,9 +278,16 @@ def create_plugin_specification(name='test_plugin', 
version='0.1'):
 )
 
 
-def create_parameter(name, value):
-p = models.Parameter()
-return p.wrap(name, value)
+def _create_parameter(name, value, model_cls):
+return model_cls.wrap(name, value)
+
+
+def create_property(name, value):
+return _create_parameter(name, value, model_cls=models.Property)
+
+
+def create_input(name, value):
+return _create_parameter(name, value, model_cls=models.Input)
 
 
 def _dictify(item):

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b6d3c43b/tests/mock/topology.py
--
diff --git a/tests/mock/topology.py b/tests/mock/topology.py
index ab08dbd..9f0521f 100644
--- a/tests/mock/topology.py
+++ b/tests/mock/topology.py
@@ -28,8 +28,8 @@ def create_simple_topology_single_node(model_storage, 
create_operation):
 'Standard', 'create',
 operation_kwargs=dict(
 function=create_operation,
-arguments={'key': aria_models.Parameter.wrap('key', 'create'),
-   'value': aria_models.Parameter.wrap('value', True)})
+arguments={'key': aria_models.Argument.wrap('key', 'create'),
+   'value': aria_models.Argument.wrap('value', True)})
 )
 node_template.interface_templates[interface_template.name] = 
interface_template # pylint: disable=unsubscriptable-object
 
@@ -39,8 +39,8 @@ def 

[3/3] incubator-ariatosca git commit: ARIA-199 Add "services outputs" CLI command

2017-06-05 Thread emblemparade
ARIA-199 Add "services outputs" CLI command

* Also add an output to hello world example


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/10d87e56
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/10d87e56
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/10d87e56

Branch: refs/heads/ARIA-199-cli-service-output
Commit: 10d87e56cac1c9fd970766ffda728438d344f85d
Parents: b6d3c43
Author: Tal Liron 
Authored: Fri Jun 2 14:20:28 2017 -0500
Committer: Tal Liron 
Committed: Mon Jun 5 12:25:12 2017 -0500

--
 aria/cli/commands/services.py   | 23 -
 aria/modeling/models.py |  4 +--
 examples/hello-world/helloworld.yaml| 16 
 tests/cli/test_services.py  | 26 ++--
 tests/mock/models.py| 21 ++--
 .../node-cellar/node-cellar.yaml| 12 +
 6 files changed, 75 insertions(+), 27 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/10d87e56/aria/cli/commands/services.py
--
diff --git a/aria/cli/commands/services.py b/aria/cli/commands/services.py
index 476387c..ae5895a 100644
--- a/aria/cli/commands/services.py
+++ b/aria/cli/commands/services.py
@@ -192,17 +192,16 @@ def outputs(service_name, model_storage, logger):
 """
 logger.info('Showing outputs for service {0}...'.format(service_name))
 service = model_storage.service.get_by_name(service_name)
-#TODO fix this section..
-outputs_def = service.outputs
-response = model_storage.service.outputs.get(service_name)
-outputs_ = StringIO()
-for output_name, output in response.outputs.iteritems():
-outputs_.write(' - "{0}":{1}'.format(output_name, os.linesep))
-description = outputs_def[output_name].get('description', '')
-outputs_.write(' Description: {0}{1}'.format(description,
- os.linesep))
-outputs_.write(' Value: {0}{1}'.format(output, os.linesep))
-logger.info(outputs_.getvalue())
+
+if service.outputs:
+outputs_string = StringIO()
+for output_name, output in service.outputs.iteritems():
+outputs_string.write(' - "{0}":{1}'.format(output_name, 
os.linesep))
+outputs_string.write(' Description: 
{0}{1}'.format(output.description, os.linesep))
+outputs_string.write(' Value: {0}{1}'.format(output.value, 
os.linesep))
+logger.info(outputs_string.getvalue())
+else:
+logger.info('\tNo outputs')
 
 
 @services.command(name='inputs',
@@ -218,10 +217,12 @@ def inputs(service_name, model_storage, logger):
 """
 logger.info('Showing inputs for service {0}...'.format(service_name))
 service = model_storage.service.get_by_name(service_name)
+
 if service.inputs:
 inputs_string = StringIO()
 for input_name, input_ in service.inputs.iteritems():
 inputs_string.write(' - "{0}":{1}'.format(input_name, os.linesep))
+inputs_string.write(' Description: 
{0}{1}'.format(input_.description, os.linesep))
 inputs_string.write(' Value: {0}{1}'.format(input_.value, 
os.linesep))
 logger.info(inputs_string.getvalue())
 else:

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/10d87e56/aria/modeling/models.py
--
diff --git a/aria/modeling/models.py b/aria/modeling/models.py
index 4102090..f30b86f 100644
--- a/aria/modeling/models.py
+++ b/aria/modeling/models.py
@@ -268,7 +268,7 @@ class Argument(aria_declarative_base, 
orchestration.ArgumentBase):
 
 
 # See also __all__ at the top of this file
-models_to_register = [
+models_to_register = (
 # Service template models
 ServiceTemplate,
 NodeTemplate,
@@ -317,4 +317,4 @@ models_to_register = [
 Task,
 Log,
 Argument
-]
+)

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/10d87e56/examples/hello-world/helloworld.yaml
--
diff --git a/examples/hello-world/helloworld.yaml 
b/examples/hello-world/helloworld.yaml
index be78401..d3369b7 100644
--- a/examples/hello-world/helloworld.yaml
+++ b/examples/hello-world/helloworld.yaml
@@ -1,13 +1,14 @@
 tosca_definitions_version: tosca_simple_yaml_1_0
 
 node_types:
-  web_server:
+
+  WebServer:
 derived_from: tosca.nodes.Root
 capabilities:
   host:
 type: tosca.capabilities.Container
 
-  web_app:
+  WebApp:
 

[2/3] incubator-ariatosca git commit: ARIA-180 Separate Parameter models and change relationships

2017-06-05 Thread emblemparade
ARIA-180 Separate Parameter models and change relationships

First, the Parameter model was separated in 6 individual models:
Input, Output, Property, Attribute, Configuration, Argument.

The first four models are TOSCA-related, and we needed to separate them
as according to the TOSCA spec, all four of these represent different
things, and have different fields.

The other two models (Configuration, Argument) are
orchestration-related, as and such are not supposed to represent the
same object as the TOSCA-related objects.

Second, up until now, the relationships of the then-Parameter models
were many-to-many to any other object related to them. This was a problem,
as logically the relationships were one-to-many (from the other models
to the Parameter models).
In this commit, we changed them to one-to-many. In addition, separating
the Parameter models allowed us to more accurately represent the relationship 
of each individual Parameter-model with its related models.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/b6d3c43b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/b6d3c43b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/b6d3c43b

Branch: refs/heads/ARIA-64-remove-pyyaml
Commit: b6d3c43ba42ccc3fa7287aff132c83563abea035
Parents: 9174f94
Author: Avia Efrat 
Authored: Sun May 21 16:28:30 2017 +0300
Committer: Avia Efrat 
Committed: Sun Jun 4 15:40:03 2017 +0300

--
 aria/modeling/mixins.py | 216 +-
 aria/modeling/models.py |  42 +-
 aria/modeling/orchestration.py  |  37 +-
 aria/modeling/service_changes.py|  12 -
 aria/modeling/service_common.py | 423 +++
 aria/modeling/service_instance.py   | 177 
 aria/modeling/service_template.py   | 164 +++
 aria/modeling/utils.py  |   6 +-
 .../context/collection_instrumentation.py   |  10 +-
 .../execution_plugin/instantiation.py   |  36 +-
 aria/orchestrator/workflow_runner.py|   4 +-
 aria/orchestrator/workflows/api/task.py |   6 +-
 aria/orchestrator/workflows/executor/dry.py |   2 +-
 examples/hello-world/helloworld.yaml|   2 +-
 .../simple_v1_0/modeling/__init__.py|  71 ++--
 tests/cli/test_service_templates.py |   2 +-
 tests/mock/models.py|  21 +-
 tests/mock/topology.py  |   8 +-
 tests/modeling/test_models.py   |  49 ++-
 .../context/test_collection_instrumentation.py  |  64 +--
 tests/orchestrator/context/test_toolbelt.py |   2 +-
 tests/orchestrator/test_workflow_runner.py  |  14 +-
 .../workflows/executor/test_executor.py |   2 +-
 tests/storage/test_model_storage.py |   6 +-
 tox.ini |   2 -
 25 files changed, 867 insertions(+), 511 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b6d3c43b/aria/modeling/mixins.py
--
diff --git a/aria/modeling/mixins.py b/aria/modeling/mixins.py
index 38c812d..c98a866 100644
--- a/aria/modeling/mixins.py
+++ b/aria/modeling/mixins.py
@@ -23,10 +23,14 @@ from sqlalchemy.ext import associationproxy
 from sqlalchemy import (
 Column,
 Integer,
-Text
+Text,
+PickleType
 )
 
-from . import utils
+from ..parser.consumption import ConsumptionContext
+from ..utils import console, collections, caching, formatting
+from ..utils.type import canonical_type_name, full_type_name
+from . import utils, functions
 
 
 class ModelMixin(object):
@@ -140,3 +144,211 @@ class TemplateModelMixin(InstanceModelMixin):
 
 def instantiate(self, container):
 raise NotImplementedError
+
+
+class ParameterMixin(TemplateModelMixin, caching.HasCachedMethods):
 #pylint: disable=abstract-method
+"""
+Represents a typed value. The value can contain nested intrinsic functions.
+
+This model can be used as the ``container_holder`` argument for 
:func:`functions.evaluate`.
+
+:ivar name: Name
+:vartype name: basestring
+:ivar type_name: Type name
+:vartype type_name: basestring
+:ivar value: Value
+:ivar description: Description
+:vartype description: basestring
+"""
+
+__tablename__ = 'parameter'
+
+name = Column(Text)
+type_name = Column(Text)
+description = Column(Text)
+_value = Column(PickleType)
+
+@property
+def value(self):
+value = self._value
+if value is not None:
+evaluation = 

[1/3] incubator-ariatosca git commit: ARIA-180 Separate Parameter models and change relationships [Forced Update!]

2017-06-05 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-64-remove-pyyaml 62d3b8d7c -> 5d1e56b04 (forced update)


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b6d3c43b/tests/cli/test_service_templates.py
--
diff --git a/tests/cli/test_service_templates.py 
b/tests/cli/test_service_templates.py
index 7e86896..cc0150e 100644
--- a/tests/cli/test_service_templates.py
+++ b/tests/cli/test_service_templates.py
@@ -215,7 +215,7 @@ class TestServiceTemplatesInputs(TestCliBase):
 
 def test_inputs_existing_inputs(self, monkeypatch, mock_storage):
 monkeypatch.setattr(_Environment, 'model_storage', mock_storage)
-input = mock_models.create_parameter(name='input1', value='value1')
+input = mock_models.create_input(name='input1', value='value1')
 st = mock_models.create_service_template(inputs={'input1': input})
 monkeypatch.setattr(mock_storage.service_template, 'get_by_name',
 mock.MagicMock(return_value=st))

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b6d3c43b/tests/mock/models.py
--
diff --git a/tests/mock/models.py b/tests/mock/models.py
index 50aa340..56a6e3e 100644
--- a/tests/mock/models.py
+++ b/tests/mock/models.py
@@ -94,7 +94,7 @@ def create_service_with_dependencies(include_execution=False,
 service.executions = [execution]
 execution.id = '1'
 if include_input:
-input = create_parameter(name='input1', value='value1')
+input = create_input(name='input1', value='value1')
 service.inputs = {'input1': input}
 if include_node:
 node_template = create_node_template(service_template=service_template)
@@ -110,7 +110,7 @@ def 
create_node_template_with_dependencies(include_node=False, include_property=
 service = create_service(service_template=service_template)
 create_node(dependency_node_template=node_template, service=service)
 if include_property:
-node_template.properties = {'prop1': create_parameter(name='prop1', 
value='value1')}
+node_template.properties = {'prop1': create_property(name='prop1', 
value='value1')}
 return node_template
 
 
@@ -120,7 +120,7 @@ def create_node_with_dependencies(include_attribute=False):
 node_template.service_template.services[0] = 
create_service(node_template.service_template)
 node = create_node(node_template, 
node_template.service_template.services[0])
 if include_attribute:
-node.attributes['attribute1'] = models.Parameter.wrap('attribute1', 
'value1')   # pylint: disable=unsubscriptable-object
+node.attributes['attribute1'] = models.Attribute.wrap('attribute1', 
'value1')   # pylint: disable=unsubscriptable-object
 return node
 
 
@@ -227,7 +227,7 @@ def create_interface(service, interface_name, 
operation_name, operation_kwargs=N
 
 if operation_kwargs and operation_kwargs.get('arguments'):
 operation_kwargs['arguments'] = dict(
-(argument_name, models.Parameter.wrap(argument_name, 
argument_value))
+(argument_name, models.Argument.wrap(argument_name, 
argument_value))
 for argument_name, argument_value in 
operation_kwargs['arguments'].iteritems()
 if argument_value is not None)
 
@@ -278,9 +278,16 @@ def create_plugin_specification(name='test_plugin', 
version='0.1'):
 )
 
 
-def create_parameter(name, value):
-p = models.Parameter()
-return p.wrap(name, value)
+def _create_parameter(name, value, model_cls):
+return model_cls.wrap(name, value)
+
+
+def create_property(name, value):
+return _create_parameter(name, value, model_cls=models.Property)
+
+
+def create_input(name, value):
+return _create_parameter(name, value, model_cls=models.Input)
 
 
 def _dictify(item):

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b6d3c43b/tests/mock/topology.py
--
diff --git a/tests/mock/topology.py b/tests/mock/topology.py
index ab08dbd..9f0521f 100644
--- a/tests/mock/topology.py
+++ b/tests/mock/topology.py
@@ -28,8 +28,8 @@ def create_simple_topology_single_node(model_storage, 
create_operation):
 'Standard', 'create',
 operation_kwargs=dict(
 function=create_operation,
-arguments={'key': aria_models.Parameter.wrap('key', 'create'),
-   'value': aria_models.Parameter.wrap('value', True)})
+arguments={'key': aria_models.Argument.wrap('key', 'create'),
+   'value': aria_models.Argument.wrap('value', True)})
 )
 node_template.interface_templates[interface_template.name] = 
interface_template # pylint: disable=unsubscriptable-object
 
@@ -39,8 +39,8 @@ def 

[3/3] incubator-ariatosca git commit: ARIA-64 Remove PyYAML dependency

2017-06-05 Thread emblemparade
ARIA-64 Remove PyYAML dependency

* Added "requirements" target to Makefile
* Small tweak to README


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/5d1e56b0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/5d1e56b0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/5d1e56b0

Branch: refs/heads/ARIA-64-remove-pyyaml
Commit: 5d1e56b04b643ae786d1573ca00ede894e19d2ae
Parents: b6d3c43
Author: Tal Liron 
Authored: Fri Jun 2 12:39:00 2017 -0500
Committer: Tal Liron 
Committed: Mon Jun 5 11:41:40 2017 -0500

--
 Makefile  | 21 -
 README.md |  5 +++--
 aria/cli/config/config.py |  2 +-
 aria/cli/inputs.py|  2 +-
 requirements.in   |  1 -
 requirements.txt  |  1 -
 6 files changed, 17 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/5d1e56b0/Makefile
--
diff --git a/Makefile b/Makefile
index 3bafd3b..2b267c4 100644
--- a/Makefile
+++ b/Makefile
@@ -29,18 +29,21 @@ clean:
 install:
pip install --upgrade .
 
-requirements:
-   pip install --upgrade --requirement requirements.txt
+requirements-dependencies:
+   pip install pip-tools==1.9.0
 
-docs-requirements:
-   pip install --upgrade --requirement "$(DOCS)/requirements.txt"
+requirements: requirements-dependencies
+   pip-compile --output-file requirements.txt requirements.in
 
-test-requirements:
-   pip install tox==2.5.0
+docs-dependencies:
+   pip install --upgrade --requirement "$(DOCS)/requirements.txt"
 
-docs: docs-requirements requirements
+docs: docs-dependencies install
rm -rf "$(HTML)"
sphinx-build -b html "$(DOCS)" "$(HTML)"
 
-test: test-requirements requirements
-   PYTHONPATH="$(EXTENSIONS):$(PYTHONPATH)" tox
+test-dependencies:
+   pip install tox==2.7.0
+
+test: test-dependencies
+   tox

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/5d1e56b0/README.md
--
diff --git a/README.md b/README.md
index e534645..8a91a01 100644
--- a/README.md
+++ b/README.md
@@ -46,11 +46,12 @@ Quick Start
 You need Python 2.6 or 2.7. Python 3+ is not currently supported.
 
 To install, we recommend using [pip](https://pip.pypa.io/) and a
-[virtualenv](https://virtualenv.pypa.io/en/stable/).
+[virtualenv](https://virtualenv.pypa.io/en/stable/). Note the extra libraries 
required for
+[installing cryptography 
support](https://cryptography.io/en/latest/installation/).
 
 In Debian-based systems:
 
-   sudo apt install python-setuptools
+   sudo apt install python-setuptools python-dev build-essential 
libssl-dev libffi-dev
sudo -H easy_install pip
sudo -H pip install virtualenv
virtualenv env

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/5d1e56b0/aria/cli/config/config.py
--
diff --git a/aria/cli/config/config.py b/aria/cli/config/config.py
index 8c4214c..d584fad 100644
--- a/aria/cli/config/config.py
+++ b/aria/cli/config/config.py
@@ -15,8 +15,8 @@
 
 
 import os
-import yaml
 import pkg_resources
+from ruamel import yaml
 
 from jinja2.environment import Template
 

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/5d1e56b0/aria/cli/inputs.py
--
diff --git a/aria/cli/inputs.py b/aria/cli/inputs.py
index 0ff48dc..4d46ebb 100644
--- a/aria/cli/inputs.py
+++ b/aria/cli/inputs.py
@@ -15,7 +15,7 @@
 
 import os
 import glob
-import yaml
+from ruamel import yaml
 
 from .env import logger
 from .exceptions import AriaCliError

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/5d1e56b0/requirements.in
--
diff --git a/requirements.in b/requirements.in
index ab06d93..54e8714 100644
--- a/requirements.in
+++ b/requirements.in
@@ -13,7 +13,6 @@
 # In order to create the requirements.txt file, execute
 # pip-compile --output-file requirements.txt requirements.in (pip-tools 
package is needed).
 
-PyYAML<3.13
 requests>=2.3.0, <2.14.0
 networkx>=1.9, <1.10 # version 1.10 dropped support of python 2.6
 retrying>=1.3.0, <1.4.0

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/5d1e56b0/requirements.txt
--
diff --git a/requirements.txt b/requirements.txt
index 8551c65..f3027e9 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -48,7 +48,6 @@ prettytable==0.7.2
 pyasn1==0.2.3 

incubator-ariatosca git commit: ARIA-199 Add "services outputs" CLI command

2017-06-02 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-199-cli-service-output [created] 79b94e1f9


ARIA-199 Add "services outputs" CLI command


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/79b94e1f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/79b94e1f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/79b94e1f

Branch: refs/heads/ARIA-199-cli-service-output
Commit: 79b94e1f9aed3be3176b96870f7ea472146032c3
Parents: 9174f94
Author: Tal Liron 
Authored: Fri Jun 2 14:20:28 2017 -0500
Committer: Tal Liron 
Committed: Fri Jun 2 14:20:28 2017 -0500

--
 aria/cli/commands/services.py   | 22 -
 tests/cli/test_services.py  | 26 ++--
 tests/mock/models.py|  4 +++
 .../node-cellar/node-cellar.yaml| 12 +
 4 files changed, 51 insertions(+), 13 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/79b94e1f/aria/cli/commands/services.py
--
diff --git a/aria/cli/commands/services.py b/aria/cli/commands/services.py
index 476387c..712b6af 100644
--- a/aria/cli/commands/services.py
+++ b/aria/cli/commands/services.py
@@ -192,17 +192,17 @@ def outputs(service_name, model_storage, logger):
 """
 logger.info('Showing outputs for service {0}...'.format(service_name))
 service = model_storage.service.get_by_name(service_name)
-#TODO fix this section..
-outputs_def = service.outputs
-response = model_storage.service.outputs.get(service_name)
-outputs_ = StringIO()
-for output_name, output in response.outputs.iteritems():
-outputs_.write(' - "{0}":{1}'.format(output_name, os.linesep))
-description = outputs_def[output_name].get('description', '')
-outputs_.write(' Description: {0}{1}'.format(description,
- os.linesep))
-outputs_.write(' Value: {0}{1}'.format(output, os.linesep))
-logger.info(outputs_.getvalue())
+
+if service.outputs:
+outputs_ = StringIO()
+for output_name, output in service.outputs.iteritems():
+outputs_.write(' - "{0}":{1}'.format(output_name, os.linesep))
+outputs_.write(' Description: 
{0}{1}'.format(output.description,
+ os.linesep))
+outputs_.write(' Value: {0}{1}'.format(output.value, 
os.linesep))
+logger.info(outputs_.getvalue())
+else:
+logger.info('\tNo outputs')
 
 
 @services.command(name='inputs',

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/79b94e1f/tests/cli/test_services.py
--
diff --git a/tests/cli/test_services.py b/tests/cli/test_services.py
index e5717cc..e514f12 100644
--- a/tests/cli/test_services.py
+++ b/tests/cli/test_services.py
@@ -174,7 +174,30 @@ class TestServicesDelete(TestCliBase):
 
 
 class TestServicesOutputs(TestCliBase):
-pass
+
+def test_header_string(self, monkeypatch, mock_storage):
+monkeypatch.setattr(_Environment, 'model_storage', mock_storage)
+self.invoke('services outputs test_s')
+assert 'Showing outputs for service test_s...' in 
self.logger_output_string
+
+def test_outputs_no_outputs(self, monkeypatch, mock_storage):
+monkeypatch.setattr(_Environment, 'model_storage', mock_storage)
+self.invoke('services outputs service_with_no_outputs')
+
+assert 'No outputs' in self.logger_output_string
+assert 'output1' not in self.logger_output_string
+assert 'value1' not in self.logger_output_string
+
+def test_outputs_one_output(self, monkeypatch, mock_storage):
+monkeypatch.setattr(_Environment, 'model_storage', mock_storage)
+s = mock_models.create_service_with_dependencies(include_output=True)
+monkeypatch.setattr(mock_storage.service, 'get_by_name', 
mock.MagicMock(return_value=s))
+
+self.invoke('services outputs test_s')
+
+assert 'output1' in self.logger_output_string
+assert 'value1' in self.logger_output_string
+assert 'No inputs' not in self.logger_output_string
 
 
 class TestServicesInputs(TestCliBase):
@@ -193,7 +216,6 @@ class TestServicesInputs(TestCliBase):
 assert 'value1' not in self.logger_output_string
 
 def test_inputs_one_input(self, monkeypatch, mock_storage):
-
 monkeypatch.setattr(_Environment, 'model_storage', mock_storage)
 s = 

incubator-ariatosca git commit: ARIA-260 Send interface inputs as arguments

2017-06-02 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-260-send-interface-inputs [created] a733be67b


ARIA-260 Send interface inputs as arguments


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/a733be67
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/a733be67
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/a733be67

Branch: refs/heads/ARIA-260-send-interface-inputs
Commit: a733be67b5c9770081d94c295c47803dbd7f3ef4
Parents: 9174f94
Author: Tal Liron 
Authored: Fri Jun 2 13:35:21 2017 -0500
Committer: Tal Liron 
Committed: Fri Jun 2 13:35:21 2017 -0500

--
 aria/modeling/service_instance.py   |  6 ++
 tests/end2end/test_nodecellar.py| 18 
 .../node-cellar/node-cellar.yaml| 22 
 3 files changed, 42 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/a733be67/aria/modeling/service_instance.py
--
diff --git a/aria/modeling/service_instance.py 
b/aria/modeling/service_instance.py
index 703873e..61d90cd 100644
--- a/aria/modeling/service_instance.py
+++ b/aria/modeling/service_instance.py
@@ -1767,6 +1767,12 @@ class OperationBase(InstanceModelMixin):
 # now, we just send all configuration parameters as arguments 
without validation.
 utils.instantiate_dict(self, self.arguments, self.configuration)
 
+if self.interface is not None:
+# Send all interface inputs as extra arguments
+# ("interface" is None for workflow operations)
+# Note that they will override existing arguments of the same names
+utils.instantiate_dict(self, self.arguments, self.interface.inputs)
+
 # Send all inputs as extra arguments
 # Note that they will override existing arguments of the same names
 utils.instantiate_dict(self, self.arguments, self.inputs)

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/a733be67/tests/end2end/test_nodecellar.py
--
diff --git a/tests/end2end/test_nodecellar.py b/tests/end2end/test_nodecellar.py
index f02441f..982b33f 100644
--- a/tests/end2end/test_nodecellar.py
+++ b/tests/end2end/test_nodecellar.py
@@ -40,3 +40,21 @@ def _verify_deployed_service_in_storage(service_name, 
model_storage):
 assert service.name == service_name
 assert len(service.executions) == 0  # dry executions leave no traces
 assert len(service.nodes) == 10
+assert 
set(service.nodes['loadbalancer_host_1'].interfaces['Standard'].operations['create']
 \
+.arguments.keys()) == set((
+'process',
+'use_sudo',
+'fabric_env',
+'script_path',
+'hide_output',
+'openstack_credential'
+))
+assert 
set(service.nodes['node_cellar_1'].interfaces['Maintenance'].operations['enable']
 \
+.arguments.keys()) == set((
+'process',
+'use_sudo',
+'fabric_env',
+'script_path',
+'hide_output',
+'mode'
+))

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/a733be67/tests/resources/service-templates/tosca-simple-1.0/node-cellar/node-cellar.yaml
--
diff --git 
a/tests/resources/service-templates/tosca-simple-1.0/node-cellar/node-cellar.yaml
 
b/tests/resources/service-templates/tosca-simple-1.0/node-cellar/node-cellar.yaml
index 4d53f9b..6d650bd 100644
--- 
a/tests/resources/service-templates/tosca-simple-1.0/node-cellar/node-cellar.yaml
+++ 
b/tests/resources/service-templates/tosca-simple-1.0/node-cellar/node-cellar.yaml
@@ -54,8 +54,20 @@ interface_types:
 
   Maintenance:
 derived_from: tosca.interfaces.Root
-enable: {}
-disable: {}
+inputs:
+  mode:
+type: string
+default: immediate
+constraints:
+  - valid_values: [ immediate, eventual ]
+description: >-
+  The mode in which maintenance mode is enabled/disabled.
+enable:
+  description: >-
+Enable maintenance mode.
+disable:
+  description: >-
+Disable maintenance mode.
 
 node_types:
 
@@ -102,8 +114,10 @@ topology_template:
   #token: { token: [ 'zero.one|two-three', '.|-', 3 ] }
   interfaces:
 Maintenance:
-  enable: juju > charm.maintenance_on
-  disable: juju > charm.maintenance_off
+  inputs:
+mode: eventual
+  enable: maintenance_node_cellar.sh
+ 

incubator-ariatosca git commit: ARIA-64 Remove PyYAML dependency

2017-06-02 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-64-remove-pyyaml [created] 62d3b8d7c


ARIA-64 Remove PyYAML dependency


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/62d3b8d7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/62d3b8d7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/62d3b8d7

Branch: refs/heads/ARIA-64-remove-pyyaml
Commit: 62d3b8d7c2b7bcacd6d456c971e6c97abd8378f1
Parents: 9174f94
Author: Tal Liron 
Authored: Fri Jun 2 12:39:00 2017 -0500
Committer: Tal Liron 
Committed: Fri Jun 2 12:39:00 2017 -0500

--
 aria/cli/config/config.py | 2 +-
 aria/cli/inputs.py| 2 +-
 requirements.in   | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/62d3b8d7/aria/cli/config/config.py
--
diff --git a/aria/cli/config/config.py b/aria/cli/config/config.py
index 8c4214c..d584fad 100644
--- a/aria/cli/config/config.py
+++ b/aria/cli/config/config.py
@@ -15,8 +15,8 @@
 
 
 import os
-import yaml
 import pkg_resources
+from ruamel import yaml
 
 from jinja2.environment import Template
 

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/62d3b8d7/aria/cli/inputs.py
--
diff --git a/aria/cli/inputs.py b/aria/cli/inputs.py
index 0ff48dc..4d46ebb 100644
--- a/aria/cli/inputs.py
+++ b/aria/cli/inputs.py
@@ -15,7 +15,7 @@
 
 import os
 import glob
-import yaml
+from ruamel import yaml
 
 from .env import logger
 from .exceptions import AriaCliError

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/62d3b8d7/requirements.in
--
diff --git a/requirements.in b/requirements.in
index ab06d93..54e8714 100644
--- a/requirements.in
+++ b/requirements.in
@@ -13,7 +13,6 @@
 # In order to create the requirements.txt file, execute
 # pip-compile --output-file requirements.txt requirements.in (pip-tools 
package is needed).
 
-PyYAML<3.13
 requests>=2.3.0, <2.14.0
 networkx>=1.9, <1.10 # version 1.10 dropped support of python 2.6
 retrying>=1.3.0, <1.4.0



incubator-ariatosca git commit: ARIA-254 Create of multiple nodes per template [Forced Update!]

2017-06-01 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-254-multiple-nodes-per-template acfc7f461 -> eee540cbb 
(forced update)


ARIA-254 Create of multiple nodes per template

* New aria.Scaling policy (and "scaling" role)
* NodeTemplate model no longer stores scaling values (default_instances,
etc.) but instead fetches them from applicable scaling policies
* Some code cleanup


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/eee540cb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/eee540cb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/eee540cb

Branch: refs/heads/ARIA-254-multiple-nodes-per-template
Commit: eee540cbbed66b2ee3ea0c143ddc9bed0cbce29d
Parents: 9174f94
Author: Tal Liron 
Authored: Thu Jun 1 14:17:17 2017 -0500
Committer: Tal Liron 
Committed: Thu Jun 1 14:44:36 2017 -0500

--
 aria/cli/commands/workflows.py  |   4 +-
 aria/cli/execution_logging.py   |   4 +-
 aria/core.py|   2 +-
 aria/modeling/orchestration.py  |  12 +-
 aria/modeling/relationship.py   |   2 +-
 aria/modeling/service_changes.py|   8 +-
 aria/modeling/service_common.py |   2 +-
 aria/modeling/service_instance.py   |  59 +++
 aria/modeling/service_template.py   | 154 +--
 aria/modeling/types.py  |   4 +-
 aria/orchestrator/workflow_runner.py|   2 +-
 aria/orchestrator/workflows/executor/celery.py  |   2 +-
 aria/orchestrator/workflows/executor/process.py |   2 +-
 aria/orchestrator/workflows/executor/thread.py  |   2 +-
 aria/storage/core.py|   2 +-
 .../profiles/aria-1.0/aria-1.0.yaml |  25 ++-
 .../simple_v1_0/assignments.py  |   8 +
 .../simple_v1_0/data_types.py   |  22 ++-
 .../simple_v1_0/definitions.py  |   8 +
 .../aria_extension_tosca/simple_v1_0/filters.py |   2 +
 .../aria_extension_tosca/simple_v1_0/misc.py|  10 ++
 .../simple_v1_0/modeling/__init__.py|   3 -
 .../simple_v1_0/presentation/extensible.py  |   1 +
 .../presentation/field_validators.py|  20 +++
 .../simple_v1_0/presentation/types.py   |   2 +
 .../simple_v1_0/presenter.py|   3 +-
 .../simple_v1_0/templates.py|   8 +-
 .../aria_extension_tosca/simple_v1_0/types.py   |  10 +-
 tests/end2end/test_hello_world.py   |   2 +-
 tests/end2end/test_nodecellar.py|   2 +-
 tests/mock/models.py|   8 +-
 tests/modeling/test_mixins.py   |   3 -
 tests/modeling/test_models.py   |  20 +--
 tests/orchestrator/context/test_operation.py|   2 +-
 .../node-cellar/node-cellar.yaml|   1 +
 .../node-cellar/types/openstack.yaml|   3 +-
 36 files changed, 286 insertions(+), 138 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/eee540cb/aria/cli/commands/workflows.py
--
diff --git a/aria/cli/commands/workflows.py b/aria/cli/commands/workflows.py
index 221dbc4..baab973 100644
--- a/aria/cli/commands/workflows.py
+++ b/aria/cli/commands/workflows.py
@@ -42,7 +42,7 @@ def show(workflow_name, service_name, model_storage, logger):
 logger.info('Retrieving workflow {0} for service {1}'.format(
 workflow_name, service_name))
 service = model_storage.service.get_by_name(service_name)
-workflow = next((wf for wf in service.workflows.values() if
+workflow = next((wf for wf in service.workflows.itervalues() if
  wf.name == workflow_name), None)
 if not workflow:
 raise AriaCliError(
@@ -91,7 +91,7 @@ def list(service_name, model_storage, logger):
 """
 logger.info('Listing workflows for service {0}...'.format(service_name))
 service = model_storage.service.get_by_name(service_name)
-workflows_list = sorted(service.workflows.values(), key=lambda w: w.name)
+workflows_list = sorted(service.workflows.itervalues(), key=lambda w: 
w.name)
 
 defaults = {
 'service_template_name': service.service_template_name,

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/eee540cb/aria/cli/execution_logging.py
--
diff --git a/aria/cli/execution_logging.py b/aria/cli/execution_logging.py
index 248ff7c..467123c 100644
--- a/aria/cli/execution_logging.py
+++ b/aria/cli/execution_logging.py
@@ -106,11 +106,11 @@ def 

[incubator-ariatosca] Git Push Summary

2017-06-01 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-149-functions-in-operation-configuration [deleted] 25ce830b7


incubator-ariatosca git commit: ARIA-254 Create of multiple nodes per template

2017-06-01 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-254-multiple-nodes-per-template [created] acfc7f461


ARIA-254 Create of multiple nodes per template

* New aria.Scaling policy (and "scaling" role)
* NodeTemplate model no longer stores scaling values (default_instances,
etc.) but instead fetches them from applicable scaling policies
* Some code cleanup


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/acfc7f46
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/acfc7f46
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/acfc7f46

Branch: refs/heads/ARIA-254-multiple-nodes-per-template
Commit: acfc7f461b7ee6f01b6095d8eb4e28554df8928c
Parents: 9174f94
Author: Tal Liron 
Authored: Thu Jun 1 14:17:17 2017 -0500
Committer: Tal Liron 
Committed: Thu Jun 1 14:17:17 2017 -0500

--
 aria/cli/commands/workflows.py  |   4 +-
 aria/cli/execution_logging.py   |   4 +-
 aria/core.py|   2 +-
 aria/modeling/orchestration.py  |  12 +-
 aria/modeling/relationship.py   |   2 +-
 aria/modeling/service_changes.py|   8 +-
 aria/modeling/service_common.py |   2 +-
 aria/modeling/service_instance.py   |  59 +++
 aria/modeling/service_template.py   | 154 +--
 aria/modeling/types.py  |   4 +-
 aria/orchestrator/workflow_runner.py|   2 +-
 aria/orchestrator/workflows/executor/celery.py  |   2 +-
 aria/orchestrator/workflows/executor/process.py |   2 +-
 aria/orchestrator/workflows/executor/thread.py  |   2 +-
 aria/storage/core.py|   2 +-
 .../profiles/aria-1.0/aria-1.0.yaml |  25 ++-
 .../simple_v1_0/assignments.py  |   8 +
 .../simple_v1_0/data_types.py   |  22 ++-
 .../simple_v1_0/definitions.py  |   8 +
 .../aria_extension_tosca/simple_v1_0/filters.py |   2 +
 .../aria_extension_tosca/simple_v1_0/misc.py|  10 ++
 .../simple_v1_0/modeling/__init__.py|   3 -
 .../simple_v1_0/presentation/extensible.py  |   1 +
 .../presentation/field_validators.py|  20 +++
 .../simple_v1_0/presentation/types.py   |   2 +
 .../simple_v1_0/presenter.py|   3 +-
 .../simple_v1_0/templates.py|   8 +-
 .../aria_extension_tosca/simple_v1_0/types.py   |  10 +-
 tests/end2end/test_hello_world.py   |   2 +-
 tests/mock/models.py|   8 +-
 tests/modeling/test_mixins.py   |   3 -
 tests/modeling/test_models.py   |  20 +--
 tests/orchestrator/context/test_operation.py|   2 +-
 .../node-cellar/node-cellar.yaml|   1 +
 .../node-cellar/types/openstack.yaml|   3 +-
 35 files changed, 285 insertions(+), 137 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/acfc7f46/aria/cli/commands/workflows.py
--
diff --git a/aria/cli/commands/workflows.py b/aria/cli/commands/workflows.py
index 221dbc4..baab973 100644
--- a/aria/cli/commands/workflows.py
+++ b/aria/cli/commands/workflows.py
@@ -42,7 +42,7 @@ def show(workflow_name, service_name, model_storage, logger):
 logger.info('Retrieving workflow {0} for service {1}'.format(
 workflow_name, service_name))
 service = model_storage.service.get_by_name(service_name)
-workflow = next((wf for wf in service.workflows.values() if
+workflow = next((wf for wf in service.workflows.itervalues() if
  wf.name == workflow_name), None)
 if not workflow:
 raise AriaCliError(
@@ -91,7 +91,7 @@ def list(service_name, model_storage, logger):
 """
 logger.info('Listing workflows for service {0}...'.format(service_name))
 service = model_storage.service.get_by_name(service_name)
-workflows_list = sorted(service.workflows.values(), key=lambda w: w.name)
+workflows_list = sorted(service.workflows.itervalues(), key=lambda w: 
w.name)
 
 defaults = {
 'service_template_name': service.service_template_name,

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/acfc7f46/aria/cli/execution_logging.py
--
diff --git a/aria/cli/execution_logging.py b/aria/cli/execution_logging.py
index 248ff7c..467123c 100644
--- a/aria/cli/execution_logging.py
+++ b/aria/cli/execution_logging.py
@@ -106,11 +106,11 @@ def stylize_log(item, mark_pattern):
 if item.task:
 # operation task
 

[1/3] incubator-ariatosca git commit: ARIA-149 Enhance operation configuration [Forced Update!]

2017-05-31 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/master 25ce830b7 -> 9174f9469 (forced update)


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/9174f946/tests/orchestrator/workflows/api/test_task.py
--
diff --git a/tests/orchestrator/workflows/api/test_task.py 
b/tests/orchestrator/workflows/api/test_task.py
index 642c785..9d91b6b 100644
--- a/tests/orchestrator/workflows/api/test_task.py
+++ b/tests/orchestrator/workflows/api/test_task.py
@@ -44,15 +44,15 @@ class TestOperationTask(object):
 plugin = mock.models.create_plugin('test_plugin', '0.1')
 ctx.model.node.update(plugin)
 
-inputs = {'test_input': True}
+arguments = {'test_input': True}
 
 interface = mock.models.create_interface(
 ctx.service,
 interface_name,
 operation_name,
 operation_kwargs=dict(plugin=plugin,
-  implementation='op_path',
-  inputs=inputs),)
+  function='op_path',
+  arguments=arguments),)
 
 node = ctx.model.node.get_by_name(mock.models.DEPENDENT_NODE_NAME)
 node.interfaces[interface_name] = interface
@@ -66,7 +66,7 @@ class TestOperationTask(object):
 node,
 interface_name=interface_name,
 operation_name=operation_name,
-inputs=inputs,
+arguments=arguments,
 max_attempts=max_attempts,
 retry_interval=retry_interval,
 ignore_failure=ignore_failure)
@@ -77,9 +77,9 @@ class TestOperationTask(object):
 interface=interface_name,
 operation=operation_name
 )
-assert api_task.implementation == 'op_path'
+assert api_task.function == 'op_path'
 assert api_task.actor == node
-assert api_task.inputs['test_input'].value is True
+assert api_task.arguments['test_input'].value is True
 assert api_task.retry_interval == retry_interval
 assert api_task.max_attempts == max_attempts
 assert api_task.ignore_failure == ignore_failure
@@ -92,15 +92,15 @@ class TestOperationTask(object):
 plugin = mock.models.create_plugin('test_plugin', '0.1')
 ctx.model.plugin.update(plugin)
 
-inputs = {'test_input': True}
+arguments = {'test_input': True}
 
 interface = mock.models.create_interface(
 ctx.service,
 interface_name,
 operation_name,
 operation_kwargs=dict(plugin=plugin,
-  implementation='op_path',
-  inputs=inputs)
+  function='op_path',
+  arguments=arguments)
 )
 
 relationship = ctx.model.relationship.list()[0]
@@ -113,7 +113,7 @@ class TestOperationTask(object):
 relationship,
 interface_name=interface_name,
 operation_name=operation_name,
-inputs=inputs,
+arguments=arguments,
 max_attempts=max_attempts,
 retry_interval=retry_interval)
 
@@ -123,9 +123,9 @@ class TestOperationTask(object):
 interface=interface_name,
 operation=operation_name
 )
-assert api_task.implementation == 'op_path'
+assert api_task.function == 'op_path'
 assert api_task.actor == relationship
-assert api_task.inputs['test_input'].value is True
+assert api_task.arguments['test_input'].value is True
 assert api_task.retry_interval == retry_interval
 assert api_task.max_attempts == max_attempts
 assert api_task.plugin.name == 'test_plugin'
@@ -137,15 +137,15 @@ class TestOperationTask(object):
 plugin = mock.models.create_plugin('test_plugin', '0.1')
 ctx.model.node.update(plugin)
 
-inputs = {'test_input': True}
+arguments = {'test_input': True}
 
 interface = mock.models.create_interface(
 ctx.service,
 interface_name,
 operation_name,
 operation_kwargs=dict(plugin=plugin,
-  implementation='op_path',
-  inputs=inputs)
+  function='op_path',
+  arguments=arguments)
 )
 
 relationship = ctx.model.relationship.list()[0]
@@ -158,7 +158,7 @@ class TestOperationTask(object):
 relationship,
 interface_name=interface_name,
 operation_name=operation_name,
-inputs=inputs,
+arguments=arguments,
 max_attempts=max_attempts,
 retry_interval=retry_interval)
 
@@ -168,9 

[2/3] incubator-ariatosca git commit: ARIA-149 Enhance operation configuration

2017-05-31 Thread emblemparade
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/9174f946/extensions/aria_extension_tosca/simple_v1_0/modeling/capabilities.py
--
diff --git 
a/extensions/aria_extension_tosca/simple_v1_0/modeling/capabilities.py 
b/extensions/aria_extension_tosca/simple_v1_0/modeling/capabilities.py
index 6df7177..a90a9fc 100644
--- a/extensions/aria_extension_tosca/simple_v1_0/modeling/capabilities.py
+++ b/extensions/aria_extension_tosca/simple_v1_0/modeling/capabilities.py
@@ -16,8 +16,9 @@
 from aria.utils.collections import deepcopy_with_locators, OrderedDict
 from aria.parser.validation import Issue
 
-from .properties import (convert_property_definitions_to_values, 
merge_raw_property_definitions,
- get_assigned_and_defined_property_values)
+from .parameters import (convert_parameter_definitions_to_values, 
merge_raw_parameter_definitions,
+ get_assigned_and_defined_parameter_values)
+
 
 #
 # CapabilityType
@@ -38,6 +39,7 @@ def get_inherited_valid_source_types(context, presentation):
 
 return valid_source_types
 
+
 #
 # NodeType
 #
@@ -92,6 +94,7 @@ def get_inherited_capability_definitions(context, 
presentation, for_presentation
 
 return capability_definitions
 
+
 #
 # NodeTemplate
 #
@@ -127,8 +130,9 @@ def get_template_capabilities(context, presentation):
 capability_assignment = capability_assignments[capability_name]
 
 # Assign properties
-values = get_assigned_and_defined_property_values(context,
-  
our_capability_assignment)
+values = get_assigned_and_defined_parameter_values(context,
+   
our_capability_assignment,
+   'property')
 if values:
 capability_assignment._raw['properties'] = values
 else:
@@ -139,6 +143,7 @@ def get_template_capabilities(context, presentation):
 
 return capability_assignments
 
+
 #
 # Utils
 #
@@ -150,24 +155,25 @@ def 
convert_capability_from_definition_to_assignment(context, presentation, cont
 
 properties = presentation.properties
 if properties is not None:
-raw['properties'] = convert_property_definitions_to_values(context, 
properties)
+raw['properties'] = convert_parameter_definitions_to_values(context, 
properties)
 
 # TODO attributes
 
 return CapabilityAssignment(name=presentation._name, raw=raw, 
container=container)
 
+
 def merge_capability_definition_from_type(context, presentation, 
capability_definition):
 raw_properties = OrderedDict()
 
 # Merge properties from type
 the_type = capability_definition._get_type(context)
 type_property_defintions = the_type._get_properties(context)
-merge_raw_property_definitions(context, presentation, raw_properties, 
type_property_defintions,
-   'properties')
+merge_raw_parameter_definitions(context, presentation, raw_properties, 
type_property_defintions,
+'properties')
 
 # Merge our properties
-merge_raw_property_definitions(context, presentation, raw_properties,
-   capability_definition.properties, 
'properties')
+merge_raw_parameter_definitions(context, presentation, raw_properties,
+capability_definition.properties, 
'properties')
 
 if raw_properties:
 capability_definition._raw['properties'] = raw_properties

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/9174f946/extensions/aria_extension_tosca/simple_v1_0/modeling/constraints.py
--
diff --git 
a/extensions/aria_extension_tosca/simple_v1_0/modeling/constraints.py 
b/extensions/aria_extension_tosca/simple_v1_0/modeling/constraints.py
index 7c99eab..9a30cc1 100644
--- a/extensions/aria_extension_tosca/simple_v1_0/modeling/constraints.py
+++ b/extensions/aria_extension_tosca/simple_v1_0/modeling/constraints.py
@@ -15,7 +15,7 @@
 
 import re
 
-from aria.modeling.contraints import NodeTemplateConstraint
+from aria.modeling.constraints import NodeTemplateConstraint
 from aria.modeling.utils import NodeTemplateContainerHolder
 from aria.modeling.functions import evaluate
 from aria.parser import implements_specification

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/9174f946/extensions/aria_extension_tosca/simple_v1_0/modeling/data_types.py
--
diff --git a/extensions/aria_extension_tosca/simple_v1_0/modeling/data_types.py 
b/extensions/aria_extension_tosca/simple_v1_0/modeling/data_types.py
index 3952785..c0d79e5 100644
--- 

[1/3] incubator-ariatosca git commit: ARIA-149 Enhance operation configuration

2017-05-31 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/master 07d79513a -> 25ce830b7


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/25ce830b/tests/orchestrator/workflows/api/test_task.py
--
diff --git a/tests/orchestrator/workflows/api/test_task.py 
b/tests/orchestrator/workflows/api/test_task.py
index 642c785..9d91b6b 100644
--- a/tests/orchestrator/workflows/api/test_task.py
+++ b/tests/orchestrator/workflows/api/test_task.py
@@ -44,15 +44,15 @@ class TestOperationTask(object):
 plugin = mock.models.create_plugin('test_plugin', '0.1')
 ctx.model.node.update(plugin)
 
-inputs = {'test_input': True}
+arguments = {'test_input': True}
 
 interface = mock.models.create_interface(
 ctx.service,
 interface_name,
 operation_name,
 operation_kwargs=dict(plugin=plugin,
-  implementation='op_path',
-  inputs=inputs),)
+  function='op_path',
+  arguments=arguments),)
 
 node = ctx.model.node.get_by_name(mock.models.DEPENDENT_NODE_NAME)
 node.interfaces[interface_name] = interface
@@ -66,7 +66,7 @@ class TestOperationTask(object):
 node,
 interface_name=interface_name,
 operation_name=operation_name,
-inputs=inputs,
+arguments=arguments,
 max_attempts=max_attempts,
 retry_interval=retry_interval,
 ignore_failure=ignore_failure)
@@ -77,9 +77,9 @@ class TestOperationTask(object):
 interface=interface_name,
 operation=operation_name
 )
-assert api_task.implementation == 'op_path'
+assert api_task.function == 'op_path'
 assert api_task.actor == node
-assert api_task.inputs['test_input'].value is True
+assert api_task.arguments['test_input'].value is True
 assert api_task.retry_interval == retry_interval
 assert api_task.max_attempts == max_attempts
 assert api_task.ignore_failure == ignore_failure
@@ -92,15 +92,15 @@ class TestOperationTask(object):
 plugin = mock.models.create_plugin('test_plugin', '0.1')
 ctx.model.plugin.update(plugin)
 
-inputs = {'test_input': True}
+arguments = {'test_input': True}
 
 interface = mock.models.create_interface(
 ctx.service,
 interface_name,
 operation_name,
 operation_kwargs=dict(plugin=plugin,
-  implementation='op_path',
-  inputs=inputs)
+  function='op_path',
+  arguments=arguments)
 )
 
 relationship = ctx.model.relationship.list()[0]
@@ -113,7 +113,7 @@ class TestOperationTask(object):
 relationship,
 interface_name=interface_name,
 operation_name=operation_name,
-inputs=inputs,
+arguments=arguments,
 max_attempts=max_attempts,
 retry_interval=retry_interval)
 
@@ -123,9 +123,9 @@ class TestOperationTask(object):
 interface=interface_name,
 operation=operation_name
 )
-assert api_task.implementation == 'op_path'
+assert api_task.function == 'op_path'
 assert api_task.actor == relationship
-assert api_task.inputs['test_input'].value is True
+assert api_task.arguments['test_input'].value is True
 assert api_task.retry_interval == retry_interval
 assert api_task.max_attempts == max_attempts
 assert api_task.plugin.name == 'test_plugin'
@@ -137,15 +137,15 @@ class TestOperationTask(object):
 plugin = mock.models.create_plugin('test_plugin', '0.1')
 ctx.model.node.update(plugin)
 
-inputs = {'test_input': True}
+arguments = {'test_input': True}
 
 interface = mock.models.create_interface(
 ctx.service,
 interface_name,
 operation_name,
 operation_kwargs=dict(plugin=plugin,
-  implementation='op_path',
-  inputs=inputs)
+  function='op_path',
+  arguments=arguments)
 )
 
 relationship = ctx.model.relationship.list()[0]
@@ -158,7 +158,7 @@ class TestOperationTask(object):
 relationship,
 interface_name=interface_name,
 operation_name=operation_name,
-inputs=inputs,
+arguments=arguments,
 max_attempts=max_attempts,
 retry_interval=retry_interval)
 
@@ -168,9 +168,9 @@ class 

[2/3] incubator-ariatosca git commit: ARIA-149 Enhance operation configuration

2017-05-31 Thread emblemparade
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/25ce830b/extensions/aria_extension_tosca/simple_v1_0/modeling/capabilities.py
--
diff --git 
a/extensions/aria_extension_tosca/simple_v1_0/modeling/capabilities.py 
b/extensions/aria_extension_tosca/simple_v1_0/modeling/capabilities.py
index 6df7177..a90a9fc 100644
--- a/extensions/aria_extension_tosca/simple_v1_0/modeling/capabilities.py
+++ b/extensions/aria_extension_tosca/simple_v1_0/modeling/capabilities.py
@@ -16,8 +16,9 @@
 from aria.utils.collections import deepcopy_with_locators, OrderedDict
 from aria.parser.validation import Issue
 
-from .properties import (convert_property_definitions_to_values, 
merge_raw_property_definitions,
- get_assigned_and_defined_property_values)
+from .parameters import (convert_parameter_definitions_to_values, 
merge_raw_parameter_definitions,
+ get_assigned_and_defined_parameter_values)
+
 
 #
 # CapabilityType
@@ -38,6 +39,7 @@ def get_inherited_valid_source_types(context, presentation):
 
 return valid_source_types
 
+
 #
 # NodeType
 #
@@ -92,6 +94,7 @@ def get_inherited_capability_definitions(context, 
presentation, for_presentation
 
 return capability_definitions
 
+
 #
 # NodeTemplate
 #
@@ -127,8 +130,9 @@ def get_template_capabilities(context, presentation):
 capability_assignment = capability_assignments[capability_name]
 
 # Assign properties
-values = get_assigned_and_defined_property_values(context,
-  
our_capability_assignment)
+values = get_assigned_and_defined_parameter_values(context,
+   
our_capability_assignment,
+   'property')
 if values:
 capability_assignment._raw['properties'] = values
 else:
@@ -139,6 +143,7 @@ def get_template_capabilities(context, presentation):
 
 return capability_assignments
 
+
 #
 # Utils
 #
@@ -150,24 +155,25 @@ def 
convert_capability_from_definition_to_assignment(context, presentation, cont
 
 properties = presentation.properties
 if properties is not None:
-raw['properties'] = convert_property_definitions_to_values(context, 
properties)
+raw['properties'] = convert_parameter_definitions_to_values(context, 
properties)
 
 # TODO attributes
 
 return CapabilityAssignment(name=presentation._name, raw=raw, 
container=container)
 
+
 def merge_capability_definition_from_type(context, presentation, 
capability_definition):
 raw_properties = OrderedDict()
 
 # Merge properties from type
 the_type = capability_definition._get_type(context)
 type_property_defintions = the_type._get_properties(context)
-merge_raw_property_definitions(context, presentation, raw_properties, 
type_property_defintions,
-   'properties')
+merge_raw_parameter_definitions(context, presentation, raw_properties, 
type_property_defintions,
+'properties')
 
 # Merge our properties
-merge_raw_property_definitions(context, presentation, raw_properties,
-   capability_definition.properties, 
'properties')
+merge_raw_parameter_definitions(context, presentation, raw_properties,
+capability_definition.properties, 
'properties')
 
 if raw_properties:
 capability_definition._raw['properties'] = raw_properties

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/25ce830b/extensions/aria_extension_tosca/simple_v1_0/modeling/constraints.py
--
diff --git 
a/extensions/aria_extension_tosca/simple_v1_0/modeling/constraints.py 
b/extensions/aria_extension_tosca/simple_v1_0/modeling/constraints.py
index 7c99eab..9a30cc1 100644
--- a/extensions/aria_extension_tosca/simple_v1_0/modeling/constraints.py
+++ b/extensions/aria_extension_tosca/simple_v1_0/modeling/constraints.py
@@ -15,7 +15,7 @@
 
 import re
 
-from aria.modeling.contraints import NodeTemplateConstraint
+from aria.modeling.constraints import NodeTemplateConstraint
 from aria.modeling.utils import NodeTemplateContainerHolder
 from aria.modeling.functions import evaluate
 from aria.parser import implements_specification

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/25ce830b/extensions/aria_extension_tosca/simple_v1_0/modeling/data_types.py
--
diff --git a/extensions/aria_extension_tosca/simple_v1_0/modeling/data_types.py 
b/extensions/aria_extension_tosca/simple_v1_0/modeling/data_types.py
index 3952785..c0d79e5 100644
--- 

[3/3] incubator-ariatosca git commit: ARIA-149 Enhance operation configuration

2017-05-31 Thread emblemparade
ARIA-149 Enhance operation configuration

* Also fixes ARIA-121, ARIA-190
* Parse special "dependencies" configuration parameters as YAML and
  treat as Parameter models, allowing them full use of intrinsic
  functions, type coersions, and validations
* Rename various functions that process "properties" to more generically
  process "parameters" (properties, inputs, attributes, arguments, etc.)
* The "configuration" field in OperationTemplate and Operation models
  is now now a dict of Parameter models
* Add "function" and "arguments" fields to Operation model to preserve
  user data (in "implementation" and "inputs") and to clearly demarcate
  orchestration data from user data; update task API accordingly
* Some cleanup of parser code touched by this commit
* Rename "create_parameters" to "merge_parameter_values" and improve


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/25ce830b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/25ce830b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/25ce830b

Branch: refs/heads/master
Commit: 25ce830b77f8b76e3a30576ccb5b00d5f4acfe72
Parents: 07d7951
Author: Tal Liron 
Authored: Thu Apr 20 17:54:47 2017 -0500
Committer: Tal Liron 
Committed: Wed May 31 15:15:56 2017 -0500

--
 aria/cli/commands/services.py   |   2 +-
 aria/cli/execution_logging.py   |   6 +-
 aria/core.py|  14 +-
 aria/modeling/constraints.py|  28 +++
 aria/modeling/contraints.py |  28 ---
 aria/modeling/exceptions.py |  16 +-
 aria/modeling/orchestration.py  |  14 +-
 aria/modeling/service_common.py |   7 +-
 aria/modeling/service_instance.py   |  89 +---
 aria/modeling/service_template.py   |  67 +++---
 aria/modeling/utils.py  | 114 +-
 aria/orchestrator/__init__.py   |   7 +-
 aria/orchestrator/context/operation.py  |   4 +-
 aria/orchestrator/decorators.py |   3 +-
 .../execution_plugin/instantiation.py   | 139 +++-
 aria/orchestrator/workflow_runner.py|  17 +-
 aria/orchestrator/workflows/api/task.py |  89 +---
 .../workflows/builtin/execute_operation.py  |   2 +-
 aria/orchestrator/workflows/core/task.py|   5 +-
 aria/orchestrator/workflows/events_logging.py   |   6 +-
 aria/orchestrator/workflows/executor/base.py|   4 +-
 aria/orchestrator/workflows/executor/celery.py  |   6 +-
 aria/orchestrator/workflows/executor/dry.py |   6 +-
 aria/orchestrator/workflows/executor/process.py |  12 +-
 aria/orchestrator/workflows/executor/thread.py  |   6 +-
 aria/utils/formatting.py|   4 +-
 aria/utils/validation.py|   8 +-
 .../profiles/aria-1.0/aria-1.0.yaml |   8 -
 .../simple_v1_0/assignments.py  |   4 +-
 .../simple_v1_0/modeling/__init__.py|  72 +--
 .../simple_v1_0/modeling/artifacts.py   |   2 +-
 .../simple_v1_0/modeling/capabilities.py|  24 ++-
 .../simple_v1_0/modeling/constraints.py |   2 +-
 .../simple_v1_0/modeling/data_types.py  |  16 ++
 .../simple_v1_0/modeling/functions.py   |   4 +-
 .../simple_v1_0/modeling/interfaces.py  |  34 ++-
 .../simple_v1_0/modeling/parameters.py  | 211 +++
 .../simple_v1_0/modeling/policies.py|   2 +
 .../simple_v1_0/modeling/properties.py  | 202 --
 .../simple_v1_0/modeling/requirements.py|  20 +-
 .../modeling/substitution_mappings.py   |   4 +
 .../simple_v1_0/templates.py|  13 +-
 .../aria_extension_tosca/simple_v1_0/types.py   |  24 +--
 tests/cli/test_services.py  |  14 +-
 tests/mock/models.py|  10 +-
 tests/mock/topology.py  |  12 +-
 tests/modeling/test_models.py   |  12 +-
 tests/orchestrator/context/test_operation.py|  86 
 tests/orchestrator/context/test_serialize.py|   6 +-
 tests/orchestrator/context/test_toolbelt.py |  14 +-
 .../orchestrator/execution_plugin/test_local.py |  14 +-
 tests/orchestrator/execution_plugin/test_ssh.py |  16 +-
 tests/orchestrator/test_workflow_runner.py  |  16 +-
 tests/orchestrator/workflows/api/test_task.py   |  40 ++--
 .../workflows/builtin/test_execute_operation.py |   2 +-
 .../orchestrator/workflows/core/test_engine.py  |  44 ++--
 .../orchestrator/workflows/core/test_events.py  |   3 +-
 tests/orchestrator/workflows/core/test_task.py  |  10 +-
 .../test_task_graph_into_execution_graph.py |   6 +-
 

[2/3] incubator-ariatosca git commit: ARIA-149 Enhance operation configuration

2017-05-31 Thread emblemparade
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/25ce830b/extensions/aria_extension_tosca/simple_v1_0/modeling/capabilities.py
--
diff --git 
a/extensions/aria_extension_tosca/simple_v1_0/modeling/capabilities.py 
b/extensions/aria_extension_tosca/simple_v1_0/modeling/capabilities.py
index 6df7177..a90a9fc 100644
--- a/extensions/aria_extension_tosca/simple_v1_0/modeling/capabilities.py
+++ b/extensions/aria_extension_tosca/simple_v1_0/modeling/capabilities.py
@@ -16,8 +16,9 @@
 from aria.utils.collections import deepcopy_with_locators, OrderedDict
 from aria.parser.validation import Issue
 
-from .properties import (convert_property_definitions_to_values, 
merge_raw_property_definitions,
- get_assigned_and_defined_property_values)
+from .parameters import (convert_parameter_definitions_to_values, 
merge_raw_parameter_definitions,
+ get_assigned_and_defined_parameter_values)
+
 
 #
 # CapabilityType
@@ -38,6 +39,7 @@ def get_inherited_valid_source_types(context, presentation):
 
 return valid_source_types
 
+
 #
 # NodeType
 #
@@ -92,6 +94,7 @@ def get_inherited_capability_definitions(context, 
presentation, for_presentation
 
 return capability_definitions
 
+
 #
 # NodeTemplate
 #
@@ -127,8 +130,9 @@ def get_template_capabilities(context, presentation):
 capability_assignment = capability_assignments[capability_name]
 
 # Assign properties
-values = get_assigned_and_defined_property_values(context,
-  
our_capability_assignment)
+values = get_assigned_and_defined_parameter_values(context,
+   
our_capability_assignment,
+   'property')
 if values:
 capability_assignment._raw['properties'] = values
 else:
@@ -139,6 +143,7 @@ def get_template_capabilities(context, presentation):
 
 return capability_assignments
 
+
 #
 # Utils
 #
@@ -150,24 +155,25 @@ def 
convert_capability_from_definition_to_assignment(context, presentation, cont
 
 properties = presentation.properties
 if properties is not None:
-raw['properties'] = convert_property_definitions_to_values(context, 
properties)
+raw['properties'] = convert_parameter_definitions_to_values(context, 
properties)
 
 # TODO attributes
 
 return CapabilityAssignment(name=presentation._name, raw=raw, 
container=container)
 
+
 def merge_capability_definition_from_type(context, presentation, 
capability_definition):
 raw_properties = OrderedDict()
 
 # Merge properties from type
 the_type = capability_definition._get_type(context)
 type_property_defintions = the_type._get_properties(context)
-merge_raw_property_definitions(context, presentation, raw_properties, 
type_property_defintions,
-   'properties')
+merge_raw_parameter_definitions(context, presentation, raw_properties, 
type_property_defintions,
+'properties')
 
 # Merge our properties
-merge_raw_property_definitions(context, presentation, raw_properties,
-   capability_definition.properties, 
'properties')
+merge_raw_parameter_definitions(context, presentation, raw_properties,
+capability_definition.properties, 
'properties')
 
 if raw_properties:
 capability_definition._raw['properties'] = raw_properties

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/25ce830b/extensions/aria_extension_tosca/simple_v1_0/modeling/constraints.py
--
diff --git 
a/extensions/aria_extension_tosca/simple_v1_0/modeling/constraints.py 
b/extensions/aria_extension_tosca/simple_v1_0/modeling/constraints.py
index 7c99eab..9a30cc1 100644
--- a/extensions/aria_extension_tosca/simple_v1_0/modeling/constraints.py
+++ b/extensions/aria_extension_tosca/simple_v1_0/modeling/constraints.py
@@ -15,7 +15,7 @@
 
 import re
 
-from aria.modeling.contraints import NodeTemplateConstraint
+from aria.modeling.constraints import NodeTemplateConstraint
 from aria.modeling.utils import NodeTemplateContainerHolder
 from aria.modeling.functions import evaluate
 from aria.parser import implements_specification

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/25ce830b/extensions/aria_extension_tosca/simple_v1_0/modeling/data_types.py
--
diff --git a/extensions/aria_extension_tosca/simple_v1_0/modeling/data_types.py 
b/extensions/aria_extension_tosca/simple_v1_0/modeling/data_types.py
index 3952785..c0d79e5 100644
--- 

[3/3] incubator-ariatosca git commit: ARIA-149 Enhance operation configuration

2017-05-31 Thread emblemparade
ARIA-149 Enhance operation configuration

* Also fixes ARIA-121, ARIA-190
* Parse special "dependencies" configuration parameters as YAML and
  treat as Parameter models, allowing them full use of intrinsic
  functions, type coersions, and validations
* Rename various functions that process "properties" to more generically
  process "parameters" (properties, inputs, attributes, arguments, etc.)
* The "configuration" field in OperationTemplate and Operation models
  is now now a dict of Parameter models
* Add "function" and "arguments" fields to Operation model to preserve
  user data (in "implementation" and "inputs") and to clearly demarcate
  orchestration data from user data; update task API accordingly
* Some cleanup of parser code touched by this commit
* Rename "create_parameters" to "merge_parameter_values" and improve


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/25ce830b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/25ce830b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/25ce830b

Branch: refs/heads/ARIA-149-functions-in-operation-configuration
Commit: 25ce830b77f8b76e3a30576ccb5b00d5f4acfe72
Parents: 07d7951
Author: Tal Liron 
Authored: Thu Apr 20 17:54:47 2017 -0500
Committer: Tal Liron 
Committed: Wed May 31 15:15:56 2017 -0500

--
 aria/cli/commands/services.py   |   2 +-
 aria/cli/execution_logging.py   |   6 +-
 aria/core.py|  14 +-
 aria/modeling/constraints.py|  28 +++
 aria/modeling/contraints.py |  28 ---
 aria/modeling/exceptions.py |  16 +-
 aria/modeling/orchestration.py  |  14 +-
 aria/modeling/service_common.py |   7 +-
 aria/modeling/service_instance.py   |  89 +---
 aria/modeling/service_template.py   |  67 +++---
 aria/modeling/utils.py  | 114 +-
 aria/orchestrator/__init__.py   |   7 +-
 aria/orchestrator/context/operation.py  |   4 +-
 aria/orchestrator/decorators.py |   3 +-
 .../execution_plugin/instantiation.py   | 139 +++-
 aria/orchestrator/workflow_runner.py|  17 +-
 aria/orchestrator/workflows/api/task.py |  89 +---
 .../workflows/builtin/execute_operation.py  |   2 +-
 aria/orchestrator/workflows/core/task.py|   5 +-
 aria/orchestrator/workflows/events_logging.py   |   6 +-
 aria/orchestrator/workflows/executor/base.py|   4 +-
 aria/orchestrator/workflows/executor/celery.py  |   6 +-
 aria/orchestrator/workflows/executor/dry.py |   6 +-
 aria/orchestrator/workflows/executor/process.py |  12 +-
 aria/orchestrator/workflows/executor/thread.py  |   6 +-
 aria/utils/formatting.py|   4 +-
 aria/utils/validation.py|   8 +-
 .../profiles/aria-1.0/aria-1.0.yaml |   8 -
 .../simple_v1_0/assignments.py  |   4 +-
 .../simple_v1_0/modeling/__init__.py|  72 +--
 .../simple_v1_0/modeling/artifacts.py   |   2 +-
 .../simple_v1_0/modeling/capabilities.py|  24 ++-
 .../simple_v1_0/modeling/constraints.py |   2 +-
 .../simple_v1_0/modeling/data_types.py  |  16 ++
 .../simple_v1_0/modeling/functions.py   |   4 +-
 .../simple_v1_0/modeling/interfaces.py  |  34 ++-
 .../simple_v1_0/modeling/parameters.py  | 211 +++
 .../simple_v1_0/modeling/policies.py|   2 +
 .../simple_v1_0/modeling/properties.py  | 202 --
 .../simple_v1_0/modeling/requirements.py|  20 +-
 .../modeling/substitution_mappings.py   |   4 +
 .../simple_v1_0/templates.py|  13 +-
 .../aria_extension_tosca/simple_v1_0/types.py   |  24 +--
 tests/cli/test_services.py  |  14 +-
 tests/mock/models.py|  10 +-
 tests/mock/topology.py  |  12 +-
 tests/modeling/test_models.py   |  12 +-
 tests/orchestrator/context/test_operation.py|  86 
 tests/orchestrator/context/test_serialize.py|   6 +-
 tests/orchestrator/context/test_toolbelt.py |  14 +-
 .../orchestrator/execution_plugin/test_local.py |  14 +-
 tests/orchestrator/execution_plugin/test_ssh.py |  16 +-
 tests/orchestrator/test_workflow_runner.py  |  16 +-
 tests/orchestrator/workflows/api/test_task.py   |  40 ++--
 .../workflows/builtin/test_execute_operation.py |   2 +-
 .../orchestrator/workflows/core/test_engine.py  |  44 ++--
 .../orchestrator/workflows/core/test_events.py  |   3 +-
 tests/orchestrator/workflows/core/test_task.py  |  10 +-
 

[2/3] incubator-ariatosca git commit: ARIA-149 Enhance operation configuration

2017-05-31 Thread emblemparade
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b602f145/extensions/aria_extension_tosca/simple_v1_0/modeling/capabilities.py
--
diff --git 
a/extensions/aria_extension_tosca/simple_v1_0/modeling/capabilities.py 
b/extensions/aria_extension_tosca/simple_v1_0/modeling/capabilities.py
index 6df7177..a90a9fc 100644
--- a/extensions/aria_extension_tosca/simple_v1_0/modeling/capabilities.py
+++ b/extensions/aria_extension_tosca/simple_v1_0/modeling/capabilities.py
@@ -16,8 +16,9 @@
 from aria.utils.collections import deepcopy_with_locators, OrderedDict
 from aria.parser.validation import Issue
 
-from .properties import (convert_property_definitions_to_values, 
merge_raw_property_definitions,
- get_assigned_and_defined_property_values)
+from .parameters import (convert_parameter_definitions_to_values, 
merge_raw_parameter_definitions,
+ get_assigned_and_defined_parameter_values)
+
 
 #
 # CapabilityType
@@ -38,6 +39,7 @@ def get_inherited_valid_source_types(context, presentation):
 
 return valid_source_types
 
+
 #
 # NodeType
 #
@@ -92,6 +94,7 @@ def get_inherited_capability_definitions(context, 
presentation, for_presentation
 
 return capability_definitions
 
+
 #
 # NodeTemplate
 #
@@ -127,8 +130,9 @@ def get_template_capabilities(context, presentation):
 capability_assignment = capability_assignments[capability_name]
 
 # Assign properties
-values = get_assigned_and_defined_property_values(context,
-  
our_capability_assignment)
+values = get_assigned_and_defined_parameter_values(context,
+   
our_capability_assignment,
+   'property')
 if values:
 capability_assignment._raw['properties'] = values
 else:
@@ -139,6 +143,7 @@ def get_template_capabilities(context, presentation):
 
 return capability_assignments
 
+
 #
 # Utils
 #
@@ -150,24 +155,25 @@ def 
convert_capability_from_definition_to_assignment(context, presentation, cont
 
 properties = presentation.properties
 if properties is not None:
-raw['properties'] = convert_property_definitions_to_values(context, 
properties)
+raw['properties'] = convert_parameter_definitions_to_values(context, 
properties)
 
 # TODO attributes
 
 return CapabilityAssignment(name=presentation._name, raw=raw, 
container=container)
 
+
 def merge_capability_definition_from_type(context, presentation, 
capability_definition):
 raw_properties = OrderedDict()
 
 # Merge properties from type
 the_type = capability_definition._get_type(context)
 type_property_defintions = the_type._get_properties(context)
-merge_raw_property_definitions(context, presentation, raw_properties, 
type_property_defintions,
-   'properties')
+merge_raw_parameter_definitions(context, presentation, raw_properties, 
type_property_defintions,
+'properties')
 
 # Merge our properties
-merge_raw_property_definitions(context, presentation, raw_properties,
-   capability_definition.properties, 
'properties')
+merge_raw_parameter_definitions(context, presentation, raw_properties,
+capability_definition.properties, 
'properties')
 
 if raw_properties:
 capability_definition._raw['properties'] = raw_properties

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b602f145/extensions/aria_extension_tosca/simple_v1_0/modeling/constraints.py
--
diff --git 
a/extensions/aria_extension_tosca/simple_v1_0/modeling/constraints.py 
b/extensions/aria_extension_tosca/simple_v1_0/modeling/constraints.py
index 7c99eab..9a30cc1 100644
--- a/extensions/aria_extension_tosca/simple_v1_0/modeling/constraints.py
+++ b/extensions/aria_extension_tosca/simple_v1_0/modeling/constraints.py
@@ -15,7 +15,7 @@
 
 import re
 
-from aria.modeling.contraints import NodeTemplateConstraint
+from aria.modeling.constraints import NodeTemplateConstraint
 from aria.modeling.utils import NodeTemplateContainerHolder
 from aria.modeling.functions import evaluate
 from aria.parser import implements_specification

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b602f145/extensions/aria_extension_tosca/simple_v1_0/modeling/data_types.py
--
diff --git a/extensions/aria_extension_tosca/simple_v1_0/modeling/data_types.py 
b/extensions/aria_extension_tosca/simple_v1_0/modeling/data_types.py
index 3952785..c0d79e5 100644
--- 

[3/3] incubator-ariatosca git commit: ARIA-149 Enhance operation configuration

2017-05-31 Thread emblemparade
ARIA-149 Enhance operation configuration

* Also fixes ARIA-121, ARIA-190
* Parse special "dependencies" configuration parameters as YAML and
  treat as Parameter models, allowing them full use of intrinsic
  functions, type coersions, and validations
* Rename various functions that process "properties" to more generically
  process "parameters" (properties, inputs, attributes, arguments, etc.)
* The "configuration" field in OperationTemplate and Operation models
  is now now a dict of Parameter models
* Add "function" and "arguments" fields to Operation model to preserve
  user data (in "implementation" and "inputs") and to clearly demarcate
  orchestration data from user data; update task API accordingly
* Some cleanup of parser code touched by this commit
* Rename "create_parameters" to "merge_parameter_values" and improve


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/b602f145
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/b602f145
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/b602f145

Branch: refs/heads/ARIA-149-functions-in-operation-configuration
Commit: b602f14554ae27853ea17c29a0c3f8f9f3fb37b6
Parents: 07d7951
Author: Tal Liron 
Authored: Thu Apr 20 17:54:47 2017 -0500
Committer: Tal Liron 
Committed: Wed May 31 15:09:11 2017 -0500

--
 aria/cli/commands/services.py   |   2 +-
 aria/cli/execution_logging.py   |   6 +-
 aria/core.py|  14 +-
 aria/modeling/constraints.py|  28 +++
 aria/modeling/contraints.py |  28 ---
 aria/modeling/exceptions.py |  16 +-
 aria/modeling/orchestration.py  |  14 +-
 aria/modeling/service_common.py |   7 +-
 aria/modeling/service_instance.py   |  89 +---
 aria/modeling/service_template.py   |  67 +++---
 aria/modeling/utils.py  | 114 +-
 aria/orchestrator/__init__.py   |   7 +-
 aria/orchestrator/context/operation.py  |   4 +-
 aria/orchestrator/decorators.py |   3 +-
 .../execution_plugin/instantiation.py   | 139 +++-
 aria/orchestrator/workflow_runner.py|  17 +-
 aria/orchestrator/workflows/api/task.py |  89 +---
 .../workflows/builtin/execute_operation.py  |   2 +-
 aria/orchestrator/workflows/core/task.py|   5 +-
 aria/orchestrator/workflows/events_logging.py   |   6 +-
 aria/orchestrator/workflows/executor/base.py|   4 +-
 aria/orchestrator/workflows/executor/celery.py  |   6 +-
 aria/orchestrator/workflows/executor/dry.py |   6 +-
 aria/orchestrator/workflows/executor/process.py |  12 +-
 aria/orchestrator/workflows/executor/thread.py  |   6 +-
 aria/utils/formatting.py|   4 +-
 aria/utils/validation.py|   8 +-
 .../profiles/aria-1.0/aria-1.0.yaml |   8 -
 .../simple_v1_0/assignments.py  |   4 +-
 .../simple_v1_0/modeling/__init__.py|  73 +--
 .../simple_v1_0/modeling/artifacts.py   |   2 +-
 .../simple_v1_0/modeling/capabilities.py|  24 ++-
 .../simple_v1_0/modeling/constraints.py |   2 +-
 .../simple_v1_0/modeling/data_types.py  |  16 ++
 .../simple_v1_0/modeling/functions.py   |   4 +-
 .../simple_v1_0/modeling/interfaces.py  |  34 ++-
 .../simple_v1_0/modeling/parameters.py  | 211 +++
 .../simple_v1_0/modeling/policies.py|   2 +
 .../simple_v1_0/modeling/properties.py  | 202 --
 .../simple_v1_0/modeling/requirements.py|  20 +-
 .../modeling/substitution_mappings.py   |   4 +
 .../simple_v1_0/templates.py|  13 +-
 .../aria_extension_tosca/simple_v1_0/types.py   |  24 +--
 tests/cli/test_services.py  |  14 +-
 tests/mock/models.py|  10 +-
 tests/mock/topology.py  |  12 +-
 tests/modeling/test_models.py   |  12 +-
 tests/orchestrator/context/test_operation.py|  86 
 tests/orchestrator/context/test_serialize.py|   6 +-
 tests/orchestrator/context/test_toolbelt.py |  14 +-
 .../orchestrator/execution_plugin/test_local.py |  14 +-
 tests/orchestrator/execution_plugin/test_ssh.py |  16 +-
 tests/orchestrator/test_workflow_runner.py  |  16 +-
 tests/orchestrator/workflows/api/test_task.py   |  40 ++--
 .../workflows/builtin/test_execute_operation.py |   2 +-
 .../orchestrator/workflows/core/test_engine.py  |  44 ++--
 .../orchestrator/workflows/core/test_events.py  |   3 +-
 tests/orchestrator/workflows/core/test_task.py  |  10 +-
 

[1/3] incubator-ariatosca git commit: ARIA-149 Enhance operation configuration [Forced Update!]

2017-05-31 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-149-functions-in-operation-configuration adf98c990 -> 
b602f1455 (forced update)


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b602f145/tests/orchestrator/workflows/api/test_task.py
--
diff --git a/tests/orchestrator/workflows/api/test_task.py 
b/tests/orchestrator/workflows/api/test_task.py
index 642c785..9d91b6b 100644
--- a/tests/orchestrator/workflows/api/test_task.py
+++ b/tests/orchestrator/workflows/api/test_task.py
@@ -44,15 +44,15 @@ class TestOperationTask(object):
 plugin = mock.models.create_plugin('test_plugin', '0.1')
 ctx.model.node.update(plugin)
 
-inputs = {'test_input': True}
+arguments = {'test_input': True}
 
 interface = mock.models.create_interface(
 ctx.service,
 interface_name,
 operation_name,
 operation_kwargs=dict(plugin=plugin,
-  implementation='op_path',
-  inputs=inputs),)
+  function='op_path',
+  arguments=arguments),)
 
 node = ctx.model.node.get_by_name(mock.models.DEPENDENT_NODE_NAME)
 node.interfaces[interface_name] = interface
@@ -66,7 +66,7 @@ class TestOperationTask(object):
 node,
 interface_name=interface_name,
 operation_name=operation_name,
-inputs=inputs,
+arguments=arguments,
 max_attempts=max_attempts,
 retry_interval=retry_interval,
 ignore_failure=ignore_failure)
@@ -77,9 +77,9 @@ class TestOperationTask(object):
 interface=interface_name,
 operation=operation_name
 )
-assert api_task.implementation == 'op_path'
+assert api_task.function == 'op_path'
 assert api_task.actor == node
-assert api_task.inputs['test_input'].value is True
+assert api_task.arguments['test_input'].value is True
 assert api_task.retry_interval == retry_interval
 assert api_task.max_attempts == max_attempts
 assert api_task.ignore_failure == ignore_failure
@@ -92,15 +92,15 @@ class TestOperationTask(object):
 plugin = mock.models.create_plugin('test_plugin', '0.1')
 ctx.model.plugin.update(plugin)
 
-inputs = {'test_input': True}
+arguments = {'test_input': True}
 
 interface = mock.models.create_interface(
 ctx.service,
 interface_name,
 operation_name,
 operation_kwargs=dict(plugin=plugin,
-  implementation='op_path',
-  inputs=inputs)
+  function='op_path',
+  arguments=arguments)
 )
 
 relationship = ctx.model.relationship.list()[0]
@@ -113,7 +113,7 @@ class TestOperationTask(object):
 relationship,
 interface_name=interface_name,
 operation_name=operation_name,
-inputs=inputs,
+arguments=arguments,
 max_attempts=max_attempts,
 retry_interval=retry_interval)
 
@@ -123,9 +123,9 @@ class TestOperationTask(object):
 interface=interface_name,
 operation=operation_name
 )
-assert api_task.implementation == 'op_path'
+assert api_task.function == 'op_path'
 assert api_task.actor == relationship
-assert api_task.inputs['test_input'].value is True
+assert api_task.arguments['test_input'].value is True
 assert api_task.retry_interval == retry_interval
 assert api_task.max_attempts == max_attempts
 assert api_task.plugin.name == 'test_plugin'
@@ -137,15 +137,15 @@ class TestOperationTask(object):
 plugin = mock.models.create_plugin('test_plugin', '0.1')
 ctx.model.node.update(plugin)
 
-inputs = {'test_input': True}
+arguments = {'test_input': True}
 
 interface = mock.models.create_interface(
 ctx.service,
 interface_name,
 operation_name,
 operation_kwargs=dict(plugin=plugin,
-  implementation='op_path',
-  inputs=inputs)
+  function='op_path',
+  arguments=arguments)
 )
 
 relationship = ctx.model.relationship.list()[0]
@@ -158,7 +158,7 @@ class TestOperationTask(object):
 relationship,
 interface_name=interface_name,
 operation_name=operation_name,
-inputs=inputs,
+arguments=arguments,
 max_attempts=max_attempts,
 

[1/2] incubator-ariatosca git commit: Fixes [Forced Update!]

2017-05-30 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-149-functions-in-operation-configuration fdec01ab0 -> 
adf98c990 (forced update)


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/adf98c99/tests/resources/service-templates/tosca-simple-1.0/node-cellar/node-cellar.yaml
--
diff --git 
a/tests/resources/service-templates/tosca-simple-1.0/node-cellar/node-cellar.yaml
 
b/tests/resources/service-templates/tosca-simple-1.0/node-cellar/node-cellar.yaml
index ee9e094..4d53f9b 100644
--- 
a/tests/resources/service-templates/tosca-simple-1.0/node-cellar/node-cellar.yaml
+++ 
b/tests/resources/service-templates/tosca-simple-1.0/node-cellar/node-cellar.yaml
@@ -311,7 +311,7 @@ policy_types:
   client connections cleanly and shut down services. 
 derived_from: aria.Workflow
 properties:
-  function:
+  implementation:
 type: string
 default: workflows.maintenance
   enabled:



[2/2] incubator-ariatosca git commit: Fixes

2017-05-30 Thread emblemparade
Fixes

* Rename implementation/inputs to function/arguments in Task API
* Rename "create_parameters" to "merge_parameter_values" and improve
* Change workflow "function" back to "implementation"


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/adf98c99
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/adf98c99
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/adf98c99

Branch: refs/heads/ARIA-149-functions-in-operation-configuration
Commit: adf98c990866b68ddc19cb66046350a169ed5118
Parents: 8fe7f4b
Author: Tal Liron 
Authored: Wed May 24 14:54:07 2017 -0500
Committer: Tal Liron 
Committed: Tue May 30 13:07:43 2017 -0500

--
 aria/cli/execution_logging.py   |   4 +-
 aria/modeling/exceptions.py |   6 +
 aria/modeling/orchestration.py  |  14 +--
 aria/modeling/service_instance.py   |  11 +-
 aria/modeling/service_template.py   |  25 ++--
 aria/modeling/utils.py  | 126 ++-
 aria/orchestrator/context/operation.py  |   4 +-
 .../execution_plugin/instantiation.py   |  12 +-
 aria/orchestrator/workflow_runner.py|  20 +--
 aria/orchestrator/workflows/api/task.py |  89 +
 .../workflows/builtin/execute_operation.py  |   2 +-
 aria/orchestrator/workflows/core/task.py|   4 +-
 aria/orchestrator/workflows/events_logging.py   |   8 +-
 aria/orchestrator/workflows/executor/base.py|   4 +-
 aria/orchestrator/workflows/executor/celery.py  |   6 +-
 aria/orchestrator/workflows/executor/dry.py |   6 +-
 aria/orchestrator/workflows/executor/process.py |  12 +-
 aria/orchestrator/workflows/executor/thread.py  |   6 +-
 aria/utils/formatting.py|   4 +-
 aria/utils/validation.py|   8 +-
 .../profiles/aria-1.0/aria-1.0.yaml |   8 +-
 .../simple_v1_0/modeling/__init__.py|  22 ++--
 .../simple_v1_0/modeling/functions.py   |   4 +-
 tests/modeling/test_models.py   |  12 +-
 tests/orchestrator/context/test_operation.py|  47 ---
 tests/orchestrator/context/test_serialize.py|   4 +-
 tests/orchestrator/context/test_toolbelt.py |   4 +-
 .../orchestrator/execution_plugin/test_local.py |   8 +-
 tests/orchestrator/execution_plugin/test_ssh.py |   6 +-
 tests/orchestrator/test_workflow_runner.py  |   8 +-
 tests/orchestrator/workflows/api/test_task.py   |  20 +--
 .../orchestrator/workflows/core/test_engine.py  |  40 +++---
 tests/orchestrator/workflows/core/test_task.py  |   4 +-
 .../test_task_graph_into_execution_graph.py |   4 +-
 .../orchestrator/workflows/executor/__init__.py |   6 +-
 .../workflows/executor/test_executor.py |  10 +-
 .../workflows/executor/test_process_executor.py |   2 +-
 ...process_executor_concurrent_modifications.py |   4 +-
 .../executor/test_process_executor_extension.py |  18 +--
 .../test_process_executor_tracked_changes.py|  14 +--
 .../node-cellar/node-cellar.yaml|   2 +-
 41 files changed, 338 insertions(+), 280 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/adf98c99/aria/cli/execution_logging.py
--
diff --git a/aria/cli/execution_logging.py b/aria/cli/execution_logging.py
index b23165f..b3252f0 100644
--- a/aria/cli/execution_logging.py
+++ b/aria/cli/execution_logging.py
@@ -105,8 +105,8 @@ def stylize_log(item, mark_pattern):
 # implementation
 if item.task:
 # operation task
-implementation = item.task.implementation
-inputs = dict(i.unwrap() for i in item.task.inputs.values())
+implementation = item.task.function
+inputs = dict(arg.unwrap() for arg in item.task.arguments.values())
 else:
 # execution task
 implementation = item.execution.workflow_name

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/adf98c99/aria/modeling/exceptions.py
--
diff --git a/aria/modeling/exceptions.py b/aria/modeling/exceptions.py
index d0e3e22..e784d1a 100644
--- a/aria/modeling/exceptions.py
+++ b/aria/modeling/exceptions.py
@@ -57,3 +57,9 @@ class UndeclaredParametersException(ParameterException):
 """
 ARIA modeling exception: Undeclared parameters have been provided.
 """
+
+
+class ForbiddenParameterNamesException(ParameterException):
+"""
+ARIA modeling exception: Forbidden parameter names have been used.
+"""


[3/5] incubator-ariatosca git commit: ARIA-149 Enhance operation configuration

2017-05-30 Thread emblemparade
ARIA-149 Enhance operation configuration

* Parse special "dependencies" configuration parameters as YAML and
  treat as Parameter models, allowing them full use of intrinsic
  functions, type coersions, and validations
* Rename various functions that process "properties" to more generically
  process "parameters" (properties, inputs, attributes, arguments, etc.)
* The "configuration" field in OperationTemplate and Operation models
  is now now a dict of Parameter models
* Added "function" and "arguments" fields to Operation model to preserve
  user data (in "implementation" and "inputs") and to clearly demarcate
  orchestration data from user data
* Some cleanup of parser code touched by this commit


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/8fe7f4b1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/8fe7f4b1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/8fe7f4b1

Branch: refs/heads/ARIA-149-functions-in-operation-configuration
Commit: 8fe7f4b1c89c44793a0db6cdb1e78c2722934334
Parents: 07d7951
Author: Tal Liron 
Authored: Thu Apr 20 17:54:47 2017 -0500
Committer: Tal Liron 
Committed: Tue May 30 13:03:04 2017 -0500

--
 aria/cli/commands/services.py   |   2 +-
 aria/core.py|  14 +-
 aria/modeling/constraints.py|  28 +++
 aria/modeling/contraints.py |  28 ---
 aria/modeling/exceptions.py |  16 +-
 aria/modeling/service_common.py |   4 +
 aria/modeling/service_instance.py   |  69 +++---
 aria/modeling/service_template.py   |  54 ++---
 aria/modeling/utils.py  | 105 -
 .../execution_plugin/instantiation.py   | 133 +++-
 aria/orchestrator/workflow_runner.py|   2 +-
 aria/orchestrator/workflows/api/task.py |   4 +-
 aria/orchestrator/workflows/core/task.py|   1 -
 .../profiles/aria-1.0/aria-1.0.yaml |  16 +-
 .../simple_v1_0/assignments.py  |   4 +-
 .../simple_v1_0/modeling/__init__.py|  65 --
 .../simple_v1_0/modeling/artifacts.py   |   2 +-
 .../simple_v1_0/modeling/capabilities.py|  24 ++-
 .../simple_v1_0/modeling/constraints.py |   2 +-
 .../simple_v1_0/modeling/data_types.py  |  16 ++
 .../simple_v1_0/modeling/interfaces.py  |  34 ++-
 .../simple_v1_0/modeling/parameters.py  | 211 +++
 .../simple_v1_0/modeling/policies.py|   2 +
 .../simple_v1_0/modeling/properties.py  | 202 --
 .../simple_v1_0/modeling/requirements.py|  20 +-
 .../modeling/substitution_mappings.py   |   4 +
 .../simple_v1_0/templates.py|  13 +-
 .../aria_extension_tosca/simple_v1_0/types.py   |  24 +--
 tests/cli/test_services.py  |  14 +-
 tests/mock/models.py|  10 +-
 tests/mock/topology.py  |  12 +-
 tests/orchestrator/context/test_operation.py|  53 +++--
 tests/orchestrator/context/test_serialize.py|   2 +-
 tests/orchestrator/context/test_toolbelt.py |  14 +-
 .../orchestrator/execution_plugin/test_local.py |  10 +-
 tests/orchestrator/execution_plugin/test_ssh.py |  12 +-
 tests/orchestrator/test_workflow_runner.py  |   8 +-
 tests/orchestrator/workflows/api/test_task.py   |  26 +--
 .../workflows/builtin/test_execute_operation.py |   2 +-
 .../orchestrator/workflows/core/test_engine.py  |   6 +-
 .../orchestrator/workflows/core/test_events.py  |   3 +-
 tests/orchestrator/workflows/core/test_task.py  |   6 +-
 .../test_task_graph_into_execution_graph.py |   2 +-
 ...process_executor_concurrent_modifications.py |  10 +-
 .../executor/test_process_executor_extension.py |  13 +-
 .../test_process_executor_tracked_changes.py|   8 +-
 .../node-cellar/node-cellar.yaml|  24 ++-
 47 files changed, 737 insertions(+), 597 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/8fe7f4b1/aria/cli/commands/services.py
--
diff --git a/aria/cli/commands/services.py b/aria/cli/commands/services.py
index 24de7c5..476387c 100644
--- a/aria/cli/commands/services.py
+++ b/aria/cli/commands/services.py
@@ -151,7 +151,7 @@ def create(service_template_name,
 except storage_exceptions.StorageError as e:
 utils.check_overriding_storage_exceptions(e, 'service', service_name)
 raise
-except modeling_exceptions.InputsException:
+except modeling_exceptions.ParameterException:
 

[2/5] incubator-ariatosca git commit: ARIA-149 Enhance operation configuration

2017-05-30 Thread emblemparade
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/8fe7f4b1/extensions/aria_extension_tosca/simple_v1_0/modeling/properties.py
--
diff --git a/extensions/aria_extension_tosca/simple_v1_0/modeling/properties.py 
b/extensions/aria_extension_tosca/simple_v1_0/modeling/properties.py
deleted file mode 100644
index 9c3ea42..000
--- a/extensions/aria_extension_tosca/simple_v1_0/modeling/properties.py
+++ /dev/null
@@ -1,202 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from aria.utils.collections import merge, deepcopy_with_locators, OrderedDict
-from aria.parser.presentation import Value
-from aria.parser.validation import Issue
-
-from .data_types import coerce_value
-
-#
-# ArtifactType, DataType, CapabilityType, RelationshipType, NodeType, 
GroupType, PolicyType
-#
-
-# Works on properties, parameters, inputs, and attributes
-def get_inherited_property_definitions(context, presentation, field_name, 
for_presentation=None):
-"""
-Returns our property definitions added on top of those of our parent, if 
we have one
-(recursively).
-
-Allows overriding all aspects of parent properties except data type.
-"""
-
-# Get definitions from parent
-# If we inherit from a primitive, it does not have a parent:
-parent = presentation._get_parent(context) if hasattr(presentation, 
'_get_parent') else None
-definitions = get_inherited_property_definitions(context, parent, 
field_name,
- 
for_presentation=presentation) \
- if parent is not None 
else OrderedDict()
-
-# Add/merge our definitions
-# If we inherit from a primitive, it does not have our field
-our_definitions = getattr(presentation, field_name, None)
-if our_definitions:
-our_definitions_clone = OrderedDict()
-for name, our_definition in our_definitions.iteritems():
-our_definitions_clone[name] = 
our_definition._clone(for_presentation)
-our_definitions = our_definitions_clone
-merge_property_definitions(context, presentation, definitions, 
our_definitions, field_name)
-
-for definition in definitions.itervalues():
-definition._reset_method_cache()
-
-return definitions
-
-#
-# NodeTemplate, RelationshipTemplate, GroupTemplate, PolicyTemplate
-#
-
-def get_assigned_and_defined_property_values(context, presentation, 
field_name='property',
- field_name_plural='properties'):
-"""
-Returns the assigned property values while making sure they are defined in 
our type.
-
-The property definition's default value, if available, will be used if we 
did not assign it.
-
-Makes sure that required properties indeed end up with a value.
-"""
-
-values = OrderedDict()
-
-the_type = presentation._get_type(context)
-assignments = getattr(presentation, field_name_plural)
-get_fn_name = '_get_{0}'.format(field_name_plural)
-definitions = getattr(the_type, get_fn_name)(context) if the_type is not 
None else None
-
-# Fill in our assignments, but make sure they are defined
-if assignments:
-for name, value in assignments.iteritems():
-if (definitions is not None) and (name in definitions):
-definition = definitions[name]
-values[name] = coerce_property_value(context, value, 
definition, value.value)
-else:
-context.validation.report('assignment to undefined {0} "{1}" 
in "{2}"'
-  .format(field_name, name, 
presentation._fullname),
-  locator=value._locator, 
level=Issue.BETWEEN_TYPES)
-
-# Fill in defaults from the definitions
-if definitions:
-for name, definition in definitions.iteritems():
-if values.get(name) is None:
-values[name] = coerce_property_value(context, presentation, 
definition,
- definition.default)
-
-validate_required_values(context, presentation, values, definitions)
-
-

[1/5] incubator-ariatosca git commit: ARIA-268 Add NOTICE file [Forced Update!]

2017-05-30 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-149-functions-in-operation-configuration dc2d69c98 -> 
fdec01ab0 (forced update)


ARIA-268 Add NOTICE file


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/07d79513
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/07d79513
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/07d79513

Branch: refs/heads/ARIA-149-functions-in-operation-configuration
Commit: 07d79513a4ac41ba66d84f2922a17fd0ab7ec39c
Parents: adf7607
Author: Ran Ziv 
Authored: Mon May 29 17:11:04 2017 +0300
Committer: Ran Ziv 
Committed: Mon May 29 17:11:04 2017 +0300

--
 NOTICE | 5 +
 1 file changed, 5 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/07d79513/NOTICE
--
diff --git a/NOTICE b/NOTICE
new file mode 100644
index 000..bf03ab5
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,5 @@
+Apache AriaTosca
+Copyright 2016-2017 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
\ No newline at end of file



[5/5] incubator-ariatosca git commit: Fixes

2017-05-30 Thread emblemparade
Fixes

* Rename implementation/inputs to function/arguments in Task API
* Rename "create_parameters" to "merge_parameter_values" and improve
* Change workflow "function" back to "implementation"


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/fdec01ab
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/fdec01ab
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/fdec01ab

Branch: refs/heads/ARIA-149-functions-in-operation-configuration
Commit: fdec01ab0f28152d1e8fb9cd8f73b6a063f556f5
Parents: 8fe7f4b
Author: Tal Liron 
Authored: Wed May 24 14:54:07 2017 -0500
Committer: Tal Liron 
Committed: Tue May 30 13:03:05 2017 -0500

--
 aria/cli/execution_logging.py   |   4 +-
 aria/modeling/exceptions.py |   6 +
 aria/modeling/orchestration.py  |  14 +--
 aria/modeling/service_instance.py   |  11 +-
 aria/modeling/service_template.py   |  25 ++--
 aria/modeling/utils.py  | 126 ++-
 aria/orchestrator/context/operation.py  |   4 +-
 .../execution_plugin/instantiation.py   |  12 +-
 aria/orchestrator/workflow_runner.py|  20 +--
 aria/orchestrator/workflows/api/task.py |  89 +
 .../workflows/builtin/execute_operation.py  |   2 +-
 aria/orchestrator/workflows/core/task.py|   4 +-
 aria/orchestrator/workflows/events_logging.py   |   8 +-
 aria/orchestrator/workflows/executor/base.py|   4 +-
 aria/orchestrator/workflows/executor/celery.py  |   6 +-
 aria/orchestrator/workflows/executor/dry.py |   6 +-
 aria/orchestrator/workflows/executor/process.py |  12 +-
 aria/orchestrator/workflows/executor/thread.py  |   6 +-
 aria/utils/formatting.py|   4 +-
 aria/utils/validation.py|   8 +-
 .../profiles/aria-1.0/aria-1.0.yaml |   8 +-
 .../simple_v1_0/modeling/__init__.py|  22 ++--
 .../simple_v1_0/modeling/functions.py   |   6 +-
 tests/modeling/test_models.py   |  12 +-
 tests/orchestrator/context/test_operation.py|  47 ---
 tests/orchestrator/context/test_serialize.py|   4 +-
 tests/orchestrator/context/test_toolbelt.py |   4 +-
 .../orchestrator/execution_plugin/test_local.py |   8 +-
 tests/orchestrator/execution_plugin/test_ssh.py |   6 +-
 tests/orchestrator/test_workflow_runner.py  |   8 +-
 tests/orchestrator/workflows/api/test_task.py   |  20 +--
 .../orchestrator/workflows/core/test_engine.py  |  40 +++---
 tests/orchestrator/workflows/core/test_task.py  |   4 +-
 .../test_task_graph_into_execution_graph.py |   4 +-
 .../orchestrator/workflows/executor/__init__.py |   6 +-
 .../workflows/executor/test_executor.py |  10 +-
 .../workflows/executor/test_process_executor.py |   2 +-
 ...process_executor_concurrent_modifications.py |   4 +-
 .../executor/test_process_executor_extension.py |  18 +--
 .../test_process_executor_tracked_changes.py|  14 +--
 .../node-cellar/node-cellar.yaml|   2 +-
 41 files changed, 340 insertions(+), 280 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/fdec01ab/aria/cli/execution_logging.py
--
diff --git a/aria/cli/execution_logging.py b/aria/cli/execution_logging.py
index b23165f..b3252f0 100644
--- a/aria/cli/execution_logging.py
+++ b/aria/cli/execution_logging.py
@@ -105,8 +105,8 @@ def stylize_log(item, mark_pattern):
 # implementation
 if item.task:
 # operation task
-implementation = item.task.implementation
-inputs = dict(i.unwrap() for i in item.task.inputs.values())
+implementation = item.task.function
+inputs = dict(arg.unwrap() for arg in item.task.arguments.values())
 else:
 # execution task
 implementation = item.execution.workflow_name

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/fdec01ab/aria/modeling/exceptions.py
--
diff --git a/aria/modeling/exceptions.py b/aria/modeling/exceptions.py
index d0e3e22..e784d1a 100644
--- a/aria/modeling/exceptions.py
+++ b/aria/modeling/exceptions.py
@@ -57,3 +57,9 @@ class UndeclaredParametersException(ParameterException):
 """
 ARIA modeling exception: Undeclared parameters have been provided.
 """
+
+
+class ForbiddenParameterNamesException(ParameterException):
+"""
+ARIA modeling exception: Forbidden parameter names have been used.
+"""


[4/5] incubator-ariatosca git commit: Fixes

2017-05-30 Thread emblemparade
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/fdec01ab/tests/resources/service-templates/tosca-simple-1.0/node-cellar/node-cellar.yaml
--
diff --git 
a/tests/resources/service-templates/tosca-simple-1.0/node-cellar/node-cellar.yaml
 
b/tests/resources/service-templates/tosca-simple-1.0/node-cellar/node-cellar.yaml
index ee9e094..4d53f9b 100644
--- 
a/tests/resources/service-templates/tosca-simple-1.0/node-cellar/node-cellar.yaml
+++ 
b/tests/resources/service-templates/tosca-simple-1.0/node-cellar/node-cellar.yaml
@@ -311,7 +311,7 @@ policy_types:
   client connections cleanly and shut down services. 
 derived_from: aria.Workflow
 properties:
-  function:
+  implementation:
 type: string
 default: workflows.maintenance
   enabled:



[2/2] incubator-ariatosca git commit: Fixes

2017-05-30 Thread emblemparade
Fixes

* Rename implementation/inputs to function/arguments in Task API
* Rename "create_parameters" to "merge_parameter_values" and improve
* Change workflow "function" back to "implementation"


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/dc2d69c9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/dc2d69c9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/dc2d69c9

Branch: refs/heads/ARIA-149-functions-in-operation-configuration
Commit: dc2d69c98a9c83f98ccec4b1f33a9c3d7fe484a0
Parents: f6ee65a
Author: Tal Liron 
Authored: Wed May 24 14:54:07 2017 -0500
Committer: Tal Liron 
Committed: Tue May 30 13:00:27 2017 -0500

--
 aria/cli/execution_logging.py   |   4 +-
 aria/modeling/exceptions.py |   6 +
 aria/modeling/orchestration.py  |  14 +--
 aria/modeling/service_instance.py   |  11 +-
 aria/modeling/service_template.py   |  25 ++--
 aria/modeling/utils.py  | 126 ++-
 aria/orchestrator/context/operation.py  |   4 +-
 .../execution_plugin/instantiation.py   |  12 +-
 aria/orchestrator/workflow_runner.py|  20 +--
 aria/orchestrator/workflows/api/task.py |  89 +
 .../workflows/builtin/execute_operation.py  |   2 +-
 aria/orchestrator/workflows/core/task.py|   4 +-
 aria/orchestrator/workflows/events_logging.py   |   8 +-
 aria/orchestrator/workflows/executor/base.py|   4 +-
 aria/orchestrator/workflows/executor/celery.py  |   6 +-
 aria/orchestrator/workflows/executor/dry.py |   6 +-
 aria/orchestrator/workflows/executor/process.py |  12 +-
 aria/orchestrator/workflows/executor/thread.py  |   6 +-
 aria/utils/formatting.py|   4 +-
 aria/utils/validation.py|   8 +-
 .../profiles/aria-1.0/aria-1.0.yaml |   8 +-
 .../simple_v1_0/modeling/__init__.py|  22 ++--
 .../simple_v1_0/modeling/functions.py   |   6 +-
 tests/modeling/test_models.py   |  12 +-
 tests/orchestrator/context/test_operation.py|  47 ---
 tests/orchestrator/context/test_serialize.py|   4 +-
 tests/orchestrator/context/test_toolbelt.py |   4 +-
 .../orchestrator/execution_plugin/test_local.py |   8 +-
 tests/orchestrator/execution_plugin/test_ssh.py |   6 +-
 tests/orchestrator/test_workflow_runner.py  |   8 +-
 tests/orchestrator/workflows/api/test_task.py   |  20 +--
 .../orchestrator/workflows/core/test_engine.py  |  40 +++---
 tests/orchestrator/workflows/core/test_task.py  |   4 +-
 .../test_task_graph_into_execution_graph.py |   4 +-
 .../orchestrator/workflows/executor/__init__.py |   6 +-
 .../workflows/executor/test_executor.py |  10 +-
 .../workflows/executor/test_process_executor.py |   2 +-
 ...process_executor_concurrent_modifications.py |   4 +-
 .../executor/test_process_executor_extension.py |  18 +--
 .../test_process_executor_tracked_changes.py|  14 +--
 .../node-cellar/node-cellar.yaml|   2 +-
 41 files changed, 340 insertions(+), 280 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/dc2d69c9/aria/cli/execution_logging.py
--
diff --git a/aria/cli/execution_logging.py b/aria/cli/execution_logging.py
index b23165f..b3252f0 100644
--- a/aria/cli/execution_logging.py
+++ b/aria/cli/execution_logging.py
@@ -105,8 +105,8 @@ def stylize_log(item, mark_pattern):
 # implementation
 if item.task:
 # operation task
-implementation = item.task.implementation
-inputs = dict(i.unwrap() for i in item.task.inputs.values())
+implementation = item.task.function
+inputs = dict(arg.unwrap() for arg in item.task.arguments.values())
 else:
 # execution task
 implementation = item.execution.workflow_name

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/dc2d69c9/aria/modeling/exceptions.py
--
diff --git a/aria/modeling/exceptions.py b/aria/modeling/exceptions.py
index d0e3e22..e784d1a 100644
--- a/aria/modeling/exceptions.py
+++ b/aria/modeling/exceptions.py
@@ -57,3 +57,9 @@ class UndeclaredParametersException(ParameterException):
 """
 ARIA modeling exception: Undeclared parameters have been provided.
 """
+
+
+class ForbiddenParameterNamesException(ParameterException):
+"""
+ARIA modeling exception: Forbidden parameter names have been used.
+"""


[1/2] incubator-ariatosca git commit: Fixes [Forced Update!]

2017-05-30 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-149-functions-in-operation-configuration b86cf82a6 -> 
dc2d69c98 (forced update)


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/dc2d69c9/tests/resources/service-templates/tosca-simple-1.0/node-cellar/node-cellar.yaml
--
diff --git 
a/tests/resources/service-templates/tosca-simple-1.0/node-cellar/node-cellar.yaml
 
b/tests/resources/service-templates/tosca-simple-1.0/node-cellar/node-cellar.yaml
index ee9e094..4d53f9b 100644
--- 
a/tests/resources/service-templates/tosca-simple-1.0/node-cellar/node-cellar.yaml
+++ 
b/tests/resources/service-templates/tosca-simple-1.0/node-cellar/node-cellar.yaml
@@ -311,7 +311,7 @@ policy_types:
   client connections cleanly and shut down services. 
 derived_from: aria.Workflow
 properties:
-  function:
+  implementation:
 type: string
 default: workflows.maintenance
   enabled:



incubator-ariatosca git commit: Fixes [Forced Update!]

2017-05-26 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-149-functions-in-operation-configuration 888c5cd6f -> 
b86cf82a6 (forced update)


Fixes

* Rename implementation/inputs to function/arguments in Task API
* Rename "create_parameters" to "merge_parameter_values" and improve
* Change workflow "function" back to "implementation"


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/b86cf82a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/b86cf82a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/b86cf82a

Branch: refs/heads/ARIA-149-functions-in-operation-configuration
Commit: b86cf82a667503f493b40ba29f0aaceb592a4bff
Parents: f6ee65a
Author: Tal Liron 
Authored: Wed May 24 14:54:07 2017 -0500
Committer: Tal Liron 
Committed: Fri May 26 16:02:23 2017 -0500

--
 aria/cli/execution_logging.py   |   4 +-
 aria/modeling/exceptions.py |   6 +
 aria/modeling/orchestration.py  |  14 +--
 aria/modeling/service_instance.py   |  11 +-
 aria/modeling/service_template.py   |  25 ++--
 aria/modeling/utils.py  | 126 ++-
 aria/orchestrator/context/operation.py  |   4 +-
 .../execution_plugin/instantiation.py   |   2 +-
 aria/orchestrator/workflow_runner.py|  20 +--
 aria/orchestrator/workflows/api/task.py |  89 +
 .../workflows/builtin/execute_operation.py  |   2 +-
 aria/orchestrator/workflows/core/task.py|   4 +-
 aria/orchestrator/workflows/events_logging.py   |   8 +-
 aria/orchestrator/workflows/executor/base.py|   4 +-
 aria/orchestrator/workflows/executor/celery.py  |   6 +-
 aria/orchestrator/workflows/executor/dry.py |   6 +-
 aria/orchestrator/workflows/executor/process.py |  12 +-
 aria/orchestrator/workflows/executor/thread.py  |   6 +-
 aria/utils/formatting.py|   4 +-
 aria/utils/validation.py|   8 +-
 .../profiles/aria-1.0/aria-1.0.yaml |   8 +-
 .../simple_v1_0/modeling/__init__.py|  22 ++--
 tests/modeling/test_models.py   |  12 +-
 tests/orchestrator/context/test_operation.py|  47 ---
 tests/orchestrator/context/test_serialize.py|   4 +-
 tests/orchestrator/context/test_toolbelt.py |   4 +-
 .../orchestrator/execution_plugin/test_local.py |   8 +-
 tests/orchestrator/execution_plugin/test_ssh.py |   6 +-
 tests/orchestrator/test_workflow_runner.py  |   8 +-
 tests/orchestrator/workflows/api/test_task.py   |  20 +--
 .../orchestrator/workflows/core/test_engine.py  |  40 +++---
 tests/orchestrator/workflows/core/test_task.py  |   4 +-
 .../test_task_graph_into_execution_graph.py |   4 +-
 .../orchestrator/workflows/executor/__init__.py |   6 +-
 .../workflows/executor/test_executor.py |  10 +-
 .../workflows/executor/test_process_executor.py |   2 +-
 ...process_executor_concurrent_modifications.py |   4 +-
 .../executor/test_process_executor_extension.py |  18 +--
 .../test_process_executor_tracked_changes.py|  14 +--
 .../node-cellar/node-cellar.yaml|   2 +-
 40 files changed, 329 insertions(+), 275 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b86cf82a/aria/cli/execution_logging.py
--
diff --git a/aria/cli/execution_logging.py b/aria/cli/execution_logging.py
index b23165f..b3252f0 100644
--- a/aria/cli/execution_logging.py
+++ b/aria/cli/execution_logging.py
@@ -105,8 +105,8 @@ def stylize_log(item, mark_pattern):
 # implementation
 if item.task:
 # operation task
-implementation = item.task.implementation
-inputs = dict(i.unwrap() for i in item.task.inputs.values())
+implementation = item.task.function
+inputs = dict(arg.unwrap() for arg in item.task.arguments.values())
 else:
 # execution task
 implementation = item.execution.workflow_name

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b86cf82a/aria/modeling/exceptions.py
--
diff --git a/aria/modeling/exceptions.py b/aria/modeling/exceptions.py
index d0e3e22..e784d1a 100644
--- a/aria/modeling/exceptions.py
+++ b/aria/modeling/exceptions.py
@@ -57,3 +57,9 @@ class UndeclaredParametersException(ParameterException):
 """
 ARIA modeling exception: Undeclared parameters have been provided.
 """
+
+
+class ForbiddenParameterNamesException(ParameterException):
+"""
+ARIA modeling exception: Forbidden parameter names have been used.
+"""


[3/7] incubator-ariatosca git commit: ARIA-258 Convert runtime_properties to attributes

2017-05-26 Thread emblemparade
ARIA-258 Convert runtime_properties to attributes


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/50b997e3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/50b997e3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/50b997e3

Branch: refs/heads/ARIA-149-functions-in-operation-configuration
Commit: 50b997e3bfbaf26df5e66327d30fe8a015b92dd7
Parents: 0c98684
Author: max-orlov 
Authored: Sun May 14 22:38:39 2017 +0300
Committer: max-orlov 
Committed: Thu May 25 18:30:21 2017 +0300

--
 aria/cli/commands/nodes.py  |   6 +-
 aria/modeling/service_common.py |   9 +-
 aria/modeling/service_instance.py   |   8 +-
 aria/modeling/service_template.py   |   1 -
 aria/modeling/types.py  |  20 -
 .../context/collection_instrumentation.py   | 242 
 aria/orchestrator/context/operation.py  |  13 +-
 aria/orchestrator/context/toolbelt.py   |   5 +-
 .../execution_plugin/ctx_proxy/server.py|   1 -
 aria/orchestrator/workflows/core/engine.py  |   1 -
 aria/orchestrator/workflows/executor/process.py | 125 +-
 aria/storage/instrumentation.py | 282 -
 tests/helpers.py|  10 +
 tests/mock/models.py|   7 +-
 tests/modeling/test_mixins.py   |   1 -
 tests/modeling/test_models.py   |  28 +-
 .../context/test_collection_instrumentation.py  | 253 
 tests/orchestrator/context/test_operation.py|  90 -
 tests/orchestrator/context/test_toolbelt.py |   5 +-
 .../orchestrator/execution_plugin/test_local.py |  66 ++--
 tests/orchestrator/execution_plugin/test_ssh.py |  36 +-
 tests/orchestrator/workflows/core/test_task.py  |   2 +-
 .../orchestrator/workflows/executor/__init__.py |   4 +
 ...process_executor_concurrent_modifications.py |  67 ++--
 .../executor/test_process_executor_extension.py |   6 +-
 .../test_process_executor_tracked_changes.py|  56 ++-
 tests/resources/scripts/test_ssh.sh |  30 +-
 tests/storage/test_instrumentation.py   | 396 ---
 28 files changed, 786 insertions(+), 984 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/50b997e3/aria/cli/commands/nodes.py
--
diff --git a/aria/cli/commands/nodes.py b/aria/cli/commands/nodes.py
index e43493f..1bbefe6 100644
--- a/aria/cli/commands/nodes.py
+++ b/aria/cli/commands/nodes.py
@@ -47,9 +47,9 @@ def show(node_id, model_storage, logger):
 
 # print node attributes
 logger.info('Node attributes:')
-if node.runtime_properties:
-for prop_name, prop_value in node.runtime_properties.iteritems():
-logger.info('\t{0}: {1}'.format(prop_name, prop_value))
+if node.attributes:
+for param_name, param in node.attributes.iteritems():
+logger.info('\t{0}: {1}'.format(param_name, param.value))
 else:
 logger.info('\tNo attributes')
 

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/50b997e3/aria/modeling/service_common.py
--
diff --git a/aria/modeling/service_common.py b/aria/modeling/service_common.py
index e9c96a4..ef19c8e 100644
--- a/aria/modeling/service_common.py
+++ b/aria/modeling/service_common.py
@@ -218,14 +218,13 @@ class ParameterBase(TemplateModelMixin, 
caching.HasCachedMethods):
 :type description: basestring
 """
 
-from . import models
 type_name = canonical_type_name(value)
 if type_name is None:
 type_name = full_type_name(value)
-return models.Parameter(name=name, # pylint: 
disable=unexpected-keyword-arg
-type_name=type_name,
-value=value,
-description=description)
+return cls(name=name, # pylint: disable=unexpected-keyword-arg
+   type_name=type_name,
+   value=value,
+   description=description)
 
 
 class TypeBase(InstanceModelMixin):

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/50b997e3/aria/modeling/service_instance.py
--
diff --git a/aria/modeling/service_instance.py 
b/aria/modeling/service_instance.py
index 41a388d..7058969 100644
--- a/aria/modeling/service_instance.py
+++ b/aria/modeling/service_instance.py
@@ -333,8 +333,6 @@ class NodeBase(InstanceModelMixin):
 :vartype 

[5/7] incubator-ariatosca git commit: ARIA-149 Enhance operation configuration

2017-05-26 Thread emblemparade
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/f6ee65a9/extensions/aria_extension_tosca/simple_v1_0/modeling/properties.py
--
diff --git a/extensions/aria_extension_tosca/simple_v1_0/modeling/properties.py 
b/extensions/aria_extension_tosca/simple_v1_0/modeling/properties.py
deleted file mode 100644
index 9c3ea42..000
--- a/extensions/aria_extension_tosca/simple_v1_0/modeling/properties.py
+++ /dev/null
@@ -1,202 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from aria.utils.collections import merge, deepcopy_with_locators, OrderedDict
-from aria.parser.presentation import Value
-from aria.parser.validation import Issue
-
-from .data_types import coerce_value
-
-#
-# ArtifactType, DataType, CapabilityType, RelationshipType, NodeType, 
GroupType, PolicyType
-#
-
-# Works on properties, parameters, inputs, and attributes
-def get_inherited_property_definitions(context, presentation, field_name, 
for_presentation=None):
-"""
-Returns our property definitions added on top of those of our parent, if 
we have one
-(recursively).
-
-Allows overriding all aspects of parent properties except data type.
-"""
-
-# Get definitions from parent
-# If we inherit from a primitive, it does not have a parent:
-parent = presentation._get_parent(context) if hasattr(presentation, 
'_get_parent') else None
-definitions = get_inherited_property_definitions(context, parent, 
field_name,
- 
for_presentation=presentation) \
- if parent is not None 
else OrderedDict()
-
-# Add/merge our definitions
-# If we inherit from a primitive, it does not have our field
-our_definitions = getattr(presentation, field_name, None)
-if our_definitions:
-our_definitions_clone = OrderedDict()
-for name, our_definition in our_definitions.iteritems():
-our_definitions_clone[name] = 
our_definition._clone(for_presentation)
-our_definitions = our_definitions_clone
-merge_property_definitions(context, presentation, definitions, 
our_definitions, field_name)
-
-for definition in definitions.itervalues():
-definition._reset_method_cache()
-
-return definitions
-
-#
-# NodeTemplate, RelationshipTemplate, GroupTemplate, PolicyTemplate
-#
-
-def get_assigned_and_defined_property_values(context, presentation, 
field_name='property',
- field_name_plural='properties'):
-"""
-Returns the assigned property values while making sure they are defined in 
our type.
-
-The property definition's default value, if available, will be used if we 
did not assign it.
-
-Makes sure that required properties indeed end up with a value.
-"""
-
-values = OrderedDict()
-
-the_type = presentation._get_type(context)
-assignments = getattr(presentation, field_name_plural)
-get_fn_name = '_get_{0}'.format(field_name_plural)
-definitions = getattr(the_type, get_fn_name)(context) if the_type is not 
None else None
-
-# Fill in our assignments, but make sure they are defined
-if assignments:
-for name, value in assignments.iteritems():
-if (definitions is not None) and (name in definitions):
-definition = definitions[name]
-values[name] = coerce_property_value(context, value, 
definition, value.value)
-else:
-context.validation.report('assignment to undefined {0} "{1}" 
in "{2}"'
-  .format(field_name, name, 
presentation._fullname),
-  locator=value._locator, 
level=Issue.BETWEEN_TYPES)
-
-# Fill in defaults from the definitions
-if definitions:
-for name, definition in definitions.iteritems():
-if values.get(name) is None:
-values[name] = coerce_property_value(context, presentation, 
definition,
- definition.default)
-
-validate_required_values(context, presentation, values, definitions)
-
-

[6/7] incubator-ariatosca git commit: ARIA-149 Enhance operation configuration

2017-05-26 Thread emblemparade
ARIA-149 Enhance operation configuration

* Parse special "dependencies" configuration parameters as YAML and
  treat as Parameter models, allowing them full use of intrinsic
  functions, type coersions, and validations
* Rename various functions that process "properties" to more generically
  process "parameters" (properties, inputs, attributes, arguments, etc.)
* The "configuration" field in OperationTemplate and Operation models
  is now now a dict of Parameter models
* Added "function" and "arguments" fields to Operation model to preserve
  user data (in "implementation" and "inputs") and to clearly demarcate
  orchestration data from user data
* Some cleanup of parser code touched by this commit


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/f6ee65a9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/f6ee65a9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/f6ee65a9

Branch: refs/heads/ARIA-149-functions-in-operation-configuration
Commit: f6ee65a9eaa8eb252c4431152327635a43dff425
Parents: adf7607
Author: Tal Liron 
Authored: Thu Apr 20 17:54:47 2017 -0500
Committer: Tal Liron 
Committed: Fri May 26 12:41:30 2017 -0500

--
 aria/cli/commands/services.py   |   2 +-
 aria/core.py|  14 +-
 aria/modeling/constraints.py|  28 +++
 aria/modeling/contraints.py |  28 ---
 aria/modeling/exceptions.py |  16 +-
 aria/modeling/service_common.py |   4 +
 aria/modeling/service_instance.py   |  69 +++---
 aria/modeling/service_template.py   |  54 ++---
 aria/modeling/utils.py  | 105 -
 .../execution_plugin/instantiation.py   | 133 +++-
 aria/orchestrator/workflow_runner.py|   2 +-
 aria/orchestrator/workflows/api/task.py |   4 +-
 aria/orchestrator/workflows/core/task.py|   1 -
 .../profiles/aria-1.0/aria-1.0.yaml |  16 +-
 .../simple_v1_0/assignments.py  |   4 +-
 .../simple_v1_0/modeling/__init__.py|  65 --
 .../simple_v1_0/modeling/artifacts.py   |   2 +-
 .../simple_v1_0/modeling/capabilities.py|  24 ++-
 .../simple_v1_0/modeling/constraints.py |   2 +-
 .../simple_v1_0/modeling/data_types.py  |  16 ++
 .../simple_v1_0/modeling/interfaces.py  |  34 ++-
 .../simple_v1_0/modeling/parameters.py  | 211 +++
 .../simple_v1_0/modeling/policies.py|   2 +
 .../simple_v1_0/modeling/properties.py  | 202 --
 .../simple_v1_0/modeling/requirements.py|  20 +-
 .../modeling/substitution_mappings.py   |   4 +
 .../simple_v1_0/templates.py|  13 +-
 .../aria_extension_tosca/simple_v1_0/types.py   |  24 +--
 tests/cli/test_services.py  |  14 +-
 tests/mock/models.py|  10 +-
 tests/mock/topology.py  |  12 +-
 tests/orchestrator/context/test_operation.py|  53 +++--
 tests/orchestrator/context/test_serialize.py|   2 +-
 tests/orchestrator/context/test_toolbelt.py |  14 +-
 .../orchestrator/execution_plugin/test_local.py |  10 +-
 tests/orchestrator/execution_plugin/test_ssh.py |  12 +-
 tests/orchestrator/test_workflow_runner.py  |   8 +-
 tests/orchestrator/workflows/api/test_task.py   |  26 +--
 .../workflows/builtin/test_execute_operation.py |   2 +-
 .../orchestrator/workflows/core/test_engine.py  |   6 +-
 .../orchestrator/workflows/core/test_events.py  |   3 +-
 tests/orchestrator/workflows/core/test_task.py  |   6 +-
 .../test_task_graph_into_execution_graph.py |   2 +-
 ...process_executor_concurrent_modifications.py |  10 +-
 .../executor/test_process_executor_extension.py |  13 +-
 .../test_process_executor_tracked_changes.py|   8 +-
 .../node-cellar/node-cellar.yaml|  24 ++-
 47 files changed, 737 insertions(+), 597 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/f6ee65a9/aria/cli/commands/services.py
--
diff --git a/aria/cli/commands/services.py b/aria/cli/commands/services.py
index 24de7c5..476387c 100644
--- a/aria/cli/commands/services.py
+++ b/aria/cli/commands/services.py
@@ -151,7 +151,7 @@ def create(service_template_name,
 except storage_exceptions.StorageError as e:
 utils.check_overriding_storage_exceptions(e, 'service', service_name)
 raise
-except modeling_exceptions.InputsException:
+except modeling_exceptions.ParameterException:
 

[7/7] incubator-ariatosca git commit: Fixes

2017-05-26 Thread emblemparade
Fixes

* Rename implementation/inputs to function/arguments in Task API
* Rename "create_parameters" to "merge_parameter_values" and improve
* Change workflow "function" back to "implementation"


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/888c5cd6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/888c5cd6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/888c5cd6

Branch: refs/heads/ARIA-149-functions-in-operation-configuration
Commit: 888c5cd6f86a12e096a8ce040aedd0f62c5eac0e
Parents: f6ee65a
Author: Tal Liron 
Authored: Wed May 24 14:54:07 2017 -0500
Committer: Tal Liron 
Committed: Fri May 26 12:45:07 2017 -0500

--
 aria/cli/execution_logging.py   |   4 +-
 aria/modeling/exceptions.py |   6 +
 aria/modeling/orchestration.py  |  14 +--
 aria/modeling/service_instance.py   |  11 +-
 aria/modeling/service_template.py   |  25 ++--
 aria/modeling/utils.py  | 126 ++-
 aria/orchestrator/context/operation.py  |   4 +-
 .../execution_plugin/instantiation.py   |   2 +-
 aria/orchestrator/workflow_runner.py|  20 +--
 aria/orchestrator/workflows/api/task.py |  89 +
 .../workflows/builtin/execute_operation.py  |   2 +-
 aria/orchestrator/workflows/core/task.py|   4 +-
 aria/orchestrator/workflows/events_logging.py   |   8 +-
 aria/orchestrator/workflows/executor/base.py|   4 +-
 aria/orchestrator/workflows/executor/celery.py  |   6 +-
 aria/orchestrator/workflows/executor/dry.py |   6 +-
 aria/orchestrator/workflows/executor/process.py |  12 +-
 aria/orchestrator/workflows/executor/thread.py  |   6 +-
 aria/utils/formatting.py|   4 +-
 aria/utils/validation.py|   8 +-
 .../profiles/aria-1.0/aria-1.0.yaml |   8 +-
 .../simple_v1_0/modeling/__init__.py|  22 ++--
 tests/modeling/test_models.py   |  12 +-
 tests/orchestrator/context/test_operation.py|  47 ---
 tests/orchestrator/context/test_serialize.py|   4 +-
 tests/orchestrator/context/test_toolbelt.py |   4 +-
 .../orchestrator/execution_plugin/test_local.py |   8 +-
 tests/orchestrator/execution_plugin/test_ssh.py |   6 +-
 tests/orchestrator/test_workflow_runner.py  |   8 +-
 tests/orchestrator/workflows/api/test_task.py   |  20 +--
 .../orchestrator/workflows/core/test_engine.py  |  40 +++---
 tests/orchestrator/workflows/core/test_task.py  |   4 +-
 .../test_task_graph_into_execution_graph.py |   4 +-
 .../orchestrator/workflows/executor/__init__.py |   6 +-
 .../workflows/executor/test_executor.py |  10 +-
 .../workflows/executor/test_process_executor.py |   2 +-
 ...process_executor_concurrent_modifications.py |   4 +-
 .../executor/test_process_executor_extension.py |  21 +++-
 .../test_process_executor_tracked_changes.py|  23 +++-
 .../node-cellar/node-cellar.yaml|   2 +-
 40 files changed, 350 insertions(+), 266 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/888c5cd6/aria/cli/execution_logging.py
--
diff --git a/aria/cli/execution_logging.py b/aria/cli/execution_logging.py
index b23165f..b3252f0 100644
--- a/aria/cli/execution_logging.py
+++ b/aria/cli/execution_logging.py
@@ -105,8 +105,8 @@ def stylize_log(item, mark_pattern):
 # implementation
 if item.task:
 # operation task
-implementation = item.task.implementation
-inputs = dict(i.unwrap() for i in item.task.inputs.values())
+implementation = item.task.function
+inputs = dict(arg.unwrap() for arg in item.task.arguments.values())
 else:
 # execution task
 implementation = item.execution.workflow_name

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/888c5cd6/aria/modeling/exceptions.py
--
diff --git a/aria/modeling/exceptions.py b/aria/modeling/exceptions.py
index d0e3e22..e784d1a 100644
--- a/aria/modeling/exceptions.py
+++ b/aria/modeling/exceptions.py
@@ -57,3 +57,9 @@ class UndeclaredParametersException(ParameterException):
 """
 ARIA modeling exception: Undeclared parameters have been provided.
 """
+
+
+class ForbiddenParameterNamesException(ParameterException):
+"""
+ARIA modeling exception: Forbidden parameter names have been used.
+"""

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/888c5cd6/aria/modeling/orchestration.py

[4/7] incubator-ariatosca git commit: ARIA-261 Single-source ARIA version

2017-05-26 Thread emblemparade
ARIA-261 Single-source ARIA version


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/adf76079
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/adf76079
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/adf76079

Branch: refs/heads/ARIA-149-functions-in-operation-configuration
Commit: adf76079568b6ccaf89871907b9b98c22ef6681e
Parents: 50b997e
Author: Ran Ziv 
Authored: Thu May 25 12:18:58 2017 +0300
Committer: Ran Ziv 
Committed: Thu May 25 18:49:49 2017 +0300

--
 MANIFEST.in  |  2 ++
 VERSION  |  1 +
 aria/VERSION.py  | 21 -
 aria/__init__.py | 13 -
 aria/parser/reading/jinja.py |  2 +-
 requirements.in  |  3 ++-
 requirements.txt |  8 ++--
 setup.py | 14 +-
 8 files changed, 25 insertions(+), 39 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/adf76079/MANIFEST.in
--
diff --git a/MANIFEST.in b/MANIFEST.in
index d934e18..6c79a3a 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,2 +1,4 @@
 include requirements.txt
+include VERSION
+include LICENSE
 recursive-include examples *

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/adf76079/VERSION
--
diff --git a/VERSION b/VERSION
new file mode 100644
index 000..6c6aa7c
--- /dev/null
+++ b/VERSION
@@ -0,0 +1 @@
+0.1.0
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/adf76079/aria/VERSION.py
--
diff --git a/aria/VERSION.py b/aria/VERSION.py
deleted file mode 100644
index 9ce332c..000
--- a/aria/VERSION.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""
-ARIA Version module:
-* version: ARIA Package version
-"""
-
-version = '0.1.0'  # pylint: disable=C0103

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/adf76079/aria/__init__.py
--
diff --git a/aria/__init__.py b/aria/__init__.py
index df75b1e..34db3a8 100644
--- a/aria/__init__.py
+++ b/aria/__init__.py
@@ -19,7 +19,8 @@ ARIA top level package
 
 import sys
 
-from .VERSION import version as __version__
+import pkg_resources
+__version__ = pkg_resources.get_distribution('aria').version
 
 from .orchestrator.decorators import workflow, operation
 from . import (
@@ -39,11 +40,6 @@ if sys.version_info < (2, 7):
 else:
 from pkgutil import iter_modules
 
-try:
-import pkg_resources
-except ImportError:
-pkg_resources = None
-
 __all__ = (
 '__version__',
 'workflow',
@@ -60,9 +56,8 @@ def install_aria_extensions():
 for loader, module_name, _ in iter_modules():
 if module_name.startswith('aria_extension_'):
 loader.find_module(module_name).load_module(module_name)
-if pkg_resources:
-for entry_point in 
pkg_resources.iter_entry_points(group='aria_extension'):
-entry_point.load()
+for entry_point in pkg_resources.iter_entry_points(group='aria_extension'):
+entry_point.load()
 extension.init()
 
 

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/adf76079/aria/parser/reading/jinja.py
--
diff --git a/aria/parser/reading/jinja.py b/aria/parser/reading/jinja.py
index 17bf49e..687317a 100644
--- a/aria/parser/reading/jinja.py
+++ b/aria/parser/reading/jinja.py
@@ -14,7 +14,7 @@ import os
 
 from jinja2 import Template
 
-from ...VERSION import version
+from ... import __version__ as version
 from ..loading import LiteralLocation, LiteralLoader
 from .reader import Reader
 from .exceptions import ReaderSyntaxError


[1/7] incubator-ariatosca git commit: NullPool logging messages appear during execution [Forced Update!]

2017-05-26 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-149-functions-in-operation-configuration c063b4097 -> 
888c5cd6f (forced update)


NullPool logging messages appear during execution


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/0c986842
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/0c986842
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/0c986842

Branch: refs/heads/ARIA-149-functions-in-operation-configuration
Commit: 0c986842d52eca823ab92442dd9d77267e369ae8
Parents: 3d22d36
Author: max-orlov 
Authored: Mon May 22 18:28:12 2017 +0300
Committer: max-orlov 
Committed: Wed May 24 12:15:13 2017 +0300

--
 aria/orchestrator/context/common.py |  1 -
 aria/orchestrator/context/operation.py  | 13 +--
 .../execution_plugin/ctx_proxy/client.py| 22 ++--
 .../execution_plugin/ctx_proxy/server.py| 37 +---
 aria/orchestrator/workflows/executor/process.py |  2 +-
 .../execution_plugin/test_ctx_proxy_server.py   |  4 ++-
 .../orchestrator/workflows/executor/__init__.py |  2 +-
 7 files changed, 52 insertions(+), 29 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/0c986842/aria/orchestrator/context/common.py
--
diff --git a/aria/orchestrator/context/common.py 
b/aria/orchestrator/context/common.py
index 0854a27..c98e026 100644
--- a/aria/orchestrator/context/common.py
+++ b/aria/orchestrator/context/common.py
@@ -16,7 +16,6 @@
 """
 A common context for both workflow and operation
 """
-
 import logging
 from contextlib import contextmanager
 from functools import partial

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/0c986842/aria/orchestrator/context/operation.py
--
diff --git a/aria/orchestrator/context/operation.py 
b/aria/orchestrator/context/operation.py
index 68a02aa..0ce790f 100644
--- a/aria/orchestrator/context/operation.py
+++ b/aria/orchestrator/context/operation.py
@@ -33,6 +33,7 @@ class BaseOperationContext(BaseContext):
 self._task_id = task_id
 self._actor_id = actor_id
 self._thread_local = threading.local()
+self._destroy_session = kwargs.pop('destroy_session', False)
 logger_level = kwargs.pop('logger_level', None)
 super(BaseOperationContext, self).__init__(**kwargs)
 self._register_logger(task_id=self.task.id, level=logger_level)
@@ -90,13 +91,21 @@ class BaseOperationContext(BaseContext):
 }
 
 @classmethod
-def deserialize_from_dict(cls, model_storage=None, resource_storage=None, 
**kwargs):
+def instantiate_from_dict(cls, model_storage=None, resource_storage=None, 
**kwargs):
 if model_storage:
 model_storage = aria.application_model_storage(**model_storage)
 if resource_storage:
 resource_storage = 
aria.application_resource_storage(**resource_storage)
 
-return cls(model_storage=model_storage, 
resource_storage=resource_storage, **kwargs)
+return cls(model_storage=model_storage,
+   resource_storage=resource_storage,
+   destroy_session=True,
+   **kwargs)
+
+def close(self):
+if self._destroy_session:
+self.model.log._session.remove()
+self.model.log._engine.dispose()
 
 
 class NodeOperationContext(BaseOperationContext):

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/0c986842/aria/orchestrator/execution_plugin/ctx_proxy/client.py
--
diff --git a/aria/orchestrator/execution_plugin/ctx_proxy/client.py 
b/aria/orchestrator/execution_plugin/ctx_proxy/client.py
index d965a5e..f7f56aa 100644
--- a/aria/orchestrator/execution_plugin/ctx_proxy/client.py
+++ b/aria/orchestrator/execution_plugin/ctx_proxy/client.py
@@ -34,22 +34,25 @@ class _RequestError(RuntimeError):
 self.ex_traceback = ex_traceback
 
 
-def _http_request(socket_url, request, timeout):
-response = urllib2.urlopen(
-url=socket_url,
-data=json.dumps(request),
-timeout=timeout)
+def _http_request(socket_url, request, method, timeout):
+opener = urllib2.build_opener(urllib2.HTTPHandler)
+request = urllib2.Request(socket_url, data=json.dumps(request))
+request.get_method = lambda: method
+response = opener.open(request, timeout=timeout)
+
 if response.code != 200:
 raise RuntimeError('Request failed: {0}'.format(response))
 return json.loads(response.read())
 
 
-def 

incubator-ariatosca git commit: Fixes [Forced Update!]

2017-05-25 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-149-functions-in-operation-configuration ac56da473 -> 
c063b4097 (forced update)


Fixes

* Rename implementation/inputs to function/arguments in Task API
* Rename "create_parameters" to "merge_parameter_values" and improve
* Change workflow "function" back to "implementation"


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/c063b409
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/c063b409
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/c063b409

Branch: refs/heads/ARIA-149-functions-in-operation-configuration
Commit: c063b4097413fe4056a38eb067546722723c574e
Parents: 13888d2
Author: Tal Liron 
Authored: Wed May 24 14:54:07 2017 -0500
Committer: Tal Liron 
Committed: Thu May 25 15:05:55 2017 -0500

--
 aria/cli/execution_logging.py   |   4 +-
 aria/modeling/exceptions.py |   6 +
 aria/modeling/orchestration.py  |  14 +--
 aria/modeling/service_instance.py   |  11 +-
 aria/modeling/service_template.py   |  25 ++--
 aria/modeling/utils.py  | 126 ++-
 aria/orchestrator/context/operation.py  |   4 +-
 .../execution_plugin/instantiation.py   |   2 +-
 aria/orchestrator/workflow_runner.py|  20 +--
 aria/orchestrator/workflows/api/task.py |  89 +
 .../workflows/builtin/execute_operation.py  |   2 +-
 aria/orchestrator/workflows/core/task.py|   4 +-
 aria/orchestrator/workflows/events_logging.py   |   8 +-
 aria/orchestrator/workflows/executor/base.py|   4 +-
 aria/orchestrator/workflows/executor/celery.py  |   6 +-
 aria/orchestrator/workflows/executor/dry.py |   6 +-
 aria/orchestrator/workflows/executor/process.py |  12 +-
 aria/orchestrator/workflows/executor/thread.py  |   6 +-
 aria/utils/formatting.py|   4 +-
 aria/utils/validation.py|   8 +-
 .../profiles/aria-1.0/aria-1.0.yaml |   8 +-
 .../simple_v1_0/modeling/__init__.py|  22 ++--
 tests/modeling/test_models.py   |  12 +-
 tests/orchestrator/context/test_operation.py|  32 ++---
 tests/orchestrator/context/test_serialize.py|   4 +-
 tests/orchestrator/context/test_toolbelt.py |   4 +-
 .../orchestrator/execution_plugin/test_local.py |   8 +-
 tests/orchestrator/execution_plugin/test_ssh.py |   6 +-
 tests/orchestrator/test_workflow_runner.py  |   8 +-
 tests/orchestrator/workflows/api/test_task.py   |  20 +--
 .../orchestrator/workflows/core/test_engine.py  |  40 +++---
 tests/orchestrator/workflows/core/test_task.py  |   4 +-
 .../test_task_graph_into_execution_graph.py |   4 +-
 .../orchestrator/workflows/executor/__init__.py |   6 +-
 .../workflows/executor/test_executor.py |  10 +-
 .../workflows/executor/test_process_executor.py |   2 +-
 ...process_executor_concurrent_modifications.py |   4 +-
 .../executor/test_process_executor_extension.py |  18 +--
 .../test_process_executor_tracked_changes.py|  14 +--
 .../node-cellar/node-cellar.yaml|   2 +-
 40 files changed, 322 insertions(+), 267 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/c063b409/aria/cli/execution_logging.py
--
diff --git a/aria/cli/execution_logging.py b/aria/cli/execution_logging.py
index b23165f..b3252f0 100644
--- a/aria/cli/execution_logging.py
+++ b/aria/cli/execution_logging.py
@@ -105,8 +105,8 @@ def stylize_log(item, mark_pattern):
 # implementation
 if item.task:
 # operation task
-implementation = item.task.implementation
-inputs = dict(i.unwrap() for i in item.task.inputs.values())
+implementation = item.task.function
+inputs = dict(arg.unwrap() for arg in item.task.arguments.values())
 else:
 # execution task
 implementation = item.execution.workflow_name

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/c063b409/aria/modeling/exceptions.py
--
diff --git a/aria/modeling/exceptions.py b/aria/modeling/exceptions.py
index d0e3e22..e784d1a 100644
--- a/aria/modeling/exceptions.py
+++ b/aria/modeling/exceptions.py
@@ -57,3 +57,9 @@ class UndeclaredParametersException(ParameterException):
 """
 ARIA modeling exception: Undeclared parameters have been provided.
 """
+
+
+class ForbiddenParameterNamesException(ParameterException):
+"""
+ARIA modeling exception: Forbidden parameter names have been used.
+"""


incubator-ariatosca git commit: Fixes [Forced Update!]

2017-05-24 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-149-functions-in-operation-configuration f776a3992 -> 
ac56da473 (forced update)


Fixes

* Rename implementation/inputs to function/arguments in Task API
* Rename "create_parameters" to "merge_parameter_values" and improve
* Change workflow "function" back to "implementation"


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/ac56da47
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/ac56da47
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/ac56da47

Branch: refs/heads/ARIA-149-functions-in-operation-configuration
Commit: ac56da473c8e1d4ad044285df2f574d76ef106d0
Parents: 13888d2
Author: Tal Liron 
Authored: Wed May 24 14:54:07 2017 -0500
Committer: Tal Liron 
Committed: Wed May 24 16:51:25 2017 -0500

--
 aria/cli/execution_logging.py   |   4 +-
 aria/modeling/exceptions.py |   6 +
 aria/modeling/orchestration.py  |  14 +-
 aria/modeling/service_template.py   |   2 +-
 aria/modeling/utils.py  | 129 +++
 aria/orchestrator/context/operation.py  |   4 +-
 .../execution_plugin/instantiation.py   |   2 +-
 aria/orchestrator/workflow_runner.py|   2 +-
 aria/orchestrator/workflows/api/task.py |  89 +
 .../workflows/builtin/execute_operation.py  |   2 +-
 aria/orchestrator/workflows/core/task.py|   4 +-
 aria/orchestrator/workflows/events_logging.py   |   8 +-
 aria/orchestrator/workflows/executor/base.py|   4 +-
 aria/orchestrator/workflows/executor/celery.py  |   6 +-
 aria/orchestrator/workflows/executor/dry.py |   6 +-
 aria/orchestrator/workflows/executor/process.py |  12 +-
 aria/orchestrator/workflows/executor/thread.py  |   6 +-
 .../profiles/aria-1.0/aria-1.0.yaml |   8 +-
 .../simple_v1_0/modeling/__init__.py|   4 +-
 tests/modeling/test_models.py   |  12 +-
 tests/orchestrator/context/test_operation.py|  32 ++---
 tests/orchestrator/context/test_serialize.py|   4 +-
 tests/orchestrator/context/test_toolbelt.py |   4 +-
 .../orchestrator/execution_plugin/test_local.py |   8 +-
 tests/orchestrator/execution_plugin/test_ssh.py |   6 +-
 tests/orchestrator/workflows/api/test_task.py   |  20 +--
 .../orchestrator/workflows/core/test_engine.py  |  40 +++---
 tests/orchestrator/workflows/core/test_task.py  |   4 +-
 .../test_task_graph_into_execution_graph.py |   4 +-
 .../orchestrator/workflows/executor/__init__.py |   6 +-
 .../workflows/executor/test_executor.py |  10 +-
 .../workflows/executor/test_process_executor.py |   2 +-
 ...process_executor_concurrent_modifications.py |   4 +-
 .../executor/test_process_executor_extension.py |  18 +--
 .../test_process_executor_tracked_changes.py|  14 +-
 35 files changed, 279 insertions(+), 221 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ac56da47/aria/cli/execution_logging.py
--
diff --git a/aria/cli/execution_logging.py b/aria/cli/execution_logging.py
index b23165f..b3252f0 100644
--- a/aria/cli/execution_logging.py
+++ b/aria/cli/execution_logging.py
@@ -105,8 +105,8 @@ def stylize_log(item, mark_pattern):
 # implementation
 if item.task:
 # operation task
-implementation = item.task.implementation
-inputs = dict(i.unwrap() for i in item.task.inputs.values())
+implementation = item.task.function
+inputs = dict(arg.unwrap() for arg in item.task.arguments.values())
 else:
 # execution task
 implementation = item.execution.workflow_name

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ac56da47/aria/modeling/exceptions.py
--
diff --git a/aria/modeling/exceptions.py b/aria/modeling/exceptions.py
index d0e3e22..e784d1a 100644
--- a/aria/modeling/exceptions.py
+++ b/aria/modeling/exceptions.py
@@ -57,3 +57,9 @@ class UndeclaredParametersException(ParameterException):
 """
 ARIA modeling exception: Undeclared parameters have been provided.
 """
+
+
+class ForbiddenParameterNamesException(ParameterException):
+"""
+ARIA modeling exception: Forbidden parameter names have been used.
+"""

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ac56da47/aria/modeling/orchestration.py
--
diff --git a/aria/modeling/orchestration.py b/aria/modeling/orchestration.py
index ab9d34d..97de552 100644
--- 

incubator-ariatosca git commit: Fixes

2017-05-24 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-149-functions-in-operation-configuration 13888d247 -> 
f776a3992


Fixes

* Rename implementation/inputs to function/arguments in Task API
* Rename "create_parameters" to "merge_parameter_values" and improve
* Change workflow "function" back to "implementation"


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/f776a399
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/f776a399
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/f776a399

Branch: refs/heads/ARIA-149-functions-in-operation-configuration
Commit: f776a39923284327f6c5239cd6add3e569a642a9
Parents: 13888d2
Author: Tal Liron 
Authored: Wed May 24 14:54:07 2017 -0500
Committer: Tal Liron 
Committed: Wed May 24 16:24:59 2017 -0500

--
 aria/cli/execution_logging.py   |   4 +-
 aria/modeling/exceptions.py |   6 +
 aria/modeling/orchestration.py  |  14 +-
 aria/modeling/service_template.py   |   2 +-
 aria/modeling/utils.py  | 129 +++
 aria/orchestrator/context/operation.py  |   4 +-
 .../execution_plugin/instantiation.py   |   2 +-
 aria/orchestrator/workflow_runner.py|   2 +-
 aria/orchestrator/workflows/api/task.py |  82 
 .../workflows/builtin/execute_operation.py  |   2 +-
 aria/orchestrator/workflows/core/task.py|   4 +-
 aria/orchestrator/workflows/events_logging.py   |   8 +-
 aria/orchestrator/workflows/executor/base.py|   4 +-
 aria/orchestrator/workflows/executor/celery.py  |   6 +-
 aria/orchestrator/workflows/executor/dry.py |   6 +-
 aria/orchestrator/workflows/executor/process.py |  12 +-
 aria/orchestrator/workflows/executor/thread.py  |   6 +-
 .../profiles/aria-1.0/aria-1.0.yaml |   8 +-
 .../simple_v1_0/modeling/__init__.py|   4 +-
 tests/modeling/test_models.py   |  12 +-
 tests/orchestrator/context/test_operation.py|  32 ++---
 tests/orchestrator/context/test_serialize.py|   4 +-
 tests/orchestrator/context/test_toolbelt.py |   4 +-
 .../orchestrator/execution_plugin/test_local.py |   8 +-
 tests/orchestrator/execution_plugin/test_ssh.py |   6 +-
 tests/orchestrator/workflows/api/test_task.py   |  20 +--
 .../orchestrator/workflows/core/test_engine.py  |  40 +++---
 tests/orchestrator/workflows/core/test_task.py  |   4 +-
 .../test_task_graph_into_execution_graph.py |   4 +-
 .../orchestrator/workflows/executor/__init__.py |   6 +-
 .../workflows/executor/test_executor.py |  10 +-
 .../workflows/executor/test_process_executor.py |   2 +-
 ...process_executor_concurrent_modifications.py |   4 +-
 .../executor/test_process_executor_extension.py |  18 +--
 .../test_process_executor_tracked_changes.py|  14 +-
 35 files changed, 275 insertions(+), 218 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/f776a399/aria/cli/execution_logging.py
--
diff --git a/aria/cli/execution_logging.py b/aria/cli/execution_logging.py
index b23165f..b3252f0 100644
--- a/aria/cli/execution_logging.py
+++ b/aria/cli/execution_logging.py
@@ -105,8 +105,8 @@ def stylize_log(item, mark_pattern):
 # implementation
 if item.task:
 # operation task
-implementation = item.task.implementation
-inputs = dict(i.unwrap() for i in item.task.inputs.values())
+implementation = item.task.function
+inputs = dict(arg.unwrap() for arg in item.task.arguments.values())
 else:
 # execution task
 implementation = item.execution.workflow_name

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/f776a399/aria/modeling/exceptions.py
--
diff --git a/aria/modeling/exceptions.py b/aria/modeling/exceptions.py
index d0e3e22..e784d1a 100644
--- a/aria/modeling/exceptions.py
+++ b/aria/modeling/exceptions.py
@@ -57,3 +57,9 @@ class UndeclaredParametersException(ParameterException):
 """
 ARIA modeling exception: Undeclared parameters have been provided.
 """
+
+
+class ForbiddenParameterNamesException(ParameterException):
+"""
+ARIA modeling exception: Forbidden parameter names have been used.
+"""

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/f776a399/aria/modeling/orchestration.py
--
diff --git a/aria/modeling/orchestration.py b/aria/modeling/orchestration.py
index ab9d34d..97de552 100644
--- 

[2/2] incubator-ariatosca git commit: ARIA-149 Enhance operation configuration

2017-05-22 Thread emblemparade
ARIA-149 Enhance operation configuration

* Parse special "dependencies" configuration parameters as YAML and
  treat as Parameter models, allowing them full use of intrinsic
  functions, type coersions, and validations
* Rename various functions that process "properties" to more generically
  process "parameters" (properties, inputs, attributes, arguments, etc.)
* The "configuration" field in OperationTemplate and Operation models
  is now now a dict of Parameter models
* Added "function" and "arguments" fields to Operation model to preserve
  user data (in "implementation" and "inputs") and to clearly demarcate
  orchestration data from user data
* Some cleanup of parser code touched by this commit


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/13888d24
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/13888d24
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/13888d24

Branch: refs/heads/ARIA-149-functions-in-operation-configuration
Commit: 13888d24794458e818e01af75482feae6b6dded3
Parents: 3d22d36
Author: Tal Liron 
Authored: Thu Apr 20 17:54:47 2017 -0500
Committer: Tal Liron 
Committed: Mon May 22 18:41:39 2017 -0500

--
 aria/cli/commands/services.py   |   2 +-
 aria/core.py|  14 +-
 aria/modeling/constraints.py|  28 +++
 aria/modeling/contraints.py |  28 ---
 aria/modeling/exceptions.py |  16 +-
 aria/modeling/service_common.py |   4 +
 aria/modeling/service_instance.py   |  69 +++---
 aria/modeling/service_template.py   |  54 ++---
 aria/modeling/utils.py  | 105 -
 .../execution_plugin/instantiation.py   | 133 +++-
 aria/orchestrator/workflow_runner.py|   2 +-
 aria/orchestrator/workflows/api/task.py |   4 +-
 aria/orchestrator/workflows/core/task.py|   1 -
 .../profiles/aria-1.0/aria-1.0.yaml |  16 +-
 .../simple_v1_0/assignments.py  |   4 +-
 .../simple_v1_0/modeling/__init__.py|  65 --
 .../simple_v1_0/modeling/artifacts.py   |   2 +-
 .../simple_v1_0/modeling/capabilities.py|  24 ++-
 .../simple_v1_0/modeling/constraints.py |   2 +-
 .../simple_v1_0/modeling/data_types.py  |  16 ++
 .../simple_v1_0/modeling/interfaces.py  |  34 ++-
 .../simple_v1_0/modeling/parameters.py  | 211 +++
 .../simple_v1_0/modeling/policies.py|   2 +
 .../simple_v1_0/modeling/properties.py  | 202 --
 .../simple_v1_0/modeling/requirements.py|  20 +-
 .../modeling/substitution_mappings.py   |   4 +
 .../simple_v1_0/templates.py|  13 +-
 .../aria_extension_tosca/simple_v1_0/types.py   |  24 +--
 tests/cli/test_services.py  |  14 +-
 tests/mock/models.py|  10 +-
 tests/mock/topology.py  |  12 +-
 tests/orchestrator/context/test_operation.py|  53 +++--
 tests/orchestrator/context/test_serialize.py|   2 +-
 tests/orchestrator/context/test_toolbelt.py |  14 +-
 .../orchestrator/execution_plugin/test_local.py |  10 +-
 tests/orchestrator/execution_plugin/test_ssh.py |  12 +-
 tests/orchestrator/test_workflow_runner.py  |   8 +-
 tests/orchestrator/workflows/api/test_task.py   |  26 +--
 .../workflows/builtin/test_execute_operation.py |   2 +-
 .../orchestrator/workflows/core/test_engine.py  |   6 +-
 .../orchestrator/workflows/core/test_events.py  |   3 +-
 tests/orchestrator/workflows/core/test_task.py  |   6 +-
 .../test_task_graph_into_execution_graph.py |   2 +-
 ...process_executor_concurrent_modifications.py |  10 +-
 .../executor/test_process_executor_extension.py |  13 +-
 .../test_process_executor_tracked_changes.py|   8 +-
 .../node-cellar/node-cellar.yaml|  24 ++-
 47 files changed, 737 insertions(+), 597 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/13888d24/aria/cli/commands/services.py
--
diff --git a/aria/cli/commands/services.py b/aria/cli/commands/services.py
index 24de7c5..476387c 100644
--- a/aria/cli/commands/services.py
+++ b/aria/cli/commands/services.py
@@ -151,7 +151,7 @@ def create(service_template_name,
 except storage_exceptions.StorageError as e:
 utils.check_overriding_storage_exceptions(e, 'service', service_name)
 raise
-except modeling_exceptions.InputsException:
+except modeling_exceptions.ParameterException:
 

[1/2] incubator-ariatosca git commit: ARIA-149 Enhance operation configuration [Forced Update!]

2017-05-22 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-149-functions-in-operation-configuration 50646f627 -> 
13888d247 (forced update)


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/13888d24/extensions/aria_extension_tosca/simple_v1_0/modeling/properties.py
--
diff --git a/extensions/aria_extension_tosca/simple_v1_0/modeling/properties.py 
b/extensions/aria_extension_tosca/simple_v1_0/modeling/properties.py
deleted file mode 100644
index 9c3ea42..000
--- a/extensions/aria_extension_tosca/simple_v1_0/modeling/properties.py
+++ /dev/null
@@ -1,202 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from aria.utils.collections import merge, deepcopy_with_locators, OrderedDict
-from aria.parser.presentation import Value
-from aria.parser.validation import Issue
-
-from .data_types import coerce_value
-
-#
-# ArtifactType, DataType, CapabilityType, RelationshipType, NodeType, 
GroupType, PolicyType
-#
-
-# Works on properties, parameters, inputs, and attributes
-def get_inherited_property_definitions(context, presentation, field_name, 
for_presentation=None):
-"""
-Returns our property definitions added on top of those of our parent, if 
we have one
-(recursively).
-
-Allows overriding all aspects of parent properties except data type.
-"""
-
-# Get definitions from parent
-# If we inherit from a primitive, it does not have a parent:
-parent = presentation._get_parent(context) if hasattr(presentation, 
'_get_parent') else None
-definitions = get_inherited_property_definitions(context, parent, 
field_name,
- 
for_presentation=presentation) \
- if parent is not None 
else OrderedDict()
-
-# Add/merge our definitions
-# If we inherit from a primitive, it does not have our field
-our_definitions = getattr(presentation, field_name, None)
-if our_definitions:
-our_definitions_clone = OrderedDict()
-for name, our_definition in our_definitions.iteritems():
-our_definitions_clone[name] = 
our_definition._clone(for_presentation)
-our_definitions = our_definitions_clone
-merge_property_definitions(context, presentation, definitions, 
our_definitions, field_name)
-
-for definition in definitions.itervalues():
-definition._reset_method_cache()
-
-return definitions
-
-#
-# NodeTemplate, RelationshipTemplate, GroupTemplate, PolicyTemplate
-#
-
-def get_assigned_and_defined_property_values(context, presentation, 
field_name='property',
- field_name_plural='properties'):
-"""
-Returns the assigned property values while making sure they are defined in 
our type.
-
-The property definition's default value, if available, will be used if we 
did not assign it.
-
-Makes sure that required properties indeed end up with a value.
-"""
-
-values = OrderedDict()
-
-the_type = presentation._get_type(context)
-assignments = getattr(presentation, field_name_plural)
-get_fn_name = '_get_{0}'.format(field_name_plural)
-definitions = getattr(the_type, get_fn_name)(context) if the_type is not 
None else None
-
-# Fill in our assignments, but make sure they are defined
-if assignments:
-for name, value in assignments.iteritems():
-if (definitions is not None) and (name in definitions):
-definition = definitions[name]
-values[name] = coerce_property_value(context, value, 
definition, value.value)
-else:
-context.validation.report('assignment to undefined {0} "{1}" 
in "{2}"'
-  .format(field_name, name, 
presentation._fullname),
-  locator=value._locator, 
level=Issue.BETWEEN_TYPES)
-
-# Fill in defaults from the definitions
-if definitions:
-for name, definition in definitions.iteritems():
-if values.get(name) is None:
-values[name] = coerce_property_value(context, presentation, 
definition,
-   

[2/2] incubator-ariatosca git commit: ARIA-149 Enhance operation configuration

2017-05-22 Thread emblemparade
ARIA-149 Enhance operation configuration

* Parse special "dependencies" configuration parameters as YAML and
  treat as Parameter models, allowing them full use of intrinsic
  functions, type coersions, and validations
* Rename various functions that process "properties" to more generically
  process "parameters" (properties, inputs, attributes, arguments, etc.)
* The "configuration" field in OperationTemplate and Operation models
  is now now a dict of Parameter models
* Added "function" and "arguments" fields to Operation model to preserve
  user data (in "implementation" and "inputs") and to clearly demarcate
  orchestration data from user data
* Some cleanup of parser code touched by this commit


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/50646f62
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/50646f62
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/50646f62

Branch: refs/heads/ARIA-149-functions-in-operation-configuration
Commit: 50646f6279d442869410e8597e2b6215fca28782
Parents: 3d22d36
Author: Tal Liron 
Authored: Thu Apr 20 17:54:47 2017 -0500
Committer: Tal Liron 
Committed: Mon May 22 18:39:19 2017 -0500

--
 aria/cli/commands/services.py   |   2 +-
 aria/core.py|  18 +-
 aria/modeling/constraints.py|  28 +++
 aria/modeling/contraints.py |  28 ---
 aria/modeling/exceptions.py |  16 +-
 aria/modeling/service_common.py |   4 +
 aria/modeling/service_instance.py   |  69 +++---
 aria/modeling/service_template.py   |  54 ++---
 aria/modeling/utils.py  | 105 -
 .../execution_plugin/instantiation.py   | 133 +++-
 aria/orchestrator/workflow_runner.py|   2 +-
 aria/orchestrator/workflows/api/task.py |   4 +-
 aria/orchestrator/workflows/core/task.py|   1 -
 .../profiles/aria-1.0/aria-1.0.yaml |  16 +-
 .../simple_v1_0/assignments.py  |   4 +-
 .../simple_v1_0/modeling/__init__.py|  65 --
 .../simple_v1_0/modeling/artifacts.py   |   2 +-
 .../simple_v1_0/modeling/capabilities.py|  24 ++-
 .../simple_v1_0/modeling/constraints.py |   2 +-
 .../simple_v1_0/modeling/data_types.py  |  16 ++
 .../simple_v1_0/modeling/interfaces.py  |  34 ++-
 .../simple_v1_0/modeling/parameters.py  | 211 +++
 .../simple_v1_0/modeling/policies.py|   2 +
 .../simple_v1_0/modeling/properties.py  | 202 --
 .../simple_v1_0/modeling/requirements.py|  20 +-
 .../modeling/substitution_mappings.py   |   4 +
 .../simple_v1_0/templates.py|  13 +-
 .../aria_extension_tosca/simple_v1_0/types.py   |  24 +--
 tests/cli/test_services.py  |  14 +-
 tests/mock/models.py|  10 +-
 tests/mock/topology.py  |  12 +-
 tests/orchestrator/context/test_operation.py|  53 +++--
 tests/orchestrator/context/test_serialize.py|   2 +-
 tests/orchestrator/context/test_toolbelt.py |  14 +-
 .../orchestrator/execution_plugin/test_local.py |  10 +-
 tests/orchestrator/execution_plugin/test_ssh.py |  12 +-
 tests/orchestrator/test_workflow_runner.py  |   8 +-
 tests/orchestrator/workflows/api/test_task.py   |  26 +--
 .../workflows/builtin/test_execute_operation.py |   2 +-
 .../orchestrator/workflows/core/test_engine.py  |   6 +-
 .../orchestrator/workflows/core/test_events.py  |   3 +-
 tests/orchestrator/workflows/core/test_task.py  |   6 +-
 .../test_task_graph_into_execution_graph.py |   2 +-
 ...process_executor_concurrent_modifications.py |  10 +-
 .../executor/test_process_executor_extension.py |  13 +-
 .../test_process_executor_tracked_changes.py|   8 +-
 .../node-cellar/node-cellar.yaml|  24 ++-
 47 files changed, 739 insertions(+), 599 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/50646f62/aria/cli/commands/services.py
--
diff --git a/aria/cli/commands/services.py b/aria/cli/commands/services.py
index 24de7c5..476387c 100644
--- a/aria/cli/commands/services.py
+++ b/aria/cli/commands/services.py
@@ -151,7 +151,7 @@ def create(service_template_name,
 except storage_exceptions.StorageError as e:
 utils.check_overriding_storage_exceptions(e, 'service', service_name)
 raise
-except modeling_exceptions.InputsException:
+except modeling_exceptions.ParameterException:
 

[1/4] incubator-ariatosca git commit: ARIA-208 Fix models relationships [Forced Update!]

2017-05-22 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-149-functions-in-operation-configuration b1c97e244 -> 
84d8da592 (forced update)


ARIA-208 Fix models relationships


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/5798bbfc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/5798bbfc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/5798bbfc

Branch: refs/heads/ARIA-149-functions-in-operation-configuration
Commit: 5798bbfc7d1a95965a4c44d2ebad5dad245c824a
Parents: 78d6019
Author: Ran Ziv 
Authored: Sun May 7 14:58:46 2017 +0300
Committer: Ran Ziv 
Committed: Mon May 22 15:17:21 2017 +0300

--
 aria/modeling/service_template.py | 49 --
 1 file changed, 23 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/5798bbfc/aria/modeling/service_template.py
--
diff --git a/aria/modeling/service_template.py 
b/aria/modeling/service_template.py
index 1eb95a3..12195a1 100644
--- a/aria/modeling/service_template.py
+++ b/aria/modeling/service_template.py
@@ -211,10 +211,6 @@ class ServiceTemplateBase(TemplateModelMixin):
 return relationship.one_to_many(cls, 'service', dict_key='name')
 
 @declared_attr
-def operation_templates(cls):
-return relationship.one_to_many(cls, 'operation_template')
-
-@declared_attr
 def node_templates(cls):
 return relationship.one_to_many(cls, 'node_template', dict_key='name')
 
@@ -483,6 +479,22 @@ class NodeTemplateBase(TemplateModelMixin):
 def nodes(cls):
 return relationship.one_to_many(cls, 'node')
 
+@declared_attr
+def interface_templates(cls):
+return relationship.one_to_many(cls, 'interface_template', 
dict_key='name')
+
+@declared_attr
+def artifact_templates(cls):
+return relationship.one_to_many(cls, 'artifact_template', 
dict_key='name')
+
+@declared_attr
+def capability_templates(cls):
+return relationship.one_to_many(cls, 'capability_template', 
dict_key='name')
+
+@declared_attr
+def requirement_templates(cls):
+return relationship.one_to_many(cls, 'requirement_template', 
child_fk='node_template_fk')
+
 # endregion
 
 # region many_to_one relationships
@@ -507,22 +519,6 @@ class NodeTemplateBase(TemplateModelMixin):
 def attributes(cls):
 return relationship.many_to_many(cls, 'parameter', 
prefix='attributes', dict_key='name')
 
-@declared_attr
-def interface_templates(cls):
-return relationship.one_to_many(cls, 'interface_template', 
dict_key='name')
-
-@declared_attr
-def artifact_templates(cls):
-return relationship.one_to_many(cls, 'artifact_template', 
dict_key='name')
-
-@declared_attr
-def capability_templates(cls):
-return relationship.one_to_many(cls, 'capability_template', 
dict_key='name')
-
-@declared_attr
-def requirement_templates(cls):
-return relationship.one_to_many(cls, 'requirement_template', 
child_fk='node_template_fk')
-
 # endregion
 
 description = Column(Text)
@@ -1209,11 +1205,6 @@ class RequirementTemplateBase(TemplateModelMixin):
 def relationships(cls):
 return relationship.one_to_many(cls, 'relationship')
 
-@declared_attr
-def target_node_type(cls):
-return relationship.many_to_one(
-cls, 'type', fk='target_node_type_fk', 
back_populates=relationship.NO_BACK_POP)
-
 # endregion
 
 # region many_to_one relationships
@@ -1222,6 +1213,11 @@ class RequirementTemplateBase(TemplateModelMixin):
 def node_template(cls):
 return relationship.many_to_one(cls, 'node_template', 
fk='node_template_fk')
 
+@declared_attr
+def target_node_type(cls):
+return relationship.many_to_one(
+cls, 'type', fk='target_node_type_fk', 
back_populates=relationship.NO_BACK_POP)
+
 # endregion
 
 # region many_to_many relationships
@@ -1845,7 +1841,8 @@ class OperationTemplateBase(TemplateModelMixin):
 
 @declared_attr
 def service_template(cls):
-return relationship.many_to_one(cls, 'service_template')
+return relationship.many_to_one(cls, 'service_template',
+back_populates='workflow_templates')
 
 @declared_attr
 def interface_template(cls):



[1/2] incubator-ariatosca git commit: ARIA-149 Enhance operation configuration [Forced Update!]

2017-05-22 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-149-functions-in-operation-configuration 84d8da592 -> 
50646f627 (forced update)


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/50646f62/extensions/aria_extension_tosca/simple_v1_0/modeling/policies.py
--
diff --git a/extensions/aria_extension_tosca/simple_v1_0/modeling/policies.py 
b/extensions/aria_extension_tosca/simple_v1_0/modeling/policies.py
index fba1972..7dd803b 100644
--- a/extensions/aria_extension_tosca/simple_v1_0/modeling/policies.py
+++ b/extensions/aria_extension_tosca/simple_v1_0/modeling/policies.py
@@ -15,6 +15,7 @@
 
 from ..presentation.types import convert_shorthand_to_full_type_name
 
+
 #
 # PolicyType
 #
@@ -49,6 +50,7 @@ def get_inherited_targets(context, presentation):
 
 return node_types, group_types
 
+
 #
 # PolicyTemplate
 #

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/50646f62/extensions/aria_extension_tosca/simple_v1_0/modeling/properties.py
--
diff --git a/extensions/aria_extension_tosca/simple_v1_0/modeling/properties.py 
b/extensions/aria_extension_tosca/simple_v1_0/modeling/properties.py
deleted file mode 100644
index 9c3ea42..000
--- a/extensions/aria_extension_tosca/simple_v1_0/modeling/properties.py
+++ /dev/null
@@ -1,202 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from aria.utils.collections import merge, deepcopy_with_locators, OrderedDict
-from aria.parser.presentation import Value
-from aria.parser.validation import Issue
-
-from .data_types import coerce_value
-
-#
-# ArtifactType, DataType, CapabilityType, RelationshipType, NodeType, 
GroupType, PolicyType
-#
-
-# Works on properties, parameters, inputs, and attributes
-def get_inherited_property_definitions(context, presentation, field_name, 
for_presentation=None):
-"""
-Returns our property definitions added on top of those of our parent, if 
we have one
-(recursively).
-
-Allows overriding all aspects of parent properties except data type.
-"""
-
-# Get definitions from parent
-# If we inherit from a primitive, it does not have a parent:
-parent = presentation._get_parent(context) if hasattr(presentation, 
'_get_parent') else None
-definitions = get_inherited_property_definitions(context, parent, 
field_name,
- 
for_presentation=presentation) \
- if parent is not None 
else OrderedDict()
-
-# Add/merge our definitions
-# If we inherit from a primitive, it does not have our field
-our_definitions = getattr(presentation, field_name, None)
-if our_definitions:
-our_definitions_clone = OrderedDict()
-for name, our_definition in our_definitions.iteritems():
-our_definitions_clone[name] = 
our_definition._clone(for_presentation)
-our_definitions = our_definitions_clone
-merge_property_definitions(context, presentation, definitions, 
our_definitions, field_name)
-
-for definition in definitions.itervalues():
-definition._reset_method_cache()
-
-return definitions
-
-#
-# NodeTemplate, RelationshipTemplate, GroupTemplate, PolicyTemplate
-#
-
-def get_assigned_and_defined_property_values(context, presentation, 
field_name='property',
- field_name_plural='properties'):
-"""
-Returns the assigned property values while making sure they are defined in 
our type.
-
-The property definition's default value, if available, will be used if we 
did not assign it.
-
-Makes sure that required properties indeed end up with a value.
-"""
-
-values = OrderedDict()
-
-the_type = presentation._get_type(context)
-assignments = getattr(presentation, field_name_plural)
-get_fn_name = '_get_{0}'.format(field_name_plural)
-definitions = getattr(the_type, get_fn_name)(context) if the_type is not 
None else None
-
-# Fill in our assignments, but make sure they are defined
-if assignments:
-for name, value in assignments.iteritems():

[4/4] incubator-ariatosca git commit: ARIA-149 Enhance operation configuration

2017-05-22 Thread emblemparade
ARIA-149 Enhance operation configuration

* Parse special "dependencies" configuration parameters as YAML and
treat as Parameter models, allowing them full use of intrinsic
functions, type coersions, and validations
* Rename various functions that process "properties" to more generically
process "parameters" (properties, inputs, attributes, arguments, etc.)
* The "configuration" field in OperationTemplate and Operation models
is now now a dict of Parameter models
* Added "function" and "arguments" fields to Operation model to preserve
user data (in "implementation" and "inputs") and to clearly demarcate
orchestration data from user data
* Some cleanup of parser code touched by this commit


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/84d8da59
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/84d8da59
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/84d8da59

Branch: refs/heads/ARIA-149-functions-in-operation-configuration
Commit: 84d8da592b3534cecbc896e7ee60704d660f4a26
Parents: 3d22d36
Author: Tal Liron 
Authored: Thu Apr 20 17:54:47 2017 -0500
Committer: Tal Liron 
Committed: Mon May 22 18:33:11 2017 -0500

--
 aria/cli/commands/services.py   |   2 +-
 aria/core.py|  18 +-
 aria/modeling/constraints.py|  28 +++
 aria/modeling/contraints.py |  28 ---
 aria/modeling/exceptions.py |  16 +-
 aria/modeling/service_common.py |   4 +
 aria/modeling/service_instance.py   |  69 +++---
 aria/modeling/service_template.py   |  54 ++---
 aria/modeling/utils.py  | 105 -
 .../execution_plugin/instantiation.py   | 133 +++-
 aria/orchestrator/workflow_runner.py|   2 +-
 aria/orchestrator/workflows/api/task.py |   4 +-
 aria/orchestrator/workflows/core/task.py|   1 -
 .../profiles/aria-1.0/aria-1.0.yaml |  16 +-
 .../simple_v1_0/assignments.py  |   4 +-
 .../simple_v1_0/modeling/__init__.py|  65 --
 .../simple_v1_0/modeling/artifacts.py   |   2 +-
 .../simple_v1_0/modeling/capabilities.py|  24 ++-
 .../simple_v1_0/modeling/constraints.py |   2 +-
 .../simple_v1_0/modeling/data_types.py  |  16 ++
 .../simple_v1_0/modeling/interfaces.py  |  34 ++-
 .../simple_v1_0/modeling/parameters.py  | 211 +++
 .../simple_v1_0/modeling/policies.py|   2 +
 .../simple_v1_0/modeling/properties.py  | 202 --
 .../simple_v1_0/modeling/requirements.py|  20 +-
 .../modeling/substitution_mappings.py   |   4 +
 .../simple_v1_0/templates.py|  13 +-
 .../aria_extension_tosca/simple_v1_0/types.py   |  24 +--
 tests/cli/test_services.py  |  14 +-
 tests/mock/models.py|  10 +-
 tests/mock/topology.py  |  12 +-
 tests/orchestrator/context/test_operation.py|  53 +++--
 tests/orchestrator/context/test_serialize.py|   2 +-
 tests/orchestrator/context/test_toolbelt.py |  14 +-
 .../orchestrator/execution_plugin/test_local.py |  10 +-
 tests/orchestrator/execution_plugin/test_ssh.py |  12 +-
 tests/orchestrator/test_workflow_runner.py  |   8 +-
 tests/orchestrator/workflows/api/test_task.py   |  26 +--
 .../workflows/builtin/test_execute_operation.py |   2 +-
 .../orchestrator/workflows/core/test_engine.py  |   6 +-
 .../orchestrator/workflows/core/test_events.py  |   3 +-
 tests/orchestrator/workflows/core/test_task.py  |   6 +-
 .../test_task_graph_into_execution_graph.py |   2 +-
 ...process_executor_concurrent_modifications.py |  10 +-
 .../executor/test_process_executor_extension.py |  13 +-
 .../test_process_executor_tracked_changes.py|   8 +-
 .../node-cellar/node-cellar.yaml|  24 ++-
 47 files changed, 739 insertions(+), 599 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/84d8da59/aria/cli/commands/services.py
--
diff --git a/aria/cli/commands/services.py b/aria/cli/commands/services.py
index 24de7c5..476387c 100644
--- a/aria/cli/commands/services.py
+++ b/aria/cli/commands/services.py
@@ -151,7 +151,7 @@ def create(service_template_name,
 except storage_exceptions.StorageError as e:
 utils.check_overriding_storage_exceptions(e, 'service', service_name)
 raise
-except modeling_exceptions.InputsException:
+except modeling_exceptions.ParameterException:
 

[2/4] incubator-ariatosca git commit: ARIA-162 Upgrade Colorama library version

2017-05-22 Thread emblemparade
ARIA-162 Upgrade Colorama library version

Upgraded the Colorama library version - This should
take care of the closed-stream error that appeared
sporadically after test runs.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/3d22d36f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/3d22d36f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/3d22d36f

Branch: refs/heads/ARIA-149-functions-in-operation-configuration
Commit: 3d22d36fc5c9fb780facfb8880143dda46d16f6f
Parents: 5798bbf
Author: Ran Ziv 
Authored: Mon May 22 16:44:00 2017 +0300
Committer: Ran Ziv 
Committed: Mon May 22 16:44:00 2017 +0300

--
 requirements.in  | 2 +-
 requirements.txt | 5 +
 2 files changed, 2 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/3d22d36f/requirements.in
--
diff --git a/requirements.in b/requirements.in
index 3950140..1dd5b1f 100644
--- a/requirements.in
+++ b/requirements.in
@@ -29,7 +29,7 @@ wagon==0.6.0
 bottle>=0.12.0, <0.13
 Fabric>=1.13.0, <1.14
 click>=4.1, < 5.0
-colorama>=0.3.3, < 0.3.5
+colorama>=0.3.7, <= 0.3.9
 PrettyTable>=0.7,<0.8
 click_didyoumean==0.0.3
 backports.shutil_get_terminal_size==1.0.0

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/3d22d36f/requirements.txt
--
diff --git a/requirements.txt b/requirements.txt
index 3accaa3..f7efce9 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -27,7 +27,7 @@ cffi==1.10.0  # via cryptography
 click==4.1
 click_didyoumean==0.0.3
 clint==0.5.1
-colorama==0.3.4
+colorama==0.3.9
 cryptography==1.8.1   # via paramiko
 decorator==4.0.11 # via networkx
 enum34==1.1.6 # via cryptography
@@ -57,6 +57,3 @@ six==1.10.0   # via cryptography, packaging, 
retrying
 sqlalchemy==1.1.6
 wagon==0.6.0
 wheel==0.29.0 # via wagon
-
-# The following packages are considered to be unsafe in a requirements file:
-# setuptools# via cryptography



[3/4] incubator-ariatosca git commit: ARIA-149 Enhance operation configuration

2017-05-22 Thread emblemparade
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/84d8da59/extensions/aria_extension_tosca/simple_v1_0/modeling/policies.py
--
diff --git a/extensions/aria_extension_tosca/simple_v1_0/modeling/policies.py 
b/extensions/aria_extension_tosca/simple_v1_0/modeling/policies.py
index fba1972..7dd803b 100644
--- a/extensions/aria_extension_tosca/simple_v1_0/modeling/policies.py
+++ b/extensions/aria_extension_tosca/simple_v1_0/modeling/policies.py
@@ -15,6 +15,7 @@
 
 from ..presentation.types import convert_shorthand_to_full_type_name
 
+
 #
 # PolicyType
 #
@@ -49,6 +50,7 @@ def get_inherited_targets(context, presentation):
 
 return node_types, group_types
 
+
 #
 # PolicyTemplate
 #

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/84d8da59/extensions/aria_extension_tosca/simple_v1_0/modeling/properties.py
--
diff --git a/extensions/aria_extension_tosca/simple_v1_0/modeling/properties.py 
b/extensions/aria_extension_tosca/simple_v1_0/modeling/properties.py
deleted file mode 100644
index 9c3ea42..000
--- a/extensions/aria_extension_tosca/simple_v1_0/modeling/properties.py
+++ /dev/null
@@ -1,202 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from aria.utils.collections import merge, deepcopy_with_locators, OrderedDict
-from aria.parser.presentation import Value
-from aria.parser.validation import Issue
-
-from .data_types import coerce_value
-
-#
-# ArtifactType, DataType, CapabilityType, RelationshipType, NodeType, 
GroupType, PolicyType
-#
-
-# Works on properties, parameters, inputs, and attributes
-def get_inherited_property_definitions(context, presentation, field_name, 
for_presentation=None):
-"""
-Returns our property definitions added on top of those of our parent, if 
we have one
-(recursively).
-
-Allows overriding all aspects of parent properties except data type.
-"""
-
-# Get definitions from parent
-# If we inherit from a primitive, it does not have a parent:
-parent = presentation._get_parent(context) if hasattr(presentation, 
'_get_parent') else None
-definitions = get_inherited_property_definitions(context, parent, 
field_name,
- 
for_presentation=presentation) \
- if parent is not None 
else OrderedDict()
-
-# Add/merge our definitions
-# If we inherit from a primitive, it does not have our field
-our_definitions = getattr(presentation, field_name, None)
-if our_definitions:
-our_definitions_clone = OrderedDict()
-for name, our_definition in our_definitions.iteritems():
-our_definitions_clone[name] = 
our_definition._clone(for_presentation)
-our_definitions = our_definitions_clone
-merge_property_definitions(context, presentation, definitions, 
our_definitions, field_name)
-
-for definition in definitions.itervalues():
-definition._reset_method_cache()
-
-return definitions
-
-#
-# NodeTemplate, RelationshipTemplate, GroupTemplate, PolicyTemplate
-#
-
-def get_assigned_and_defined_property_values(context, presentation, 
field_name='property',
- field_name_plural='properties'):
-"""
-Returns the assigned property values while making sure they are defined in 
our type.
-
-The property definition's default value, if available, will be used if we 
did not assign it.
-
-Makes sure that required properties indeed end up with a value.
-"""
-
-values = OrderedDict()
-
-the_type = presentation._get_type(context)
-assignments = getattr(presentation, field_name_plural)
-get_fn_name = '_get_{0}'.format(field_name_plural)
-definitions = getattr(the_type, get_fn_name)(context) if the_type is not 
None else None
-
-# Fill in our assignments, but make sure they are defined
-if assignments:
-for name, value in assignments.iteritems():
-if (definitions is not None) and (name in definitions):
-definition = definitions[name]
-values[name] = 

[2/4] incubator-ariatosca git commit: ARIA-148 Enhance CLI show commands

2017-05-19 Thread emblemparade
ARIA-148 Enhance CLI show commands

* Allow "--all" flag to provide a complete dump
* Allow "--json" and "--yaml" flags for dump in those formats
* Support for node graph and type hierarchies
* Some fixes for YAML dump for our custom types
* Also closes ARIA-186: "aria services show" command


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/88ca2f35
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/88ca2f35
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/88ca2f35

Branch: refs/heads/ARIA-149-functions-in-operation-configuration
Commit: 88ca2f35e7d69b2bea17c588d4e239dd1e4d36d7
Parents: 78d6019
Author: Tal Liron 
Authored: Thu Apr 20 17:54:47 2017 -0500
Committer: Tal Liron 
Committed: Fri May 19 11:26:00 2017 -0500

--
 aria/cli/commands/service_templates.py | 29 ++
 aria/cli/core/aria.py  | 32 +
 2 files changed, 61 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/88ca2f35/aria/cli/commands/service_templates.py
--
diff --git a/aria/cli/commands/service_templates.py 
b/aria/cli/commands/service_templates.py
index d139195..56afff5 100644
--- a/aria/cli/commands/service_templates.py
+++ b/aria/cli/commands/service_templates.py
@@ -45,6 +45,7 @@ def service_templates():
 @aria.argument('service-template-name')
 @aria.options.verbose()
 @aria.pass_model_storage
+<<< HEAD
 @aria.options.service_template_mode_full
 @aria.options.mode_types
 @aria.options.format_json
@@ -52,12 +53,21 @@ def service_templates():
 @aria.pass_logger
 def show(service_template_name, model_storage, mode_full, mode_types, 
format_json, format_yaml,
  logger):
+===
+@aria.options.show_all
+@aria.options.show_types
+@aria.options.show_json
+@aria.options.show_yaml
+@aria.pass_logger
+def show(service_template_name, model_storage, all, types, json, yaml, logger):
+>>> ARIA-148 Enhance CLI show commands
 """Show information for a specific service template
 
 `SERVICE_TEMPLATE_NAME` is the name of the service template to show 
information on.
 """
 service_template = 
model_storage.service_template.get_by_name(service_template_name)
 
+<<< HEAD
 if format_json or format_yaml:
 mode_full = True
 
@@ -70,6 +80,20 @@ def show(service_template_name, model_storage, mode_full, 
mode_types, format_jso
 else:
 service_template.dump()
 elif mode_types:
+===
+if json or yaml:
+all = True
+
+if all:
+consumption.ConsumptionContext()
+if json:
+
console.puts(formatting.json_dumps(collections.prune(service_template.as_raw)))
+elif yaml:
+
console.puts(formatting.yaml_dumps(collections.prune(service_template.as_raw)))
+else:
+service_template.dump()
+elif types:
+>>> ARIA-148 Enhance CLI show commands
 consumption.ConsumptionContext()
 service_template.dump_types()
 else:
@@ -89,8 +113,13 @@ def show(service_template_name, model_storage, mode_full, 
mode_types, format_jso
 
 if service_template.services:
 logger.info('Existing services:')
+<<< HEAD
 for service_name in service_template.services:
 logger.info('\t{0}'.format(service_name))
+===
+for service in service_template.services:
+logger.info('\t{0}'.format(service.name))
+>>> ARIA-148 Enhance CLI show commands
 
 
 @service_templates.command(name='list',

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/88ca2f35/aria/cli/core/aria.py
--
diff --git a/aria/cli/core/aria.py b/aria/cli/core/aria.py
index 56fe2f7..da7f2b4 100644
--- a/aria/cli/core/aria.py
+++ b/aria/cli/core/aria.py
@@ -346,6 +346,7 @@ class Options(object):
 default=defaults.SERVICE_TEMPLATE_FILENAME,
 help=helptexts.SERVICE_TEMPLATE_FILENAME)
 
+<<< HEAD
 self.service_template_mode_full = mutually_exclusive_option(
 '-f',
 '--full',
@@ -405,6 +406,37 @@ class Options(object):
 help=helptexts.SHOW_YAML,
 mutuality_description='-j, --json',
 mutuality_error=helptexts.FORMAT_MUTUALITY_ERROR_MESSAGE)
+===
+self.show_all = click.option(
+'-a',
+'--all',
+is_flag=True,
+help=helptexts.SHOW_ALL)
+
+self.show_json = click.option(
+'-j',
+'--json',
+is_flag=True,
+help=helptexts.SHOW_JSON)
+
+  

  1   2   3   4   >