summaryrefslogtreecommitdiff
path: root/doc/api_samples
diff options
context:
space:
mode:
authorKevin_Zheng <zhengzhenyu@huawei.com>2016-06-16 17:28:33 +0800
committerMatt Riedemann <mriedem.os@gmail.com>2018-01-10 14:02:53 -0500
commit92a0fc0b9f89f2472a574ef86c007d209a516a41 (patch)
tree8f53645d86d8f1ebefac9f90a8565f43b2aba5a7 /doc/api_samples
parent55f59172ee708b0f927b08146bc76219715b3662 (diff)
downloadnova-92a0fc0b9f89f2472a574ef86c007d209a516a41.tar.gz
Add pagination and Changes-since filter support for os-migrations.
This patch adds pagination support and changes-since filter for os-migrations API. Users can now use 'limit' and 'marker' to perform paginate query of running migrations list. Users can also filter the results according to the migrations' updated time. The ``GET /os-migrations`` and server migrations APIs will now return a uuid value in addition to the migrations id in the response, and the query parameter schema of the ``GET /os-migrations`` API no longer allows additional properties. Co-Authored-By: Yikun Jiang <yikunkero@gmail.com> Implement: blueprint add-pagination-and-change-since-for-migration-list Change-Id: I7e01f95d7173d9217f76e838b3ea71555151ef56
Diffstat (limited to 'doc/api_samples')
-rw-r--r--doc/api_samples/os-migrations/v2.59/migrations-get-with-limit.json24
-rw-r--r--doc/api_samples/os-migrations/v2.59/migrations-get-with-marker.json30
-rw-r--r--doc/api_samples/os-migrations/v2.59/migrations-get-with-timestamp-filter.json36
-rw-r--r--doc/api_samples/os-migrations/v2.59/migrations-get.json78
-rw-r--r--doc/api_samples/server-migrations/v2.59/migrations-get.json21
-rw-r--r--doc/api_samples/server-migrations/v2.59/migrations-index.json23
-rw-r--r--doc/api_samples/versions/v21-version-get-resp.json2
-rw-r--r--doc/api_samples/versions/versions-get-resp.json2
8 files changed, 214 insertions, 2 deletions
diff --git a/doc/api_samples/os-migrations/v2.59/migrations-get-with-limit.json b/doc/api_samples/os-migrations/v2.59/migrations-get-with-limit.json
new file mode 100644
index 0000000000..f281cd98b8
--- /dev/null
+++ b/doc/api_samples/os-migrations/v2.59/migrations-get-with-limit.json
@@ -0,0 +1,24 @@
+{
+ "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"
+ }
+ ],
+ "migrations_links": [{
+ "href": "http://openstack.example.com/v2.1/6f70656e737461636b20342065766572/os-migrations?limit=1&marker=42341d4b-346a-40d0-83c6-5f4f6892b650",
+ "rel": "next"
+ }]
+}
diff --git a/doc/api_samples/os-migrations/v2.59/migrations-get-with-marker.json b/doc/api_samples/os-migrations/v2.59/migrations-get-with-marker.json
new file mode 100644
index 0000000000..e829087f87
--- /dev/null
+++ b/doc/api_samples/os-migrations/v2.59/migrations-get-with-marker.json
@@ -0,0 +1,30 @@
+{
+ "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"
+ }
+ ]
+}
diff --git a/doc/api_samples/os-migrations/v2.59/migrations-get-with-timestamp-filter.json b/doc/api_samples/os-migrations/v2.59/migrations-get-with-timestamp-filter.json
new file mode 100644
index 0000000000..7d36fe4548
--- /dev/null
+++ b/doc/api_samples/os-migrations/v2.59/migrations-get-with-timestamp-filter.json
@@ -0,0 +1,36 @@
+{
+ "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"
+ },
+ {
+ "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"
+ }
+ ]
+}
diff --git a/doc/api_samples/os-migrations/v2.59/migrations-get.json b/doc/api_samples/os-migrations/v2.59/migrations-get.json
new file mode 100644
index 0000000000..42ffca8963
--- /dev/null
+++ b/doc/api_samples/os-migrations/v2.59/migrations-get.json
@@ -0,0 +1,78 @@
+{
+ "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"
+ },
+ {
+ "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"
+ },
+ {
+ "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"
+ },
+ {
+ "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"
+ }
+ ]
+}
diff --git a/doc/api_samples/server-migrations/v2.59/migrations-get.json b/doc/api_samples/server-migrations/v2.59/migrations-get.json
new file mode 100644
index 0000000000..213b669846
--- /dev/null
+++ b/doc/api_samples/server-migrations/v2.59/migrations-get.json
@@ -0,0 +1,21 @@
+{
+ "migration": {
+ "created_at": "2016-01-29T13:42:02.000000",
+ "dest_compute": "compute2",
+ "dest_host": "1.2.3.4",
+ "dest_node": "node2",
+ "id": 1,
+ "server_uuid": "4cfba335-03d8-49b2-8c52-e69043d1e8fe",
+ "source_compute": "compute1",
+ "source_node": "node1",
+ "status": "running",
+ "memory_total_bytes": 123456,
+ "memory_processed_bytes": 12345,
+ "memory_remaining_bytes": 111111,
+ "disk_total_bytes": 234567,
+ "disk_processed_bytes": 23456,
+ "disk_remaining_bytes": 211111,
+ "updated_at": "2016-01-29T13:42:02.000000",
+ "uuid": "12341d4b-346a-40d0-83c6-5f4f6892b650"
+ }
+}
diff --git a/doc/api_samples/server-migrations/v2.59/migrations-index.json b/doc/api_samples/server-migrations/v2.59/migrations-index.json
new file mode 100644
index 0000000000..6c65c98de4
--- /dev/null
+++ b/doc/api_samples/server-migrations/v2.59/migrations-index.json
@@ -0,0 +1,23 @@
+{
+ "migrations": [
+ {
+ "created_at": "2016-01-29T13:42:02.000000",
+ "dest_compute": "compute2",
+ "dest_host": "1.2.3.4",
+ "dest_node": "node2",
+ "id": 1,
+ "server_uuid": "4cfba335-03d8-49b2-8c52-e69043d1e8fe",
+ "source_compute": "compute1",
+ "source_node": "node1",
+ "status": "running",
+ "memory_total_bytes": 123456,
+ "memory_processed_bytes": 12345,
+ "memory_remaining_bytes": 111111,
+ "disk_total_bytes": 234567,
+ "disk_processed_bytes": 23456,
+ "disk_remaining_bytes": 211111,
+ "updated_at": "2016-01-29T13:42:02.000000",
+ "uuid": "12341d4b-346a-40d0-83c6-5f4f6892b650"
+ }
+ ]
+}
diff --git a/doc/api_samples/versions/v21-version-get-resp.json b/doc/api_samples/versions/v21-version-get-resp.json
index 141bce3d7e..fc6a6d37cd 100644
--- a/doc/api_samples/versions/v21-version-get-resp.json
+++ b/doc/api_samples/versions/v21-version-get-resp.json
@@ -19,7 +19,7 @@
}
],
"status": "CURRENT",
- "version": "2.58",
+ "version": "2.59",
"min_version": "2.1",
"updated": "2013-07-23T11:33:21Z"
}
diff --git a/doc/api_samples/versions/versions-get-resp.json b/doc/api_samples/versions/versions-get-resp.json
index dafc1d0c00..00a140d912 100644
--- a/doc/api_samples/versions/versions-get-resp.json
+++ b/doc/api_samples/versions/versions-get-resp.json
@@ -22,7 +22,7 @@
}
],
"status": "CURRENT",
- "version": "2.58",
+ "version": "2.59",
"min_version": "2.1",
"updated": "2013-07-23T11:33:21Z"
}