Return-Path: X-Original-To: apmail-deltacloud-commits-archive@www.apache.org Delivered-To: apmail-deltacloud-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 11E77E296 for ; Fri, 8 Feb 2013 17:36:06 +0000 (UTC) Received: (qmail 93707 invoked by uid 500); 8 Feb 2013 17:36:06 -0000 Delivered-To: apmail-deltacloud-commits-archive@deltacloud.apache.org Received: (qmail 93690 invoked by uid 500); 8 Feb 2013 17:36:06 -0000 Mailing-List: contact commits-help@deltacloud.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@deltacloud.apache.org Delivered-To: mailing list commits@deltacloud.apache.org Received: (qmail 93683 invoked by uid 99); 8 Feb 2013 17:36:06 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Feb 2013 17:36:06 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 914153A6EE; Fri, 8 Feb 2013 17:36:05 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: marios@apache.org To: commits@deltacloud.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [1/2] git commit: CIMI - Test Plan, Resource Metadata Capabilities - incorporating review changes Message-Id: <20130208173605.914153A6EE@tyr.zones.apache.org> Date: Fri, 8 Feb 2013 17:36:05 +0000 (UTC) CIMI - Test Plan, Resource Metadata Capabilities - incorporating review changes TrackedAt: http://tracker.deltacloud.org/patch/f59c14c0c59c1f89e10d372121a8aa7aae58a4d3 Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/91c891a5 Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/91c891a5 Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/91c891a5 Branch: refs/heads/master Commit: 91c891a5ed84a0e0bbb953602e7f296108dea82b Parents: dea3046 Author: Ronelle Landy Authored: Tue Feb 5 19:07:59 2013 -0500 Committer: marios Committed: Fri Feb 8 19:35:30 2013 +0200 ---------------------------------------------------------------------- tests/cimi/plan/scRMD.xml | 240 ++++++++++++++++------------------------ 1 files changed, 95 insertions(+), 145 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/deltacloud/blob/91c891a5/tests/cimi/plan/scRMD.xml ---------------------------------------------------------------------- diff --git a/tests/cimi/plan/scRMD.xml b/tests/cimi/plan/scRMD.xml index 30a9ceb..31f3625 100644 --- a/tests/cimi/plan/scRMD.xml +++ b/tests/cimi/plan/scRMD.xml @@ -5,7 +5,7 @@ Entity Metadata Capabilities - 2013/01/03 + 2013/02/01 Draft @@ -87,14 +87,14 @@ Content-Type: application/json - + GET request is sent - to resource_metadata collection to query the metadata (attributes, + to CEP.resourceMetadata collection to query the metadata (attributes, capabilities, actions) supported by the Cloud Provider. The response can be returned in either format, XML or JSON. - A representation of the resource_metadata collection is + A representation of the CEP.resourceMetadata collection is returned – using either JSON or XML serialization. HTTP response code must be "200 OK" @@ -115,30 +115,35 @@ Content-Type: application/json the Resource Metadata resource. Note that a collection Resource Metadata resource does not have to have all three (capabilities, attributes and actions) necessarily, but at least one - capability/attribute/action must be present. The entries should be returned within - ResourceMetadata elements related to the collections they are - associated with. + capability/attribute/action must be present. + All metadata for a given resource type will be included within the + ResourceMetadata representation for the resource type

+ GET /resourceMetadata HTTP/1.1 +

HTTP/1.1 200 OK Content-Type: application/json -{"count": 1, - "resourceURI": "http://schemas.dmtf.org/cimi/1/ResourceMetadataCollection", +{ "resourceURI": "http://schemas.dmtf.org/cimi/1/ResourceMetadataCollection", + "id":"http://example.com/cimi/CEP.resourceMetadata", + "count": 1, "resourceMetadata": - [{"capabilities": - [{"uri":"http://schemas.dmtf.org/cimi/1/capability/Collection/Capability1", - "description":"Description of Capability 1", "name":"Capability1", - "value":"valueOfCapability1"}, - {"uri":"http://schemas.dmtf.org/cimi/1/capability/Collection/Capability2", - "description":"Description of Capability 2", "name":"Capability2", - "value":"valueOfCapability2A, valueOfCapability2B"}], - "typeUri": "http://schemas.dmtf.org/cimi/1/Collection", + "id": "http://example.com/cimi/CEP.resourceMetadata/collection", "name": "Collection", - "id": "http://example.com/cimi/resource_metadata/collection"}], - "id":"http://example.com/cimi/resource_metadata" + "typeUri": "http://schemas.dmtf.org/cimi/1/Collection", + [{"capabilities": + [{"name":"Capability1", + "uri":"http://schemas.dmtf.org/cimi/1/capabilityCollection/Capability1", + "description":"Description of Capability 1", + "value":"valueOfCapability1"}, + {"name":"Capability2", + "uri":"http://schemas.dmtf.org/cimi/1/capability/Collection/Capability2", + "description":"Description of Capability 2", + "value":"valueOfCapability2A, valueOfCapability2B"}] + }], } @@ -155,12 +160,12 @@ Content-Type: application/json collection contains an entry corresponding to the Machine resource. - - GET request is sent to resource_metadata collection to query the metadata associated + + GET request is sent to CEP.resourceMetadata collection to query the metadata associated with the 'Machine' entry - A representation of the resource_metadata collection is + A representation of the CEP.resourceMetadata collection is returned – using either JSON or XML serialization. HTTP response code must be "200 OK" @@ -176,24 +181,28 @@ Content-Type: application/json

+ GET /resourceMetadata HTTP/1.1 +

HTTP/1.1 200 OK Content-Type: application/json -{ -"count": 1, -"resourceURI": "http://schemas.dmtf.org/cimi/1/ResourceMetadataCollection", -"resourceMetadata": - [{"capabilities": - [{"uri":"http://schemas.dmtf.org/cimi/1/capability/Machine/Capability1", - "description":"Decsription of Capability 1", "name":"Capability1", - "value":"valueOfCapability1"}, - {"uri":"http://schemas.dmtf.org/cimi/1/capability/Machine/capability2", - "description":"Description of Capability 2", "name":"Capability2", - "value":"valueOfCapability2A, valueOfCapability2B"}], - "typeUri":"http://schemas.dmtf.org/cimi/1/Machine", - "name":"Machine", - "id":"http://example.com/cimi/resource_metadata/machine"}], -"id":"http://example.com/cimi/resource_metadata" +{ "resourceURI": "http://schemas.dmtf.org/cimi/1/ResourceMetadataCollection", + "id":"http://example.com/cimi/CEP.resourceMetadata", + "count": 1, + "resourceMetadata": + "id": "http://example.com/cimi/CEP.resourceMetadata/collection", + "name": "Collection", + "typeUri": "http://schemas.dmtf.org/cimi/1/Collection", + [{"capabilities": + [{"name":"Capability1", + "uri":"http://schemas.dmtf.org/cimi/1/capabilityCollection/Capability1", + "description":"Description of Capability 1", + "value":"valueOfCapability1"}, + {"name":"Capability2", + "uri":"http://schemas.dmtf.org/cimi/1/capability/Collection/Capability2", + "description":"Description of Capability 2", + "value":"valueOfCapability2A, valueOfCapability2B"}] + }], } @@ -216,23 +225,25 @@ Content-Type: application/json

+ GET /resourceMetadata/machine HTTP/1.1 +

HTTP/1.1 200 OK Content-Type: application/json { -"capabilities": - [{"uri": "http://schemas.dmtf.org/cimi/1/capability/Machine/Capability1", - "description": "Description of Capability 1", - "name": "Capability1", - "value": "valueOfCapability1"}, - {"uri": "http://schemas.dmtf.org/cimi/1/capability/Machine/Capability2", - "description": "Description of Capability 2", - "name": "Capability2", - "value": "valueOfCapability2A, valueOfCapability2B"}], -"typeUri": "http://schemas.dmtf.org/cimi/1/Machine", -"name": "Machine", "resourceURI": "http://schemas.dmtf.org/cimi/1/ResourceMetadata", -"id": "http://example.com/cimi/resource_metadata/machine" +"id": "http://example.com/cimi/CEP.resourceMetadata/machine", +"name": "Machine", +"typeUri": "http://schemas.dmtf.org/cimi/1/Machine", +"capabilities": + [{"name":"Capability1", + "uri":"http://schemas.dmtf.org/cimi/1/capabilityCollection/Capability1", + "description":"Description of Capability 1", + "value":"valueOfCapability1"}, + {"name":"Capability2", + "uri":"http://schemas.dmtf.org/cimi/1/capability/Collection/Capability2", + "description":"Description of Capability 2", + "value":"valueOfCapability2A, valueOfCapability2B"}] } @@ -254,21 +265,29 @@ Content-Type: application/json - A serialization of the resource_metadata collection is returned + A serialization of the CEP.resourceMetadata collection is returned – using either JSON or XML serialization. This test must adhere to one of the "Query the ResourceMetadata entry" tests in the previous section. The DefaultInitialState capability must be returned + The capability advertised must contain: + name + uri (unique) + description + a single value +

+ GET /resourceMetadata/machine HTTP/1.1 +

HTTP/1.1 200 OK Content-Type: application/xml <ResourceMetadata xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/ResourceMetadata"> -<id>http://example.com/cimi/resource_metadata/machine</id> +<id>http://example.com/cimi/CEP.resourceMetadata/machine</id> <name>Machine</name> <typeUri>http://schemas.dmtf.org/cimi/1/Machine</typeUri> <capability name="DefaultInitialState" @@ -281,39 +300,6 @@ STARTED</capability> - - - Use the GET request from above to - return the all information available about the capability. - - - The capability advertised must contain: - name - uri (unique) - description - a single value - -

- - HTTP/1.1 200 OK -Content-Type: application/json - -{ -"capabilities": - [{"name": "DefaultInitialState", - "value": "STARTED", - "description": "Indicates what the default initial state of a new Machine", - "uri": "http://schemas.dmtf.org/cimi/1/capability/Machine/DefaultInitialState"}], -"typeUri": "http://schemas.dmtf.org/cimi/1/Machine", -"name": "Machine", -"resourceURI": "http://schemas.dmtf.org/cimi/1/ResourceMetadata", -"id": "http://example.com/cimi/resource_metadata/machine" -} - - - - - Create a @@ -360,7 +346,7 @@ Location: http://example.com/machines/machineId12345 Execute a - GET /machines/new_machine_id operation to return the + GET on the id of the new machine to return the machine stable initial state @@ -415,6 +401,8 @@ Content-Type: application/json

+ DELETE /machine HTTP/1.1 +

HTTP/1.1 200 OK Content-Type: application/json @@ -438,56 +426,30 @@ Content-Type: application/json - A serialization of the resource_metadata collection is returned + A serialization of the CEP.resourceMetadata collection is returned – using either JSON or XML serialization. This test must adhere to one of the "Query the ResourceMetadata entry" test in the section. The InitialStates capability must be returned - -

- - HTTP/1.1 200 OK -Content-Type: application/json - -{ -"capabilities": - [{"name": "InitialStates", - "value": "STARTED,STOPPED", - "description": "Indicates the list of allowable initial states", - "uri": "http://schemas.dmtf.org/cimi/1/capability/Machine/InitialStates"}], -"typeUri": "http://schemas.dmtf.org/cimi/1/Machine", -"name": "Machine", -"resourceURI": "http://schemas.dmtf.org/cimi/1/ResourceMetadata", -"id": "http://example.com/cimi/resource_metadata/machine" -} - - - - - - - - - Use the GET request from above to - return the all information available about the capability. - - - - The capability advertised must contain: + The capability advertised must contain: name uri (unique) description value(s) +

+ GET /resourceMetadata/machine HTTP/1.1 +

HTTP/1.1 200 OK + Content-Type: application/xml <ResourceMetadata xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/ResourceMetadata"> -<id>http://example.com/cimi/resource_metadata/machine</id> +<id>http://example.com/cimi/CEP.resourceMetadata/machine</id> <name>Machine</name> <typeUri>http://schemas.dmtf.org/cimi/1/Machine</typeUri> <capability name="InitialStates" @@ -569,7 +531,9 @@ Location: http://example.com/machines/machineId123456

- TTP/1.1 200 OK + GET /machines HTTP/1.1 +

+ HTTP/1.1 200 OK Content-Type: application/json { "resourceType": "http://schemas.dmtf.org/cimi/1/Machine", @@ -606,6 +570,8 @@ Content-Type: application/json

+ DELETE /machine HTTP/1.1 +

HTTP/1.1 200 OK Content-Type: application/json @@ -636,17 +602,17 @@ Content-Type: application/json - + - + GET request is sent - to resource_metadata collection to query the metadata associated + to CEP.resourceMetadata collection to query the metadata associated with the relevant collection - A representation of the resource_metadata collection is + A representation of the CEP.resourceMetadata collection is returned – using either JSON or XML serialization HTTP response code must be "200 OK" @@ -658,28 +624,12 @@ Content-Type: application/json ResourceMetadataCollection count must match value the number of ResourceMetadata elements returned - -

- - - - - - - - - - Use the GET request from above or - issue a specific GET request to return the all information - available about the capability. - - - - Each capability advertised must contain: - name - uri (unique) - description - value + Each capability advertised must contain: + name + uri (unique) + description + value +