You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ariatosca.apache.org by D Jayachandran <d....@ericsson.com> on 2018/02/22 06:11:07 UTC

RE: Implementation for get_operation_output

Hi All,

Please find my proposal for the implementation of "get_operation_output"

Proposal

	1) To include attribute "outputs" for the "operation" model
	2) Provide the operation as Instrumented operation with Node operation context and Relationship operation context(ctx).
	3) Set any operation specific variable using the provided context(ctx) as "ctx.outputs["variable_1"] = "value"
	4) Retrieve the stored value using get_operation_output from the associated operation model.

Regards,
DJ

-----Original Message-----
From: Tal Liron [mailto:tal@cloudify.co] 
Sent: Monday, November 13, 2017 8:29 PM
To: dev@ariatosca.incubator.apache.org
Subject: Re: Implementation for get_operation_output

No, it has not yet been implemented.

On Mon, Nov 13, 2017 at 2:03 AM, D Jayachandran <d.jayachandran@ericsson.com
> wrote:

> Hi Tal,
>
> Will the below work at this moment ?
>
> ctx return my_value = this is the value And then you could use 
> get_operation_output on "my_value".
>
>
> Regards,
> DJ
> -----Original Message-----
> From: Tal Liron [mailto:tal@cloudify.co]
> Sent: Thursday, November 09, 2017 10:14 PM
> To: dev@ariatosca.incubator.apache.org
> Cc: Paul Doyle <pa...@ericsson.com>; Barry Downey < 
> barry.downey@ericsson.com>
> Subject: Re: Implementation for get_operation_output
>
> This function has not yet been implemented, so it's stored nowhere. 
> But of course it will likely have to be stored per particular execution.
>
> The "ctx" tool is just a way to remotely access the context object, so 
> yes, with plugins it's identical.
>
> On Thu, Nov 9, 2017 at 1:14 AM, D Jayachandran < 
> d.jayachandran@ericsson.com>
> wrote:
>
> > Hi Tal,
> >
> > To understand a bit more, so where are these return values stored ?
> > Would they updated to services as we do with TOSCA attributes or do 
> > they live only for a particular execution ?
> > Also when it comes to plugin, can I do the same with the context 
> > object being passed rather than using the "ctx" tool ?
> >
> > Regards,
> > DJ
> > -----Original Message-----
> > From: Tal Liron [mailto:tal@cloudify.co]
> > Sent: Wednesday, November 08, 2017 8:06 PM
> > To: dev@ariatosca.incubator.apache.org
> > Cc: Paul Doyle <pa...@ericsson.com>; Barry Downey < 
> > barry.downey@ericsson.com>
> > Subject: Re: Implementation for get_operation_output
> >
> > ARIA currently uses a special tool, called "ctx", to communicate 
> > with implementation scripts. I imagine we will use the same tool to 
> > set return values.
> >
> > My understanding is also that these return values are quite 
> > arbitrary, and thus un-typed. They will likely be stored as strings. 
> > So, for example, from within a bash script you would do something like this:
> >
> > ctx return my_value = this is the value
> >
> > And then you could use get_operation_output on "my_value".
> >
> >
> > On Tue, Nov 7, 2017 at 5:55 AM, D Jayachandran < 
> > d.jayachandran@ericsson.com>
> > wrote:
> >
> > > Hi All,
> > >
> > > We currently don't have an implementation for the intrinsic 
> > > function "get_operation_output".
> > >
> > > As per the TOSCA Simple YAML 1.0, specification it indicates this 
> > > function must be used to retrieve the values of variables exposed 
> > > / exported from an interface operation.
> > > The variable which is referenced here seems to be an environmental 
> > > variable exposed by the interface operation script/plugin. (2.14.3
> > Example:
> > > setting output variables to an attribute, 2.14.4 Example: passing 
> > > output variables between operations )
> > >
> > > We would like if you have the same understanding on the variable 
> > > which is referenced in "get_operation_output".
> > >
> > > FROM TOSCA SPEC
> > >
> > > <output_variable_name> - The required name of the variable that is 
> > > exposed / exported by the operation.
> > >
> > > Here it is just stated as a variable. In the example it is 
> > > mentioned as "environmental" variable exposed. Do you see a difference here ?
> > > Are we considering as an environmental variable or as an attribute
> > variable ?.
> > >
> > > Please let us know your comments on this so that we can plan the 
> > > implementation of this.
> > >
> > > Regards,
> > > DJ
> > >
> >
>

Re: Implementation for get_operation_output

Posted by Thomas Nadeau <tn...@gmail.com>.
After reviewing the thread/code, the proposal seems reasonable.  I guess
the devil is in the details of the implementation, but the general approach
here seems ok.
Can I suggest that you please write up a 'design spec' on the wiki as we've
done for other bigger pieces of functionality. That will help others to
understand
what the associated block of PRs that will come from your implementation.
This will also help others like me, join in coding this PR and be on the
same page.

Thanks!

--Tom


On Thu, Feb 22, 2018 at 1:11 AM, D Jayachandran <d.jayachandran@ericsson.com
> wrote:

> Hi All,
>
> Please find my proposal for the implementation of "get_operation_output"
>
> Proposal
>
>         1) To include attribute "outputs" for the "operation" model
>         2) Provide the operation as Instrumented operation with Node
> operation context and Relationship operation context(ctx).
>         3) Set any operation specific variable using the provided
> context(ctx) as "ctx.outputs["variable_1"] = "value"
>         4) Retrieve the stored value using get_operation_output from the
> associated operation model.
>
> Regards,
> DJ
>
> -----Original Message-----
> From: Tal Liron [mailto:tal@cloudify.co]
> Sent: Monday, November 13, 2017 8:29 PM
> To: dev@ariatosca.incubator.apache.org
> Subject: Re: Implementation for get_operation_output
>
> No, it has not yet been implemented.
>
> On Mon, Nov 13, 2017 at 2:03 AM, D Jayachandran <
> d.jayachandran@ericsson.com
> > wrote:
>
> > Hi Tal,
> >
> > Will the below work at this moment ?
> >
> > ctx return my_value = this is the value And then you could use
> > get_operation_output on "my_value".
> >
> >
> > Regards,
> > DJ
> > -----Original Message-----
> > From: Tal Liron [mailto:tal@cloudify.co]
> > Sent: Thursday, November 09, 2017 10:14 PM
> > To: dev@ariatosca.incubator.apache.org
> > Cc: Paul Doyle <pa...@ericsson.com>; Barry Downey <
> > barry.downey@ericsson.com>
> > Subject: Re: Implementation for get_operation_output
> >
> > This function has not yet been implemented, so it's stored nowhere.
> > But of course it will likely have to be stored per particular execution.
> >
> > The "ctx" tool is just a way to remotely access the context object, so
> > yes, with plugins it's identical.
> >
> > On Thu, Nov 9, 2017 at 1:14 AM, D Jayachandran <
> > d.jayachandran@ericsson.com>
> > wrote:
> >
> > > Hi Tal,
> > >
> > > To understand a bit more, so where are these return values stored ?
> > > Would they updated to services as we do with TOSCA attributes or do
> > > they live only for a particular execution ?
> > > Also when it comes to plugin, can I do the same with the context
> > > object being passed rather than using the "ctx" tool ?
> > >
> > > Regards,
> > > DJ
> > > -----Original Message-----
> > > From: Tal Liron [mailto:tal@cloudify.co]
> > > Sent: Wednesday, November 08, 2017 8:06 PM
> > > To: dev@ariatosca.incubator.apache.org
> > > Cc: Paul Doyle <pa...@ericsson.com>; Barry Downey <
> > > barry.downey@ericsson.com>
> > > Subject: Re: Implementation for get_operation_output
> > >
> > > ARIA currently uses a special tool, called "ctx", to communicate
> > > with implementation scripts. I imagine we will use the same tool to
> > > set return values.
> > >
> > > My understanding is also that these return values are quite
> > > arbitrary, and thus un-typed. They will likely be stored as strings.
> > > So, for example, from within a bash script you would do something like
> this:
> > >
> > > ctx return my_value = this is the value
> > >
> > > And then you could use get_operation_output on "my_value".
> > >
> > >
> > > On Tue, Nov 7, 2017 at 5:55 AM, D Jayachandran <
> > > d.jayachandran@ericsson.com>
> > > wrote:
> > >
> > > > Hi All,
> > > >
> > > > We currently don't have an implementation for the intrinsic
> > > > function "get_operation_output".
> > > >
> > > > As per the TOSCA Simple YAML 1.0, specification it indicates this
> > > > function must be used to retrieve the values of variables exposed
> > > > / exported from an interface operation.
> > > > The variable which is referenced here seems to be an environmental
> > > > variable exposed by the interface operation script/plugin. (2.14.3
> > > Example:
> > > > setting output variables to an attribute, 2.14.4 Example: passing
> > > > output variables between operations )
> > > >
> > > > We would like if you have the same understanding on the variable
> > > > which is referenced in "get_operation_output".
> > > >
> > > > FROM TOSCA SPEC
> > > >
> > > > <output_variable_name> - The required name of the variable that is
> > > > exposed / exported by the operation.
> > > >
> > > > Here it is just stated as a variable. In the example it is
> > > > mentioned as "environmental" variable exposed. Do you see a
> difference here ?
> > > > Are we considering as an environmental variable or as an attribute
> > > variable ?.
> > > >
> > > > Please let us know your comments on this so that we can plan the
> > > > implementation of this.
> > > >
> > > > Regards,
> > > > DJ
> > > >
> > >
> >
>