Class: Netscaler::Ha::Node

Inherits:
NetscalerService show all
Defined in:
lib/netscaler/ha/node.rb

Instance Method Summary collapse

Methods inherited from NetscalerService

#validate_payload

Constructor Details

#initialize(netscaler) ⇒ Node

Returns a new instance of Node.



6
7
8
# File 'lib/netscaler/ha/node.rb', line 6

def initialize(netscaler)
  @netscaler=netscaler
end

Instance Method Details

#show(payload = {}) ⇒ Object



10
11
12
13
14
15
16
17
18
19
# File 'lib/netscaler/ha/node.rb', line 10

def show(payload={})
  if payload[:id] != nil then
    validate_payload(payload, [:id])
    return @netscaler.adapter.get("config/hanode/#{payload[:id]}")
  elsif payload == {} then
    return @netscaler.adapter.get('config/hanode/')
  else
    raise ArgumentError, 'payload supplied must have been missing :id'
  end
end

#statObject



22
23
24
# File 'lib/netscaler/ha/node.rb', line 22

def stat
  @netscaler.adapter.get('stat/hanode')
end