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,37 @@
|
|
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 Deltacloud::Client::StorageVolume do
|
19
|
+
|
20
|
+
before do
|
21
|
+
VCR.insert_cassette(__name__)
|
22
|
+
@client = new_client
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
VCR.eject_cassette
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'supports #blobs' do
|
30
|
+
b = @client.bucket('bucket1')
|
31
|
+
b.must_respond_to :blobs
|
32
|
+
b.blobs.wont_be_empty
|
33
|
+
b.blobs.first.must_be_instance_of Deltacloud::Client::Blob
|
34
|
+
end
|
35
|
+
|
36
|
+
|
37
|
+
end
|
@@ -0,0 +1,42 @@
|
|
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 Deltacloud::Client::Driver do
|
19
|
+
|
20
|
+
before do
|
21
|
+
VCR.insert_cassette(__name__)
|
22
|
+
@client = new_client
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
VCR.eject_cassette
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'supports #[] to get providers' do
|
30
|
+
@client.driver(:ec2).must_respond_to '[]'
|
31
|
+
@client.driver(:ec2)['eu-west-1'].wont_be_nil
|
32
|
+
@client.driver(:ec2)['eu-west-1'].must_be_instance_of Deltacloud::Client::Driver::Provider
|
33
|
+
@client.driver(:ec2)['eu-west-1'].entrypoints.wont_be_empty
|
34
|
+
@client.driver(:ec2)['foo'].must_be_nil
|
35
|
+
end
|
36
|
+
|
37
|
+
it 'support #[] on Provider' do
|
38
|
+
drv = @client.driver(:ec2)
|
39
|
+
drv['eu-west-1']['s3'].wont_be_empty
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
@@ -0,0 +1,80 @@
|
|
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 Deltacloud::Client::HardwareProfile do
|
19
|
+
|
20
|
+
before do
|
21
|
+
VCR.insert_cassette(__name__)
|
22
|
+
@client = new_client
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
VCR.eject_cassette
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'support #cpu' do
|
30
|
+
@client.hardware_profile('m1-small').must_respond_to :cpu
|
31
|
+
@client.hardware_profile('m1-small').cpu.wont_be_nil
|
32
|
+
@client.hardware_profile('m1-small').cpu.must_respond_to :default
|
33
|
+
@client.hardware_profile('m1-small').cpu.default.wont_be_empty
|
34
|
+
@client.hardware_profile('m1-small').cpu.must_respond_to :kind
|
35
|
+
@client.hardware_profile('m1-small').cpu.kind.wont_be_empty
|
36
|
+
@client.hardware_profile('m1-small').cpu.must_respond_to :unit
|
37
|
+
@client.hardware_profile('m1-small').cpu.unit.wont_be_empty
|
38
|
+
end
|
39
|
+
|
40
|
+
it 'support #memory' do
|
41
|
+
@client.hardware_profile('m1-small').must_respond_to :memory
|
42
|
+
@client.hardware_profile('m1-small').memory.wont_be_nil
|
43
|
+
@client.hardware_profile('m1-small').memory.must_respond_to :default
|
44
|
+
@client.hardware_profile('m1-small').memory.default.wont_be_empty
|
45
|
+
@client.hardware_profile('m1-small').memory.must_respond_to :kind
|
46
|
+
@client.hardware_profile('m1-small').memory.kind.wont_be_empty
|
47
|
+
@client.hardware_profile('m1-small').memory.must_respond_to :unit
|
48
|
+
@client.hardware_profile('m1-small').memory.unit.wont_be_empty
|
49
|
+
end
|
50
|
+
|
51
|
+
it 'support #storage' do
|
52
|
+
@client.hardware_profile('m1-small').must_respond_to :storage
|
53
|
+
@client.hardware_profile('m1-small').storage.wont_be_nil
|
54
|
+
@client.hardware_profile('m1-small').storage.must_respond_to :default
|
55
|
+
@client.hardware_profile('m1-small').storage.default.wont_be_empty
|
56
|
+
@client.hardware_profile('m1-small').storage.must_respond_to :kind
|
57
|
+
@client.hardware_profile('m1-small').storage.kind.wont_be_empty
|
58
|
+
@client.hardware_profile('m1-small').storage.must_respond_to :unit
|
59
|
+
@client.hardware_profile('m1-small').storage.unit.wont_be_empty
|
60
|
+
end
|
61
|
+
|
62
|
+
it 'support #architecture' do
|
63
|
+
@client.hardware_profile('m1-small').must_respond_to :architecture
|
64
|
+
@client.hardware_profile('m1-small').architecture.wont_be_nil
|
65
|
+
@client.hardware_profile('m1-small').architecture.must_respond_to :default
|
66
|
+
@client.hardware_profile('m1-small').architecture.default.wont_be_empty
|
67
|
+
@client.hardware_profile('m1-small').architecture.must_respond_to :kind
|
68
|
+
@client.hardware_profile('m1-small').architecture.kind.wont_be_empty
|
69
|
+
@client.hardware_profile('m1-small').architecture.must_respond_to :unit
|
70
|
+
@client.hardware_profile('m1-small').architecture.unit.wont_be_empty
|
71
|
+
end
|
72
|
+
|
73
|
+
it 'support #opaque?' do
|
74
|
+
@client.hardware_profile('opaque').opaque?.must_equal true
|
75
|
+
@client.hardware_profile('m1-small').opaque?.must_equal false
|
76
|
+
end
|
77
|
+
|
78
|
+
|
79
|
+
|
80
|
+
end
|
@@ -0,0 +1,65 @@
|
|
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 Deltacloud::Client::Image do
|
19
|
+
|
20
|
+
before do
|
21
|
+
VCR.insert_cassette(__name__)
|
22
|
+
@client = new_client
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
VCR.eject_cassette
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'support #original_body' do
|
30
|
+
img = @client.image('img1')
|
31
|
+
img.original_body.must_be_instance_of Faraday::Response
|
32
|
+
end
|
33
|
+
|
34
|
+
it 'supports #hardware_profiles' do
|
35
|
+
img = @client.image('img1')
|
36
|
+
img.must_respond_to :hardware_profiles
|
37
|
+
img.hardware_profiles.wont_be_empty
|
38
|
+
img.hardware_profiles.first.must_be_instance_of Deltacloud::Client::HardwareProfile
|
39
|
+
end
|
40
|
+
|
41
|
+
it 'supports #is_compatible?' do
|
42
|
+
img = @client.image('img1')
|
43
|
+
img.must_respond_to 'is_compatible?'
|
44
|
+
img.is_compatible?('m1-small').must_equal true
|
45
|
+
img.is_compatible?('m1-large').must_equal true
|
46
|
+
end
|
47
|
+
|
48
|
+
it 'supports #lunch_image' do
|
49
|
+
img = @client.image('img1')
|
50
|
+
img.must_respond_to :launch
|
51
|
+
inst = img.launch(:hwp_id => 'm1-large')
|
52
|
+
inst.must_be_instance_of Deltacloud::Client::Instance
|
53
|
+
inst.hardware_profile_id.must_equal 'm1-large'
|
54
|
+
inst.stop!
|
55
|
+
inst.destroy!
|
56
|
+
end
|
57
|
+
|
58
|
+
it 'supports #id' do
|
59
|
+
img = @client.image('img1')
|
60
|
+
lambda { img.id.must_equal 'img1' }.must_output nil, "[DEPRECATION] `id` is deprecated because of a possible conflict with Object#id. Use `_id` instead.\n"
|
61
|
+
img.must_respond_to :url
|
62
|
+
img.url.must_equal 'http://localhost:3001/api/images/img1'
|
63
|
+
end
|
64
|
+
|
65
|
+
end
|
@@ -0,0 +1,52 @@
|
|
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 Deltacloud::Client::StorageVolume do
|
19
|
+
|
20
|
+
before do
|
21
|
+
VCR.insert_cassette(__name__)
|
22
|
+
@client = new_client
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
VCR.eject_cassette
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'supports #attached?' do
|
30
|
+
vol = @client.storage_volume('vol1')
|
31
|
+
vol.attached?.must_equal false
|
32
|
+
vol.attach('inst1')
|
33
|
+
vol.attached?.must_equal true
|
34
|
+
vol.detach!
|
35
|
+
end
|
36
|
+
|
37
|
+
it 'supports #snapshot!' do
|
38
|
+
vol = @client.storage_volume('vol1')
|
39
|
+
vol.snapshot!.must_be_instance_of Deltacloud::Client::StorageSnapshot
|
40
|
+
end
|
41
|
+
|
42
|
+
it 'supports #instance' do
|
43
|
+
vol = @client.storage_volume('vol2')
|
44
|
+
vol.attached?.must_equal false
|
45
|
+
vol.attach('inst1')
|
46
|
+
vol.attached?.must_equal true
|
47
|
+
vol.instance.must_be_instance_of Deltacloud::Client::Instance
|
48
|
+
vol.instance._id.must_equal 'inst1'
|
49
|
+
vol.detach!
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
data/tests/test_helper.rb
CHANGED
@@ -1,16 +1,64 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
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 'bundler/setup'
|
17
|
+
Bundler.require(:default, :development)
|
18
|
+
|
19
|
+
require 'require_relative' if RUBY_VERSION < '1.9'
|
4
20
|
|
5
|
-
|
21
|
+
Turn.config.format = :dot
|
22
|
+
|
23
|
+
if ENV['COVERAGE']
|
24
|
+
require 'simplecov'
|
25
|
+
SimpleCov.command_name 'tests:units'
|
26
|
+
SimpleCov.start do
|
27
|
+
add_group "Models", "lib/deltacloud/client/models"
|
28
|
+
add_group "Methods", "lib/deltacloud/client/methods"
|
29
|
+
add_group "Helpers", "lib/deltacloud/client/helpers"
|
30
|
+
add_group "Extensions", "lib/deltacloud/core_ext"
|
31
|
+
add_filter "tests/"
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
require 'minitest/autorun'
|
36
|
+
#
|
37
|
+
# Change this at will
|
38
|
+
#
|
39
|
+
DELTACLOUD_URL = ENV['API_URL'] || 'http://localhost:3001/api'
|
40
|
+
DELTACLOUD_USER = 'mockuser'
|
41
|
+
DELTACLOUD_PASSWORD = 'mockpassword'
|
6
42
|
|
7
|
-
|
43
|
+
def new_client
|
44
|
+
Deltacloud::Client(DELTACLOUD_URL, DELTACLOUD_USER, DELTACLOUD_PASSWORD)
|
45
|
+
end
|
8
46
|
|
9
|
-
|
10
|
-
|
11
|
-
|
47
|
+
unless ENV['NO_VCR']
|
48
|
+
require 'vcr'
|
49
|
+
VCR.configure do |c|
|
50
|
+
c.hook_into :faraday
|
51
|
+
c.cassette_library_dir = File.join(File.dirname(__FILE__), 'fixtures')
|
52
|
+
c.default_cassette_options = { :record => :new_episodes }
|
53
|
+
end
|
54
|
+
end
|
12
55
|
|
13
|
-
|
14
|
-
API_PASSWORD = 'mockpassword'
|
56
|
+
require_relative './../lib/deltacloud/client'
|
15
57
|
|
16
|
-
|
58
|
+
def cleanup_instances(inst_arr)
|
59
|
+
inst_arr.each do |i|
|
60
|
+
i.reload!
|
61
|
+
i.stop! unless i.is_stopped?
|
62
|
+
i.destroy!
|
63
|
+
end
|
64
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deltacloud-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,16 +9,16 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-04-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
15
|
+
name: faraday
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
21
|
+
version: 0.8.6
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
29
|
+
version: 0.8.6
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: nokogiri
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,13 +44,13 @@ dependencies:
|
|
44
44
|
- !ruby/object:Gem::Version
|
45
45
|
version: 1.4.3
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
|
-
name:
|
47
|
+
name: minitest
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
49
49
|
none: false
|
50
50
|
requirements:
|
51
51
|
- - ! '>='
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version:
|
53
|
+
version: '0'
|
54
54
|
type: :development
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -58,39 +58,268 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ! '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
62
|
-
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: simplecov
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
type: :development
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: vcr
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
type: :development
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: rake
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
type: :development
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: pry
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
114
|
+
requirements:
|
115
|
+
- - ! '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
126
|
+
description: A REST client for the Deltacloud API
|
63
127
|
email: dev@deltacloud.apache.org
|
64
128
|
executables: []
|
65
129
|
extensions: []
|
66
130
|
extra_rdoc_files:
|
67
131
|
- LICENSE
|
68
132
|
- NOTICE
|
133
|
+
- README.md
|
69
134
|
files:
|
70
135
|
- Rakefile
|
71
|
-
- lib/deltacloud.rb
|
72
|
-
- lib/
|
73
|
-
- lib/
|
74
|
-
- lib/
|
75
|
-
- lib/
|
76
|
-
- lib/
|
77
|
-
- lib/
|
78
|
-
- lib/
|
79
|
-
-
|
80
|
-
-
|
81
|
-
-
|
82
|
-
-
|
83
|
-
-
|
84
|
-
-
|
85
|
-
-
|
86
|
-
-
|
87
|
-
-
|
88
|
-
-
|
89
|
-
-
|
90
|
-
-
|
136
|
+
- lib/deltacloud/client/base_error.rb
|
137
|
+
- lib/deltacloud/client/methods.rb
|
138
|
+
- lib/deltacloud/client/models.rb
|
139
|
+
- lib/deltacloud/client/methods/hardware_profile.rb
|
140
|
+
- lib/deltacloud/client/methods/firewall.rb
|
141
|
+
- lib/deltacloud/client/methods/api.rb
|
142
|
+
- lib/deltacloud/client/methods/blob.rb
|
143
|
+
- lib/deltacloud/client/methods/realm.rb
|
144
|
+
- lib/deltacloud/client/methods/metric.rb
|
145
|
+
- lib/deltacloud/client/methods/load_balancer.rb
|
146
|
+
- lib/deltacloud/client/methods/storage_volume.rb
|
147
|
+
- lib/deltacloud/client/methods/image.rb
|
148
|
+
- lib/deltacloud/client/methods/instance.rb
|
149
|
+
- lib/deltacloud/client/methods/common.rb
|
150
|
+
- lib/deltacloud/client/methods/driver.rb
|
151
|
+
- lib/deltacloud/client/methods/backward_compatiblity.rb
|
152
|
+
- lib/deltacloud/client/methods/bucket.rb
|
153
|
+
- lib/deltacloud/client/methods/instance_state.rb
|
154
|
+
- lib/deltacloud/client/methods/key.rb
|
155
|
+
- lib/deltacloud/client/methods/address.rb
|
156
|
+
- lib/deltacloud/client/methods/storage_snapshot.rb
|
157
|
+
- lib/deltacloud/client/helpers/model_helper.rb
|
158
|
+
- lib/deltacloud/client/helpers/property_helper.rb
|
159
|
+
- lib/deltacloud/client/helpers/xml_helper.rb
|
160
|
+
- lib/deltacloud/client/models/instance_address.rb
|
161
|
+
- lib/deltacloud/client/models/hardware_profile.rb
|
162
|
+
- lib/deltacloud/client/models/firewall.rb
|
163
|
+
- lib/deltacloud/client/models/blob.rb
|
164
|
+
- lib/deltacloud/client/models/realm.rb
|
165
|
+
- lib/deltacloud/client/models/metric.rb
|
166
|
+
- lib/deltacloud/client/models/load_balancer.rb
|
167
|
+
- lib/deltacloud/client/models/base.rb
|
168
|
+
- lib/deltacloud/client/models/storage_volume.rb
|
169
|
+
- lib/deltacloud/client/models/image.rb
|
170
|
+
- lib/deltacloud/client/models/instance.rb
|
171
|
+
- lib/deltacloud/client/models/driver.rb
|
172
|
+
- lib/deltacloud/client/models/bucket.rb
|
173
|
+
- lib/deltacloud/client/models/instance_state.rb
|
174
|
+
- lib/deltacloud/client/models/key.rb
|
175
|
+
- lib/deltacloud/client/models/address.rb
|
176
|
+
- lib/deltacloud/client/models/storage_snapshot.rb
|
177
|
+
- lib/deltacloud/client/connection.rb
|
178
|
+
- lib/deltacloud/core_ext/nil.rb
|
179
|
+
- lib/deltacloud/core_ext/fixnum.rb
|
180
|
+
- lib/deltacloud/core_ext/element.rb
|
181
|
+
- lib/deltacloud/core_ext/string.rb
|
182
|
+
- lib/deltacloud/core_ext.rb
|
183
|
+
- lib/deltacloud/error_response.rb
|
184
|
+
- lib/deltacloud/client.rb
|
185
|
+
- tests/client/connection_test.rb
|
186
|
+
- tests/client/client_test.rb
|
187
|
+
- tests/core_ext/string_test.rb
|
188
|
+
- tests/core_ext/nil.rb
|
189
|
+
- tests/core_ext/element_test.rb
|
190
|
+
- tests/core_ext/fixnum_test.rb
|
191
|
+
- tests/methods/backward_compatibility_test.rb
|
192
|
+
- tests/methods/key_test.rb
|
193
|
+
- tests/methods/image_test.rb
|
194
|
+
- tests/methods/firewall_test.rb
|
195
|
+
- tests/methods/realm_test.rb
|
196
|
+
- tests/methods/address_test.rb
|
197
|
+
- tests/methods/instance_test.rb
|
198
|
+
- tests/methods/api_test.rb
|
199
|
+
- tests/methods/instance_state_test.rb
|
200
|
+
- tests/methods/storage_snapshot_test.rb
|
201
|
+
- tests/methods/blob_test.rb
|
202
|
+
- tests/methods/storage_volume_test.rb
|
203
|
+
- tests/methods/bucket_test.rb
|
204
|
+
- tests/methods/driver_test.rb
|
205
|
+
- tests/methods/hardware_profile_test.rb
|
206
|
+
- tests/helpers/xml_test.rb
|
207
|
+
- tests/helpers/model_test.rb
|
208
|
+
- tests/models/image_test.rb
|
209
|
+
- tests/models/blob_test.rb
|
210
|
+
- tests/models/storage_volume_test.rb
|
211
|
+
- tests/models/bucket_test.rb
|
212
|
+
- tests/models/driver_test.rb
|
213
|
+
- tests/models/hardware_profile_test.rb
|
214
|
+
- tests/fixtures/test_0004_support_create_address.yml
|
215
|
+
- tests/fixtures/test_0001_supports_firewalls.yml
|
216
|
+
- tests/fixtures/test_0004_support_create_bucket_and_destroy_bucket.yml
|
217
|
+
- tests/fixtures/test_0010_supports_feature_.yml
|
218
|
+
- tests/fixtures/test_0005_supports_switching_drivers_per_instance.yml
|
219
|
+
- tests/fixtures/test_0002_supports_filtering_storage_snapshots_by_id_param.yml
|
220
|
+
- tests/fixtures/test_0003_support_storage_volume.yml
|
221
|
+
- tests/fixtures/test_0010_support_reboot_instance.yml
|
222
|
+
- tests/fixtures/test_0007_supports_valid_credentials_on_class.yml
|
223
|
+
- tests/fixtures/test_0001_supports_addresses.yml
|
224
|
+
- tests/fixtures/test_0001_supports_realms.yml
|
225
|
+
- tests/fixtures/test_0004_support_create_blob_and_destroy_blob_with_meta_params.yml
|
226
|
+
- tests/fixtures/test_0001_connects_to_Deltacloud_API.yml
|
227
|
+
- tests/fixtures/test_0006_supports_discovered_.yml
|
228
|
+
- tests/fixtures/test_0003_supports_instance.yml
|
229
|
+
- tests/fixtures/test_0009_supports_features.yml
|
230
|
+
- tests/fixtures/test_0006_supports_supported_collections.yml
|
231
|
+
- tests/fixtures/test_0001_support_original_body.yml
|
232
|
+
- tests/fixtures/test_0002_supports_is_compatible_.yml
|
233
|
+
- tests/fixtures/test_0004_support_create_bucket.yml
|
234
|
+
- tests/fixtures/test_0003_supports_providers.yml
|
235
|
+
- tests/fixtures/test_0001_supports_drivers.yml
|
236
|
+
- tests/fixtures/test_0002_supports_filtering_hardware_profiles_by_id_param.yml
|
237
|
+
- tests/fixtures/test_0004_supports_with_config.yml
|
238
|
+
- tests/fixtures/test_0004_supports_lunch_image.yml
|
239
|
+
- tests/fixtures/test_0002_supports_filtering_instances_by_id_param.yml
|
240
|
+
- tests/fixtures/test_0003_support_storage_snapshot.yml
|
241
|
+
- tests/fixtures/test_0001_supports_bucket.yml
|
242
|
+
- tests/fixtures/test_0002_supports_snapshot_.yml
|
243
|
+
- tests/fixtures/test_0002_supports_version.yml
|
244
|
+
- tests/fixtures/test_0002_support_memory.yml
|
245
|
+
- tests/fixtures/test_0006_support_create_instance_with_realm_id.yml
|
246
|
+
- tests/fixtures/test_0001_support_cpu.yml
|
247
|
+
- tests/fixtures/test_0004_support_architecture.yml
|
248
|
+
- tests/fixtures/test_0008_support_stop_instance.yml
|
249
|
+
- tests/fixtures/test_0001_supports_path.yml
|
250
|
+
- tests/fixtures/test_0004_supports_extract_xml_body_using_nokogiri_element.yml
|
251
|
+
- tests/fixtures/test_0004_supports_valid_credentials_.yml
|
252
|
+
- tests/fixtures/test_0003_supports_version.yml
|
253
|
+
- tests/fixtures/test_0003_caches_the_API_entrypoint.yml
|
254
|
+
- tests/fixtures/test_0004_support_create_key_and_destroy_key.yml
|
255
|
+
- tests/fixtures/test_0002_support_blob.yml
|
256
|
+
- tests/fixtures/test_0001_supports_instances.yml
|
257
|
+
- tests/fixtures/test_0005_support_attach_storage_volume_and_detach_storage_volume.yml
|
258
|
+
- tests/fixtures/test_0005_supports_use_driver.yml
|
259
|
+
- tests/fixtures/test_0003_supports_lunch_image.yml
|
260
|
+
- tests/fixtures/test_0001_supports_storage_snapshots.yml
|
261
|
+
- tests/fixtures/test_0001_supports_instance_states.yml
|
262
|
+
- tests/fixtures/test_0002_supports_api_port.yml
|
263
|
+
- tests/fixtures/instances_cleanup.yml
|
264
|
+
- tests/fixtures/test_0001_supports_keys.yml
|
265
|
+
- tests/fixtures/test_0001_supports_blobs.yml
|
266
|
+
- tests/fixtures/test_0002_supports_filtering_realms_by_id.yml
|
267
|
+
- tests/fixtures/test_0003_supports_extract_xml_body_using_nokogiri_document.yml
|
268
|
+
- tests/fixtures/test_0001_supports_storage_volumes.yml
|
269
|
+
- tests/fixtures/test_0001_supports_images.yml
|
270
|
+
- tests/fixtures/test_0003_support_key.yml
|
271
|
+
- tests/fixtures/test_0002_supports_filtering_buckets_by_id_param.yml
|
272
|
+
- tests/fixtures/test_0002_supports_filtering_keys_by_id_param.yml
|
273
|
+
- tests/fixtures/test_0003_support_bucket.yml
|
274
|
+
- tests/fixtures/test_0003_supports_is_compatible_.yml
|
275
|
+
- tests/fixtures/test_0004_support_create_firewall_and_destroy_firewall.yml
|
276
|
+
- tests/fixtures/test_0009_support_start_instance.yml
|
277
|
+
- tests/fixtures/test_0002_supports_api_uri.yml
|
278
|
+
- tests/fixtures/test_0003_support_address.yml
|
279
|
+
- tests/fixtures/test_0001_supports_api_host.yml
|
280
|
+
- tests/fixtures/test_0004_supports_current_driver.yml
|
281
|
+
- tests/fixtures/test_0004_support_create_volume_and_destroy_volume.yml
|
282
|
+
- tests/fixtures/test_0003_support_realm.yml
|
283
|
+
- tests/fixtures/test_0002_supports_extract_xml_body_using_faraday_connection.yml
|
284
|
+
- tests/fixtures/test_0001_supports_attached_.yml
|
285
|
+
- tests/fixtures/test_0003_support_create_blob_and_destroy_blob.yml
|
286
|
+
- tests/fixtures/test_0007_support_switching_provider_without_credentials.yml
|
287
|
+
- tests/fixtures/test_0003_support_create_blob.yml
|
288
|
+
- tests/fixtures/test_0003_support_firewall.yml
|
289
|
+
- tests/fixtures/test_0005_support_opaque_.yml
|
290
|
+
- tests/fixtures/test_0004_support_create_volume.yml
|
291
|
+
- tests/fixtures/test_0005_supports_id.yml
|
292
|
+
- tests/fixtures/test_0002_supports_filtering_images_by_id_param.yml
|
293
|
+
- tests/fixtures/test_0003_support_instance.yml
|
294
|
+
- tests/fixtures/test_0008_supports_must_support_.yml
|
295
|
+
- tests/fixtures/test_0001_supports_buckets.yml
|
296
|
+
- tests/fixtures/test_0002_supports_driver.yml
|
297
|
+
- tests/fixtures/test_0002_supports_filtering_firewalls_by_id_param.yml
|
298
|
+
- tests/fixtures/test_0007_support_create_instance_with_name.yml
|
299
|
+
- tests/fixtures/test_0006_supports_switching_providers_per_instance.yml
|
300
|
+
- tests/fixtures/test_0003_support_storage.yml
|
301
|
+
- tests/fixtures/test_0003_support_to_change_driver_with_Client.yml
|
302
|
+
- tests/fixtures/test_0005_support_create_instance_with_hwp_id.yml
|
303
|
+
- tests/fixtures/test_0007_supports_support_.yml
|
304
|
+
- tests/fixtures/test_0002_supports_filtering_addresses_by_id_param.yml
|
305
|
+
- tests/fixtures/test_0005_support_attach_storage_volume.yml
|
306
|
+
- tests/fixtures/test_0001_supports_to_get_providers.yml
|
307
|
+
- tests/fixtures/test_0002_support_on_Provider.yml
|
308
|
+
- tests/fixtures/test_0004_support_to_test_of_valid_DC_connection.yml
|
309
|
+
- tests/fixtures/test_0003_support_image.yml
|
310
|
+
- tests/fixtures/test_0005_supports_current_provider.yml
|
311
|
+
- tests/fixtures/test_0002_supports_filtering_storage_volumes_by_id_param.yml
|
312
|
+
- tests/fixtures/test_0003_supports_connect.yml
|
313
|
+
- tests/fixtures/test_0002_supports_hardware_profiles.yml
|
314
|
+
- tests/fixtures/test_0004_support_create_instance.yml
|
315
|
+
- tests/fixtures/test_0002_support_instance_state.yml
|
316
|
+
- tests/fixtures/test_0001_supports_hardware_profiles.yml
|
317
|
+
- tests/fixtures/test_0003_support_hardware_profile.yml
|
318
|
+
- tests/fixtures/test_0004_support_create_image_and_destroy_image.yml
|
91
319
|
- tests/test_helper.rb
|
92
320
|
- LICENSE
|
93
321
|
- NOTICE
|
322
|
+
- README.md
|
94
323
|
homepage: http://www.deltacloud.org
|
95
324
|
licenses: []
|
96
325
|
post_install_message:
|
@@ -116,16 +345,138 @@ signing_key:
|
|
116
345
|
specification_version: 3
|
117
346
|
summary: Deltacloud REST Client
|
118
347
|
test_files:
|
119
|
-
- tests/
|
120
|
-
- tests/
|
121
|
-
- tests/
|
122
|
-
- tests/
|
123
|
-
- tests/
|
124
|
-
- tests/
|
125
|
-
- tests/
|
126
|
-
- tests/
|
127
|
-
- tests/
|
128
|
-
- tests/
|
129
|
-
- tests/
|
130
|
-
- tests/
|
348
|
+
- tests/client/connection_test.rb
|
349
|
+
- tests/client/client_test.rb
|
350
|
+
- tests/core_ext/string_test.rb
|
351
|
+
- tests/core_ext/nil.rb
|
352
|
+
- tests/core_ext/element_test.rb
|
353
|
+
- tests/core_ext/fixnum_test.rb
|
354
|
+
- tests/methods/backward_compatibility_test.rb
|
355
|
+
- tests/methods/key_test.rb
|
356
|
+
- tests/methods/image_test.rb
|
357
|
+
- tests/methods/firewall_test.rb
|
358
|
+
- tests/methods/realm_test.rb
|
359
|
+
- tests/methods/address_test.rb
|
360
|
+
- tests/methods/instance_test.rb
|
361
|
+
- tests/methods/api_test.rb
|
362
|
+
- tests/methods/instance_state_test.rb
|
363
|
+
- tests/methods/storage_snapshot_test.rb
|
364
|
+
- tests/methods/blob_test.rb
|
365
|
+
- tests/methods/storage_volume_test.rb
|
366
|
+
- tests/methods/bucket_test.rb
|
367
|
+
- tests/methods/driver_test.rb
|
368
|
+
- tests/methods/hardware_profile_test.rb
|
369
|
+
- tests/helpers/xml_test.rb
|
370
|
+
- tests/helpers/model_test.rb
|
371
|
+
- tests/models/image_test.rb
|
372
|
+
- tests/models/blob_test.rb
|
373
|
+
- tests/models/storage_volume_test.rb
|
374
|
+
- tests/models/bucket_test.rb
|
375
|
+
- tests/models/driver_test.rb
|
376
|
+
- tests/models/hardware_profile_test.rb
|
377
|
+
- tests/fixtures/test_0004_support_create_address.yml
|
378
|
+
- tests/fixtures/test_0001_supports_firewalls.yml
|
379
|
+
- tests/fixtures/test_0004_support_create_bucket_and_destroy_bucket.yml
|
380
|
+
- tests/fixtures/test_0010_supports_feature_.yml
|
381
|
+
- tests/fixtures/test_0005_supports_switching_drivers_per_instance.yml
|
382
|
+
- tests/fixtures/test_0002_supports_filtering_storage_snapshots_by_id_param.yml
|
383
|
+
- tests/fixtures/test_0003_support_storage_volume.yml
|
384
|
+
- tests/fixtures/test_0010_support_reboot_instance.yml
|
385
|
+
- tests/fixtures/test_0007_supports_valid_credentials_on_class.yml
|
386
|
+
- tests/fixtures/test_0001_supports_addresses.yml
|
387
|
+
- tests/fixtures/test_0001_supports_realms.yml
|
388
|
+
- tests/fixtures/test_0004_support_create_blob_and_destroy_blob_with_meta_params.yml
|
389
|
+
- tests/fixtures/test_0001_connects_to_Deltacloud_API.yml
|
390
|
+
- tests/fixtures/test_0006_supports_discovered_.yml
|
391
|
+
- tests/fixtures/test_0003_supports_instance.yml
|
392
|
+
- tests/fixtures/test_0009_supports_features.yml
|
393
|
+
- tests/fixtures/test_0006_supports_supported_collections.yml
|
394
|
+
- tests/fixtures/test_0001_support_original_body.yml
|
395
|
+
- tests/fixtures/test_0002_supports_is_compatible_.yml
|
396
|
+
- tests/fixtures/test_0004_support_create_bucket.yml
|
397
|
+
- tests/fixtures/test_0003_supports_providers.yml
|
398
|
+
- tests/fixtures/test_0001_supports_drivers.yml
|
399
|
+
- tests/fixtures/test_0002_supports_filtering_hardware_profiles_by_id_param.yml
|
400
|
+
- tests/fixtures/test_0004_supports_with_config.yml
|
401
|
+
- tests/fixtures/test_0004_supports_lunch_image.yml
|
402
|
+
- tests/fixtures/test_0002_supports_filtering_instances_by_id_param.yml
|
403
|
+
- tests/fixtures/test_0003_support_storage_snapshot.yml
|
404
|
+
- tests/fixtures/test_0001_supports_bucket.yml
|
405
|
+
- tests/fixtures/test_0002_supports_snapshot_.yml
|
406
|
+
- tests/fixtures/test_0002_supports_version.yml
|
407
|
+
- tests/fixtures/test_0002_support_memory.yml
|
408
|
+
- tests/fixtures/test_0006_support_create_instance_with_realm_id.yml
|
409
|
+
- tests/fixtures/test_0001_support_cpu.yml
|
410
|
+
- tests/fixtures/test_0004_support_architecture.yml
|
411
|
+
- tests/fixtures/test_0008_support_stop_instance.yml
|
412
|
+
- tests/fixtures/test_0001_supports_path.yml
|
413
|
+
- tests/fixtures/test_0004_supports_extract_xml_body_using_nokogiri_element.yml
|
414
|
+
- tests/fixtures/test_0004_supports_valid_credentials_.yml
|
415
|
+
- tests/fixtures/test_0003_supports_version.yml
|
416
|
+
- tests/fixtures/test_0003_caches_the_API_entrypoint.yml
|
417
|
+
- tests/fixtures/test_0004_support_create_key_and_destroy_key.yml
|
418
|
+
- tests/fixtures/test_0002_support_blob.yml
|
419
|
+
- tests/fixtures/test_0001_supports_instances.yml
|
420
|
+
- tests/fixtures/test_0005_support_attach_storage_volume_and_detach_storage_volume.yml
|
421
|
+
- tests/fixtures/test_0005_supports_use_driver.yml
|
422
|
+
- tests/fixtures/test_0003_supports_lunch_image.yml
|
423
|
+
- tests/fixtures/test_0001_supports_storage_snapshots.yml
|
424
|
+
- tests/fixtures/test_0001_supports_instance_states.yml
|
425
|
+
- tests/fixtures/test_0002_supports_api_port.yml
|
426
|
+
- tests/fixtures/instances_cleanup.yml
|
427
|
+
- tests/fixtures/test_0001_supports_keys.yml
|
428
|
+
- tests/fixtures/test_0001_supports_blobs.yml
|
429
|
+
- tests/fixtures/test_0002_supports_filtering_realms_by_id.yml
|
430
|
+
- tests/fixtures/test_0003_supports_extract_xml_body_using_nokogiri_document.yml
|
431
|
+
- tests/fixtures/test_0001_supports_storage_volumes.yml
|
432
|
+
- tests/fixtures/test_0001_supports_images.yml
|
433
|
+
- tests/fixtures/test_0003_support_key.yml
|
434
|
+
- tests/fixtures/test_0002_supports_filtering_buckets_by_id_param.yml
|
435
|
+
- tests/fixtures/test_0002_supports_filtering_keys_by_id_param.yml
|
436
|
+
- tests/fixtures/test_0003_support_bucket.yml
|
437
|
+
- tests/fixtures/test_0003_supports_is_compatible_.yml
|
438
|
+
- tests/fixtures/test_0004_support_create_firewall_and_destroy_firewall.yml
|
439
|
+
- tests/fixtures/test_0009_support_start_instance.yml
|
440
|
+
- tests/fixtures/test_0002_supports_api_uri.yml
|
441
|
+
- tests/fixtures/test_0003_support_address.yml
|
442
|
+
- tests/fixtures/test_0001_supports_api_host.yml
|
443
|
+
- tests/fixtures/test_0004_supports_current_driver.yml
|
444
|
+
- tests/fixtures/test_0004_support_create_volume_and_destroy_volume.yml
|
445
|
+
- tests/fixtures/test_0003_support_realm.yml
|
446
|
+
- tests/fixtures/test_0002_supports_extract_xml_body_using_faraday_connection.yml
|
447
|
+
- tests/fixtures/test_0001_supports_attached_.yml
|
448
|
+
- tests/fixtures/test_0003_support_create_blob_and_destroy_blob.yml
|
449
|
+
- tests/fixtures/test_0007_support_switching_provider_without_credentials.yml
|
450
|
+
- tests/fixtures/test_0003_support_create_blob.yml
|
451
|
+
- tests/fixtures/test_0003_support_firewall.yml
|
452
|
+
- tests/fixtures/test_0005_support_opaque_.yml
|
453
|
+
- tests/fixtures/test_0004_support_create_volume.yml
|
454
|
+
- tests/fixtures/test_0005_supports_id.yml
|
455
|
+
- tests/fixtures/test_0002_supports_filtering_images_by_id_param.yml
|
456
|
+
- tests/fixtures/test_0003_support_instance.yml
|
457
|
+
- tests/fixtures/test_0008_supports_must_support_.yml
|
458
|
+
- tests/fixtures/test_0001_supports_buckets.yml
|
459
|
+
- tests/fixtures/test_0002_supports_driver.yml
|
460
|
+
- tests/fixtures/test_0002_supports_filtering_firewalls_by_id_param.yml
|
461
|
+
- tests/fixtures/test_0007_support_create_instance_with_name.yml
|
462
|
+
- tests/fixtures/test_0006_supports_switching_providers_per_instance.yml
|
463
|
+
- tests/fixtures/test_0003_support_storage.yml
|
464
|
+
- tests/fixtures/test_0003_support_to_change_driver_with_Client.yml
|
465
|
+
- tests/fixtures/test_0005_support_create_instance_with_hwp_id.yml
|
466
|
+
- tests/fixtures/test_0007_supports_support_.yml
|
467
|
+
- tests/fixtures/test_0002_supports_filtering_addresses_by_id_param.yml
|
468
|
+
- tests/fixtures/test_0005_support_attach_storage_volume.yml
|
469
|
+
- tests/fixtures/test_0001_supports_to_get_providers.yml
|
470
|
+
- tests/fixtures/test_0002_support_on_Provider.yml
|
471
|
+
- tests/fixtures/test_0004_support_to_test_of_valid_DC_connection.yml
|
472
|
+
- tests/fixtures/test_0003_support_image.yml
|
473
|
+
- tests/fixtures/test_0005_supports_current_provider.yml
|
474
|
+
- tests/fixtures/test_0002_supports_filtering_storage_volumes_by_id_param.yml
|
475
|
+
- tests/fixtures/test_0003_supports_connect.yml
|
476
|
+
- tests/fixtures/test_0002_supports_hardware_profiles.yml
|
477
|
+
- tests/fixtures/test_0004_support_create_instance.yml
|
478
|
+
- tests/fixtures/test_0002_support_instance_state.yml
|
479
|
+
- tests/fixtures/test_0001_supports_hardware_profiles.yml
|
480
|
+
- tests/fixtures/test_0003_support_hardware_profile.yml
|
481
|
+
- tests/fixtures/test_0004_support_create_image_and_destroy_image.yml
|
131
482
|
- tests/test_helper.rb
|