Class: Netscaler::System::Interface

Inherits:
NetscalerService show all
Defined in:
lib/netscaler/system/interface.rb

Instance Method Summary collapse

Methods inherited from NetscalerService

#validate_payload

Constructor Details

#initialize(netscaler) ⇒ Interface

Returns a new instance of Interface.



6
7
8
# File 'lib/netscaler/system/interface.rb', line 6

def initialize(netscaler)
  @netscaler=netscaler
end

Instance Method Details

#bindObject



29
30
31
# File 'lib/netscaler/system/interface.rb', line 29

def bind
  Bind.new @netscaler
end

#show(payload = {}) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/netscaler/system/interface.rb', line 10

def show(payload={})
  if payload[:name] != nil then
    validate_payload(payload, [:name])
    return @netscaler.adapter.get("config/interface/#{payload[:name]}")
  else
    return @netscaler.adapter.get('config/interface/')
  end
end

#stat(payload = {}) ⇒ Object



20
21
22
23
24
25
26
27
# File 'lib/netscaler/system/interface.rb', line 20

def stat(payload={})
  if payload[:name] != nil then
    validate_payload(payload, [:name])
    return @netscaler.adapter.get("stat/interface/#{payload[:name]}")
  else
    return @netscaler.adapter.get('stat/interface')
  end
end

#unbindObject



33
34
35
# File 'lib/netscaler/system/interface.rb', line 33

def unbind
  Unbind.new @netscaler
end