incubator-ariatosca git commit: ARIA-324 Refactor ctx proxy access [Forced Update!]

2017-08-08 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-324-refactor-ctx-access 8a3f8b735 -> a43bc6b17 (forced update)


ARIA-324 Refactor ctx proxy access

Our previous use of "." to delimit nested dict keys was wrong (keys
could have a ".") and inflexible. The new implementation uses subsequent
args to move into the dict. The same format can now be used to access
object attributes.

This commit also changes how to support setting values: we must now use
"=" as the penultimate argument with the new value following.

Calling functions now requires delimiting function arguments via "[" and
"]" arguments. This makes it possible to continue accessing the return
value of a function after the "]".

Also fixed: callables will now "grab" the number of args they need
instead of all remaining args, making it possible to do further
inspection on the returned value from the callable. To allow for this,
kwargs are now expected as the first arg rather than the last.

Relatedly, this commit instruments all parameter fields from all models
and fixes related bugs in the instrumentation implementation.

Furthmore, this commit fixes a bad null check in the ctx client, and
also allows it to retrieve Unicode data.


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

Branch: refs/heads/ARIA-324-refactor-ctx-access
Commit: a43bc6b1706398dd79eabb2f49b6dafcadc8dfde
Parents: 51e4ed0
Author: Tal Liron 
Authored: Thu Jul 27 17:58:17 2017 -0500
Committer: Tal Liron 
Committed: Tue Aug 8 09:32:15 2017 -0500

--
 .travis.yml |   2 +-
 aria/orchestrator/context/common.py |  19 +-
 aria/orchestrator/context/operation.py  |  46 ++---
 .../execution_plugin/ctx_proxy/client.py|   7 +-
 .../execution_plugin/ctx_proxy/server.py| 196 +--
 aria/orchestrator/workflows/api/task.py |  13 +-
 aria/storage/collection_instrumentation.py  |  88 -
 aria/storage/core.py|   6 +-
 examples/hello-world/scripts/configure.sh   |  29 ++-
 examples/hello-world/scripts/start.sh   |  38 ++--
 examples/hello-world/scripts/stop.sh|  17 +-
 tests/end2end/testenv.py|  24 ++-
 .../execution_plugin/test_ctx_proxy_server.py   | 150 --
 .../orchestrator/execution_plugin/test_local.py |  94 -
 tests/requirements.txt  |   6 +-
 tests/resources/scripts/test_ssh.sh |  46 ++---
 tox.ini |   8 +-
 17 files changed, 358 insertions(+), 431 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/a43bc6b1/.travis.yml
--
diff --git a/.travis.yml b/.travis.yml
index edd12d4..c8b7645 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -15,7 +15,7 @@ sudo: false
 language: python
 
 python:
-  - "2.7"
+  - '2.7'
 
 env:
   - TOX_ENV=pylint_code

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/a43bc6b1/aria/orchestrator/context/common.py
--
diff --git a/aria/orchestrator/context/common.py 
b/aria/orchestrator/context/common.py
index f400142..3c5f618 100644
--- a/aria/orchestrator/context/common.py
+++ b/aria/orchestrator/context/common.py
@@ -38,10 +38,27 @@ class BaseContext(object):
 """
 
 INSTRUMENTATION_FIELDS = (
+modeling.models.Service.inputs,
+modeling.models.ServiceTemplate.inputs,
+modeling.models.Policy.properties,
+modeling.models.PolicyTemplate.properties,
 modeling.models.Node.attributes,
 modeling.models.Node.properties,
 modeling.models.NodeTemplate.attributes,
-modeling.models.NodeTemplate.properties
+modeling.models.NodeTemplate.properties,
+modeling.models.Group.properties,
+modeling.models.GroupTemplate.properties,
+modeling.models.Capability.properties,
+# TODO ARIA-279: modeling.models.Capability.attributes,
+modeling.models.CapabilityTemplate.properties,
+# TODO ARIA-279: modeling.models.CapabilityTemplate.attributes
+modeling.models.Relationship.properties,
+modeling.models.Artifact.properties,
+modeling.models.ArtifactTemplate.properties,
+modeling.models.Interface.inputs,
+modeling.models.InterfaceTemplate.inputs,
+modeling.models.Operation.inputs,
+

incubator-ariatosca git commit: ARIA-324 Refactor ctx proxy access [Forced Update!]

2017-07-28 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-324-refactor-ctx-access 8d61120f2 -> 3f5a2715f (forced update)


ARIA-324 Refactor ctx proxy access

Our previous use of "." to delimit nested dict keys was wrong (keys
could have a ".") and inflexible. The new implementation uses subsequent
args to move into the dict. The same format can now be used to access
object attributes.

This commit also changes how to support setting values: we must now use
"=" as the penultimate argument with the new value following.

Also fixed: callables will now "grab" the number of args they need
instead of all remaining args, making it possible to do further
inspection on the returned value from the callable. To allow for this,
kwargs are now expected as the first arg rather than the last.

Relatedly, this commit instruments all parameter fields from all models
and fixes related bugs in the instrumentation implementation.

Furthmore, this commit fixes a bad null check in the ctx client, and
also allows it to retrieve Unicode data.


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

Branch: refs/heads/ARIA-324-refactor-ctx-access
Commit: 3f5a2715f643b0d341884dd37b60fc935adbc897
Parents: c2b8e65
Author: Tal Liron 
Authored: Thu Jul 27 17:58:17 2017 -0500
Committer: Tal Liron 
Committed: Fri Jul 28 16:53:10 2017 -0500

--
 aria/orchestrator/context/common.py |  19 ++-
 aria/orchestrator/context/operation.py  |  46 +++--
 .../execution_plugin/ctx_proxy/client.py|   7 +-
 .../execution_plugin/ctx_proxy/server.py| 169 ++-
 aria/orchestrator/workflows/api/task.py |  13 +-
 aria/storage/collection_instrumentation.py  |  88 +-
 aria/storage/core.py|   6 +-
 examples/hello-world/scripts/configure.sh   |   6 +-
 examples/hello-world/scripts/start.sh   |  13 +-
 examples/hello-world/scripts/stop.sh|   4 +-
 tests/end2end/testenv.py|  24 ++-
 .../execution_plugin/test_ctx_proxy_server.py   | 111 +++-
 .../orchestrator/execution_plugin/test_local.py |  34 ++--
 tests/resources/scripts/test_ssh.sh |  30 ++--
 14 files changed, 274 insertions(+), 296 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/3f5a2715/aria/orchestrator/context/common.py
--
diff --git a/aria/orchestrator/context/common.py 
b/aria/orchestrator/context/common.py
index f400142..3c5f618 100644
--- a/aria/orchestrator/context/common.py
+++ b/aria/orchestrator/context/common.py
@@ -38,10 +38,27 @@ class BaseContext(object):
 """
 
 INSTRUMENTATION_FIELDS = (
+modeling.models.Service.inputs,
+modeling.models.ServiceTemplate.inputs,
+modeling.models.Policy.properties,
+modeling.models.PolicyTemplate.properties,
 modeling.models.Node.attributes,
 modeling.models.Node.properties,
 modeling.models.NodeTemplate.attributes,
-modeling.models.NodeTemplate.properties
+modeling.models.NodeTemplate.properties,
+modeling.models.Group.properties,
+modeling.models.GroupTemplate.properties,
+modeling.models.Capability.properties,
+# TODO ARIA-279: modeling.models.Capability.attributes,
+modeling.models.CapabilityTemplate.properties,
+# TODO ARIA-279: modeling.models.CapabilityTemplate.attributes
+modeling.models.Relationship.properties,
+modeling.models.Artifact.properties,
+modeling.models.ArtifactTemplate.properties,
+modeling.models.Interface.inputs,
+modeling.models.InterfaceTemplate.inputs,
+modeling.models.Operation.inputs,
+modeling.models.OperationTemplate.inputs
 )
 
 class PrefixedLogger(object):

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/3f5a2715/aria/orchestrator/context/operation.py
--
diff --git a/aria/orchestrator/context/operation.py 
b/aria/orchestrator/context/operation.py
index 7d5f40c..8613ec3 100644
--- a/aria/orchestrator/context/operation.py
+++ b/aria/orchestrator/context/operation.py
@@ -48,8 +48,7 @@ class BaseOperationContext(common.BaseContext):
 @property
 def task(self):
 """
-The task in the model storage
-:return: Task model
+The task in the model storage.
 """
 # SQLAlchemy prevents from accessing an object 

incubator-ariatosca git commit: ARIA-324 Refactor ctx proxy access [Forced Update!]

2017-07-28 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-324-refactor-ctx-access 463cae7c0 -> 8d61120f2 (forced update)


ARIA-324 Refactor ctx proxy access

Our previous use of "." to delimit nested dict keys was wrong (keys
could have a ".") and inflexible. The new implementation uses subsequent
args to move into the dict. The same format can now be used to access
object attributes.

This commit also changes how to support setting values: we must now use
"=" as the penultimate argument with the new value following.

Also fixed: callables will now "grab" the number of args they need
instead of all remaining args, making it possible to do further
inspection on the returned value from the callable. To allow for this,
kwargs are now expected as the first arg rather than the last.

Relatedly, this commit instruments all parameter fields from all models
and fixes related bugs in the instrumentation implementation.

Furthmore, this commit fixes a bad null check in the ctx client, and
also allows it to retrieve Unicode data.


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

Branch: refs/heads/ARIA-324-refactor-ctx-access
Commit: 8d61120f2f37e5b57bf8bc4d902e5cf24c62dcf6
Parents: c2b8e65
Author: Tal Liron 
Authored: Thu Jul 27 17:58:17 2017 -0500
Committer: Tal Liron 
Committed: Fri Jul 28 15:53:43 2017 -0500

--
 aria/orchestrator/context/common.py |  19 ++-
 aria/orchestrator/context/operation.py  |  46 +++---
 .../execution_plugin/ctx_proxy/client.py|   7 +-
 .../execution_plugin/ctx_proxy/server.py| 153 +--
 aria/orchestrator/workflows/api/task.py |  13 +-
 aria/storage/collection_instrumentation.py  |  88 +--
 aria/storage/core.py|   6 +-
 examples/hello-world/scripts/configure.sh   |   6 +-
 examples/hello-world/scripts/start.sh   |  13 +-
 examples/hello-world/scripts/stop.sh|   4 +-
 tests/end2end/testenv.py|  24 +--
 .../execution_plugin/test_ctx_proxy_server.py   | 111 --
 .../orchestrator/execution_plugin/test_local.py |  34 ++---
 tests/resources/scripts/test_ssh.sh |  30 ++--
 14 files changed, 258 insertions(+), 296 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/8d61120f/aria/orchestrator/context/common.py
--
diff --git a/aria/orchestrator/context/common.py 
b/aria/orchestrator/context/common.py
index f400142..3c5f618 100644
--- a/aria/orchestrator/context/common.py
+++ b/aria/orchestrator/context/common.py
@@ -38,10 +38,27 @@ class BaseContext(object):
 """
 
 INSTRUMENTATION_FIELDS = (
+modeling.models.Service.inputs,
+modeling.models.ServiceTemplate.inputs,
+modeling.models.Policy.properties,
+modeling.models.PolicyTemplate.properties,
 modeling.models.Node.attributes,
 modeling.models.Node.properties,
 modeling.models.NodeTemplate.attributes,
-modeling.models.NodeTemplate.properties
+modeling.models.NodeTemplate.properties,
+modeling.models.Group.properties,
+modeling.models.GroupTemplate.properties,
+modeling.models.Capability.properties,
+# TODO ARIA-279: modeling.models.Capability.attributes,
+modeling.models.CapabilityTemplate.properties,
+# TODO ARIA-279: modeling.models.CapabilityTemplate.attributes
+modeling.models.Relationship.properties,
+modeling.models.Artifact.properties,
+modeling.models.ArtifactTemplate.properties,
+modeling.models.Interface.inputs,
+modeling.models.InterfaceTemplate.inputs,
+modeling.models.Operation.inputs,
+modeling.models.OperationTemplate.inputs
 )
 
 class PrefixedLogger(object):

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/8d61120f/aria/orchestrator/context/operation.py
--
diff --git a/aria/orchestrator/context/operation.py 
b/aria/orchestrator/context/operation.py
index 7d5f40c..8613ec3 100644
--- a/aria/orchestrator/context/operation.py
+++ b/aria/orchestrator/context/operation.py
@@ -48,8 +48,7 @@ class BaseOperationContext(common.BaseContext):
 @property
 def task(self):
 """
-The task in the model storage
-:return: Task model
+The task in the model storage.
 """
 # SQLAlchemy prevents from accessing an 

incubator-ariatosca git commit: ARIA-324 Refactor ctx proxy access [Forced Update!]

2017-07-28 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-324-refactor-ctx-access ddb85e240 -> 463cae7c0 (forced update)


ARIA-324 Refactor ctx proxy access

Our previous use of "." to delimit nested dict keys was wrong (keys
could have a ".") and inflexible. The new implementation uses subsequent
args to move into the dict. The same format can now be used to access
object attributes.

This commit also changes how to support setting values: we must now use
"=" as the penultimate argument with the new value following.

Also fixed: callables will now "grab" the number of args they need
instead of all remaining args, making it possible to do further
inspection on the returned value from the callable. To allow for this,
kwargs are now expected as the first arg rather than the last.

Relatedly, this commit instruments all parameter fields from all models
and fixes related bugs in the instrumentation implementation.

Furthmore, this commit fixes a bad null check in the ctx client, and
also allows it to retrieve Unicode data.


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

Branch: refs/heads/ARIA-324-refactor-ctx-access
Commit: 463cae7c091d05f1d7213706028259773b884fa7
Parents: c2b8e65
Author: Tal Liron 
Authored: Thu Jul 27 17:58:17 2017 -0500
Committer: Tal Liron 
Committed: Fri Jul 28 13:06:01 2017 -0500

--
 aria/orchestrator/context/common.py |  19 ++-
 aria/orchestrator/context/operation.py  |  46 +++---
 .../execution_plugin/ctx_proxy/client.py|   7 +-
 .../execution_plugin/ctx_proxy/server.py| 149 +--
 aria/orchestrator/workflows/api/task.py |  13 +-
 aria/storage/collection_instrumentation.py  |  88 +--
 aria/storage/core.py|   6 +-
 .../execution_plugin/test_ctx_proxy_server.py   | 111 --
 .../orchestrator/execution_plugin/test_local.py |  34 ++---
 tests/resources/scripts/test_ssh.sh |  30 ++--
 10 files changed, 228 insertions(+), 275 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/463cae7c/aria/orchestrator/context/common.py
--
diff --git a/aria/orchestrator/context/common.py 
b/aria/orchestrator/context/common.py
index f400142..3c5f618 100644
--- a/aria/orchestrator/context/common.py
+++ b/aria/orchestrator/context/common.py
@@ -38,10 +38,27 @@ class BaseContext(object):
 """
 
 INSTRUMENTATION_FIELDS = (
+modeling.models.Service.inputs,
+modeling.models.ServiceTemplate.inputs,
+modeling.models.Policy.properties,
+modeling.models.PolicyTemplate.properties,
 modeling.models.Node.attributes,
 modeling.models.Node.properties,
 modeling.models.NodeTemplate.attributes,
-modeling.models.NodeTemplate.properties
+modeling.models.NodeTemplate.properties,
+modeling.models.Group.properties,
+modeling.models.GroupTemplate.properties,
+modeling.models.Capability.properties,
+# TODO ARIA-279: modeling.models.Capability.attributes,
+modeling.models.CapabilityTemplate.properties,
+# TODO ARIA-279: modeling.models.CapabilityTemplate.attributes
+modeling.models.Relationship.properties,
+modeling.models.Artifact.properties,
+modeling.models.ArtifactTemplate.properties,
+modeling.models.Interface.inputs,
+modeling.models.InterfaceTemplate.inputs,
+modeling.models.Operation.inputs,
+modeling.models.OperationTemplate.inputs
 )
 
 class PrefixedLogger(object):

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/463cae7c/aria/orchestrator/context/operation.py
--
diff --git a/aria/orchestrator/context/operation.py 
b/aria/orchestrator/context/operation.py
index 7d5f40c..8613ec3 100644
--- a/aria/orchestrator/context/operation.py
+++ b/aria/orchestrator/context/operation.py
@@ -48,8 +48,7 @@ class BaseOperationContext(common.BaseContext):
 @property
 def task(self):
 """
-The task in the model storage
-:return: Task model
+The task in the model storage.
 """
 # SQLAlchemy prevents from accessing an object which was created on a 
different thread.
 # So we retrieve the object from the storage if the current thread 
isn't the same as the
@@ -62,7 +61,7 @@ class BaseOperationContext(common.BaseContext):
 @property
 

[1/3] incubator-ariatosca git commit: ARIA-324 Refactor ctx proxy access [Forced Update!]

2017-07-27 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-321-clearwater 80bae440b -> a638acdf1 (forced update)


ARIA-324 Refactor ctx proxy access

Our previous use of "." to delimit nested dict keys was wrong (keys
could have a ".") and inflexible. The new implementation uses subsequent
args to move into the dict. The same format can now be used to access
object attributes.

This commit also changes how to support setting values: we must now use
"=" as the penultimate argument with the new value following.

Also fixed: callables will now "grab" the number of args they need
instead of all remaining args, making it possible to do further
inspection on the returned value from the callable. To allow for this,
kwargs are now expected as the first arg rather than the last.

Relatedly, this commit instruments all parameter fields from all models
and fixes related bugs in the instrumentation implementation.

Furthmore, this commit fixes a bad null check in the ctx client, and
also allows it to retrieve Unicode data.


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

Branch: refs/heads/ARIA-321-clearwater
Commit: ddb85e240de400ef81b140240f8bc2036cd24b80
Parents: c2b8e65
Author: Tal Liron 
Authored: Thu Jul 27 17:58:17 2017 -0500
Committer: Tal Liron 
Committed: Thu Jul 27 21:50:50 2017 -0500

--
 aria/orchestrator/context/common.py |  19 ++-
 aria/orchestrator/context/operation.py  |  46 +++---
 .../execution_plugin/ctx_proxy/client.py|   7 +-
 .../execution_plugin/ctx_proxy/server.py| 144 +--
 aria/orchestrator/workflows/api/task.py |  13 +-
 aria/storage/collection_instrumentation.py  |  88 ++--
 aria/storage/core.py|   6 +-
 .../execution_plugin/test_ctx_proxy_server.py   |  96 ++---
 .../orchestrator/execution_plugin/test_local.py |  34 ++---
 9 files changed, 193 insertions(+), 260 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ddb85e24/aria/orchestrator/context/common.py
--
diff --git a/aria/orchestrator/context/common.py 
b/aria/orchestrator/context/common.py
index f400142..3c5f618 100644
--- a/aria/orchestrator/context/common.py
+++ b/aria/orchestrator/context/common.py
@@ -38,10 +38,27 @@ class BaseContext(object):
 """
 
 INSTRUMENTATION_FIELDS = (
+modeling.models.Service.inputs,
+modeling.models.ServiceTemplate.inputs,
+modeling.models.Policy.properties,
+modeling.models.PolicyTemplate.properties,
 modeling.models.Node.attributes,
 modeling.models.Node.properties,
 modeling.models.NodeTemplate.attributes,
-modeling.models.NodeTemplate.properties
+modeling.models.NodeTemplate.properties,
+modeling.models.Group.properties,
+modeling.models.GroupTemplate.properties,
+modeling.models.Capability.properties,
+# TODO ARIA-279: modeling.models.Capability.attributes,
+modeling.models.CapabilityTemplate.properties,
+# TODO ARIA-279: modeling.models.CapabilityTemplate.attributes
+modeling.models.Relationship.properties,
+modeling.models.Artifact.properties,
+modeling.models.ArtifactTemplate.properties,
+modeling.models.Interface.inputs,
+modeling.models.InterfaceTemplate.inputs,
+modeling.models.Operation.inputs,
+modeling.models.OperationTemplate.inputs
 )
 
 class PrefixedLogger(object):

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ddb85e24/aria/orchestrator/context/operation.py
--
diff --git a/aria/orchestrator/context/operation.py 
b/aria/orchestrator/context/operation.py
index 7d5f40c..8613ec3 100644
--- a/aria/orchestrator/context/operation.py
+++ b/aria/orchestrator/context/operation.py
@@ -48,8 +48,7 @@ class BaseOperationContext(common.BaseContext):
 @property
 def task(self):
 """
-The task in the model storage
-:return: Task model
+The task in the model storage.
 """
 # SQLAlchemy prevents from accessing an object which was created on a 
different thread.
 # So we retrieve the object from the storage if the current thread 
isn't the same as the
@@ -62,7 +61,7 @@ class BaseOperationContext(common.BaseContext):
 @property
 def plugin_workdir(self):
 """
-A work directory that is unique 

incubator-ariatosca git commit: ARIA-324 Refactor ctx proxy access [Forced Update!]

2017-07-27 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-324-refactor-ctx-access c4ee51772 -> ddb85e240 (forced update)


ARIA-324 Refactor ctx proxy access

Our previous use of "." to delimit nested dict keys was wrong (keys
could have a ".") and inflexible. The new implementation uses subsequent
args to move into the dict. The same format can now be used to access
object attributes.

This commit also changes how to support setting values: we must now use
"=" as the penultimate argument with the new value following.

Also fixed: callables will now "grab" the number of args they need
instead of all remaining args, making it possible to do further
inspection on the returned value from the callable. To allow for this,
kwargs are now expected as the first arg rather than the last.

Relatedly, this commit instruments all parameter fields from all models
and fixes related bugs in the instrumentation implementation.

Furthmore, this commit fixes a bad null check in the ctx client, and
also allows it to retrieve Unicode data.


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

Branch: refs/heads/ARIA-324-refactor-ctx-access
Commit: ddb85e240de400ef81b140240f8bc2036cd24b80
Parents: c2b8e65
Author: Tal Liron 
Authored: Thu Jul 27 17:58:17 2017 -0500
Committer: Tal Liron 
Committed: Thu Jul 27 21:50:50 2017 -0500

--
 aria/orchestrator/context/common.py |  19 ++-
 aria/orchestrator/context/operation.py  |  46 +++---
 .../execution_plugin/ctx_proxy/client.py|   7 +-
 .../execution_plugin/ctx_proxy/server.py| 144 +--
 aria/orchestrator/workflows/api/task.py |  13 +-
 aria/storage/collection_instrumentation.py  |  88 ++--
 aria/storage/core.py|   6 +-
 .../execution_plugin/test_ctx_proxy_server.py   |  96 ++---
 .../orchestrator/execution_plugin/test_local.py |  34 ++---
 9 files changed, 193 insertions(+), 260 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ddb85e24/aria/orchestrator/context/common.py
--
diff --git a/aria/orchestrator/context/common.py 
b/aria/orchestrator/context/common.py
index f400142..3c5f618 100644
--- a/aria/orchestrator/context/common.py
+++ b/aria/orchestrator/context/common.py
@@ -38,10 +38,27 @@ class BaseContext(object):
 """
 
 INSTRUMENTATION_FIELDS = (
+modeling.models.Service.inputs,
+modeling.models.ServiceTemplate.inputs,
+modeling.models.Policy.properties,
+modeling.models.PolicyTemplate.properties,
 modeling.models.Node.attributes,
 modeling.models.Node.properties,
 modeling.models.NodeTemplate.attributes,
-modeling.models.NodeTemplate.properties
+modeling.models.NodeTemplate.properties,
+modeling.models.Group.properties,
+modeling.models.GroupTemplate.properties,
+modeling.models.Capability.properties,
+# TODO ARIA-279: modeling.models.Capability.attributes,
+modeling.models.CapabilityTemplate.properties,
+# TODO ARIA-279: modeling.models.CapabilityTemplate.attributes
+modeling.models.Relationship.properties,
+modeling.models.Artifact.properties,
+modeling.models.ArtifactTemplate.properties,
+modeling.models.Interface.inputs,
+modeling.models.InterfaceTemplate.inputs,
+modeling.models.Operation.inputs,
+modeling.models.OperationTemplate.inputs
 )
 
 class PrefixedLogger(object):

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ddb85e24/aria/orchestrator/context/operation.py
--
diff --git a/aria/orchestrator/context/operation.py 
b/aria/orchestrator/context/operation.py
index 7d5f40c..8613ec3 100644
--- a/aria/orchestrator/context/operation.py
+++ b/aria/orchestrator/context/operation.py
@@ -48,8 +48,7 @@ class BaseOperationContext(common.BaseContext):
 @property
 def task(self):
 """
-The task in the model storage
-:return: Task model
+The task in the model storage.
 """
 # SQLAlchemy prevents from accessing an object which was created on a 
different thread.
 # So we retrieve the object from the storage if the current thread 
isn't the same as the
@@ -62,7 +61,7 @@ class BaseOperationContext(common.BaseContext):
 @property
 def plugin_workdir(self):
 """
-A work 

incubator-ariatosca git commit: ARIA-324 Refactor ctx proxy access [Forced Update!]

2017-07-27 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-324-refactor-ctx-access 956e98b20 -> c4ee51772 (forced update)


ARIA-324 Refactor ctx proxy access

Our previous use of "." to delimit nested dict keys was wrong (keys
could have a ".") and inflexible. The new implementation uses subsequent
args to move into the dict. The same format can now be used to access
object attributes.

This commit also changes how to support setting values: we must now use
"=" as the penultimate argument with the new value following.

Also fixed: callables will now "grab" the number of args they need
instead of all remaining args, making it possible to do further
inspection on the returned value from the callable. To allow for this,
kwargs are now expected as the first arg rather than the last.

Relatedly, this commit instruments all parameter fields from all models
and fixes related bugs in the instrumentation implementation.

Furthmore, this commit fixes a bad null check in the ctx client, and
also allows it to retrieve Unicode data.


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

Branch: refs/heads/ARIA-324-refactor-ctx-access
Commit: c4ee51772294b3355d135baae09769f4c188f62d
Parents: c2b8e65
Author: Tal Liron 
Authored: Thu Jul 27 17:58:17 2017 -0500
Committer: Tal Liron 
Committed: Thu Jul 27 21:36:42 2017 -0500

--
 aria/orchestrator/context/common.py |  19 ++-
 aria/orchestrator/context/operation.py  |  46 +++---
 .../execution_plugin/ctx_proxy/client.py|   7 +-
 .../execution_plugin/ctx_proxy/server.py| 145 +--
 aria/orchestrator/workflows/api/task.py |  13 +-
 aria/storage/collection_instrumentation.py  |  88 +--
 aria/storage/core.py|   6 +-
 .../execution_plugin/test_ctx_proxy_server.py   |  96 ++--
 .../orchestrator/execution_plugin/test_local.py |  34 ++---
 9 files changed, 194 insertions(+), 260 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/c4ee5177/aria/orchestrator/context/common.py
--
diff --git a/aria/orchestrator/context/common.py 
b/aria/orchestrator/context/common.py
index f400142..3c5f618 100644
--- a/aria/orchestrator/context/common.py
+++ b/aria/orchestrator/context/common.py
@@ -38,10 +38,27 @@ class BaseContext(object):
 """
 
 INSTRUMENTATION_FIELDS = (
+modeling.models.Service.inputs,
+modeling.models.ServiceTemplate.inputs,
+modeling.models.Policy.properties,
+modeling.models.PolicyTemplate.properties,
 modeling.models.Node.attributes,
 modeling.models.Node.properties,
 modeling.models.NodeTemplate.attributes,
-modeling.models.NodeTemplate.properties
+modeling.models.NodeTemplate.properties,
+modeling.models.Group.properties,
+modeling.models.GroupTemplate.properties,
+modeling.models.Capability.properties,
+# TODO ARIA-279: modeling.models.Capability.attributes,
+modeling.models.CapabilityTemplate.properties,
+# TODO ARIA-279: modeling.models.CapabilityTemplate.attributes
+modeling.models.Relationship.properties,
+modeling.models.Artifact.properties,
+modeling.models.ArtifactTemplate.properties,
+modeling.models.Interface.inputs,
+modeling.models.InterfaceTemplate.inputs,
+modeling.models.Operation.inputs,
+modeling.models.OperationTemplate.inputs
 )
 
 class PrefixedLogger(object):

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/c4ee5177/aria/orchestrator/context/operation.py
--
diff --git a/aria/orchestrator/context/operation.py 
b/aria/orchestrator/context/operation.py
index 7d5f40c..8613ec3 100644
--- a/aria/orchestrator/context/operation.py
+++ b/aria/orchestrator/context/operation.py
@@ -48,8 +48,7 @@ class BaseOperationContext(common.BaseContext):
 @property
 def task(self):
 """
-The task in the model storage
-:return: Task model
+The task in the model storage.
 """
 # SQLAlchemy prevents from accessing an object which was created on a 
different thread.
 # So we retrieve the object from the storage if the current thread 
isn't the same as the
@@ -62,7 +61,7 @@ class BaseOperationContext(common.BaseContext):
 @property
 def plugin_workdir(self):
 """
-A work directory 

incubator-ariatosca git commit: ARIA-324 Refactor ctx proxy access [Forced Update!]

2017-07-27 Thread emblemparade
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-324-refactor-ctx-access 638a4346d -> 956e98b20 (forced update)


ARIA-324 Refactor ctx proxy access

Our previous use of "." to delimit nested dict keys was wrong (keys
could have a ".") and inflexible. The new implementation uses subsequent
args to move into the dict. The same format can now be used to access
object attributes.

This commit also changes how to support setting values: we must now use
"=" as the penultimate argument with the new value following.

Also fixed: callables will now "grab" the number of args they need
instead of all remaining args, making it possible to do further
inspection on the returned value from the callable. To allow for this,
kwargs are now expected as the first arg rather than the last.

Relatedly, this commit instruments all parameter fields from all models
and fixes related bugs in the instrumentation implementation.

Furthmore, this commit fixes a bad null check in the ctx client, and
also allows it to retrieve Unicode data.


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

Branch: refs/heads/ARIA-324-refactor-ctx-access
Commit: 956e98b20874b99e80b12849b3c10dc869a4b4f6
Parents: c2b8e65
Author: Tal Liron 
Authored: Thu Jul 27 17:58:17 2017 -0500
Committer: Tal Liron 
Committed: Thu Jul 27 21:18:20 2017 -0500

--
 aria/orchestrator/context/common.py |  19 ++-
 aria/orchestrator/context/operation.py  |  46 +++---
 .../execution_plugin/ctx_proxy/client.py|   7 +-
 .../execution_plugin/ctx_proxy/server.py| 141 +--
 aria/orchestrator/workflows/api/task.py |  13 +-
 aria/storage/collection_instrumentation.py  |  88 ++--
 aria/storage/core.py|   6 +-
 .../execution_plugin/test_ctx_proxy_server.py   |  96 ++---
 .../orchestrator/execution_plugin/test_local.py |  34 ++---
 9 files changed, 192 insertions(+), 258 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/956e98b2/aria/orchestrator/context/common.py
--
diff --git a/aria/orchestrator/context/common.py 
b/aria/orchestrator/context/common.py
index f400142..3c5f618 100644
--- a/aria/orchestrator/context/common.py
+++ b/aria/orchestrator/context/common.py
@@ -38,10 +38,27 @@ class BaseContext(object):
 """
 
 INSTRUMENTATION_FIELDS = (
+modeling.models.Service.inputs,
+modeling.models.ServiceTemplate.inputs,
+modeling.models.Policy.properties,
+modeling.models.PolicyTemplate.properties,
 modeling.models.Node.attributes,
 modeling.models.Node.properties,
 modeling.models.NodeTemplate.attributes,
-modeling.models.NodeTemplate.properties
+modeling.models.NodeTemplate.properties,
+modeling.models.Group.properties,
+modeling.models.GroupTemplate.properties,
+modeling.models.Capability.properties,
+# TODO ARIA-279: modeling.models.Capability.attributes,
+modeling.models.CapabilityTemplate.properties,
+# TODO ARIA-279: modeling.models.CapabilityTemplate.attributes
+modeling.models.Relationship.properties,
+modeling.models.Artifact.properties,
+modeling.models.ArtifactTemplate.properties,
+modeling.models.Interface.inputs,
+modeling.models.InterfaceTemplate.inputs,
+modeling.models.Operation.inputs,
+modeling.models.OperationTemplate.inputs
 )
 
 class PrefixedLogger(object):

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/956e98b2/aria/orchestrator/context/operation.py
--
diff --git a/aria/orchestrator/context/operation.py 
b/aria/orchestrator/context/operation.py
index 7d5f40c..8613ec3 100644
--- a/aria/orchestrator/context/operation.py
+++ b/aria/orchestrator/context/operation.py
@@ -48,8 +48,7 @@ class BaseOperationContext(common.BaseContext):
 @property
 def task(self):
 """
-The task in the model storage
-:return: Task model
+The task in the model storage.
 """
 # SQLAlchemy prevents from accessing an object which was created on a 
different thread.
 # So we retrieve the object from the storage if the current thread 
isn't the same as the
@@ -62,7 +61,7 @@ class BaseOperationContext(common.BaseContext):
 @property
 def plugin_workdir(self):
 """
-A work