From: Ronelle Landy <rla...@redhat.com> --- tests/cimi/plan/scRMD.xml | 240 ++++++++++++++++++--------------------------- 1 files changed, 95 insertions(+), 145 deletions(-)
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 @@ <metadata> <number>Entity Metadata</number> <title>Capabilities</title> - <date>2013/01/03</date> + <date>2013/02/01</date> <status>Draft</status> <nowstf/> </metadata> @@ -87,14 +87,14 @@ Content-Type: application/json </succ> </test> - <test name="Query the resource_metadata collection"> + <test name="Query the CEP.resourceMetadata collection"> <desc>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. </desc> - <succ>A representation of the resource_metadata collection is + <succ>A representation of the CEP.resourceMetadata collection is returned ??? using either JSON or XML serialization. <note> HTTP response code must be "200 OK" </note> @@ -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. </note> + capability/attribute/action must be present. </note> + <note> All metadata for a given resource type will be included within the + ResourceMetadata representation for the resource type </note> <p/> <popup title="Sample"> + <xml>GET /resourceMetadata HTTP/1.1</xml> + <p/> <xml>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"}] + }], } </xml> </popup> @@ -155,12 +160,12 @@ Content-Type: application/json collection contains an entry corresponding to the Machine resource. </note> <tests> - <test name="Query the resource_metadata collection"> - <desc> GET request is sent to resource_metadata collection to query the metadata associated + <test name="Query the CEP.resourceMetadata collection"> + <desc> GET request is sent to CEP.resourceMetadata collection to query the metadata associated with the 'Machine' entry </desc> - <succ>A representation of the resource_metadata collection is + <succ>A representation of the CEP.resourceMetadata collection is returned ??? using either JSON or XML serialization. <note> HTTP response code must be "200 OK" </note> @@ -176,24 +181,28 @@ Content-Type: application/json <p/> <popup title="Sample"> + <xml>GET /resourceMetadata HTTP/1.1</xml> + <p/> <xml>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"}] + }], } </xml> </popup> @@ -216,23 +225,25 @@ Content-Type: application/json </note> <p/> <popup title="Sample"> + <xml>GET /resourceMetadata/machine HTTP/1.1</xml> + <p/> <xml>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"}] } </xml> </popup> @@ -254,21 +265,29 @@ Content-Type: application/json </desc> <succ> - 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. <note> The DefaultInitialState capability must be returned </note> + <note>The capability advertised must contain: + <note> name </note> + <note> uri (unique)</note> + <note> description </note> + <note> a single value </note> + </note> <p/> <popup title="Sample"> + <xml>GET /resourceMetadata/machine HTTP/1.1</xml> + <p/> <xml>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> </succ> </test> - - <test name="Inspect the capability"> - <desc> Use the GET request from above to - return the all information available about the capability. - </desc> - - <succ>The capability advertised must contain: - <note> name </note> - <note> uri (unique)</note> - <note> description </note> - <note> a single value </note> - - <p/> - <popup title="Sample"> - <xml>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" -} - </xml> - </popup> - </succ> - </test> - <test name="Put collection member in state to verify capability"> <desc> Create a @@ -360,7 +346,7 @@ Location: http://example.com/machines/machineId12345 <test name="Execute a query/action to expose the capability"> <desc> 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 </desc> @@ -415,6 +401,8 @@ Content-Type: application/json <p/> <popup title="Sample"> + <xml>DELETE /machine HTTP/1.1</xml> + <p/> <xml>HTTP/1.1 200 OK Content-Type: application/json </xml> @@ -438,56 +426,30 @@ Content-Type: application/json </desc> <succ> - 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. <note>The InitialStates capability must be returned </note> - - <p/> - <popup title="Sample"> - <xml>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" -} - </xml> - </popup> - </succ> - </test> - - - <test name="Inspect the capability"> - <desc> - Use the GET request from above to - return the all information available about the capability. - </desc> - - <succ> - The capability advertised must contain: + <note> The capability advertised must contain: <note> name </note> <note> uri (unique)</note> <note> description </note> <note> value(s) </note> + </note> <p/> <popup title="Sample"> + <xml>GET /resourceMetadata/machine HTTP/1.1</xml> + <p/> <xml>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 <p/> <popup title="Sample"> - <xml>TTP/1.1 200 OK + <xml>GET /machines HTTP/1.1</xml> + <p/> + <xml>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 <p/> <popup title="Sample"> + <xml>DELETE /machine HTTP/1.1</xml> + <p/> <xml>HTTP/1.1 200 OK Content-Type: application/json </xml> @@ -636,17 +602,17 @@ Content-Type: application/json - <part title="General case - test case template per capability/action/attribute"> + <part title="General case - test case template per capability"> <tests> - <test name="Query the resource_metadata collection"> + <test name="Query the CEP.resourceMetadata collection"> <desc> 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 </desc> <succ> - A representation of the resource_metadata collection is + A representation of the CEP.resourceMetadata collection is returned ??? using either JSON or XML serialization <note> HTTP response code must be "200 OK" </note> @@ -658,28 +624,12 @@ Content-Type: application/json ResourceMetadataCollection </note> <note> count must match value the number of ResourceMetadata elements returned </note> - - <p/> - - <popup title="Sample"> - <xml></xml> - </popup> - </succ> - </test> - - <test name="Inspect the capability"> - <desc> - Use the GET request from above or - issue a specific GET request to return the all information - available about the capability. - </desc> - - <succ> - Each capability advertised must contain: - <note> name </note> - <note> uri (unique)</note> - <note> description </note> - <note> value </note> + <note>Each capability advertised must contain: + <note> name </note> + <note> uri (unique)</note> + <note> description </note> + <note> value </note> + </note> <p/> -- 1.7.7.6