deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ronelle Landy <rla...@redhat.com>
Subject Re: Rev1 CIMI ResourceMetadata capabilities
Date Tue, 18 Dec 2012 21:09:58 GMT
> From: marios@redhat.com
> To: dev@deltacloud.apache.org
> Sent: Tuesday, December 18, 2012 12:26:20 PM
> Subject: Rev1 CIMI ResourceMetadata capabilities
> 
> 
> Initial implementation/rework of CIMI ResourceMetadata:
> 
> curl --user "mockuser:mockpassword" -H "Accept: application/xml"
> http://localhost:3001/cimi/resource_metadata
> 
> 
> *** Usage:
> 
> CIMI features go in
> deltacloud/server/lib/deltacloud/drivers/cimi_features.rb - defined
> in same way as deltacloud features.
> 
> Example usage in mock driver:
> 
>  87     #cimi features$
>  88     feature :machines, :default_initial_state do$
>  89       { :values => ["STARTED"] }$
>  90     end$
>  91     feature :machines, :initial_states do$
>  92       { :values => ["STARTED", "STOPPED"]}$
>  93     end$
> 
> NOTE: these may note make sense for mock (e.g. initial_states) but
> are here just for testing/example
> 
> *** Issues
> 
> imo CIMI spec not entirely clear/I don't understand how 'values' are
> to be defined for capability (I tried following what is says for
> 'constraints' of attributes - i need to bring this up in next
> meeting)... and I can't work out how to serialize them correctly
> using our dsl - so the XML for example looks like (note how 'value'
> is specified...):
> 
> <ResourceMetadata xmlns="http://schemas.dmtf.org/cimi/1"
> resourceURI="http://schemas.dmtf.org/cimi/1/ResourceMetadata">
>   <id>http://localhost:3001/cimi/resource_metadata/machine</id>
>   <name>Machine</name>
>   <typeUri>http://localhost:3001/cimi/machines</typeUri>
>   <capability name="DefaultInitialState"
>   uri="http://schemas.dmtf.org/cimi/1/capability/Machine/DefaultInitialState"
>   description="Indicates what the default initial state of a new
>   Machine">
>     <value>
>       <value>STARTED</value>
>     </value>
>   </capability>
>   <capability name="DefaultInitialState"
>   uri="http://schemas.dmtf.org/cimi/1/capability/Machine/DefaultInitialState"
>   description="Indicates the list of allowable initial states">
>     <value>
>       <value>STARTED</value>
>     </value>
>     <value>
>       <value>STOPPED</value>
>     </value>
>   </capability>
> </ResourceMetadata>
> 
> 
> marios
> 

Apologies for the string of emails ... logging stuff as I hit it: 

 - The XML example above shows name, uri and description for each capability added. After
applying the patches, I see the name and uri but no description ... json output is copied
below - see empty decsription:

{"id":"http://qeblade39.rhq.lab.eng.bos.redhat.com:3001/cimi/resource_metadata","count":1,"resourceMetadata":[{"id":"http://qeblade39.rhq.lab.eng.bos.redhat.com:3001/cimi/resource_metadata/machine","name":"Machine","typeUri":"http://qeblade39.rhq.lab.eng.bos.redhat.com:3001/cimi/machines","capabilities":[{"name":"DefaultInitialState","uri":"http://schemas.dmtf.org/cimi/1/capability/Machine/DefaultInitialState","description":[],"values":[{"value":"STARTED"}]},{"name":"DefaultInitialState","uri":"http://schemas.dmtf.org/cimi/1/capability/Machine/DefaultInitialState","description":[],"values":[{"value":"STARTED"},{"value":"STOPPED"}]}]}],"resourceURI":"http://schemas.dmtf.org/cimi/1/ResourceMetadataCollection"}

 -  When creating a new machine, where in the POST command would I specify the desired initial
state?



 

Mime
View raw message