Class: Netscaler::Server::Request
Instance Attribute Summary
Attributes inherited from BaseRequest
#client
Instance Method Summary
collapse
Methods inherited from BaseRequest
#initialize
Methods included from Logging
configure, log, #log
Instance Method Details
#disable(server, options) ⇒ Object
10
11
12
|
# File 'lib/netscaler/server/request.rb', line 10
def disable(server, options)
send_request('disableserver', {:name => server})
end
|
#enable(server, options) ⇒ Object
6
7
8
|
# File 'lib/netscaler/server/request.rb', line 6
def enable(server, options)
send_request('enableserver', {:name => server})
end
|
#list(server, options) {|responses| ... } ⇒ Object
14
15
16
17
18
19
20
21
22
|
# File 'lib/netscaler/server/request.rb', line 14
def list(server, options)
responses = []
send_request('getserver', {:empty => :ok}) do |response|
response_part(response).each_with_index do |server, i|
responses << Response.new(server).to_hash
end
end
yield responses if block_given?
end
|
#status(server, options) ⇒ Object
24
25
26
27
28
|
# File 'lib/netscaler/server/request.rb', line 24
def status(server, options)
send_request('getserver', {:name => server }) do |response|
yield Response.new(response_part(response)).to_hash if block_given?
end
end
|