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
@@ -1,4 +1,4 @@
|
|
1
|
-
module Attributable
|
1
|
+
module Attributable # :nodoc:
|
2
2
|
|
3
3
|
def self.included(klass)
|
4
4
|
klass.class_eval do
|
@@ -7,7 +7,7 @@ module Attributable
|
|
7
7
|
end
|
8
8
|
end
|
9
9
|
|
10
|
-
module ClassMethods
|
10
|
+
module ClassMethods # :nodoc:
|
11
11
|
def set_id_name(id_name)
|
12
12
|
@id_name = id_name
|
13
13
|
end
|
@@ -17,7 +17,7 @@ module Attributable
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
-
module InstanceMethods
|
20
|
+
module InstanceMethods # :nodoc:
|
21
21
|
|
22
22
|
def initialize(attributes)
|
23
23
|
id = attributes.delete(self.class.id_name) if attributes && attributes[self.class.id_name]
|
data/lib/icontrol/base.rb
CHANGED
@@ -7,22 +7,14 @@ Savon::Request.log = false
|
|
7
7
|
# The idea is to create an object proxy to the web service client with the same structure
|
8
8
|
# than the IControl stuff
|
9
9
|
|
10
|
-
module IControl
|
10
|
+
module IControl #:nodoc:
|
11
11
|
|
12
|
-
class
|
13
|
-
|
14
|
-
|
15
|
-
class IPPortDefinition
|
16
|
-
attr_accessor :address,:port
|
17
|
-
def initialize(options)
|
18
|
-
@address = options[:address]
|
19
|
-
@port = options[:port]
|
20
|
-
end
|
21
|
-
end
|
12
|
+
class Exception
|
13
|
+
class NotConfiguredException < Exception # :nodoc:
|
14
|
+
end
|
22
15
|
end
|
23
|
-
|
24
|
-
|
25
|
-
class Base
|
16
|
+
|
17
|
+
class Base # :nodoc:
|
26
18
|
|
27
19
|
def default_body
|
28
20
|
{ self.class.id_name.to_s + "s" => {:value => [@attributes[:id]] } }
|
data/lib/icontrol/common.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
|
2
2
|
# This is a helper for defining constants
|
3
|
-
module IControl
|
3
|
+
module IControl # :nodoc:
|
4
4
|
|
5
5
|
class NoSuchPoolException < Exception; end
|
6
6
|
class MethodNotImplementedException < Exception; end
|
7
7
|
|
8
|
-
module Common
|
9
|
-
|
8
|
+
module Common # :nodoc:
|
9
|
+
|
10
10
|
class VLANFilterList
|
11
11
|
attr_accessor :state,:vlans
|
12
12
|
def initialize(attributes)
|
@@ -47,55 +47,58 @@ module IControl
|
|
47
47
|
|
48
48
|
class SourcePortBehavior
|
49
49
|
# Attempt to preserve the source port (best effort). This is the default.
|
50
|
-
|
50
|
+
SOURCE_PORT_PRESERVE = :SOURCE_PORT_PRESERVE
|
51
51
|
# Preserve source port. Use of the preserve-strict setting should be restricted to UDP only under very special circumstances such as nPath or transparent (that is, no translation of any other L3/L4 field), where there is a 1:1 relationship between virtual IP addresses and node addresses, or when clustered multi-processing (CMP) is disabled.
|
52
|
-
|
52
|
+
SOURCE_PORT_PRESERVE_STRICT = :SOURCE_PORT_PRESERVE_STRICT
|
53
53
|
# The change setting is useful for obfuscating internal network addresses.
|
54
|
-
|
54
|
+
SOURCE_PORT_CHANGE = :SOURCE_PORT_CHANGE
|
55
55
|
end
|
56
56
|
|
57
57
|
##
|
58
58
|
# A list of enabled states.
|
59
|
-
class EnabledState
|
60
|
-
|
61
|
-
|
59
|
+
class EnabledState
|
60
|
+
|
61
|
+
STATE_DISABLED = :STATE_DISABLED
|
62
|
+
|
63
|
+
STATE_ENABLED = :STATE_ENABLED
|
64
|
+
|
62
65
|
end
|
63
66
|
|
64
67
|
##
|
65
68
|
# A list of TMOS modules.
|
66
69
|
class TMOSModule
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
+
TMOS_MODULE_SAM = :TMOS_MODULE_SAM
|
71
|
+
TMOS_MODULE_ASM = :TMOS_MODULE_ASM
|
72
|
+
TMOS_MODULE_WAM = :TMOS_MODULE_WAM
|
70
73
|
end
|
71
74
|
|
72
75
|
##
|
73
76
|
# An enumeration of protocol types.
|
74
77
|
class ProtocolType
|
75
78
|
# Protocol is wildcard.
|
76
|
-
|
79
|
+
PROTOCOL_ANY = :PROTOCOL_ANY
|
77
80
|
# Protocol is IPv6 header.
|
78
|
-
|
81
|
+
PROTOCOL_IPV6 = :PROTOCOL_IPV6
|
79
82
|
# Protocol is IPv6 routing header.
|
80
|
-
|
83
|
+
PROTOCOL_ROUTING = :PROTOCOL_ROUTING
|
81
84
|
# Protocol is IPv6 no next header.
|
82
|
-
|
85
|
+
PROTOCOL_NONE = :PROTOCOL_NONE
|
83
86
|
# Protocol is IPv6 fragmentation header.
|
84
|
-
|
87
|
+
PROTOCOL_FRAGMENT = :PROTOCOL_FRAGMENT
|
85
88
|
# Protocol is IPv6 destination options.
|
86
|
-
|
89
|
+
PROTOCOL_DSTOPTS = :PROTOCOL_DSTOPTS
|
87
90
|
# Protocol is TCP.
|
88
|
-
|
91
|
+
PROTOCOL_TCP = :PROTOCOL_TCP
|
89
92
|
# Protocol is UDP.
|
90
|
-
|
93
|
+
PROTOCOL_UDP = :PROTOCOL_UDP
|
91
94
|
# Protocol is ICMP.
|
92
|
-
|
95
|
+
PROTOCOL_ICMP = :PROTOCOL_ICMP
|
93
96
|
# Protocol is ICMPv6.
|
94
|
-
|
97
|
+
PROTOCOL_ICMPV6 = :PROTOCOL_ICMPV6
|
95
98
|
# Protocol is OSPF.
|
96
|
-
|
99
|
+
PROTOCOL_OSPF = :PROTOCOL_OSPF
|
97
100
|
# Protocol is SCTP.
|
98
|
-
|
101
|
+
PROTOCOL_SCTP = :PROTOCOL_SCTP
|
99
102
|
end
|
100
103
|
|
101
104
|
class IPPortDefinition
|
@@ -1,76 +1,118 @@
|
|
1
|
-
module IControl
|
2
|
-
module LocalLB
|
3
|
-
|
1
|
+
module IControl # :nodoc:
|
2
|
+
module LocalLB # :nodoc:
|
4
3
|
##
|
5
4
|
# A list of possible levels for hardware acceleration.
|
6
5
|
class HardwareAccelerationMode
|
7
|
-
|
8
|
-
|
9
|
-
|
6
|
+
# No hardware acceleration involvement, software only.
|
7
|
+
HW_ACCELERATION_MODE_NONE = :HW_ACCELERATION_MODE_NONE
|
8
|
+
# Full hardware acceleration, i.e. PVA/hardware handles connection initiation and packet processing.
|
9
|
+
HW_ACCELERATION_MODE_ASSIS = :HW_ACCELERATION_MODE_ASSIS
|
10
|
+
# Software handles connection initiation, PVA/hardware handles packet processing on the connections.
|
11
|
+
HW_ACCELERATION_MODE_FUL = :HW_ACCELERATION_MODE_FUL
|
10
12
|
end
|
11
|
-
|
13
|
+
|
12
14
|
##
|
13
15
|
# An enumeration of clone pool types.
|
14
16
|
class ClonePoolType
|
15
|
-
|
16
|
-
|
17
|
-
|
17
|
+
# The clone pool is undefined.
|
18
|
+
CLONE_POOL_TYPE_UNDEFINED = :CLONE_POOL_TYPE_UNDEFINED
|
19
|
+
# The client-side clone pool.
|
20
|
+
CLONE_POOL_TYPE_CLIENTSID = :CLONE_POOL_TYPE_CLIENTSID
|
21
|
+
# The server-side clone pool.
|
22
|
+
CLONE_POOL_TYPE_SERVERSID = :CLONE_POOL_TYPE_SERVERSID
|
18
23
|
end
|
19
|
-
|
24
|
+
|
20
25
|
##
|
21
26
|
# A list of profile context types.
|
22
27
|
class ProfileContextType
|
23
|
-
|
24
|
-
|
25
|
-
|
28
|
+
# Profile applies to both client and server sides.
|
29
|
+
PROFILE_CONTEXT_TYPE_ALL = :PROFILE_CONTEXT_TYPE_ALL
|
30
|
+
# Profile applies to the client side only.
|
31
|
+
PROFILE_CONTEXT_TYPE_CLIEN = :PROFILE_CONTEXT_TYPE_CLIEN
|
32
|
+
# Profile applies to the server side only.
|
33
|
+
PROFILE_CONTEXT_TYPE_SERVE = :PROFILE_CONTEXT_TYPE_SERVE
|
26
34
|
end
|
27
35
|
|
28
36
|
##
|
29
37
|
# A list of translation types.
|
30
38
|
class SnatType
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
39
|
+
# No snat is being used.
|
40
|
+
SNAT_TYPE_NONE = :SNAT_TYPE_NONE
|
41
|
+
# The snat uses a single translation address.
|
42
|
+
SNAT_TYPE_TRANSLATION_ADDRESS = :SNAT_TYPE_TRANSLATION_ADDRESS
|
43
|
+
# The snat uses a SNAT pool of translation addresses.
|
44
|
+
SNAT_TYPE_SNATPOOL = :SNAT_TYPE_SNATPOOL
|
45
|
+
# The snat uses self IP addresses.
|
46
|
+
SNAT_TYPE_AUTOMAP = :SNAT_TYPE_AUTOMAP
|
35
47
|
end
|
36
48
|
|
37
49
|
##
|
38
50
|
# A list of profile types.
|
39
51
|
class ProfileType
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
52
|
+
# The TCP profile.
|
53
|
+
PROFILE_TYPE_TCP = :PROFILE_TYPE_TCP
|
54
|
+
# The UDP profile.
|
55
|
+
PROFILE_TYPE_UDP = :PROFILE_TYPE_UDP
|
56
|
+
# The FTP profile.
|
57
|
+
PROFILE_TYPE_FTP = :PROFILE_TYPE_FTP
|
58
|
+
# The L4 translation profile.
|
59
|
+
PROFILE_TYPE_FAST_L4 = :PROFILE_TYPE_FAST_L4
|
60
|
+
# The HTTP profile.
|
61
|
+
PROFILE_TYPE_HTTP = :PROFILE_TYPE_HTTP
|
62
|
+
# The server-side SSL profile.
|
63
|
+
PROFILE_TYPE_SERVER_SSL = :PROFILE_TYPE_SERVER_SSL
|
64
|
+
# The client-side SSL profile.
|
65
|
+
PROFILE_TYPE_CLIENT_SSL = :PROFILE_TYPE_CLIENT_SSL
|
66
|
+
# The authorization profile.
|
67
|
+
PROFILE_TYPE_AUTH = :PROFILE_TYPE_AUTH
|
68
|
+
# The persistence profile.
|
69
|
+
PROFILE_TYPE_PERSISTENCE = :PROFILE_TYPE_PERSISTENCE
|
70
|
+
# The connection pool profile.
|
71
|
+
PROFILE_TYPE_CONNECTION_POOL = :PROFILE_TYPE_CONNECTION_POOL
|
72
|
+
# The stream profile.
|
73
|
+
PROFILE_TYPE_STREAM = :PROFILE_TYPE_STREAM
|
74
|
+
# The XML profile.
|
75
|
+
PROFILE_TYPE_XML = :PROFILE_TYPE_XML
|
76
|
+
# The FastHTTP profile.
|
77
|
+
PROFILE_TYPE_FAST_HTTP = :PROFILE_TYPE_FAST_HTTP
|
78
|
+
# The IIOP profile.
|
79
|
+
PROFILE_TYPE_IIOP = :PROFILE_TYPE_IIOP
|
80
|
+
# The RTSP profile.
|
81
|
+
PROFILE_TYPE_RTSP = :PROFILE_TYPE_RTSP
|
82
|
+
# The STATISTICS profile.
|
83
|
+
PROFILE_TYPE_STATISTICS = :PROFILE_TYPE_STATISTICS
|
84
|
+
# The HTTP class profile.
|
85
|
+
PROFILE_TYPE_HTTPCLASS = :PROFILE_TYPE_HTTPCLASS
|
86
|
+
# The DNS profile.
|
87
|
+
PROFILE_TYPE_DNS = :PROFILE_TYPE_DNS
|
88
|
+
# The SCTP profile.
|
89
|
+
PROFILE_TYPE_SCTP = :PROFILE_TYPE_SCTP
|
90
|
+
# A loosely-typed profile.
|
91
|
+
PROFILE_TYPE_INSTANCE = :PROFILE_TYPE_INSTANCE
|
92
|
+
# The SIP profile.
|
93
|
+
PROFILE_TYPE_SIPP = :PROFILE_TYPE_SIPP
|
61
94
|
end
|
62
95
|
|
63
96
|
|
64
97
|
class PersistenceMode
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
98
|
+
# No persistence mode.
|
99
|
+
PERSISTENCE_MODE_NONE = :PERSISTENCE_MODE_NONE
|
100
|
+
# Simple or Source Address affinity persistence mode.
|
101
|
+
PERSISTENCE_MODE_SOURCE_ADDRESS_AFFINITY = :PERSISTENCE_MODE_SOURCE_ADDRESS_AFFINITY
|
102
|
+
# Sticky or Destination Address affinity persistence mode.
|
103
|
+
PERSISTENCE_MODE_DESTINATION_ADDRESS_AFFINITY = :PERSISTENCE_MODE_DESTINATION_ADDRESS_AFFINITY
|
104
|
+
# Cookie persistence mode.
|
105
|
+
PERSISTENCE_MODE_COOKIE = :PERSISTENCE_MODE_COOKIE
|
106
|
+
# Microsoft Terminal Server persistence mode.
|
107
|
+
PERSISTENCE_MODE_MSRDP = :PERSISTENCE_MODE_MSRDP
|
108
|
+
# SSL Session ID persistence mode.
|
109
|
+
PERSISTENCE_MODE_SSL_SID = :PERSISTENCE_MODE_SSL_SID
|
110
|
+
# SIP (Call-ID) persistence mode.
|
111
|
+
PERSISTENCE_MODE_SIP = :PERSISTENCE_MODE_SIP
|
112
|
+
# Universal persistence mode.
|
113
|
+
PERSISTENCE_MODE_UIE = :PERSISTENCE_MODE_UIE
|
114
|
+
# Hash persistence mode.
|
115
|
+
PERSISTENCE_MODE_HASH = :PERSISTENCE_MODE_HASH
|
74
116
|
end
|
75
117
|
end
|
76
118
|
end
|
@@ -12,33 +12,33 @@ class IControl::LocalLB::VirtualServer
|
|
12
12
|
# A list of virtual server types.
|
13
13
|
module Type
|
14
14
|
# The virtual server is based on a pool.
|
15
|
-
|
15
|
+
RESOURCE_TYPE_POOL = :RESOURCE_TYPE_POOL
|
16
16
|
# The virtual server only supports IP forwarding. There is no load balancing on this type of virtual server.
|
17
|
-
|
17
|
+
RESOURCE_TYPE_IP_FORWARDING = :RESOURCE_TYPE_IP_FORWARDING
|
18
18
|
# The virtual server only supports L2 forwarding. There is no load balancing on this type of virtual server.
|
19
|
-
|
19
|
+
RESOURCE_TYPE_L2_FORWARDING = :RESOURCE_TYPE_L2_FORWARDING
|
20
20
|
# All connections going to this virtual server will be rejected, and resets will be sent.
|
21
|
-
|
21
|
+
RESOURCE_TYPE_REJECT = :RESOURCE_TYPE_REJECT
|
22
22
|
# The virtual server is based on the Fast L4 profile.
|
23
|
-
|
23
|
+
RESOURCE_TYPE_FAST_L4 = :RESOURCE_TYPE_FAST_L4
|
24
24
|
# The virtual server is based on the Fast HTTP profile.
|
25
|
-
|
25
|
+
RESOURCE_TYPE_FAST_HTTP = :RESOURCE_TYPE_FAST_HTTP
|
26
26
|
end
|
27
27
|
|
28
28
|
##
|
29
29
|
# A list of CMP enable modes.
|
30
30
|
class CMPEnableMode
|
31
31
|
# The virtual server is enabled on all processing cores.
|
32
|
-
|
32
|
+
RESOURCE_TYPE_CMP_ENABLE_ALL = :RESOURCE_TYPE_CMP_ENABLE_ALL
|
33
33
|
# The virtual server is enabled on a single processing core.
|
34
|
-
|
34
|
+
RESOURCE_TYPE_CMP_ENABLE_SINGLE = :RESOURCE_TYPE_CMP_ENABLE_SINGLE
|
35
35
|
# The virtual server is enabled on a group of processing cores.
|
36
|
-
|
36
|
+
RESOURCE_TYPE_CMP_ENABLE_GROUP = :RESOURCE_TYPE_CMP_ENABLE_GROUP
|
37
37
|
|
38
|
-
|
38
|
+
RESOURCE_TYPE_CMP_ENABLE_UNKNOWN = :RESOURCE_TYPE_CMP_ENABLE_UNKNOWN
|
39
39
|
end
|
40
40
|
|
41
|
-
class StatisticEntry
|
41
|
+
class StatisticEntry # :nodoc:
|
42
42
|
attr_accessor :virtual_server,:statistics
|
43
43
|
|
44
44
|
def self.from_xml(result)
|
@@ -48,7 +48,7 @@ class IControl::LocalLB::VirtualServer
|
|
48
48
|
aux.virtual_server = IControl::LocalLB::VirtualServer.find(i[:virtual_server][:name])
|
49
49
|
aux.statistics = {}
|
50
50
|
i[:statistics][:item].each do |entry|
|
51
|
-
aux.statistics[
|
51
|
+
aux.statistics[entry[:type].to_sym] = IControl::Common::ULong64.new(entry[:value])
|
52
52
|
end
|
53
53
|
aux
|
54
54
|
end
|
@@ -56,32 +56,23 @@ class IControl::LocalLB::VirtualServer
|
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
59
|
-
class ModuleScore
|
59
|
+
class ModuleScore # :nodoc:
|
60
60
|
attr_accessor :tmos_module ,:score
|
61
61
|
def initialize(attribules)
|
62
62
|
@score = attributes[:score]
|
63
|
-
@tmos_module =
|
63
|
+
@tmos_module = attributes[:tmos_module]
|
64
64
|
end
|
65
65
|
end
|
66
|
-
=begin
|
67
|
-
class Rule
|
68
|
-
attr_accessor :rule_name,:priority
|
69
|
-
def initialize(attributes)
|
70
|
-
@rule_name = attributes[:rule_name]
|
71
|
-
@priority = ( attributes[:priority] && attributes[:priority].to_i ) || -1
|
72
|
-
end
|
73
|
-
end
|
74
|
-
=end
|
75
66
|
|
76
|
-
class ClonePool
|
67
|
+
class ClonePool #:nodoc:
|
77
68
|
attr_accessor :pool,:clone_type
|
78
69
|
def initialize(attributes)
|
79
70
|
@pool = IControl::LocalLB::Pool.find(attributes[:pool_name])
|
80
|
-
@clone_type =
|
71
|
+
@clone_type = attributes[:type]
|
81
72
|
end
|
82
73
|
end
|
83
74
|
|
84
|
-
class ProfileAttribute
|
75
|
+
class ProfileAttribute #:nodoc:
|
85
76
|
attr_accessor :profile_type,:profile_context,:profile_name
|
86
77
|
def initialize(options)
|
87
78
|
@profile_type = options[:profile_type]
|
@@ -90,7 +81,7 @@ class IControl::LocalLB::VirtualServer
|
|
90
81
|
end
|
91
82
|
end
|
92
83
|
|
93
|
-
class Persistence
|
84
|
+
class Persistence #:nodoc:
|
94
85
|
attr_accessor :profile_name,:default_profile
|
95
86
|
def initialize(options)
|
96
87
|
@profile_name = options[:profile_name]
|
@@ -98,7 +89,7 @@ class IControl::LocalLB::VirtualServer
|
|
98
89
|
end
|
99
90
|
end
|
100
91
|
|
101
|
-
class GenericEnumerator
|
92
|
+
class GenericEnumerator #:nodoc:
|
102
93
|
|
103
94
|
STATE_CHANGED=[ :<<, :push, :pop, :shift, :unshift, :insert, :join, :reverse!, :sort!, :collect!,:map!, :delete, :delete_at, :delete_if, :reject!,:slice!, :uniq!, :compact!, :flatten!, :shuffle! ]
|
104
95
|
|
@@ -122,21 +113,21 @@ class IControl::LocalLB::VirtualServer
|
|
122
113
|
end
|
123
114
|
|
124
115
|
|
125
|
-
class HttpClassProfileEnumerator < GenericEnumerator
|
116
|
+
class HttpClassProfileEnumerator < GenericEnumerator #:nodoc:
|
126
117
|
def save!
|
127
118
|
@parent.remove_all_httpclass_profiles
|
128
119
|
@parent.add_httpclass_profile(@contents)
|
129
120
|
end
|
130
121
|
end
|
131
122
|
|
132
|
-
class RuleEnumerator < GenericEnumerator
|
123
|
+
class RuleEnumerator < GenericEnumerator #:nodoc:
|
133
124
|
def save!
|
134
125
|
@parent.remove_all_rules
|
135
126
|
@parent.add_rule(@contents)
|
136
127
|
end
|
137
128
|
end
|
138
129
|
|
139
|
-
class AuthProfileEnumerator < GenericEnumerator
|
130
|
+
class AuthProfileEnumerator < GenericEnumerator #:nodoc:
|
140
131
|
def save!
|
141
132
|
@parent.remove_all_authentication_profiles
|
142
133
|
@parent.add_authentication_profile(@contents)
|
@@ -163,7 +154,7 @@ class IControl::LocalLB::VirtualServer
|
|
163
154
|
|
164
155
|
attributes[:profiles].each do |i|
|
165
156
|
if i.class == Hash
|
166
|
-
profiles["item#{item+=1}"] = {"profile_context" => i["profile_context"]
|
157
|
+
profiles["item#{item+=1}"] = {"profile_context" => i["profile_context"],"profile_name" => ( i["profile"] ? i["profile"] : "tcp" ) }
|
167
158
|
else
|
168
159
|
profiles["item#{item+=1}"] = {"profile_context" => i.profile_context,"profile_name" => i.profile_name || "tcp" }
|
169
160
|
end
|
@@ -174,12 +165,12 @@ class IControl::LocalLB::VirtualServer
|
|
174
165
|
:name => attributes[:name],
|
175
166
|
:address => attributes[:address],
|
176
167
|
"port" => attributes[:port],
|
177
|
-
:protocol => (attributes[:protocol] || IControl::Common::ProtocolType::PROTOCOL_TCP)
|
168
|
+
:protocol => (attributes[:protocol] || IControl::Common::ProtocolType::PROTOCOL_TCP)
|
178
169
|
}
|
179
170
|
},
|
180
171
|
"wildmasks" => {:item => attributes[:wildmask] || "255.255.255.255"},
|
181
172
|
"resources" => {:item => {
|
182
|
-
:type => (attributes[:type] || IControl::LocalLB::VirtualServer::Type::RESOURCE_TYPE_POOL)
|
173
|
+
:type => (attributes[:type] || IControl::LocalLB::VirtualServer::Type::RESOURCE_TYPE_POOL),
|
183
174
|
"default_pool_name" => attributes[:default_pool] ? attributes[:default_pool].id : ""
|
184
175
|
}
|
185
176
|
},
|
@@ -217,7 +208,7 @@ class IControl::LocalLB::VirtualServer
|
|
217
208
|
IControl::LocalLB::VirtualServer.set_type do |soap|
|
218
209
|
soap.body = {
|
219
210
|
"virtual_servers" => {:item => id},
|
220
|
-
"types" => {:item => new_type
|
211
|
+
"types" => {:item => new_type }
|
221
212
|
}
|
222
213
|
end
|
223
214
|
end
|
@@ -271,7 +262,7 @@ class IControl::LocalLB::VirtualServer
|
|
271
262
|
IControl::LocalLB::VirtualServer.set_enabled_state do |soap|
|
272
263
|
soap.body = {
|
273
264
|
"virtual_servers" => {:item => id},
|
274
|
-
"states" => {:item => state
|
265
|
+
"states" => {:item => state }
|
275
266
|
}
|
276
267
|
end if state
|
277
268
|
end
|
@@ -296,7 +287,7 @@ class IControl::LocalLB::VirtualServer
|
|
296
287
|
|
297
288
|
def connection_mirror_state=(state)
|
298
289
|
IControl::LocalLB::VirtualServer.set_connection_mirror_state do |soap|
|
299
|
-
soap.body = {"virtual_servers" => {:item => id},:states => {:item => state
|
290
|
+
soap.body = {"virtual_servers" => {:item => id},:states => {:item => state}}
|
300
291
|
end
|
301
292
|
end
|
302
293
|
|
@@ -577,7 +568,7 @@ public
|
|
577
568
|
IControl::LocalLB::VirtualServer.set_protocol do |soap|
|
578
569
|
soap.body = {
|
579
570
|
"virtual_servers" => {:item => id},
|
580
|
-
"protocols" => {:item => protocol
|
571
|
+
"protocols" => {:item => protocol }
|
581
572
|
}
|
582
573
|
end
|
583
574
|
end
|
@@ -648,7 +639,7 @@ public
|
|
648
639
|
soap.body = {
|
649
640
|
"virtual_servers" => {:item => id},
|
650
641
|
"vlans" => { :item =>
|
651
|
-
{ :state => vlan.state
|
642
|
+
{ :state => vlan.state,
|
652
643
|
:vlans => vlans
|
653
644
|
}
|
654
645
|
}
|