I think this bug is important. The RESTful API is broken from the viewpoint of its design.
Now "get os-migrations" API returns the following body:
{"migrations": { "objects": [ {"dest_host": "192.168.11.100", "instance_uuid": "7b2288fb-f16e-4b2d-9ee6-daebb0caca00", "deleted": false, "old_instance_type_id": 6, "updated_at": "2014-03-07T11:25:33.000000", "dest_compute": "localhost", "created_at": "2014-03-07T11:25:10.000000", "status": "finished", "source_node": "localhost", "source_compute": "localhost", "dest_node": "localhost", "deleted_at": null, "id": 1, "new_instance_type_id": 2} ] }
On the other hand, ./doc/api_samples/os-migrations/migrations-get.json is
{ "migrations": [ { "created_at": "2012-10-29T13:42:02.000000", "dest_compute": "compute2", "dest_host": "1.2.3.4", "dest_node": "node2", "id": 1234, "instance_uuid": "instance_id_123", "new_instance_type_id": 2, "old_instance_type_id": 1, "source_compute": "compute1", "source_node": "node1", "status": "Done", "updated_at": "2012-10-29T13:42:02.000000" }, [..] ]
The difference is "objects" and it should be removed. novaclient does not expect "objects" because of the API design, and this problem happens. We need to fix this faster before the other clients expect the body should include "objects".
I think this bug is important.
The RESTful API is broken from the viewpoint of its design.
Now "get os-migrations" API returns the following body:
{"migrations": { f16e-4b2d- 9ee6-daebb0caca 00", "deleted": false, "old_instance_ type_id" : 6, "updated_at": "2014-03- 07T11:25: 33.000000" , "dest_compute": "localhost", "created_at": "2014-03- 07T11:25: 10.000000" , "status": "finished", "source_node": "localhost", "source_compute": "localhost", "dest_node": "localhost", "deleted_at": null, "id": 1, "new_instance_ type_id" : 2}
"objects": [
{"dest_host": "192.168.11.100", "instance_uuid": "7b2288fb-
]
}
On the other hand, ./doc/api_ samples/ os-migrations/ migrations- get.json is
{
"created_ at": "2012-10- 29T13:42: 02.000000" ,
"dest_ compute" : "compute2",
"dest_ host": "1.2.3.4",
"dest_ node": "node2",
"instance_ uuid": "instance_id_123",
"new_ instance_ type_id" : 2,
"old_ instance_ type_id" : 1,
"source_ compute" : "compute1",
"source_ node": "node1",
"status" : "Done",
"updated_ at": "2012-10- 29T13:42: 02.000000"
"migrations": [
{
"id": 1234,
},
[..]
]
The difference is "objects" and it should be removed.
novaclient does not expect "objects" because of the API design, and this problem happens.
We need to fix this faster before the other clients expect the body should include "objects".