You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ariatosca.apache.org by em...@apache.org on 2017/03/23 17:26:15 UTC

[1/4] incubator-ariatosca git commit: ARIA-130-Passing-inputs-from-the-workflow-to-the-operation-changes-the-inputs [Forced Update!]

Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-83-aria-tosca-profile 3627ba631 -> b3cf69ae3 (forced update)


ARIA-130-Passing-inputs-from-the-workflow-to-the-operation-changes-the-inputs


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

Branch: refs/heads/ARIA-83-aria-tosca-profile
Commit: eecd8aca213c565f012810dd3220488e8152217c
Parents: 9841ca4
Author: max-orlov <ma...@gigaspaces.com>
Authored: Wed Mar 22 19:19:53 2017 +0200
Committer: max-orlov <ma...@gigaspaces.com>
Committed: Thu Mar 23 11:40:21 2017 +0200

----------------------------------------------------------------------
 aria/modeling/relationship.py                   |  9 ++++-----
 aria/modeling/service_common.py                 |  8 ++++++++
 aria/orchestrator/workflows/api/task.py         |  9 +++++----
 tests/modeling/test_models.py                   | 20 +++++++++++++++++++-
 tests/orchestrator/context/test_operation.py    |  6 ++----
 .../executor/test_process_executor_extension.py |  4 ++--
 .../test_process_executor_tracked_changes.py    |  4 ++--
 7 files changed, 42 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/eecd8aca/aria/modeling/relationship.py
----------------------------------------------------------------------
diff --git a/aria/modeling/relationship.py b/aria/modeling/relationship.py
index bed1599..ef2bcdd 100644
--- a/aria/modeling/relationship.py
+++ b/aria/modeling/relationship.py
@@ -305,11 +305,10 @@ def many_to_many(model_class,
 
     secondary_table = '{0}_{1}'.format(this_table, other_table)
 
-    if other_property is None:
-        other_property = formatting.pluralize(this_table)
-        if prefix is not None:
-            secondary_table = '{0}_{1}'.format(prefix, secondary_table)
-            other_property = '{0}_{1}'.format(prefix, other_property)
+    if prefix is not None:
+        secondary_table = '{0}_{1}'.format(prefix, secondary_table)
+        if other_property is None:
+            other_property = '{0}_{1}'.format(prefix, this_table)
 
     backref_kwargs = backref_kwargs or {}
     backref_kwargs.setdefault('uselist', True)

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/eecd8aca/aria/modeling/service_common.py
----------------------------------------------------------------------
diff --git a/aria/modeling/service_common.py b/aria/modeling/service_common.py
index dfe4674..3f49645 100644
--- a/aria/modeling/service_common.py
+++ b/aria/modeling/service_common.py
@@ -202,6 +202,14 @@ class TypeBase(InstanceModelMixin):
             types.append(raw_child)
             child._append_raw_children(types)
 
+    @property
+    def hierarchy(self):
+        """
+        Return the type hierarchy.
+        :return:
+        """
+        return [self] + (self.parent.hierarchy if self.parent else [])
+
 
 class MetadataBase(TemplateModelMixin):
     """

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/eecd8aca/aria/orchestrator/workflows/api/task.py
----------------------------------------------------------------------
diff --git a/aria/orchestrator/workflows/api/task.py b/aria/orchestrator/workflows/api/task.py
index 9522d7a..009b81c 100644
--- a/aria/orchestrator/workflows/api/task.py
+++ b/aria/orchestrator/workflows/api/task.py
@@ -16,6 +16,7 @@
 """
 Provides the tasks to be entered into the task graph
 """
+import copy
 
 from ....modeling import models
 from ....utils.collections import OrderedDict
@@ -91,10 +92,10 @@ class OperationTask(BaseTask):
         self.runs_on = runs_on
 
         # Wrap inputs
-        if inputs:
-            for k, v in inputs.iteritems():
-                if not isinstance(v, models.Parameter):
-                    inputs[k] = models.Parameter.wrap(k, v)
+        inputs = copy.deepcopy(inputs) if inputs else {}
+        for k, v in inputs.iteritems():
+            if not isinstance(v, models.Parameter):
+                inputs[k] = models.Parameter.wrap(k, v)
 
         # TODO: Suggestion: these extra inputs could be stored as a separate entry in the task
         # model, because they are different from the operation inputs. If we do this, then the two

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/eecd8aca/tests/modeling/test_models.py
----------------------------------------------------------------------
diff --git a/tests/modeling/test_models.py b/tests/modeling/test_models.py
index 5266d79..8c5e23a 100644
--- a/tests/modeling/test_models.py
+++ b/tests/modeling/test_models.py
@@ -36,7 +36,8 @@ from aria.modeling.models import (
     Relationship,
     NodeTemplate,
     Node,
-    Parameter
+    Parameter,
+    Type
 )
 
 from tests import mock
@@ -835,3 +836,20 @@ class TestTask(object):
             create_task(max_attempts=0)
         with pytest.raises(ValueError):
             create_task(max_attempts=-2)
+
+
+class TestType(object):
+    def test_type_hierarchy(self):
+        super_type = Type(variant='variant', name='super')
+        sub_type = Type(variant='variant', parent=super_type, name='sub')
+        additional_type = Type(variant='variant', name='non_related')
+
+        assert super_type.hierarchy == [super_type]
+        assert sub_type.hierarchy == [sub_type, super_type]
+        assert additional_type.hierarchy == [additional_type]
+
+        super_type.parent = additional_type
+
+        assert super_type.hierarchy == [super_type, additional_type]
+        assert sub_type.hierarchy == [sub_type, super_type, additional_type]
+

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/eecd8aca/tests/orchestrator/context/test_operation.py
----------------------------------------------------------------------
diff --git a/tests/orchestrator/context/test_operation.py b/tests/orchestrator/context/test_operation.py
index 05c9656..f8a79c5 100644
--- a/tests/orchestrator/context/test_operation.py
+++ b/tests/orchestrator/context/test_operation.py
@@ -363,13 +363,11 @@ def _assert_loggins(ctx, inputs):
     assert all(l.execution == execution for l in logs)
     assert all(l in logs and l.task == task for l in task.logs)
 
-    op_start_log = [l for l in logs if
-                    inputs['op_start'].value in l.msg and l.level.lower() == 'info']
+    op_start_log = [l for l in logs if inputs['op_start'] in l.msg and l.level.lower() == 'info']
     assert len(op_start_log) == 1
     op_start_log = op_start_log[0]
 
-    op_end_log = [l for l in logs
-                  if inputs['op_end'].value in l.msg and l.level.lower() == 'debug']
+    op_end_log = [l for l in logs if inputs['op_end'] in l.msg and l.level.lower() == 'debug']
     assert len(op_end_log) == 1
     op_end_log = op_end_log[0]
 

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/eecd8aca/tests/orchestrator/workflows/executor/test_process_executor_extension.py
----------------------------------------------------------------------
diff --git a/tests/orchestrator/workflows/executor/test_process_executor_extension.py b/tests/orchestrator/workflows/executor/test_process_executor_extension.py
index 1c4cda6..0988fae 100644
--- a/tests/orchestrator/workflows/executor/test_process_executor_extension.py
+++ b/tests/orchestrator/workflows/executor/test_process_executor_extension.py
@@ -55,8 +55,8 @@ def test_decorate_extension(context, executor):
     eng = engine.Engine(executor=executor, workflow_context=context, tasks_graph=graph)
     eng.execute()
     out = get_node(context).runtime_properties['out']
-    assert out['wrapper_inputs'] == dict((k, v.value) for k, v in inputs.iteritems())
-    assert out['function_inputs'] == dict((k, v.value) for k, v in inputs.iteritems())
+    assert out['wrapper_inputs'] == inputs
+    assert out['function_inputs'] == inputs
 
 
 @extension.process_executor

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/eecd8aca/tests/orchestrator/workflows/executor/test_process_executor_tracked_changes.py
----------------------------------------------------------------------
diff --git a/tests/orchestrator/workflows/executor/test_process_executor_tracked_changes.py b/tests/orchestrator/workflows/executor/test_process_executor_tracked_changes.py
index a3957c3..5512189 100644
--- a/tests/orchestrator/workflows/executor/test_process_executor_tracked_changes.py
+++ b/tests/orchestrator/workflows/executor/test_process_executor_tracked_changes.py
@@ -73,9 +73,9 @@ def test_apply_tracked_changes_during_an_operation(context, executor):
                         inputs=inputs)
 
     expected_after_update = expected_initial.copy()
-    expected_after_update.update(inputs['committed'].value) # pylint: disable=no-member
+    expected_after_update.update(inputs['committed']) # pylint: disable=no-member
     expected_after_change = expected_after_update.copy()
-    expected_after_change.update(inputs['changed_but_refreshed'].value) # pylint: disable=no-member
+    expected_after_change.update(inputs['changed_but_refreshed']) # pylint: disable=no-member
     expected_after_refresh = expected_after_update
 
     assert out['initial'] == expected_initial


[2/4] incubator-ariatosca git commit: ARIA-96 Improve our requirements handling

Posted by em...@apache.org.
ARIA-96 Improve our requirements handling

1. Currently, don't vendor any library.

2. Use pip-tools (specifically, pip-compile) to manage our dependencies
   requirement files.

3. requirements.in:
   The requirements.in will be read into `install_requires`, and includes
   loose dependencies (as possible, and only direct dependencies), as is
   common when installing using a setup.py file.
   Since we haven't tested ARIA with many versions of our dependencies, our
   dependencies are not very loose, but we are hoping to improve this as
   our project matures.
   Currently, when we provide an upper bound, it is either because of python
   2.6 compatibility, or according to a semantic versioning (i.e. future
   versions that could break the current API). Lower boundaries are
   usually the lowest version that we tested with ARIA, or because version
   before are lacking functionality we are using.

4. requirements.txt:
   The requirements.txt is generated from requirements.in via pip-compile,
   and includes fixed-version dependencies, including all transitive
   dependencies, in order to provide an stable environment that ARIA is
   ensured to work on.


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

Branch: refs/heads/ARIA-83-aria-tosca-profile
Commit: 76f6623572cee0d135a91bd90f45e3a2c7b61412
Parents: eecd8ac
Author: Avia Efrat <av...@gigaspaces.com>
Authored: Thu Mar 9 12:02:06 2017 +0200
Committer: Avia Efrat <av...@gigaspaces.com>
Committed: Thu Mar 23 11:58:58 2017 +0200

----------------------------------------------------------------------
 aria/orchestrator/plugin.py                     |  2 +-
 .../use-cases/non-normative-types.yaml          |  2 +-
 requirements.in                                 | 39 ++++++++++
 requirements.txt                                | 75 +++++++++++++-------
 setup.py                                        | 19 ++---
 5 files changed, 101 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/76f66235/aria/orchestrator/plugin.py
----------------------------------------------------------------------
diff --git a/aria/orchestrator/plugin.py b/aria/orchestrator/plugin.py
index 381504e..d815754 100644
--- a/aria/orchestrator/plugin.py
+++ b/aria/orchestrator/plugin.py
@@ -92,7 +92,7 @@ class PluginManager(object):
                 install_args='--prefix="{prefix}" --constraint="{constraint}"'.format(
                     prefix=prefix,
                     constraint=constraint.name),
-                virtualenv=os.environ.get('VIRTUAL_ENV'))
+                venv=os.environ.get('VIRTUAL_ENV'))
         finally:
             os.remove(constraint_path)
 

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/76f66235/examples/tosca-simple-1.0/use-cases/non-normative-types.yaml
----------------------------------------------------------------------
diff --git a/examples/tosca-simple-1.0/use-cases/non-normative-types.yaml b/examples/tosca-simple-1.0/use-cases/non-normative-types.yaml
index fa826f5..24f22a3 100644
--- a/examples/tosca-simple-1.0/use-cases/non-normative-types.yaml
+++ b/examples/tosca-simple-1.0/use-cases/non-normative-types.yaml
@@ -155,7 +155,7 @@ node_types:
     properties:
       # Property to supply the desired implementation in the Github repository
       github_url:
-        required: no
+        required: false
         type: string
         description: location of the application on the github.
         default: https://github.com/mmm/testnode.git

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/76f66235/requirements.in
----------------------------------------------------------------------
diff --git a/requirements.in b/requirements.in
new file mode 100644
index 0000000..9b68306
--- /dev/null
+++ b/requirements.in
@@ -0,0 +1,39 @@
+# Licensed 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.
+
+PyYAML<3.13
+requests>=2.3.0, <2.14.0
+networkx>1.8, <1.10 # version 1.10 dropped support of python 2.6
+retrying>=1.3.0, <1.4.0
+blinker>1.3, <1.5
+jsonpickle>0.9.0, <=0.9.4
+ruamel.yaml>=0.11.12, <0.12.0  # version 0.12.0 dropped support of python 2.6
+Jinja2>=2.8, <2.9
+shortuuid>=0.5, <0.6
+CacheControl[filecache]>=0.11.0, <0.13
+clint>=0.5.0, <0.6
+SQLAlchemy>=1.1.0, <1.2  # version 1.2 dropped support of python 2.6
+wagon==0.6.0
+bottle>=0.12.0, <0.13
+Fabric>=1.13.0, <1.14
+
+# Since the tool we are using to generate our requirements.txt, `pip-tools`,
+# does not currently support conditional dependencies (;), we're adding our original
+# conditional dependencies here as comments, and manually adding them to our
+# generated requirements.txt file.
+# The relevant pip-tools issue: https://github.com/jazzband/pip-tools/issues/435
+
+# importlib ; python_version < '2.7'
+# ordereddict ; python_version < '2.7'
+# total-ordering ; python_version < '2.7'  # only one version on pypi
+# Fabric makes use of this library, but doesn't bring it :(
+# pypiwin32==219 ; sys_platform == 'win32'

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/76f66235/requirements.txt
----------------------------------------------------------------------
diff --git a/requirements.txt b/requirements.txt
index d6331a5..721914a 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,33 +1,58 @@
-# Licensed 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
+# This file is autogenerated by pip-compile
+# To update, run:
+#
+#    pip-compile --output-file requirements.txt requirements.in
 #
-# 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.
 
-PyYAML>=3.10,<=3.12
-requests>=2.7.0,<=2.10.0
-networkx==1.9
-retrying==1.3.3
-blinker==1.4
+# ----------------------------------------------------------------------------------
+# Since the tool we are using to generate our requirements.txt, `pip-tools`,
+# does not currently support conditional dependencies (;), we're adding our original
+# conditional dependencies here manually.
+# The relevant pip-tools issue: https://github.com/jazzband/pip-tools/issues/435
+
 importlib==1.0.4 ; python_version < '2.7'
 ordereddict==1.1 ; python_version < '2.7'
 total-ordering==0.1.0 ; python_version < '2.7'
-jsonpickle
-ruamel.yaml==0.11.15
-Jinja2==2.8
-shortuuid==0.4.3
-CacheControl[filecache]==0.11.6
-clint==0.5.1
-SQLAlchemy==1.1.4
-wagon==0.5.0
-bottle==0.12.11
-six==1.10.0
-Fabric==1.13.1
 # Fabric makes use of this library, but doesn't bring it :(
 pypiwin32==219 ; sys_platform == 'win32'
+# ----------------------------------------------------------------------------------
+
+appdirs==1.4.3            # via setuptools
+args==0.1.0               # via clint
+asn1crypto==0.22.0        # via cryptography
+blinker==1.4
+bottle==0.12.13
+CacheControl[filecache]==0.12.1
+cffi==1.10.0              # via cryptography
+clint==0.5.1
+cryptography==1.8.1       # via paramiko
+decorator==4.0.11         # via networkx
+enum34==1.1.6             # via cryptography
+Fabric==1.13.1
+idna==2.5                 # via cryptography
+ipaddress==1.0.18         # via cryptography
+Jinja2==2.8.1
+jsonpickle==0.9.4
+lockfile==0.12.2          # via cachecontrol
+MarkupSafe==1.0           # via jinja2
+msgpack-python==0.4.8     # via cachecontrol
+networkx==1.9.1
+packaging==16.8           # via cryptography, setuptools
+paramiko==2.1.2           # via fabric
+pyasn1==0.2.3             # via paramiko
+pycparser==2.17           # via cffi
+pyparsing==2.2.0          # via packaging
+PyYAML==3.12
+requests==2.13.0
+retrying==1.3.3
+ruamel.ordereddict==0.4.9  # via ruamel.yaml
+ruamel.yaml==0.11.15
+shortuuid==0.5.0
+six==1.10.0               # via cryptography, packaging, retrying, setuptools
+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

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/76f66235/setup.py
----------------------------------------------------------------------
diff --git a/setup.py b/setup.py
index 7a1a3f4..ff1f5a6 100644
--- a/setup.py
+++ b/setup.py
@@ -44,16 +44,17 @@ extras_require = {}
 # We need to parse the requirements for the conditional dependencies to work for wheels and
 # standard installation
 try:
-    with open(os.path.join(root_dir, 'requirements.txt')) as requirements:
+    with open(os.path.join(root_dir, 'requirements.in')) as requirements:
         for requirement in requirements.readlines():
-            if not requirement.strip().startswith('#'):
-                if ';' in requirement:
-                    package, condition = requirement.split(';')
-                    cond_name = ':{0}'.format(condition.strip())
-                    extras_require.setdefault(cond_name, [])
-                    extras_require[cond_name].append(package.strip())
-                else:
-                    install_requires.append(requirement.strip())
+            install_requires.append(requirement.strip())
+        # We are using the install_requires mechanism in order to specify
+        # conditional dependencies since reading them from a file in their
+        # standard ';' from does silently nothing.
+        extras_require = {":python_version<'2.7'": ['importlib',
+                                                    'ordereddict',
+                                                     'total-ordering',
+                                                     ],
+                          ":sys_platform=='win32'": 'pypiwin32'}
 except IOError:
     install_requires = []
     extras_require = {}


[3/4] incubator-ariatosca git commit: ARIA-131-Make-demand-for-networkx-more-strict

Posted by em...@apache.org.
ARIA-131-Make-demand-for-networkx-more-strict


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

Branch: refs/heads/ARIA-83-aria-tosca-profile
Commit: aa7b967d067b57feecd771e582fd818159f77f4f
Parents: 76f6623
Author: max-orlov <ma...@gigaspaces.com>
Authored: Thu Mar 23 12:48:44 2017 +0200
Committer: max-orlov <ma...@gigaspaces.com>
Committed: Thu Mar 23 13:23:59 2017 +0200

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


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/aa7b967d/requirements.in
----------------------------------------------------------------------
diff --git a/requirements.in b/requirements.in
index 9b68306..bc27479 100644
--- a/requirements.in
+++ b/requirements.in
@@ -12,7 +12,7 @@
 
 PyYAML<3.13
 requests>=2.3.0, <2.14.0
-networkx>1.8, <1.10 # version 1.10 dropped support of python 2.6
+networkx>=1.9, <1.10 # version 1.10 dropped support of python 2.6
 retrying>=1.3.0, <1.4.0
 blinker>1.3, <1.5
 jsonpickle>0.9.0, <=0.9.4

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/aa7b967d/requirements.txt
----------------------------------------------------------------------
diff --git a/requirements.txt b/requirements.txt
index 721914a..901aa75 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -23,19 +23,19 @@ args==0.1.0               # via clint
 asn1crypto==0.22.0        # via cryptography
 blinker==1.4
 bottle==0.12.13
-CacheControl[filecache]==0.12.1
+cachecontrol[filecache]==0.12.1
 cffi==1.10.0              # via cryptography
 clint==0.5.1
 cryptography==1.8.1       # via paramiko
 decorator==4.0.11         # via networkx
 enum34==1.1.6             # via cryptography
-Fabric==1.13.1
+fabric==1.13.1
 idna==2.5                 # via cryptography
 ipaddress==1.0.18         # via cryptography
-Jinja2==2.8.1
+jinja2==2.8.1
 jsonpickle==0.9.4
 lockfile==0.12.2          # via cachecontrol
-MarkupSafe==1.0           # via jinja2
+markupsafe==1.0           # via jinja2
 msgpack-python==0.4.8     # via cachecontrol
 networkx==1.9.1
 packaging==16.8           # via cryptography, setuptools
@@ -43,14 +43,14 @@ paramiko==2.1.2           # via fabric
 pyasn1==0.2.3             # via paramiko
 pycparser==2.17           # via cffi
 pyparsing==2.2.0          # via packaging
-PyYAML==3.12
+pyyaml==3.12
 requests==2.13.0
 retrying==1.3.3
 ruamel.ordereddict==0.4.9  # via ruamel.yaml
 ruamel.yaml==0.11.15
 shortuuid==0.5.0
 six==1.10.0               # via cryptography, packaging, retrying, setuptools
-SQLAlchemy==1.1.6
+sqlalchemy==1.1.6
 wagon==0.6.0
 wheel==0.29.0             # via wagon
 


[4/4] incubator-ariatosca git commit: ARIA-83 Support ARIA profile for TOSCA

Posted by em...@apache.org.
ARIA-83 Support ARIA profile for TOSCA


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

Branch: refs/heads/ARIA-83-aria-tosca-profile
Commit: b3cf69ae3c555569088e60c78678f5c34d09d8c4
Parents: aa7b967
Author: Tal Liron <ta...@gmail.com>
Authored: Wed Mar 22 15:07:57 2017 -0500
Committer: Tal Liron <ta...@gmail.com>
Committed: Thu Mar 23 12:25:58 2017 -0500

----------------------------------------------------------------------
 aria/cli/commands.py                            |  9 +-
 aria/modeling/orchestration.py                  | 50 +++++++++--
 aria/modeling/service_common.py                 | 47 ++++++----
 aria/modeling/service_instance.py               | 10 +--
 aria/modeling/service_template.py               | 11 +--
 .../profiles/aria-1.0/aria-1.0.yaml             | 59 +++++++++++++
 .../simple_nfv_v1_0/presenter.py                | 11 +--
 .../simple_v1_0/modeling/__init__.py            | 10 +--
 .../simple_v1_0/presenter.py                    |  4 +-
 setup.py                                        |  3 +-
 tests/end2end/test_orchestrator.py              |  7 +-
 tests/mock/models.py                            | 20 ++---
 tests/modeling/test_models.py                   | 23 ++---
 tests/orchestrator/context/test_operation.py    |  1 -
 tests/orchestrator/context/test_serialize.py    |  1 -
 tests/orchestrator/workflows/api/test_task.py   | 19 ++--
 tests/orchestrator/workflows/core/test_task.py  | 16 +---
 .../node-cellar/node-cellar.yaml                | 40 ++++-----
 .../node-cellar/types/aria.yaml                 | 93 --------------------
 .../node-cellar/types/mongodb.yaml              | 25 +++---
 .../node-cellar/types/nginx.yaml                | 25 +++---
 .../node-cellar/types/nodejs.yaml               | 25 +++---
 .../node-cellar/types/openstack.yaml            | 25 +++---
 .../tosca-simple-1.0/node-cellar/types/os.yaml  | 25 +++---
 24 files changed, 259 insertions(+), 300 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b3cf69ae/aria/cli/commands.py
----------------------------------------------------------------------
diff --git a/aria/cli/commands.py b/aria/cli/commands.py
index 1eef61d..ee329e7 100644
--- a/aria/cli/commands.py
+++ b/aria/cli/commands.py
@@ -206,7 +206,7 @@ class WorkflowCommand(BaseCommand):
     :code:`workflow` command.
     """
 
-    WORKFLOW_POLICY_INTERNAL_PROPERTIES = ('function', 'implementation', 'dependencies')
+    WORKFLOW_POLICY_INTERNAL_PROPERTIES = ('implementation', 'dependencies')
     
     def __call__(self, args_namespace, unknown_args):
         super(WorkflowCommand, self).__call__(args_namespace, unknown_args)
@@ -241,12 +241,9 @@ class WorkflowCommand(BaseCommand):
             if workflow.type.role != 'workflow':
                 raise AttributeError('policy is not a workflow: "{0}"'.format(workflow_name))
 
-            try:
-                sys.path.append(workflow.properties['implementation'].value)
-            except KeyError:
-                pass
+            sys.path.append(os.path.dirname(str(context.presentation.location)))
     
-            workflow_fn = import_fullname(workflow.properties['function'].value)
+            workflow_fn = import_fullname(workflow.properties['implementation'].value)
     
             for k in workflow.properties:
                 if k in WORKFLOW_DECORATOR_RESERVED_ARGUMENTS:

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b3cf69ae/aria/modeling/orchestration.py
----------------------------------------------------------------------
diff --git a/aria/modeling/orchestration.py b/aria/modeling/orchestration.py
index 0277756..2d58671 100644
--- a/aria/modeling/orchestration.py
+++ b/aria/modeling/orchestration.py
@@ -39,9 +39,12 @@ from sqlalchemy.ext.associationproxy import association_proxy
 from sqlalchemy.ext.declarative import declared_attr
 
 from ..orchestrator.exceptions import (TaskAbortException, TaskRetryException)
-from .types import (List, Dict)
+from .types import Dict
 from .mixins import ModelMixin
-from . import relationship
+from . import (
+    relationship,
+    types as modeling_types
+)
 
 
 class ExecutionBase(ModelMixin):
@@ -140,7 +143,44 @@ class ExecutionBase(ModelMixin):
 
 class PluginBase(ModelMixin):
     """
-    Plugin model representation.
+    An installed plugin.
+
+    Plugins are usually packaged as `wagons <https://github.com/cloudify-cosmo/wagon>`__, which
+    are archives of one or more `wheels <https://packaging.python.org/distributing/#wheels>`__.
+    Most of these fields are indeed extracted from the installed wagon's metadata.
+
+    :ivar archive_name: Filename (not the full path) of the wagon's archive, often with a ".wgn"
+                        extension
+    :vartype archive_name: basestring
+    :ivar distribution: The name of the operating system on which the wagon was installed (e.g.
+                        "ubuntu")
+    :vartype distribution: basestring
+    :ivar distribution_release: The release of the operating system on which the wagon was installed
+                                (e.g. "trusty")
+    :vartype distribution_release: basestring
+    :ivar distribution_version: The version of the operating system on which the wagon was installed
+                                (e.g. "14.04")
+    :vartype distribution_version: basestring
+    :ivar package_name: The primary Python package name used when the wagon was installed, which is
+                        one of the wheels in the wagon (e.g. "cloudify-script-plugin")
+    :vartype package_name: basestring
+    :ivar package_source: The full install string for the primary Python package name used when the
+                          wagon was installed (e.g. "cloudify-script-plugin==1.2")
+    :vartype package_source: basestring
+    :ivar package_version: The version for the primary Python package name used when the wagon was
+                           installed (e.g. "1.2")
+    :vartype package_version: basestring
+    :ivar supported_platform: If the wheels are *all* pure Python then this would be "any",
+                              otherwise it would be the installed platform name (e.g.
+                              "linux_x86_64")
+    :vartype supported_platform: basestring
+    :ivar supported_py_versions: The Python versions supported by all the wheels (e.g. ["py26",
+                                 "py27"])
+    :vartype supported_py_versions: [basestring]
+    :ivar wheels: The filenames of the wheels archived in the wagon, often with a ".whl" extension
+    :vartype wheels: [basestring]
+    :ivar uploaded_at: Timestamp for when the wagon was installed
+    :vartype uploaded_at: basestring
     """
 
     __tablename__ = 'plugin'
@@ -153,9 +193,9 @@ class PluginBase(ModelMixin):
     package_source = Column(Text)
     package_version = Column(Text)
     supported_platform = Column(Text)
-    supported_py_versions = Column(List)
+    supported_py_versions = Column(modeling_types.StrictList(basestring))
+    wheels = Column(modeling_types.StrictList(basestring), nullable=False)
     uploaded_at = Column(DateTime, nullable=False, index=True)
-    wheels = Column(List, nullable=False)
 
 
 class TaskBase(ModelMixin):

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b3cf69ae/aria/modeling/service_common.py
----------------------------------------------------------------------
diff --git a/aria/modeling/service_common.py b/aria/modeling/service_common.py
index 3f49645..d6b1f33 100644
--- a/aria/modeling/service_common.py
+++ b/aria/modeling/service_common.py
@@ -25,7 +25,6 @@ from sqlalchemy.ext.declarative import declared_attr
 from ..parser.consumption import ConsumptionContext
 from ..utils import collections, formatting, console
 from .mixins import InstanceModelMixin, TemplateModelMixin
-from .types import List
 from . import (
     relationship,
     utils
@@ -39,9 +38,12 @@ class ParameterBase(TemplateModelMixin):
     This model is used by both service template and service instance elements.
 
     :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'
@@ -218,7 +220,9 @@ class MetadataBase(TemplateModelMixin):
     This model is used by both service template and service instance elements.
 
     :ivar name: Name
+    :vartype name: basestring
     :ivar value: Value
+    :vartype value: basestring
     """
 
     __tablename__ = 'metadata'
@@ -246,24 +250,21 @@ class MetadataBase(TemplateModelMixin):
             context.style.literal(self.value)))
 
 
-class PluginSpecificationBase(InstanceModelMixin):
+class PluginSpecificationBase(TemplateModelMixin):
     """
-    Plugin specification model representation.
+    Plugin specification.
+
+    :ivar name: Required plugin name
+    :vartype name: basestring
+    :ivar version: Minimum plugin version
+    :vartype version: basestring
     """
 
     __tablename__ = 'plugin_specification'
 
     __private_fields__ = ['service_template_fk']
 
-    archive_name = Column(Text, nullable=False, index=True)
-    distribution = Column(Text)
-    distribution_release = Column(Text)
-    distribution_version = Column(Text)
-    package_name = Column(Text, nullable=False, index=True)
-    package_source = Column(Text)
-    package_version = Column(Text)
-    supported_platform = Column(Text)
-    supported_py_versions = Column(List)
+    version = Column(Text, nullable=True)
 
     # region foreign keys
 
@@ -274,12 +275,28 @@ class PluginSpecificationBase(InstanceModelMixin):
 
     # endregion
 
+    @property
+    def as_raw(self):
+        return collections.OrderedDict((
+            ('name', self.name),
+            ('version', self.version)))
+
     def coerce_values(self, container, report_issues):
         pass
 
+    def instantiate(self, container):
+        from . import models
+        return models.PluginSpecification(name=self.name,
+                                          version=self.version)
+
     def find_plugin(self, plugins):
-        # TODO: this should check versions/distribution and other specification
+        matching_plugins = []
         for plugin in plugins:
-            if plugin.name == self.name:
-                return plugin
+            # TODO: we need to use a version comparator
+            if (plugin.name == self.name) and \
+                ((self.version is None) or (plugin.package_version >= self.version)):
+                matching_plugins.append(plugin)
+        if matching_plugins:
+            # Return highest version of plugin
+            return sorted(matching_plugins, key=lambda plugin: plugin.package_version)[-1]
         return None

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b3cf69ae/aria/modeling/service_instance.py
----------------------------------------------------------------------
diff --git a/aria/modeling/service_instance.py b/aria/modeling/service_instance.py
index b97c148..f120734 100644
--- a/aria/modeling/service_instance.py
+++ b/aria/modeling/service_instance.py
@@ -64,7 +64,7 @@ class ServiceBase(InstanceModelMixin): # pylint: disable=too-many-public-methods
     :vartype outputs: {basestring: :class:`Parameter`}
     :ivar workflows: Custom workflows that can be performed on the service
     :vartype workflows: {basestring: :class:`Operation`}
-    :ivar plugin_specifications: Plugins required to be installed
+    :ivar plugin_specifications: Plugins used by the service
     :vartype plugin_specifications: {basestring: :class:`PluginSpecification`}
     :ivar created_at: Creation timestamp
     :vartype created_at: :class:`datetime.datetime`
@@ -131,7 +131,7 @@ class ServiceBase(InstanceModelMixin): # pylint: disable=too-many-public-methods
 
     @declared_attr
     def plugin_specifications(cls):
-        return relationship.many_to_many(cls, 'plugin_specification')
+        return relationship.many_to_many(cls, 'plugin_specification', dict_key='name')
 
     created_at = Column(DateTime, nullable=False, index=True)
     updated_at = Column(DateTime)
@@ -315,8 +315,6 @@ class NodeBase(InstanceModelMixin): # pylint: disable=too-many-public-methods
     :vartype outbound_relationships: [:class:`Relationship`]
     :ivar inbound_relationships: Relationships from other nodes
     :vartype inbound_relationships: [:class:`Relationship`]
-    :ivar plugin_specifications: Plugins required to be installed on the node's host
-    :vartype plugin_specifications: {basestring: :class:`PluginSpecification`}
     :ivar host: Host node (can be self)
     :vartype host: :class:`Node`
 
@@ -386,10 +384,6 @@ class NodeBase(InstanceModelMixin): # pylint: disable=too-many-public-methods
                                         child_property='target_node')
 
     @declared_attr
-    def plugin_specifications(cls):
-        return relationship.many_to_many(cls, 'plugin_specification', dict_key='name')
-
-    @declared_attr
     def host(cls):
         return relationship.one_to_one_self(cls, 'host_fk')
 

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b3cf69ae/aria/modeling/service_template.py
----------------------------------------------------------------------
diff --git a/aria/modeling/service_template.py b/aria/modeling/service_template.py
index 5d667e3..7246ff1 100644
--- a/aria/modeling/service_template.py
+++ b/aria/modeling/service_template.py
@@ -70,7 +70,7 @@ class ServiceTemplateBase(TemplateModelMixin): # pylint: disable=too-many-public
     :vartype outputs: {basestring: :class:`Parameter`}
     :ivar workflow_templates: Custom workflows that can be performed on the service
     :vartype workflow_templates: {basestring: :class:`OperationTemplate`}
-    :ivar plugin_specifications: Plugins required by services
+    :ivar plugin_specifications: Plugins used by the service
     :vartype plugin_specifications: {basestring: :class:`PluginSpecification`}
     :ivar node_types: Base for the node type hierarchy
     :vartype node_types: :class:`Type`
@@ -86,8 +86,6 @@ class ServiceTemplateBase(TemplateModelMixin): # pylint: disable=too-many-public
     :vartype interface_types: :class:`Type`
     :ivar artifact_types: Base for the artifact type hierarchy
     :vartype artifact_types: :class:`Type`
-    :ivar plugin_specifications: Plugins required to be installed
-    :vartype plugin_specifications: {basestring: :class:`PluginSpecification`}
     :ivar created_at: Creation timestamp
     :vartype created_at: :class:`datetime.datetime`
     :ivar updated_at: Update timestamp
@@ -274,6 +272,7 @@ class ServiceTemplateBase(TemplateModelMixin): # pylint: disable=too-many-public
         utils.instantiate_dict(self, service.groups, self.group_templates)
         utils.instantiate_dict(self, service.policies, self.policy_templates)
         utils.instantiate_dict(self, service.workflows, self.workflow_templates)
+        utils.instantiate_dict(self, service.plugin_specifications, self.plugin_specifications)
 
         if self.substitution_template is not None:
             service.substitution = self.substitution_template.instantiate(container)
@@ -395,8 +394,6 @@ class NodeTemplateBase(TemplateModelMixin):
     :vartype requirement_templates: [:class:`RequirementTemplate`]
     :ivar target_node_template_constraints: Constraints for filtering relationship targets
     :vartype target_node_template_constraints: [:class:`FunctionType`]
-    :ivar plugin_specifications: Plugins required to be installed on the node's host
-    :vartype plugin_specifications: {basestring: :class:`PluginSpecification`}
 
     :ivar service_template: Containing service template
     :vartype service_template: :class:`ServiceTemplate`
@@ -448,10 +445,6 @@ class NodeTemplateBase(TemplateModelMixin):
 
     target_node_template_constraints = Column(modeling_types.StrictList(FunctionType))
 
-    @declared_attr
-    def plugin_specifications(cls):
-        return relationship.many_to_many(cls, 'plugin_specification', dict_key='name')
-
     # region foreign_keys
 
     @declared_attr

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b3cf69ae/extensions/aria_extension_tosca/profiles/aria-1.0/aria-1.0.yaml
----------------------------------------------------------------------
diff --git a/extensions/aria_extension_tosca/profiles/aria-1.0/aria-1.0.yaml b/extensions/aria_extension_tosca/profiles/aria-1.0/aria-1.0.yaml
new file mode 100644
index 0000000..09cef57
--- /dev/null
+++ b/extensions/aria_extension_tosca/profiles/aria-1.0/aria-1.0.yaml
@@ -0,0 +1,59 @@
+# 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.
+
+policy_types:
+
+  aria.Plugin:
+    _extensions:
+      role: plugin
+    description: >-
+      Policy used to specify plugins used by services. For an operation to be able to use a plugin
+      it must have a matching policy. The name of the policy must be the name of the plugin. The
+      optional properties can be used to further specify plugin selection by the orchestrator.
+    derived_from: tosca.policies.Root
+    properties:
+      version:
+        description: >-
+          Minimum plugin version.
+        type: version
+        required: false
+
+  aria.Workflow:
+    _extensions:
+      role: workflow
+    description: >-
+      Policy used to specify custom workflows. A workflow is usually a workload of interconnected
+      calls to operations on nodes and relationships in the service topology. The name of the policy
+      is used as the name of the workflow. Note that it can be the same name as one of the normative
+      lifecycle workflows ("install", "uninstall", etc.), in which case it would be considered an
+      override of the default behavior. If the workflow requires parameters then this base type
+      should be inherited and extended with additional properties.
+    derived_from: tosca.policies.Root
+    properties:
+      implementation:
+        description: >-
+          The interpretation of the implementation string depends on the orchestrator. In ARIA it is
+          the full path to a Python @workflow function that generates a task graph based on the
+          service topology.
+        type: string
+        required: true
+      dependencies:
+        description: >-
+          The optional ordered list of one or more dependent or secondary implementation artifact
+          name which are referenced by the primary implementation artifact (e.g., a library the
+          script installs or a secondary script).
+        type: list
+        entry_schema: string
+        required: false

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b3cf69ae/extensions/aria_extension_tosca/simple_nfv_v1_0/presenter.py
----------------------------------------------------------------------
diff --git a/extensions/aria_extension_tosca/simple_nfv_v1_0/presenter.py b/extensions/aria_extension_tosca/simple_nfv_v1_0/presenter.py
index 8098ccf..0ce918e 100644
--- a/extensions/aria_extension_tosca/simple_nfv_v1_0/presenter.py
+++ b/extensions/aria_extension_tosca/simple_nfv_v1_0/presenter.py
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from aria.utils.collections import FrozenList, EMPTY_READ_ONLY_LIST
+from aria.utils.collections import FrozenList
 from aria.utils.caching import cachedmethod
 
 from ..simple_v1_0 import ToscaSimplePresenter1_0
@@ -37,10 +37,7 @@ class ToscaSimpleNfvPresenter1_0(ToscaSimplePresenter1_0): # pylint: disable=inv
 
     @cachedmethod
     def _get_import_locations(self, context):
-        import_locations = []
+        import_locations = super(ToscaSimpleNfvPresenter1_0, self)._get_import_locations(context)
         if context.presentation.import_profile:
-            import_locations += (self.SIMPLE_PROFILE_LOCATION, self.SIMPLE_PROFILE_FOR_NFV_LOCATION)
-        imports = self._get('service_template', 'imports')
-        if imports:
-            import_locations += [i.file for i in imports]
-        return FrozenList(import_locations) if import_locations else EMPTY_READ_ONLY_LIST
+            return FrozenList([self.SIMPLE_PROFILE_FOR_NFV_LOCATION] + import_locations)
+        return import_locations

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b3cf69ae/extensions/aria_extension_tosca/simple_v1_0/modeling/__init__.py
----------------------------------------------------------------------
diff --git a/extensions/aria_extension_tosca/simple_v1_0/modeling/__init__.py b/extensions/aria_extension_tosca/simple_v1_0/modeling/__init__.py
index 4477732..d0a39e6 100644
--- a/extensions/aria_extension_tosca/simple_v1_0/modeling/__init__.py
+++ b/extensions/aria_extension_tosca/simple_v1_0/modeling/__init__.py
@@ -441,15 +441,7 @@ def create_plugin_specification_model(context, policy):
         return prop.value if prop is not None else None
 
     model = PluginSpecification(name=policy._name,
-                                archive_name=get('archive_name') or '',
-                                distribution=get('distribution'),
-                                distribution_release=get('distribution_release'),
-                                distribution_version=get('distribution_version'),
-                                package_name=get('package_name') or '',
-                                package_source=get('package_source'),
-                                package_version=get('package_version'),
-                                supported_platform=get('supported_platform'),
-                                supported_py_versions=get('supported_py_versions'))
+                                version=get('version'))
 
     return model
 

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b3cf69ae/extensions/aria_extension_tosca/simple_v1_0/presenter.py
----------------------------------------------------------------------
diff --git a/extensions/aria_extension_tosca/simple_v1_0/presenter.py b/extensions/aria_extension_tosca/simple_v1_0/presenter.py
index eee5769..96cc763 100644
--- a/extensions/aria_extension_tosca/simple_v1_0/presenter.py
+++ b/extensions/aria_extension_tosca/simple_v1_0/presenter.py
@@ -35,6 +35,8 @@ class ToscaSimplePresenter1_0(Presenter): # pylint: disable=invalid-name
     DSL_VERSIONS = ('tosca_simple_yaml_1_0',)
     ALLOWED_IMPORTED_DSL_VERSIONS = ('tosca_simple_yaml_1_0',)
     SIMPLE_PROFILE_LOCATION = 'tosca-simple-1.0/tosca-simple-1.0.yaml'
+    SPECIAL_IMPORTS = {
+        'aria-1.0': 'aria-1.0/aria-1.0.yaml'}
 
     @property
     @cachedmethod
@@ -71,7 +73,7 @@ class ToscaSimplePresenter1_0(Presenter): # pylint: disable=invalid-name
             import_locations.append(self.SIMPLE_PROFILE_LOCATION)
         imports = self._get('service_template', 'imports')
         if imports:
-            import_locations += [i.file for i in imports]
+            import_locations += [self.SPECIAL_IMPORTS.get(i.file, i.file) for i in imports]
         return FrozenList(import_locations) if import_locations else EMPTY_READ_ONLY_LIST
 
     @cachedmethod

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b3cf69ae/setup.py
----------------------------------------------------------------------
diff --git a/setup.py b/setup.py
index ff1f5a6..7be5275 100644
--- a/setup.py
+++ b/setup.py
@@ -105,7 +105,8 @@ setup(
     package_data={
         'aria_extension_tosca': [
             'profiles/tosca-simple-1.0/**',
-            'profiles/tosca-simple-nfv-1.0/**'
+            'profiles/tosca-simple-nfv-1.0/**',
+            'profiles/aria-1.0/**'
         ]
     },
     zip_safe=False,

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b3cf69ae/tests/end2end/test_orchestrator.py
----------------------------------------------------------------------
diff --git a/tests/end2end/test_orchestrator.py b/tests/end2end/test_orchestrator.py
index 7b8dc97..4dfca44 100644
--- a/tests/end2end/test_orchestrator.py
+++ b/tests/end2end/test_orchestrator.py
@@ -14,6 +14,7 @@
 # limitations under the License.
 
 import sys
+import os
 
 from aria.orchestrator.runner import Runner
 from aria.orchestrator.workflows.builtin import BUILTIN_WORKFLOWS
@@ -24,7 +25,7 @@ from aria.cli.dry import convert_to_dry
 from tests.parser.service_templates import consume_node_cellar
 
 
-WORKFLOW_POLICY_INTERNAL_PROPERTIES = ('function', 'implementation', 'dependencies')
+WORKFLOW_POLICY_INTERNAL_PROPERTIES = ('implementation', 'dependencies')
 
 
 def test_install():
@@ -47,8 +48,8 @@ def _workflow(workflow_name):
         inputs = {}
     else:
         workflow = context.modeling.instance.policies[workflow_name]
-        sys.path.append(workflow.properties['implementation'].value)
-        workflow_fn = import_fullname(workflow.properties['function'].value)
+        sys.path.append(os.path.dirname(str(context.presentation.location)))
+        workflow_fn = import_fullname(workflow.properties['implementation'].value)
         inputs = OrderedDict([
             (k, v.value) for k, v in workflow.properties.iteritems()
             if k not in WORKFLOW_POLICY_INTERNAL_PROPERTIES

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b3cf69ae/tests/mock/models.py
----------------------------------------------------------------------
diff --git a/tests/mock/models.py b/tests/mock/models.py
index bf43a75..a60b35e 100644
--- a/tests/mock/models.py
+++ b/tests/mock/models.py
@@ -191,14 +191,14 @@ def create_execution(service):
     )
 
 
-def create_plugin(package_name='package', package_version='0.1'):
+def create_plugin(name='test_plugin', package_version='0.1'):
     return models.Plugin(
-        name='test_plugin',
+        name=name,
         archive_name='archive_name',
         distribution='distribution',
         distribution_release='dist_release',
         distribution_version='dist_version',
-        package_name=package_name,
+        package_name='package',
         package_source='source',
         package_version=package_version,
         supported_platform='any',
@@ -208,18 +208,10 @@ def create_plugin(package_name='package', package_version='0.1'):
     )
 
 
-def create_plugin_specification(package_name='package', package_version='0.1'):
+def create_plugin_specification(name='test_plugin', version='0.1'):
     return models.PluginSpecification(
-        name='test_plugin',
-        archive_name='archive_name',
-        distribution='distribution',
-        distribution_release='dist_release',
-        distribution_version='dist_version',
-        package_name=package_name,
-        package_source='source',
-        package_version=package_version,
-        supported_platform='any',
-        supported_py_versions=['python27']
+        name=name,
+        version=version
     )
 
 

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b3cf69ae/tests/modeling/test_models.py
----------------------------------------------------------------------
diff --git a/tests/modeling/test_models.py b/tests/modeling/test_models.py
index 8c5e23a..c3b98c1 100644
--- a/tests/modeling/test_models.py
+++ b/tests/modeling/test_models.py
@@ -513,22 +513,19 @@ class TestServiceModification(object):
 
 class TestNodeTemplate(object):
     @pytest.mark.parametrize(
-        'is_valid, name, default_instances, max_instances, min_instances, plugin_specifications, '
-        'properties',
+        'is_valid, name, default_instances, max_instances, min_instances, properties',
         [
-            (False, m_cls, 1, 1, 1, {}, {}),
-            (False, 'name', m_cls, 1, 1, {}, {}),
-            (False, 'name', 1, m_cls, 1, {}, {}),
-            (False, 'name', 1, 1, m_cls, {}, {}),
-            (False, 'name', 1, 1, 1, m_cls, {}),
-            (False, 'name', 1, 1, 1, None, {}),
-
-            (True, 'name', 1, 1, 1, {}, {}),
+            (False, m_cls, 1, 1, 1, {}),
+            (False, 'name', m_cls, 1, 1, {}),
+            (False, 'name', 1, m_cls, 1, {}),
+            (False, 'name', 1, 1, m_cls, {}),
+            (False, 'name', 1, 1, 1, m_cls),
+
+            (True, 'name', 1, 1, 1, {}),
         ]
     )
     def test_node_template_model_creation(self, service_storage, is_valid, name, default_instances,
-                                          max_instances, min_instances, plugin_specifications,
-                                          properties):
+                                          max_instances, min_instances, properties):
         node_template = _test_model(
             is_valid=is_valid,
             storage=service_storage,
@@ -539,7 +536,6 @@ class TestNodeTemplate(object):
                 default_instances=default_instances,
                 max_instances=max_instances,
                 min_instances=min_instances,
-                plugin_specifications=plugin_specifications,
                 properties=properties,
                 service_template=service_storage.service_template.list()[0]
             ))
@@ -852,4 +848,3 @@ class TestType(object):
 
         assert super_type.hierarchy == [super_type, additional_type]
         assert sub_type.hierarchy == [sub_type, super_type, additional_type]
-

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b3cf69ae/tests/orchestrator/context/test_operation.py
----------------------------------------------------------------------
diff --git a/tests/orchestrator/context/test_operation.py b/tests/orchestrator/context/test_operation.py
index f8a79c5..6721b29 100644
--- a/tests/orchestrator/context/test_operation.py
+++ b/tests/orchestrator/context/test_operation.py
@@ -241,7 +241,6 @@ def test_plugin_workdir(ctx, thread_executor, tmpdir):
             plugin_specification=plugin_specification)
     )
     node.interfaces[interface.name] = interface
-    node.plugin_specifications[plugin_specification.name] = plugin_specification
     ctx.model.node.update(node)
 
     filename = 'test_file'

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b3cf69ae/tests/orchestrator/context/test_serialize.py
----------------------------------------------------------------------
diff --git a/tests/orchestrator/context/test_serialize.py b/tests/orchestrator/context/test_serialize.py
index 9a1250e..db45e8e 100644
--- a/tests/orchestrator/context/test_serialize.py
+++ b/tests/orchestrator/context/test_serialize.py
@@ -54,7 +54,6 @@ def _mock_workflow(ctx, graph):
                               plugin_specification=plugin_specification)
     )
     node.interfaces[interface.name] = interface
-    node.plugin_specifications[plugin_specification.name] = plugin_specification
     task = api.task.OperationTask.for_node(node=node, interface_name='test', operation_name='op')
     graph.add_tasks(task)
     return graph

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b3cf69ae/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 b635a88..80d2351 100644
--- a/tests/orchestrator/workflows/api/test_task.py
+++ b/tests/orchestrator/workflows/api/test_task.py
@@ -42,10 +42,10 @@ class TestOperationTask(object):
         interface_name = 'test_interface'
         operation_name = 'create'
 
-        plugin = mock.models.create_plugin('package', '0.1')
+        plugin = mock.models.create_plugin('test_plugin', '0.1')
         ctx.model.node.update(plugin)
 
-        plugin_specification = mock.models.create_plugin_specification('package', '0.1')
+        plugin_specification = mock.models.create_plugin_specification('test_plugin', '0.1')
 
         interface = mock.models.create_interface(
             ctx.service,
@@ -56,7 +56,6 @@ class TestOperationTask(object):
 
         node = ctx.model.node.get_by_name(mock.models.DEPENDENT_NODE_NAME)
         node.interfaces[interface_name] = interface
-        node.plugin_specifications[plugin_specification.name] = plugin_specification
         ctx.model.node.update(node)
         inputs = {'test_input': True}
         max_attempts = 10
@@ -92,10 +91,10 @@ class TestOperationTask(object):
         interface_name = 'test_interface'
         operation_name = 'preconfigure'
 
-        plugin = mock.models.create_plugin('package', '0.1')
-        ctx.model.node.update(plugin)
+        plugin = mock.models.create_plugin('test_plugin', '0.1')
+        ctx.model.plugin.update(plugin)
 
-        plugin_specification = mock.models.create_plugin_specification('package', '0.1')
+        plugin_specification = mock.models.create_plugin_specification('test_plugin', '0.1')
 
         interface = mock.models.create_interface(
             ctx.service,
@@ -107,8 +106,6 @@ class TestOperationTask(object):
 
         relationship = ctx.model.relationship.list()[0]
         relationship.interfaces[interface.name] = interface
-        relationship.source_node.plugin_specifications[plugin_specification.name] = \
-            plugin_specification
         inputs = {'test_input': True}
         max_attempts = 10
         retry_interval = 10
@@ -140,10 +137,10 @@ class TestOperationTask(object):
         interface_name = 'test_interface'
         operation_name = 'preconfigure'
 
-        plugin = mock.models.create_plugin('package', '0.1')
+        plugin = mock.models.create_plugin('test_plugin', '0.1')
         ctx.model.node.update(plugin)
 
-        plugin_specification = mock.models.create_plugin_specification('package', '0.1')
+        plugin_specification = mock.models.create_plugin_specification('test_plugin', '0.1')
 
         interface = mock.models.create_interface(
             ctx.service,
@@ -155,8 +152,6 @@ class TestOperationTask(object):
 
         relationship = ctx.model.relationship.list()[0]
         relationship.interfaces[interface.name] = interface
-        relationship.target_node.plugin_specifications[plugin_specification.name] = \
-            plugin_specification
         inputs = {'test_input': True}
         max_attempts = 10
         retry_interval = 10

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b3cf69ae/tests/orchestrator/workflows/core/test_task.py
----------------------------------------------------------------------
diff --git a/tests/orchestrator/workflows/core/test_task.py b/tests/orchestrator/workflows/core/test_task.py
index f3ce92f..18ca056 100644
--- a/tests/orchestrator/workflows/core/test_task.py
+++ b/tests/orchestrator/workflows/core/test_task.py
@@ -83,19 +83,12 @@ class TestOperationTask(object):
         return api_task, core_task
 
     def test_node_operation_task_creation(self, ctx):
-        storage_plugin = mock.models.create_plugin(
-            package_name='p1', package_version='0.1')
-        storage_plugin_specification = mock.models.create_plugin_specification(
-            package_name='p1', package_version='0.1')
-        storage_plugin_specification_other = mock.models.create_plugin(
-            package_name='p0', package_version='0.0')
+        storage_plugin = mock.models.create_plugin('p1', '0.1')
+        storage_plugin_other = mock.models.create_plugin('p0', '0.0')
         ctx.model.plugin.put(storage_plugin)
-        ctx.model.plugin_specification.put(storage_plugin_specification_other)
-        ctx.model.plugin_specification.put(storage_plugin_specification)
+        ctx.model.plugin.put(storage_plugin_other)
         node = ctx.model.node.get_by_name(mock.models.DEPENDENCY_NODE_NAME)
-        node_template = node.node_template
-        node_template.plugin_specifications[storage_plugin_specification.name] = \
-            storage_plugin_specification
+        storage_plugin_specification = mock.models.create_plugin_specification('p1', '0.1')
         interface = mock.models.create_interface(
             node.service,
             NODE_INTERFACE_NAME,
@@ -103,7 +96,6 @@ class TestOperationTask(object):
             operation_kwargs=dict(plugin_specification=storage_plugin_specification)
         )
         node.interfaces[interface.name] = interface
-        ctx.model.node_template.update(node_template)
         ctx.model.node.update(node)
         api_task, core_task = self._create_node_operation_task(ctx, node)
         storage_task = ctx.model.task.get_by_name(core_task.name)

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b3cf69ae/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 3afcf5f..b950fa4 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
@@ -1,18 +1,17 @@
+# 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
 #
-# Copyright (c) 2016 GigaSpaces Technologies Ltd. All rights reserved.
-# 
-# Licensed 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.
+#     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.
 
 # NFV is not used here, but we are using it just to validate the imports
 tosca_definitions_version: tosca_simple_profile_for_nfv_1_0
@@ -33,7 +32,7 @@ imports:
   - types/nodejs.yaml
   - types/mongodb.yaml
   - types/nginx.yaml
-  - types/aria.yaml
+  - aria-1.0
 
 dsl_definitions:
 
@@ -254,9 +253,8 @@ topology_template:
         Juju plugin executes charms.
       type: aria.Plugin
       properties:
-        executor: host_agent
-        install: false
-    
+        version: 1.0
+
     maintenance_on:
       type: MaintenanceWorkflow
       properties:
@@ -284,16 +282,10 @@ policy_types:
       client connections cleanly and shut down services. 
     derived_from: aria.Workflow
     properties:
-      function: # @override
-        type: string
-        default: workflows.maintenance
       implementation:
         type: string
-        default: tests/resources/service-templates/tosca-simple-1.0/node-cellar
+        default: workflows.maintenance
       enabled:
         description: >-
           Whether to turn maintenance mode on or off.
         type: boolean
-      #ctx:
-      #  type: string
-      #  default: abc

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b3cf69ae/tests/resources/service-templates/tosca-simple-1.0/node-cellar/types/aria.yaml
----------------------------------------------------------------------
diff --git a/tests/resources/service-templates/tosca-simple-1.0/node-cellar/types/aria.yaml b/tests/resources/service-templates/tosca-simple-1.0/node-cellar/types/aria.yaml
deleted file mode 100644
index 2ddb238..0000000
--- a/tests/resources/service-templates/tosca-simple-1.0/node-cellar/types/aria.yaml
+++ /dev/null
@@ -1,93 +0,0 @@
-
-policy_types:
-
-  aria.Plugin:
-    _extensions:
-      role: plugin
-    description: >-
-      ARIA Plugin definition.
-    derived_from: tosca.policies.Root
-    properties:
-      executor:
-        description: >-
-          Where to execute the plugin's operations.
-        type: string
-        constraints:
-          - valid_values: [ central_deployment_agent, host_agent ]
-      source:
-        description: >-
-          Where to execute the plugin's operations. Where to retrieve the plugin from. Could be
-          either a path relative to the plugins dir inside the blueprint's root dir or a url. If
-          install is false, source is redundant. If install is true, source (or package_name) is
-          mandatory.
-        type: string
-        required: false
-      install_arguments:
-        description: >-
-          Optional arguments passed to the 'pip install' command created for the plugin
-          installation.
-        type: string
-        required: false
-      install:
-        description: >-
-          Whether to install the plugin or not as it might already be installed as part of the
-          agent.
-        type: boolean
-        default: true
-      package_name:
-        description: >-
-          Managed plugin package name. If install is false, package_name is redundant. If install is
-          true, package_name (or source) is mandatory.
-        type: string
-        required: false
-      package_version:
-        description: >-
-          Managed plugin package version.
-        type: string
-        required: false
-      supported_platform:
-        description: >-
-          Managed plugin supported platform (e.g. linux_x86_64).
-        type: string
-        required: false
-      supported_distribution:
-        description: >-
-          Managed plugin distribution.
-        type: string
-        required: false
-      distribution_version:
-        description: >-
-          Managed plugin distribution version.
-        type: string
-        required: false
-      distribution_release:
-        description: >-
-          Managed plugin distribution release.
-        type: string
-        required: false
-
-  aria.Workflow:
-    _extensions:
-      role: workflow
-    description: >-
-      ARIA Workflow definition.
-    derived_from: tosca.policies.Root
-    properties:
-      function:
-        description: >-
-          Python workflow function.
-        type: string
-      implementation:
-        description: >-
-          The implementation artifact name (i.e., the primary script file name within a TOSCA CSAR
-          file).
-        type: string
-        required: false
-      dependencies:
-        description: >-
-          The optional ordered list of one or more dependent or secondary implementation artifact
-          name which are referenced by the primary implementation artifact (e.g., a library the
-          script installs or a secondary script).
-        type: list
-        entry_schema: string
-        required: false

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b3cf69ae/tests/resources/service-templates/tosca-simple-1.0/node-cellar/types/mongodb.yaml
----------------------------------------------------------------------
diff --git a/tests/resources/service-templates/tosca-simple-1.0/node-cellar/types/mongodb.yaml b/tests/resources/service-templates/tosca-simple-1.0/node-cellar/types/mongodb.yaml
index 612dbcb..34d0a9d 100644
--- a/tests/resources/service-templates/tosca-simple-1.0/node-cellar/types/mongodb.yaml
+++ b/tests/resources/service-templates/tosca-simple-1.0/node-cellar/types/mongodb.yaml
@@ -1,18 +1,17 @@
+# 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
 #
-# Copyright (c) 2016 GigaSpaces Technologies Ltd. All rights reserved.
-# 
-# Licensed 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.
+#     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.
 
 imports:
   - os.yaml

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b3cf69ae/tests/resources/service-templates/tosca-simple-1.0/node-cellar/types/nginx.yaml
----------------------------------------------------------------------
diff --git a/tests/resources/service-templates/tosca-simple-1.0/node-cellar/types/nginx.yaml b/tests/resources/service-templates/tosca-simple-1.0/node-cellar/types/nginx.yaml
index 8986a21..eab130f 100644
--- a/tests/resources/service-templates/tosca-simple-1.0/node-cellar/types/nginx.yaml
+++ b/tests/resources/service-templates/tosca-simple-1.0/node-cellar/types/nginx.yaml
@@ -1,18 +1,17 @@
+# 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
 #
-# Copyright (c) 2016 GigaSpaces Technologies Ltd. All rights reserved.
-# 
-# Licensed 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.
+#     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.
 
 node_types:
 

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b3cf69ae/tests/resources/service-templates/tosca-simple-1.0/node-cellar/types/nodejs.yaml
----------------------------------------------------------------------
diff --git a/tests/resources/service-templates/tosca-simple-1.0/node-cellar/types/nodejs.yaml b/tests/resources/service-templates/tosca-simple-1.0/node-cellar/types/nodejs.yaml
index ec8dd83..4fd4e72 100644
--- a/tests/resources/service-templates/tosca-simple-1.0/node-cellar/types/nodejs.yaml
+++ b/tests/resources/service-templates/tosca-simple-1.0/node-cellar/types/nodejs.yaml
@@ -1,18 +1,17 @@
+# 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
 #
-# Copyright (c) 2016 GigaSpaces Technologies Ltd. All rights reserved.
-# 
-# Licensed 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.
+#     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.
 
 imports:
   - os.yaml

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b3cf69ae/tests/resources/service-templates/tosca-simple-1.0/node-cellar/types/openstack.yaml
----------------------------------------------------------------------
diff --git a/tests/resources/service-templates/tosca-simple-1.0/node-cellar/types/openstack.yaml b/tests/resources/service-templates/tosca-simple-1.0/node-cellar/types/openstack.yaml
index a18da53..de5fb47 100644
--- a/tests/resources/service-templates/tosca-simple-1.0/node-cellar/types/openstack.yaml
+++ b/tests/resources/service-templates/tosca-simple-1.0/node-cellar/types/openstack.yaml
@@ -1,18 +1,17 @@
+# 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
 #
-# Copyright (c) 2016 GigaSpaces Technologies Ltd. All rights reserved.
-# 
-# Licensed 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.
+#     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.
 
 imports:
   - os.yaml

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b3cf69ae/tests/resources/service-templates/tosca-simple-1.0/node-cellar/types/os.yaml
----------------------------------------------------------------------
diff --git a/tests/resources/service-templates/tosca-simple-1.0/node-cellar/types/os.yaml b/tests/resources/service-templates/tosca-simple-1.0/node-cellar/types/os.yaml
index 43ea78c..adc6363 100644
--- a/tests/resources/service-templates/tosca-simple-1.0/node-cellar/types/os.yaml
+++ b/tests/resources/service-templates/tosca-simple-1.0/node-cellar/types/os.yaml
@@ -1,18 +1,17 @@
+# 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
 #
-# Copyright (c) 2016 GigaSpaces Technologies Ltd. All rights reserved.
-# 
-# Licensed 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.
+#     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.
 
 dsl_definitions: