You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by ma...@redhat.com on 2012/11/07 15:40:57 UTC
[PATCH] CIMI - fix failing server (spec) tests
From: marios <ma...@redhat.com>
Signed-off-by: marios <ma...@redhat.com>
---
server/lib/cimi/models/base.rb | 2 ++
server/tests/cimi/spec/cimi/data/credential.json | 1 +
server/tests/cimi/spec/cimi/data/machine.json | 4 +++-
server/tests/cimi/spec/cimi/data/machine_configuration.json | 1 +
server/tests/cimi/spec/cimi/data/machine_image.json | 1 +
server/tests/cimi/spec/cimi/data/machine_template.json | 1 +
server/tests/cimi/spec/cimi/data/volume.json | 1 +
server/tests/cimi/spec/cimi/data/volume_configuration.json | 1 +
server/tests/cimi/spec/cimi/data/volume_image.json | 1 +
server/tests/cimi/spec/cimi/data/volume_template.json | 1 +
10 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/server/lib/cimi/models/base.rb b/server/lib/cimi/models/base.rb
index d217d4e..9217939 100644
--- a/server/lib/cimi/models/base.rb
+++ b/server/lib/cimi/models/base.rb
@@ -98,6 +98,8 @@ class CIMI::Model::Base
#
attr_reader :attribute_values
+ CMWG_NAMESPACE = "http://schemas.dmtf.org/cimi/1"
+
# Keep the list of all attributes in an array +attributes+; for each
# attribute, we also define a getter and a setter to access/change the
# value for that attribute
diff --git a/server/tests/cimi/spec/cimi/data/credential.json b/server/tests/cimi/spec/cimi/data/credential.json
index 35ab04b..1813446 100644
--- a/server/tests/cimi/spec/cimi/data/credential.json
+++ b/server/tests/cimi/spec/cimi/data/credential.json
@@ -1,4 +1,5 @@
{
+ "resourceURI": "http://schemas.dmtf.org/cimi/1/Credential",
"id": "http://cimi.example.org/machine_admins/1",
"name": "credentials1",
"description": "Machine Admin One",
diff --git a/server/tests/cimi/spec/cimi/data/machine.json b/server/tests/cimi/spec/cimi/data/machine.json
index bf9c464..9e332c8 100644
--- a/server/tests/cimi/spec/cimi/data/machine.json
+++ b/server/tests/cimi/spec/cimi/data/machine.json
@@ -1,4 +1,6 @@
-{ "id": "http://cimi.example.org/machines/1",
+{
+ "resourceURI": "http://schemas.dmtf.org/cimi/1/Machine",
+ "id": "http://cimi.example.org/machines/1",
"name": "machine1",
"description": "Machine one description",
"created": "2011-11-21",
diff --git a/server/tests/cimi/spec/cimi/data/machine_configuration.json b/server/tests/cimi/spec/cimi/data/machine_configuration.json
index 3f28c22..0ecf095 100644
--- a/server/tests/cimi/spec/cimi/data/machine_configuration.json
+++ b/server/tests/cimi/spec/cimi/data/machine_configuration.json
@@ -1,4 +1,5 @@
{
+ "resourceURI": "http://schemas.dmtf.org/cimi/1/MachineConfiguration",
"id": "http://cimi.example.org/machine_configurations/1",
"name": "MachineConfiguration1",
"description": "Example MachineConfiguration One",
diff --git a/server/tests/cimi/spec/cimi/data/machine_image.json b/server/tests/cimi/spec/cimi/data/machine_image.json
index cee0a52..ae83460 100644
--- a/server/tests/cimi/spec/cimi/data/machine_image.json
+++ b/server/tests/cimi/spec/cimi/data/machine_image.json
@@ -1,4 +1,5 @@
{
+ "resourceURI": "http://schemas.dmtf.org/cimi/1/MachineImage",
"id": "http://cimi.example.org/machine_images/1",
"name": "img1",
"description": "Machine Image One",
diff --git a/server/tests/cimi/spec/cimi/data/machine_template.json b/server/tests/cimi/spec/cimi/data/machine_template.json
index 1be6592..816541c 100644
--- a/server/tests/cimi/spec/cimi/data/machine_template.json
+++ b/server/tests/cimi/spec/cimi/data/machine_template.json
@@ -1,4 +1,5 @@
{
+ "resourceURI": "http://schemas.dmtf.org/cimi/1/MachineTemplate",
"id": "http://cimi.example.org/machine_templates/1",
"name": "My First Template",
"description": "A template for testing",
diff --git a/server/tests/cimi/spec/cimi/data/volume.json b/server/tests/cimi/spec/cimi/data/volume.json
index e8364dd..63a05a3 100644
--- a/server/tests/cimi/spec/cimi/data/volume.json
+++ b/server/tests/cimi/spec/cimi/data/volume.json
@@ -1,4 +1,5 @@
{
+ "resourceURI": "http://schemas.dmtf.org/cimi/1/Volume",
"id": "http://cimi.example.org/volumes/1",
"name": "volume1",
"description": "Volume One",
diff --git a/server/tests/cimi/spec/cimi/data/volume_configuration.json b/server/tests/cimi/spec/cimi/data/volume_configuration.json
index 817e20c..ce3ad14 100644
--- a/server/tests/cimi/spec/cimi/data/volume_configuration.json
+++ b/server/tests/cimi/spec/cimi/data/volume_configuration.json
@@ -1,4 +1,5 @@
{
+ "resourceURI": "http://schemas.dmtf.org/cimi/1/VolumeConfiguration",
"id": "http://cimi.example.org/volume_configurations/1",
"name": "volume_config_1",
"description": "Volume Configuration One",
diff --git a/server/tests/cimi/spec/cimi/data/volume_image.json b/server/tests/cimi/spec/cimi/data/volume_image.json
index 8c6ac04..47f52d1 100644
--- a/server/tests/cimi/spec/cimi/data/volume_image.json
+++ b/server/tests/cimi/spec/cimi/data/volume_image.json
@@ -1,4 +1,5 @@
{
+ "resourceURI": "http://schemas.dmtf.org/cimi/1/VolumeImage",
"id": "http://cimi.example.org/volume_images/1",
"name": "volume_image_1",
"description": "Volume Image One",
diff --git a/server/tests/cimi/spec/cimi/data/volume_template.json b/server/tests/cimi/spec/cimi/data/volume_template.json
index bddb5dc..b5e5b05 100644
--- a/server/tests/cimi/spec/cimi/data/volume_template.json
+++ b/server/tests/cimi/spec/cimi/data/volume_template.json
@@ -1,4 +1,5 @@
{
+ "resourceURI": "http://schemas.dmtf.org/cimi/1/VolumeTemplate",
"id": "http://cimi.example.org/volume_templates/1",
"name": "volume_template_1",
"description": "Volume Template One",
--
1.7.11.7
Re: [PATCH] CIMI - fix failing server (spec) tests
Posted by Michal Fojtik <mf...@redhat.com>.
On 11/07/2012 03:40 PM, marios@redhat.com wrote:
ACK.
I pushed it together with RHEV-M fixture fix. Now the build
is green!
-- Michal
> From: marios <ma...@redhat.com>
>
>
> Signed-off-by: marios <ma...@redhat.com>
> ---
> server/lib/cimi/models/base.rb | 2 ++
> server/tests/cimi/spec/cimi/data/credential.json | 1 +
> server/tests/cimi/spec/cimi/data/machine.json | 4 +++-
> server/tests/cimi/spec/cimi/data/machine_configuration.json | 1 +
> server/tests/cimi/spec/cimi/data/machine_image.json | 1 +
> server/tests/cimi/spec/cimi/data/machine_template.json | 1 +
> server/tests/cimi/spec/cimi/data/volume.json | 1 +
> server/tests/cimi/spec/cimi/data/volume_configuration.json | 1 +
> server/tests/cimi/spec/cimi/data/volume_image.json | 1 +
> server/tests/cimi/spec/cimi/data/volume_template.json | 1 +
> 10 files changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/server/lib/cimi/models/base.rb b/server/lib/cimi/models/base.rb
> index d217d4e..9217939 100644
> --- a/server/lib/cimi/models/base.rb
> +++ b/server/lib/cimi/models/base.rb
> @@ -98,6 +98,8 @@ class CIMI::Model::Base
> #
> attr_reader :attribute_values
>
> + CMWG_NAMESPACE = "http://schemas.dmtf.org/cimi/1"
> +
> # Keep the list of all attributes in an array +attributes+; for each
> # attribute, we also define a getter and a setter to access/change the
> # value for that attribute
> diff --git a/server/tests/cimi/spec/cimi/data/credential.json b/server/tests/cimi/spec/cimi/data/credential.json
> index 35ab04b..1813446 100644
> --- a/server/tests/cimi/spec/cimi/data/credential.json
> +++ b/server/tests/cimi/spec/cimi/data/credential.json
> @@ -1,4 +1,5 @@
> {
> + "resourceURI": "http://schemas.dmtf.org/cimi/1/Credential",
> "id": "http://cimi.example.org/machine_admins/1",
> "name": "credentials1",
> "description": "Machine Admin One",
> diff --git a/server/tests/cimi/spec/cimi/data/machine.json b/server/tests/cimi/spec/cimi/data/machine.json
> index bf9c464..9e332c8 100644
> --- a/server/tests/cimi/spec/cimi/data/machine.json
> +++ b/server/tests/cimi/spec/cimi/data/machine.json
> @@ -1,4 +1,6 @@
> -{ "id": "http://cimi.example.org/machines/1",
> +{
> + "resourceURI": "http://schemas.dmtf.org/cimi/1/Machine",
> + "id": "http://cimi.example.org/machines/1",
> "name": "machine1",
> "description": "Machine one description",
> "created": "2011-11-21",
> diff --git a/server/tests/cimi/spec/cimi/data/machine_configuration.json b/server/tests/cimi/spec/cimi/data/machine_configuration.json
> index 3f28c22..0ecf095 100644
> --- a/server/tests/cimi/spec/cimi/data/machine_configuration.json
> +++ b/server/tests/cimi/spec/cimi/data/machine_configuration.json
> @@ -1,4 +1,5 @@
> {
> + "resourceURI": "http://schemas.dmtf.org/cimi/1/MachineConfiguration",
> "id": "http://cimi.example.org/machine_configurations/1",
> "name": "MachineConfiguration1",
> "description": "Example MachineConfiguration One",
> diff --git a/server/tests/cimi/spec/cimi/data/machine_image.json b/server/tests/cimi/spec/cimi/data/machine_image.json
> index cee0a52..ae83460 100644
> --- a/server/tests/cimi/spec/cimi/data/machine_image.json
> +++ b/server/tests/cimi/spec/cimi/data/machine_image.json
> @@ -1,4 +1,5 @@
> {
> + "resourceURI": "http://schemas.dmtf.org/cimi/1/MachineImage",
> "id": "http://cimi.example.org/machine_images/1",
> "name": "img1",
> "description": "Machine Image One",
> diff --git a/server/tests/cimi/spec/cimi/data/machine_template.json b/server/tests/cimi/spec/cimi/data/machine_template.json
> index 1be6592..816541c 100644
> --- a/server/tests/cimi/spec/cimi/data/machine_template.json
> +++ b/server/tests/cimi/spec/cimi/data/machine_template.json
> @@ -1,4 +1,5 @@
> {
> + "resourceURI": "http://schemas.dmtf.org/cimi/1/MachineTemplate",
> "id": "http://cimi.example.org/machine_templates/1",
> "name": "My First Template",
> "description": "A template for testing",
> diff --git a/server/tests/cimi/spec/cimi/data/volume.json b/server/tests/cimi/spec/cimi/data/volume.json
> index e8364dd..63a05a3 100644
> --- a/server/tests/cimi/spec/cimi/data/volume.json
> +++ b/server/tests/cimi/spec/cimi/data/volume.json
> @@ -1,4 +1,5 @@
> {
> + "resourceURI": "http://schemas.dmtf.org/cimi/1/Volume",
> "id": "http://cimi.example.org/volumes/1",
> "name": "volume1",
> "description": "Volume One",
> diff --git a/server/tests/cimi/spec/cimi/data/volume_configuration.json b/server/tests/cimi/spec/cimi/data/volume_configuration.json
> index 817e20c..ce3ad14 100644
> --- a/server/tests/cimi/spec/cimi/data/volume_configuration.json
> +++ b/server/tests/cimi/spec/cimi/data/volume_configuration.json
> @@ -1,4 +1,5 @@
> {
> + "resourceURI": "http://schemas.dmtf.org/cimi/1/VolumeConfiguration",
> "id": "http://cimi.example.org/volume_configurations/1",
> "name": "volume_config_1",
> "description": "Volume Configuration One",
> diff --git a/server/tests/cimi/spec/cimi/data/volume_image.json b/server/tests/cimi/spec/cimi/data/volume_image.json
> index 8c6ac04..47f52d1 100644
> --- a/server/tests/cimi/spec/cimi/data/volume_image.json
> +++ b/server/tests/cimi/spec/cimi/data/volume_image.json
> @@ -1,4 +1,5 @@
> {
> + "resourceURI": "http://schemas.dmtf.org/cimi/1/VolumeImage",
> "id": "http://cimi.example.org/volume_images/1",
> "name": "volume_image_1",
> "description": "Volume Image One",
> diff --git a/server/tests/cimi/spec/cimi/data/volume_template.json b/server/tests/cimi/spec/cimi/data/volume_template.json
> index bddb5dc..b5e5b05 100644
> --- a/server/tests/cimi/spec/cimi/data/volume_template.json
> +++ b/server/tests/cimi/spec/cimi/data/volume_template.json
> @@ -1,4 +1,5 @@
> {
> + "resourceURI": "http://schemas.dmtf.org/cimi/1/VolumeTemplate",
> "id": "http://cimi.example.org/volume_templates/1",
> "name": "volume_template_1",
> "description": "Volume Template One",
>
--
Michal Fojtik <mf...@redhat.com>
Deltacloud API, CloudForms