deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Lutterkort <lut...@redhat.com>
Subject Re: [PATCH] CIMI: system and system_template support for mock driver. Just GET for now, no subcollections
Date Mon, 18 Feb 2013 23:02:19 GMT
Hi Dies,

strange, both of these work for me now. I had to do an unholy
combination of deleting directories of the form /var/tmp/*deltacloud* ,
restarting the server and requesting the CEP to get proper responses;
with the two patches I just posted, it should be enough to do 'rake
mock:fixtures:reset'

After that, though, I get proper responses:

        # curl --user mockuser:mockpassword -H 'Accept: application/xml' "http://localhost:3001/cimi/system_templates/template1"
        
        <SystemTemplate xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/SystemTemplate">
          <id>http://localhost:3001/cimi/system_templates/template1</id>
          <name>template1</name>
          <description>A mock system template</description>
          <created>Fri Feb 08 12:15:15 EET 2013</created>
          <componentDescriptor>
            <name>my machine</name>
            <description>an inline mock machine template</description>
            <type>http://schemas.dmtf.org/cimi/1/Machine</type>
          </componentDescriptor>
          <componentDescriptor>
            <name>my network</name>
            <description>a reference to an existing mock network template</description>
            <type>http://schemas.dmtf.org/cimi/1/Network</type>
          </componentDescriptor>
          <operation rel="edit" href="http://localhost:3001/cimi/system_templates/template1"
/>
          <operation rel="delete" href="http://localhost:3001/cimi/system_templates/template1"
/>
        </SystemTemplate>
        
        # curl --user mockuser:mockpassword -H 'Accept: application/xml' "http://localhost:3001/cimi/systems/system1"

        
        <System xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/System">
          <id>http://localhost:3001/cimi/systems/system1</id>
          <name>system1</name>
          <description>the first system</description>
          <created>Fri Feb 08 15:25:41 EET 2013</created>
          <state>STOPPED</state>
          <operation rel="edit" href="http://localhost:3001/cimi/systems/system1" />
          <operation rel="delete" href="http://localhost:3001/cimi/systems/system1" />
        </System>
        
What's missing from your patches though are unit tests ...

David



Mime
View raw message