You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ariatosca.apache.org by Steve Baillargeon <st...@ericsson.com> on 2017/10/30 18:18:24 UTC

Defining a Metadata keyname as a list?

Hi
The metadata section is defined as a map where each entry has a keyname and value.
Example:
<key_1>: <value_1>
...
<key_n>: <value_n>

Can I further define a metadata keyname as a list of values ?
Example:
<key_1>: <value_1>
<key_2>: [<value_2A>, <value_2B>,...]

Regards
Steve B


Re: Defining a Metadata keyname as a list?

Posted by Tal Liron <ta...@cloudify.co>.
No, you cannot. The spec clearly defines metadata as a list of strings, and
ARIA conforms.

However, it's not hard to work around this. You can put the list of items
you want as a string with some kind of delimiter (comma?) Or, you can do a
numbering trick. You will have to parse it yourself. Examples:

my_key: 'value1, value2, value3'

Or:

my_key.1: value1
my_key.2: value2
my_key.3: value3


On Mon, Oct 30, 2017 at 1:18 PM, Steve Baillargeon <
steve.baillargeon@ericsson.com> wrote:

> Hi
> The metadata section is defined as a map where each entry has a keyname
> and value.
> Example:
> <key_1>: <value_1>
> ...
> <key_n>: <value_n>
>
> Can I further define a metadata keyname as a list of values ?
> Example:
> <key_1>: <value_1>
> <key_2>: [<value_2A>, <value_2B>,...]
>
> Regards
> Steve B
>
>