RE: Inputs and Node object context for python and shell scripts

2017-07-24 Thread D Jayachandran
Hi Max,

Yes I can access the context ctx with a python plugin and shell script as you 
have mentioned.
But with python script .py files under implementation, am not sure if the ctx 
and inputs are passed as "globals". I will re-confirm this.
The inputs which I was referring here were the lifecycle operation inputs.


Regards,
DJ

-Original Message-
From: Maxim Orlov [mailto:ma...@gigaspaces.com] 
Sent: Tuesday, July 25, 2017 12:14 AM
To: dev@ariatosca.incubator.apache.org
Subject: Re: Inputs and Node object context for python and shell scripts

I'm not entirely sure to which inputs you are referring to, but any ctx 
attribute or method accessible from a python script is accessible form any 
shell script. For example:

   - "ctx.node.attributes['map']['key']" (in python) is "ctx node
   attributes map.key" (under bash)
   - "ctx.node.attributes['map']['key'] = value" (in python) is "ctx node
   attributes map.key value" (under bash)
   - "ctx.logger.info('some message')" (in python) is "ctx logger info
   'some message'" (under bash)


On Mon, Jul 24, 2017 at 8:47 PM, Tal Liron  wrote:

> I'm pretty sure you can access the inputs via the ctx call. Can anyone 
> confirm how to do this?
>
> We really need to document ctx usage...
>
> On Mon, Jul 24, 2017 at 5:57 AM, D Jayachandran < 
> d.jayachand...@ericsson.com
> > wrote:
>
> > Hi,
> >
> > With current ARIA implementation, the python and shell scripts are 
> > being executed by the "execution plugin".
> >
> > The context object and inputs are not passed to passed to python scripts.
> > We would like this to be passed to the python scripts.
> > For shell scripts atleast the inputs needs to be passed. The context 
> > object can be accessed via client.py with the SOCKET URL.
> > Kindly let us know if this can be added as a JIRA issue ?
> >
> >
> > Regards,
> > DJ
> >
> >
> >
> >
>


Re: Inputs and Node object context for python and shell scripts

2017-07-24 Thread Maxim Orlov
I'm not entirely sure to which inputs you are referring to, but any ctx
attribute or method accessible from a python script is accessible form any
shell script. For example:

   - "ctx.node.attributes['map']['key']" (in python) is "ctx node
   attributes map.key" (under bash)
   - "ctx.node.attributes['map']['key'] = value" (in python) is "ctx node
   attributes map.key value" (under bash)
   - "ctx.logger.info('some message')" (in python) is "ctx logger info
   'some message'" (under bash)


On Mon, Jul 24, 2017 at 8:47 PM, Tal Liron  wrote:

> I'm pretty sure you can access the inputs via the ctx call. Can anyone
> confirm how to do this?
>
> We really need to document ctx usage...
>
> On Mon, Jul 24, 2017 at 5:57 AM, D Jayachandran <
> d.jayachand...@ericsson.com
> > wrote:
>
> > Hi,
> >
> > With current ARIA implementation, the python and shell scripts are being
> > executed by the "execution plugin".
> >
> > The context object and inputs are not passed to passed to python scripts.
> > We would like this to be passed to the python scripts.
> > For shell scripts atleast the inputs needs to be passed. The context
> > object can be accessed via client.py with the SOCKET URL.
> > Kindly let us know if this can be added as a JIRA issue ?
> >
> >
> > Regards,
> > DJ
> >
> >
> >
> >
>


Re: Inputs and Node object context for python and shell scripts

2017-07-24 Thread Tal Liron
I'm pretty sure you can access the inputs via the ctx call. Can anyone
confirm how to do this?

We really need to document ctx usage...

On Mon, Jul 24, 2017 at 5:57 AM, D Jayachandran  wrote:

> Hi,
>
> With current ARIA implementation, the python and shell scripts are being
> executed by the "execution plugin".
>
> The context object and inputs are not passed to passed to python scripts.
> We would like this to be passed to the python scripts.
> For shell scripts atleast the inputs needs to be passed. The context
> object can be accessed via client.py with the SOCKET URL.
> Kindly let us know if this can be added as a JIRA issue ?
>
>
> Regards,
> DJ
>
>
>
>


Re: Openstack plugin

2017-07-24 Thread Maxim Orlov
Hey DJ,

Basically ARIA indeed has an adapter for cloudify-based plugins. This
enables support for any cloudify plugins (Provided the plugin.yaml has been
translated into TOSCA). Note that later on, ARIA will have native plugins
and will not rely on kindness of Cloudify.
You can find the Cloudify repo here
. It holds some
examples, the plugin.yaml and the adapter itself.

On Mon, Jul 24, 2017 at 2:01 PM, D Jayachandran  wrote:

> Thanks for the information Tal.  What is the adapter which you are
> referring here ?
>
> Regards,
> DJ
> -Original Message-
> From: Tal Liron [mailto:t...@gigaspaces.com]
> Sent: Friday, July 21, 2017 8:37 PM
> To: dev@ariatosca.incubator.apache.org
> Subject: Re: Openstack plugin
>
> ARIA has an adapter that can use Cloudify plugins, and it has been tested
> successfully with both OpenStack and AWS so far.
>
> Unfortunately there are no instructions on how to use it. I know just the
> right person to write it and will ask him to do so. :)
>
> On Fri, Jul 21, 2017 at 3:29 AM, D Jayachandran <
> d.jayachand...@ericsson.com
> > wrote:
>
> > Hi,
> >
> > Will openstack plugin be available as part of any ARIA release ?
> > Is this already been looked upon or in the backlog ?
> >
> >
> > Regards,
> > DJ
> >
>


RE: Openstack plugin

2017-07-24 Thread D Jayachandran
Thanks for the information Tal.  What is the adapter which you are referring 
here ?

Regards,
DJ
-Original Message-
From: Tal Liron [mailto:t...@gigaspaces.com] 
Sent: Friday, July 21, 2017 8:37 PM
To: dev@ariatosca.incubator.apache.org
Subject: Re: Openstack plugin

ARIA has an adapter that can use Cloudify plugins, and it has been tested 
successfully with both OpenStack and AWS so far.

Unfortunately there are no instructions on how to use it. I know just the right 
person to write it and will ask him to do so. :)

On Fri, Jul 21, 2017 at 3:29 AM, D Jayachandran  wrote:

> Hi,
>
> Will openstack plugin be available as part of any ARIA release ?
> Is this already been looked upon or in the backlog ?
>
>
> Regards,
> DJ
>


Inputs and Node object context for python and shell scripts

2017-07-24 Thread D Jayachandran
Hi,

With current ARIA implementation, the python and shell scripts are being 
executed by the "execution plugin".

The context object and inputs are not passed to passed to python scripts. We 
would like this to be passed to the python scripts.
For shell scripts atleast the inputs needs to be passed. The context object can 
be accessed via client.py with the SOCKET URL.
Kindly let us know if this can be added as a JIRA issue ?


Regards,
DJ