You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by "Koper, Dies" <di...@fast.au.fujitsu.com> on 2013/04/24 02:15:29 UTC

shouldn't contraint's values be inlined?

Frederic asked me about resource metadata:

Is the XML serialization of attribute constraints correct ?
      <constraint>
        <value>UZXC0GRT-ZG8ZJCJ07</value>
      </constraint>
Should it just be <constraint>UZXC0GRT-ZG8ZJCJ07</constraint>  ?

He also pointed me to http://mantis.dmtf.org/mantis/view.php?id=1971.
Is this what the proposal envisioned?
mantis1971_v2.odt has "value constraints" in italics - not sure what to
make of that.

Regards,
Dies Koper



FW: shouldn't contraint's values be inlined?

Posted by "Koper, Dies" <di...@fast.au.fujitsu.com>.
Hi Frederic,

Marios has replied about the question you raised about constraints.
Please refer to the attached e-mail.
I've CC'ed the Deltacloud mailing list in case you have further
questions about the xml response you saw.

Regards,
Dies Koper


Re: shouldn't contraint's values be inlined?

Posted by "marios@redhat.com" <ma...@redhat.com>.
On 24/04/13 03:15, Koper, Dies wrote:
> Frederic asked me about resource metadata:
> 
> Is the XML serialization of attribute constraints correct ?
>       <constraint>
>         <value>UZXC0GRT-ZG8ZJCJ07</value>
>       </constraint>

No - the parent 'constraint' tag is extraneous here - can't remember the
exact reasoning (needs more investigation) but there was a problem with
the serialization of the 'value'(s) (note plural)

> Should it just be <constraint>UZXC0GRT-ZG8ZJCJ07</constraint>  

No - there are examples in 5.11.1.1:

 <ResourceMetadata xmlns="http://schemas.dmtf.org/cimi/1">
  <id> http://example.org/types/VC </id>
  <typeURI> http://schemas.dmtf.org/cimi/1/VolumeConfiguration </typeURI>
  <name> VolumeConfiguration </name>
  <attribute name="format" type="string" required="false">
    <value> ext4 </value>
    <value> ntfs </value>
  </attribute>
  <attribute name="Location" namespace="http://example.org/" type="string"/>
</ResourceMetadata>


> He also pointed me to http://mantis.dmtf.org/mantis/view.php?id=1971.
> Is this what the proposal envisioned?
> mantis1971_v2.odt has "value constraints" in italics - not sure what to
> make of that.

right - when we developed the proposal and after discussion with the
group - the 'value constraints' in italics was meant to show that this
wasn't actually the attribute name that would appear in the
serialization ("Note that the serialization of these "value constraints"
shall be determined by the type of the attribute - see clause 5.11.1.").
In 5.11.1 you can see that in fact this could be serialized as an array
of 'value' or can even be more complex including 'range'. A big part of
defining the ResourceMetadata resource's Attribute 'value constraints'
in this way is to allow definition of other value constraints (and
serializations).


marios

> 
> Regards,
> Dies Koper
> 
>