deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@redhat.com
Subject Rev1 CIMI ResourceMetadata capabilities
Date Tue, 18 Dec 2012 17:26:20 GMT

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

Mime
View raw message