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/03/12 14:53:28 UTC
[2/4] git commit: CIMI: Fixed tests to reflect :uri to :id change
CIMI: Fixed tests to reflect :uri to :id change
Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/765bb27f
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/765bb27f
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/765bb27f
Branch: refs/heads/master
Commit: 765bb27f625caf4c54ca0f2b2c636224a22d1582
Parents: 671d5ac
Author: Michal Fojtik <mf...@redhat.com>
Authored: Wed Feb 29 16:15:32 2012 +0100
Committer: Michal fojtik <mf...@redhat.com>
Committed: Mon Mar 12 14:32:49 2012 +0100
----------------------------------------------------------------------
server/spec/cimi/data/machine.json | 2 +-
server/spec/cimi/data/machine.xml | 2 +-
server/spec/cimi/data/machine_admin.json | 2 +-
server/spec/cimi/data/machine_admin.xml | 2 +-
server/spec/cimi/data/machine_configuration.json | 2 +-
server/spec/cimi/data/machine_configuration.xml | 2 +-
server/spec/cimi/data/machine_image.json | 2 +-
server/spec/cimi/data/machine_image.xml | 2 +-
server/spec/cimi/data/machine_template.json | 2 +-
server/spec/cimi/data/machine_template.xml | 2 +-
server/spec/cimi/data/volume.json | 2 +-
server/spec/cimi/data/volume.xml | 2 +-
server/spec/cimi/data/volume_configuration.json | 2 +-
server/spec/cimi/data/volume_configuration.xml | 2 +-
server/spec/cimi/data/volume_image.json | 2 +-
server/spec/cimi/data/volume_image.xml | 2 +-
server/spec/cimi/data/volume_template.json | 2 +-
server/spec/cimi/data/volume_template.xml | 2 +-
server/tests/cimi/features/machine_images.feature | 2 +-
.../cimi/features/step_definitions/common_steps.rb | 4 ++--
.../features/step_definitions/machines_steps.rb | 8 ++++----
.../features/step_definitions/volumes_steps.rb | 12 ++++++------
22 files changed, 31 insertions(+), 31 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/765bb27f/server/spec/cimi/data/machine.json
----------------------------------------------------------------------
diff --git a/server/spec/cimi/data/machine.json b/server/spec/cimi/data/machine.json
index a1df3c3..728ff5c 100644
--- a/server/spec/cimi/data/machine.json
+++ b/server/spec/cimi/data/machine.json
@@ -1,4 +1,4 @@
-{ "uri": "http://cimi.example.org/machines/1",
+{ "id": "http://cimi.example.org/machines/1",
"name": "machine1",
"description": "Machine one description",
"created": "2011-11-21",
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/765bb27f/server/spec/cimi/data/machine.xml
----------------------------------------------------------------------
diff --git a/server/spec/cimi/data/machine.xml b/server/spec/cimi/data/machine.xml
index ea1c055..37b6582 100644
--- a/server/spec/cimi/data/machine.xml
+++ b/server/spec/cimi/data/machine.xml
@@ -1,5 +1,5 @@
<Machine xmlns="http://www.dmtf.org/cimi">
- <uri>http://cimi.example.org/machines/1</uri>
+ <id>http://cimi.example.org/machines/1</id>
<name>machine1</name>
<description>Machine one description</description>
<created>2011-11-21</created>
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/765bb27f/server/spec/cimi/data/machine_admin.json
----------------------------------------------------------------------
diff --git a/server/spec/cimi/data/machine_admin.json b/server/spec/cimi/data/machine_admin.json
index 40a4b34..35ab04b 100644
--- a/server/spec/cimi/data/machine_admin.json
+++ b/server/spec/cimi/data/machine_admin.json
@@ -1,5 +1,5 @@
{
- "uri": "http://cimi.example.org/machine_admins/1",
+ "id": "http://cimi.example.org/machine_admins/1",
"name": "credentials1",
"description": "Machine Admin One",
"created": "2011-11-16",
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/765bb27f/server/spec/cimi/data/machine_admin.xml
----------------------------------------------------------------------
diff --git a/server/spec/cimi/data/machine_admin.xml b/server/spec/cimi/data/machine_admin.xml
index 8c4ae7a..1f395c3 100644
--- a/server/spec/cimi/data/machine_admin.xml
+++ b/server/spec/cimi/data/machine_admin.xml
@@ -1,5 +1,5 @@
<MachineAdmin xmlns="http://www.dmtf.org/cimi">
- <uri>http://cimi.example.org/machine_admins/1</uri>
+ <id>http://cimi.example.org/machine_admins/1</id>
<name>credentials1</name>
<description>Machine Admin One</description>
<created>2011-11-16</created>
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/765bb27f/server/spec/cimi/data/machine_configuration.json
----------------------------------------------------------------------
diff --git a/server/spec/cimi/data/machine_configuration.json b/server/spec/cimi/data/machine_configuration.json
index f106a2d..40c77ad 100644
--- a/server/spec/cimi/data/machine_configuration.json
+++ b/server/spec/cimi/data/machine_configuration.json
@@ -1,5 +1,5 @@
{
- "uri": "http://cimi.example.org/machine_configurations/1",
+ "id": "http://cimi.example.org/machine_configurations/1",
"name": "MachineConfiguration1",
"description": "Example MachineConfiguration One",
"created": "2011-11-14",
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/765bb27f/server/spec/cimi/data/machine_configuration.xml
----------------------------------------------------------------------
diff --git a/server/spec/cimi/data/machine_configuration.xml b/server/spec/cimi/data/machine_configuration.xml
index c2ff0b7..b3810a3 100644
--- a/server/spec/cimi/data/machine_configuration.xml
+++ b/server/spec/cimi/data/machine_configuration.xml
@@ -1,5 +1,5 @@
<MachineConfiguration xmlns="http://www.dmtf.org/cimi">
- <uri>http://cimi.example.org/machine_configurations/1</uri>
+ <id>http://cimi.example.org/machine_configurations/1</id>
<name>MachineConfiguration1</name>
<description>Example MachineConfiguration One</description>
<created>2011-11-14</created>
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/765bb27f/server/spec/cimi/data/machine_image.json
----------------------------------------------------------------------
diff --git a/server/spec/cimi/data/machine_image.json b/server/spec/cimi/data/machine_image.json
index d338517..cee0a52 100644
--- a/server/spec/cimi/data/machine_image.json
+++ b/server/spec/cimi/data/machine_image.json
@@ -1,5 +1,5 @@
{
- "uri": "http://cimi.example.org/machine_images/1",
+ "id": "http://cimi.example.org/machine_images/1",
"name": "img1",
"description": "Machine Image One",
"created": "2011-11-14",
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/765bb27f/server/spec/cimi/data/machine_image.xml
----------------------------------------------------------------------
diff --git a/server/spec/cimi/data/machine_image.xml b/server/spec/cimi/data/machine_image.xml
index 2614dac..e1d4452 100644
--- a/server/spec/cimi/data/machine_image.xml
+++ b/server/spec/cimi/data/machine_image.xml
@@ -1,5 +1,5 @@
<MachineImage xmlns="http://www.dmtf.org/cimi">
- <uri>http://cimi.example.org/machine_images/1</uri>
+ <id>http://cimi.example.org/machine_images/1</id>
<name>img1</name>
<description>Machine Image One</description>
<created>2011-11-14</created>
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/765bb27f/server/spec/cimi/data/machine_template.json
----------------------------------------------------------------------
diff --git a/server/spec/cimi/data/machine_template.json b/server/spec/cimi/data/machine_template.json
index 54de58d..1be6592 100644
--- a/server/spec/cimi/data/machine_template.json
+++ b/server/spec/cimi/data/machine_template.json
@@ -1,5 +1,5 @@
{
- "uri": "http://cimi.example.org/machine_templates/1",
+ "id": "http://cimi.example.org/machine_templates/1",
"name": "My First Template",
"description": "A template for testing",
"created": "2011-11-01",
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/765bb27f/server/spec/cimi/data/machine_template.xml
----------------------------------------------------------------------
diff --git a/server/spec/cimi/data/machine_template.xml b/server/spec/cimi/data/machine_template.xml
index 160b311..1386460 100644
--- a/server/spec/cimi/data/machine_template.xml
+++ b/server/spec/cimi/data/machine_template.xml
@@ -1,5 +1,5 @@
<MachineTemplate xmlns="http://www.dmtf.org/cimi">
- <uri>http://cimi.example.org/machine_templates/1</uri>
+ <id>http://cimi.example.org/machine_templates/1</id>
<name>My First Template</name>
<description>A template for testing</description>
<created>2011-11-01</created>
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/765bb27f/server/spec/cimi/data/volume.json
----------------------------------------------------------------------
diff --git a/server/spec/cimi/data/volume.json b/server/spec/cimi/data/volume.json
index af22517..e8364dd 100644
--- a/server/spec/cimi/data/volume.json
+++ b/server/spec/cimi/data/volume.json
@@ -1,5 +1,5 @@
{
- "uri": "http://cimi.example.org/volumes/1",
+ "id": "http://cimi.example.org/volumes/1",
"name": "volume1",
"description": "Volume One",
"created": "2011-11-17",
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/765bb27f/server/spec/cimi/data/volume.xml
----------------------------------------------------------------------
diff --git a/server/spec/cimi/data/volume.xml b/server/spec/cimi/data/volume.xml
index 2e4699e..65e6e06 100644
--- a/server/spec/cimi/data/volume.xml
+++ b/server/spec/cimi/data/volume.xml
@@ -1,5 +1,5 @@
<Volume xmlns="http://www.dmtf.org/cimi">
- <uri>http://cimi.example.org/volumes/1</uri>
+ <id>http://cimi.example.org/volumes/1</id>
<name>volume1</name>
<description>Volume One</description>
<created>2011-11-17</created>
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/765bb27f/server/spec/cimi/data/volume_configuration.json
----------------------------------------------------------------------
diff --git a/server/spec/cimi/data/volume_configuration.json b/server/spec/cimi/data/volume_configuration.json
index c9769ee..817e20c 100644
--- a/server/spec/cimi/data/volume_configuration.json
+++ b/server/spec/cimi/data/volume_configuration.json
@@ -1,5 +1,5 @@
{
- "uri": "http://cimi.example.org/volume_configurations/1",
+ "id": "http://cimi.example.org/volume_configurations/1",
"name": "volume_config_1",
"description": "Volume Configuration One",
"created": "2011-11-21",
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/765bb27f/server/spec/cimi/data/volume_configuration.xml
----------------------------------------------------------------------
diff --git a/server/spec/cimi/data/volume_configuration.xml b/server/spec/cimi/data/volume_configuration.xml
index fe8fb07..120e8a6 100644
--- a/server/spec/cimi/data/volume_configuration.xml
+++ b/server/spec/cimi/data/volume_configuration.xml
@@ -1,5 +1,5 @@
<VolumeConfiguration xmlns="http://www.dmtf.org/cimi">
- <uri>http://cimi.example.org/volume_configurations/1</uri>
+ <id>http://cimi.example.org/volume_configurations/1</id>
<name>volume_config_1</name>
<description>Volume Configuration One</description>
<created>2011-11-21</created>
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/765bb27f/server/spec/cimi/data/volume_image.json
----------------------------------------------------------------------
diff --git a/server/spec/cimi/data/volume_image.json b/server/spec/cimi/data/volume_image.json
index 47bac8d..8c6ac04 100644
--- a/server/spec/cimi/data/volume_image.json
+++ b/server/spec/cimi/data/volume_image.json
@@ -1,5 +1,5 @@
{
- "uri": "http://cimi.example.org/volume_images/1",
+ "id": "http://cimi.example.org/volume_images/1",
"name": "volume_image_1",
"description": "Volume Image One",
"created": "2011-11-21",
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/765bb27f/server/spec/cimi/data/volume_image.xml
----------------------------------------------------------------------
diff --git a/server/spec/cimi/data/volume_image.xml b/server/spec/cimi/data/volume_image.xml
index 901d0a7..c6ba575 100644
--- a/server/spec/cimi/data/volume_image.xml
+++ b/server/spec/cimi/data/volume_image.xml
@@ -1,5 +1,5 @@
<VolumeImage xmlns="http://www.dmtf.org/cimi">
- <uri>http://cimi.example.org/volume_images/1</uri>
+ <id>http://cimi.example.org/volume_images/1</id>
<name>volume_image_1</name>
<description>Volume Image One</description>
<created>2011-11-21</created>
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/765bb27f/server/spec/cimi/data/volume_template.json
----------------------------------------------------------------------
diff --git a/server/spec/cimi/data/volume_template.json b/server/spec/cimi/data/volume_template.json
index 3fd47b6..bddb5dc 100644
--- a/server/spec/cimi/data/volume_template.json
+++ b/server/spec/cimi/data/volume_template.json
@@ -1,5 +1,5 @@
{
- "uri": "http://cimi.example.org/volume_templates/1",
+ "id": "http://cimi.example.org/volume_templates/1",
"name": "volume_template_1",
"description": "Volume Template One",
"created": "2011-11-21",
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/765bb27f/server/spec/cimi/data/volume_template.xml
----------------------------------------------------------------------
diff --git a/server/spec/cimi/data/volume_template.xml b/server/spec/cimi/data/volume_template.xml
index e7b5e0a..47113b5 100644
--- a/server/spec/cimi/data/volume_template.xml
+++ b/server/spec/cimi/data/volume_template.xml
@@ -1,5 +1,5 @@
<VolumeTemplate xmlns="http://www.dmtf.org/cimi">
- <uri>http://cimi.example.org/volume_templates/1</uri>
+ <id>http://cimi.example.org/volume_templates/1</id>
<name>volume_template_1</name>
<description>Volume Template One</description>
<created>2011-11-21</created>
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/765bb27f/server/tests/cimi/features/machine_images.feature
----------------------------------------------------------------------
diff --git a/server/tests/cimi/features/machine_images.feature b/server/tests/cimi/features/machine_images.feature
index f855eac..8d1afcd 100644
--- a/server/tests/cimi/features/machine_images.feature
+++ b/server/tests/cimi/features/machine_images.feature
@@ -17,4 +17,4 @@ Scenario: Querying Machine Image
| *image_location | mock://img1 |
| description | Fedora 10 |
| name | img1 |
- | uri | http://example.org/cimi/machine_images/img1 |
+ | id | http://example.org/cimi/machine_images/img1 |
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/765bb27f/server/tests/cimi/features/step_definitions/common_steps.rb
----------------------------------------------------------------------
diff --git a/server/tests/cimi/features/step_definitions/common_steps.rb b/server/tests/cimi/features/step_definitions/common_steps.rb
index a0a0cb7..8fb3ff8 100644
--- a/server/tests/cimi/features/step_definitions/common_steps.rb
+++ b/server/tests/cimi/features/step_definitions/common_steps.rb
@@ -24,8 +24,8 @@ Then /^client should get list of all ([\w ]+)$/ do |col_name|
last_xml_response.root.name.should == root_name
(last_xml_response/"#{root_name}/name").size.should == 1
(last_xml_response/"#{root_name}/name").first.text.should == 'default'
- (last_xml_response/"#{root_name}/uri").size.should == 1
- (last_xml_response/"#{root_name}/uri").first.text.should == last_request.url
+ (last_xml_response/"#{root_name}/id").size.should == 1
+ (last_xml_response/"#{root_name}/id").first.text.should == last_request.url
(last_xml_response/"#{root_name}/#{col_name.to_entity_name}").size.should == 3
(last_xml_response/"#{root_name}/#{col_name.to_entity_name}").each do |machine_img|
machine_img[:href].should_not be_nil
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/765bb27f/server/tests/cimi/features/step_definitions/machines_steps.rb
----------------------------------------------------------------------
diff --git a/server/tests/cimi/features/step_definitions/machines_steps.rb b/server/tests/cimi/features/step_definitions/machines_steps.rb
index 0073634..0843ccf 100644
--- a/server/tests/cimi/features/step_definitions/machines_steps.rb
+++ b/server/tests/cimi/features/step_definitions/machines_steps.rb
@@ -5,7 +5,7 @@ When /^client specifies a Machine Image$/ do |machine_image|
last_response.status.should == 200
@machine_image = CIMI::Model::MachineImage.from_xml(last_response.body)
@machine_image.should_not be_nil
- @machine_image.uri.should == machine_image.raw[0][1]
+ @machine_image.id.should == machine_image.raw[0][1]
end
When /^client specifies a Machine Configuration$/ do |machine_conf|
@@ -15,7 +15,7 @@ When /^client specifies a Machine Configuration$/ do |machine_conf|
last_response.status.should == 200
@machine_configuration = CIMI::Model::MachineImage.from_xml(last_response.body)
@machine_configuration.should_not be_nil
- @machine_configuration.uri.should == machine_conf.raw[0][1]
+ @machine_configuration.id.should == machine_conf.raw[0][1]
end
When /^client specifies a new Machine using$/ do |machine|
@@ -27,8 +27,8 @@ When /^client specifies a new Machine using$/ do |machine|
xml.name @new_machine_name
xml.description machine.raw[1][1]
xml.machineTemplate {
- xml.machineConfig( :href => @machine_configuration.uri )
- xml.machineImage( :href => @machine_image.uri )
+ xml.machineConfig( :href => @machine_configuration.id )
+ xml.machineImage( :href => @machine_image.id )
}
}
end
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/765bb27f/server/tests/cimi/features/step_definitions/volumes_steps.rb
----------------------------------------------------------------------
diff --git a/server/tests/cimi/features/step_definitions/volumes_steps.rb b/server/tests/cimi/features/step_definitions/volumes_steps.rb
index a5abc9d..9aa6ea2 100644
--- a/server/tests/cimi/features/step_definitions/volumes_steps.rb
+++ b/server/tests/cimi/features/step_definitions/volumes_steps.rb
@@ -6,7 +6,7 @@ When /^client specifies a Volume Configuration$/ do |volume_config|
@volume_config = CIMI::Model::VolumeConfiguration.from_xml(last_response.body)
@volume_config.class.should == CIMI::Model::VolumeConfiguration
@volume_config.attribute_values[:capacity].quantity.should == "2"
- @volume_config.uri.should == volume_config.raw[0][1]
+ @volume_config.id.should == volume_config.raw[0][1]
end
When /^client specifies a new Volume using$/ do |volume|
@@ -18,7 +18,7 @@ When /^client specifies a new Volume using$/ do |volume|
xml.name volume_name
xml.description volume_description
xml.volumeTemplate {
- xml.volumeConfig( :href => @volume_config.uri )
+ xml.volumeConfig( :href => @volume_config.id )
}
}
end
@@ -41,7 +41,7 @@ When /^client GET the Volumes Collection$/ do
end
Then /^client should get a list of volumes$/ do
- @@volume_collection.uri.end_with?("/cimi/volumes").should == true
+ @@volume_collection.id.end_with?("/cimi/volumes").should == true
@@volume_collection.attribute_values.has_key?(:volumes).should == true
end
@@ -59,7 +59,7 @@ end
Then /^client should verify that this Volume was created correctly$/ do |capacity|
@@retrieved_volume.name.should == @@created_volume.name
- @@retrieved_volume.uri.should == @@created_volume.uri
+ @@retrieved_volume.id.should == @@created_volume.id
@@retrieved_volume.capacity[:quantity].should == capacity.raw[0][1]
end
@@ -77,7 +77,7 @@ end
When /^client specifies the new Volume with attachment point using$/ do |attach|
@builder = Nokogiri::XML::Builder.new do |xml|
xml.VolumeAttach {
- xml.volume( :href => @@created_volume.uri, :attachmentPoint=>attach.raw[0][1])
+ xml.volume( :href => @@created_volume.id, :attachmentPoint=>attach.raw[0][1])
}
end
end
@@ -94,7 +94,7 @@ When /^client should be able to detach the volume$/ do
header 'Content-Type', 'application/CIMI-Machine+xml'
@builder = Nokogiri::XML::Builder.new do |xml|
xml.VolumeDetach {
- xml.volume(:href => @@created_volume.uri)
+ xml.volume(:href => @@created_volume.id)
}
end
put "/cimi/machines/#{@@machine.name}/detach_volume", @builder.to_xml