You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by mf...@apache.org on 2012/11/12 20:44:02 UTC
[1/6] git commit: CIMI: Fixed tests to reflect changes in Volume
Updated Branches:
refs/heads/master 687ffa909 -> 6be8b6428
CIMI: Fixed tests to reflect changes in Volume
Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/6be8b642
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/6be8b642
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/6be8b642
Branch: refs/heads/master
Commit: 6be8b64281aee894da860895cc3b1b23775755e2
Parents: 992f851
Author: Michal Fojtik <mf...@redhat.com>
Authored: Mon Nov 12 20:40:35 2012 +0100
Committer: Michal fojtik <mf...@redhat.com>
Committed: Mon Nov 12 20:41:43 2012 +0100
----------------------------------------------------------------------
server/lib/cimi/models/volume.rb | 9 +++------
server/tests/cimi/data/volume.json | 6 +++---
server/tests/cimi/data/volume.xml | 6 +++---
server/tests/cimi/data/volume_configuration.json | 4 +---
server/tests/cimi/data/volume_configuration.xml | 4 +---
5 files changed, 11 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/6be8b642/server/lib/cimi/models/volume.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/models/volume.rb b/server/lib/cimi/models/volume.rb
index 7332847..5ce0fbc 100644
--- a/server/lib/cimi/models/volume.rb
+++ b/server/lib/cimi/models/volume.rb
@@ -19,12 +19,9 @@ class CIMI::Model::Volume < CIMI::Model::Base
text :state
- href :type
+ text :type
- struct :capacity do
- scalar :quantity
- scalar :units
- end
+ text :capacity
text :bootable
@@ -100,7 +97,7 @@ class CIMI::Model::Volume < CIMI::Model::Base
:capacity => { :quantity=>volume.capacity, :units=>"gibibyte" }, #FIXME... units will vary
:bootable => "false", #fixme ... will vary... ec2 doesn't expose this
:snapshots => [], #fixme...
- :type => { :href => 'http://schemas.dmtf.org/cimi/1/mapped' },
+ :type => 'http://schemas.dmtf.org/cimi/1/mapped',
:state => volume.state,
:meters => []
} )
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/6be8b642/server/tests/cimi/data/volume.json
----------------------------------------------------------------------
diff --git a/server/tests/cimi/data/volume.json b/server/tests/cimi/data/volume.json
index 63a05a3..c05f610 100644
--- a/server/tests/cimi/data/volume.json
+++ b/server/tests/cimi/data/volume.json
@@ -3,11 +3,11 @@
"id": "http://cimi.example.org/volumes/1",
"name": "volume1",
"description": "Volume One",
+ "state": "IN-USE",
+ "type": "http://schemas.dmtf.org/cimi/1/mapped",
"created": "2011-11-17",
- "capacity": { "quantity": "10", "units": "gigabyte" },
+ "capacity": "1024",
"bootable": "false",
- "supportsSnapshots": "false",
- "guestInterface": "NFS",
"operations": [
{ "rel": "edit",
"href": "http://cimi.example.org/volumes/1/edit" },
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/6be8b642/server/tests/cimi/data/volume.xml
----------------------------------------------------------------------
diff --git a/server/tests/cimi/data/volume.xml b/server/tests/cimi/data/volume.xml
index 6178234..6a7ee2c 100644
--- a/server/tests/cimi/data/volume.xml
+++ b/server/tests/cimi/data/volume.xml
@@ -2,11 +2,11 @@
<id>http://cimi.example.org/volumes/1</id>
<name>volume1</name>
<description>Volume One</description>
+ <state>IN-USE</state>
<created>2011-11-17</created>
- <capacity quantity="10" units="gigabyte"/>
+ <capacity>1024</capacity>
+ <type>http://schemas.dmtf.org/cimi/1/mapped</type>
<bootable>false</bootable>
- <supportsSnapshots>false</supportsSnapshots>
- <guestInterface>NFS</guestInterface>
<operation rel="edit" href="http://cimi.example.org/volumes/1/edit"/>
<operation rel="delete" href="http://cimi.example.org/volumes/1/delete"/>
</Volume>
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/6be8b642/server/tests/cimi/data/volume_configuration.json
----------------------------------------------------------------------
diff --git a/server/tests/cimi/data/volume_configuration.json b/server/tests/cimi/data/volume_configuration.json
index ce3ad14..9b87543 100644
--- a/server/tests/cimi/data/volume_configuration.json
+++ b/server/tests/cimi/data/volume_configuration.json
@@ -5,9 +5,7 @@
"description": "Volume Configuration One",
"created": "2011-11-21",
"format": "ext3",
- "capacity": { "quantity": "10", "units": "gigabyte" },
- "supportsSnapshots": "false",
- "guestInterface": "NFS",
+ "capacity": "1024",
"operations": [
{ "rel": "edit",
"href": "http://cimi.example.org/volume_configurations/1/edit" },
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/6be8b642/server/tests/cimi/data/volume_configuration.xml
----------------------------------------------------------------------
diff --git a/server/tests/cimi/data/volume_configuration.xml b/server/tests/cimi/data/volume_configuration.xml
index f150700..21de9ec 100644
--- a/server/tests/cimi/data/volume_configuration.xml
+++ b/server/tests/cimi/data/volume_configuration.xml
@@ -3,9 +3,7 @@
<name>volume_config_1</name>
<description>Volume Configuration One</description>
<created>2011-11-21</created>
- <capacity quantity="10" units="gigabyte"/>
- <supportsSnapshots>false</supportsSnapshots>
- <guestInterface>NFS</guestInterface>
+ <capacity>1024</capacity>
<format>ext3</format>
<operation rel="edit" href="http://cimi.example.org/volume_configurations/1/edit"/>
<operation rel="delete" href="http://cimi.example.org/volume_configurations/1/delete"/>