On Wed, 2012-10-03 at 18:10 +0200, [email protected] wrote:
> From: Michal Fojtik <[email protected]>
> 
> 
> Signed-off-by: Michal fojtik <[email protected]>
> ---
>  server/lib/cimi/models/machine.rb      |    2 --
>  server/lib/cimi/models/network.rb      |    2 --
>  server/lib/cimi/models/network_port.rb |    2 --
>  server/lib/cimi/models/volume.rb       |   11 +++++------
>  4 files changed, 5 insertions(+), 12 deletions(-)

ACK, though you also need to remove eventLog in the test fixtures
(incremental patch attached)

> diff --git a/server/lib/cimi/models/volume.rb 
> b/server/lib/cimi/models/volume.rb
> index 8d32c66..5e761f4 100644
> --- a/server/lib/cimi/models/volume.rb
> +++ b/server/lib/cimi/models/volume.rb
> @@ -68,14 +68,14 @@ class CIMI::Model::Volume < CIMI::Model::Base
>  
>    def self.find_to_attach_from_json(json_in, context)
>      json = JSON.parse(json_in)
> -    volumes = json["volumes"].map{|v| 
> {:volume=>self.find(v["volume"]["href"].split("/volumes/").last, context),
> -                                       
> :attachment_point=>v["attachmentPoint"]  }}
> +    json["volumes"].map{|v| 
> {:volume=>self.find(v["volume"]["href"].split("/volumes/").last, context),
> +                             :attachment_point=>v["attachmentPoint"]  }}
>    end
>  
>    def self.find_to_attach_from_xml(xml_in, context)
>      xml = XmlSimple.xml_in(xml_in)
> -    volumes = xml["volume"].map{|v| {:volume => 
> self.find(v["href"].split("/volumes/").last, context),
> -                                      
> :attachment_point=>v["attachmentPoint"] }}
> +    xml["volume"].map{|v| {:volume => 
> self.find(v["href"].split("/volumes/").last, context),
> +                           :attachment_point=>v["attachmentPoint"] }}
>    end

This hunk seems to only change formatting - please leave that out of
this patch.

David

diff --git a/server/tests/cimi/spec/cimi/data/machine.json b/server/tests/cimi/spec/cimi/data/machine.json
index 3b1a574..a5e7ba7 100644
--- a/server/tests/cimi/spec/cimi/data/machine.json
+++ b/server/tests/cimi/spec/cimi/data/machine.json
@@ -12,7 +12,6 @@
   "meters": [
     { "href": "http://cimi.example.org/meters/1"; }
   ],
-  "eventLog": { "href": "http://cimi.example.org/event_logs/1"; },
   "operations": [
     { "rel": "edit",
       "href": "http://cimi.example.org/machines/1/edit"; },
diff --git a/server/tests/cimi/spec/cimi/data/machine.xml b/server/tests/cimi/spec/cimi/data/machine.xml
index 163c272..62b7021 100644
--- a/server/tests/cimi/spec/cimi/data/machine.xml
+++ b/server/tests/cimi/spec/cimi/data/machine.xml
@@ -11,7 +11,6 @@
   <networkInterfaces href="http://cimi.example.org/cimi/machines/1/network_interfaces"; />
   <state>STARTED</state>
   <meter href="http://cimi.example.org/meters/1"/>
-  <eventLog href="http://cimi.example.org/event_logs/1"/>
   <operation rel="edit" href="http://cimi.example.org/machines/1/edit"/>
   <operation rel="delete" href="http://cimi.example.org/machines/1/delete"/>
   <operation rel="http://schemas.dmtf.org/cimi/1/action/stop"; href="http://cimi.example.org/machines/1/stop"/>

Reply via email to