fog-maestrodev 1.14.0.20130806165225 → 1.15.0.20130829165835
Sign up to get free protection for your applications and to get access to all the features.
- data/changelog.txt +296 -0
- data/fog.gemspec +2 -2
- data/lib/fog/atmos/storage.rb +0 -3
- data/lib/fog/aws/cdn.rb +1 -2
- data/lib/fog/aws/compute.rb +52 -2
- data/lib/fog/aws/dns.rb +0 -1
- data/lib/fog/aws/models/auto_scaling/groups.rb +6 -3
- data/lib/fog/aws/models/compute/address.rb +1 -0
- data/lib/fog/aws/models/compute/flavors.rb +19 -0
- data/lib/fog/aws/models/compute/route_table.rb +69 -0
- data/lib/fog/aws/models/compute/route_tables.rb +92 -0
- data/lib/fog/aws/models/rds/instance_option.rb +21 -0
- data/lib/fog/aws/models/rds/instance_options.rb +30 -0
- data/lib/fog/aws/parsers/compute/associate_route_table.rb +20 -0
- data/lib/fog/aws/parsers/compute/create_route_table.rb +75 -0
- data/lib/fog/aws/parsers/compute/describe_account_attributes.rb +42 -0
- data/lib/fog/aws/parsers/compute/describe_route_tables.rb +85 -0
- data/lib/fog/aws/parsers/rds/describe_orderable_db_instance_options.rb +47 -0
- data/lib/fog/aws/rds.rb +5 -0
- data/lib/fog/aws/requests/auto_scaling/describe_auto_scaling_groups.rb +9 -1
- data/lib/fog/aws/requests/auto_scaling/describe_policies.rb +15 -1
- data/lib/fog/aws/requests/compute/associate_dhcp_options.rb +2 -2
- data/lib/fog/aws/requests/compute/associate_route_table.rb +75 -0
- data/lib/fog/aws/requests/compute/attach_internet_gateway.rb +2 -2
- data/lib/fog/aws/requests/compute/create_route.rb +89 -0
- data/lib/fog/aws/requests/compute/create_route_table.rb +70 -0
- data/lib/fog/aws/requests/compute/create_vpc.rb +16 -1
- data/lib/fog/aws/requests/compute/delete_dhcp_options.rb +2 -2
- data/lib/fog/aws/requests/compute/delete_internet_gateway.rb +2 -2
- data/lib/fog/aws/requests/compute/delete_network_interface.rb +2 -2
- data/lib/fog/aws/requests/compute/delete_route.rb +60 -0
- data/lib/fog/aws/requests/compute/delete_route_table.rb +51 -0
- data/lib/fog/aws/requests/compute/delete_subnet.rb +2 -2
- data/lib/fog/aws/requests/compute/delete_vpc.rb +2 -2
- data/lib/fog/aws/requests/compute/describe_account_attributes.rb +49 -0
- data/lib/fog/aws/requests/compute/describe_route_tables.rb +87 -0
- data/lib/fog/aws/requests/compute/detach_internet_gateway.rb +2 -2
- data/lib/fog/aws/requests/compute/detach_network_interface.rb +2 -2
- data/lib/fog/aws/requests/compute/disassociate_route_table.rb +57 -0
- data/lib/fog/aws/requests/compute/reset_network_interface_attribute.rb +2 -1
- data/lib/fog/aws/requests/elb/create_load_balancer.rb +23 -9
- data/lib/fog/aws/requests/iam/upload_server_certificate.rb +1 -1
- data/lib/fog/aws/requests/rds/describe_orderable_db_instance_options.rb +76 -0
- data/lib/fog/aws/storage.rb +0 -2
- data/lib/fog/brightbox/models/compute/collaboration.rb +10 -2
- data/lib/fog/brightbox/models/compute/collaborations.rb +26 -2
- data/lib/fog/brightbox/models/compute/user_collaboration.rb +16 -1
- data/lib/fog/brightbox/models/compute/user_collaborations.rb +10 -2
- data/lib/fog/cloudstack/models/compute/server.rb +4 -0
- data/lib/fog/core/collection.rb +18 -0
- data/lib/fog/core/credentials.rb +6 -1
- data/lib/fog/google/compute.rb +17 -0
- data/lib/fog/google/examples/get_list_images.rb +27 -0
- data/lib/fog/google/examples/get_list_snapshots.rb +20 -0
- data/lib/fog/google/examples/image_create.rb +18 -0
- data/lib/fog/google/examples/launch_micro_instance.rb +10 -5
- data/lib/fog/google/examples/network.rb +21 -0
- data/lib/fog/google/models/compute/disk.rb +16 -5
- data/lib/fog/google/models/compute/image.rb +36 -18
- data/lib/fog/google/models/compute/images.rb +36 -10
- data/lib/fog/google/models/compute/server.rb +41 -11
- data/lib/fog/google/models/compute/servers.rb +1 -1
- data/lib/fog/google/models/compute/snapshot.rb +36 -0
- data/lib/fog/google/models/compute/snapshots.rb +28 -0
- data/lib/fog/google/requests/compute/delete_disk.rb +5 -1
- data/lib/fog/google/requests/compute/get_disk.rb +2 -1
- data/lib/fog/google/requests/compute/get_snapshot.rb +34 -0
- data/lib/fog/google/requests/compute/insert_disk.rb +23 -7
- data/lib/fog/google/requests/compute/insert_image.rb +16 -9
- data/lib/fog/google/requests/compute/insert_server.rb +22 -10
- data/lib/fog/google/requests/compute/list_disks.rb +1 -1
- data/lib/fog/google/requests/compute/list_snapshots.rb +30 -0
- data/lib/fog/google/storage.rb +1 -3
- data/lib/fog/hp/storage.rb +0 -2
- data/lib/fog/internet_archive/storage.rb +0 -2
- data/lib/fog/local/storage.rb +0 -2
- data/lib/fog/ninefold/storage.rb +0 -1
- data/lib/fog/openstack/models/storage/file.rb +2 -0
- data/lib/fog/openstack/requests/compute/add_flavor_access.rb +1 -1
- data/lib/fog/openstack/requests/compute/create_volume.rb +8 -7
- data/lib/fog/openstack/requests/compute/list_tenants_with_flavor_access.rb +1 -1
- data/lib/fog/openstack/requests/compute/remove_flavor_access.rb +1 -1
- data/lib/fog/openstack/requests/image/create_image.rb +23 -23
- data/lib/fog/openstack/requests/image/update_image.rb +31 -33
- data/lib/fog/openstack/requests/storage/get_object_https_url.rb +3 -3
- data/lib/fog/openstack/requests/storage/post_set_meta_temp_url_key.rb +1 -1
- data/lib/fog/openstack/storage.rb +10 -11
- data/lib/fog/openstack.rb +10 -1
- data/lib/fog/rackspace/cdn.rb +13 -0
- data/lib/fog/rackspace/compute.rb +8 -4
- data/lib/fog/rackspace/compute_v2.rb +2 -0
- data/lib/fog/rackspace/databases.rb +4 -4
- data/lib/fog/rackspace/dns.rb +6 -6
- data/lib/fog/rackspace/examples/compute_v2/bootstrap_server.rb +98 -0
- data/lib/fog/rackspace/load_balancers.rb +5 -4
- data/lib/fog/rackspace/models/compute_v2/flavors.rb +1 -2
- data/lib/fog/rackspace/models/compute_v2/images.rb +35 -3
- data/lib/fog/rackspace/models/compute_v2/metadatum.rb +2 -2
- data/lib/fog/rackspace/models/identity/service_catalog.rb +34 -16
- data/lib/fog/rackspace/models/load_balancers/load_balancer.rb +8 -3
- data/lib/fog/rackspace/models/monitoring/alarm.rb +16 -8
- data/lib/fog/rackspace/models/monitoring/base.rb +2 -8
- data/lib/fog/rackspace/monitoring.rb +14 -6
- data/lib/fog/rackspace/requests/compute_v2/list_flavors_detail.rb +39 -0
- data/lib/fog/rackspace/requests/compute_v2/list_images.rb +15 -5
- data/lib/fog/rackspace/requests/compute_v2/list_images_detail.rb +53 -0
- data/lib/fog/rackspace/requests/identity/create_token.rb +1 -1
- data/lib/fog/rackspace/requests/load_balancers/create_load_balancer.rb +12 -0
- data/lib/fog/rackspace/requests/load_balancers/get_stats.rb +31 -0
- data/lib/fog/rackspace/requests/monitoring/get_entity.rb +33 -0
- data/lib/fog/rackspace/service.rb +7 -0
- data/lib/fog/rackspace/storage.rb +6 -3
- data/lib/fog/rackspace.rb +8 -5
- data/lib/fog/riakcs/provisioning.rb +0 -1
- data/lib/fog/riakcs/usage.rb +2 -3
- data/lib/fog/storage.rb +2 -0
- data/lib/fog/vcloud/examples/README.md +54 -0
- data/lib/fog/vcloud/examples/creating_a_connection.md +20 -0
- data/lib/fog/vcloud/examples/creating_a_vapp.md +17 -0
- data/lib/fog/vcloud/examples/get_network_information.md +10 -0
- data/lib/fog/vcloud/examples/get_vapp_information.md +10 -0
- data/lib/fog/vcloud/examples/more_on_vapps.md +23 -0
- data/lib/fog/version.rb +1 -1
- data/lib/tasks/changelog_task.rb +1 -0
- data/tests/aws/models/elb/model_tests.rb +5 -0
- data/tests/aws/models/rds/instance_option_tests.rb +14 -0
- data/tests/aws/requests/compute/client_tests.rb +25 -0
- data/tests/aws/requests/compute/route_tests.rb +277 -0
- data/tests/aws/requests/rds/helper.rb +22 -0
- data/tests/aws/requests/rds/instance_option_tests.rb +21 -0
- data/tests/core/credential_tests.rb +21 -0
- data/tests/core/service_tests.rb +26 -0
- data/tests/openstack/authenticate_tests.rb +22 -0
- data/tests/openstack/models/storage/file_tests.rb +20 -1
- data/tests/openstack/requests/compute/flavor_tests.rb +27 -12
- data/tests/openstack/requests/compute/volume_tests.rb +10 -12
- data/tests/openstack/requests/image/image_tests.rb +30 -15
- data/tests/rackspace/block_storage_tests.rb +9 -4
- data/tests/rackspace/cdn_tests.rb +14 -0
- data/tests/rackspace/compute_tests.rb +10 -4
- data/tests/rackspace/compute_v2_tests.rb +9 -4
- data/tests/rackspace/databases_tests.rb +9 -4
- data/tests/rackspace/dns_tests.rb +9 -4
- data/tests/rackspace/helper.rb +21 -2
- data/tests/rackspace/identity_tests.rb +9 -4
- data/tests/rackspace/load_balancer_tests.rb +8 -4
- data/tests/rackspace/models/compute_v2/server_tests.rb +18 -21
- data/tests/rackspace/models/identity/service_catalog_tests.rb +54 -29
- data/tests/rackspace/models/load_balancers/load_balancer_tests.rb +5 -0
- data/tests/rackspace/models/monitoring/alarm_examples_tests.rb +1 -1
- data/tests/rackspace/models/monitoring/alarm_tests.rb +2 -2
- data/tests/rackspace/monitoring_tests.rb +9 -4
- data/tests/rackspace/requests/compute_v2/flavor_tests.rb +6 -0
- data/tests/rackspace/requests/compute_v2/image_tests.rb +4 -0
- data/tests/rackspace/requests/compute_v2/server_tests.rb +2 -2
- data/tests/rackspace/requests/load_balancers/get_stats_tests.rb +13 -0
- data/tests/rackspace/requests/load_balancers/helper.rb +9 -0
- data/tests/rackspace/requests/monitoring/alarm_tests.rb +4 -5
- data/tests/rackspace/requests/monitoring/entity_tests.rb +9 -1
- data/tests/rackspace/requests/storage/large_object_tests.rb +12 -4
- data/tests/rackspace/storage_tests.rb +23 -4
- data/tests/rackspace/url_encoding_tests.rb +3 -1
- metadata +117 -133
- checksums.yaml +0 -15
- data/lib/fog/aws/parsers/compute/associate_dhcp_options.rb +0 -24
- data/lib/fog/aws/parsers/compute/attach_internet_gateway.rb +0 -24
- data/lib/fog/aws/parsers/compute/delete_dhcp_options.rb +0 -24
- data/lib/fog/aws/parsers/compute/delete_internet_gateway.rb +0 -24
- data/lib/fog/aws/parsers/compute/delete_network_interface.rb +0 -24
- data/lib/fog/aws/parsers/compute/delete_subnet.rb +0 -24
- data/lib/fog/aws/parsers/compute/delete_vpc.rb +0 -24
- data/lib/fog/aws/parsers/compute/detach_internet_gateway.rb +0 -24
- data/lib/fog/aws/parsers/compute/detach_network_interface.rb +0 -24
@@ -4,35 +4,33 @@ Shindo.tests('Fog::Compute[:openstack] | volume requests', ['openstack']) do
|
|
4
4
|
|
5
5
|
@volume_format = {
|
6
6
|
'id' => String,
|
7
|
-
'
|
7
|
+
'displayName' => String,
|
8
8
|
'size' => Integer,
|
9
|
-
'
|
9
|
+
'displayDescription' => String,
|
10
10
|
'status' => String,
|
11
|
-
'
|
12
|
-
'
|
11
|
+
'snapshotId' => Fog::Nullable::String,
|
12
|
+
'availabilityZone' => String,
|
13
13
|
'attachments' => Array,
|
14
|
-
'
|
15
|
-
'
|
14
|
+
'volumeType' => Fog::Nullable::String,
|
15
|
+
'createdAt' => String,
|
16
|
+
'metadata' => Hash
|
16
17
|
}
|
17
18
|
|
18
19
|
tests('success') do
|
19
|
-
tests('#create_volume').
|
20
|
-
pending unless Fog.mocking?
|
20
|
+
tests('#create_volume').data_matches_schema({'volume' => @volume_format}) do
|
21
21
|
Fog::Compute[:openstack].create_volume('loud', 'this is a loud volume', 3).body
|
22
22
|
end
|
23
23
|
|
24
|
-
tests('#list_volumes').
|
24
|
+
tests('#list_volumes').data_matches_schema({'volumes' => [@volume_format]}) do
|
25
25
|
Fog::Compute[:openstack].list_volumes.body
|
26
26
|
end
|
27
27
|
|
28
|
-
tests('#get_volume_detail').
|
29
|
-
pending unless Fog.mocking?
|
28
|
+
tests('#get_volume_detail').data_matches_schema({'volume' => @volume_format}) do
|
30
29
|
volume_id = Fog::Compute[:openstack].volumes.all.first.id
|
31
30
|
Fog::Compute[:openstack].get_volume_details(volume_id).body
|
32
31
|
end
|
33
32
|
|
34
33
|
tests('#delete_volume').succeeds do
|
35
|
-
pending unless Fog.mocking?
|
36
34
|
volume_id = Fog::Compute[:openstack].volumes.all.first.id
|
37
35
|
Fog::Compute[:openstack].delete_volume(volume_id)
|
38
36
|
end
|
@@ -1,15 +1,15 @@
|
|
1
1
|
Shindo.tests('Fog::Image[:openstack] | image requests', ['openstack']) do
|
2
2
|
openstack = Fog::Identity[:openstack]
|
3
3
|
@image_attributes = {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
{
|
11
|
-
|
12
|
-
|
4
|
+
:name => 'new image',
|
5
|
+
:owner => openstack.current_tenant['id'],
|
6
|
+
:is_public => true,
|
7
|
+
:copy_from => 'http://website.com/image.iso',
|
8
|
+
:disk_format => 'iso',
|
9
|
+
:properties =>
|
10
|
+
{:user_id => openstack.current_user['id'],
|
11
|
+
:owner_id => openstack.current_tenant['id']},
|
12
|
+
:container_format => 'bare' }
|
13
13
|
|
14
14
|
@image_format = {
|
15
15
|
'name' => String,
|
@@ -72,23 +72,38 @@ Shindo.tests('Fog::Image[:openstack] | image requests', ['openstack']) do
|
|
72
72
|
]
|
73
73
|
|
74
74
|
tests('success') do
|
75
|
-
tests('#list_public_images').
|
75
|
+
tests('#list_public_images').data_matches_schema({'images' => [@image_format]}) do
|
76
76
|
Fog::Image[:openstack].list_public_images.body
|
77
77
|
end
|
78
78
|
|
79
|
-
tests('#list_public_images_detailed').
|
79
|
+
tests('#list_public_images_detailed').data_matches_schema({'images' => [@detailed_image_format]}) do
|
80
80
|
Fog::Image[:openstack].list_public_images_detailed.body
|
81
81
|
end
|
82
82
|
|
83
|
-
tests('#create_image').
|
84
|
-
|
83
|
+
tests('#create_image').data_matches_schema({'image' => @detailed_image_format}) do
|
84
|
+
begin
|
85
|
+
if Fog.mocking?
|
86
|
+
image_attributes = @image_attributes
|
87
|
+
else
|
88
|
+
require 'tempfile'
|
89
|
+
image_attributes = @image_attributes.dup
|
90
|
+
image_attributes.delete(:copy_from)
|
91
|
+
test_iso = Tempfile.new(['fog_test_iso', '.iso'])
|
92
|
+
test_iso.write Fog::Mock.random_hex(32)
|
93
|
+
test_iso.close
|
94
|
+
image_attributes[:location] = test_iso.path
|
95
|
+
end
|
96
|
+
@instance = Fog::Image[:openstack].create_image(image_attributes).body
|
97
|
+
ensure
|
98
|
+
test_iso.delete if test_iso
|
99
|
+
end
|
85
100
|
end
|
86
101
|
|
87
|
-
tests('#get_image').
|
102
|
+
tests('#get_image').data_matches_schema(@image_meta_format) do
|
88
103
|
Fog::Image[:openstack].get_image(@instance['image']['id']).headers
|
89
104
|
end
|
90
105
|
|
91
|
-
tests('#update_image').
|
106
|
+
tests('#update_image').data_matches_schema(@detailed_image_format) do
|
92
107
|
Fog::Image[:openstack].update_image({:id => @instance['image']['id'],
|
93
108
|
:name => 'edit image'}).body['image']
|
94
109
|
end
|
@@ -105,10 +105,15 @@ Shindo.tests('Fog::Rackspace::BlockStorage', ['rackspace']) do
|
|
105
105
|
tests('reauthentication') do
|
106
106
|
pending if Fog.mocking?
|
107
107
|
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
108
|
+
tests('should reauth with valid credentials') do
|
109
|
+
@service = Fog::Rackspace::BlockStorage.new :rackspace_region => :ord
|
110
|
+
returns(true, "auth token populated") { !@service.send(:auth_token).nil? }
|
111
|
+
@service.instance_variable_set("@auth_token", "bad-token")
|
112
|
+
returns(200) { @service.list_volumes.status }
|
113
|
+
end
|
114
|
+
tests('should terminate with incorrect credentials') do
|
115
|
+
raises(Excon::Errors::Unauthorized) {Fog::Rackspace::BlockStorage.new :rackspace_api_key => 'bad_key' }
|
116
|
+
end
|
112
117
|
end
|
113
118
|
|
114
119
|
end
|
@@ -96,6 +96,20 @@ Shindo.tests('Fog::CDN::Rackspace', ['rackspace']) do
|
|
96
96
|
end
|
97
97
|
end
|
98
98
|
|
99
|
+
tests('reauthentication') do
|
100
|
+
pending if Fog.mocking?
|
101
|
+
|
102
|
+
tests('should reauth with valid credentials') do
|
103
|
+
@service = Fog::CDN::Rackspace.new :rackspace_region => :ord
|
104
|
+
returns(true, "auth token populated") { !@service.send(:auth_token).nil? }
|
105
|
+
@service.instance_variable_set("@auth_token", "bad-token")
|
106
|
+
returns(true) { [200, 204].include? @service.get_containers.status }
|
107
|
+
end
|
108
|
+
tests('should terminate with incorrect credentials') do
|
109
|
+
raises(Excon::Errors::Unauthorized) { Fog::CDN::Rackspace.new :rackspace_api_key => 'bad_key' }
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
99
113
|
pending if Fog.mocking?
|
100
114
|
|
101
115
|
def container_meta_attributes
|
@@ -91,9 +91,15 @@ Shindo.tests('Rackspace | Compute', ['rackspace']) do
|
|
91
91
|
tests('reauthentication') do
|
92
92
|
pending if Fog.mocking?
|
93
93
|
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
94
|
+
tests('should reauth with valid credentials') do
|
95
|
+
@service = Fog::Compute::Rackspace.new
|
96
|
+
returns(true, "auth token populated") { !@service.send(:auth_token).nil? }
|
97
|
+
@service.instance_variable_set("@auth_token", "bad-token")
|
98
|
+
returns(true) { [200, 203].include?(@service.list_flavors.status) }
|
99
|
+
end
|
100
|
+
tests('should terminate with incorrect credentials') do
|
101
|
+
raises(Excon::Errors::Unauthorized) { Fog::Compute::Rackspace.new :rackspace_api_key => 'bad_key' }
|
102
|
+
end
|
103
|
+
|
98
104
|
end
|
99
105
|
end
|
@@ -104,10 +104,15 @@ Shindo.tests('Fog::Compute::RackspaceV2', ['rackspace']) do
|
|
104
104
|
tests('reauthentication') do
|
105
105
|
pending if Fog.mocking?
|
106
106
|
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
107
|
+
tests('should reauth with valid credentials') do
|
108
|
+
@service = Fog::Compute::RackspaceV2.new
|
109
|
+
returns(true, "auth token populated") { !@service.send(:auth_token).nil? }
|
110
|
+
@service.instance_variable_set("@auth_token", "bad_token")
|
111
|
+
returns(true) { [200, 203].include? @service.list_flavors.status }
|
112
|
+
end
|
113
|
+
tests('should terminate with incorrect credentials') do
|
114
|
+
raises(Excon::Errors::Unauthorized) { Fog::Compute::RackspaceV2.new :rackspace_api_key => 'bad_key' }
|
115
|
+
end
|
111
116
|
end
|
112
117
|
|
113
118
|
end
|
@@ -105,10 +105,15 @@ Shindo.tests('Fog::Rackspace::Databases', ['rackspace']) do |variable|
|
|
105
105
|
tests('reauthentication') do
|
106
106
|
pending if Fog.mocking?
|
107
107
|
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
108
|
+
tests('should reauth with valid credentials') do
|
109
|
+
@service = Fog::Rackspace::Databases.new
|
110
|
+
returns(true, "auth token populated") { !@service.send(:auth_token).nil? }
|
111
|
+
@service.instance_variable_set("@auth_token", "bad_token")
|
112
|
+
returns(200) { @service.list_flavors.status }
|
113
|
+
end
|
114
|
+
tests('should terminate with incorrect credentials') do
|
115
|
+
raises(Excon::Errors::Unauthorized) { Fog::Rackspace::Databases.new :rackspace_api_key => 'bad_key' }
|
116
|
+
end
|
112
117
|
end
|
113
118
|
|
114
119
|
@service = Fog::Rackspace::Databases.new
|
@@ -85,10 +85,15 @@ Shindo.tests('Fog::DNS::Rackspace', ['rackspace']) do
|
|
85
85
|
tests('reauthentication') do
|
86
86
|
pending if Fog.mocking?
|
87
87
|
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
88
|
+
tests('should reauth with valid credentials') do
|
89
|
+
@service = Fog::DNS::Rackspace.new
|
90
|
+
returns(true, "auth token populated") { !@service.send(:auth_token).nil? }
|
91
|
+
@service.instance_variable_set("@auth_token", "bad_token")
|
92
|
+
returns(200) { @service.list_domains.status }
|
93
|
+
end
|
94
|
+
tests('should terminate with incorrect credentials') do
|
95
|
+
raises(Excon::Errors::Unauthorized) { Fog::DNS::Rackspace.new :rackspace_api_key => 'bad_key' }
|
96
|
+
end
|
92
97
|
end
|
93
98
|
|
94
99
|
tests('array_to_query_string') do
|
data/tests/rackspace/helper.rb
CHANGED
@@ -66,5 +66,24 @@ module Shindo
|
|
66
66
|
@flavor_id ||= Fog.credentials[:rackspace_flavor_id] || service.flavors.first.id
|
67
67
|
end
|
68
68
|
|
69
|
-
|
70
|
-
|
69
|
+
# After a server has been successfully deleted they are still being reported as attached to a cloud network
|
70
|
+
# causing delete calls to fail. This method attempts to address that.
|
71
|
+
def delete_test_network(network)
|
72
|
+
return false if Fog.mocking? || network.nil?
|
73
|
+
attempt = 0
|
74
|
+
begin
|
75
|
+
network.destroy
|
76
|
+
rescue Fog::Compute::RackspaceV2::ServiceError => e
|
77
|
+
if attempt == 3
|
78
|
+
Fog::Logger.warning "Unable to delete #{network.label}"
|
79
|
+
return false
|
80
|
+
end
|
81
|
+
Fog::Logger.warning "Network #{network.label} Delete Fail Attempt #{attempt}- #{e.inspect}"
|
82
|
+
attempt += 1
|
83
|
+
sleep 60
|
84
|
+
retry
|
85
|
+
end
|
86
|
+
return true
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
@@ -16,10 +16,15 @@ Shindo.tests('Fog::Rackspace::Identity', ['rackspace']) do
|
|
16
16
|
tests('reauthentication') do
|
17
17
|
pending if Fog.mocking?
|
18
18
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
19
|
+
tests('should reauth with valid credentials') do
|
20
|
+
@service = Fog::Rackspace::Identity.new :rackspace_region => :ord
|
21
|
+
returns(true, "auth token populated") { !@service.auth_token.nil? }
|
22
|
+
@service.instance_variable_set("@auth_token", "bad-token")
|
23
|
+
returns(true) { [200, 203].include? @service.list_tenants.status }
|
24
|
+
end
|
25
|
+
tests('should terminate with incorrect credentials') do
|
26
|
+
raises(Excon::Errors::Unauthorized) { Fog::Rackspace::Identity.new :rackspace_api_key => 'bad_key' }
|
27
|
+
end
|
23
28
|
end
|
24
29
|
|
25
30
|
end
|
@@ -105,10 +105,14 @@ Shindo.tests('Fog::Rackspace::LoadBalancers', ['rackspace']) do
|
|
105
105
|
tests('reauthentication') do
|
106
106
|
pending if Fog.mocking?
|
107
107
|
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
108
|
+
tests('should reauth with valid credentials') do
|
109
|
+
@service = Fog::Rackspace::LoadBalancers.new
|
110
|
+
returns(true, "auth token populated") { !@service.send(:auth_token).nil? }
|
111
|
+
@service.instance_variable_set("@auth_token", "bad-token")
|
112
|
+
returns(200) { @service.list_load_balancers.status } end
|
113
|
+
tests('should terminate with incorrect credentials') do
|
114
|
+
raises(Excon::Errors::Unauthorized) { Fog::Rackspace::LoadBalancers.new:rackspace_api_key => 'bad_key' }
|
115
|
+
end
|
112
116
|
end
|
113
117
|
|
114
118
|
pending if Fog.mocking?
|
@@ -77,7 +77,8 @@ Shindo.tests('Fog::Compute::RackspaceV2 | server', ['rackspace']) do
|
|
77
77
|
end
|
78
78
|
|
79
79
|
tests('#update').succeeds do
|
80
|
-
|
80
|
+
new_name = "fog_server_update#{Time.now.to_i.to_s}"
|
81
|
+
@instance.name = new_name
|
81
82
|
@instance.access_ipv4_address= "10.10.0.1"
|
82
83
|
@instance.access_ipv6_address= "::1"
|
83
84
|
@instance.save
|
@@ -85,7 +86,7 @@ Shindo.tests('Fog::Compute::RackspaceV2 | server', ['rackspace']) do
|
|
85
86
|
@instance.reload
|
86
87
|
returns("10.10.0.1") { @instance.access_ipv4_address }
|
87
88
|
returns("::1") { @instance.access_ipv6_address }
|
88
|
-
returns(
|
89
|
+
returns(new_name) { @instance.name }
|
89
90
|
end
|
90
91
|
|
91
92
|
tests('#reboot("SOFT")').succeeds do
|
@@ -98,18 +99,6 @@ Shindo.tests('Fog::Compute::RackspaceV2 | server', ['rackspace']) do
|
|
98
99
|
@instance.reboot('HARD')
|
99
100
|
returns('HARD_REBOOT') { @instance.state }
|
100
101
|
end
|
101
|
-
|
102
|
-
@instance.wait_for { ready? }
|
103
|
-
@test_image = nil
|
104
|
-
begin
|
105
|
-
tests('#create_image').succeeds do
|
106
|
-
@test_image = @instance.create_image('fog-test-image')
|
107
|
-
@test_image.reload
|
108
|
-
returns('SAVING') { @test_image.state }
|
109
|
-
end
|
110
|
-
ensure
|
111
|
-
@test_image.destroy unless @test_image.nil? || Fog.mocking?
|
112
|
-
end
|
113
102
|
|
114
103
|
sleep 30 unless Fog.mocking?
|
115
104
|
@instance.wait_for { ready? }
|
@@ -165,6 +154,18 @@ Shindo.tests('Fog::Compute::RackspaceV2 | server', ['rackspace']) do
|
|
165
154
|
returns('somerandompassword') { @instance.password }
|
166
155
|
end
|
167
156
|
|
157
|
+
@instance.wait_for { ready? }
|
158
|
+
@test_image = nil
|
159
|
+
begin
|
160
|
+
tests('#create_image').succeeds do
|
161
|
+
@test_image = @instance.create_image('fog-test-image')
|
162
|
+
@test_image.reload
|
163
|
+
returns('SAVING') { @test_image.state }
|
164
|
+
end
|
165
|
+
ensure
|
166
|
+
@test_image.destroy unless @test_image.nil? || Fog.mocking?
|
167
|
+
end
|
168
|
+
|
168
169
|
tests('attachments') do
|
169
170
|
begin
|
170
171
|
@volume = cbs_service.volumes.create(:size => 100, :display_name => "fog-#{Time.now.to_i.to_s}")
|
@@ -189,13 +190,6 @@ Shindo.tests('Fog::Compute::RackspaceV2 | server', ['rackspace']) do
|
|
189
190
|
@instance.wait_for { ready? }
|
190
191
|
end
|
191
192
|
|
192
|
-
wait_for_server_deletion(@instance)
|
193
|
-
sleep 60 unless Fog.mocking?
|
194
|
-
|
195
|
-
tests("delete network #{@network.label}").succeeds do
|
196
|
-
@network.destroy if @network
|
197
|
-
end
|
198
|
-
|
199
193
|
#When after testing resize/resize_confirm we get a 409 when we try to resize_revert so I am going to split it into two blocks
|
200
194
|
model_tests(service.servers, options, true) do
|
201
195
|
@instance.wait_for { ready? }
|
@@ -211,4 +205,7 @@ Shindo.tests('Fog::Compute::RackspaceV2 | server', ['rackspace']) do
|
|
211
205
|
end
|
212
206
|
@instance.wait_for { ready? }
|
213
207
|
end
|
208
|
+
|
209
|
+
wait_for_server_deletion(@instance)
|
210
|
+
delete_test_network(@network)
|
214
211
|
end
|
@@ -3,35 +3,60 @@ require 'fog/rackspace/models/identity/service_catalog'
|
|
3
3
|
Shindo.tests('Fog::Rackspace::ServiceCatalog | users', ['rackspace']) do
|
4
4
|
|
5
5
|
tests('#from_response') do
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
"publicURL"=>"https://dfw.servers.api.rackspacecloud.com/v2/777"}, {"region"=>"ORD", "versionId"=>"2", "tenantId"=>"777",
|
24
|
-
"versionList"=>"https://ord.servers.api.rackspacecloud.com/", "versionInfo"=>"https://ord.servers.api.rackspacecloud.com/v2",
|
25
|
-
"publicURL"=>"https://ord.servers.api.rackspacecloud.com/v2/777"}], "name"=>"cloudServersOpenStack"}, {"type"=>"rax:monitor", "endpoints"=>[{"tenantId"=>"777",
|
26
|
-
"publicURL"=>"https://monitoring.api.rackspacecloud.com/v1.0/777"}], "name"=>"cloudMonitoring"}, {"type"=>"rax:object-cdn", "endpoints"=>[{"region"=>"DFW",
|
27
|
-
"tenantId"=>"Mosso777", "publicURL"=>"https://cdn1.clouddrive.com/v1/Mosso777"},
|
28
|
-
{"region"=>"ORD", "tenantId"=>"Mosso777",
|
29
|
-
"publicURL"=>"https://cdn2.clouddrive.com/v1/Mosso777"}], "name"=>"cloudFilesCDN"}], "user"=>{"roles"=>[{"description"=>"User Admin
|
30
|
-
Role.", "name"=>"identity:user-admin", "id"=>"3"}], "name"=>"joe-racker", "RAX-AUTH:defaultRegion"=>"", "id"=>"TK421"}}}
|
6
|
+
tests('missing serviceCatalog node') do
|
7
|
+
before_hash = {"access"=>{"token"=>{"expires"=>"2013-02-20T10:31:00.000-06:00", "tenant"=>{"name"=>"777", "id"=>"777"}, "id"=>"6ca10877-7c50-4a5c-b58f-004d835c39c3"}}}
|
8
|
+
after_hash = {}
|
9
|
+
service_catalog = Fog::Rackspace::Identity::ServiceCatalog.from_response(nil, before_hash)
|
10
|
+
returns(after_hash) { service_catalog.catalog }
|
11
|
+
end
|
12
|
+
|
13
|
+
tests('missing serviceCatalog node') do
|
14
|
+
before_hash = {"access"=>{"token"=>{"expires"=>"2013-02-20T10:31:00.000-06:00", "tenant"=>{"name"=>"777", "id"=>"777"}, "id"=>"6ca10877-7c50-4a5c-b58f-004d835c39c3"}, "serviceCatalog"=>[{"type"=>"volume", "name"=>"cloudBlockStorage", "endpoints" =>[{"region"=>"DFW", "tenantId"=>"777" }]}, {"type"=>"rax:load-balancer","name"=>"cloudLoadBalancers", "endpoints"=>[{"region"=>"ORD", "tenantId"=>"777", "publicURL"=>"https://ord.loadbalancers.api.rackspacecloud.com/v1.0/777"}] }] }}
|
15
|
+
|
16
|
+
after_hash = {:cloudBlockStorage=>nil, :cloudLoadBalancers=>"https://ord.loadbalancers.api.rackspacecloud.com/v1.0/777"}
|
17
|
+
service_catalog = Fog::Rackspace::Identity::ServiceCatalog.from_response(nil, before_hash)
|
18
|
+
returns(after_hash) { service_catalog.catalog }
|
19
|
+
end
|
20
|
+
|
21
|
+
tests('missing region') do
|
22
|
+
before_hash = {"access"=>{"token"=>{"expires"=>"2013-02-20T10:31:00.000-06:00", "tenant"=>{"name"=>"777", "id"=>"777"}, "id"=>"6ca10877-7c50-4a5c-b58f-004d835c39c3"}, "serviceCatalog"=> [{"type"=>"rax:load-balancer","name"=>"cloudLoadBalancers", "endpoints"=>[{"region"=>"ORD", "tenantId"=>"777", "publicURL"=>"https://ord.loadbalancers.api.rackspacecloud.com/v1.0/777"}, {"tenantId"=>"777", "publicURL"=>"https://ord.loadbalancers.api.rackspacecloud.com/v1.0/777"}] }] }}
|
31
23
|
|
32
|
-
|
33
|
-
|
34
|
-
|
24
|
+
after_hash = {:cloudLoadBalancers=>{:ord=>"https://ord.loadbalancers.api.rackspacecloud.com/v1.0/777", :global=>"https://ord.loadbalancers.api.rackspacecloud.com/v1.0/777"}}
|
25
|
+
service_catalog = Fog::Rackspace::Identity::ServiceCatalog.from_response(nil, before_hash)
|
26
|
+
returns(after_hash) { service_catalog.catalog }
|
27
|
+
end
|
28
|
+
|
29
|
+
tests('successful') do
|
30
|
+
before_hash = {"access"=>{"token"=>{"expires"=>"2013-02-20T10:31:00.000-06:00", "tenant"=>{"name"=>"777", "id"=>"777"}, "id"=>"6ca10877-7c50-4a5c-b58f-004d835c39c3"},
|
31
|
+
"serviceCatalog"=>[{"type"=>"volume", "endpoints"=>[{"region"=>"DFW", "tenantId"=>"777", "publicURL"=>"https://dfw.blockstorage.api.rackspacecloud.com/v1/777"},
|
32
|
+
{"region"=>"ORD", "tenantId"=>"777", "publicURL"=>"https://ord.blockstorage.api.rackspacecloud.com/v1/777"}], "name"=>"cloudBlockStorage"},
|
33
|
+
{"type"=>"rax:load-balancer", "endpoints"=>[{"region"=>"ORD", "tenantId"=>"777", "publicURL"=>"https://ord.loadbalancers.api.rackspacecloud.com/v1.0/777"},
|
34
|
+
{"region"=>"DFW", "tenantId"=>"777", "publicURL"=>"https://dfw.loadbalancers.api.rackspacecloud.com/v1.0/777"}], "name"=>"cloudLoadBalancers"},
|
35
|
+
{"type"=>"object-store", "endpoints"=>[{"internalURL"=>"https://snet-storage101.dfw1.clouddrive.com/v1/Mosso777", "region"=>"DFW",
|
36
|
+
"tenantId"=>"Mosso777",
|
37
|
+
"publicURL"=>"https://storage101.dfw1.clouddrive.com/v1/Mosso777"},
|
38
|
+
{"internalURL"=>"https://snet-storage101.ord1.clouddrive.com/v1/Mosso777", "region"=>"ORD",
|
39
|
+
"tenantId"=>"Mosso777",
|
40
|
+
"publicURL"=>"https://storage101.ord1.clouddrive.com/v1/Mosso777"}], "name"=>"cloudFiles"}, {"type"=>"rax:database",
|
41
|
+
"endpoints"=>[{"region"=>"DFW", "tenantId"=>"777", "publicURL"=>"https://dfw.databases.api.rackspacecloud.com/v1.0/777"}, {"region"=>"ORD", "tenantId"=>"777",
|
42
|
+
"publicURL"=>"https://ord.databases.api.rackspacecloud.com/v1.0/777"}], "name"=>"cloudDatabases"}, {"type"=>"rax:dns", "endpoints"=>[{"tenantId"=>"777",
|
43
|
+
"publicURL"=>"https://dns.api.rackspacecloud.com/v1.0/777"}], "name"=>"cloudDNS"}, {"type"=>"compute", "endpoints"=>[{"versionId"=>"1.0", "tenantId"=>"777",
|
44
|
+
"versionList"=>"https://servers.api.rackspacecloud.com/", "versionInfo"=>"https://servers.api.rackspacecloud.com/v1.0",
|
45
|
+
"publicURL"=>"https://servers.api.rackspacecloud.com/v1.0/777"}], "name"=>"cloudServers"}, {"type"=>"compute", "endpoints"=>[{"region"=>"DFW", "versionId"=>"2",
|
46
|
+
"tenantId"=>"777", "versionList"=>"https://dfw.servers.api.rackspacecloud.com/", "versionInfo"=>"https://dfw.servers.api.rackspacecloud.com/v2",
|
47
|
+
"publicURL"=>"https://dfw.servers.api.rackspacecloud.com/v2/777"}, {"region"=>"ORD", "versionId"=>"2", "tenantId"=>"777",
|
48
|
+
"versionList"=>"https://ord.servers.api.rackspacecloud.com/", "versionInfo"=>"https://ord.servers.api.rackspacecloud.com/v2",
|
49
|
+
"publicURL"=>"https://ord.servers.api.rackspacecloud.com/v2/777"}], "name"=>"cloudServersOpenStack"}, {"type"=>"rax:monitor", "endpoints"=>[{"tenantId"=>"777",
|
50
|
+
"publicURL"=>"https://monitoring.api.rackspacecloud.com/v1.0/777"}], "name"=>"cloudMonitoring"}, {"type"=>"rax:object-cdn", "endpoints"=>[{"region"=>"DFW",
|
51
|
+
"tenantId"=>"Mosso777", "publicURL"=>"https://cdn1.clouddrive.com/v1/Mosso777"},
|
52
|
+
{"region"=>"ORD", "tenantId"=>"Mosso777",
|
53
|
+
"publicURL"=>"https://cdn2.clouddrive.com/v1/Mosso777"}], "name"=>"cloudFilesCDN"}], "user"=>{"roles"=>[{"description"=>"User Admin
|
54
|
+
Role.", "name"=>"identity:user-admin", "id"=>"3"}], "name"=>"joe-racker", "RAX-AUTH:defaultRegion"=>"", "id"=>"TK421"}}}
|
55
|
+
|
56
|
+
after_hash = {:cloudServers=>"https://servers.api.rackspacecloud.com/v1.0/777", :cloudServersOpenStack=>{:dfw=>"https://dfw.servers.api.rackspacecloud.com/v2/777", :ord=>"https://ord.servers.api.rackspacecloud.com/v2/777"}, :cloudFiles=>{:dfw=>"https://storage101.dfw1.clouddrive.com/v1/Mosso777", :ord=>"https://storage101.ord1.clouddrive.com/v1/Mosso777"}, :cloudBlockStorage=>{:dfw=>"https://dfw.blockstorage.api.rackspacecloud.com/v1/777", :ord=>"https://ord.blockstorage.api.rackspacecloud.com/v1/777"}, :cloudMonitoring=>"https://monitoring.api.rackspacecloud.com/v1.0/777", :cloudLoadBalancers=>{:dfw=>"https://dfw.loadbalancers.api.rackspacecloud.com/v1.0/777", :ord=>"https://ord.loadbalancers.api.rackspacecloud.com/v1.0/777"}, :cloudFilesCDN=>{:dfw=>"https://cdn1.clouddrive.com/v1/Mosso777", :ord=>"https://cdn2.clouddrive.com/v1/Mosso777"}, :cloudDatabases=>{:dfw=>"https://dfw.databases.api.rackspacecloud.com/v1.0/777", :ord=>"https://ord.databases.api.rackspacecloud.com/v1.0/777"}, :cloudDNS=>"https://dns.api.rackspacecloud.com/v1.0/777"}
|
57
|
+
@service_catalog = Fog::Rackspace::Identity::ServiceCatalog.from_response(nil, before_hash)
|
58
|
+
returns(after_hash) { @service_catalog.catalog }
|
59
|
+
end
|
35
60
|
end
|
36
61
|
|
37
62
|
tests('services') do
|
@@ -75,7 +100,7 @@ Shindo.tests('Fog::Rackspace::ServiceCatalog | users', ['rackspace']) do
|
|
75
100
|
returns("http:///fake-endpoint.com") { service.service_catalog.get_endpoint :fakeService }
|
76
101
|
service_catalog.reload
|
77
102
|
raises(RuntimeError) { service_catalog.get_endpoint :fakeService }
|
78
|
-
raises(RuntimeError) { service.service_catalog.get_endpoint :fakeService }
|
103
|
+
raises(RuntimeError) { service.service_catalog.get_endpoint :fakeService }
|
79
104
|
|
80
105
|
end
|
81
106
|
end
|
@@ -20,6 +20,11 @@ Shindo.tests('Fog::Rackspace::LoadBalancers | load_balancer', ['rackspace']) do
|
|
20
20
|
end
|
21
21
|
|
22
22
|
@instance.wait_for { ready? }
|
23
|
+
|
24
|
+
tests('#stats').succeeds do
|
25
|
+
@instance.stats
|
26
|
+
end
|
27
|
+
|
23
28
|
tests('#enable_connection_logging').succeeds do
|
24
29
|
@instance.enable_connection_logging
|
25
30
|
returns(true) { @instance.connection_logging }
|
@@ -17,10 +17,10 @@ Shindo.tests('Fog::Rackspace::Monitoring | alarm', ['rackspace','rackspace_monit
|
|
17
17
|
check = Fog::Rackspace::Monitoring::Check.new(:id => check_id)
|
18
18
|
check.entity = entity
|
19
19
|
alarm = Fog::Rackspace::Monitoring::Alarm.new
|
20
|
-
alarm.
|
20
|
+
alarm.check = check.id
|
21
21
|
|
22
22
|
returns(Fog::Rackspace::Monitoring::Alarm) { alarm.class }
|
23
|
-
returns(check_id) { alarm.
|
23
|
+
returns(check_id) { alarm.check.id }
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
@@ -63,10 +63,15 @@ Shindo.tests('Fog::Rackspace::Monitoring', ['rackspace','rackspace_monitoring'])
|
|
63
63
|
tests('reauthentication') do
|
64
64
|
pending if Fog.mocking?
|
65
65
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
66
|
+
tests('should reauth with valid credentials') do
|
67
|
+
@service = Fog::Rackspace::Monitoring.new
|
68
|
+
returns(true, "auth token populated") { !@service.send(:auth_token).nil? }
|
69
|
+
@service.instance_variable_set("@auth_token", "bad_token")
|
70
|
+
returns(true) { [200, 203].include? @service.list_entities.status }
|
71
|
+
end
|
72
|
+
tests('should terminate with incorrect credentials') do
|
73
|
+
raises(Excon::Errors::Unauthorized) { Fog::Rackspace::Monitoring.new :rackspace_api_key => 'bad_key' }
|
74
|
+
end
|
70
75
|
end
|
71
76
|
|
72
77
|
end
|
@@ -34,6 +34,12 @@ Shindo.tests('Fog::Compute::RackspaceV2 | flavor_tests', ['rackspace']) do
|
|
34
34
|
body
|
35
35
|
end
|
36
36
|
|
37
|
+
tests('#list_flavors_detail').formats(list_flavor_format) do
|
38
|
+
body = service.list_flavors_detail.body
|
39
|
+
flavor_id = body['flavors'][0]['id']
|
40
|
+
body
|
41
|
+
end
|
42
|
+
|
37
43
|
tests('#get_flavor').formats(get_flavor_format) do
|
38
44
|
service.get_flavor(flavor_id).body
|
39
45
|
end
|
@@ -48,6 +48,10 @@ Shindo.tests('Fog::Compute::RackspaceV2 | image_tests', ['rackspace']) do
|
|
48
48
|
service.list_images.body
|
49
49
|
end
|
50
50
|
|
51
|
+
tests('#list_images_detail').formats(list_image_format) do
|
52
|
+
service.list_images_detail.body
|
53
|
+
end
|
54
|
+
|
51
55
|
tests('#get_image').formats(get_image_format, false) do
|
52
56
|
service.get_image(@image_id).body
|
53
57
|
end
|
@@ -106,7 +106,7 @@ Shindo.tests('Fog::Compute::RackspaceV2 | server_tests', ['rackspace']) do
|
|
106
106
|
sleep 120 unless Fog.mocking?
|
107
107
|
|
108
108
|
tests('#resize_server').succeeds do
|
109
|
-
resize_flavor_id = flavor_id
|
109
|
+
resize_flavor_id = Fog.mocking? ? flavor_id : service.flavors[1].id
|
110
110
|
service.resize_server(server_id, resize_flavor_id)
|
111
111
|
end
|
112
112
|
wait_for_server_state(service, server_id, 'VERIFY_RESIZE', 'ACTIVE')
|
@@ -117,7 +117,7 @@ Shindo.tests('Fog::Compute::RackspaceV2 | server_tests', ['rackspace']) do
|
|
117
117
|
wait_for_server_state(service, server_id, 'ACTIVE', 'ERROR')
|
118
118
|
|
119
119
|
tests('#resize_server').succeeds do
|
120
|
-
resize_flavor_id = flavor_id
|
120
|
+
resize_flavor_id = Fog.mocking? ? flavor_id : service.flavors[1].id
|
121
121
|
service.resize_server(server_id, resize_flavor_id)
|
122
122
|
end
|
123
123
|
wait_for_server_state(service, server_id, 'VERIFY_RESIZE', 'ACTIVE')
|
@@ -0,0 +1,13 @@
|
|
1
|
+
Shindo.tests('Fog::Rackspace::LoadBalancers | load_balancer_get_stats', ['rackspace']) do
|
2
|
+
|
3
|
+
given_a_load_balancer_service do
|
4
|
+
given_a_load_balancer do
|
5
|
+
tests('success') do
|
6
|
+
@lb.wait_for { ready? }
|
7
|
+
tests("#get_stats(#{@lb.id})").formats(LOAD_BALANCER_STATS_FORMAT) do
|
8
|
+
@service.get_stats(@lb.id).body
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|