deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "marios@redhat.com" <mandr...@redhat.com>
Subject Re: shouldn't contraint's values be inlined?
Date Wed, 24 Apr 2013 09:27:10 GMT
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
> 
> 


Mime
View raw message