Class: Pwnix::Api::Client::Os

Inherits:
Object
  • Object
show all
Includes:
HTTParty, HTTPartyTime
Defined in:
lib/pwnix-api-client/system/os.rb

Instance Method Summary collapse

Methods included from HTTPartyTime

#clear_errors, #errors, #has_errors?, included, #last_error, #safe_api_call

Instance Method Details

#cleanupObject



20
21
22
# File 'lib/pwnix-api-client/system/os.rb', line 20

def cleanup
  safe_api_call("/system/os/cleanup")
end

#filesystemObject



12
13
14
# File 'lib/pwnix-api-client/system/os.rb', line 12

def filesystem
  safe_api_call("/system/os/filesystem")
end

#hostnameObject



28
29
30
# File 'lib/pwnix-api-client/system/os.rb', line 28

def hostname
  safe_api_call("/system/os/hostname")
end

#netstatObject



16
17
18
# File 'lib/pwnix-api-client/system/os.rb', line 16

def netstat
  safe_api_call("/system/os/netstat")
end

#restartObject



24
25
26
# File 'lib/pwnix-api-client/system/os.rb', line 24

def restart
  safe_api_call("/system/os/restart")
end

#set_hostname(hostname) ⇒ Object



32
33
34
# File 'lib/pwnix-api-client/system/os.rb', line 32

def set_hostname(hostname)
  safe_api_call("/system/os/hostname/set", { :hostname => hostname } )
end

#set_password(username, password) ⇒ Object



36
37
38
# File 'lib/pwnix-api-client/system/os.rb', line 36

def set_password(username,password)
  safe_api_call("/system/os/password/set", { :username => username, :password => password } )
end

#statusObject



8
9
10
# File 'lib/pwnix-api-client/system/os.rb', line 8

def status
  safe_api_call("/system/os/status")
end