deltacloud-client-vm 1.1.4.2 → 1.1.4.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (191) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +176 -0
  3. data/NOTICE +8 -0
  4. data/README.md +73 -0
  5. data/Rakefile +122 -0
  6. data/deltacloud-client-vm.gemspec +24 -0
  7. data/lib/deltacloud_vm/client.rb +79 -0
  8. data/lib/deltacloud_vm/client/base_error.rb +80 -0
  9. data/lib/deltacloud_vm/client/connection.rb +139 -0
  10. data/lib/deltacloud_vm/client/helpers/model_helper.rb +69 -0
  11. data/lib/deltacloud_vm/client/helpers/property_helper.rb +103 -0
  12. data/lib/deltacloud_vm/client/helpers/xml_helper.rb +33 -0
  13. data/lib/deltacloud_vm/client/methods.rb +33 -0
  14. data/lib/deltacloud_vm/client/methods/address.rb +67 -0
  15. data/lib/deltacloud_vm/client/methods/api.rb +96 -0
  16. data/lib/deltacloud_vm/client/methods/backward_compatiblity.rb +72 -0
  17. data/lib/deltacloud_vm/client/methods/blob.rb +91 -0
  18. data/lib/deltacloud_vm/client/methods/bucket.rb +55 -0
  19. data/lib/deltacloud_vm/client/methods/common.rb +46 -0
  20. data/lib/deltacloud_vm/client/methods/driver.rb +53 -0
  21. data/lib/deltacloud_vm/client/methods/firewall.rb +67 -0
  22. data/lib/deltacloud_vm/client/methods/hardware_profile.rb +41 -0
  23. data/lib/deltacloud_vm/client/methods/image.rb +61 -0
  24. data/lib/deltacloud_vm/client/methods/instance.rb +141 -0
  25. data/lib/deltacloud_vm/client/methods/instance_state.rb +41 -0
  26. data/lib/deltacloud_vm/client/methods/key.rb +58 -0
  27. data/lib/deltacloud_vm/client/methods/load_balancer.rb +96 -0
  28. data/lib/deltacloud_vm/client/methods/metric.rb +54 -0
  29. data/lib/deltacloud_vm/client/methods/realm.rb +42 -0
  30. data/lib/deltacloud_vm/client/methods/storage_snapshot.rb +61 -0
  31. data/lib/deltacloud_vm/client/methods/storage_volume.rb +94 -0
  32. data/lib/deltacloud_vm/client/models.rb +32 -0
  33. data/lib/deltacloud_vm/client/models/address.rb +57 -0
  34. data/lib/deltacloud_vm/client/models/base.rb +153 -0
  35. data/lib/deltacloud_vm/client/models/blob.rb +56 -0
  36. data/lib/deltacloud_vm/client/models/bucket.rb +65 -0
  37. data/lib/deltacloud_vm/client/models/driver.rb +87 -0
  38. data/lib/deltacloud_vm/client/models/firewall.rb +64 -0
  39. data/lib/deltacloud_vm/client/models/hardware_profile.rb +68 -0
  40. data/lib/deltacloud_vm/client/models/image.rb +60 -0
  41. data/lib/deltacloud_vm/client/models/instance.rb +142 -0
  42. data/lib/deltacloud_vm/client/models/instance_address.rb +40 -0
  43. data/lib/deltacloud_vm/client/models/instance_state.rb +52 -0
  44. data/lib/deltacloud_vm/client/models/key.rb +52 -0
  45. data/lib/deltacloud_vm/client/models/load_balancer.rb +55 -0
  46. data/lib/deltacloud_vm/client/models/metric.rb +72 -0
  47. data/lib/deltacloud_vm/client/models/realm.rb +29 -0
  48. data/lib/deltacloud_vm/client/models/storage_snapshot.rb +54 -0
  49. data/lib/deltacloud_vm/client/models/storage_volume.rb +96 -0
  50. data/lib/deltacloud_vm/core_ext.rb +19 -0
  51. data/lib/deltacloud_vm/core_ext/element.rb +32 -0
  52. data/lib/deltacloud_vm/core_ext/fixnum.rb +30 -0
  53. data/lib/deltacloud_vm/core_ext/nil.rb +22 -0
  54. data/lib/deltacloud_vm/core_ext/string.rb +49 -0
  55. data/lib/deltacloud_vm/error_response.rb +93 -0
  56. data/tests/client/client_test.rb +51 -0
  57. data/tests/client/connection_test.rb +77 -0
  58. data/tests/core_ext/element_test.rb +40 -0
  59. data/tests/core_ext/fixnum_test.rb +35 -0
  60. data/tests/core_ext/nil.rb +27 -0
  61. data/tests/core_ext/string_test.rb +47 -0
  62. data/tests/fixtures/instances_cleanup.yml +681 -0
  63. data/tests/fixtures/test_0001_connects_to_Deltacloud_API.yml +60 -0
  64. data/tests/fixtures/test_0001_support_cpu.yml +444 -0
  65. data/tests/fixtures/test_0001_support_original_body.yml +116 -0
  66. data/tests/fixtures/test_0001_supports_addresses.yml +178 -0
  67. data/tests/fixtures/test_0001_supports_api_host.yml +60 -0
  68. data/tests/fixtures/test_0001_supports_attached_.yml +282 -0
  69. data/tests/fixtures/test_0001_supports_blobs.yml +475 -0
  70. data/tests/fixtures/test_0001_supports_bucket.yml +200 -0
  71. data/tests/fixtures/test_0001_supports_buckets.yml +160 -0
  72. data/tests/fixtures/test_0001_supports_drivers.yml +202 -0
  73. data/tests/fixtures/test_0001_supports_firewalls.yml +399 -0
  74. data/tests/fixtures/test_0001_supports_hardware_profiles.yml +262 -0
  75. data/tests/fixtures/test_0001_supports_images.yml +224 -0
  76. data/tests/fixtures/test_0001_supports_instance_states.yml +156 -0
  77. data/tests/fixtures/test_0001_supports_instances.yml +486 -0
  78. data/tests/fixtures/test_0001_supports_keys.yml +198 -0
  79. data/tests/fixtures/test_0001_supports_path.yml +60 -0
  80. data/tests/fixtures/test_0001_supports_realms.yml +152 -0
  81. data/tests/fixtures/test_0001_supports_storage_snapshots.yml +164 -0
  82. data/tests/fixtures/test_0001_supports_storage_volumes.yml +176 -0
  83. data/tests/fixtures/test_0001_supports_to_get_providers.yml +410 -0
  84. data/tests/fixtures/test_0002_support_blob.yml +148 -0
  85. data/tests/fixtures/test_0002_support_instance_state.yml +204 -0
  86. data/tests/fixtures/test_0002_support_memory.yml +444 -0
  87. data/tests/fixtures/test_0002_support_on_Provider.yml +130 -0
  88. data/tests/fixtures/test_0002_supports_api_port.yml +60 -0
  89. data/tests/fixtures/test_0002_supports_api_uri.yml +60 -0
  90. data/tests/fixtures/test_0002_supports_driver.yml +219 -0
  91. data/tests/fixtures/test_0002_supports_extract_xml_body_using_faraday_connection.yml +117 -0
  92. data/tests/fixtures/test_0002_supports_filtering_addresses_by_id_param.yml +156 -0
  93. data/tests/fixtures/test_0002_supports_filtering_buckets_by_id_param.yml +156 -0
  94. data/tests/fixtures/test_0002_supports_filtering_firewalls_by_id_param.yml +207 -0
  95. data/tests/fixtures/test_0002_supports_filtering_hardware_profiles_by_id_param.yml +158 -0
  96. data/tests/fixtures/test_0002_supports_filtering_images_by_id_param.yml +165 -0
  97. data/tests/fixtures/test_0002_supports_filtering_instances_by_id_param.yml +164 -0
  98. data/tests/fixtures/test_0002_supports_filtering_keys_by_id_param.yml +178 -0
  99. data/tests/fixtures/test_0002_supports_filtering_realms_by_id.yml +104 -0
  100. data/tests/fixtures/test_0002_supports_filtering_storage_snapshots_by_id_param.yml +155 -0
  101. data/tests/fixtures/test_0002_supports_filtering_storage_volumes_by_id_param.yml +157 -0
  102. data/tests/fixtures/test_0002_supports_hardware_profiles.yml +262 -0
  103. data/tests/fixtures/test_0002_supports_is_compatible_.yml +116 -0
  104. data/tests/fixtures/test_0002_supports_snapshot_.yml +202 -0
  105. data/tests/fixtures/test_0002_supports_version.yml +60 -0
  106. data/tests/fixtures/test_0003_caches_the_API_entrypoint.yml +60 -0
  107. data/tests/fixtures/test_0003_support_address.yml +197 -0
  108. data/tests/fixtures/test_0003_support_bucket.yml +198 -0
  109. data/tests/fixtures/test_0003_support_create_blob.yml +105 -0
  110. data/tests/fixtures/test_0003_support_create_blob_and_destroy_blob.yml +138 -0
  111. data/tests/fixtures/test_0003_support_firewall.yml +768 -0
  112. data/tests/fixtures/test_0003_support_hardware_profile.yml +199 -0
  113. data/tests/fixtures/test_0003_support_image.yml +207 -0
  114. data/tests/fixtures/test_0003_support_instance.yml +206 -0
  115. data/tests/fixtures/test_0003_support_key.yml +220 -0
  116. data/tests/fixtures/test_0003_support_realm.yml +195 -0
  117. data/tests/fixtures/test_0003_support_storage.yml +444 -0
  118. data/tests/fixtures/test_0003_support_storage_snapshot.yml +196 -0
  119. data/tests/fixtures/test_0003_support_storage_volume.yml +197 -0
  120. data/tests/fixtures/test_0003_support_to_change_driver_with_Client.yml +72 -0
  121. data/tests/fixtures/test_0003_supports_connect.yml +60 -0
  122. data/tests/fixtures/test_0003_supports_extract_xml_body_using_nokogiri_document.yml +117 -0
  123. data/tests/fixtures/test_0003_supports_instance.yml +396 -0
  124. data/tests/fixtures/test_0003_supports_is_compatible_.yml +116 -0
  125. data/tests/fixtures/test_0003_supports_lunch_image.yml +367 -0
  126. data/tests/fixtures/test_0003_supports_providers.yml +102 -0
  127. data/tests/fixtures/test_0003_supports_version.yml +60 -0
  128. data/tests/fixtures/test_0004_support_architecture.yml +444 -0
  129. data/tests/fixtures/test_0004_support_create_address.yml +197 -0
  130. data/tests/fixtures/test_0004_support_create_blob_and_destroy_blob_with_meta_params.yml +139 -0
  131. data/tests/fixtures/test_0004_support_create_bucket.yml +180 -0
  132. data/tests/fixtures/test_0004_support_create_bucket_and_destroy_bucket.yml +180 -0
  133. data/tests/fixtures/test_0004_support_create_firewall_and_destroy_firewall.yml +496 -0
  134. data/tests/fixtures/test_0004_support_create_image_and_destroy_image.yml +1527 -0
  135. data/tests/fixtures/test_0004_support_create_instance.yml +115 -0
  136. data/tests/fixtures/test_0004_support_create_key_and_destroy_key.yml +206 -0
  137. data/tests/fixtures/test_0004_support_create_volume.yml +105 -0
  138. data/tests/fixtures/test_0004_support_create_volume_and_destroy_volume.yml +181 -0
  139. data/tests/fixtures/test_0004_support_to_test_of_valid_DC_connection.yml +60 -0
  140. data/tests/fixtures/test_0004_supports_current_driver.yml +60 -0
  141. data/tests/fixtures/test_0004_supports_extract_xml_body_using_nokogiri_element.yml +117 -0
  142. data/tests/fixtures/test_0004_supports_lunch_image.yml +312 -0
  143. data/tests/fixtures/test_0004_supports_valid_credentials_.yml +215 -0
  144. data/tests/fixtures/test_0004_supports_with_config.yml +129 -0
  145. data/tests/fixtures/test_0005_support_attach_storage_volume.yml +102 -0
  146. data/tests/fixtures/test_0005_support_attach_storage_volume_and_detach_storage_volume.yml +142 -0
  147. data/tests/fixtures/test_0005_support_create_instance_with_hwp_id.yml +115 -0
  148. data/tests/fixtures/test_0005_support_opaque_.yml +152 -0
  149. data/tests/fixtures/test_0005_supports_current_provider.yml +134 -0
  150. data/tests/fixtures/test_0005_supports_id.yml +116 -0
  151. data/tests/fixtures/test_0005_supports_switching_drivers_per_instance.yml +129 -0
  152. data/tests/fixtures/test_0005_supports_use_driver.yml +60 -0
  153. data/tests/fixtures/test_0006_support_create_instance_with_realm_id.yml +115 -0
  154. data/tests/fixtures/test_0006_supports_discovered_.yml +60 -0
  155. data/tests/fixtures/test_0006_supports_supported_collections.yml +60 -0
  156. data/tests/fixtures/test_0006_supports_switching_providers_per_instance.yml +208 -0
  157. data/tests/fixtures/test_0007_support_create_instance_with_name.yml +115 -0
  158. data/tests/fixtures/test_0007_support_switching_provider_without_credentials.yml +208 -0
  159. data/tests/fixtures/test_0007_supports_support_.yml +60 -0
  160. data/tests/fixtures/test_0007_supports_valid_credentials_on_class.yml +370 -0
  161. data/tests/fixtures/test_0008_support_stop_instance.yml +166 -0
  162. data/tests/fixtures/test_0008_supports_must_support_.yml +60 -0
  163. data/tests/fixtures/test_0009_support_start_instance.yml +217 -0
  164. data/tests/fixtures/test_0009_supports_features.yml +60 -0
  165. data/tests/fixtures/test_0010_support_reboot_instance.yml +166 -0
  166. data/tests/fixtures/test_0010_supports_feature_.yml +60 -0
  167. data/tests/helpers/model_test.rb +33 -0
  168. data/tests/helpers/xml_test.rb +56 -0
  169. data/tests/methods/address_test.rb +64 -0
  170. data/tests/methods/api_test.rb +97 -0
  171. data/tests/methods/backward_compatibility_test.rb +87 -0
  172. data/tests/methods/blob_test.rb +64 -0
  173. data/tests/methods/bucket_test.rb +62 -0
  174. data/tests/methods/driver_test.rb +48 -0
  175. data/tests/methods/firewall_test.rb +84 -0
  176. data/tests/methods/hardware_profile_test.rb +53 -0
  177. data/tests/methods/image_test.rb +64 -0
  178. data/tests/methods/instance_state_test.rb +43 -0
  179. data/tests/methods/instance_test.rb +126 -0
  180. data/tests/methods/key_test.rb +63 -0
  181. data/tests/methods/realm_test.rb +50 -0
  182. data/tests/methods/storage_snapshot_test.rb +53 -0
  183. data/tests/methods/storage_volume_test.rb +81 -0
  184. data/tests/models/blob_test.rb +40 -0
  185. data/tests/models/bucket_test.rb +37 -0
  186. data/tests/models/driver_test.rb +42 -0
  187. data/tests/models/hardware_profile_test.rb +80 -0
  188. data/tests/models/image_test.rb +65 -0
  189. data/tests/models/storage_volume_test.rb +52 -0
  190. data/tests/test_helper.rb +64 -0
  191. metadata +191 -2
@@ -0,0 +1,27 @@
1
+ # Licensed to the Apache Software Foundation (ASF) under one or more
2
+ # contributor license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright ownership. The
4
+ # ASF licenses this file to you under the Apache License, Version 2.0 (the
5
+ # "License"); you may not use this file except in compliance with the
6
+ # License. You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13
+ # License for the specific language governing permissions and limitations
14
+ # under the License.
15
+
16
+ require_relative '../test_helper'
17
+
18
+ describe Nil do
19
+
20
+ it 'support #to_xml' do
21
+ nil.must_respond_to :to_xml
22
+ lambda {
23
+ nil.to_xml
24
+ }.must_raise DeltacloudVM::Client::InvalidXMLError
25
+ end
26
+
27
+ end
@@ -0,0 +1,47 @@
1
+ # Licensed to the Apache Software Foundation (ASF) under one or more
2
+ # contributor license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright ownership. The
4
+ # ASF licenses this file to you under the Apache License, Version 2.0 (the
5
+ # "License"); you may not use this file except in compliance with the
6
+ # License. You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13
+ # License for the specific language governing permissions and limitations
14
+ # under the License.
15
+
16
+ require_relative '../test_helper'
17
+
18
+ describe String do
19
+
20
+ it 'support #to_xml' do
21
+ "".must_respond_to :to_xml
22
+ "<root></root>".to_xml.must_be_kind_of Nokogiri::XML::Document
23
+ "<root></root>".to_xml.root.must_be_kind_of Nokogiri::XML::Element
24
+ "<root></root>".to_xml.root.name.must_equal 'root'
25
+ end
26
+
27
+ it 'support #camelize' do
28
+ "".must_respond_to :camelize
29
+ "test".camelize.must_equal 'Test'
30
+ "foo_bar".camelize.must_equal 'FooBar'
31
+ end
32
+
33
+ it 'support #pluralize' do
34
+ ''.must_respond_to :pluralize
35
+ "test".pluralize.must_equal 'tests'
36
+ "address".pluralize.must_equal 'addresses'
37
+ "entity".pluralize.must_equal 'entities'
38
+ end
39
+
40
+ it 'support #singularize' do
41
+ ''.must_respond_to :singularize
42
+ 'tests'.singularize.must_equal 'test'
43
+ 'addresses'.singularize.must_equal 'address'
44
+ 'entity'.singularize.must_equal 'entity'
45
+ end
46
+
47
+ end
@@ -0,0 +1,681 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://localhost:3001/api/instances/inst12
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/xml
12
+ Authorization:
13
+ - Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
14
+ User-Agent:
15
+ - Faraday v0.8.6
16
+ response:
17
+ status:
18
+ code: 200
19
+ message:
20
+ headers:
21
+ content-type:
22
+ - application/xml
23
+ x-backend-runtime:
24
+ - '0.0015072822570800781'
25
+ server:
26
+ - Apache-DeltacloudVM/1.1.1
27
+ x-deltacloud-driver:
28
+ - mock
29
+ content-length:
30
+ - '1175'
31
+ x-content-type-options:
32
+ - nosniff
33
+ etag:
34
+ - 45aa1a1069561afacf53bfa0617937c2
35
+ cache-control:
36
+ - max-age=0, private, must-revalidate
37
+ date:
38
+ - Wed, 06 Mar 2013 08:56:17 GMT
39
+ connection:
40
+ - close
41
+ body:
42
+ encoding: US-ASCII
43
+ string: ! "<?xml version='1.0' encoding='utf-8' ?>\n<instance href='http://localhost:3001/api/instances/inst12'
44
+ id='inst12'>\n <name>i-1362560177</name>\n <owner_id>mockuser</owner_id>\n
45
+ \ <image href='http://localhost:3001/api/images/img1' id='img1'></image>\n
46
+ \ <realm href='http://localhost:3001/api/realms/us' id='us'></realm>\n <state>RUNNING</state>\n
47
+ \ <hardware_profile href='http://localhost:3001/api/hardware_profiles/m1-small'
48
+ id='m1-small'>\n </hardware_profile>\n <actions>\n <link href='http://localhost:3001/api/instances/inst12/reboot'
49
+ method='post' rel='reboot' />\n <link href='http://localhost:3001/api/instances/inst12/stop'
50
+ method='post' rel='stop' />\n <link href='http://localhost:3001/api/instances/inst12/run;id=inst12'
51
+ method='post' rel='run' />\n <link href='http://localhost:3001/api/images;instance_id=inst12'
52
+ method='post' rel='create_image' />\n </actions>\n <public_addresses><address
53
+ type='hostname'>img1.inst12.public.com</address></public_addresses>\n <private_addresses><address
54
+ type='hostname'>img1.inst12.private.com</address></private_addresses>\n <storage_volumes></storage_volumes>\n
55
+ \ <authentication type='key'>\n </authentication>\n</instance>\n"
56
+ http_version:
57
+ recorded_at: Wed, 06 Mar 2013 08:56:17 GMT
58
+ - request:
59
+ method: post
60
+ uri: http://localhost:3001/api/instances/inst12/stop
61
+ body:
62
+ encoding: US-ASCII
63
+ string: ''
64
+ headers:
65
+ Accept:
66
+ - application/xml
67
+ Authorization:
68
+ - Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
69
+ User-Agent:
70
+ - Faraday v0.8.6
71
+ response:
72
+ status:
73
+ code: 202
74
+ message:
75
+ headers:
76
+ content-type:
77
+ - application/xml
78
+ x-backend-runtime:
79
+ - '0.002788543701171875'
80
+ server:
81
+ - Apache-DeltacloudVM/1.1.1
82
+ x-deltacloud-driver:
83
+ - mock
84
+ content-length:
85
+ - '1173'
86
+ x-content-type-options:
87
+ - nosniff
88
+ date:
89
+ - Wed, 06 Mar 2013 08:56:17 GMT
90
+ connection:
91
+ - close
92
+ body:
93
+ encoding: US-ASCII
94
+ string: ! "<?xml version='1.0' encoding='utf-8' ?>\n<instance href='http://localhost:3001/api/instances/inst12'
95
+ id='inst12'>\n <name>i-1362560177</name>\n <owner_id>mockuser</owner_id>\n
96
+ \ <image href='http://localhost:3001/api/images/img1' id='img1'></image>\n
97
+ \ <realm href='http://localhost:3001/api/realms/us' id='us'></realm>\n <state>STOPPED</state>\n
98
+ \ <hardware_profile href='http://localhost:3001/api/hardware_profiles/m1-small'
99
+ id='m1-small'>\n </hardware_profile>\n <actions>\n <link href='http://localhost:3001/api/instances/inst12/start'
100
+ method='post' rel='start' />\n <link href='http://localhost:3001/api/instances/inst12'
101
+ method='delete' rel='destroy' />\n <link href='http://localhost:3001/api/instances/inst12/run;id=inst12'
102
+ method='post' rel='run' />\n <link href='http://localhost:3001/api/images;instance_id=inst12'
103
+ method='post' rel='create_image' />\n </actions>\n <public_addresses><address
104
+ type='hostname'>img1.inst12.public.com</address></public_addresses>\n <private_addresses><address
105
+ type='hostname'>img1.inst12.private.com</address></private_addresses>\n <storage_volumes></storage_volumes>\n
106
+ \ <authentication type='key'>\n </authentication>\n</instance>\n"
107
+ http_version:
108
+ recorded_at: Wed, 06 Mar 2013 08:56:17 GMT
109
+ - request:
110
+ method: get
111
+ uri: http://localhost:3001/api/instances/inst12
112
+ body:
113
+ encoding: US-ASCII
114
+ string: ''
115
+ headers:
116
+ Accept:
117
+ - application/xml
118
+ Authorization:
119
+ - Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
120
+ User-Agent:
121
+ - Faraday v0.8.6
122
+ response:
123
+ status:
124
+ code: 200
125
+ message:
126
+ headers:
127
+ content-type:
128
+ - application/xml
129
+ x-backend-runtime:
130
+ - '0.0014603137969970703'
131
+ server:
132
+ - Apache-DeltacloudVM/1.1.1
133
+ x-deltacloud-driver:
134
+ - mock
135
+ content-length:
136
+ - '1173'
137
+ x-content-type-options:
138
+ - nosniff
139
+ etag:
140
+ - cfc0f8b702e021b8e93e29504c3c401c
141
+ cache-control:
142
+ - max-age=0, private, must-revalidate
143
+ date:
144
+ - Wed, 06 Mar 2013 08:56:17 GMT
145
+ connection:
146
+ - close
147
+ body:
148
+ encoding: US-ASCII
149
+ string: ! "<?xml version='1.0' encoding='utf-8' ?>\n<instance href='http://localhost:3001/api/instances/inst12'
150
+ id='inst12'>\n <name>i-1362560177</name>\n <owner_id>mockuser</owner_id>\n
151
+ \ <image href='http://localhost:3001/api/images/img1' id='img1'></image>\n
152
+ \ <realm href='http://localhost:3001/api/realms/us' id='us'></realm>\n <state>STOPPED</state>\n
153
+ \ <hardware_profile href='http://localhost:3001/api/hardware_profiles/m1-small'
154
+ id='m1-small'>\n </hardware_profile>\n <actions>\n <link href='http://localhost:3001/api/instances/inst12/start'
155
+ method='post' rel='start' />\n <link href='http://localhost:3001/api/instances/inst12'
156
+ method='delete' rel='destroy' />\n <link href='http://localhost:3001/api/instances/inst12/run;id=inst12'
157
+ method='post' rel='run' />\n <link href='http://localhost:3001/api/images;instance_id=inst12'
158
+ method='post' rel='create_image' />\n </actions>\n <public_addresses><address
159
+ type='hostname'>img1.inst12.public.com</address></public_addresses>\n <private_addresses><address
160
+ type='hostname'>img1.inst12.private.com</address></private_addresses>\n <storage_volumes></storage_volumes>\n
161
+ \ <authentication type='key'>\n </authentication>\n</instance>\n"
162
+ http_version:
163
+ recorded_at: Wed, 06 Mar 2013 08:56:17 GMT
164
+ - request:
165
+ method: delete
166
+ uri: http://localhost:3001/api/instances/inst12
167
+ body:
168
+ encoding: US-ASCII
169
+ string: ''
170
+ headers:
171
+ Accept:
172
+ - application/xml
173
+ Authorization:
174
+ - Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
175
+ User-Agent:
176
+ - Faraday v0.8.6
177
+ response:
178
+ status:
179
+ code: 204
180
+ message:
181
+ headers:
182
+ x-backend-runtime:
183
+ - '0.0002741813659667969'
184
+ server:
185
+ - Apache-DeltacloudVM/1.1.1
186
+ x-deltacloud-driver:
187
+ - mock
188
+ x-content-type-options:
189
+ - nosniff
190
+ date:
191
+ - Wed, 06 Mar 2013 08:56:17 GMT
192
+ connection:
193
+ - close
194
+ body:
195
+ encoding: US-ASCII
196
+ string: ''
197
+ http_version:
198
+ recorded_at: Wed, 06 Mar 2013 08:56:17 GMT
199
+ - request:
200
+ method: get
201
+ uri: http://localhost:3001/api/instances/inst13
202
+ body:
203
+ encoding: US-ASCII
204
+ string: ''
205
+ headers:
206
+ Accept:
207
+ - application/xml
208
+ Authorization:
209
+ - Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
210
+ User-Agent:
211
+ - Faraday v0.8.6
212
+ response:
213
+ status:
214
+ code: 200
215
+ message:
216
+ headers:
217
+ content-type:
218
+ - application/xml
219
+ x-backend-runtime:
220
+ - '0.0006051063537597656'
221
+ server:
222
+ - Apache-DeltacloudVM/1.1.1
223
+ x-deltacloud-driver:
224
+ - mock
225
+ content-length:
226
+ - '1173'
227
+ x-content-type-options:
228
+ - nosniff
229
+ etag:
230
+ - 6ec7c01758e348e28df8260a21e38f23
231
+ cache-control:
232
+ - max-age=0, private, must-revalidate
233
+ date:
234
+ - Wed, 06 Mar 2013 08:56:17 GMT
235
+ connection:
236
+ - close
237
+ body:
238
+ encoding: US-ASCII
239
+ string: ! "<?xml version='1.0' encoding='utf-8' ?>\n<instance href='http://localhost:3001/api/instances/inst13'
240
+ id='inst13'>\n <name>i-1362560177</name>\n <owner_id>mockuser</owner_id>\n
241
+ \ <image href='http://localhost:3001/api/images/img1' id='img1'></image>\n
242
+ \ <realm href='http://localhost:3001/api/realms/us' id='us'></realm>\n <state>STOPPED</state>\n
243
+ \ <hardware_profile href='http://localhost:3001/api/hardware_profiles/m1-small'
244
+ id='m1-small'>\n </hardware_profile>\n <actions>\n <link href='http://localhost:3001/api/instances/inst13/start'
245
+ method='post' rel='start' />\n <link href='http://localhost:3001/api/instances/inst13'
246
+ method='delete' rel='destroy' />\n <link href='http://localhost:3001/api/instances/inst13/run;id=inst13'
247
+ method='post' rel='run' />\n <link href='http://localhost:3001/api/images;instance_id=inst13'
248
+ method='post' rel='create_image' />\n </actions>\n <public_addresses><address
249
+ type='hostname'>img1.inst13.public.com</address></public_addresses>\n <private_addresses><address
250
+ type='hostname'>img1.inst13.private.com</address></private_addresses>\n <storage_volumes></storage_volumes>\n
251
+ \ <authentication type='key'>\n </authentication>\n</instance>\n"
252
+ http_version:
253
+ recorded_at: Wed, 06 Mar 2013 08:56:17 GMT
254
+ - request:
255
+ method: delete
256
+ uri: http://localhost:3001/api/instances/inst13
257
+ body:
258
+ encoding: US-ASCII
259
+ string: ''
260
+ headers:
261
+ Accept:
262
+ - application/xml
263
+ Authorization:
264
+ - Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
265
+ User-Agent:
266
+ - Faraday v0.8.6
267
+ response:
268
+ status:
269
+ code: 204
270
+ message:
271
+ headers:
272
+ x-backend-runtime:
273
+ - '0.00011873245239257812'
274
+ server:
275
+ - Apache-DeltacloudVM/1.1.1
276
+ x-deltacloud-driver:
277
+ - mock
278
+ x-content-type-options:
279
+ - nosniff
280
+ date:
281
+ - Wed, 06 Mar 2013 08:56:18 GMT
282
+ connection:
283
+ - close
284
+ body:
285
+ encoding: US-ASCII
286
+ string: ''
287
+ http_version:
288
+ recorded_at: Wed, 06 Mar 2013 08:56:18 GMT
289
+ - request:
290
+ method: get
291
+ uri: http://localhost:3001/api/instances/inst14
292
+ body:
293
+ encoding: US-ASCII
294
+ string: ''
295
+ headers:
296
+ Accept:
297
+ - application/xml
298
+ Authorization:
299
+ - Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
300
+ User-Agent:
301
+ - Faraday v0.8.6
302
+ response:
303
+ status:
304
+ code: 200
305
+ message:
306
+ headers:
307
+ content-type:
308
+ - application/xml
309
+ x-backend-runtime:
310
+ - '0.0006017684936523438'
311
+ server:
312
+ - Apache-DeltacloudVM/1.1.1
313
+ x-deltacloud-driver:
314
+ - mock
315
+ content-length:
316
+ - '1175'
317
+ x-content-type-options:
318
+ - nosniff
319
+ etag:
320
+ - 846e96034593a904f856ed5c0ef1ba97
321
+ cache-control:
322
+ - max-age=0, private, must-revalidate
323
+ date:
324
+ - Wed, 06 Mar 2013 08:56:18 GMT
325
+ connection:
326
+ - close
327
+ body:
328
+ encoding: US-ASCII
329
+ string: ! "<?xml version='1.0' encoding='utf-8' ?>\n<instance href='http://localhost:3001/api/instances/inst14'
330
+ id='inst14'>\n <name>i-1362560178</name>\n <owner_id>mockuser</owner_id>\n
331
+ \ <image href='http://localhost:3001/api/images/img1' id='img1'></image>\n
332
+ \ <realm href='http://localhost:3001/api/realms/us' id='us'></realm>\n <state>RUNNING</state>\n
333
+ \ <hardware_profile href='http://localhost:3001/api/hardware_profiles/m1-small'
334
+ id='m1-small'>\n </hardware_profile>\n <actions>\n <link href='http://localhost:3001/api/instances/inst14/reboot'
335
+ method='post' rel='reboot' />\n <link href='http://localhost:3001/api/instances/inst14/stop'
336
+ method='post' rel='stop' />\n <link href='http://localhost:3001/api/instances/inst14/run;id=inst14'
337
+ method='post' rel='run' />\n <link href='http://localhost:3001/api/images;instance_id=inst14'
338
+ method='post' rel='create_image' />\n </actions>\n <public_addresses><address
339
+ type='hostname'>img1.inst14.public.com</address></public_addresses>\n <private_addresses><address
340
+ type='hostname'>img1.inst14.private.com</address></private_addresses>\n <storage_volumes></storage_volumes>\n
341
+ \ <authentication type='key'>\n </authentication>\n</instance>\n"
342
+ http_version:
343
+ recorded_at: Wed, 06 Mar 2013 08:56:18 GMT
344
+ - request:
345
+ method: post
346
+ uri: http://localhost:3001/api/instances/inst14/stop
347
+ body:
348
+ encoding: US-ASCII
349
+ string: ''
350
+ headers:
351
+ Accept:
352
+ - application/xml
353
+ Authorization:
354
+ - Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
355
+ User-Agent:
356
+ - Faraday v0.8.6
357
+ response:
358
+ status:
359
+ code: 202
360
+ message:
361
+ headers:
362
+ content-type:
363
+ - application/xml
364
+ x-backend-runtime:
365
+ - '0.0015385150909423828'
366
+ server:
367
+ - Apache-DeltacloudVM/1.1.1
368
+ x-deltacloud-driver:
369
+ - mock
370
+ content-length:
371
+ - '1173'
372
+ x-content-type-options:
373
+ - nosniff
374
+ date:
375
+ - Wed, 06 Mar 2013 08:56:18 GMT
376
+ connection:
377
+ - close
378
+ body:
379
+ encoding: US-ASCII
380
+ string: ! "<?xml version='1.0' encoding='utf-8' ?>\n<instance href='http://localhost:3001/api/instances/inst14'
381
+ id='inst14'>\n <name>i-1362560178</name>\n <owner_id>mockuser</owner_id>\n
382
+ \ <image href='http://localhost:3001/api/images/img1' id='img1'></image>\n
383
+ \ <realm href='http://localhost:3001/api/realms/us' id='us'></realm>\n <state>STOPPED</state>\n
384
+ \ <hardware_profile href='http://localhost:3001/api/hardware_profiles/m1-small'
385
+ id='m1-small'>\n </hardware_profile>\n <actions>\n <link href='http://localhost:3001/api/instances/inst14/start'
386
+ method='post' rel='start' />\n <link href='http://localhost:3001/api/instances/inst14'
387
+ method='delete' rel='destroy' />\n <link href='http://localhost:3001/api/instances/inst14/run;id=inst14'
388
+ method='post' rel='run' />\n <link href='http://localhost:3001/api/images;instance_id=inst14'
389
+ method='post' rel='create_image' />\n </actions>\n <public_addresses><address
390
+ type='hostname'>img1.inst14.public.com</address></public_addresses>\n <private_addresses><address
391
+ type='hostname'>img1.inst14.private.com</address></private_addresses>\n <storage_volumes></storage_volumes>\n
392
+ \ <authentication type='key'>\n </authentication>\n</instance>\n"
393
+ http_version:
394
+ recorded_at: Wed, 06 Mar 2013 08:56:18 GMT
395
+ - request:
396
+ method: get
397
+ uri: http://localhost:3001/api/instances/inst14
398
+ body:
399
+ encoding: US-ASCII
400
+ string: ''
401
+ headers:
402
+ Accept:
403
+ - application/xml
404
+ Authorization:
405
+ - Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
406
+ User-Agent:
407
+ - Faraday v0.8.6
408
+ response:
409
+ status:
410
+ code: 200
411
+ message:
412
+ headers:
413
+ content-type:
414
+ - application/xml
415
+ x-backend-runtime:
416
+ - '0.0008783340454101562'
417
+ server:
418
+ - Apache-DeltacloudVM/1.1.1
419
+ x-deltacloud-driver:
420
+ - mock
421
+ content-length:
422
+ - '1173'
423
+ x-content-type-options:
424
+ - nosniff
425
+ etag:
426
+ - 54d0a41fbd97cc4f1148c50786e26996
427
+ cache-control:
428
+ - max-age=0, private, must-revalidate
429
+ date:
430
+ - Wed, 06 Mar 2013 08:56:18 GMT
431
+ connection:
432
+ - close
433
+ body:
434
+ encoding: US-ASCII
435
+ string: ! "<?xml version='1.0' encoding='utf-8' ?>\n<instance href='http://localhost:3001/api/instances/inst14'
436
+ id='inst14'>\n <name>i-1362560178</name>\n <owner_id>mockuser</owner_id>\n
437
+ \ <image href='http://localhost:3001/api/images/img1' id='img1'></image>\n
438
+ \ <realm href='http://localhost:3001/api/realms/us' id='us'></realm>\n <state>STOPPED</state>\n
439
+ \ <hardware_profile href='http://localhost:3001/api/hardware_profiles/m1-small'
440
+ id='m1-small'>\n </hardware_profile>\n <actions>\n <link href='http://localhost:3001/api/instances/inst14/start'
441
+ method='post' rel='start' />\n <link href='http://localhost:3001/api/instances/inst14'
442
+ method='delete' rel='destroy' />\n <link href='http://localhost:3001/api/instances/inst14/run;id=inst14'
443
+ method='post' rel='run' />\n <link href='http://localhost:3001/api/images;instance_id=inst14'
444
+ method='post' rel='create_image' />\n </actions>\n <public_addresses><address
445
+ type='hostname'>img1.inst14.public.com</address></public_addresses>\n <private_addresses><address
446
+ type='hostname'>img1.inst14.private.com</address></private_addresses>\n <storage_volumes></storage_volumes>\n
447
+ \ <authentication type='key'>\n </authentication>\n</instance>\n"
448
+ http_version:
449
+ recorded_at: Wed, 06 Mar 2013 08:56:18 GMT
450
+ - request:
451
+ method: delete
452
+ uri: http://localhost:3001/api/instances/inst14
453
+ body:
454
+ encoding: US-ASCII
455
+ string: ''
456
+ headers:
457
+ Accept:
458
+ - application/xml
459
+ Authorization:
460
+ - Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
461
+ User-Agent:
462
+ - Faraday v0.8.6
463
+ response:
464
+ status:
465
+ code: 204
466
+ message:
467
+ headers:
468
+ x-backend-runtime:
469
+ - '0.0003466606140136719'
470
+ server:
471
+ - Apache-DeltacloudVM/1.1.1
472
+ x-deltacloud-driver:
473
+ - mock
474
+ x-content-type-options:
475
+ - nosniff
476
+ date:
477
+ - Wed, 06 Mar 2013 08:56:18 GMT
478
+ connection:
479
+ - close
480
+ body:
481
+ encoding: US-ASCII
482
+ string: ''
483
+ http_version:
484
+ recorded_at: Wed, 06 Mar 2013 08:56:18 GMT
485
+ - request:
486
+ method: get
487
+ uri: http://localhost:3001/api/instances/inst15
488
+ body:
489
+ encoding: US-ASCII
490
+ string: ''
491
+ headers:
492
+ Accept:
493
+ - application/xml
494
+ Authorization:
495
+ - Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
496
+ User-Agent:
497
+ - Faraday v0.8.6
498
+ response:
499
+ status:
500
+ code: 200
501
+ message:
502
+ headers:
503
+ content-type:
504
+ - application/xml
505
+ x-backend-runtime:
506
+ - '0.0005993843078613281'
507
+ server:
508
+ - Apache-DeltacloudVM/1.1.1
509
+ x-deltacloud-driver:
510
+ - mock
511
+ content-length:
512
+ - '1175'
513
+ x-content-type-options:
514
+ - nosniff
515
+ etag:
516
+ - a5154912c43a70a5f96dc590a26784d4
517
+ cache-control:
518
+ - max-age=0, private, must-revalidate
519
+ date:
520
+ - Wed, 06 Mar 2013 08:56:18 GMT
521
+ connection:
522
+ - close
523
+ body:
524
+ encoding: US-ASCII
525
+ string: ! "<?xml version='1.0' encoding='utf-8' ?>\n<instance href='http://localhost:3001/api/instances/inst15'
526
+ id='inst15'>\n <name>i-1362560178</name>\n <owner_id>mockuser</owner_id>\n
527
+ \ <image href='http://localhost:3001/api/images/img1' id='img1'></image>\n
528
+ \ <realm href='http://localhost:3001/api/realms/us' id='us'></realm>\n <state>RUNNING</state>\n
529
+ \ <hardware_profile href='http://localhost:3001/api/hardware_profiles/m1-large'
530
+ id='m1-large'>\n </hardware_profile>\n <actions>\n <link href='http://localhost:3001/api/instances/inst15/reboot'
531
+ method='post' rel='reboot' />\n <link href='http://localhost:3001/api/instances/inst15/stop'
532
+ method='post' rel='stop' />\n <link href='http://localhost:3001/api/instances/inst15/run;id=inst15'
533
+ method='post' rel='run' />\n <link href='http://localhost:3001/api/images;instance_id=inst15'
534
+ method='post' rel='create_image' />\n </actions>\n <public_addresses><address
535
+ type='hostname'>img1.inst15.public.com</address></public_addresses>\n <private_addresses><address
536
+ type='hostname'>img1.inst15.private.com</address></private_addresses>\n <storage_volumes></storage_volumes>\n
537
+ \ <authentication type='key'>\n </authentication>\n</instance>\n"
538
+ http_version:
539
+ recorded_at: Wed, 06 Mar 2013 08:56:18 GMT
540
+ - request:
541
+ method: post
542
+ uri: http://localhost:3001/api/instances/inst15/stop
543
+ body:
544
+ encoding: US-ASCII
545
+ string: ''
546
+ headers:
547
+ Accept:
548
+ - application/xml
549
+ Authorization:
550
+ - Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
551
+ User-Agent:
552
+ - Faraday v0.8.6
553
+ response:
554
+ status:
555
+ code: 202
556
+ message:
557
+ headers:
558
+ content-type:
559
+ - application/xml
560
+ x-backend-runtime:
561
+ - '0.002899169921875'
562
+ server:
563
+ - Apache-DeltacloudVM/1.1.1
564
+ x-deltacloud-driver:
565
+ - mock
566
+ content-length:
567
+ - '1173'
568
+ x-content-type-options:
569
+ - nosniff
570
+ date:
571
+ - Wed, 06 Mar 2013 08:56:18 GMT
572
+ connection:
573
+ - close
574
+ body:
575
+ encoding: US-ASCII
576
+ string: ! "<?xml version='1.0' encoding='utf-8' ?>\n<instance href='http://localhost:3001/api/instances/inst15'
577
+ id='inst15'>\n <name>i-1362560178</name>\n <owner_id>mockuser</owner_id>\n
578
+ \ <image href='http://localhost:3001/api/images/img1' id='img1'></image>\n
579
+ \ <realm href='http://localhost:3001/api/realms/us' id='us'></realm>\n <state>STOPPED</state>\n
580
+ \ <hardware_profile href='http://localhost:3001/api/hardware_profiles/m1-large'
581
+ id='m1-large'>\n </hardware_profile>\n <actions>\n <link href='http://localhost:3001/api/instances/inst15/start'
582
+ method='post' rel='start' />\n <link href='http://localhost:3001/api/instances/inst15'
583
+ method='delete' rel='destroy' />\n <link href='http://localhost:3001/api/instances/inst15/run;id=inst15'
584
+ method='post' rel='run' />\n <link href='http://localhost:3001/api/images;instance_id=inst15'
585
+ method='post' rel='create_image' />\n </actions>\n <public_addresses><address
586
+ type='hostname'>img1.inst15.public.com</address></public_addresses>\n <private_addresses><address
587
+ type='hostname'>img1.inst15.private.com</address></private_addresses>\n <storage_volumes></storage_volumes>\n
588
+ \ <authentication type='key'>\n </authentication>\n</instance>\n"
589
+ http_version:
590
+ recorded_at: Wed, 06 Mar 2013 08:56:18 GMT
591
+ - request:
592
+ method: get
593
+ uri: http://localhost:3001/api/instances/inst15
594
+ body:
595
+ encoding: US-ASCII
596
+ string: ''
597
+ headers:
598
+ Accept:
599
+ - application/xml
600
+ Authorization:
601
+ - Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
602
+ User-Agent:
603
+ - Faraday v0.8.6
604
+ response:
605
+ status:
606
+ code: 200
607
+ message:
608
+ headers:
609
+ content-type:
610
+ - application/xml
611
+ x-backend-runtime:
612
+ - '0.0008769035339355469'
613
+ server:
614
+ - Apache-DeltacloudVM/1.1.1
615
+ x-deltacloud-driver:
616
+ - mock
617
+ content-length:
618
+ - '1173'
619
+ x-content-type-options:
620
+ - nosniff
621
+ etag:
622
+ - e26f940538d1f016eca99e233ada5800
623
+ cache-control:
624
+ - max-age=0, private, must-revalidate
625
+ date:
626
+ - Wed, 06 Mar 2013 08:56:18 GMT
627
+ connection:
628
+ - close
629
+ body:
630
+ encoding: US-ASCII
631
+ string: ! "<?xml version='1.0' encoding='utf-8' ?>\n<instance href='http://localhost:3001/api/instances/inst15'
632
+ id='inst15'>\n <name>i-1362560178</name>\n <owner_id>mockuser</owner_id>\n
633
+ \ <image href='http://localhost:3001/api/images/img1' id='img1'></image>\n
634
+ \ <realm href='http://localhost:3001/api/realms/us' id='us'></realm>\n <state>STOPPED</state>\n
635
+ \ <hardware_profile href='http://localhost:3001/api/hardware_profiles/m1-large'
636
+ id='m1-large'>\n </hardware_profile>\n <actions>\n <link href='http://localhost:3001/api/instances/inst15/start'
637
+ method='post' rel='start' />\n <link href='http://localhost:3001/api/instances/inst15'
638
+ method='delete' rel='destroy' />\n <link href='http://localhost:3001/api/instances/inst15/run;id=inst15'
639
+ method='post' rel='run' />\n <link href='http://localhost:3001/api/images;instance_id=inst15'
640
+ method='post' rel='create_image' />\n </actions>\n <public_addresses><address
641
+ type='hostname'>img1.inst15.public.com</address></public_addresses>\n <private_addresses><address
642
+ type='hostname'>img1.inst15.private.com</address></private_addresses>\n <storage_volumes></storage_volumes>\n
643
+ \ <authentication type='key'>\n </authentication>\n</instance>\n"
644
+ http_version:
645
+ recorded_at: Wed, 06 Mar 2013 08:56:18 GMT
646
+ - request:
647
+ method: delete
648
+ uri: http://localhost:3001/api/instances/inst15
649
+ body:
650
+ encoding: US-ASCII
651
+ string: ''
652
+ headers:
653
+ Accept:
654
+ - application/xml
655
+ Authorization:
656
+ - Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
657
+ User-Agent:
658
+ - Faraday v0.8.6
659
+ response:
660
+ status:
661
+ code: 204
662
+ message:
663
+ headers:
664
+ x-backend-runtime:
665
+ - '0.00020003318786621094'
666
+ server:
667
+ - Apache-DeltacloudVM/1.1.1
668
+ x-deltacloud-driver:
669
+ - mock
670
+ x-content-type-options:
671
+ - nosniff
672
+ date:
673
+ - Wed, 06 Mar 2013 08:56:18 GMT
674
+ connection:
675
+ - close
676
+ body:
677
+ encoding: US-ASCII
678
+ string: ''
679
+ http_version:
680
+ recorded_at: Wed, 06 Mar 2013 08:56:18 GMT
681
+ recorded_with: VCR 2.4.0