icontrol 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/icontrol/attributable.rb +3 -3
- data/lib/icontrol/base.rb +6 -14
- data/lib/icontrol/common.rb +27 -24
- data/lib/icontrol/local_lb/common.rb +90 -48
- data/lib/icontrol/local_lb/rule.rb +1 -1
- data/lib/icontrol/local_lb/snat_pool.rb +1 -1
- data/lib/icontrol/local_lb/virtual_server.rb +30 -39
- data/lib/icontrol/mappings.rb +4 -4
- data/lib/icontrol/statistic_type.rb +475 -475
- data/spec/icontrol_local_lb_virtual_server_spec.rb +12 -13
- data/spec/spec_helper.rb +1 -1
- metadata +4 -4
@@ -90,8 +90,7 @@ describe IControl::LocalLB::VirtualServer do
|
|
90
90
|
|
91
91
|
it "should return a constant child of VirtualServerType" do
|
92
92
|
vs_type = @virtual_server.type
|
93
|
-
|
94
|
-
IControl::LocalLB::VirtualServer::Type.constants.should include(vs_type.name.split("::").last.to_sym)
|
93
|
+
IControl::LocalLB::VirtualServer::Type.constants.should include(vs_type)
|
95
94
|
end
|
96
95
|
end
|
97
96
|
|
@@ -114,7 +113,7 @@ describe IControl::LocalLB::VirtualServer do
|
|
114
113
|
it "should return a constant telling the cmp_enable_mode of the virtual server" do
|
115
114
|
cmp_enable = @virtual_server.cmp_enable_mode
|
116
115
|
cmp_enable.should_not be(nil)
|
117
|
-
IControl::LocalLB::VirtualServer::CMPEnableMode.constants.should include(cmp_enable
|
116
|
+
IControl::LocalLB::VirtualServer::CMPEnableMode.constants.should include(cmp_enable)
|
118
117
|
end
|
119
118
|
end
|
120
119
|
|
@@ -149,7 +148,7 @@ describe IControl::LocalLB::VirtualServer do
|
|
149
148
|
end
|
150
149
|
|
151
150
|
it "should return an IControl::Common::ProtocolType constant" do
|
152
|
-
IControl::Common::ProtocolType.constants.should include @virtual_server.protocol
|
151
|
+
IControl::Common::ProtocolType.constants.should include @virtual_server.protocol
|
153
152
|
end
|
154
153
|
end
|
155
154
|
|
@@ -159,7 +158,7 @@ describe IControl::LocalLB::VirtualServer do
|
|
159
158
|
end
|
160
159
|
|
161
160
|
it "should return an IControl::Common::EnabledState constant" do
|
162
|
-
IControl::Common::EnabledState.constants.should include @virtual_server.enabled_state
|
161
|
+
IControl::Common::EnabledState.constants.should include @virtual_server.enabled_state
|
163
162
|
end
|
164
163
|
end
|
165
164
|
|
@@ -227,7 +226,7 @@ describe IControl::LocalLB::VirtualServer do
|
|
227
226
|
end
|
228
227
|
|
229
228
|
it "should return an IControl::Common::EnabledState constant" do
|
230
|
-
IControl::Common::EnabledState.constants.should include(@virtual_server.connection_mirror_state
|
229
|
+
IControl::Common::EnabledState.constants.should include(@virtual_server.connection_mirror_state)
|
231
230
|
end
|
232
231
|
end
|
233
232
|
|
@@ -247,7 +246,7 @@ describe IControl::LocalLB::VirtualServer do
|
|
247
246
|
end
|
248
247
|
|
249
248
|
it "should return an IControl::Common::EnabledState constant" do
|
250
|
-
IControl::Common::EnabledState.constants.should include(@virtual_server.translate_port_state
|
249
|
+
IControl::Common::EnabledState.constants.should include(@virtual_server.translate_port_state)
|
251
250
|
end
|
252
251
|
end
|
253
252
|
|
@@ -257,7 +256,7 @@ describe IControl::LocalLB::VirtualServer do
|
|
257
256
|
end
|
258
257
|
|
259
258
|
it "should return an IControl::Common::EnabledState constant" do
|
260
|
-
IControl::Common::EnabledState.constants.should include(@virtual_server.translate_address_state
|
259
|
+
IControl::Common::EnabledState.constants.should include(@virtual_server.translate_address_state)
|
261
260
|
end
|
262
261
|
end
|
263
262
|
|
@@ -287,7 +286,7 @@ describe IControl::LocalLB::VirtualServer do
|
|
287
286
|
end
|
288
287
|
|
289
288
|
it "should return an IControl::Common::SourcePortBehavior constant" do
|
290
|
-
IControl::Common::SourcePortBehavior.constants.should include(@virtual_server.source_port_behavior
|
289
|
+
IControl::Common::SourcePortBehavior.constants.should include(@virtual_server.source_port_behavior)
|
291
290
|
end
|
292
291
|
end
|
293
292
|
|
@@ -307,7 +306,7 @@ describe IControl::LocalLB::VirtualServer do
|
|
307
306
|
end
|
308
307
|
|
309
308
|
it "should return an IControl::LocalLB::HardwareAccelerationMode instance" do
|
310
|
-
IControl::LocalLB::HardwareAccelerationMode.constants.should include(@virtual_server.actual_hardware_acceleration
|
309
|
+
IControl::LocalLB::HardwareAccelerationMode.constants.should include(@virtual_server.actual_hardware_acceleration)
|
311
310
|
end
|
312
311
|
|
313
312
|
end
|
@@ -318,7 +317,7 @@ describe IControl::LocalLB::VirtualServer do
|
|
318
317
|
end
|
319
318
|
|
320
319
|
it "should return an IControl::LocalLB::SnatType constant" do
|
321
|
-
IControl::LocalLB::SnatType.constants.should include (@virtual_server.snat_type
|
320
|
+
IControl::LocalLB::SnatType.constants.should include (@virtual_server.snat_type)
|
322
321
|
end
|
323
322
|
end
|
324
323
|
|
@@ -438,7 +437,7 @@ describe IControl::LocalLB::VirtualServer do
|
|
438
437
|
end
|
439
438
|
end
|
440
439
|
|
441
|
-
describe "
|
440
|
+
describe "statisics method" do
|
442
441
|
it "should exists" do
|
443
442
|
lambda { @virtual_server.statistics }.should_not raise_exception(NoMethodError)
|
444
443
|
end
|
@@ -449,7 +448,7 @@ describe IControl::LocalLB::VirtualServer do
|
|
449
448
|
|
450
449
|
it "should return a hash of statistics" do
|
451
450
|
@virtual_server.statistics.class.should be(Hash)
|
452
|
-
IControl::Common::StatisticType.constants.should include(@virtual_server.statistics.first[0]
|
451
|
+
IControl::Common::StatisticType.constants.should include(@virtual_server.statistics.first[0])
|
453
452
|
end
|
454
453
|
end
|
455
454
|
|
data/spec/spec_helper.rb
CHANGED
@@ -39,7 +39,7 @@ def register_fixtures
|
|
39
39
|
FileList["spec/fixtures/soap/xml/*request*"].each do |file_name|
|
40
40
|
response_file_name = file_name.gsub("request","response")
|
41
41
|
request_body = File.read(file_name)
|
42
|
-
FakeWeb.register_uri :post, EndpointHelper.soap_endpoint, File.read(file_name), :body => File.read(response_file_name)
|
42
|
+
FakeWeb.register_uri :post, EndpointHelper.soap_endpoint, File.read(file_name), :body => File.read(response_file_name) unless response_file_name =~ /after/
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: icontrol
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 4
|
10
|
+
version: 0.0.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jose Fernandez (magec)
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-08-
|
18
|
+
date: 2010-08-25 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|