Hi all,
I'm working with namespace metadata templates and have hit across something that isn't behaving the way I thought it should. I'm sure I'm misunderstanding something and would appreciate some clarification and advice.
I have a namespace metadata template that looks something like this:
> asset.namespace.describe :namespace /path/to/namespace
:namespace -id "12345"
:path "/path/to/namespace"
<snip>
:template
:metadata
:scope "all"
:definition -requirement "mandatory" "metadata:type"
:value -binding "default"
:type "value"
<snip>
When I run asset.create as follows I have no problems. That is, when I explicitly state the metadata type found in the template, everything works:
> asset.create :namespace /path/to/namespace :name "mynewasset" :meta < :metadata:type < :value "value" > >
If I ever omit "metadata:type" from my asset.create command I receive an error like this:
error: executing asset.create: [arc.mf.server.Services$ExServiceError]: call to service 'asset.create' failed: Missing mandatory metadata of type 'metadata:value' for namespace: /path/to/namespace
I was under the impression that created assets should automatically "inherit" the metadata definitions from any metadata templates that have effect on the namespace. Obviously that's not the case here.
Ultimately, I'd like to create assets in a namespace and, if I do not explicitly state the mandatory metadata (as defined by the template) have it automatically added to the assets. Is this achievable?
Cheers,
John