You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by mf...@redhat.com on 2012/10/03 18:10:31 UTC
[PATCH core 3/4] CIMI: Removed event_logs and unused vars
From: Michal Fojtik <mf...@redhat.com>
Signed-off-by: Michal fojtik <mf...@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
Re: [PATCH core 3/4] CIMI: Removed event_logs and unused vars
Posted by David Lutterkort <lu...@redhat.com>.
On Wed, 2012-10-03 at 18:10 +0200, mfojtik@redhat.com wrote:
> From: Michal Fojtik <mf...@redhat.com>
>
>
> Signed-off-by: Michal fojtik <mf...@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(-)
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