Description of problem: When one wants to detach storage domain from DC, the sent link for DELETE action is /api/datacenters/9190febf-4bfd-4a9a-9b95-c882d0573289/storagedomains/ab9aed7b-f011-4d6d-a0a4-52e2ba7b4e8d;async=%3Covirtsdk.xml.params.StorageDomain+object+at+0x23b3990%3E instead of just /api/datacenters/9190febf-4bfd-4a9a-9b95-c882d0573289/storagedomains/ab9aed7b-f011-4d6d-a0a4-52e2ba7b4e8d Version-Release number of selected component (if applicable): built from commit f948815152deb48bc8eb7b9f92d056d69b491995 How reproducible: Always Steps to Reproduce: 1. Have a storage domain in Inactive state in DC 2. use sd.delete() on given storage domain object Actual results: /api/datacenters/9190febf-4bfd-4a9a-9b95-c882d0573289/storagedomains/ab9aed7b-f011-4d6d-a0a4-52e2ba7b4e8d;async=%3Covirtsdk.xml.params.StorageDomain+object+at+0x23b3990%3E Expected results: /api/datacenters/9190febf-4bfd-4a9a-9b95-c882d0573289/storagedomains/ab9aed7b-f011-4d6d-a0a4-52e2ba7b4e8d Additional info: I tested just sending DELETE with string in expected results and it works.
the signature is: def delete(self, async=None):, can you please attach your python code
and sdk debug log
i believe the problem is in your code, you did sd.delete(sd) or similar i just did the following: dc = api.datacenters.get(name='Default_nfs') sd = dc.storagedomains.get(name='nfs_export') sd.delete() what is produce right http code: send: 'GET /api/datacenters?search=name%3DDefault_nfs HTTP/1.1\r\nHost: localhost:8080\r\nAccept-Encoding: identity\r\nPrefer: persistent-auth\r\nContent-type: application/xml\r\nAuthorization: Basic ... \r\n\r\n' reply: 'HTTP/1.1 200 OK\r\n' header: Server: Apache-Coyote/1.1 header: Set-Cookie: JSESSIONID=...; Path=/api header: Content-Type: application/xml header: Content-Length: 904 header: Date: Mon, 21 May 2012 15:17:20 GMT send: 'GET /api/datacenters/bfe850fc-14d0-4a06-a765-520a2b9e59e4/storagedomains HTTP/1.1\r\nHost: localhost:8080\r\nAccept-Encoding: identity\r\nPrefer: persistent-auth\r\nContent-type: application/xml\r\nAuthorization: Basic ...\r\n\r\n' reply: 'HTTP/1.1 200 OK\r\n' header: Server: Apache-Coyote/1.1 header: Set-Cookie: JSESSIONID=....; Path=/api header: Content-Type: application/xml header: Content-Length: 3655 header: Date: Mon, 21 May 2012 15:17:22 GMT send: 'DELETE /api/datacenters/bfe850fc-14d0-4a06-a765-520a2b9e59e4/storagedomains/47dd3e38-c252-4586-b180-afc8e8011df1 HTTP/1.1\r\nHost: localhost:8080\r\nAccept-Encoding: identity\r\nPrefer: persistent-auth\r\nAuthorization: Basic ...\r\n\r\n' reply: 'HTTP/1.1 400 Bad Request\r\n' header: Server: Apache-Coyote/1.1 header: Content-Type: application/xml header: Content-Length: 251 header: Date: Mon, 21 May 2012 15:17:27 GMT header: Connection: close the problem in this delete that sdk sends Content-Type header but this is different bug.
weird - now it works for me too and I have changed nothing...
(In reply to comment #4) > weird - now it works for me too and I have changed nothing... the code is simple, to uri appended /async/ param content, if you put obj in it, it will be obj.__str__