summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-02-27 22:19:19 +0000
committerGerrit Code Review <review@openstack.org>2013-02-27 22:19:19 +0000
commit1ca3c1fced8eddde48e3d81ac8874409c4a61078 (patch)
tree3cbc2626db2c0f8cf1deafb4d6ef0a9d41b1976c /doc
parent13fdda6e641a9e507b72ebfe8bd36c9800325bc3 (diff)
parentd10a2e13e1ad77720d1433eafa9e04a017fcaeb3 (diff)
downloadnova-1ca3c1fced8eddde48e3d81ac8874409c4a61078.tar.gz
nova-1ca3c1fced8eddde48e3d81ac8874409c4a61078.tar.xz
nova-1ca3c1fced8eddde48e3d81ac8874409c4a61078.zip
Merge "Add API Sample tests for Snapshots extension."
Diffstat (limited to 'doc')
-rw-r--r--doc/api_samples/os-volumes/snapshot-create-req.json8
-rw-r--r--doc/api_samples/os-volumes/snapshot-create-req.xml7
-rw-r--r--doc/api_samples/os-volumes/snapshot-create-resp.json32
-rw-r--r--doc/api_samples/os-volumes/snapshot-create-resp.xml2
-rw-r--r--doc/api_samples/os-volumes/snapshots-detail-resp.json31
-rw-r--r--doc/api_samples/os-volumes/snapshots-detail-resp.xml6
-rw-r--r--doc/api_samples/os-volumes/snapshots-list-resp.json31
-rw-r--r--doc/api_samples/os-volumes/snapshots-list-resp.xml6
-rw-r--r--doc/api_samples/os-volumes/snapshots-show-resp.json11
-rw-r--r--doc/api_samples/os-volumes/snapshots-show-resp.xml2
10 files changed, 136 insertions, 0 deletions
diff --git a/doc/api_samples/os-volumes/snapshot-create-req.json b/doc/api_samples/os-volumes/snapshot-create-req.json
new file mode 100644
index 000000000..8ad5b3cb0
--- /dev/null
+++ b/doc/api_samples/os-volumes/snapshot-create-req.json
@@ -0,0 +1,8 @@
+{
+ "snapshot": {
+ "display_name": "snap-001",
+ "display_description": "Daily backup",
+ "volume_id": "521752a6-acf6-4b2d-bc7a-119f9148cd8c",
+ "force": false
+ }
+} \ No newline at end of file
diff --git a/doc/api_samples/os-volumes/snapshot-create-req.xml b/doc/api_samples/os-volumes/snapshot-create-req.xml
new file mode 100644
index 000000000..e5001cf06
--- /dev/null
+++ b/doc/api_samples/os-volumes/snapshot-create-req.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+ <snapshot>
+ <display_name>snap-001</display_name>
+ <display_description>Daily backup</display_description>
+ <volume_id>521752a6-acf6-4b2d-bc7a-119f9148cd8c</volume_id>
+ <force>false</force>
+ </snapshot> \ No newline at end of file
diff --git a/doc/api_samples/os-volumes/snapshot-create-resp.json b/doc/api_samples/os-volumes/snapshot-create-resp.json
new file mode 100644
index 000000000..1a14bea01
--- /dev/null
+++ b/doc/api_samples/os-volumes/snapshot-create-resp.json
@@ -0,0 +1,32 @@
+{
+ "snapshot": {
+ "createdAt": "2013-02-25T16:27:54.680544",
+ "displayDescription": "Daily backup",
+ "displayName": "snap-001",
+ "id": 100,
+ "size": 100,
+ "status": "available",
+ "volumeId": {
+ "attach_status": "attached",
+ "availability_zone": "fakeaz",
+ "created_at": "1999-01-01T01:01:01.000000",
+ "display_description": "displaydesc",
+ "display_name": "displayname",
+ "host": "fakehost",
+ "id": "521752a6-acf6-4b2d-bc7a-119f9148cd8c",
+ "instance_uuid": "fakeuuid",
+ "mountpoint": "/",
+ "name": "vol name",
+ "project_id": "fakeproject",
+ "size": 1,
+ "snapshot_id": null,
+ "status": "fakestatus",
+ "user_id": "fakeuser",
+ "volume_metadata": [],
+ "volume_type": {
+ "name": "vol_type_name"
+ },
+ "volume_type_id": "fakevoltype"
+ }
+ }
+} \ No newline at end of file
diff --git a/doc/api_samples/os-volumes/snapshot-create-resp.xml b/doc/api_samples/os-volumes/snapshot-create-resp.xml
new file mode 100644
index 000000000..ad815f723
--- /dev/null
+++ b/doc/api_samples/os-volumes/snapshot-create-resp.xml
@@ -0,0 +1,2 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<snapshot status="available" displayDescription="Daily backup" displayName="snap-001" volumeId="{'instance_uuid': 'fakeuuid', 'status': 'fakestatus', 'user_id': 'fakeuser', 'name': 'vol name', 'display_name': 'displayname', 'availability_zone': 'fakeaz', 'created_at': datetime.datetime(1999, 1, 1, 1, 1, 1), 'attach_status': 'attached', 'display_description': 'displaydesc', 'host': 'fakehost', 'volume_type_id': 'fakevoltype', 'volume_metadata': [], 'volume_type': {'name': 'vol_type_name'}, 'snapshot_id': None, 'mountpoint': '/', 'project_id': 'fakeproject', 'id': u'521752a6-acf6-4b2d-bc7a-119f9148cd8c', 'size': 1}" id="100" createdAt="2013-02-25 16:27:36.840121" size="100"/> \ No newline at end of file
diff --git a/doc/api_samples/os-volumes/snapshots-detail-resp.json b/doc/api_samples/os-volumes/snapshots-detail-resp.json
new file mode 100644
index 000000000..796e522c4
--- /dev/null
+++ b/doc/api_samples/os-volumes/snapshots-detail-resp.json
@@ -0,0 +1,31 @@
+{
+ "snapshots": [
+ {
+ "createdAt": "2013-02-25T16:27:54.671372",
+ "displayDescription": "Default description",
+ "displayName": "Default name",
+ "id": 100,
+ "size": 100,
+ "status": "available",
+ "volumeId": 12
+ },
+ {
+ "createdAt": "2013-02-25T16:27:54.671378",
+ "displayDescription": "Default description",
+ "displayName": "Default name",
+ "id": 101,
+ "size": 100,
+ "status": "available",
+ "volumeId": 12
+ },
+ {
+ "createdAt": "2013-02-25T16:27:54.671381",
+ "displayDescription": "Default description",
+ "displayName": "Default name",
+ "id": 102,
+ "size": 100,
+ "status": "available",
+ "volumeId": 12
+ }
+ ]
+} \ No newline at end of file
diff --git a/doc/api_samples/os-volumes/snapshots-detail-resp.xml b/doc/api_samples/os-volumes/snapshots-detail-resp.xml
new file mode 100644
index 000000000..5e946939f
--- /dev/null
+++ b/doc/api_samples/os-volumes/snapshots-detail-resp.xml
@@ -0,0 +1,6 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<snapshots>
+ <snapshot status="available" displayDescription="Default description" displayName="Default name" volumeId="12" id="100" createdAt="2013-02-25 16:27:36.862459" size="100"/>
+ <snapshot status="available" displayDescription="Default description" displayName="Default name" volumeId="12" id="101" createdAt="2013-02-25 16:27:36.862466" size="100"/>
+ <snapshot status="available" displayDescription="Default description" displayName="Default name" volumeId="12" id="102" createdAt="2013-02-25 16:27:36.862469" size="100"/>
+</snapshots> \ No newline at end of file
diff --git a/doc/api_samples/os-volumes/snapshots-list-resp.json b/doc/api_samples/os-volumes/snapshots-list-resp.json
new file mode 100644
index 000000000..9b7cb412a
--- /dev/null
+++ b/doc/api_samples/os-volumes/snapshots-list-resp.json
@@ -0,0 +1,31 @@
+{
+ "snapshots": [
+ {
+ "createdAt": "2013-02-25T16:27:54.684999",
+ "displayDescription": "Default description",
+ "displayName": "Default name",
+ "id": 100,
+ "size": 100,
+ "status": "available",
+ "volumeId": 12
+ },
+ {
+ "createdAt": "2013-02-25T16:27:54.685005",
+ "displayDescription": "Default description",
+ "displayName": "Default name",
+ "id": 101,
+ "size": 100,
+ "status": "available",
+ "volumeId": 12
+ },
+ {
+ "createdAt": "2013-02-25T16:27:54.685008",
+ "displayDescription": "Default description",
+ "displayName": "Default name",
+ "id": 102,
+ "size": 100,
+ "status": "available",
+ "volumeId": 12
+ }
+ ]
+} \ No newline at end of file
diff --git a/doc/api_samples/os-volumes/snapshots-list-resp.xml b/doc/api_samples/os-volumes/snapshots-list-resp.xml
new file mode 100644
index 000000000..6714c98bc
--- /dev/null
+++ b/doc/api_samples/os-volumes/snapshots-list-resp.xml
@@ -0,0 +1,6 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<snapshots>
+ <snapshot status="available" displayDescription="Default description" displayName="Default name" volumeId="12" id="100" createdAt="2013-02-25 16:27:36.769149" size="100"/>
+ <snapshot status="available" displayDescription="Default description" displayName="Default name" volumeId="12" id="101" createdAt="2013-02-25 16:27:36.769154" size="100"/>
+ <snapshot status="available" displayDescription="Default description" displayName="Default name" volumeId="12" id="102" createdAt="2013-02-25 16:27:36.769157" size="100"/>
+</snapshots> \ No newline at end of file
diff --git a/doc/api_samples/os-volumes/snapshots-show-resp.json b/doc/api_samples/os-volumes/snapshots-show-resp.json
new file mode 100644
index 000000000..d7b3f26e4
--- /dev/null
+++ b/doc/api_samples/os-volumes/snapshots-show-resp.json
@@ -0,0 +1,11 @@
+{
+ "snapshot": {
+ "createdAt": "2013-02-25T16:27:54.724209",
+ "displayDescription": "Default description",
+ "displayName": "Default name",
+ "id": "100",
+ "size": 100,
+ "status": "available",
+ "volumeId": 12
+ }
+} \ No newline at end of file
diff --git a/doc/api_samples/os-volumes/snapshots-show-resp.xml b/doc/api_samples/os-volumes/snapshots-show-resp.xml
new file mode 100644
index 000000000..3c70cf033
--- /dev/null
+++ b/doc/api_samples/os-volumes/snapshots-show-resp.xml
@@ -0,0 +1,2 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<snapshot status="available" displayDescription="Default description" displayName="Default name" volumeId="12" id="100" createdAt="2013-02-25 16:27:36.854206" size="100"/> \ No newline at end of file