-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Filter migrations by user_id/project_id
In microversion 2.80, the ``GET /os-migrations`` API will have optional ``user_id`` and ``project_id`` query parameters for filtering migrations by user and/or project: * GET /os-migrations?user_id=ef9d34b4-45d0-4530-871b-3fb535988394 * GET /os-migrations?project_id=011ee9f4-8f16-4c38-8633-a254d420fd54 * GET /os-migrations?user_id=ef9d34b4-45d0-4530-871b-3fb535988394&project_id=011ee9f4-8f16-4c38-8633-a254d420fd54 And expose the ``user_id`` and ``project_id`` fields in the following APIs: * GET /os-migrations * GET /servers/{server_id}/migrations * GET /servers/{server_id}/migrations/{migration_id} Co-Authored-By: Qiu Fossen <qiujunting> Part of blueprint add-user-id-field-to-the-migrations-table Change-Id: I7313d6cde1a5e1dc7dd6f3c0dff9f30bbf4bee2c
- Loading branch information
1 parent
d14ae3a
commit ac16511
Showing
35 changed files
with
1,115 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
doc/api_samples/os-migrations/v2.80/migrations-get-with-changes-before.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"migrations": [ | ||
{ | ||
"created_at": "2016-01-29T11:42:02.000000", | ||
"dest_compute": "compute2", | ||
"dest_host": "1.2.3.4", | ||
"dest_node": "node2", | ||
"id": 1, | ||
"instance_uuid": "8600d31b-d1a1-4632-b2ff-45c2be1a70ff", | ||
"links": [ | ||
{ | ||
"href": "http://openstack.example.com/v2.1/6f70656e737461636b20342065766572/servers/8600d31b-d1a1-4632-b2ff-45c2be1a70ff/migrations/1", | ||
"rel": "self" | ||
}, | ||
{ | ||
"href": "http://openstack.example.com/6f70656e737461636b20342065766572/servers/8600d31b-d1a1-4632-b2ff-45c2be1a70ff/migrations/1", | ||
"rel": "bookmark" | ||
} | ||
], | ||
"new_instance_type_id": 1, | ||
"old_instance_type_id": 1, | ||
"source_compute": "compute1", | ||
"source_node": "node1", | ||
"status": "running", | ||
"migration_type": "live-migration", | ||
"updated_at": "2016-01-29T11:42:02.000000", | ||
"uuid": "12341d4b-346a-40d0-83c6-5f4f6892b650", | ||
"user_id": "5c48ebaa-193f-4c5d-948a-f559cc92cd5e", | ||
"project_id": "ef92ccff-00f3-46e4-b015-811110e36ee4" | ||
} | ||
] | ||
} |
40 changes: 40 additions & 0 deletions
40
doc/api_samples/os-migrations/v2.80/migrations-get-with-changes-since.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"migrations": [ | ||
{ | ||
"created_at": "2016-06-23T14:42:02.000000", | ||
"dest_compute": "compute20", | ||
"dest_host": "5.6.7.8", | ||
"dest_node": "node20", | ||
"id": 4, | ||
"instance_uuid": "9128d044-7b61-403e-b766-7547076ff6c1", | ||
"new_instance_type_id": 6, | ||
"old_instance_type_id": 5, | ||
"source_compute": "compute10", | ||
"source_node": "node10", | ||
"status": "migrating", | ||
"migration_type": "resize", | ||
"updated_at": "2016-06-23T14:42:02.000000", | ||
"uuid": "42341d4b-346a-40d0-83c6-5f4f6892b650", | ||
"user_id": "78348f0e-97ee-4d70-ad34-189692673ea2", | ||
"project_id": "9842f0f7-1229-4355-afe7-15ebdbb8c3d8" | ||
}, | ||
{ | ||
"created_at": "2016-06-23T13:42:02.000000", | ||
"dest_compute": "compute20", | ||
"dest_host": "5.6.7.8", | ||
"dest_node": "node20", | ||
"id": 3, | ||
"instance_uuid": "9128d044-7b61-403e-b766-7547076ff6c1", | ||
"new_instance_type_id": 6, | ||
"old_instance_type_id": 5, | ||
"source_compute": "compute10", | ||
"source_node": "node10", | ||
"status": "error", | ||
"migration_type": "resize", | ||
"updated_at": "2016-06-23T13:42:02.000000", | ||
"uuid": "32341d4b-346a-40d0-83c6-5f4f6892b650", | ||
"user_id": "78348f0e-97ee-4d70-ad34-189692673ea2", | ||
"project_id": "9842f0f7-1229-4355-afe7-15ebdbb8c3d8" | ||
} | ||
] | ||
} |
28 changes: 28 additions & 0 deletions
28
doc/api_samples/os-migrations/v2.80/migrations-get-with-limit.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"migrations": [ | ||
{ | ||
"created_at": "2016-06-23T14:42:02.000000", | ||
"dest_compute": "compute20", | ||
"dest_host": "5.6.7.8", | ||
"dest_node": "node20", | ||
"id": 4, | ||
"instance_uuid": "9128d044-7b61-403e-b766-7547076ff6c1", | ||
"new_instance_type_id": 6, | ||
"old_instance_type_id": 5, | ||
"source_compute": "compute10", | ||
"source_node": "node10", | ||
"status": "migrating", | ||
"migration_type": "resize", | ||
"updated_at": "2016-06-23T14:42:02.000000", | ||
"uuid": "42341d4b-346a-40d0-83c6-5f4f6892b650", | ||
"user_id": "78348f0e-97ee-4d70-ad34-189692673ea2", | ||
"project_id": "9842f0f7-1229-4355-afe7-15ebdbb8c3d8" | ||
} | ||
], | ||
"migrations_links": [ | ||
{ | ||
"href": "http://openstack.example.com/v2.1/6f70656e737461636b20342065766572/os-migrations?limit=1&marker=42341d4b-346a-40d0-83c6-5f4f6892b650", | ||
"rel": "next" | ||
} | ||
] | ||
} |
32 changes: 32 additions & 0 deletions
32
doc/api_samples/os-migrations/v2.80/migrations-get-with-marker.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"migrations": [ | ||
{ | ||
"created_at": "2016-01-29T11:42:02.000000", | ||
"dest_compute": "compute2", | ||
"dest_host": "1.2.3.4", | ||
"dest_node": "node2", | ||
"id": 1, | ||
"instance_uuid": "8600d31b-d1a1-4632-b2ff-45c2be1a70ff", | ||
"links": [ | ||
{ | ||
"href": "http://openstack.example.com/v2.1/6f70656e737461636b20342065766572/servers/8600d31b-d1a1-4632-b2ff-45c2be1a70ff/migrations/1", | ||
"rel": "self" | ||
}, | ||
{ | ||
"href": "http://openstack.example.com/6f70656e737461636b20342065766572/servers/8600d31b-d1a1-4632-b2ff-45c2be1a70ff/migrations/1", | ||
"rel": "bookmark" | ||
} | ||
], | ||
"new_instance_type_id": 1, | ||
"old_instance_type_id": 1, | ||
"source_compute": "compute1", | ||
"source_node": "node1", | ||
"status": "running", | ||
"migration_type": "live-migration", | ||
"updated_at": "2016-01-29T11:42:02.000000", | ||
"uuid": "12341d4b-346a-40d0-83c6-5f4f6892b650", | ||
"user_id": "5c48ebaa-193f-4c5d-948a-f559cc92cd5e", | ||
"project_id": "ef92ccff-00f3-46e4-b015-811110e36ee4" | ||
} | ||
] | ||
} |
50 changes: 50 additions & 0 deletions
50
doc/api_samples/os-migrations/v2.80/migrations-get-with-user-or-project-id.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
"migrations": [ | ||
{ | ||
"created_at": "2016-01-29T12:42:02.000000", | ||
"dest_compute": "compute2", | ||
"dest_host": "1.2.3.4", | ||
"dest_node": "node2", | ||
"id": 2, | ||
"instance_uuid": "8600d31b-d1a1-4632-b2ff-45c2be1a70ff", | ||
"new_instance_type_id": 1, | ||
"old_instance_type_id": 1, | ||
"source_compute": "compute1", | ||
"source_node": "node1", | ||
"status": "error", | ||
"migration_type": "live-migration", | ||
"updated_at": "2016-01-29T12:42:02.000000", | ||
"uuid": "22341d4b-346a-40d0-83c6-5f4f6892b650", | ||
"user_id": "5c48ebaa-193f-4c5d-948a-f559cc92cd5e", | ||
"project_id": "ef92ccff-00f3-46e4-b015-811110e36ee4" | ||
}, | ||
{ | ||
"created_at": "2016-01-29T11:42:02.000000", | ||
"dest_compute": "compute2", | ||
"dest_host": "1.2.3.4", | ||
"dest_node": "node2", | ||
"id": 1, | ||
"instance_uuid": "8600d31b-d1a1-4632-b2ff-45c2be1a70ff", | ||
"links": [ | ||
{ | ||
"href": "http://openstack.example.com/v2.1/6f70656e737461636b20342065766572/servers/8600d31b-d1a1-4632-b2ff-45c2be1a70ff/migrations/1", | ||
"rel": "self" | ||
}, | ||
{ | ||
"href": "http://openstack.example.com/6f70656e737461636b20342065766572/servers/8600d31b-d1a1-4632-b2ff-45c2be1a70ff/migrations/1", | ||
"rel": "bookmark" | ||
} | ||
], | ||
"new_instance_type_id": 1, | ||
"old_instance_type_id": 1, | ||
"source_compute": "compute1", | ||
"source_node": "node1", | ||
"status": "running", | ||
"migration_type": "live-migration", | ||
"updated_at": "2016-01-29T11:42:02.000000", | ||
"uuid": "12341d4b-346a-40d0-83c6-5f4f6892b650", | ||
"user_id": "5c48ebaa-193f-4c5d-948a-f559cc92cd5e", | ||
"project_id": "ef92ccff-00f3-46e4-b015-811110e36ee4" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
{ | ||
"migrations": [ | ||
{ | ||
"created_at": "2016-06-23T14:42:02.000000", | ||
"dest_compute": "compute20", | ||
"dest_host": "5.6.7.8", | ||
"dest_node": "node20", | ||
"id": 4, | ||
"instance_uuid": "9128d044-7b61-403e-b766-7547076ff6c1", | ||
"new_instance_type_id": 6, | ||
"old_instance_type_id": 5, | ||
"source_compute": "compute10", | ||
"source_node": "node10", | ||
"status": "migrating", | ||
"migration_type": "resize", | ||
"updated_at": "2016-06-23T14:42:02.000000", | ||
"uuid": "42341d4b-346a-40d0-83c6-5f4f6892b650", | ||
"user_id": "78348f0e-97ee-4d70-ad34-189692673ea2", | ||
"project_id": "9842f0f7-1229-4355-afe7-15ebdbb8c3d8" | ||
}, | ||
{ | ||
"created_at": "2016-06-23T13:42:02.000000", | ||
"dest_compute": "compute20", | ||
"dest_host": "5.6.7.8", | ||
"dest_node": "node20", | ||
"id": 3, | ||
"instance_uuid": "9128d044-7b61-403e-b766-7547076ff6c1", | ||
"new_instance_type_id": 6, | ||
"old_instance_type_id": 5, | ||
"source_compute": "compute10", | ||
"source_node": "node10", | ||
"status": "error", | ||
"migration_type": "resize", | ||
"updated_at": "2016-06-23T13:42:02.000000", | ||
"uuid": "32341d4b-346a-40d0-83c6-5f4f6892b650", | ||
"user_id": "78348f0e-97ee-4d70-ad34-189692673ea2", | ||
"project_id": "9842f0f7-1229-4355-afe7-15ebdbb8c3d8" | ||
}, | ||
{ | ||
"created_at": "2016-01-29T12:42:02.000000", | ||
"dest_compute": "compute2", | ||
"dest_host": "1.2.3.4", | ||
"dest_node": "node2", | ||
"id": 2, | ||
"instance_uuid": "8600d31b-d1a1-4632-b2ff-45c2be1a70ff", | ||
"new_instance_type_id": 1, | ||
"old_instance_type_id": 1, | ||
"source_compute": "compute1", | ||
"source_node": "node1", | ||
"status": "error", | ||
"migration_type": "live-migration", | ||
"updated_at": "2016-01-29T12:42:02.000000", | ||
"uuid": "22341d4b-346a-40d0-83c6-5f4f6892b650", | ||
"user_id": "5c48ebaa-193f-4c5d-948a-f559cc92cd5e", | ||
"project_id": "ef92ccff-00f3-46e4-b015-811110e36ee4" | ||
}, | ||
{ | ||
"created_at": "2016-01-29T11:42:02.000000", | ||
"dest_compute": "compute2", | ||
"dest_host": "1.2.3.4", | ||
"dest_node": "node2", | ||
"id": 1, | ||
"instance_uuid": "8600d31b-d1a1-4632-b2ff-45c2be1a70ff", | ||
"links": [ | ||
{ | ||
"href": "http://openstack.example.com/v2.1/6f70656e737461636b20342065766572/servers/8600d31b-d1a1-4632-b2ff-45c2be1a70ff/migrations/1", | ||
"rel": "self" | ||
}, | ||
{ | ||
"href": "http://openstack.example.com/6f70656e737461636b20342065766572/servers/8600d31b-d1a1-4632-b2ff-45c2be1a70ff/migrations/1", | ||
"rel": "bookmark" | ||
} | ||
], | ||
"new_instance_type_id": 1, | ||
"old_instance_type_id": 1, | ||
"source_compute": "compute1", | ||
"source_node": "node1", | ||
"status": "running", | ||
"migration_type": "live-migration", | ||
"updated_at": "2016-01-29T11:42:02.000000", | ||
"uuid": "12341d4b-346a-40d0-83c6-5f4f6892b650", | ||
"user_id": "5c48ebaa-193f-4c5d-948a-f559cc92cd5e", | ||
"project_id": "ef92ccff-00f3-46e4-b015-811110e36ee4" | ||
} | ||
] | ||
} |
Oops, something went wrong.