deltacloud-client 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +73 -0
- data/Rakefile +88 -5
- data/lib/deltacloud/client.rb +79 -0
- data/lib/deltacloud/client/base_error.rb +80 -0
- data/lib/deltacloud/client/connection.rb +139 -0
- data/lib/deltacloud/client/helpers/model_helper.rb +69 -0
- data/lib/deltacloud/client/helpers/property_helper.rb +103 -0
- data/lib/deltacloud/client/helpers/xml_helper.rb +33 -0
- data/lib/deltacloud/client/methods.rb +33 -0
- data/lib/deltacloud/client/methods/address.rb +67 -0
- data/lib/deltacloud/client/methods/api.rb +96 -0
- data/lib/deltacloud/client/methods/backward_compatiblity.rb +72 -0
- data/lib/deltacloud/client/methods/blob.rb +91 -0
- data/lib/deltacloud/client/methods/bucket.rb +55 -0
- data/lib/deltacloud/client/methods/common.rb +46 -0
- data/lib/deltacloud/client/methods/driver.rb +53 -0
- data/lib/deltacloud/client/methods/firewall.rb +67 -0
- data/lib/deltacloud/client/methods/hardware_profile.rb +41 -0
- data/lib/deltacloud/client/methods/image.rb +61 -0
- data/lib/deltacloud/client/methods/instance.rb +141 -0
- data/lib/deltacloud/client/methods/instance_state.rb +41 -0
- data/lib/deltacloud/client/methods/key.rb +58 -0
- data/lib/deltacloud/client/methods/load_balancer.rb +96 -0
- data/lib/deltacloud/client/methods/metric.rb +54 -0
- data/lib/deltacloud/client/methods/realm.rb +42 -0
- data/lib/deltacloud/client/methods/storage_snapshot.rb +61 -0
- data/lib/deltacloud/client/methods/storage_volume.rb +94 -0
- data/lib/deltacloud/client/models.rb +32 -0
- data/lib/deltacloud/client/models/address.rb +57 -0
- data/lib/deltacloud/client/models/base.rb +153 -0
- data/lib/deltacloud/client/models/blob.rb +56 -0
- data/lib/deltacloud/client/models/bucket.rb +65 -0
- data/lib/deltacloud/client/models/driver.rb +87 -0
- data/lib/deltacloud/client/models/firewall.rb +64 -0
- data/lib/deltacloud/client/models/hardware_profile.rb +68 -0
- data/lib/deltacloud/client/models/image.rb +60 -0
- data/lib/deltacloud/client/models/instance.rb +142 -0
- data/lib/deltacloud/client/models/instance_address.rb +40 -0
- data/lib/{instance_state.rb → deltacloud/client/models/instance_state.rb} +11 -3
- data/lib/deltacloud/client/models/key.rb +52 -0
- data/lib/deltacloud/client/models/load_balancer.rb +55 -0
- data/lib/deltacloud/client/models/metric.rb +72 -0
- data/lib/deltacloud/client/models/realm.rb +29 -0
- data/lib/deltacloud/client/models/storage_snapshot.rb +54 -0
- data/lib/deltacloud/client/models/storage_volume.rb +96 -0
- data/lib/deltacloud/core_ext.rb +19 -0
- data/lib/deltacloud/core_ext/element.rb +32 -0
- data/lib/deltacloud/core_ext/fixnum.rb +30 -0
- data/lib/deltacloud/core_ext/nil.rb +22 -0
- data/lib/{string.rb → deltacloud/core_ext/string.rb} +16 -26
- data/lib/deltacloud/error_response.rb +93 -0
- data/tests/client/client_test.rb +51 -0
- data/tests/client/connection_test.rb +77 -0
- data/tests/core_ext/element_test.rb +40 -0
- data/tests/core_ext/fixnum_test.rb +35 -0
- data/tests/core_ext/nil.rb +27 -0
- data/tests/core_ext/string_test.rb +47 -0
- data/tests/fixtures/instances_cleanup.yml +681 -0
- data/tests/fixtures/test_0001_connects_to_Deltacloud_API.yml +60 -0
- data/tests/fixtures/test_0001_support_cpu.yml +444 -0
- data/tests/fixtures/test_0001_support_original_body.yml +116 -0
- data/tests/fixtures/test_0001_supports_addresses.yml +178 -0
- data/tests/fixtures/test_0001_supports_api_host.yml +60 -0
- data/tests/fixtures/test_0001_supports_attached_.yml +282 -0
- data/tests/fixtures/test_0001_supports_blobs.yml +475 -0
- data/tests/fixtures/test_0001_supports_bucket.yml +200 -0
- data/tests/fixtures/test_0001_supports_buckets.yml +160 -0
- data/tests/fixtures/test_0001_supports_drivers.yml +202 -0
- data/tests/fixtures/test_0001_supports_firewalls.yml +399 -0
- data/tests/fixtures/test_0001_supports_hardware_profiles.yml +262 -0
- data/tests/fixtures/test_0001_supports_images.yml +224 -0
- data/tests/fixtures/test_0001_supports_instance_states.yml +156 -0
- data/tests/fixtures/test_0001_supports_instances.yml +486 -0
- data/tests/fixtures/test_0001_supports_keys.yml +198 -0
- data/tests/fixtures/test_0001_supports_path.yml +60 -0
- data/tests/fixtures/test_0001_supports_realms.yml +152 -0
- data/tests/fixtures/test_0001_supports_storage_snapshots.yml +164 -0
- data/tests/fixtures/test_0001_supports_storage_volumes.yml +176 -0
- data/tests/fixtures/test_0001_supports_to_get_providers.yml +410 -0
- data/tests/fixtures/test_0002_support_blob.yml +148 -0
- data/tests/fixtures/test_0002_support_instance_state.yml +204 -0
- data/tests/fixtures/test_0002_support_memory.yml +444 -0
- data/tests/fixtures/test_0002_support_on_Provider.yml +130 -0
- data/tests/fixtures/test_0002_supports_api_port.yml +60 -0
- data/tests/fixtures/test_0002_supports_api_uri.yml +60 -0
- data/tests/fixtures/test_0002_supports_driver.yml +219 -0
- data/tests/fixtures/test_0002_supports_extract_xml_body_using_faraday_connection.yml +117 -0
- data/tests/fixtures/test_0002_supports_filtering_addresses_by_id_param.yml +156 -0
- data/tests/fixtures/test_0002_supports_filtering_buckets_by_id_param.yml +156 -0
- data/tests/fixtures/test_0002_supports_filtering_firewalls_by_id_param.yml +207 -0
- data/tests/fixtures/test_0002_supports_filtering_hardware_profiles_by_id_param.yml +158 -0
- data/tests/fixtures/test_0002_supports_filtering_images_by_id_param.yml +165 -0
- data/tests/fixtures/test_0002_supports_filtering_instances_by_id_param.yml +164 -0
- data/tests/fixtures/test_0002_supports_filtering_keys_by_id_param.yml +178 -0
- data/tests/fixtures/test_0002_supports_filtering_realms_by_id.yml +104 -0
- data/tests/fixtures/test_0002_supports_filtering_storage_snapshots_by_id_param.yml +155 -0
- data/tests/fixtures/test_0002_supports_filtering_storage_volumes_by_id_param.yml +157 -0
- data/tests/fixtures/test_0002_supports_hardware_profiles.yml +262 -0
- data/tests/fixtures/test_0002_supports_is_compatible_.yml +116 -0
- data/tests/fixtures/test_0002_supports_snapshot_.yml +202 -0
- data/tests/fixtures/test_0002_supports_version.yml +60 -0
- data/tests/fixtures/test_0003_caches_the_API_entrypoint.yml +60 -0
- data/tests/fixtures/test_0003_support_address.yml +197 -0
- data/tests/fixtures/test_0003_support_bucket.yml +198 -0
- data/tests/fixtures/test_0003_support_create_blob.yml +105 -0
- data/tests/fixtures/test_0003_support_create_blob_and_destroy_blob.yml +138 -0
- data/tests/fixtures/test_0003_support_firewall.yml +768 -0
- data/tests/fixtures/test_0003_support_hardware_profile.yml +199 -0
- data/tests/fixtures/test_0003_support_image.yml +207 -0
- data/tests/fixtures/test_0003_support_instance.yml +206 -0
- data/tests/fixtures/test_0003_support_key.yml +220 -0
- data/tests/fixtures/test_0003_support_realm.yml +195 -0
- data/tests/fixtures/test_0003_support_storage.yml +444 -0
- data/tests/fixtures/test_0003_support_storage_snapshot.yml +196 -0
- data/tests/fixtures/test_0003_support_storage_volume.yml +197 -0
- data/tests/fixtures/test_0003_support_to_change_driver_with_Client.yml +72 -0
- data/tests/fixtures/test_0003_supports_connect.yml +60 -0
- data/tests/fixtures/test_0003_supports_extract_xml_body_using_nokogiri_document.yml +117 -0
- data/tests/fixtures/test_0003_supports_instance.yml +396 -0
- data/tests/fixtures/test_0003_supports_is_compatible_.yml +116 -0
- data/tests/fixtures/test_0003_supports_lunch_image.yml +367 -0
- data/tests/fixtures/test_0003_supports_providers.yml +102 -0
- data/tests/fixtures/test_0003_supports_version.yml +60 -0
- data/tests/fixtures/test_0004_support_architecture.yml +444 -0
- data/tests/fixtures/test_0004_support_create_address.yml +197 -0
- data/tests/fixtures/test_0004_support_create_blob_and_destroy_blob_with_meta_params.yml +139 -0
- data/tests/fixtures/test_0004_support_create_bucket.yml +180 -0
- data/tests/fixtures/test_0004_support_create_bucket_and_destroy_bucket.yml +180 -0
- data/tests/fixtures/test_0004_support_create_firewall_and_destroy_firewall.yml +496 -0
- data/tests/fixtures/test_0004_support_create_image_and_destroy_image.yml +1527 -0
- data/tests/fixtures/test_0004_support_create_instance.yml +115 -0
- data/tests/fixtures/test_0004_support_create_key_and_destroy_key.yml +206 -0
- data/tests/fixtures/test_0004_support_create_volume.yml +105 -0
- data/tests/fixtures/test_0004_support_create_volume_and_destroy_volume.yml +181 -0
- data/tests/fixtures/test_0004_support_to_test_of_valid_DC_connection.yml +60 -0
- data/tests/fixtures/test_0004_supports_current_driver.yml +60 -0
- data/tests/fixtures/test_0004_supports_extract_xml_body_using_nokogiri_element.yml +117 -0
- data/tests/fixtures/test_0004_supports_lunch_image.yml +312 -0
- data/tests/fixtures/test_0004_supports_valid_credentials_.yml +215 -0
- data/tests/fixtures/test_0004_supports_with_config.yml +129 -0
- data/tests/fixtures/test_0005_support_attach_storage_volume.yml +102 -0
- data/tests/fixtures/test_0005_support_attach_storage_volume_and_detach_storage_volume.yml +142 -0
- data/tests/fixtures/test_0005_support_create_instance_with_hwp_id.yml +115 -0
- data/tests/fixtures/test_0005_support_opaque_.yml +152 -0
- data/tests/fixtures/test_0005_supports_current_provider.yml +134 -0
- data/tests/fixtures/test_0005_supports_id.yml +116 -0
- data/tests/fixtures/test_0005_supports_switching_drivers_per_instance.yml +129 -0
- data/tests/fixtures/test_0005_supports_use_driver.yml +60 -0
- data/tests/fixtures/test_0006_support_create_instance_with_realm_id.yml +115 -0
- data/tests/fixtures/test_0006_supports_discovered_.yml +60 -0
- data/tests/fixtures/test_0006_supports_supported_collections.yml +60 -0
- data/tests/fixtures/test_0006_supports_switching_providers_per_instance.yml +208 -0
- data/tests/fixtures/test_0007_support_create_instance_with_name.yml +115 -0
- data/tests/fixtures/test_0007_support_switching_provider_without_credentials.yml +208 -0
- data/tests/fixtures/test_0007_supports_support_.yml +60 -0
- data/tests/fixtures/test_0007_supports_valid_credentials_on_class.yml +370 -0
- data/tests/fixtures/test_0008_support_stop_instance.yml +166 -0
- data/tests/fixtures/test_0008_supports_must_support_.yml +60 -0
- data/tests/fixtures/test_0009_support_start_instance.yml +217 -0
- data/tests/fixtures/test_0009_supports_features.yml +60 -0
- data/tests/fixtures/test_0010_support_reboot_instance.yml +166 -0
- data/tests/fixtures/test_0010_supports_feature_.yml +60 -0
- data/tests/helpers/model_test.rb +33 -0
- data/tests/helpers/xml_test.rb +56 -0
- data/tests/methods/address_test.rb +64 -0
- data/tests/methods/api_test.rb +97 -0
- data/tests/methods/backward_compatibility_test.rb +87 -0
- data/tests/methods/blob_test.rb +64 -0
- data/tests/methods/bucket_test.rb +62 -0
- data/tests/methods/driver_test.rb +48 -0
- data/tests/methods/firewall_test.rb +84 -0
- data/tests/methods/hardware_profile_test.rb +53 -0
- data/tests/methods/image_test.rb +64 -0
- data/tests/methods/instance_state_test.rb +43 -0
- data/tests/methods/instance_test.rb +126 -0
- data/tests/methods/key_test.rb +63 -0
- data/tests/methods/realm_test.rb +50 -0
- data/tests/methods/storage_snapshot_test.rb +53 -0
- data/tests/methods/storage_volume_test.rb +81 -0
- data/tests/models/blob_test.rb +40 -0
- data/tests/models/bucket_test.rb +37 -0
- data/tests/models/driver_test.rb +42 -0
- data/tests/models/hardware_profile_test.rb +80 -0
- data/tests/models/image_test.rb +65 -0
- data/tests/models/storage_volume_test.rb +52 -0
- data/tests/test_helper.rb +59 -11
- metadata +392 -41
- data/lib/base_object.rb +0 -386
- data/lib/client_bucket_methods.rb +0 -69
- data/lib/deltacloud.rb +0 -486
- data/lib/documentation.rb +0 -59
- data/lib/errors.rb +0 -140
- data/lib/hwp_properties.rb +0 -61
- data/tests/buckets_test.rb +0 -141
- data/tests/client_test.rb +0 -59
- data/tests/content_negotiation_test.rb +0 -127
- data/tests/errors_test.rb +0 -57
- data/tests/hardware_profiles_test.rb +0 -75
- data/tests/images_test.rb +0 -102
- data/tests/instance_states_test.rb +0 -66
- data/tests/instances_test.rb +0 -203
- data/tests/keys_test.rb +0 -81
- data/tests/realms_test.rb +0 -64
- data/tests/storage_snapshot_test.rb +0 -76
- data/tests/storage_volume_test.rb +0 -86
@@ -0,0 +1,60 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://localhost:3001/api
|
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
|
+
server:
|
24
|
+
- Apache-Deltacloud/1.1.1
|
25
|
+
x-deltacloud-driver:
|
26
|
+
- mock
|
27
|
+
content-length:
|
28
|
+
- '1368'
|
29
|
+
x-content-type-options:
|
30
|
+
- nosniff
|
31
|
+
etag:
|
32
|
+
- e43d25244dc2b8ce1da6fa91131507ee
|
33
|
+
cache-control:
|
34
|
+
- max-age=0, private, must-revalidate
|
35
|
+
date:
|
36
|
+
- Wed, 06 Mar 2013 08:56:16 GMT
|
37
|
+
connection:
|
38
|
+
- close
|
39
|
+
body:
|
40
|
+
encoding: US-ASCII
|
41
|
+
string: ! "<api driver='mock' version='1.1.1'>\n <link href='http://localhost:3001/api/instance_states'
|
42
|
+
rel='instance_states'>\n </link>\n <link href='http://localhost:3001/api/storage_volumes'
|
43
|
+
rel='storage_volumes'>\n </link>\n <link href='http://localhost:3001/api/metrics'
|
44
|
+
rel='metrics'>\n </link>\n <link href='http://localhost:3001/api/hardware_profiles'
|
45
|
+
rel='hardware_profiles'>\n </link>\n <link href='http://localhost:3001/api/instances'
|
46
|
+
rel='instances'>\n <feature name='metrics' rel='create'>\n <param
|
47
|
+
name='metrics' />\n </feature>\n <feature name='realm_filter' rel='index'>\n
|
48
|
+
\ <param name='realm_id' />\n </feature>\n <feature name='user_name'
|
49
|
+
rel='create'>\n <param name='name' />\n </feature>\n <feature name='authentication_key'
|
50
|
+
rel='create'>\n <param name='keyname' />\n </feature>\n </link>\n
|
51
|
+
\ <link href='http://localhost:3001/api/realms' rel='realms'>\n </link>\n
|
52
|
+
\ <link href='http://localhost:3001/api/storage_snapshots' rel='storage_snapshots'>\n
|
53
|
+
\ </link>\n <link href='http://localhost:3001/api/images' rel='images'>\n
|
54
|
+
\ </link>\n <link href='http://localhost:3001/api/addresses' rel='addresses'>\n
|
55
|
+
\ </link>\n <link href='http://localhost:3001/api/drivers' rel='drivers'>\n
|
56
|
+
\ </link>\n <link href='http://localhost:3001/api/buckets' rel='buckets'>\n
|
57
|
+
\ </link>\n <link href='http://localhost:3001/api/keys' rel='keys'>\n </link>\n</api>\n"
|
58
|
+
http_version:
|
59
|
+
recorded_at: Wed, 06 Mar 2013 08:56:16 GMT
|
60
|
+
recorded_with: VCR 2.4.0
|
@@ -0,0 +1,117 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://localhost:3001/api
|
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
|
+
server:
|
24
|
+
- Apache-Deltacloud/1.1.1
|
25
|
+
x-deltacloud-driver:
|
26
|
+
- mock
|
27
|
+
content-length:
|
28
|
+
- '1368'
|
29
|
+
x-content-type-options:
|
30
|
+
- nosniff
|
31
|
+
etag:
|
32
|
+
- e43d25244dc2b8ce1da6fa91131507ee
|
33
|
+
cache-control:
|
34
|
+
- max-age=0, private, must-revalidate
|
35
|
+
date:
|
36
|
+
- Wed, 06 Mar 2013 08:56:15 GMT
|
37
|
+
connection:
|
38
|
+
- close
|
39
|
+
body:
|
40
|
+
encoding: US-ASCII
|
41
|
+
string: ! "<api driver='mock' version='1.1.1'>\n <link href='http://localhost:3001/api/instance_states'
|
42
|
+
rel='instance_states'>\n </link>\n <link href='http://localhost:3001/api/storage_volumes'
|
43
|
+
rel='storage_volumes'>\n </link>\n <link href='http://localhost:3001/api/metrics'
|
44
|
+
rel='metrics'>\n </link>\n <link href='http://localhost:3001/api/hardware_profiles'
|
45
|
+
rel='hardware_profiles'>\n </link>\n <link href='http://localhost:3001/api/instances'
|
46
|
+
rel='instances'>\n <feature name='metrics' rel='create'>\n <param
|
47
|
+
name='metrics' />\n </feature>\n <feature name='realm_filter' rel='index'>\n
|
48
|
+
\ <param name='realm_id' />\n </feature>\n <feature name='user_name'
|
49
|
+
rel='create'>\n <param name='name' />\n </feature>\n <feature name='authentication_key'
|
50
|
+
rel='create'>\n <param name='keyname' />\n </feature>\n </link>\n
|
51
|
+
\ <link href='http://localhost:3001/api/realms' rel='realms'>\n </link>\n
|
52
|
+
\ <link href='http://localhost:3001/api/storage_snapshots' rel='storage_snapshots'>\n
|
53
|
+
\ </link>\n <link href='http://localhost:3001/api/images' rel='images'>\n
|
54
|
+
\ </link>\n <link href='http://localhost:3001/api/addresses' rel='addresses'>\n
|
55
|
+
\ </link>\n <link href='http://localhost:3001/api/drivers' rel='drivers'>\n
|
56
|
+
\ </link>\n <link href='http://localhost:3001/api/buckets' rel='buckets'>\n
|
57
|
+
\ </link>\n <link href='http://localhost:3001/api/keys' rel='keys'>\n </link>\n</api>\n"
|
58
|
+
http_version:
|
59
|
+
recorded_at: Wed, 06 Mar 2013 08:56:15 GMT
|
60
|
+
- request:
|
61
|
+
method: get
|
62
|
+
uri: http://localhost:3001/api
|
63
|
+
body:
|
64
|
+
encoding: US-ASCII
|
65
|
+
string: ''
|
66
|
+
headers:
|
67
|
+
Accept:
|
68
|
+
- application/xml
|
69
|
+
Authorization:
|
70
|
+
- Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
|
71
|
+
User-Agent:
|
72
|
+
- Faraday v0.8.6
|
73
|
+
response:
|
74
|
+
status:
|
75
|
+
code: 200
|
76
|
+
message:
|
77
|
+
headers:
|
78
|
+
content-type:
|
79
|
+
- application/xml
|
80
|
+
server:
|
81
|
+
- Apache-Deltacloud/1.1.1
|
82
|
+
x-deltacloud-driver:
|
83
|
+
- mock
|
84
|
+
content-length:
|
85
|
+
- '1368'
|
86
|
+
x-content-type-options:
|
87
|
+
- nosniff
|
88
|
+
etag:
|
89
|
+
- e43d25244dc2b8ce1da6fa91131507ee
|
90
|
+
cache-control:
|
91
|
+
- max-age=0, private, must-revalidate
|
92
|
+
date:
|
93
|
+
- Wed, 06 Mar 2013 08:56:15 GMT
|
94
|
+
connection:
|
95
|
+
- close
|
96
|
+
body:
|
97
|
+
encoding: US-ASCII
|
98
|
+
string: ! "<api driver='mock' version='1.1.1'>\n <link href='http://localhost:3001/api/instance_states'
|
99
|
+
rel='instance_states'>\n </link>\n <link href='http://localhost:3001/api/storage_volumes'
|
100
|
+
rel='storage_volumes'>\n </link>\n <link href='http://localhost:3001/api/metrics'
|
101
|
+
rel='metrics'>\n </link>\n <link href='http://localhost:3001/api/hardware_profiles'
|
102
|
+
rel='hardware_profiles'>\n </link>\n <link href='http://localhost:3001/api/instances'
|
103
|
+
rel='instances'>\n <feature name='metrics' rel='create'>\n <param
|
104
|
+
name='metrics' />\n </feature>\n <feature name='realm_filter' rel='index'>\n
|
105
|
+
\ <param name='realm_id' />\n </feature>\n <feature name='user_name'
|
106
|
+
rel='create'>\n <param name='name' />\n </feature>\n <feature name='authentication_key'
|
107
|
+
rel='create'>\n <param name='keyname' />\n </feature>\n </link>\n
|
108
|
+
\ <link href='http://localhost:3001/api/realms' rel='realms'>\n </link>\n
|
109
|
+
\ <link href='http://localhost:3001/api/storage_snapshots' rel='storage_snapshots'>\n
|
110
|
+
\ </link>\n <link href='http://localhost:3001/api/images' rel='images'>\n
|
111
|
+
\ </link>\n <link href='http://localhost:3001/api/addresses' rel='addresses'>\n
|
112
|
+
\ </link>\n <link href='http://localhost:3001/api/drivers' rel='drivers'>\n
|
113
|
+
\ </link>\n <link href='http://localhost:3001/api/buckets' rel='buckets'>\n
|
114
|
+
\ </link>\n <link href='http://localhost:3001/api/keys' rel='keys'>\n </link>\n</api>\n"
|
115
|
+
http_version:
|
116
|
+
recorded_at: Wed, 06 Mar 2013 08:56:15 GMT
|
117
|
+
recorded_with: VCR 2.4.0
|
@@ -0,0 +1,396 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://localhost:3001/api
|
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
|
+
server:
|
24
|
+
- Apache-Deltacloud/1.1.1
|
25
|
+
x-deltacloud-driver:
|
26
|
+
- mock
|
27
|
+
content-length:
|
28
|
+
- '1368'
|
29
|
+
x-content-type-options:
|
30
|
+
- nosniff
|
31
|
+
etag:
|
32
|
+
- e43d25244dc2b8ce1da6fa91131507ee
|
33
|
+
cache-control:
|
34
|
+
- max-age=0, private, must-revalidate
|
35
|
+
date:
|
36
|
+
- Wed, 06 Mar 2013 16:38:16 GMT
|
37
|
+
connection:
|
38
|
+
- close
|
39
|
+
body:
|
40
|
+
encoding: US-ASCII
|
41
|
+
string: ! "<api driver='mock' version='1.1.1'>\n <link href='http://localhost:3001/api/instance_states'
|
42
|
+
rel='instance_states'>\n </link>\n <link href='http://localhost:3001/api/storage_volumes'
|
43
|
+
rel='storage_volumes'>\n </link>\n <link href='http://localhost:3001/api/metrics'
|
44
|
+
rel='metrics'>\n </link>\n <link href='http://localhost:3001/api/hardware_profiles'
|
45
|
+
rel='hardware_profiles'>\n </link>\n <link href='http://localhost:3001/api/instances'
|
46
|
+
rel='instances'>\n <feature name='metrics' rel='create'>\n <param
|
47
|
+
name='metrics' />\n </feature>\n <feature name='realm_filter' rel='index'>\n
|
48
|
+
\ <param name='realm_id' />\n </feature>\n <feature name='user_name'
|
49
|
+
rel='create'>\n <param name='name' />\n </feature>\n <feature name='authentication_key'
|
50
|
+
rel='create'>\n <param name='keyname' />\n </feature>\n </link>\n
|
51
|
+
\ <link href='http://localhost:3001/api/realms' rel='realms'>\n </link>\n
|
52
|
+
\ <link href='http://localhost:3001/api/storage_snapshots' rel='storage_snapshots'>\n
|
53
|
+
\ </link>\n <link href='http://localhost:3001/api/images' rel='images'>\n
|
54
|
+
\ </link>\n <link href='http://localhost:3001/api/addresses' rel='addresses'>\n
|
55
|
+
\ </link>\n <link href='http://localhost:3001/api/drivers' rel='drivers'>\n
|
56
|
+
\ </link>\n <link href='http://localhost:3001/api/buckets' rel='buckets'>\n
|
57
|
+
\ </link>\n <link href='http://localhost:3001/api/keys' rel='keys'>\n </link>\n</api>\n"
|
58
|
+
http_version:
|
59
|
+
recorded_at: Wed, 06 Mar 2013 16:38:16 GMT
|
60
|
+
- request:
|
61
|
+
method: get
|
62
|
+
uri: http://localhost:3001/api/storage_volumes/vol2
|
63
|
+
body:
|
64
|
+
encoding: US-ASCII
|
65
|
+
string: ''
|
66
|
+
headers:
|
67
|
+
Accept:
|
68
|
+
- application/xml
|
69
|
+
Authorization:
|
70
|
+
- Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
|
71
|
+
User-Agent:
|
72
|
+
- Faraday v0.8.6
|
73
|
+
response:
|
74
|
+
status:
|
75
|
+
code: 200
|
76
|
+
message:
|
77
|
+
headers:
|
78
|
+
content-type:
|
79
|
+
- application/xml
|
80
|
+
x-backend-runtime:
|
81
|
+
- '0.0027179718017578125'
|
82
|
+
server:
|
83
|
+
- Apache-Deltacloud/1.1.1
|
84
|
+
x-deltacloud-driver:
|
85
|
+
- mock
|
86
|
+
content-length:
|
87
|
+
- '366'
|
88
|
+
x-content-type-options:
|
89
|
+
- nosniff
|
90
|
+
etag:
|
91
|
+
- 0db0b756867a44a42317b253f83f9a42
|
92
|
+
cache-control:
|
93
|
+
- max-age=0, private, must-revalidate
|
94
|
+
date:
|
95
|
+
- Wed, 06 Mar 2013 16:38:16 GMT
|
96
|
+
connection:
|
97
|
+
- close
|
98
|
+
body:
|
99
|
+
encoding: US-ASCII
|
100
|
+
string: ! "<?xml version='1.0' encoding='utf-8' ?>\n<storage_volume href='http://localhost:3001/api/storage_volumes/vol2'
|
101
|
+
id='vol2'>\n <created>Thu Jul 30 14:35:11 UTC 2009</created>\n <capacity
|
102
|
+
unit='GB'>1</capacity>\n <name>vol2</name>\n <realm href='http://localhost:3001/api/realms/us'
|
103
|
+
id='us'></realm>\n <realm_id>us</realm_id>\n <state>AVAILABLE</state>\n</storage_volume>\n"
|
104
|
+
http_version:
|
105
|
+
recorded_at: Wed, 06 Mar 2013 16:38:16 GMT
|
106
|
+
- request:
|
107
|
+
method: post
|
108
|
+
uri: http://localhost:3001/api/storage_volumes/vol2/attach?instance_id=inst1&device
|
109
|
+
body:
|
110
|
+
encoding: US-ASCII
|
111
|
+
string: ''
|
112
|
+
headers:
|
113
|
+
Accept:
|
114
|
+
- application/xml
|
115
|
+
Authorization:
|
116
|
+
- Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
|
117
|
+
User-Agent:
|
118
|
+
- Faraday v0.8.6
|
119
|
+
response:
|
120
|
+
status:
|
121
|
+
code: 202
|
122
|
+
message:
|
123
|
+
headers:
|
124
|
+
content-type:
|
125
|
+
- application/xml
|
126
|
+
server:
|
127
|
+
- Apache-Deltacloud/1.1.1
|
128
|
+
x-deltacloud-driver:
|
129
|
+
- mock
|
130
|
+
content-length:
|
131
|
+
- '470'
|
132
|
+
x-content-type-options:
|
133
|
+
- nosniff
|
134
|
+
date:
|
135
|
+
- Wed, 06 Mar 2013 16:38:16 GMT
|
136
|
+
connection:
|
137
|
+
- close
|
138
|
+
body:
|
139
|
+
encoding: US-ASCII
|
140
|
+
string: ! "<?xml version='1.0' encoding='utf-8' ?>\n<storage_volume href='http://localhost:3001/api/storage_volumes/vol2'
|
141
|
+
id='vol2'>\n <created>Thu Jul 30 14:35:11 UTC 2009</created>\n <capacity
|
142
|
+
unit='GB'>1</capacity>\n <name>vol2</name>\n <realm href='http://localhost:3001/api/realms/us'
|
143
|
+
id='us'></realm>\n <realm_id>us</realm_id>\n <state>IN-USE</state>\n <mount>\n
|
144
|
+
\ <instance href='http://localhost:3001/api/instances/inst1' id='inst1'></instance>\n
|
145
|
+
\ </mount>\n</storage_volume>\n"
|
146
|
+
http_version:
|
147
|
+
recorded_at: Wed, 06 Mar 2013 16:38:16 GMT
|
148
|
+
- request:
|
149
|
+
method: get
|
150
|
+
uri: http://localhost:3001/api/storage_volumes/vol2
|
151
|
+
body:
|
152
|
+
encoding: US-ASCII
|
153
|
+
string: ''
|
154
|
+
headers:
|
155
|
+
Accept:
|
156
|
+
- application/xml
|
157
|
+
Authorization:
|
158
|
+
- Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
|
159
|
+
User-Agent:
|
160
|
+
- Faraday v0.8.6
|
161
|
+
response:
|
162
|
+
status:
|
163
|
+
code: 200
|
164
|
+
message:
|
165
|
+
headers:
|
166
|
+
content-type:
|
167
|
+
- application/xml
|
168
|
+
x-backend-runtime:
|
169
|
+
- '0.0011837482452392578'
|
170
|
+
server:
|
171
|
+
- Apache-Deltacloud/1.1.1
|
172
|
+
x-deltacloud-driver:
|
173
|
+
- mock
|
174
|
+
content-length:
|
175
|
+
- '470'
|
176
|
+
x-content-type-options:
|
177
|
+
- nosniff
|
178
|
+
etag:
|
179
|
+
- c93b53b8de27b10168fa858ca4210443
|
180
|
+
cache-control:
|
181
|
+
- max-age=0, private, must-revalidate
|
182
|
+
date:
|
183
|
+
- Wed, 06 Mar 2013 16:38:16 GMT
|
184
|
+
connection:
|
185
|
+
- close
|
186
|
+
body:
|
187
|
+
encoding: US-ASCII
|
188
|
+
string: ! "<?xml version='1.0' encoding='utf-8' ?>\n<storage_volume href='http://localhost:3001/api/storage_volumes/vol2'
|
189
|
+
id='vol2'>\n <created>Thu Jul 30 14:35:11 UTC 2009</created>\n <capacity
|
190
|
+
unit='GB'>1</capacity>\n <name>vol2</name>\n <realm href='http://localhost:3001/api/realms/us'
|
191
|
+
id='us'></realm>\n <realm_id>us</realm_id>\n <state>IN-USE</state>\n <mount>\n
|
192
|
+
\ <instance href='http://localhost:3001/api/instances/inst1' id='inst1'></instance>\n
|
193
|
+
\ </mount>\n</storage_volume>\n"
|
194
|
+
http_version:
|
195
|
+
recorded_at: Wed, 06 Mar 2013 16:38:16 GMT
|
196
|
+
- request:
|
197
|
+
method: get
|
198
|
+
uri: http://localhost:3001/api/instances/inst1
|
199
|
+
body:
|
200
|
+
encoding: US-ASCII
|
201
|
+
string: ''
|
202
|
+
headers:
|
203
|
+
Accept:
|
204
|
+
- application/xml
|
205
|
+
Authorization:
|
206
|
+
- Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
|
207
|
+
User-Agent:
|
208
|
+
- Faraday v0.8.6
|
209
|
+
response:
|
210
|
+
status:
|
211
|
+
code: 200
|
212
|
+
message:
|
213
|
+
headers:
|
214
|
+
content-type:
|
215
|
+
- application/xml
|
216
|
+
x-backend-runtime:
|
217
|
+
- '0.0006213188171386719'
|
218
|
+
server:
|
219
|
+
- Apache-Deltacloud/1.1.1
|
220
|
+
x-deltacloud-driver:
|
221
|
+
- mock
|
222
|
+
content-length:
|
223
|
+
- '1365'
|
224
|
+
x-content-type-options:
|
225
|
+
- nosniff
|
226
|
+
etag:
|
227
|
+
- 7d8ea49a94358fd9cac586ae9a9f359c
|
228
|
+
cache-control:
|
229
|
+
- max-age=0, private, must-revalidate
|
230
|
+
date:
|
231
|
+
- Wed, 06 Mar 2013 16:38:33 GMT
|
232
|
+
connection:
|
233
|
+
- close
|
234
|
+
body:
|
235
|
+
encoding: US-ASCII
|
236
|
+
string: ! "<?xml version='1.0' encoding='utf-8' ?>\n<instance href='http://localhost:3001/api/instances/inst1'
|
237
|
+
id='inst1'>\n <name>MockUserInstance</name>\n <owner_id>mockuser</owner_id>\n
|
238
|
+
\ <image href='http://localhost:3001/api/images/img3' id='img3'></image>\n
|
239
|
+
\ <realm href='http://localhost:3001/api/realms/us' id='us'></realm>\n <state>RUNNING</state>\n
|
240
|
+
\ <hardware_profile href='http://localhost:3001/api/hardware_profiles/m1-small'
|
241
|
+
id='m1-small'>\n </hardware_profile>\n <actions>\n <link href='http://localhost:3001/api/instances/inst1/reboot'
|
242
|
+
method='post' rel='reboot' />\n <link href='http://localhost:3001/api/instances/inst1/stop'
|
243
|
+
method='post' rel='stop' />\n <link href='http://localhost:3001/api/instances/inst1/run;id=inst1'
|
244
|
+
method='post' rel='run' />\n <link href='http://localhost:3001/api/images;instance_id=inst1'
|
245
|
+
method='post' rel='create_image' />\n </actions>\n <public_addresses><address
|
246
|
+
type='hostname'>img1.inst1.public.com</address></public_addresses>\n <private_addresses><address
|
247
|
+
type='hostname'>img1.inst1.private.com</address></private_addresses>\n <storage_volumes><storage_volume
|
248
|
+
href='http://localhost:3001/api/storage_volumes/vol1' id='vol1'></storage_volume>\n<storage_volume
|
249
|
+
href='http://localhost:3001/api/storage_volumes/vol2' id='vol2'></storage_volume></storage_volumes>\n
|
250
|
+
\ <authentication type='key'>\n </authentication>\n</instance>\n"
|
251
|
+
http_version:
|
252
|
+
recorded_at: Wed, 06 Mar 2013 16:38:33 GMT
|
253
|
+
- request:
|
254
|
+
method: get
|
255
|
+
uri: http://localhost:3001/api/instances/inst1
|
256
|
+
body:
|
257
|
+
encoding: US-ASCII
|
258
|
+
string: ''
|
259
|
+
headers:
|
260
|
+
Accept:
|
261
|
+
- application/xml
|
262
|
+
Authorization:
|
263
|
+
- Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
|
264
|
+
User-Agent:
|
265
|
+
- Faraday v0.8.6
|
266
|
+
response:
|
267
|
+
status:
|
268
|
+
code: 200
|
269
|
+
message:
|
270
|
+
headers:
|
271
|
+
content-type:
|
272
|
+
- application/xml
|
273
|
+
x-backend-runtime:
|
274
|
+
- '0.001577615737915039'
|
275
|
+
server:
|
276
|
+
- Apache-Deltacloud/1.1.1
|
277
|
+
x-deltacloud-driver:
|
278
|
+
- mock
|
279
|
+
content-length:
|
280
|
+
- '1365'
|
281
|
+
x-content-type-options:
|
282
|
+
- nosniff
|
283
|
+
etag:
|
284
|
+
- 7d8ea49a94358fd9cac586ae9a9f359c
|
285
|
+
cache-control:
|
286
|
+
- max-age=0, private, must-revalidate
|
287
|
+
date:
|
288
|
+
- Wed, 06 Mar 2013 16:39:16 GMT
|
289
|
+
connection:
|
290
|
+
- close
|
291
|
+
body:
|
292
|
+
encoding: US-ASCII
|
293
|
+
string: ! "<?xml version='1.0' encoding='utf-8' ?>\n<instance href='http://localhost:3001/api/instances/inst1'
|
294
|
+
id='inst1'>\n <name>MockUserInstance</name>\n <owner_id>mockuser</owner_id>\n
|
295
|
+
\ <image href='http://localhost:3001/api/images/img3' id='img3'></image>\n
|
296
|
+
\ <realm href='http://localhost:3001/api/realms/us' id='us'></realm>\n <state>RUNNING</state>\n
|
297
|
+
\ <hardware_profile href='http://localhost:3001/api/hardware_profiles/m1-small'
|
298
|
+
id='m1-small'>\n </hardware_profile>\n <actions>\n <link href='http://localhost:3001/api/instances/inst1/reboot'
|
299
|
+
method='post' rel='reboot' />\n <link href='http://localhost:3001/api/instances/inst1/stop'
|
300
|
+
method='post' rel='stop' />\n <link href='http://localhost:3001/api/instances/inst1/run;id=inst1'
|
301
|
+
method='post' rel='run' />\n <link href='http://localhost:3001/api/images;instance_id=inst1'
|
302
|
+
method='post' rel='create_image' />\n </actions>\n <public_addresses><address
|
303
|
+
type='hostname'>img1.inst1.public.com</address></public_addresses>\n <private_addresses><address
|
304
|
+
type='hostname'>img1.inst1.private.com</address></private_addresses>\n <storage_volumes><storage_volume
|
305
|
+
href='http://localhost:3001/api/storage_volumes/vol1' id='vol1'></storage_volume>\n<storage_volume
|
306
|
+
href='http://localhost:3001/api/storage_volumes/vol2' id='vol2'></storage_volume></storage_volumes>\n
|
307
|
+
\ <authentication type='key'>\n </authentication>\n</instance>\n"
|
308
|
+
http_version:
|
309
|
+
recorded_at: Wed, 06 Mar 2013 16:39:16 GMT
|
310
|
+
- request:
|
311
|
+
method: post
|
312
|
+
uri: http://localhost:3001/api/storage_volumes/vol2/detach
|
313
|
+
body:
|
314
|
+
encoding: US-ASCII
|
315
|
+
string: ''
|
316
|
+
headers:
|
317
|
+
Accept:
|
318
|
+
- application/xml
|
319
|
+
Authorization:
|
320
|
+
- Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
|
321
|
+
User-Agent:
|
322
|
+
- Faraday v0.8.6
|
323
|
+
response:
|
324
|
+
status:
|
325
|
+
code: 202
|
326
|
+
message:
|
327
|
+
headers:
|
328
|
+
content-type:
|
329
|
+
- application/xml
|
330
|
+
server:
|
331
|
+
- Apache-Deltacloud/1.1.1
|
332
|
+
x-deltacloud-driver:
|
333
|
+
- mock
|
334
|
+
content-length:
|
335
|
+
- '366'
|
336
|
+
x-content-type-options:
|
337
|
+
- nosniff
|
338
|
+
date:
|
339
|
+
- Wed, 06 Mar 2013 16:39:42 GMT
|
340
|
+
connection:
|
341
|
+
- close
|
342
|
+
body:
|
343
|
+
encoding: US-ASCII
|
344
|
+
string: ! "<?xml version='1.0' encoding='utf-8' ?>\n<storage_volume href='http://localhost:3001/api/storage_volumes/vol2'
|
345
|
+
id='vol2'>\n <created>Thu Jul 30 14:35:11 UTC 2009</created>\n <capacity
|
346
|
+
unit='GB'>1</capacity>\n <name>vol2</name>\n <realm href='http://localhost:3001/api/realms/us'
|
347
|
+
id='us'></realm>\n <realm_id>us</realm_id>\n <state>AVAILABLE</state>\n</storage_volume>\n"
|
348
|
+
http_version:
|
349
|
+
recorded_at: Wed, 06 Mar 2013 16:39:42 GMT
|
350
|
+
- request:
|
351
|
+
method: get
|
352
|
+
uri: http://localhost:3001/api/storage_volumes/vol2
|
353
|
+
body:
|
354
|
+
encoding: US-ASCII
|
355
|
+
string: ''
|
356
|
+
headers:
|
357
|
+
Accept:
|
358
|
+
- application/xml
|
359
|
+
Authorization:
|
360
|
+
- Basic bW9ja3VzZXI6bW9ja3Bhc3N3b3Jk
|
361
|
+
User-Agent:
|
362
|
+
- Faraday v0.8.6
|
363
|
+
response:
|
364
|
+
status:
|
365
|
+
code: 200
|
366
|
+
message:
|
367
|
+
headers:
|
368
|
+
content-type:
|
369
|
+
- application/xml
|
370
|
+
x-backend-runtime:
|
371
|
+
- '0.0014853477478027344'
|
372
|
+
server:
|
373
|
+
- Apache-Deltacloud/1.1.1
|
374
|
+
x-deltacloud-driver:
|
375
|
+
- mock
|
376
|
+
content-length:
|
377
|
+
- '366'
|
378
|
+
x-content-type-options:
|
379
|
+
- nosniff
|
380
|
+
etag:
|
381
|
+
- 0db0b756867a44a42317b253f83f9a42
|
382
|
+
cache-control:
|
383
|
+
- max-age=0, private, must-revalidate
|
384
|
+
date:
|
385
|
+
- Wed, 06 Mar 2013 16:39:42 GMT
|
386
|
+
connection:
|
387
|
+
- close
|
388
|
+
body:
|
389
|
+
encoding: US-ASCII
|
390
|
+
string: ! "<?xml version='1.0' encoding='utf-8' ?>\n<storage_volume href='http://localhost:3001/api/storage_volumes/vol2'
|
391
|
+
id='vol2'>\n <created>Thu Jul 30 14:35:11 UTC 2009</created>\n <capacity
|
392
|
+
unit='GB'>1</capacity>\n <name>vol2</name>\n <realm href='http://localhost:3001/api/realms/us'
|
393
|
+
id='us'></realm>\n <realm_id>us</realm_id>\n <state>AVAILABLE</state>\n</storage_volume>\n"
|
394
|
+
http_version:
|
395
|
+
recorded_at: Wed, 06 Mar 2013 16:39:42 GMT
|
396
|
+
recorded_with: VCR 2.4.0
|