Re: create_template

2017-07-10 Thread DeWayne Filppi
By the way, that was the problem.  Thanks.

On Jul 8, 2017 11:51 PM, "Ran Ziv"  wrote:

> In this case, I assume the problem is you haven't loaded the ARIA
> extensions - by which I mean calling this function:
> https://github.com/apache/incubator-ariatosca/blob/0.1.0/
> aria/__init__.py#L54
>
> The above function searches for extensions and loads them.
> The TOSCA parser is loaded as an extension using the extension mechanism,
> so if that function doesn't get called, the TOSCA presenter class won't
> register on here:
> https://github.com/apache/incubator-ariatosca/blob/0.1.0/
> aria/extension.py#L95
>
> In the CLI, for example, it is called here:
> https://github.com/apache/incubator-ariatosca/blob/0.1.0/
> aria/cli/main.py#L59
>
>
> Hope this helps.
>
>
>
> On Sun, Jul 9, 2017 at 7:40 AM, DeWayne Filppi 
> wrote:
>
> > Maybe not.  I installed using "pip install ." in the source root.  I
> didn't
> > use '-e'. I see no extensions module in my venv.  The pth file wasn't
> > present when I used 'pip install .', so I switch to the makefile.  This
> > completed and appeared to put everything in it's right place, but the
> error
> > is unchanged.  To be specific I see:
> >
> > Validation issues:
> >   0: presenter not found
> >  PresenterNotFoundError: presenter not found
> >
> >
> > On Sat, Jul 8, 2017 at 2:27 AM, Ran Ziv  wrote:
> >
> > > Hi DeWayne,
> > >
> > > The error probably means that the ARIA TOSCA extension isn't properly
> > > installed, and therefore the parser can't find a valid reader.
> > > The error message could probably have been somewhat clearer.. Feel free
> > to
> > > create a JIRA issue over this (or I'll create one if you don't :)).
> > >
> > > Note that the ARIA TOSCA extension gets installed when running "pip
> > > install" over the apache-ariatosca project as expected - but when
> > > installing in editable mode, a bug in setuptools causes only the main
> > > ("aria") package to get installed properly instead.
> > > See this JIRA issue: https://issues.apache.org/jira/browse/ARIA-110 -
> > > which
> > > also describes the workaround.
> > > (This is also documented on our Confluence)
> > >
> > > Finally, you can run "make install-virtual" to install inside a Python
> > > virtualenv, and that will also take care of making the mentioned
> > workaround
> > > for you, resulting in a proper installation of the TOSCA extension.
> > > ( See make target here:
> > > https://github.com/apache/incubator-ariatosca/blob/master/Makefile#L38
> )
> > >
> > >
> > > Ran
> > >
> > >
> > > On Sat, Jul 8, 2017 at 7:10 AM, DeWayne Filppi  >
> > > wrote:
> > >
> > > > I'm getting a validation error out of core.create_service_template,
> but
> > > it
> > > > complains about there being no presenter, so I can't figure out what
> > the
> > > > error is (no details are dumped).  The code essentially copies the
> CLI
> > > > code:
> > > >
> > > >
> > > >   service_template_path = service_template_utils.get(
> > > > service_template_path,
> > > >
> > > >  service_template_filename)
> > > >   core = Core(model_storage, resource_storage, plugin_manager)
> > > >   try:
> > > > core.create_service_template(service_template_path,
> > > >  os.path.dirname(service_
> > template_path),
> > > >  template_name)
> > > >
> > >
> >
> >
> >
> > --
> > DeWayne Filppi, Director, Solutions Architect 
> > --
> > M: +17145121706 http://cloudify.co @dfilppi
> > 
> > 
> > 
> > 
> >
>


Re: create_template

2017-07-08 Thread DeWayne Filppi
Maybe not.  I installed using "pip install ." in the source root.  I didn't
use '-e'. I see no extensions module in my venv.  The pth file wasn't
present when I used 'pip install .', so I switch to the makefile.  This
completed and appeared to put everything in it's right place, but the error
is unchanged.  To be specific I see:

Validation issues:
  0: presenter not found
 PresenterNotFoundError: presenter not found


On Sat, Jul 8, 2017 at 2:27 AM, Ran Ziv  wrote:

> Hi DeWayne,
>
> The error probably means that the ARIA TOSCA extension isn't properly
> installed, and therefore the parser can't find a valid reader.
> The error message could probably have been somewhat clearer.. Feel free to
> create a JIRA issue over this (or I'll create one if you don't :)).
>
> Note that the ARIA TOSCA extension gets installed when running "pip
> install" over the apache-ariatosca project as expected - but when
> installing in editable mode, a bug in setuptools causes only the main
> ("aria") package to get installed properly instead.
> See this JIRA issue: https://issues.apache.org/jira/browse/ARIA-110 -
> which
> also describes the workaround.
> (This is also documented on our Confluence)
>
> Finally, you can run "make install-virtual" to install inside a Python
> virtualenv, and that will also take care of making the mentioned workaround
> for you, resulting in a proper installation of the TOSCA extension.
> ( See make target here:
> https://github.com/apache/incubator-ariatosca/blob/master/Makefile#L38 )
>
>
> Ran
>
>
> On Sat, Jul 8, 2017 at 7:10 AM, DeWayne Filppi 
> wrote:
>
> > I'm getting a validation error out of core.create_service_template, but
> it
> > complains about there being no presenter, so I can't figure out what the
> > error is (no details are dumped).  The code essentially copies the CLI
> > code:
> >
> >
> >   service_template_path = service_template_utils.get(
> > service_template_path,
> >
> >  service_template_filename)
> >   core = Core(model_storage, resource_storage, plugin_manager)
> >   try:
> > core.create_service_template(service_template_path,
> >  os.path.dirname(service_template_path),
> >  template_name)
> >
>



-- 
DeWayne Filppi, Director, Solutions Architect 
--
M: +17145121706 http://cloudify.co @dfilppi






Re: create_template

2017-07-08 Thread Ran Ziv
Hi DeWayne,

The error probably means that the ARIA TOSCA extension isn't properly
installed, and therefore the parser can't find a valid reader.
The error message could probably have been somewhat clearer.. Feel free to
create a JIRA issue over this (or I'll create one if you don't :)).

Note that the ARIA TOSCA extension gets installed when running "pip
install" over the apache-ariatosca project as expected - but when
installing in editable mode, a bug in setuptools causes only the main
("aria") package to get installed properly instead.
See this JIRA issue: https://issues.apache.org/jira/browse/ARIA-110 - which
also describes the workaround.
(This is also documented on our Confluence)

Finally, you can run "make install-virtual" to install inside a Python
virtualenv, and that will also take care of making the mentioned workaround
for you, resulting in a proper installation of the TOSCA extension.
( See make target here:
https://github.com/apache/incubator-ariatosca/blob/master/Makefile#L38 )


Ran


On Sat, Jul 8, 2017 at 7:10 AM, DeWayne Filppi 
wrote:

> I'm getting a validation error out of core.create_service_template, but it
> complains about there being no presenter, so I can't figure out what the
> error is (no details are dumped).  The code essentially copies the CLI
> code:
>
>
>   service_template_path = service_template_utils.get(
> service_template_path,
>
>  service_template_filename)
>   core = Core(model_storage, resource_storage, plugin_manager)
>   try:
> core.create_service_template(service_template_path,
>  os.path.dirname(service_template_path),
>  template_name)
>