Class: Pwnix::Api::Client::Os
- Inherits:
-
Object
- Object
- Pwnix::Api::Client::Os
show all
- Includes:
- HTTParty, HTTPartyTime
- Defined in:
- lib/pwnix-api-client/system/os.rb
Instance Method Summary
collapse
#clear_errors, #errors, #has_errors?, included, #last_error, #safe_api_call
Instance Method Details
#cleanup ⇒ Object
20
21
22
|
# File 'lib/pwnix-api-client/system/os.rb', line 20
def cleanup
safe_api_call("/system/os/cleanup")
end
|
#filesystem ⇒ Object
12
13
14
|
# File 'lib/pwnix-api-client/system/os.rb', line 12
def filesystem
safe_api_call("/system/os/filesystem")
end
|
#hostname ⇒ Object
28
29
30
|
# File 'lib/pwnix-api-client/system/os.rb', line 28
def hostname
safe_api_call("/system/os/hostname")
end
|
#netstat ⇒ Object
16
17
18
|
# File 'lib/pwnix-api-client/system/os.rb', line 16
def netstat
safe_api_call("/system/os/netstat")
end
|
#restart ⇒ Object
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
|
#status ⇒ Object
8
9
10
|
# File 'lib/pwnix-api-client/system/os.rb', line 8
def status
safe_api_call("/system/os/status")
end
|