[Slack] Notifications from the ASF team for May 26th, 2017 at 8:17 AM

2017-05-25 Thread Slack
Hi ARIA TOSCA,

You have a new direct message from the ASF team
(https://the-asf.slack.com/x-185534614710-188382600114/).

---

@digestai
View in the archives:
https://the-asf.slack.com/x-185534614710-188382600114/archives/D5E4SCANM/p1495774874920336

Digest.AI (8:01 AM, May 26th)
Hi ARIA,
*Here’s your digest for May 26th 2017*
There are 17 messages yesterday, and the most active user is ran

*#ariatosca*
 @emblemparade: [UPDATE] fixed remaining issues with ARIA-149, phew,
lots of little broken things due to the renames. (sometimes i miss
java.) however, not all is green on travis because i would need to
rebase, which i don't know how to do until i squash. however, i'm upset
that i can't figure out the right way to do this in git, so i will fight
and win and let you know how to do it.



*Links shared by your team today:*



* * *

You can snooze these notifications for
an hour:
https://the-asf.slack.com/unsub/U5FFQJ2LW-5a1cb74d28-notify-mute-1h
eight hours:
https://the-asf.slack.com/unsub/U5FFQJ2LW-796e6535e1-notify-mute-8h
a day:
https://the-asf.slack.com/unsub/U5FFQJ2LW-4e6e073ada-notify-mute-1d
three days:
https://the-asf.slack.com/unsub/U5FFQJ2LW-806a2d8aa0-notify-mute-3d
or the next week:
https://the-asf.slack.com/unsub/U5FFQJ2LW-6adc840c34-notify-mute-7d.

You can also turn email notifications off:
https://the-asf.slack.com/unsub/U5FFQJ2LW-64de78982b-notify.

For more detailed preferences, see your account page:
https://the-asf.slack.com/account.


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

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


Fixes

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


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

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

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


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

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


Re: Query on operation inputs

2017-05-25 Thread Tal Liron
Hi DJ, let's try to look at these issues one at a time.

I got your YAML to parse OK, but had to change it around a bit... it would
help if you used a complete example here, and also if it would be much
shorter to demonstrate the specific issue you are asking about. There's a
lot going on in this example and you are asking a few different questions.

The error message you are getting is not about operation inputs, but about
topology template inputs. I can't help much here unless I see those input
definitions: they do not appear in your YAML fragment. In general, see
section 3.8.2.1 in the TOSCA spec. Values for topology template inputs must
come from an external source, and indeed in this case you are providing
them via the CLI. ARIA makes sure that all required topology template
inputs have a value, and that it is a valid value for the type. So, that's
the error you are seeing.

The inputs we *do* see in your YAML fragment are input definitions at the
node type and input assignments at the node template. These work
differently from topology template inputs, because their values do not come
from an external source directly (though this can be indirect via get_input
and other intrinsic functions).

According to the spec you quote (3.5.8.2) , the key "required" is optional
in YAML, meaning that you do not have to specify it. Its default value is
"true". So, unless you specify "required: false", that property is
required. So actually all your "required" true" lines are redundant
(informative, but don't change functionality).

So, let's look at your "isService" input. At the node type, it is defined
as required: false. And indeed, if at the node template I don't assign a
value to it, ARIA has no problem. However, if you do not assign a value to
a required input, say "image", then ARIA would be unhappy.

I hope this is clear, though I have a feeling you are asking about
something else which I'm not quite understanding. Again, a shorter and
complete example would help demonstrate what you mean.


On Thu, May 25, 2017 at 9:56 AM, D Jayachandran  wrote:

> Hi Ran,
>
> When I refer the TOSCA spec, it says
>
> " An optional key that declares a property as required (true) or not
> (false)."
> property_required: represents an optional boolean value (true or false)
> indicating whether or not the property is required.  If this keyname is not
> present on a property definition, then the property SHALL be considered
> required (i.e., true) by default.
>
> It is not clear to whom this property is required or not ?
>
> With your argument, it seems we always need to provide a default value to
> an input, when we don’t declare in my service template. Is my understanding
> correct here ?
> But the TOSCA spec says the default value is always an optional one. Also
> since the parser validates the service template inputs according to the
> "required" field am not sure why we need another validation during the
> execution ?
>
> I also don’t find any reference in TOSCA spec which says, all inputs
> defined in node type be declared in node template to be used by any
> operation. Could you please help me with that reference in TOSCA spec ?
>
>
> Regards,
> DJ
>
> -Original Message-
> From: Ran Ziv [mailto:r...@gigaspaces.com]
> Sent: Thursday, May 25, 2017 5:16 PM
> To: dev@ariatosca.incubator.apache.org
> Subject: Re: Query on operation inputs
>
> Yes, I understand the confusion here. The issue is that, despite its name,
> the "required" field isn't what defines whether an input is optional or not
> - it is only relevant during the parsing phase (This is according to our
> understanding of the TOSCA spec. Tal could probably expand more on this).
> What's relevant for deciding whether an input is required or not for
> actual execution is whether it has a default value - so all inputs would
> have a value when the actual execution takes place.
>
> I hope this helps clearing this confusing issue..
>
> Ran
>
> On Thu, May 25, 2017 at 2:08 PM, D Jayachandran <
> d.jayachand...@ericsson.com
> > wrote:
>
> > Hi Ran,
> >
> > Thanks for your response.
> >
> > In my case, I have defined the inputs as optional under the create
> > operation of my custom node type.
> > Since it is an optional input, I haven't declared it in my node-template.
> > I assume optional input may or may not be declared in a service template
> ?
> > Am I missing something here ?
> >
> > Please find below the node type and node template in my case.
> >
> > # python /root/incubator-ariatosca/aria/cli/main.py executions start
> > -s
> > demo-sr-1 install
> > Required inputs [u'labels'] have not been specified - expected inputs:
> > [u'isService', u'name', u'exposed_port', u'image', u'labels',
> > u'target_port', u'target_host']
> >
> > Node-type
> >
> > node_types:
> > test.nodes.Container.Application:
> > derived_from: tosca.nodes.Root
> > properties:
> > name:
> >   type: string
> >  

Re: Query related to substitution mapping

2017-05-25 Thread Tal Liron
Hi DJ,

I'm not sure what you mean by "the substituting template". Actually, ARIA
does almost nothing with substitution templates right now, just parses,
validates, and stores the info. Indeed, if you refer to a node type there,
it should be expected that the current template would need to know of that
type, possibly by importing.

Could you provide a short example to clarify?

On Thu, May 25, 2017 at 5:32 AM, D Jayachandran  wrote:

> Hi,
>
> The substitution mapping works in the latest APACHE ARIA code only if the
> substituting template is imported in the top-level template.
>
> This seems to be contradicting with the TOSCA specification where the
> substitution is expected to happen without the import (though not
> explicitly mentioned).
>
> We are looking at the possible ways to identify the appropriate node
> template without importing the substituting template. ( Possibly by going
> through already available service models for a substitutable entity )
>
> Do you have any plans to have substitution mapping work without having the
> template imported every time ?
> Do you have any feedback on this and if our understanding is correct ?
>
>
> Regards,
> DJ
>
>
>
>


-- 
Tal Liron
Senior Engineer
t...@gigaspaces.com | +1 (773) 828-9339
Cloudify | http://getcloudify.org




   
[image: Azure Webinar]



Re: [UPDATE] Work on ARIA-149: Support intrinsic functions in "dependencies" operation configuration

2017-05-25 Thread Tal Liron
I don't think the implementation field is an input at all. It is instead
the thing that receives the inputs. :)

In TOSCA, the implementation is actually one primary artifact plus optional
dependencies. It should receive the interface and operation inputs, but
nothing else. TOSCA has nothing to say about "tasks", and indeed that's an
implementation (ha!) detail of ARIA.

In any case, all of this is indeed gone when we move to ARIA tasks: tasks
only have "function" and "arguments", none of the other fields.

When we have an artifact management system, that
"implementation"+"dependencies" field will become much more important: we
will validate that the artifact exists in the CSAR, see about copying it
remotely, support the get_artifact intrinsic function, etc...

On Thu, May 25, 2017 at 4:12 AM, Maxim Orlov  wrote:

> Not entirely sure why the "implementation" gets its own field. It basically
> another input to the operation. Though it's a special input (since it
> enables for the plugin do decide which "function" to run), it's still an
> inputs.  feel we already have a lot of different possible inputs to an
> operation: (1) interface inputs, (2) operation inputs (3) task inputs. I
> feel that the "implementation" should have a special place under the
> operation inputs, but not a field on its own...
>
> On Thu, May 25, 2017 at 1:22 AM, Tal Liron  wrote:
>
> > We had a long face-to-face today and reached an alignment. ARIA-149 is
> > being updated to reflect it.
> >
> > So, we are going all the way with this:
> >
> > The "implementation" and "inputs" fields in the models refer *only* to
> what
> > comes from the TOSCA parser. They are passed from template to instance as
> > is. This means that "implementation" should always be considered an
> > artifact name. (Indeed, when we implement artifact in the near future,
> this
> > field may be refactored in some way, possibly to become a foreign key to
> an
> > artifact-related model.)
> >
> > The OperationTemplate and Operation models both also have a
> "configuration"
> > field, a dict of special parameters used as hints for orchestration. The
> > parser can generate them using our magical "dependencies" grammar
> > extensions. They are normal parameters (typed, and can contain intrinsic
> > functions).
> >
> > And, we are introducing two *new* fields to Operation and Task models
> (and
> > the related Task API): "function" and "arguments". "function" is the full
> > path to a Python function, and "arguments" is a dict of parameters that
> are
> > sent as arguments to the function. These are ARIA's implementation
> details
> > for orchestration, and are *not* directly related to TOSCA's
> > "implementation" and "inputs" fields, and indeed the Task model does not
> > have nor need the "implementation" and "inputs" (to put it another way:
> > we've renamed these two fields in Task, but they have the exact same
> usage
> > as before).
> >
> > The logic for tasks has not changed, but let's go over it again for
> > clarification with the new fields in mind:
> >
> >1. The parser generates an OperationTemplate model, and sets the
> >"implementation" and "inputs" fields. Two ARIA grammar extensions
> >optionally apply:
> >1. If the ">" is used in the "implementation", then the parser
> actually
> >   leaves "implementation" empty (there is no artifact) and instead
> sets
> >   "function".
> >   2. If the ">" is used in "dependencies", they are converted to
> >   "configuration".
> >   2. During instantiation, all these fields are copied as is from
> >OperationTemplate to Operation.
> >3. During the configuration phase of instantiation, there are two
> >possible routes:
> >   1. For the default execution plugin, it generates "function" and
> >   "arguments" according to whether the operation is local or remote,
> > using
> >   params from "configuration" if they are available (and valid).
> Also,
> > any
> >   extra "configuration" params set by the user, which are not
> > recognized by
> >   the plugin, just get appended to "arguments".
> >   2. For other plugins, we already have "function" set for us by the
> >   parser (according to what the user put in "implementation" after
> > the ">").
> >   So, we just append all "configuration" params if they exist to
> > "arguments"
> >4. For all plugins, "inputs" are also appended to "arguments".
> >
> > Some implications of this logic worth considering:
> >
> >1. "implementation" and "inputs" are never mangled and always adhere
> to
> >the strict TOSCA typed interface contract.
> >2. It's possible to use our special "dependencies" grammar to send
> > *extra
> >arbitrary* arguments to the Python operation function, *beyond* what
> is
> >allowed by the strict TOSCA contract.
> >3. Python operation functions do not have a way to know which
> arguments
> >came from where: some 

incubator-ariatosca git commit: Clean up the code

2017-05-25 Thread avia
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-180-convert-parameter-to-one-to-many 515c5886c -> 42f924f58


Clean up the code


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

Branch: refs/heads/ARIA-180-convert-parameter-to-one-to-many
Commit: 42f924f586cffca7463499c92f36500904de9a0c
Parents: 515c588
Author: Avia Efrat 
Authored: Thu May 25 19:40:35 2017 +0300
Committer: Avia Efrat 
Committed: Thu May 25 19:40:35 2017 +0300

--
 aria/modeling/models.py |5 -
 aria/modeling/relationship.py   |2 -
 aria/modeling/service_common.py | 1209 +++---
 .../simple_v1_0/modeling/__init__.py|2 +-
 tests/mock/models.py|   13 +-
 tests/storage/test_model_storage.py |6 +-
 6 files changed, 224 insertions(+), 1013 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/42f924f5/aria/modeling/models.py
--
diff --git a/aria/modeling/models.py b/aria/modeling/models.py
index 9b7e776..bfa0ece 100644
--- a/aria/modeling/models.py
+++ b/aria/modeling/models.py
@@ -72,7 +72,6 @@ __all__ = (
 'ServiceModification',
 
 # Common service models
-'Parameter',
 'Input',
 'Output',
 'Property',
@@ -210,9 +209,6 @@ class ServiceModification(aria_declarative_base, 
service_changes.ServiceModifica
 
 # region common service models
 
-class Parameter(aria_declarative_base, service_common.ParameterBase):
-pass
-
 
 class Input(aria_declarative_base, service_common.InputBase):
 pass
@@ -296,7 +292,6 @@ models_to_register = [
 ServiceModification,
 
 # Common service models
-Parameter,
 Input,
 Output,
 Property,

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/42f924f5/aria/modeling/relationship.py
--
diff --git a/aria/modeling/relationship.py b/aria/modeling/relationship.py
index 8644d42..40be5b2 100644
--- a/aria/modeling/relationship.py
+++ b/aria/modeling/relationship.py
@@ -289,8 +289,6 @@ def many_to_many(model_class,
 secondary_table_name = '{0}_{1}'.format(prefix, secondary_table_name)
 if other_property is None:
 other_property = '{0}_{1}'.format(prefix, 
formatting.pluralize(this_table))
-elif other_property is None:
-other_property = '{0}_{1}'.format(other_table, 
formatting.pluralize(this_table))
 
 secondary_table = _get_secondary_table(
 model_class.metadata,

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/42f924f5/aria/modeling/service_common.py
--
diff --git a/aria/modeling/service_common.py b/aria/modeling/service_common.py
index 0542e00..227d4ea 100644
--- a/aria/modeling/service_common.py
+++ b/aria/modeling/service_common.py
@@ -32,7 +32,7 @@ from . import (
 )
 
 
-class ParameterBase(TemplateModelMixin, caching.HasCachedMethods):
+class ParameterMixin(TemplateModelMixin, caching.HasCachedMethods):
 """
 Represents a typed value. The value can contain nested intrinsic functions.
 
@@ -81,9 +81,10 @@ class ParameterBase(TemplateModelMixin, 
caching.HasCachedMethods):
 for the_relationship in self.__mapper__.relationships:
 v = getattr(self, the_relationship.key)
 if v:
-return v[0] # because we are many-to-many, the back reference 
will be a list
+return v
 
-raise ValueError('orphaned parameter: does not have an owner: 
{0}'.format(self.name))
+raise ValueError('orphaned {class_name}: does not have an owner: 
{name}'.format(
+class_name=type(self).__name__, name=self.name))
 
 @property
 @caching.cachedmethod
@@ -118,7 +119,7 @@ class ParameterBase(TemplateModelMixin, 
caching.HasCachedMethods):
 elif isinstance(container, models.Capability) or isinstance(container, 
models.Artifact):
 container = container.node
 elif isinstance(container, models.CapabilityTemplate) \
-or isinstance(container, models.ArtifactTemplate):
+or isinstance(container, models.ArtifactTemplate):
 container = container.node_template
 elif isinstance(container, models.Task):
 container = container.actor
@@ -174,11 +175,10 @@ class ParameterBase(TemplateModelMixin, 
caching.HasCachedMethods):
 

Re: New mailing lists

2017-05-25 Thread Ran Ziv
Thank you for weighing in Matej. Glad to hear you're okay with the slack
digests.

Arthur, have you had the chance to see if the bot's format can be adjusted
to be, um, somewhat prettier..?

On Tue, May 23, 2017 at 6:58 PM, Matej Artač  wrote:

> Hello Ran,
>
> I as an observer am quite fine with having digests or transcripts from
> Slack appear in the mailing list.
>
> As far as I understand, Slack is reserved to people with Apache ID, so
> getting the conversation onto the mailing list would be good.
>
> Best regards,
> Matej
>
>
> Ran Ziv je 21.5.2017 ob 14:03 napisal:
>
> Matej, John etc. - The issue we keep coming back to, and the reason we try
>> to avoid emails, is that discussions on emails are simply much slower than
>> ones on Slack.
>>
>> John, regarding summarizing slack conversations on the mailing list
>> manually - that's possible, but then I feel like we might be getting the
>> worst of both worlds - someone would have to spend the time summarizing
>> the
>> conversation, plus it would not be as complete as it would have been had
>> it
>> been copied in its entirety (or, alternatively, have taken place entirely
>> over the mailing list). I personally think the bot - assuming we can
>> improve its format somewhat - is actually more useful in that regard, even
>> when excluding the work one would have to do to summarize the
>> conversation.
>>
>> Arthur (and also Tal, who suggested it on Slack) - I'm very much against
>> moving specifically the daily updates to the mailing list, keeping
>> everything else on Slack. IMO it makes sense to do it exactly the other
>> way
>> around. The updates are about things which are in progress, and are much
>> less relevant to the mailing list than actual discussions and
>> announcements
>> over completed features etc.
>>
>>
>> We need to find the right balance between the overhead the mailing list
>> incurs and the need to have everything logged on the list - and IMO the
>> bot
>> is the best solution at this time.
>> However, John, if you think otherwise, even after taking into
>> consideration
>> what I've mentioned above, then let us know what other flow you suggest
>> exactly, and we'll follow that instead.
>>
>>
>> Ran
>>
>>
>>
>>
>> On Tue, May 16, 2017 at 8:04 AM, Matej Artač  wrote:
>>
>> Dear all,
>>>
>>> I like this proposal. I am an outsider who is interested in the
>>> activities
>>> and progress of your project. It would be really great for me if this
>>> mailing list would contain what John suggests. I think it would greatly
>>> improve visibility into your project and likely provide a grounds for
>>> some
>>> additional discussion and comments from a larger community.
>>>
>>> Best regards,
>>> Matej
>>>
>>>
>>> John D. Ament je 15.5.2017 ob 16:12 napisal:
>>>
>>> No, and that's sort of the issue at hand here.  I've requested these
>>>
 mailing list changes because the dev@ traffic is typically github or
 JIRA
 chatter.  We have no on list discussions.  I'm basically trying to force
 you guys to actually talk to one another via email, since our other
 attempts have not worked out well.

 I would expect that Slack discussions are summarized here by those
 participating in them.  Not automatically.

 John

 On Tue, May 9, 2017 at 10:00 PM Arthur Berezin 
 wrote:

 I missed the Slack chat, but sounds good +1. Is there an easy way to
 get a

> digest of the slack chat over dev mailing list?
>
> On Tue, May 9, 2017, 21:43 John D. Ament 
> wrote:
>
> All,
>
>> Based on a brief chat on Slack, I'm going to go ahead and create two
>> new
>> mailing lists:
>>
>> - commits@
>> - issues@
>>
>> The reason being, the dev list is designed for developer discussions,
>> but
>> most of the banter is on JIRA issues or GitHub PRs/commits.  To
>>
>> effectively
>
> measure the community openness we need to separate the types.
>>
>> All changes in a JIRA issue will be sent to issues@ and all commits
>> will
>> go
>> to commits@.
>>
>> John
>>
>>
>> --
>>> Senior researcher
>>> XLAB d.o.o.
>>> Pot za Brdom 100
>>> SI-1000 Ljubljana
>>> Slovenia
>>>
>>> DICE project team leader and WP5 leader: http://www.dice-h2020.eu
>>> Member, OASIS TOSCA Standard Technical Committee
>>>
>>> URL: http://www.xlab.si/rd/
>>> Live chat: visit http://www.xlab.si/ and click Live chat
>>> Google Drive, hangouts: matej.artac...@gmail.com
>>> Office phone: +386 1 244 77 53
>>>
>>>
>>>
> --
> Senior researcher
> XLAB d.o.o.
> Pot za Brdom 100
> SI-1000 Ljubljana
> Slovenia
>
> DICE project team leader and WP5 leader: http://www.dice-h2020.eu
> Member, OASIS TOSCA Standard Technical Committee
>
> URL: http://www.xlab.si/rd/
> Live chat: visit http://www.xlab.si/ and click Live chat
> Google Drive, hangouts: 

[incubator-ariatosca] Git Push Summary

2017-05-25 Thread ran
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-261-single-source-aria-version [deleted] adf760795


incubator-ariatosca git commit: ARIA-261 Single-source ARIA version

2017-05-25 Thread ran
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/master 50b997e3b -> adf760795


ARIA-261 Single-source ARIA version


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

Branch: refs/heads/master
Commit: adf76079568b6ccaf89871907b9b98c22ef6681e
Parents: 50b997e
Author: Ran Ziv 
Authored: Thu May 25 12:18:58 2017 +0300
Committer: Ran Ziv 
Committed: Thu May 25 18:49:49 2017 +0300

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


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

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

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

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

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

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

2017-05-25 Thread ran
ARIA-261 Single-source ARIA version


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

Branch: refs/heads/ARIA-261-single-source-aria-version
Commit: adf76079568b6ccaf89871907b9b98c22ef6681e
Parents: 50b997e
Author: Ran Ziv 
Authored: Thu May 25 12:18:58 2017 +0300
Committer: Ran Ziv 
Committed: Thu May 25 18:49:49 2017 +0300

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


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

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

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

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

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


[1/3] incubator-ariatosca git commit: ARIA-258 Convert runtime_properties to attributes [Forced Update!]

2017-05-25 Thread ran
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-261-single-source-aria-version 5fe5c674b -> adf760795 (forced 
update)


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/50b997e3/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 4fbe9c1..2b628a0 100644
--- 
a/tests/orchestrator/workflows/executor/test_process_executor_tracked_changes.py
+++ 
b/tests/orchestrator/workflows/executor/test_process_executor_tracked_changes.py
@@ -28,7 +28,7 @@ from tests import mock
 from tests import storage
 
 
-_TEST_RUNTIME_PROPERTIES = {
+_TEST_ATTRIBUTES = {
 'some': 'values', 'that': 'are', 'most': 'likely', 'only': 'set', 'here': 
'yo'
 }
 
@@ -46,17 +46,18 @@ def test_track_changes_of_failed_operation(context, 
executor):
 
 def _assert_tracked_changes_are_applied(context):
 instance = context.model.node.get_by_name(mock.models.DEPENDENCY_NODE_NAME)
-assert instance.runtime_properties == _TEST_RUNTIME_PROPERTIES
+assert all(instance.attributes[key].value == value
+   for key, value in _TEST_ATTRIBUTES.items())
 
 
-def _update_runtime_properties(context):
-context.node.runtime_properties.clear()
-context.node.runtime_properties.update(_TEST_RUNTIME_PROPERTIES)
+def _update_attributes(context):
+context.node.attributes.clear()
+context.node.attributes.update(_TEST_ATTRIBUTES)
 
 
 def test_refresh_state_of_tracked_attributes(context, executor):
 out = _run_workflow(context=context, executor=executor, 
op_func=_mock_refreshing_operation)
-assert out['initial'] == out['after_refresh']
+assert out['after_refresh'] == out['after_change']
 assert out['initial'] != out['after_change']
 
 
@@ -66,22 +67,19 @@ def test_apply_tracked_changes_during_an_operation(context, 
executor):
 'changed_but_refreshed': {'some': 'newer', 'properties': 'right there'}
 }
 
-expected_initial = context.model.node.get_by_name(
-mock.models.DEPENDENCY_NODE_NAME).runtime_properties
-
-out = _run_workflow(context=context, executor=executor, 
op_func=_mock_updating_operation,
-inputs=inputs)
+expected_initial = 
context.model.node.get_by_name(mock.models.DEPENDENCY_NODE_NAME).attributes
+out = _run_workflow(
+context=context, executor=executor, op_func=_mock_updating_operation, 
inputs=inputs)
 
 expected_after_update = expected_initial.copy()
 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']) # pylint: 
disable=no-member
-expected_after_refresh = expected_after_update
 
 assert out['initial'] == expected_initial
 assert out['after_update'] == expected_after_update
 assert out['after_change'] == expected_after_change
-assert out['after_refresh'] == expected_after_refresh
+assert out['after_refresh'] == expected_after_change
 
 
 def _run_workflow(context, executor, op_func, inputs=None):
@@ -109,42 +107,42 @@ def _run_workflow(context, executor, op_func, 
inputs=None):
 graph = mock_workflow(ctx=context)  # pylint: 
disable=no-value-for-parameter
 eng = engine.Engine(executor=executor, workflow_context=context, 
tasks_graph=graph)
 eng.execute()
-return context.model.node.get_by_name(
-mock.models.DEPENDENCY_NODE_NAME).runtime_properties.get('out')
+out = 
context.model.node.get_by_name(mock.models.DEPENDENCY_NODE_NAME).attributes.get('out')
+return out.value if out else None
 
 
 @operation
 def _mock_success_operation(ctx):
-_update_runtime_properties(ctx)
+_update_attributes(ctx)
 
 
 @operation
 def _mock_fail_operation(ctx):
-_update_runtime_properties(ctx)
+_update_attributes(ctx)
 raise RuntimeError
 
 
 @operation
 def _mock_refreshing_operation(ctx):
-out = {'initial': copy.deepcopy(ctx.node.runtime_properties)}
-ctx.node.runtime_properties.update({'some': 'new', 'properties': 'right 
here'})
-out['after_change'] = copy.deepcopy(ctx.node.runtime_properties)
+out = {'initial': copy.deepcopy(ctx.node.attributes)}
+ctx.node.attributes.update({'some': 'new', 'properties': 'right here'})
+out['after_change'] = copy.deepcopy(ctx.node.attributes)
 ctx.model.node.refresh(ctx.node)
-out['after_refresh'] = copy.deepcopy(ctx.node.runtime_properties)
-ctx.node.runtime_properties['out'] = out
+out['after_refresh'] = copy.deepcopy(ctx.node.attributes)
+ctx.node.attributes['out'] = out
 
 
 @operation
 def _mock_updating_operation(ctx, committed, changed_but_refreshed):
-out = {'initial': copy.deepcopy(ctx.node.runtime_properties)}
-

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

2017-05-25 Thread mxmrlv
ARIA-258 Convert runtime_properties to attributes


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

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

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


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

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

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

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

2017-05-25 Thread ran
ARIA-258 Convert runtime_properties to attributes


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

Branch: refs/heads/ARIA-261-single-source-aria-version
Commit: 50b997e3bfbaf26df5e66327d30fe8a015b92dd7
Parents: 0c98684
Author: max-orlov 
Authored: Sun May 14 22:38:39 2017 +0300
Committer: max-orlov 
Committed: Thu May 25 18:30:21 2017 +0300

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


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

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

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

[incubator-ariatosca] Git Push Summary

2017-05-25 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-258-Convert-runtime-properties-to-attributes [deleted] 
50b997e3b


[1/2] incubator-ariatosca git commit: ARIA-258 Convert runtime_properties to attributes

2017-05-25 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/master 0c986842d -> 50b997e3b


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/50b997e3/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 4fbe9c1..2b628a0 100644
--- 
a/tests/orchestrator/workflows/executor/test_process_executor_tracked_changes.py
+++ 
b/tests/orchestrator/workflows/executor/test_process_executor_tracked_changes.py
@@ -28,7 +28,7 @@ from tests import mock
 from tests import storage
 
 
-_TEST_RUNTIME_PROPERTIES = {
+_TEST_ATTRIBUTES = {
 'some': 'values', 'that': 'are', 'most': 'likely', 'only': 'set', 'here': 
'yo'
 }
 
@@ -46,17 +46,18 @@ def test_track_changes_of_failed_operation(context, 
executor):
 
 def _assert_tracked_changes_are_applied(context):
 instance = context.model.node.get_by_name(mock.models.DEPENDENCY_NODE_NAME)
-assert instance.runtime_properties == _TEST_RUNTIME_PROPERTIES
+assert all(instance.attributes[key].value == value
+   for key, value in _TEST_ATTRIBUTES.items())
 
 
-def _update_runtime_properties(context):
-context.node.runtime_properties.clear()
-context.node.runtime_properties.update(_TEST_RUNTIME_PROPERTIES)
+def _update_attributes(context):
+context.node.attributes.clear()
+context.node.attributes.update(_TEST_ATTRIBUTES)
 
 
 def test_refresh_state_of_tracked_attributes(context, executor):
 out = _run_workflow(context=context, executor=executor, 
op_func=_mock_refreshing_operation)
-assert out['initial'] == out['after_refresh']
+assert out['after_refresh'] == out['after_change']
 assert out['initial'] != out['after_change']
 
 
@@ -66,22 +67,19 @@ def test_apply_tracked_changes_during_an_operation(context, 
executor):
 'changed_but_refreshed': {'some': 'newer', 'properties': 'right there'}
 }
 
-expected_initial = context.model.node.get_by_name(
-mock.models.DEPENDENCY_NODE_NAME).runtime_properties
-
-out = _run_workflow(context=context, executor=executor, 
op_func=_mock_updating_operation,
-inputs=inputs)
+expected_initial = 
context.model.node.get_by_name(mock.models.DEPENDENCY_NODE_NAME).attributes
+out = _run_workflow(
+context=context, executor=executor, op_func=_mock_updating_operation, 
inputs=inputs)
 
 expected_after_update = expected_initial.copy()
 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']) # pylint: 
disable=no-member
-expected_after_refresh = expected_after_update
 
 assert out['initial'] == expected_initial
 assert out['after_update'] == expected_after_update
 assert out['after_change'] == expected_after_change
-assert out['after_refresh'] == expected_after_refresh
+assert out['after_refresh'] == expected_after_change
 
 
 def _run_workflow(context, executor, op_func, inputs=None):
@@ -109,42 +107,42 @@ def _run_workflow(context, executor, op_func, 
inputs=None):
 graph = mock_workflow(ctx=context)  # pylint: 
disable=no-value-for-parameter
 eng = engine.Engine(executor=executor, workflow_context=context, 
tasks_graph=graph)
 eng.execute()
-return context.model.node.get_by_name(
-mock.models.DEPENDENCY_NODE_NAME).runtime_properties.get('out')
+out = 
context.model.node.get_by_name(mock.models.DEPENDENCY_NODE_NAME).attributes.get('out')
+return out.value if out else None
 
 
 @operation
 def _mock_success_operation(ctx):
-_update_runtime_properties(ctx)
+_update_attributes(ctx)
 
 
 @operation
 def _mock_fail_operation(ctx):
-_update_runtime_properties(ctx)
+_update_attributes(ctx)
 raise RuntimeError
 
 
 @operation
 def _mock_refreshing_operation(ctx):
-out = {'initial': copy.deepcopy(ctx.node.runtime_properties)}
-ctx.node.runtime_properties.update({'some': 'new', 'properties': 'right 
here'})
-out['after_change'] = copy.deepcopy(ctx.node.runtime_properties)
+out = {'initial': copy.deepcopy(ctx.node.attributes)}
+ctx.node.attributes.update({'some': 'new', 'properties': 'right here'})
+out['after_change'] = copy.deepcopy(ctx.node.attributes)
 ctx.model.node.refresh(ctx.node)
-out['after_refresh'] = copy.deepcopy(ctx.node.runtime_properties)
-ctx.node.runtime_properties['out'] = out
+out['after_refresh'] = copy.deepcopy(ctx.node.attributes)
+ctx.node.attributes['out'] = out
 
 
 @operation
 def _mock_updating_operation(ctx, committed, changed_but_refreshed):
-out = {'initial': copy.deepcopy(ctx.node.runtime_properties)}
-ctx.node.runtime_properties.update(committed)
+ 

[1/2] incubator-ariatosca git commit: ARIA-258 Convert runtime_properties to attributes [Forced Update!]

2017-05-25 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-258-Convert-runtime-properties-to-attributes 7c1367a28 -> 
50b997e3b (forced update)


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/50b997e3/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 4fbe9c1..2b628a0 100644
--- 
a/tests/orchestrator/workflows/executor/test_process_executor_tracked_changes.py
+++ 
b/tests/orchestrator/workflows/executor/test_process_executor_tracked_changes.py
@@ -28,7 +28,7 @@ from tests import mock
 from tests import storage
 
 
-_TEST_RUNTIME_PROPERTIES = {
+_TEST_ATTRIBUTES = {
 'some': 'values', 'that': 'are', 'most': 'likely', 'only': 'set', 'here': 
'yo'
 }
 
@@ -46,17 +46,18 @@ def test_track_changes_of_failed_operation(context, 
executor):
 
 def _assert_tracked_changes_are_applied(context):
 instance = context.model.node.get_by_name(mock.models.DEPENDENCY_NODE_NAME)
-assert instance.runtime_properties == _TEST_RUNTIME_PROPERTIES
+assert all(instance.attributes[key].value == value
+   for key, value in _TEST_ATTRIBUTES.items())
 
 
-def _update_runtime_properties(context):
-context.node.runtime_properties.clear()
-context.node.runtime_properties.update(_TEST_RUNTIME_PROPERTIES)
+def _update_attributes(context):
+context.node.attributes.clear()
+context.node.attributes.update(_TEST_ATTRIBUTES)
 
 
 def test_refresh_state_of_tracked_attributes(context, executor):
 out = _run_workflow(context=context, executor=executor, 
op_func=_mock_refreshing_operation)
-assert out['initial'] == out['after_refresh']
+assert out['after_refresh'] == out['after_change']
 assert out['initial'] != out['after_change']
 
 
@@ -66,22 +67,19 @@ def test_apply_tracked_changes_during_an_operation(context, 
executor):
 'changed_but_refreshed': {'some': 'newer', 'properties': 'right there'}
 }
 
-expected_initial = context.model.node.get_by_name(
-mock.models.DEPENDENCY_NODE_NAME).runtime_properties
-
-out = _run_workflow(context=context, executor=executor, 
op_func=_mock_updating_operation,
-inputs=inputs)
+expected_initial = 
context.model.node.get_by_name(mock.models.DEPENDENCY_NODE_NAME).attributes
+out = _run_workflow(
+context=context, executor=executor, op_func=_mock_updating_operation, 
inputs=inputs)
 
 expected_after_update = expected_initial.copy()
 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']) # pylint: 
disable=no-member
-expected_after_refresh = expected_after_update
 
 assert out['initial'] == expected_initial
 assert out['after_update'] == expected_after_update
 assert out['after_change'] == expected_after_change
-assert out['after_refresh'] == expected_after_refresh
+assert out['after_refresh'] == expected_after_change
 
 
 def _run_workflow(context, executor, op_func, inputs=None):
@@ -109,42 +107,42 @@ def _run_workflow(context, executor, op_func, 
inputs=None):
 graph = mock_workflow(ctx=context)  # pylint: 
disable=no-value-for-parameter
 eng = engine.Engine(executor=executor, workflow_context=context, 
tasks_graph=graph)
 eng.execute()
-return context.model.node.get_by_name(
-mock.models.DEPENDENCY_NODE_NAME).runtime_properties.get('out')
+out = 
context.model.node.get_by_name(mock.models.DEPENDENCY_NODE_NAME).attributes.get('out')
+return out.value if out else None
 
 
 @operation
 def _mock_success_operation(ctx):
-_update_runtime_properties(ctx)
+_update_attributes(ctx)
 
 
 @operation
 def _mock_fail_operation(ctx):
-_update_runtime_properties(ctx)
+_update_attributes(ctx)
 raise RuntimeError
 
 
 @operation
 def _mock_refreshing_operation(ctx):
-out = {'initial': copy.deepcopy(ctx.node.runtime_properties)}
-ctx.node.runtime_properties.update({'some': 'new', 'properties': 'right 
here'})
-out['after_change'] = copy.deepcopy(ctx.node.runtime_properties)
+out = {'initial': copy.deepcopy(ctx.node.attributes)}
+ctx.node.attributes.update({'some': 'new', 'properties': 'right here'})
+out['after_change'] = copy.deepcopy(ctx.node.attributes)
 ctx.model.node.refresh(ctx.node)
-out['after_refresh'] = copy.deepcopy(ctx.node.runtime_properties)
-ctx.node.runtime_properties['out'] = out
+out['after_refresh'] = copy.deepcopy(ctx.node.attributes)
+ctx.node.attributes['out'] = out
 
 
 @operation
 def _mock_updating_operation(ctx, committed, changed_but_refreshed):
-out = {'initial': 

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

2017-05-25 Thread mxmrlv
ARIA-258 Convert runtime_properties to attributes


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

Branch: refs/heads/ARIA-258-Convert-runtime-properties-to-attributes
Commit: 50b997e3bfbaf26df5e66327d30fe8a015b92dd7
Parents: 0c98684
Author: max-orlov 
Authored: Sun May 14 22:38:39 2017 +0300
Committer: max-orlov 
Committed: Thu May 25 18:30:21 2017 +0300

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


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

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

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

incubator-ariatosca git commit: ARIA-261 Single-source ARIA version [Forced Update!]

2017-05-25 Thread ran
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-261-single-source-aria-version 423f289b7 -> 5fe5c674b (forced 
update)


ARIA-261 Single-source ARIA version


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

Branch: refs/heads/ARIA-261-single-source-aria-version
Commit: 5fe5c674bf22f142e077855ae130ecdfb72e18c3
Parents: 0c98684
Author: Ran Ziv 
Authored: Thu May 25 12:18:58 2017 +0300
Committer: Ran Ziv 
Committed: Thu May 25 18:25:43 2017 +0300

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


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

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

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

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

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

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

2017-05-25 Thread mxmrlv
ARIA-258 Convert runtime_properties to attributes


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

Branch: refs/heads/ARIA-258-Convert-runtime-properties-to-attributes
Commit: 7c1367a2809a11a5b5fe2398f533a337fc3f7216
Parents: 0c98684
Author: max-orlov 
Authored: Sun May 14 22:38:39 2017 +0300
Committer: max-orlov 
Committed: Thu May 25 18:24:06 2017 +0300

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


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

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

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/7c1367a2/aria/modeling/service_instance.py
--
diff --git a/aria/modeling/service_instance.py 
b/aria/modeling/service_instance.py
index 41a388d..7058969 100644
--- a/aria/modeling/service_instance.py
+++ b/aria/modeling/service_instance.py
@@ -333,8 +333,6 @@ class 

[1/2] incubator-ariatosca git commit: ARIA-258 Convert runtime_properties to attributes [Forced Update!]

2017-05-25 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-258-Convert-runtime-properties-to-attributes efb0d3d18 -> 
7c1367a28 (forced update)


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/7c1367a2/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 4fbe9c1..2b628a0 100644
--- 
a/tests/orchestrator/workflows/executor/test_process_executor_tracked_changes.py
+++ 
b/tests/orchestrator/workflows/executor/test_process_executor_tracked_changes.py
@@ -28,7 +28,7 @@ from tests import mock
 from tests import storage
 
 
-_TEST_RUNTIME_PROPERTIES = {
+_TEST_ATTRIBUTES = {
 'some': 'values', 'that': 'are', 'most': 'likely', 'only': 'set', 'here': 
'yo'
 }
 
@@ -46,17 +46,18 @@ def test_track_changes_of_failed_operation(context, 
executor):
 
 def _assert_tracked_changes_are_applied(context):
 instance = context.model.node.get_by_name(mock.models.DEPENDENCY_NODE_NAME)
-assert instance.runtime_properties == _TEST_RUNTIME_PROPERTIES
+assert all(instance.attributes[key].value == value
+   for key, value in _TEST_ATTRIBUTES.items())
 
 
-def _update_runtime_properties(context):
-context.node.runtime_properties.clear()
-context.node.runtime_properties.update(_TEST_RUNTIME_PROPERTIES)
+def _update_attributes(context):
+context.node.attributes.clear()
+context.node.attributes.update(_TEST_ATTRIBUTES)
 
 
 def test_refresh_state_of_tracked_attributes(context, executor):
 out = _run_workflow(context=context, executor=executor, 
op_func=_mock_refreshing_operation)
-assert out['initial'] == out['after_refresh']
+assert out['after_refresh'] == out['after_change']
 assert out['initial'] != out['after_change']
 
 
@@ -66,22 +67,19 @@ def test_apply_tracked_changes_during_an_operation(context, 
executor):
 'changed_but_refreshed': {'some': 'newer', 'properties': 'right there'}
 }
 
-expected_initial = context.model.node.get_by_name(
-mock.models.DEPENDENCY_NODE_NAME).runtime_properties
-
-out = _run_workflow(context=context, executor=executor, 
op_func=_mock_updating_operation,
-inputs=inputs)
+expected_initial = 
context.model.node.get_by_name(mock.models.DEPENDENCY_NODE_NAME).attributes
+out = _run_workflow(
+context=context, executor=executor, op_func=_mock_updating_operation, 
inputs=inputs)
 
 expected_after_update = expected_initial.copy()
 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']) # pylint: 
disable=no-member
-expected_after_refresh = expected_after_update
 
 assert out['initial'] == expected_initial
 assert out['after_update'] == expected_after_update
 assert out['after_change'] == expected_after_change
-assert out['after_refresh'] == expected_after_refresh
+assert out['after_refresh'] == expected_after_change
 
 
 def _run_workflow(context, executor, op_func, inputs=None):
@@ -109,42 +107,42 @@ def _run_workflow(context, executor, op_func, 
inputs=None):
 graph = mock_workflow(ctx=context)  # pylint: 
disable=no-value-for-parameter
 eng = engine.Engine(executor=executor, workflow_context=context, 
tasks_graph=graph)
 eng.execute()
-return context.model.node.get_by_name(
-mock.models.DEPENDENCY_NODE_NAME).runtime_properties.get('out')
+out = 
context.model.node.get_by_name(mock.models.DEPENDENCY_NODE_NAME).attributes.get('out')
+return out.value if out else None
 
 
 @operation
 def _mock_success_operation(ctx):
-_update_runtime_properties(ctx)
+_update_attributes(ctx)
 
 
 @operation
 def _mock_fail_operation(ctx):
-_update_runtime_properties(ctx)
+_update_attributes(ctx)
 raise RuntimeError
 
 
 @operation
 def _mock_refreshing_operation(ctx):
-out = {'initial': copy.deepcopy(ctx.node.runtime_properties)}
-ctx.node.runtime_properties.update({'some': 'new', 'properties': 'right 
here'})
-out['after_change'] = copy.deepcopy(ctx.node.runtime_properties)
+out = {'initial': copy.deepcopy(ctx.node.attributes)}
+ctx.node.attributes.update({'some': 'new', 'properties': 'right here'})
+out['after_change'] = copy.deepcopy(ctx.node.attributes)
 ctx.model.node.refresh(ctx.node)
-out['after_refresh'] = copy.deepcopy(ctx.node.runtime_properties)
-ctx.node.runtime_properties['out'] = out
+out['after_refresh'] = copy.deepcopy(ctx.node.attributes)
+ctx.node.attributes['out'] = out
 
 
 @operation
 def _mock_updating_operation(ctx, committed, changed_but_refreshed):
-out = {'initial': 

RE: Query on operation inputs

2017-05-25 Thread D Jayachandran
Hi Ran,

When I refer the TOSCA spec, it says 

" An optional key that declares a property as required (true) or not (false)."
property_required: represents an optional boolean value (true or false) 
indicating whether or not the property is required.  If this keyname is not 
present on a property definition, then the property SHALL be considered 
required (i.e., true) by default.

It is not clear to whom this property is required or not ? 

With your argument, it seems we always need to provide a default value to an 
input, when we don’t declare in my service template. Is my understanding 
correct here ?
But the TOSCA spec says the default value is always an optional one. Also since 
the parser validates the service template inputs according to the "required" 
field am not sure why we need another validation during the execution ?

I also don’t find any reference in TOSCA spec which says, all inputs defined in 
node type be declared in node template to be used by any operation. Could you 
please help me with that reference in TOSCA spec ?


Regards,
DJ

-Original Message-
From: Ran Ziv [mailto:r...@gigaspaces.com] 
Sent: Thursday, May 25, 2017 5:16 PM
To: dev@ariatosca.incubator.apache.org
Subject: Re: Query on operation inputs

Yes, I understand the confusion here. The issue is that, despite its name, the 
"required" field isn't what defines whether an input is optional or not
- it is only relevant during the parsing phase (This is according to our 
understanding of the TOSCA spec. Tal could probably expand more on this).
What's relevant for deciding whether an input is required or not for actual 
execution is whether it has a default value - so all inputs would have a value 
when the actual execution takes place.

I hope this helps clearing this confusing issue..

Ran

On Thu, May 25, 2017 at 2:08 PM, D Jayachandran  wrote:

> Hi Ran,
>
> Thanks for your response.
>
> In my case, I have defined the inputs as optional under the create 
> operation of my custom node type.
> Since it is an optional input, I haven't declared it in my node-template.
> I assume optional input may or may not be declared in a service template ?
> Am I missing something here ?
>
> Please find below the node type and node template in my case.
>
> # python /root/incubator-ariatosca/aria/cli/main.py executions start 
> -s
> demo-sr-1 install
> Required inputs [u'labels'] have not been specified - expected inputs:
> [u'isService', u'name', u'exposed_port', u'image', u'labels', 
> u'target_port', u'target_host']
>
> Node-type
>
> node_types:
> test.nodes.Container.Application:
> derived_from: tosca.nodes.Root
> properties:
> name:
>   type: string
>   required: true
> image:
>   type: string
>   required: true
> port:
>   type: integer
>   required: false
> interfaces:
> Standard:
> type: tosca.interfaces.node.lifecycle.Standard
> create:
> inputs:
> name:
> type: string
> required: true
> image:
> type: string
> required: true
> exposed_port:
> type: integer
> required: false
> target_port:
> type: integer
> required: false
> target_host:
> type: integer
> required: false
> labels:
> type: string
> required: false
> isService:
> type: boolean
> required: false
> implementation:
> primary: sample > sample.samplemethod
>
> Node template:
>
> web_app:
> type: test.nodes.Container.Application
> properties:
> name: { get_input: web_app_name }
> image: { get_input: web_app_image }
> port: { get_input: web_app_port }
> requirements:
> - dependency:
>   node: database
>   relationship:
>   type: tosca.relationships.DependsOn
> interfaces:
> Standard:
>  create:
> inputs:
> name: { get_input: web_app_name }
> image: { get_property: [ web_app, image] }
> exposed_port: { get_property: [ web_app, 
> 

incubator-ariatosca git commit: ARIA-261 Single-source ARIA version [Forced Update!]

2017-05-25 Thread ran
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-261-single-source-aria-version eaa5de448 -> 423f289b7 (forced 
update)


ARIA-261 Single-source ARIA version


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

Branch: refs/heads/ARIA-261-single-source-aria-version
Commit: 423f289b704a9953c321d22432a866ea8c46d075
Parents: 0c98684
Author: Ran Ziv 
Authored: Thu May 25 12:18:58 2017 +0300
Committer: Ran Ziv 
Committed: Thu May 25 17:11:35 2017 +0300

--
 MANIFEST.in  |  2 ++
 VERSION  |  1 +
 aria/VERSION.py  | 21 -
 aria/__init__.py | 13 -
 aria/parser/reading/jinja.py |  2 +-
 setup.py | 15 ++-
 6 files changed, 18 insertions(+), 36 deletions(-)
--


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

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

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

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

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

incubator-ariatosca git commit: ARIA-261 Single-source ARIA version [Forced Update!]

2017-05-25 Thread ran
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-261-single-source-aria-version d689b9bf7 -> eaa5de448 (forced 
update)


ARIA-261 Single-source ARIA version


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

Branch: refs/heads/ARIA-261-single-source-aria-version
Commit: eaa5de4483b3576ac1746b3292923278cad064bf
Parents: 0c98684
Author: Ran Ziv 
Authored: Thu May 25 12:18:58 2017 +0300
Committer: Ran Ziv 
Committed: Thu May 25 16:02:14 2017 +0300

--
 MANIFEST.in  |  2 ++
 VERSION  |  1 +
 aria/VERSION.py  | 21 -
 aria/__init__.py |  5 +++--
 aria/parser/reading/jinja.py |  2 +-
 setup.py | 15 ++-
 6 files changed, 17 insertions(+), 29 deletions(-)
--


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

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

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

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/eaa5de44/aria/__init__.py
--
diff --git a/aria/__init__.py b/aria/__init__.py
index df75b1e..6a06705 100644
--- a/aria/__init__.py
+++ b/aria/__init__.py
@@ -17,9 +17,10 @@
 ARIA top level package
 """
 
-import sys
+import pkg_resources
+__version__ = pkg_resources.get_distribution('aria').version
 
-from .VERSION import version as __version__
+import sys
 
 from .orchestrator.decorators import workflow, operation
 from . import (

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

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/eaa5de44/setup.py
--
diff --git a/setup.py b/setup.py
index c0ad75b..9c0c511 100644
--- a/setup.py
+++ b/setup.py
@@ -21,6 +21,7 @@ from setuptools import setup, find_packages
 from setuptools.command.install import install
 from setuptools.command.develop import develop
 
+
 _PACKAGE_NAME = 'aria'
 _PYTHON_SUPPORTED_VERSIONS = [(2, 6), (2, 7)]
 _EXTENSION_DIR = 'extensions'
@@ -28,6 +29,7 @@ _EXTENSION_NAMES = [
 'aria_extension_tosca'
 ]
 
+
 if (sys.version_info[0], sys.version_info[1]) not in 
_PYTHON_SUPPORTED_VERSIONS:
 raise 

incubator-ariatosca git commit: fixed name in test

2017-05-25 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-258-Convert-runtime-properties-to-attributes 78e5e2f57 -> 
d09a832f2


fixed name in test


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

Branch: refs/heads/ARIA-258-Convert-runtime-properties-to-attributes
Commit: d09a832f2210f54cbd6fae7baa143183f376a412
Parents: 78e5e2f
Author: max-orlov 
Authored: Thu May 25 15:00:11 2017 +0300
Committer: max-orlov 
Committed: Thu May 25 15:00:11 2017 +0300

--
 tests/orchestrator/workflows/core/test_task.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/d09a832f/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 b1b8251..e488933 100644
--- a/tests/orchestrator/workflows/core/test_task.py
+++ b/tests/orchestrator/workflows/core/test_task.py
@@ -100,7 +100,7 @@ class TestOperationTask(object):
 storage_task = ctx.model.task.get_by_name(core_task.name)
 assert storage_task.plugin is storage_plugin
 assert storage_task.execution_name == ctx.execution.name
-assert storage_task.actor == core_task.context.node._actor
+assert storage_task.actor == core_task.context.node._original_model
 assert core_task.model_task == storage_task
 assert core_task.name == api_task.name
 assert core_task.implementation == api_task.implementation



incubator-ariatosca git commit: added set/get testing

2017-05-25 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-258-Convert-runtime-properties-to-attributes 493816b06 -> 
78e5e2f57


added set/get testing


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

Branch: refs/heads/ARIA-258-Convert-runtime-properties-to-attributes
Commit: 78e5e2f572411d1eaa8cf96f7e7dc1510d18a463
Parents: 493816b
Author: max-orlov 
Authored: Thu May 25 14:50:49 2017 +0300
Committer: max-orlov 
Committed: Thu May 25 14:50:49 2017 +0300

--
 .../context/test_attribute_suggaring.py | 253 ---
 .../context/test_collection_instrumentation.py  | 253 +++
 tests/orchestrator/context/test_operation.py|  18 +-
 3 files changed, 268 insertions(+), 256 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/78e5e2f5/tests/orchestrator/context/test_attribute_suggaring.py
--
diff --git a/tests/orchestrator/context/test_attribute_suggaring.py 
b/tests/orchestrator/context/test_attribute_suggaring.py
deleted file mode 100644
index 972c693..000
--- a/tests/orchestrator/context/test_attribute_suggaring.py
+++ /dev/null
@@ -1,253 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-import pytest
-
-from aria.modeling.models import Parameter
-from aria.orchestrator.context import common
-
-
-class MockActor(object):
-def __init__(self):
-self.dict_ = {}
-self.list_ = []
-
-
-class MockModel(object):
-
-def __init__(self):
-self.parameter = type('MockModel', (object, ), {'model_cls': Parameter,
-'put': lambda *args, 
**kwargs: None,
-'update': lambda 
*args, **kwargs: None})()
-
-
-class ContextSugaring(object):
-
-@pytest.fixture
-def actor(self):
-return MockActor()
-
-@pytest.fixture
-def model(self):
-return MockModel()
-
-@pytest.fixture
-def dict_(self, actor, model):
-return common._InstrumentedDict(model, actor, 'dict_')
-
-@pytest.fixture
-def list_(self, actor, model):
-return common._InstrumentedList(model, actor, 'list_')
-
-
-class TestDict(ContextSugaring):
-
-def test_keys(self, actor, dict_):
-dict_.update(
-{
-'key1': Parameter.wrap('key1', 'value1'),
-'key2': Parameter.wrap('key2', 'value2')
-}
-)
-assert sorted(dict_.keys()) == sorted(['key1', 'key2']) == 
sorted(actor.dict_.keys())
-
-def test_values(self, actor, dict_):
-dict_.update({
-'key1': Parameter.wrap('key1', 'value1'),
-'key2': Parameter.wrap('key1', 'value2')
-})
-assert (sorted(dict_.values()) ==
-sorted(['value1', 'value2']) ==
-sorted(v.value for v in actor.dict_.values()))
-
-def test_items(self, dict_):
-dict_.update({
-'key1': Parameter.wrap('key1', 'value1'),
-'key2': Parameter.wrap('key1', 'value2')
-})
-assert sorted(dict_.items()) == sorted([('key1', 'value1'), ('key2', 
'value2')])
-
-def test_iter(self, actor, dict_):
-dict_.update({
-'key1': Parameter.wrap('key1', 'value1'),
-'key2': Parameter.wrap('key1', 'value2')
-})
-assert sorted(list(dict_)) == sorted(['key1', 'key2']) == 
sorted(actor.dict_.keys())
-
-def test_bool(self, dict_):
-assert not dict_
-dict_.update({
-'key1': Parameter.wrap('key1', 'value1'),
-'key2': Parameter.wrap('key1', 'value2')
-})
-assert dict_
-
-def test_set_item(self, actor, dict_):
-dict_['key1'] = 

Re: Query on operation inputs

2017-05-25 Thread Ran Ziv
Yes, I understand the confusion here. The issue is that, despite its name,
the "required" field isn't what defines whether an input is optional or not
- it is only relevant during the parsing phase (This is according to our
understanding of the TOSCA spec. Tal could probably expand more on this).
What's relevant for deciding whether an input is required or not for actual
execution is whether it has a default value - so all inputs would have a
value when the actual execution takes place.

I hope this helps clearing this confusing issue..

Ran

On Thu, May 25, 2017 at 2:08 PM, D Jayachandran  wrote:

> Hi Ran,
>
> Thanks for your response.
>
> In my case, I have defined the inputs as optional under the create
> operation of my custom node type.
> Since it is an optional input, I haven't declared it in my node-template.
> I assume optional input may or may not be declared in a service template ?
> Am I missing something here ?
>
> Please find below the node type and node template in my case.
>
> # python /root/incubator-ariatosca/aria/cli/main.py executions start -s
> demo-sr-1 install
> Required inputs [u'labels'] have not been specified - expected inputs:
> [u'isService', u'name', u'exposed_port', u'image', u'labels',
> u'target_port', u'target_host']
>
> Node-type
>
> node_types:
> test.nodes.Container.Application:
> derived_from: tosca.nodes.Root
> properties:
> name:
>   type: string
>   required: true
> image:
>   type: string
>   required: true
> port:
>   type: integer
>   required: false
> interfaces:
> Standard:
> type: tosca.interfaces.node.lifecycle.Standard
> create:
> inputs:
> name:
> type: string
> required: true
> image:
> type: string
> required: true
> exposed_port:
> type: integer
> required: false
> target_port:
> type: integer
> required: false
> target_host:
> type: integer
> required: false
> labels:
> type: string
> required: false
> isService:
> type: boolean
> required: false
> implementation:
> primary: sample > sample.samplemethod
>
> Node template:
>
> web_app:
> type: test.nodes.Container.Application
> properties:
> name: { get_input: web_app_name }
> image: { get_input: web_app_image }
> port: { get_input: web_app_port }
> requirements:
> - dependency:
>   node: database
>   relationship:
>   type: tosca.relationships.DependsOn
> interfaces:
> Standard:
>  create:
> inputs:
> name: { get_input: web_app_name }
> image: { get_property: [ web_app, image] }
> exposed_port: { get_property: [ web_app, port]
> }
> target_host: { get_property: [ database, name]
> }
> target_port: { get_property: [ database, port]
> }
> isService: true
>
> Regards,
> DJ
>
> -Original Message-
> From: Ran Ziv [mailto:r...@gigaspaces.com]
> Sent: Thursday, May 25, 2017 4:07 PM
> To: dev@ariatosca.incubator.apache.org
> Subject: Re: Query on operation inputs
>
> Hi,
>
> Weird, I remember responding to this mail before, but it doesn't seem like
> I have.
> In any case, it is indeed our intention that no inputs may be passed into
> operations unless they have been clearly declared in the service-template.
> ARIA opts to be a strict implementation of TOSCA wherever possible.
>
> Ran
>
> On Thu, May 25, 2017 at 1:22 PM, D Jayachandran <
> d.jayachand...@ericsson.com
> > wrote:
>
> > Hi,
> >
> > The latest Apache-aria is throwing a validation error during the
> > execution of a service.
> > It demands all the operation inputs defined in a node type be declared
> > in the service template though they are optional inputs.
> > Could you please let us know if this change was intentional ?
> >
> >
> > Regards,
> > DJ(D Jayachandran)
> >
>


incubator-ariatosca git commit: ARIA-261 Single-source ARIA version [Forced Update!]

2017-05-25 Thread ran
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-261-single-source-aria-version f8bd8febe -> d689b9bf7 (forced 
update)


ARIA-261 Single-source ARIA version


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

Branch: refs/heads/ARIA-261-single-source-aria-version
Commit: d689b9bf79983026b2267799ad847b8ca8d5d21e
Parents: 0c98684
Author: Ran Ziv 
Authored: Thu May 25 12:18:58 2017 +0300
Committer: Ran Ziv 
Committed: Thu May 25 14:38:10 2017 +0300

--
 MANIFEST.in  |  1 +
 VERSION  |  1 +
 aria/VERSION.py  | 21 -
 aria/__init__.py |  4 +++-
 aria/parser/reading/jinja.py |  2 +-
 setup.py | 14 +-
 6 files changed, 15 insertions(+), 28 deletions(-)
--


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

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

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

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/d689b9bf/aria/__init__.py
--
diff --git a/aria/__init__.py b/aria/__init__.py
index df75b1e..9e8993a 100644
--- a/aria/__init__.py
+++ b/aria/__init__.py
@@ -17,9 +17,11 @@
 ARIA top level package
 """
 
+import os
 import sys
 
-from .VERSION import version as __version__
+with open(os.path.join(os.path.dirname(os.path.dirname(__file__)), 'VERSION')) 
as version_file:
+__version__ = version_file.read().strip()
 
 from .orchestrator.decorators import workflow, operation
 from . import (

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

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/d689b9bf/setup.py
--
diff --git a/setup.py b/setup.py
index c0ad75b..b7283f6 100644
--- a/setup.py
+++ b/setup.py
@@ -21,6 +21,7 @@ from setuptools import setup, find_packages
 from setuptools.command.install import install
 from setuptools.command.develop import develop
 
+
 _PACKAGE_NAME = 'aria'
 _PYTHON_SUPPORTED_VERSIONS = [(2, 6), (2, 7)]
 _EXTENSION_DIR = 'extensions'
@@ -28,6 +29,7 @@ _EXTENSION_NAMES = [
 'aria_extension_tosca'
 ]
 
+
 if (sys.version_info[0], sys.version_info[1]) not in 

incubator-ariatosca git commit: moved the decoration to a function and return custom class instnace

2017-05-25 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-258-Convert-runtime-properties-to-attributes b597b94db -> 
493816b06


moved the decoration to a function and return custom class instnace


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

Branch: refs/heads/ARIA-258-Convert-runtime-properties-to-attributes
Commit: 493816b06e01a246c8257f0bf7893f9c8e3a877d
Parents: b597b94
Author: max-orlov 
Authored: Thu May 25 14:13:14 2017 +0300
Committer: max-orlov 
Committed: Thu May 25 14:13:14 2017 +0300

--
 aria/orchestrator/context/common.py| 60 -
 aria/orchestrator/context/operation.py | 12 +++---
 2 files changed, 40 insertions(+), 32 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/493816b0/aria/orchestrator/context/common.py
--
diff --git a/aria/orchestrator/context/common.py 
b/aria/orchestrator/context/common.py
index fad50ea..2feea14 100644
--- a/aria/orchestrator/context/common.py
+++ b/aria/orchestrator/context/common.py
@@ -381,33 +381,41 @@ class _InstrumentedList(_InstrumentedCollection, list):
 return list(self)
 
 
-class InstrumentCollection(object):
+class _InstrumentedModel(object):
 
-def __init__(self, field_name):
-super(InstrumentCollection, self).__init__()
+def __init__(self, field_name, original_model, model_storage):
+super(_InstrumentedModel, self).__init__()
 self._field_name = field_name
-self._actor = None
-
-@property
-def actor(self):
-return self._actor
+self._model_storage = model_storage
+self._original_model = original_model
+self._apply_instrumentation()
 
 def __getattr__(self, item):
-return getattr(self._actor, item)
-
-def __call__(self, func, *args, **kwargs):
-def _wrapper(func_self, *args, **kwargs):
-self._actor = func(func_self, *args, **kwargs)
-field = getattr(self._actor, self._field_name)
-
-# Preserve the original value. e.g. original attributes would be 
located under
-# _attributes
-setattr(self, '_{0}'.format(self._field_name), field)
-
-# set instrumented value
-setattr(self, self._field_name, _InstrumentedDict(func_self.model,
-  self._actor,
-  self._field_name,
-  field))
-return self
-return _wrapper
+return getattr(self._original_model, item)
+
+def _apply_instrumentation(self):
+
+field = getattr(self._original_model, self._field_name)
+
+# Preserve the original value. e.g. original attributes would be 
located under
+# _attributes
+setattr(self, '_{0}'.format(self._field_name), field)
+
+# set instrumented value
+setattr(self, self._field_name, _InstrumentedDict(self._model_storage,
+  self._original_model,
+  self._field_name,
+  field))
+
+
+def instrument_collection(field_name, func=None):
+if func is None:
+return partial(instrument_collection, field_name)
+
+def _wrapper(*args, **kwargs):
+original_model = func(*args, **kwargs)
+return 
type('Instrumented{0}'.format(original_model.__class__.__name__),
+(_InstrumentedModel, ),
+{})(field_name, original_model, args[0].model)
+
+return _wrapper

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/493816b0/aria/orchestrator/context/operation.py
--
diff --git a/aria/orchestrator/context/operation.py 
b/aria/orchestrator/context/operation.py
index 1563e22..269251f 100644
--- a/aria/orchestrator/context/operation.py
+++ b/aria/orchestrator/context/operation.py
@@ -114,7 +114,7 @@ class NodeOperationContext(BaseOperationContext):
 """
 
 @property
-@common.InstrumentCollection('attributes')
+@common.instrument_collection('attributes')
 def node_template(self):
 """
 the node of the current operation
@@ -123,7 +123,7 @@ class NodeOperationContext(BaseOperationContext):
 return self.node.node_template
 
 

RE: Query on operation inputs

2017-05-25 Thread D Jayachandran
Hi Ran,

Thanks for your response.

In my case, I have defined the inputs as optional under the create operation of 
my custom node type.
Since it is an optional input, I haven't declared it in my node-template. I 
assume optional input may or may not be declared in a service template ?
Am I missing something here ?

Please find below the node type and node template in my case.

# python /root/incubator-ariatosca/aria/cli/main.py executions start -s 
demo-sr-1 install
Required inputs [u'labels'] have not been specified - expected inputs: 
[u'isService', u'name', u'exposed_port', u'image', u'labels', u'target_port', 
u'target_host']

Node-type

node_types:
test.nodes.Container.Application:
derived_from: tosca.nodes.Root
properties:
name:
  type: string
  required: true
image:
  type: string
  required: true
port:
  type: integer
  required: false
interfaces:
Standard:
type: tosca.interfaces.node.lifecycle.Standard
create:
inputs:
name:
type: string
required: true
image:
type: string
required: true
exposed_port:
type: integer
required: false
target_port:
type: integer
required: false
target_host:
type: integer
required: false
labels:
type: string
required: false
isService:
type: boolean
required: false
implementation:
primary: sample > sample.samplemethod

Node template:

web_app:
type: test.nodes.Container.Application
properties:
name: { get_input: web_app_name }
image: { get_input: web_app_image }
port: { get_input: web_app_port }
requirements:
- dependency:
  node: database
  relationship:
  type: tosca.relationships.DependsOn
interfaces:
Standard:
 create:
inputs:
name: { get_input: web_app_name }
image: { get_property: [ web_app, image] }
exposed_port: { get_property: [ web_app, port] }
target_host: { get_property: [ database, name] }
target_port: { get_property: [ database, port] }
isService: true

Regards,
DJ

-Original Message-
From: Ran Ziv [mailto:r...@gigaspaces.com] 
Sent: Thursday, May 25, 2017 4:07 PM
To: dev@ariatosca.incubator.apache.org
Subject: Re: Query on operation inputs

Hi,

Weird, I remember responding to this mail before, but it doesn't seem like I 
have.
In any case, it is indeed our intention that no inputs may be passed into 
operations unless they have been clearly declared in the service-template.
ARIA opts to be a strict implementation of TOSCA wherever possible.

Ran

On Thu, May 25, 2017 at 1:22 PM, D Jayachandran  wrote:

> Hi,
>
> The latest Apache-aria is throwing a validation error during the 
> execution of a service.
> It demands all the operation inputs defined in a node type be declared 
> in the service template though they are optional inputs.
> Could you please let us know if this change was intentional ?
>
>
> Regards,
> DJ(D Jayachandran)
>


incubator-ariatosca git commit: ARIA-261 Single-source ARIA version [Forced Update!]

2017-05-25 Thread ran
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-261-single-source-aria-version 134a30597 -> f8bd8febe (forced 
update)


ARIA-261 Single-source ARIA version


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

Branch: refs/heads/ARIA-261-single-source-aria-version
Commit: f8bd8febe42c913b820b0a8cee5c251f43b70657
Parents: 0c98684
Author: Ran Ziv 
Authored: Thu May 25 12:18:58 2017 +0300
Committer: Ran Ziv 
Committed: Thu May 25 14:07:43 2017 +0300

--
 MANIFEST.in  |  1 +
 VERSION  |  1 +
 aria/VERSION.py  | 21 -
 aria/__init__.py |  6 --
 aria/parser/reading/jinja.py |  2 +-
 setup.py | 12 
 6 files changed, 15 insertions(+), 28 deletions(-)
--


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

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

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

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/f8bd8feb/aria/__init__.py
--
diff --git a/aria/__init__.py b/aria/__init__.py
index df75b1e..5787cee 100644
--- a/aria/__init__.py
+++ b/aria/__init__.py
@@ -17,10 +17,9 @@
 ARIA top level package
 """
 
+import os
 import sys
 
-from .VERSION import version as __version__
-
 from .orchestrator.decorators import workflow, operation
 from . import (
 extension,
@@ -32,6 +31,9 @@ from . import (
 cli
 )
 
+with open(os.path.join(os.path.dirname(os.path.dirname(__file__)), 'VERSION')) 
as version_file:
+__version__ = version_file.read().strip()
+
 if sys.version_info < (2, 7):
 # pkgutil in python2.6 has a bug where it fails to import from protected 
modules, which causes
 # the entire process to fail. In order to overcome this issue we use our 
custom iter_modules

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

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/f8bd8feb/setup.py
--
diff --git a/setup.py b/setup.py
index c0ad75b..9a95ff8 100644
--- a/setup.py
+++ b/setup.py
@@ -21,6 +21,7 @@ from setuptools import setup, find_packages
 from setuptools.command.install import install
 

incubator-ariatosca git commit: ARIA-261 Single-source ARIA version [Forced Update!]

2017-05-25 Thread ran
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-261-single-source-aria-version 5e9cf14a1 -> 134a30597 (forced 
update)


ARIA-261 Single-source ARIA version


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

Branch: refs/heads/ARIA-261-single-source-aria-version
Commit: 134a30597dec2a888cfea5a12cefdc909c274ba5
Parents: 0c98684
Author: Ran Ziv 
Authored: Thu May 25 12:18:58 2017 +0300
Committer: Ran Ziv 
Committed: Thu May 25 14:03:27 2017 +0300

--
 MANIFEST.in  |  1 +
 VERSION  |  1 +
 aria/VERSION.py  | 21 -
 aria/__init__.py |  6 --
 aria/parser/reading/jinja.py |  2 +-
 setup.py | 12 
 6 files changed, 15 insertions(+), 28 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/134a3059/MANIFEST.in
--
diff --git a/MANIFEST.in b/MANIFEST.in
index d934e18..b6e5fb2 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,2 +1,3 @@
 include requirements.txt
+include VERSION
 recursive-include examples *

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

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

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/134a3059/aria/__init__.py
--
diff --git a/aria/__init__.py b/aria/__init__.py
index df75b1e..5787cee 100644
--- a/aria/__init__.py
+++ b/aria/__init__.py
@@ -17,10 +17,9 @@
 ARIA top level package
 """
 
+import os
 import sys
 
-from .VERSION import version as __version__
-
 from .orchestrator.decorators import workflow, operation
 from . import (
 extension,
@@ -32,6 +31,9 @@ from . import (
 cli
 )
 
+with open(os.path.join(os.path.dirname(os.path.dirname(__file__)), 'VERSION')) 
as version_file:
+__version__ = version_file.read().strip()
+
 if sys.version_info < (2, 7):
 # pkgutil in python2.6 has a bug where it fails to import from protected 
modules, which causes
 # the entire process to fail. In order to overcome this issue we use our 
custom iter_modules

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

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/134a3059/setup.py
--
diff --git a/setup.py b/setup.py
index c0ad75b..1301f66 100644
--- a/setup.py
+++ b/setup.py
@@ -21,6 +21,7 @@ from setuptools import setup, find_packages
 from setuptools.command.install import install
 

Re: Query on operation inputs

2017-05-25 Thread Ran Ziv
Hi,

Weird, I remember responding to this mail before, but it doesn't seem like
I have.
In any case, it is indeed our intention that no inputs may be passed into
operations unless they have been clearly declared in the service-template.
ARIA opts to be a strict implementation of TOSCA wherever possible.

Ran

On Thu, May 25, 2017 at 1:22 PM, D Jayachandran  wrote:

> Hi,
>
> The latest Apache-aria is throwing a validation error during the execution
> of a service.
> It demands all the operation inputs defined in a node type be declared in
> the service template though they are optional inputs.
> Could you please let us know if this change was intentional ?
>
>
> Regards,
> DJ(D Jayachandran)
>


Query related to substitution mapping

2017-05-25 Thread D Jayachandran
Hi,

The substitution mapping works in the latest APACHE ARIA code only if the 
substituting template is imported in the top-level template.

This seems to be contradicting with the TOSCA specification where the 
substitution is expected to happen without the import (though not explicitly 
mentioned).

We are looking at the possible ways to identify the appropriate node template 
without importing the substituting template. ( Possibly by going through 
already available service models for a substitutable entity )

Do you have any plans to have substitution mapping work without having the 
template imported every time ?
Do you have any feedback on this and if our understanding is correct ?


Regards,
DJ





RE: Query on operation inputs

2017-05-25 Thread D Jayachandran
Hi,

The latest Apache-aria is throwing a validation error during the execution of a 
service.
It demands all the operation inputs defined in a node type be declared in the 
service template though they are optional inputs.
Could you please let us know if this change was intentional ?


Regards,
DJ(D Jayachandran)


incubator-ariatosca git commit: ARIA-261 Single-source ARIA version

2017-05-25 Thread ran
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-261-single-source-aria-version [created] 5e9cf14a1


ARIA-261 Single-source ARIA version


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

Branch: refs/heads/ARIA-261-single-source-aria-version
Commit: 5e9cf14a17585afe11b99198264615789e878d23
Parents: 0c98684
Author: Ran Ziv 
Authored: Thu May 25 12:18:58 2017 +0300
Committer: Ran Ziv 
Committed: Thu May 25 12:18:58 2017 +0300

--
 setup.py | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/5e9cf14a/setup.py
--
diff --git a/setup.py b/setup.py
index c0ad75b..f617ae2 100644
--- a/setup.py
+++ b/setup.py
@@ -21,6 +21,9 @@ from setuptools import setup, find_packages
 from setuptools.command.install import install
 from setuptools.command.develop import develop
 
+from aria.VERSION import version
+
+
 _PACKAGE_NAME = 'aria'
 _PYTHON_SUPPORTED_VERSIONS = [(2, 6), (2, 7)]
 _EXTENSION_DIR = 'extensions'
@@ -35,10 +38,6 @@ if (sys.version_info[0], sys.version_info[1]) not in 
_PYTHON_SUPPORTED_VERSIONS:
 
 root_dir = os.path.dirname(__file__)
 
-version = '0.1.0'
-execfile(os.path.join(root_dir, _PACKAGE_NAME, 'VERSION.py'))
-
-
 install_requires = []
 extras_require = {}
 
@@ -119,6 +118,9 @@ setup(
 'License :: OSI Approved :: Apache Software License',
 'Operating System :: OS Independent',
 'Programming Language :: Python',
+'Programming Language :: Python :: 2',
+'Programming Language :: Python :: 2.6',
+'Programming Language :: Python :: 2.7',
 'Topic :: Software Development :: Libraries :: Python Modules',
 'Topic :: System :: Networking',
 'Topic :: System :: Systems Administration'],



Re: [UPDATE] Work on ARIA-149: Support intrinsic functions in "dependencies" operation configuration

2017-05-25 Thread Maxim Orlov
Not entirely sure why the "implementation" gets its own field. It basically
another input to the operation. Though it's a special input (since it
enables for the plugin do decide which "function" to run), it's still an
inputs.  feel we already have a lot of different possible inputs to an
operation: (1) interface inputs, (2) operation inputs (3) task inputs. I
feel that the "implementation" should have a special place under the
operation inputs, but not a field on its own...

On Thu, May 25, 2017 at 1:22 AM, Tal Liron  wrote:

> We had a long face-to-face today and reached an alignment. ARIA-149 is
> being updated to reflect it.
>
> So, we are going all the way with this:
>
> The "implementation" and "inputs" fields in the models refer *only* to what
> comes from the TOSCA parser. They are passed from template to instance as
> is. This means that "implementation" should always be considered an
> artifact name. (Indeed, when we implement artifact in the near future, this
> field may be refactored in some way, possibly to become a foreign key to an
> artifact-related model.)
>
> The OperationTemplate and Operation models both also have a "configuration"
> field, a dict of special parameters used as hints for orchestration. The
> parser can generate them using our magical "dependencies" grammar
> extensions. They are normal parameters (typed, and can contain intrinsic
> functions).
>
> And, we are introducing two *new* fields to Operation and Task models (and
> the related Task API): "function" and "arguments". "function" is the full
> path to a Python function, and "arguments" is a dict of parameters that are
> sent as arguments to the function. These are ARIA's implementation details
> for orchestration, and are *not* directly related to TOSCA's
> "implementation" and "inputs" fields, and indeed the Task model does not
> have nor need the "implementation" and "inputs" (to put it another way:
> we've renamed these two fields in Task, but they have the exact same usage
> as before).
>
> The logic for tasks has not changed, but let's go over it again for
> clarification with the new fields in mind:
>
>1. The parser generates an OperationTemplate model, and sets the
>"implementation" and "inputs" fields. Two ARIA grammar extensions
>optionally apply:
>1. If the ">" is used in the "implementation", then the parser actually
>   leaves "implementation" empty (there is no artifact) and instead sets
>   "function".
>   2. If the ">" is used in "dependencies", they are converted to
>   "configuration".
>   2. During instantiation, all these fields are copied as is from
>OperationTemplate to Operation.
>3. During the configuration phase of instantiation, there are two
>possible routes:
>   1. For the default execution plugin, it generates "function" and
>   "arguments" according to whether the operation is local or remote,
> using
>   params from "configuration" if they are available (and valid). Also,
> any
>   extra "configuration" params set by the user, which are not
> recognized by
>   the plugin, just get appended to "arguments".
>   2. For other plugins, we already have "function" set for us by the
>   parser (according to what the user put in "implementation" after
> the ">").
>   So, we just append all "configuration" params if they exist to
> "arguments"
>4. For all plugins, "inputs" are also appended to "arguments".
>
> Some implications of this logic worth considering:
>
>1. "implementation" and "inputs" are never mangled and always adhere to
>the strict TOSCA typed interface contract.
>2. It's possible to use our special "dependencies" grammar to send
> *extra
>arbitrary* arguments to the Python operation function, *beyond* what is
>allowed by the strict TOSCA contract.
>3. Python operation functions do not have a way to know which arguments
>came from where: some arguments might be inputs and some might be extra
>configuration. We have currently decided that this distinguishes the
> two is
>cumbersome and not useful. If it does become important, we will need to
>revisit this logic.
>
>
> On Tue, May 23, 2017 at 11:09 AM, Tal Liron  wrote:
>
> > Why do you think that on-the-fly updates won't require implementation and
> > inputs? It's true that the execution plugin squashes inputs into
> arguments
> > and keeps the implementation in arguments.process.script_path, but that's
> > an implementation detail. Some plugins may care more about what is an
> input
> > and what isn't, or do other kinds of mangling to the implementation. In
> any
> > case, the user should have to know how to massage these values: they can
> > set up inputs and possibly configuration (same way as in TOSCA) and then
> > call Operation.configure to do the right thing.
> >
> > The implementation and function are not the same, as you can see even in
> > my trivial example. 

incubator-ariatosca git commit: added closing and removed daemon thread

2017-05-25 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-258-Convert-runtime-properties-to-attributes 0b96ec126 -> 
b597b94db


added closing and removed daemon thread


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

Branch: refs/heads/ARIA-258-Convert-runtime-properties-to-attributes
Commit: b597b94db90295d827c46f8bac6951975c5c3e03
Parents: 0b96ec1
Author: max-orlov 
Authored: Thu May 25 11:48:35 2017 +0300
Committer: max-orlov 
Committed: Thu May 25 11:48:35 2017 +0300

--
 aria/orchestrator/execution_plugin/ctx_proxy/server.py | 1 -
 aria/orchestrator/workflows/executor/process.py| 4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b597b94d/aria/orchestrator/execution_plugin/ctx_proxy/server.py
--
diff --git a/aria/orchestrator/execution_plugin/ctx_proxy/server.py 
b/aria/orchestrator/execution_plugin/ctx_proxy/server.py
index 1ce0e08..102ff9a 100644
--- a/aria/orchestrator/execution_plugin/ctx_proxy/server.py
+++ b/aria/orchestrator/execution_plugin/ctx_proxy/server.py
@@ -98,7 +98,6 @@ class CtxProxy(object):
 quiet=True,
 server=BottleServerAdapter)
 thread = threading.Thread(target=serve)
-thread.daemon = True
 thread.start()
 return thread
 

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/b597b94d/aria/orchestrator/workflows/executor/process.py
--
diff --git a/aria/orchestrator/workflows/executor/process.py 
b/aria/orchestrator/workflows/executor/process.py
index 43bcced..f02e0a6 100644
--- a/aria/orchestrator/workflows/executor/process.py
+++ b/aria/orchestrator/workflows/executor/process.py
@@ -307,11 +307,11 @@ def _main():
 for decorate in process_executor.decorate():
 task_func = decorate(task_func)
 task_func(ctx=ctx, **operation_inputs)
+ctx.close()
 messenger.succeeded()
 except BaseException as e:
-messenger.failed(e)
-finally:
 ctx.close()
+messenger.failed(e)
 
 if __name__ == '__main__':
 _main()