Hi
YAML1.0 spec is incorrect for import definitions.
YAML1.2 spec has updated the import grammar as follows.
It will be great for ARIA to support parts of the YAML1.2 spec soon especially 
for areas that are corrected. 

From YAML 1.2 spec:
3.5.8.2 Grammar
Import definitions have one the following grammars:
3.5.8.2.1 Single-line grammar:
imports:
  - <file_URI_1>
  - <file_URI_2>
3.5.8.2.2 Multi-line grammar
imports:  
  - file: <file_URI>
    repository: <repository_name>
    namespace_uri: <definition_namespace_uri>
    namespace_prefix: <definition_namespace_prefix>

-Steve B

-----Original Message-----
From: Tal Liron [mailto:t...@cloudify.co] 
Sent: Monday, September 25, 2017 11:39 AM
To: dev@ariatosca.incubator.apache.org
Subject: Re: Contribution for https://issues.apache.org/jira/browse/ARIA-118

So, this is one of the cases where the spec seems to be wrong: the 
<import_name> is probably a mistake. None of the other examples in the spec 
have it, nor do we see it in other TOSCA examples.

Note that if we needed an <import_name> than it would even have to be for the 
short form. So:

imports:
 - importname1: myfile.yaml
 - importname2: otherfile.yaml
 - importname3:
     file: lastfile.yaml

The above seems wrong (also, what role does the import name have?). In ARIA we 
treated this as an error in the spec, so we do not have the import name.

On Mon, Sep 25, 2017 at 8:52 AM, D Jayachandran <d.jayachand...@ericsson.com
> wrote:

> Hi Tal,
>
> As per the grammer in the SPEC, seems the import should take a 
> <import_name>. Your example dint have a <import_name> but started with 
> respository as such.
>
> <import_name>:
>
>   file: <file_URI>
>
>   repository: <repository_name>
>
>   namespace_uri: <definition_namespace_uri>
>
>   namespace_prefix: <definition_namespace_prefix>
>
>
> With your example can we have multiple repositories ?
>
>
> Regards,
> DJ
>
> -----Original Message-----
> From: Tal Liron [mailto:t...@cloudify.co]
> Sent: Thursday, September 21, 2017 9:31 PM
> To: dev@ariatosca.incubator.apache.org
> Subject: Re: Contribution for https://issues.apache.org/
> jira/browse/ARIA-118
>
> I do suggest the repository, because it seems like the more TOSCA way 
> to do this. These are special imports that are not part of the CSAR 
> but rather provided in a special way by ARIA. A special repository 
> seems to be the right way to handle this.
>
> On Thu, Sep 21, 2017 at 2:40 AM, D Jayachandran < 
> d.jayachand...@ericsson.com
> > wrote:
>
> > Hi Tal,
> >
> > I had a space between the plugin and filename. The correct one would 
> > like this.
> >
> > import
> >   - plugin:openstack-1.0
> >
> > By this way it won't conflict with YAML convention. Do you still 
> > suggest to use the repository conventions ?
> >
> > Regards,
> > DJ
> > -----Original Message-----
> > From: Tal Liron [mailto:t...@cloudify.co]
> > Sent: Wednesday, September 20, 2017 9:38 PM
> > To: dev@ariatosca.incubator.apache.org
> > Subject: Re: Contribution for https://issues.apache.org/
> > jira/browse/ARIA-118
> >
> > I think the format you suggest is awkward in YAML. Because ":" is 
> > reserved, you would have to wrap the string in quotes:
> >
> > imports:
> >  - this/is/a/string/import.yaml
> >  - this is also a string .yaml
> >  - "plugins: but here we have to add quotes because of the colon.yaml"
> >
> > The TOSCA way to handle name ambiguity is to use a repository in the 
> > long-form of the import. What we can do is create a built-in 
> > repository called "plugins". So it would look like this:
> >
> > imports:
> >  - mytypes.yaml
> >  - repository: plugins
> >    file: openstack.yaml
> >
> >
> >
> >
> >
> >
> > On Wed, Sep 20, 2017 at 3:49 AM, D Jayachandran < 
> > d.jayachand...@ericsson.com
> > > wrote:
> >
> > > Hi Tal,
> > >
> > > With respect to this JIRA issue.
> > > I would like to contribute on the first part, which is specific to 
> > > plugin implementation.
> > >
> > > " If a plugin contained its plugin.yaml as part of its wagon 
> > > archive, then once installed, users could import the yaml file 
> > > more easily using a notation such as plugins/openstack.yaml (or 
> > > perhaps openstack.yaml, having the import mechanism iterate over 
> > > plugins looking for this resource file or so)"
> > >
> > > Instead of "plugins/openstack.yaml", I would like to suggest the 
> > > following
> > > "plugins: openstack-<version>"
> > > Please let me know if this fine with you.
> > >
> > >
> > > Regards,
> > > DJ
> > >
> > > -----Original Message-----
> > > From: Tal Liron [mailto:t...@gigaspaces.com]
> > > Sent: Thursday, July 20, 2017 6:24 PM
> > > To: dev@ariatosca.incubator.apache.org
> > > Subject: Re: Contribution for https://issues.apache.org/
> > > jira/browse/ARIA-118
> > >
> > > It's unassigned, so I don't see why not!
> > >
> > > On Thu, Jul 20, 2017 at 7:41 AM, D Jayachandran < 
> > > d.jayachand...@ericsson.com
> > > > wrote:
> > >
> > > > Hi,
> > > >
> > > > Do you have any plans on working on this JIRA issue ?
> > > > https://issues.apache.org/jira/browse/ARIA-118
> > > > Can we contribute on this ?
> > > >
> > > >
> > > > Regards,
> > > > DJ
> > > >
> > >
> >
>

Reply via email to