deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@redhat.com
Subject [PATCH core 3/4] CIMI: Removed event_logs and unused vars
Date Wed, 03 Oct 2012 16:10:31 GMT
From: Michal Fojtik <mfojtik@redhat.com>


Signed-off-by: Michal fojtik <mfojtik@redhat.com>
---
 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(-)

diff --git a/server/lib/cimi/models/machine.rb b/server/lib/cimi/models/machine.rb
index 35a0354..334defc 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
-
   subcollection :disks
   subcollection :volumes, :use => :machine_volumes
 
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 8d32c66..5e761f4 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
-- 
1.7.10.2


Mime
View raw message