[
https://issues.apache.org/jira/browse/DTACLOUD-400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13534783#comment-13534783
]
Marios Andreou commented on DTACLOUD-400:
-----------------------------------------
This is a misunderstanding in how CIMI works - what this patch does is to not
expose the 'add' URI for the volumes collection when 'create volume' is not
supported - in this case for the rhevm driver. In other words:
GET /cimi/volumes:
<Collection xmlns="http://schemas.dmtf.org/cimi/1"
resourceURI="http://schemas.dmtf.org/cimi/1/VolumeCollection">
<id>http://localhost:3001/cimi/volumes</id>
<count>3</count>
<Volume>
...
</Volume>
<Volume>
...
</Volume>
<Volume>
...
</Volume>
<operation rel="add" href="http://localhost:3001/cimi/volumes" />
</Collection>
This 'add' URI is what you should use to create a new volume - i.e. POST
against whatever the href value is here. With this patch applied - a GET
/cimi/volumes will not expose this 'add' operation.
I just noticed that set http://tracker.deltacloud.org/set/208 has been acked. I
just pushed these patches - with commit #
27225180f05e8d7662cee5e442922dbd51603933 and
92556ea216308b22763b59ba8b2ac6a6c3bf3f22. The part I'm still not sure about is
if the tests solution (needs_capability) is acceptable - if not we can revisit
this issue and send fresh patches - I think Ronelle may need to look at this
too.
marios
> "POST /cimi/volumes" returns 412 Precondition Failed for server pointing at
> RHEVM provider
> ------------------------------------------------------------------------------------------
>
> Key: DTACLOUD-400
> URL: https://issues.apache.org/jira/browse/DTACLOUD-400
> Project: DeltaCloud
> Issue Type: Bug
> Components: CIMI/Frontend
> Environment: Deltacloud commit version:
> 15c1e8b702460b43fc445cbbc13657d9affd2977
> RHEVM 3.0
> Reporter: Ronelle Landy
> Assignee: Marios Andreou
> Attachments:
> 0001-CIMI-dont-expose-add-URI-for-collection-if-not-suppo.patch,
> 0002-CIMI-tests-skip-if-capability-supported-DTACLOUD-400.patch
>
>
> Found while running cimiplan tests - part4_test.rb - testing Deltacloud
> server with cimi frontend - pointing at RHEVM provider:
> Executing the following lines in the test code:
> *************
> volume = post(volume_add_uri,
> "<VolumeCreate xmlns=\"#{CIMI::Test::CIMI_NAMESPACE}\">" +
> "<name>cimi_volume_for_attach_new</name>" +
> "<description>volume for attach testing</description>" +
> "<volumeTemplate>" +
> "<volumeConfig href=\"" + get_a(cep_json, "volumeConfig") + "\">" +
> "</volumeConfig>" +
> "</volumeTemplate>" +
> "</VolumeCreate>",
> :accept => :json, :content_type => :xml)
> **************
> /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb:48:in
> `return!': 412 Precondition Failed (RestClient::PreconditionFailed)
> from
> /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/request.rb:230:in
> `process_result'
> from
> /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/request.rb:178:in
> `transmit'
> from /usr/lib/ruby/1.8/net/http.rb:543:in `start'
> from
> /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in
> `transmit'
> from
> /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in
> `execute'
> from
> /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in
> `execute'
> from
> /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient.rb:72:in `post'
> from ./test_helper.rb:153:in `post'
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira