deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lut...@redhat.com
Subject [PATCH 02/10] CIMI: Removed event_logs and unused vars
Date Thu, 08 Nov 2012 04:05:28 GMT
From: Michal Fojtik <mfojtik@redhat.com>

Signed-off-by: Michal fojtik <mfojtik@redhat.com>
TrackedAt: http://tracker.deltacloud.org/patch/789fdf071d5a4a644d1a134b46293f5f9837b7ab
---
 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 +++++------
 server/tests/cimi/spec/cimi/data/machine.json |    1 -
 server/tests/cimi/spec/cimi/data/machine.xml  |    1 -
 6 files changed, 5 insertions(+), 14 deletions(-)

diff --git a/server/lib/cimi/models/machine.rb b/server/lib/cimi/models/machine.rb
index 53dc6a9..fbf25dd 100644
--- a/server/lib/cimi/models/machine.rb
+++ b/server/lib/cimi/models/machine.rb
@@ -22,8 +22,6 @@ class CIMI::Model::Machine < CIMI::Model::Base
 
   text :memory
 
-  href :event_log
-
   collection :disks, :class => CIMI::Model::Disk
   collection :volumes, :class => CIMI::Model::MachineVolume
 
diff --git a/server/lib/cimi/models/network.rb b/server/lib/cimi/models/network.rb
index 4e783ea..b08984a 100644
--- a/server/lib/cimi/models/network.rb
+++ b/server/lib/cimi/models/network.rb
@@ -29,8 +29,6 @@ class CIMI::Model::Network < CIMI::Model::Base
 
   href :forwarding_group
 
-  href :event_log
-
   array :meters do
     scalar :href
   end
diff --git a/server/lib/cimi/models/network_port.rb b/server/lib/cimi/models/network_port.rb
index 6905f5a..2951ffd 100644
--- a/server/lib/cimi/models/network_port.rb
+++ b/server/lib/cimi/models/network_port.rb
@@ -25,8 +25,6 @@ class CIMI::Model::NetworkPort < CIMI::Model::Base
 
   text :class_of_service
 
-  href :event_log
-
   array :meters do
     scalar :href
   end
diff --git a/server/lib/cimi/models/volume.rb b/server/lib/cimi/models/volume.rb
index 7367d2f..739629a 100644
--- a/server/lib/cimi/models/volume.rb
+++ b/server/lib/cimi/models/volume.rb
@@ -30,7 +30,7 @@ class CIMI::Model::Volume < CIMI::Model::Base
   array :meters do
     scalar :ref
   end
-  href :eventlog
+
   array :operations do
     scalar :rel, :href
   end
@@ -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
 
   private
@@ -97,7 +97,6 @@ class CIMI::Model::Volume < CIMI::Model::Base
                 :supports_snapshots => "true", #fixme, will vary (true for ec2)
                 :snapshots => [], #fixme...
                 :guest_interface => "",
-                :eventlog => {:href=> "http://eventlogs"},#FIXME
                 :meters => []
             } )
   end
diff --git a/server/tests/cimi/spec/cimi/data/machine.json b/server/tests/cimi/spec/cimi/data/machine.json
index 9e332c8..755d421 100644
--- a/server/tests/cimi/spec/cimi/data/machine.json
+++ b/server/tests/cimi/spec/cimi/data/machine.json
@@ -13,7 +13,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 503abfe..f33c774 100644
--- a/server/tests/cimi/spec/cimi/data/machine.xml
+++ b/server/tests/cimi/spec/cimi/data/machine.xml
@@ -10,7 +10,6 @@
   <volumes href="http://cimi.example.org/cimi/machines/1/volumes" />
   <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"/>
-- 
1.7.7.6


Mime
View raw message