Class: Netscaler::System

Inherits:
Object
  • Object
show all
Defined in:
lib/netscaler/system.rb,
lib/netscaler/system/file.rb,
lib/netscaler/system/interface.rb

Defined Under Namespace

Classes: File, Interface

Instance Method Summary collapse

Constructor Details

#initialize(netscaler) ⇒ System

Returns a new instance of System.



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

def initialize(netscaler)
  @netscaler = netscaler
end

Instance Method Details

#cpuObject



23
24
25
# File 'lib/netscaler/system.rb', line 23

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

#fileObject



11
12
13
# File 'lib/netscaler/system.rb', line 11

def file
  File.new @netscaler
end

#hostnameObject



31
32
33
34
# File 'lib/netscaler/system.rb', line 31

def hostname
   hostname = @netscaler.adapter.get('config/nshostname')
   hostname['nshostname'].first['hostname']
end

#interfaceObject



15
16
17
# File 'lib/netscaler/system.rb', line 15

def interface
  Interface.new @netscaler
end

#memoryObject



27
28
29
# File 'lib/netscaler/system.rb', line 27

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

#statObject



19
20
21
# File 'lib/netscaler/system.rb', line 19

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