
Use betamax to record interactions between cratonclient and a craton server for the /v1/regions API. Implements: bp testing-plan Change-Id: I7f558a4516afdc3db27101639620534f4746b2af
168 lines
5.2 KiB
YAML
168 lines
5.2 KiB
YAML
http_interactions:
|
|
- recorded_at: '2017-03-21T15:52:15'
|
|
request:
|
|
body:
|
|
encoding: utf-8
|
|
string: "{\n \"name\": \"cloud-TestRegions-test_update\"\n}"
|
|
headers:
|
|
Accept: '*/*'
|
|
Accept-Encoding: gzip, deflate
|
|
Connection: keep-alive
|
|
Content-Length: '41'
|
|
Content-Type: application/json
|
|
User-Agent: python-cratonclient/0.0.1
|
|
X-Auth-Project: <craton-demo-project>
|
|
X-Auth-Token: <craton-demo-token>
|
|
X-Auth-User: <craton-demo-username>
|
|
method: POST
|
|
uri: <craton-url>/clouds
|
|
response:
|
|
body:
|
|
encoding: null
|
|
string: "{\n \"variables\": {},\n \"created_at\": \"2017-03-21T00:42:41.637962\"\
|
|
,\n \"note\": null,\n \"updated_at\": null,\n \"id\": 151,\n \"name\"\
|
|
: \"cloud-TestRegions-test_update\",\n \"project_id\": \"<craton-demo-project>\"\
|
|
\n}"
|
|
headers:
|
|
Content-Length: '218'
|
|
Content-Type: application/json
|
|
Date: Tue, 21 Mar 2017 00:42:41 GMT
|
|
Location: <craton-url>/clouds/151
|
|
Server: WSGIServer/0.2 CPython/3.5.2
|
|
x-openstack-request-id: req-2da1f63d-caf8-4ae2-acc1-5cc3c55ae6d9
|
|
status:
|
|
code: 201
|
|
message: CREATED
|
|
url: <craton-url>/clouds
|
|
- recorded_at: '2017-03-21T15:52:15'
|
|
request:
|
|
body:
|
|
encoding: utf-8
|
|
string: "{\n \"cloud_id\": 151,\n \"name\": \"region-to-update\"\n}"
|
|
headers:
|
|
Accept: '*/*'
|
|
Accept-Encoding: gzip, deflate
|
|
Connection: keep-alive
|
|
Content-Length: '45'
|
|
Content-Type: application/json
|
|
User-Agent: python-cratonclient/0.0.1
|
|
X-Auth-Project: <craton-demo-project>
|
|
X-Auth-Token: <craton-demo-token>
|
|
X-Auth-User: <craton-demo-username>
|
|
method: POST
|
|
uri: <craton-url>/regions
|
|
response:
|
|
body:
|
|
encoding: null
|
|
string: "{\n \"variables\": {},\n \"cloud_id\": 151,\n \"created_at\": \"\
|
|
2017-03-21T00:42:41.721637\",\n \"note\": null,\n \"updated_at\": null,\n\
|
|
\ \"id\": 61,\n \"name\": \"region-to-update\",\n \"project_id\": \"<craton-demo-project>\"\
|
|
\n}"
|
|
headers:
|
|
Content-Length: '223'
|
|
Content-Type: application/json
|
|
Date: Tue, 21 Mar 2017 00:42:41 GMT
|
|
Location: <craton-url>/regions/61
|
|
Server: WSGIServer/0.2 CPython/3.5.2
|
|
x-openstack-request-id: req-fb85c056-6722-4174-bb27-24e390f6583e
|
|
status:
|
|
code: 201
|
|
message: CREATED
|
|
url: <craton-url>/regions
|
|
- recorded_at: '2017-03-21T15:52:15'
|
|
request:
|
|
body:
|
|
encoding: utf-8
|
|
string: "{\n \"name\": \"region_updated\",\n \"note\": \"Here I add my note.\"\
|
|
\n}"
|
|
headers:
|
|
Accept: '*/*'
|
|
Accept-Encoding: gzip, deflate
|
|
Connection: keep-alive
|
|
Content-Length: '57'
|
|
Content-Type: application/json
|
|
User-Agent: python-cratonclient/0.0.1
|
|
X-Auth-Project: <craton-demo-project>
|
|
X-Auth-Token: <craton-demo-token>
|
|
X-Auth-User: <craton-demo-username>
|
|
method: PUT
|
|
uri: <craton-url>/regions/61
|
|
response:
|
|
body:
|
|
encoding: null
|
|
string: "{\n \"cloud_id\": 151,\n \"created_at\": \"2017-03-21T00:42:41.000000\"\
|
|
,\n \"note\": \"Here I add my note.\",\n \"updated_at\": \"2017-03-21T00:42:41.811053\"\
|
|
,\n \"project_id\": \"<craton-demo-project>\",\n \"name\": \"region_updated\"\
|
|
,\n \"id\": 61\n}"
|
|
headers:
|
|
Content-Length: '243'
|
|
Content-Type: application/json
|
|
Date: Tue, 21 Mar 2017 00:42:41 GMT
|
|
Server: WSGIServer/0.2 CPython/3.5.2
|
|
x-openstack-request-id: req-80453771-42f3-49ee-9bc2-ea9343fe3a9d
|
|
status:
|
|
code: 200
|
|
message: OK
|
|
url: <craton-url>/regions/61
|
|
- recorded_at: '2017-03-21T15:52:15'
|
|
request:
|
|
body:
|
|
encoding: utf-8
|
|
string: ''
|
|
headers:
|
|
Accept: '*/*'
|
|
Accept-Encoding: gzip, deflate
|
|
Connection: keep-alive
|
|
Content-Length: '0'
|
|
User-Agent: python-cratonclient/0.0.1
|
|
X-Auth-Project: <craton-demo-project>
|
|
X-Auth-Token: <craton-demo-token>
|
|
X-Auth-User: <craton-demo-username>
|
|
method: DELETE
|
|
uri: <craton-url>/regions/61
|
|
response:
|
|
body:
|
|
encoding: null
|
|
string: ''
|
|
headers:
|
|
Content-Length: '0'
|
|
Content-Type: application/json
|
|
Date: Tue, 21 Mar 2017 00:42:41 GMT
|
|
Server: WSGIServer/0.2 CPython/3.5.2
|
|
x-openstack-request-id: req-5f9e3a5c-ceed-4fff-8883-b235d5a646c6
|
|
status:
|
|
code: 204
|
|
message: NO CONTENT
|
|
url: <craton-url>/regions/61
|
|
- recorded_at: '2017-03-21T15:52:15'
|
|
request:
|
|
body:
|
|
encoding: utf-8
|
|
string: ''
|
|
headers:
|
|
Accept: '*/*'
|
|
Accept-Encoding: gzip, deflate
|
|
Connection: keep-alive
|
|
Content-Length: '0'
|
|
User-Agent: python-cratonclient/0.0.1
|
|
X-Auth-Project: <craton-demo-project>
|
|
X-Auth-Token: <craton-demo-token>
|
|
X-Auth-User: <craton-demo-username>
|
|
method: DELETE
|
|
uri: <craton-url>/clouds/151
|
|
response:
|
|
body:
|
|
encoding: null
|
|
string: ''
|
|
headers:
|
|
Content-Length: '0'
|
|
Content-Type: application/json
|
|
Date: Tue, 21 Mar 2017 00:42:41 GMT
|
|
Server: WSGIServer/0.2 CPython/3.5.2
|
|
x-openstack-request-id: req-0b8747e5-1455-4748-95f7-3115c831a735
|
|
status:
|
|
code: 204
|
|
message: NO CONTENT
|
|
url: <craton-url>/clouds/151
|
|
recorded_with: betamax/0.8.0
|