fog 0.5.2 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile.lock +3 -3
- data/fog.gemspec +2 -2
- data/lib/fog.rb +1 -1
- data/lib/fog/cdn/aws.rb +4 -1
- data/lib/fog/compute/parsers/terremark_ecloud/get_ip_address.rb +23 -0
- data/lib/fog/compute/parsers/terremark_ecloud/get_task.rb +42 -0
- data/lib/fog/compute/parsers/terremark_ecloud/get_task_list.rb +51 -0
- data/lib/fog/compute/requests/terremark_ecloud/get_ip_address.rb +19 -0
- data/lib/fog/compute/requests/terremark_ecloud/get_task.rb +19 -0
- data/lib/fog/compute/requests/terremark_ecloud/get_task_list.rb +19 -0
- data/lib/fog/compute/requests/terremark_ecloud/get_versions.rb +4 -2
- data/lib/fog/compute/requests/terremark_ecloud/login.rb +29 -0
- data/lib/fog/compute/terremark_ecloud.rb +18 -34
- data/lib/fog/core/attributes.rb +1 -1
- data/lib/fog/core/collection.rb +1 -0
- data/lib/fog/core/credentials.rb +1 -1
- data/lib/fog/core/model.rb +1 -0
- data/lib/fog/dns/aws.rb +4 -1
- data/lib/fog/storage/aws.rb +4 -3
- data/lib/fog/storage/google.rb +4 -1
- data/lib/fog/vcloud/terremark/ecloud/models/internet_service.rb +23 -1
- data/lib/fog/vcloud/terremark/ecloud/requests/add_internet_service.rb +47 -35
- data/lib/fog/vcloud/terremark/ecloud/requests/configure_internet_service.rb +5 -0
- data/spec/vcloud/models/vdc_spec.rb +7 -8
- data/spec/vcloud/requests/get_network_spec.rb +10 -10
- data/spec/vcloud/requests/get_organization_spec.rb +7 -8
- data/spec/vcloud/requests/get_vdc_spec.rb +4 -5
- data/spec/vcloud/requests/get_versions_spec.rb +2 -2
- data/spec/vcloud/spec_helper.rb +36 -32
- data/spec/vcloud/terremark/ecloud/models/backup_internet_service_spec.rb +3 -4
- data/spec/vcloud/terremark/ecloud/models/backup_internet_services_spec.rb +4 -5
- data/spec/vcloud/terremark/ecloud/models/internet_service_spec.rb +26 -3
- data/spec/vcloud/terremark/ecloud/models/internet_services_spec.rb +3 -3
- data/spec/vcloud/terremark/ecloud/models/ip_spec.rb +3 -3
- data/spec/vcloud/terremark/ecloud/models/ips_spec.rb +3 -3
- data/spec/vcloud/terremark/ecloud/models/network_spec.rb +4 -4
- data/spec/vcloud/terremark/ecloud/models/networks_spec.rb +3 -3
- data/spec/vcloud/terremark/ecloud/models/node_spec.rb +3 -3
- data/spec/vcloud/terremark/ecloud/models/nodes_spec.rb +3 -4
- data/spec/vcloud/terremark/ecloud/models/public_ip_spec.rb +3 -3
- data/spec/vcloud/terremark/ecloud/models/public_ips_spec.rb +3 -3
- data/spec/vcloud/terremark/ecloud/models/server_spec.rb +2 -2
- data/spec/vcloud/terremark/ecloud/models/vdc_spec.rb +5 -5
- data/spec/vcloud/terremark/ecloud/models/vdcs_spec.rb +3 -3
- data/spec/vcloud/terremark/ecloud/requests/add_backup_internet_service_spec.rb +2 -2
- data/spec/vcloud/terremark/ecloud/requests/add_internet_service_spec.rb +3 -3
- data/spec/vcloud/terremark/ecloud/requests/add_node_spec.rb +1 -1
- data/spec/vcloud/terremark/ecloud/requests/configure_internet_service_spec.rb +1 -1
- data/spec/vcloud/terremark/ecloud/requests/configure_network_ip_spec.rb +1 -1
- data/spec/vcloud/terremark/ecloud/requests/configure_node_spec.rb +1 -1
- data/spec/vcloud/terremark/ecloud/requests/configure_vapp_spec.rb +2 -2
- data/spec/vcloud/terremark/ecloud/requests/delete_internet_service_spec.rb +1 -1
- data/spec/vcloud/terremark/ecloud/requests/delete_node_spec.rb +1 -1
- data/spec/vcloud/terremark/ecloud/requests/delete_vapp_spec.rb +4 -4
- data/spec/vcloud/terremark/ecloud/requests/get_catalog_item_spec.rb +7 -8
- data/spec/vcloud/terremark/ecloud/requests/get_catalog_spec.rb +3 -3
- data/spec/vcloud/terremark/ecloud/requests/get_customization_options_spec.rb +2 -2
- data/spec/vcloud/terremark/ecloud/requests/get_internet_services_spec.rb +13 -13
- data/spec/vcloud/terremark/ecloud/requests/get_network_ip_spec.rb +2 -2
- data/spec/vcloud/terremark/ecloud/requests/get_network_ips_spec.rb +3 -4
- data/spec/vcloud/terremark/ecloud/requests/get_network_spec.rb +2 -2
- data/spec/vcloud/terremark/ecloud/requests/get_node_spec.rb +2 -2
- data/spec/vcloud/terremark/ecloud/requests/get_nodes_spec.rb +2 -2
- data/spec/vcloud/terremark/ecloud/requests/get_public_ip_spec.rb +2 -2
- data/spec/vcloud/terremark/ecloud/requests/get_public_ips_spec.rb +2 -2
- data/spec/vcloud/terremark/ecloud/requests/get_vapp_spec.rb +5 -6
- data/spec/vcloud/terremark/ecloud/requests/get_vdc_spec.rb +9 -10
- data/spec/vcloud/terremark/ecloud/requests/instantiate_vapp_template_spec.rb +5 -6
- data/spec/vcloud/terremark/ecloud/requests/power_off_spec.rb +1 -1
- data/spec/vcloud/terremark/ecloud/requests/power_on_spec.rb +1 -1
- data/spec/vcloud/vcloud_spec.rb +3 -3
- data/tests/compute/requests/terremark_ecloud/organization_tests.rb +5 -0
- data/tests/compute/requests/terremark_ecloud/task_tests.rb +39 -0
- data/tests/helpers/formats_helper.rb +5 -3
- metadata +47 -38
|
@@ -7,8 +7,8 @@ if Fog.mocking?
|
|
|
7
7
|
describe :class do
|
|
8
8
|
subject { Fog::Vcloud::Terremark::Ecloud::BackupInternetService }
|
|
9
9
|
|
|
10
|
-
it { should have_identity
|
|
11
|
-
it { should have_only_these_attributes
|
|
10
|
+
it { should have_identity(:href) }
|
|
11
|
+
it { should have_only_these_attributes([:href, :name, :id, :protocol, :enabled, :description, :timeout, :redirect_url, :monitor]) }
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
context "with no uri" do
|
|
@@ -23,7 +23,7 @@ if Fog.mocking?
|
|
|
23
23
|
|
|
24
24
|
let(:composed_service_data) { @vcloud.vdcs[0].backup_internet_services[0].send(:_compose_service_data) }
|
|
25
25
|
|
|
26
|
-
it { should be_an_instance_of
|
|
26
|
+
it { should be_an_instance_of(Fog::Vcloud::Terremark::Ecloud::BackupInternetService) }
|
|
27
27
|
|
|
28
28
|
its(:href) { should == @mock_backup_service.href }
|
|
29
29
|
its(:identity) { should == @mock_backup_service.href }
|
|
@@ -45,5 +45,4 @@ if Fog.mocking?
|
|
|
45
45
|
specify { composed_service_data[:timeout].should == subject.timeout.to_s }
|
|
46
46
|
end
|
|
47
47
|
end
|
|
48
|
-
else
|
|
49
48
|
end
|
|
@@ -5,7 +5,7 @@ if Fog.mocking?
|
|
|
5
5
|
context "as an attribute of a VDC" do
|
|
6
6
|
subject { @vcloud.vdcs[0] }
|
|
7
7
|
|
|
8
|
-
it { should respond_to
|
|
8
|
+
it { should respond_to(:backup_internet_services) }
|
|
9
9
|
|
|
10
10
|
describe :class do
|
|
11
11
|
subject { @vcloud.vdcs[0].backup_internet_services.class }
|
|
@@ -15,15 +15,14 @@ if Fog.mocking?
|
|
|
15
15
|
describe :backup_internet_services do
|
|
16
16
|
subject { @vcloud.vdcs[0].backup_internet_services }
|
|
17
17
|
|
|
18
|
-
it { should respond_to
|
|
18
|
+
it { should respond_to(:create) }
|
|
19
19
|
|
|
20
|
-
it { should be_an_instance_of
|
|
20
|
+
it { should be_an_instance_of(Fog::Vcloud::Terremark::Ecloud::BackupInternetServices) }
|
|
21
21
|
|
|
22
22
|
its(:length) { should == 1 }
|
|
23
23
|
|
|
24
|
-
it { should
|
|
24
|
+
it { should(have_members_of_the_right_model) }
|
|
25
25
|
end
|
|
26
26
|
end
|
|
27
27
|
end
|
|
28
|
-
else
|
|
29
28
|
end
|
|
@@ -7,8 +7,8 @@ if Fog.mocking?
|
|
|
7
7
|
describe :class do
|
|
8
8
|
subject { Fog::Vcloud::Terremark::Ecloud::InternetService }
|
|
9
9
|
|
|
10
|
-
it { should have_identity
|
|
11
|
-
it { should have_only_these_attributes
|
|
10
|
+
it { should have_identity(:href) }
|
|
11
|
+
it { should have_only_these_attributes([:href, :name, :id, :protocol, :port, :enabled, :description, :public_ip, :timeout, :redirect_url, :monitor, :backup_service_data]) }
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
context "with no uri" do
|
|
@@ -29,7 +29,7 @@ if Fog.mocking?
|
|
|
29
29
|
let(:composed_public_ip_data) { @vcloud.vdcs[0].public_ips[0].internet_services[0].send(:_compose_ip_data) }
|
|
30
30
|
let(:composed_service_data) { @vcloud.vdcs[0].public_ips[0].internet_services[0].send(:_compose_service_data) }
|
|
31
31
|
|
|
32
|
-
it { should be_an_instance_of
|
|
32
|
+
it { should be_an_instance_of(Fog::Vcloud::Terremark::Ecloud::InternetService) }
|
|
33
33
|
|
|
34
34
|
its(:href) { should == @mock_service.href }
|
|
35
35
|
its(:identity) { should == @mock_service.href }
|
|
@@ -75,6 +75,29 @@ if Fog.mocking?
|
|
|
75
75
|
to change { subject.send(:_compose_service_data)[:backup_service_uri] }.from(nil).to(@mock_backup_service.href)
|
|
76
76
|
end
|
|
77
77
|
end
|
|
78
|
+
|
|
79
|
+
describe "disable monitoring via #monitor=" do
|
|
80
|
+
specify do
|
|
81
|
+
expect { subject.monitor = {:type => "Disabled", :is_enabled => "true" }; subject.save }.to change {subject.monitor}.from(nil).to(ecloud_disabled_default_monitor)
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
describe "disable monitoring via #disable_monitor" do
|
|
87
|
+
specify do
|
|
88
|
+
expect { subject.disable_monitor }.to change {subject.monitor}.from(nil).to(ecloud_disabled_default_monitor)
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
context "with a disabled monitor" do
|
|
93
|
+
before { subject.disable_monitor }
|
|
94
|
+
|
|
95
|
+
describe "enable ping monitoring via #enable_ping_monitor" do
|
|
96
|
+
specify do
|
|
97
|
+
expect { subject.enable_ping_monitor }.to change {subject.monitor}.from(ecloud_disabled_default_monitor).to(nil)
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
end
|
|
78
101
|
end
|
|
79
102
|
end
|
|
80
103
|
else
|
|
@@ -5,7 +5,7 @@ if Fog.mocking?
|
|
|
5
5
|
context "as an attribute of a VDC" do
|
|
6
6
|
subject { @vcloud.vdcs[0] }
|
|
7
7
|
|
|
8
|
-
it { should respond_to
|
|
8
|
+
it { should respond_to(:internet_services) }
|
|
9
9
|
|
|
10
10
|
describe :class do
|
|
11
11
|
subject { @vcloud.vdcs[0].internet_services.class }
|
|
@@ -15,9 +15,9 @@ if Fog.mocking?
|
|
|
15
15
|
describe :internet_services do
|
|
16
16
|
subject { @vcloud.vdcs[0].internet_services }
|
|
17
17
|
|
|
18
|
-
it { should respond_to
|
|
18
|
+
it { should respond_to(:create) }
|
|
19
19
|
|
|
20
|
-
it { should be_an_instance_of
|
|
20
|
+
it { should be_an_instance_of(Fog::Vcloud::Terremark::Ecloud::InternetServices) }
|
|
21
21
|
|
|
22
22
|
its(:length) { should == 4 }
|
|
23
23
|
|
|
@@ -7,8 +7,8 @@ if Fog.mocking?
|
|
|
7
7
|
describe :class do
|
|
8
8
|
subject { Fog::Vcloud::Terremark::Ecloud::Ip }
|
|
9
9
|
|
|
10
|
-
it { should have_identity
|
|
11
|
-
it { should have_only_these_attributes
|
|
10
|
+
it { should have_identity(:href) }
|
|
11
|
+
it { should have_only_these_attributes([:href, :name, :status, :server, :rnat, :id]) }
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
context "with no uri" do
|
|
@@ -20,7 +20,7 @@ if Fog.mocking?
|
|
|
20
20
|
context "as a collection member" do
|
|
21
21
|
subject { @ip = @vcloud.vdcs[0].networks[0].ips[0] }
|
|
22
22
|
|
|
23
|
-
it { should be_an_instance_of
|
|
23
|
+
it { should be_an_instance_of(Fog::Vcloud::Terremark::Ecloud::Ip) }
|
|
24
24
|
|
|
25
25
|
its(:name) { should == @mock_data.network_ip_from_href(@ip.href).name }
|
|
26
26
|
its(:status) { should == @mock_data.network_ip_from_href(@ip.href).status }
|
|
@@ -4,7 +4,7 @@ if Fog.mocking?
|
|
|
4
4
|
describe "Fog::Vcloud::Terremark::Ecloud::Ips", :type => :mock_tmrk_ecloud_model do
|
|
5
5
|
subject { @vcloud }
|
|
6
6
|
|
|
7
|
-
it { should respond_to
|
|
7
|
+
it { should respond_to(:ips) }
|
|
8
8
|
|
|
9
9
|
describe :class do
|
|
10
10
|
subject { @vcloud.vdcs[0].networks[0].ips.class }
|
|
@@ -13,9 +13,9 @@ if Fog.mocking?
|
|
|
13
13
|
|
|
14
14
|
describe :ips do
|
|
15
15
|
subject { @vcloud.vdcs[0].networks[0].ips.reload }
|
|
16
|
-
it { should_not respond_to
|
|
16
|
+
it { should_not respond_to(:create) }
|
|
17
17
|
|
|
18
|
-
it { should be_an_instance_of
|
|
18
|
+
it { should be_an_instance_of(Fog::Vcloud::Terremark::Ecloud::Ips) }
|
|
19
19
|
|
|
20
20
|
its(:length) { should == 252 }
|
|
21
21
|
|
|
@@ -7,8 +7,8 @@ if Fog.mocking?
|
|
|
7
7
|
describe :class do
|
|
8
8
|
subject { Fog::Vcloud::Terremark::Ecloud::Network }
|
|
9
9
|
|
|
10
|
-
it { should have_identity
|
|
11
|
-
it { should have_only_these_attributes
|
|
10
|
+
it { should have_identity(:href) }
|
|
11
|
+
it { should have_only_these_attributes([:href, :name, :features, :links, :type, :gateway, :broadcast, :address, :rnat, :extension_href, :network_type, :vlan, :friendly_name]) }
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
context "with no uri" do
|
|
@@ -21,7 +21,7 @@ if Fog.mocking?
|
|
|
21
21
|
context "as a collection member" do
|
|
22
22
|
subject { @vcloud.vdcs[0].networks[0].reload }
|
|
23
23
|
|
|
24
|
-
it { should be_an_instance_of
|
|
24
|
+
it { should be_an_instance_of(Fog::Vcloud::Terremark::Ecloud::Network) }
|
|
25
25
|
|
|
26
26
|
its(:href) { should == @mock_network.href }
|
|
27
27
|
its(:identity) { should == @mock_network.href }
|
|
@@ -40,7 +40,7 @@ if Fog.mocking?
|
|
|
40
40
|
|
|
41
41
|
describe :features do
|
|
42
42
|
let(:feature) { subject.features.first }
|
|
43
|
-
specify { feature.should be_an_instance_of
|
|
43
|
+
specify { feature.should be_an_instance_of(Array) }
|
|
44
44
|
specify { feature.last.should == @mock_network.features[0][:value] }
|
|
45
45
|
end
|
|
46
46
|
|
|
@@ -4,7 +4,7 @@ if Fog.mocking?
|
|
|
4
4
|
describe "Fog::Vcloud::Terremark::Ecloud::Networks", :type => :mock_tmrk_ecloud_model do
|
|
5
5
|
subject { @vcloud }
|
|
6
6
|
|
|
7
|
-
it { should respond_to
|
|
7
|
+
it { should respond_to(:networks) }
|
|
8
8
|
|
|
9
9
|
describe :class do
|
|
10
10
|
subject { @vcloud.networks.class }
|
|
@@ -13,9 +13,9 @@ if Fog.mocking?
|
|
|
13
13
|
|
|
14
14
|
describe :networks do
|
|
15
15
|
subject { @vcloud.vdcs[0].networks }
|
|
16
|
-
it { should_not respond_to
|
|
16
|
+
it { should_not respond_to(:create) }
|
|
17
17
|
|
|
18
|
-
it { should be_an_instance_of
|
|
18
|
+
it { should be_an_instance_of(Fog::Vcloud::Terremark::Ecloud::Networks) }
|
|
19
19
|
|
|
20
20
|
its(:length) { should == 2 }
|
|
21
21
|
|
|
@@ -8,8 +8,8 @@ if Fog.mocking?
|
|
|
8
8
|
describe :class do
|
|
9
9
|
subject { Fog::Vcloud::Terremark::Ecloud::Node }
|
|
10
10
|
|
|
11
|
-
it { should have_identity
|
|
12
|
-
it { should have_only_these_attributes
|
|
11
|
+
it { should have_identity(:href) }
|
|
12
|
+
it { should have_only_these_attributes([:href, :ip_address, :description, :name, :port, :enabled, :id]) }
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
context "with no uri" do
|
|
@@ -22,7 +22,7 @@ if Fog.mocking?
|
|
|
22
22
|
context "as a collection member" do
|
|
23
23
|
subject { @vcloud.vdcs.first.public_ips.first.internet_services.first.nodes.first.reload }
|
|
24
24
|
|
|
25
|
-
it { should be_an_instance_of
|
|
25
|
+
it { should be_an_instance_of(Fog::Vcloud::Terremark::Ecloud::Node) }
|
|
26
26
|
|
|
27
27
|
its(:href) { should == @mock_node.href }
|
|
28
28
|
its(:identity) { should == @mock_node.href }
|
|
@@ -5,7 +5,7 @@ if Fog.mocking?
|
|
|
5
5
|
context "as an attribute of an internet_service" do
|
|
6
6
|
subject { @vcloud.vdcs.first.public_ips.first.internet_services.first }
|
|
7
7
|
|
|
8
|
-
it { should respond_to
|
|
8
|
+
it { should respond_to(:nodes) }
|
|
9
9
|
|
|
10
10
|
describe :class do
|
|
11
11
|
subject { @vcloud.vdcs.first.public_ips.first.internet_services.first.nodes.class }
|
|
@@ -15,9 +15,9 @@ if Fog.mocking?
|
|
|
15
15
|
describe :nodes do
|
|
16
16
|
subject { @vcloud.vdcs.first.public_ips.first.internet_services.first.nodes }
|
|
17
17
|
|
|
18
|
-
it { should respond_to
|
|
18
|
+
it { should respond_to(:create) }
|
|
19
19
|
|
|
20
|
-
it { should be_an_instance_of
|
|
20
|
+
it { should be_an_instance_of(Fog::Vcloud::Terremark::Ecloud::Nodes) }
|
|
21
21
|
|
|
22
22
|
its(:length) { should == 3 }
|
|
23
23
|
|
|
@@ -25,5 +25,4 @@ if Fog.mocking?
|
|
|
25
25
|
end
|
|
26
26
|
end
|
|
27
27
|
end
|
|
28
|
-
else
|
|
29
28
|
end
|
|
@@ -7,8 +7,8 @@ if Fog.mocking?
|
|
|
7
7
|
describe :class do
|
|
8
8
|
subject { Fog::Vcloud::Terremark::Ecloud::PublicIp }
|
|
9
9
|
|
|
10
|
-
it { should have_identity
|
|
11
|
-
it { should have_only_these_attributes
|
|
10
|
+
it { should have_identity(:href) }
|
|
11
|
+
it { should have_only_these_attributes([:name, :id, :href]) }
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
context "with no uri" do
|
|
@@ -21,7 +21,7 @@ if Fog.mocking?
|
|
|
21
21
|
context "as a collection member" do
|
|
22
22
|
subject { @vcloud.vdcs[0].public_ips[0].reload; @vcloud.vdcs[0].public_ips[0] }
|
|
23
23
|
|
|
24
|
-
it { should be_an_instance_of
|
|
24
|
+
it { should be_an_instance_of(Fog::Vcloud::Terremark::Ecloud::PublicIp) }
|
|
25
25
|
|
|
26
26
|
its(:href) { should == @mock_public_ip.href }
|
|
27
27
|
its(:identity) { should == @mock_public_ip.href }
|
|
@@ -4,7 +4,7 @@ if Fog.mocking?
|
|
|
4
4
|
describe "Fog::Vcloud::Terremark::Ecloud::PublicIps", :type => :mock_tmrk_ecloud_model do
|
|
5
5
|
subject { @vcloud }
|
|
6
6
|
|
|
7
|
-
it { should respond_to
|
|
7
|
+
it { should respond_to(:public_ips) }
|
|
8
8
|
|
|
9
9
|
describe :class do
|
|
10
10
|
subject { @vcloud.public_ips.class }
|
|
@@ -13,9 +13,9 @@ if Fog.mocking?
|
|
|
13
13
|
|
|
14
14
|
describe :public_ips do
|
|
15
15
|
subject { @vcloud.vdcs[0].public_ips }
|
|
16
|
-
it { should_not respond_to
|
|
16
|
+
it { should_not respond_to(:create) }
|
|
17
17
|
|
|
18
|
-
it { should be_an_instance_of
|
|
18
|
+
it { should be_an_instance_of(Fog::Vcloud::Terremark::Ecloud::PublicIps) }
|
|
19
19
|
|
|
20
20
|
its(:length) { should == 3 }
|
|
21
21
|
|
|
@@ -7,8 +7,8 @@ if Fog.mocking?
|
|
|
7
7
|
describe :class do
|
|
8
8
|
subject { Fog::Vcloud::Terremark::Ecloud::Server }
|
|
9
9
|
|
|
10
|
-
it { should have_identity
|
|
11
|
-
it { should have_only_these_attributes
|
|
10
|
+
it { should have_identity(:href) }
|
|
11
|
+
it { should have_only_these_attributes([:href, :type, :name, :status, :network_connections, :os, :virtual_hardware, :storage_size, :links]) }
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
context "with no uri" do
|
|
@@ -4,14 +4,14 @@ if Fog.mocking?
|
|
|
4
4
|
describe "Fog::Vcloud::Terremark::Ecloud::Vdc", :type => :mock_tmrk_ecloud_model do
|
|
5
5
|
subject { @vcloud }
|
|
6
6
|
|
|
7
|
-
it { should respond_to
|
|
7
|
+
it { should respond_to(:get_vdc) }
|
|
8
8
|
|
|
9
9
|
describe :class do
|
|
10
10
|
subject { Fog::Vcloud::Terremark::Ecloud::Vdc }
|
|
11
11
|
|
|
12
|
-
it { should have_identity
|
|
13
|
-
it { should have_only_these_attributes
|
|
14
|
-
:resource_entities, :deployed_vm_quota, :instantiated_vm_quota] }
|
|
12
|
+
it { should have_identity(:href) }
|
|
13
|
+
it { should have_only_these_attributes([:href, :name, :type, :description, :other_links, :compute_capacity, :storage_capacity, :available_networks,
|
|
14
|
+
:resource_entities, :deployed_vm_quota, :instantiated_vm_quota]) }
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
context "with no uri" do
|
|
@@ -27,7 +27,7 @@ if Fog.mocking?
|
|
|
27
27
|
its(:href) { should == @mock_vdc.href }
|
|
28
28
|
its(:identity) { should == @mock_vdc.href }
|
|
29
29
|
its(:name) { should == @mock_vdc.name }
|
|
30
|
-
its(:public_ips) { should be_an_instance_of
|
|
30
|
+
its(:public_ips) { should be_an_instance_of(Fog::Vcloud::Terremark::Ecloud::PublicIps) }
|
|
31
31
|
its(:other_links) { should have(4).items }
|
|
32
32
|
its(:resource_entities) { should have(3).items }
|
|
33
33
|
its(:available_networks) { should have(2).items }
|
|
@@ -4,7 +4,7 @@ if Fog.mocking?
|
|
|
4
4
|
describe "Fog::Vcloud::Terremark::Ecloud::Vdcs", :type => :mock_tmrk_ecloud_model do
|
|
5
5
|
subject { @vcloud }
|
|
6
6
|
|
|
7
|
-
it { should respond_to
|
|
7
|
+
it { should respond_to(:vdcs) }
|
|
8
8
|
|
|
9
9
|
describe :class do
|
|
10
10
|
subject { @vcloud.vdcs.class }
|
|
@@ -13,9 +13,9 @@ if Fog.mocking?
|
|
|
13
13
|
|
|
14
14
|
describe :vdcs do
|
|
15
15
|
subject { @vcloud.vdcs }
|
|
16
|
-
it { should_not respond_to
|
|
16
|
+
it { should_not respond_to(:create) }
|
|
17
17
|
|
|
18
|
-
it { should be_an_instance_of
|
|
18
|
+
it { should be_an_instance_of(Fog::Vcloud::Terremark::Ecloud::Vdcs) }
|
|
19
19
|
|
|
20
20
|
its(:length) { should == 2 }
|
|
21
21
|
|
|
@@ -4,7 +4,7 @@ if Fog.mocking?
|
|
|
4
4
|
describe "Fog::Vcloud, initialized w/ the TMRK Ecloud module", :type => :mock_tmrk_ecloud_request do
|
|
5
5
|
subject { @vcloud }
|
|
6
6
|
|
|
7
|
-
it { should respond_to
|
|
7
|
+
it { should respond_to(:add_backup_internet_service) }
|
|
8
8
|
|
|
9
9
|
describe "#add_backup_internet_service" do
|
|
10
10
|
before do
|
|
@@ -28,7 +28,7 @@ if Fog.mocking?
|
|
|
28
28
|
|
|
29
29
|
let(:body) { subject.body }
|
|
30
30
|
|
|
31
|
-
its(:body) { should be_an_instance_of
|
|
31
|
+
its(:body) { should be_an_instance_of(Hash) }
|
|
32
32
|
specify { body[:Href].should_not be_empty }
|
|
33
33
|
specify { body[:Name].should == @new_backup_service_data[:name] }
|
|
34
34
|
specify { body[:Protocol].should == @new_backup_service_data[:protocol] }
|
|
@@ -4,7 +4,7 @@ if Fog.mocking?
|
|
|
4
4
|
describe "Fog::Vcloud, initialized w/ the TMRK Ecloud module", :type => :mock_tmrk_ecloud_request do
|
|
5
5
|
subject { @vcloud }
|
|
6
6
|
|
|
7
|
-
it { should respond_to
|
|
7
|
+
it { should respond_to(:add_internet_service) }
|
|
8
8
|
|
|
9
9
|
describe "#add_internet_service" do
|
|
10
10
|
before do
|
|
@@ -29,7 +29,7 @@ if Fog.mocking?
|
|
|
29
29
|
|
|
30
30
|
let(:body) { subject.body }
|
|
31
31
|
|
|
32
|
-
its(:body) { should be_an_instance_of
|
|
32
|
+
its(:body) { should be_an_instance_of(Hash) }
|
|
33
33
|
specify { body[:Href].should_not be_empty }
|
|
34
34
|
specify { body[:Name].should == @new_service_data[:name] }
|
|
35
35
|
specify { body[:Protocol].should == @new_service_data[:protocol] }
|
|
@@ -39,7 +39,7 @@ if Fog.mocking?
|
|
|
39
39
|
specify { body[:Monitor].should == nil }
|
|
40
40
|
|
|
41
41
|
let(:referenced_public_ip) { subject.body[:PublicIpAddress] }
|
|
42
|
-
specify { referenced_public_ip.should be_an_instance_of
|
|
42
|
+
specify { referenced_public_ip.should be_an_instance_of(Hash) }
|
|
43
43
|
specify { referenced_public_ip[:Name].should == @public_ip.name }
|
|
44
44
|
specify { referenced_public_ip[:Id].should == @public_ip.id }
|
|
45
45
|
|
|
@@ -4,7 +4,7 @@ if Fog.mocking?
|
|
|
4
4
|
describe "Fog::Vcloud, initialized w/ the TMRK Ecloud module", :type => :mock_tmrk_ecloud_request do
|
|
5
5
|
subject { @vcloud }
|
|
6
6
|
|
|
7
|
-
it { should respond_to
|
|
7
|
+
it { should respond_to(:configure_internet_service) }
|
|
8
8
|
|
|
9
9
|
describe "#configure_internet_service" do
|
|
10
10
|
before do
|
|
@@ -4,7 +4,7 @@ if Fog.mocking?
|
|
|
4
4
|
describe "Fog::Vcloud, initialized w/ the TMRK Ecloud module", :type => :mock_tmrk_ecloud_request do
|
|
5
5
|
subject { @vcloud }
|
|
6
6
|
|
|
7
|
-
it { should respond_to
|
|
7
|
+
it { should respond_to(:configure_network_ip) }
|
|
8
8
|
|
|
9
9
|
describe "#configure_network_ip" do
|
|
10
10
|
let(:original_network_ip) { @vcloud.get_network_ip(@mock_network_ip.href).body }
|
|
@@ -4,7 +4,7 @@ if Fog.mocking?
|
|
|
4
4
|
describe "Fog::Vcloud, initialized w/ the TMRK Ecloud module", :type => :mock_tmrk_ecloud_request do
|
|
5
5
|
subject { @vcloud }
|
|
6
6
|
|
|
7
|
-
it { should respond_to
|
|
7
|
+
it { should respond_to(:configure_node) }
|
|
8
8
|
|
|
9
9
|
describe "#configure_node" do
|
|
10
10
|
let(:original_node) { @vcloud.get_node(@mock_node.href).body }
|