Class: Mu::Command::Cmd_system

Inherits:
Mu::Command show all
Defined in:
lib/mu/command/cmd_system.rb

Constant Summary

Constants inherited from Mu::Command

Api

Constants included from Helper

Helper::ESCAPES

Instance Attribute Summary collapse

Attributes inherited from Mu::Command

#options, #opts

Instance Method Summary collapse

Methods inherited from Mu::Command

#initialize

Methods included from Helper

#ask, #bin2hex, #error, #escape, #format_float, #get_file_as_string_array, #make_xml, #msg, #shift, #to_boolean

Constructor Details

This class inherits a constructor from Mu::Command

Instance Attribute Details

#apiObject

Returns the value of attribute api.



8
9
10
# File 'lib/mu/command/cmd_system.rb', line 8

def api
  @api
end

#hostObject

Returns the value of attribute host.



8
9
10
# File 'lib/mu/command/cmd_system.rb', line 8

def host
  @host
end

#passwordObject

Returns the value of attribute password.



8
9
10
# File 'lib/mu/command/cmd_system.rb', line 8

def password
  @password
end

#usernameObject

Returns the value of attribute username.



8
9
10
# File 'lib/mu/command/cmd_system.rb', line 8

def username
  @username
end

Instance Method Details

#cmd_help(argv) ⇒ Object

outputs help for this command

* argv = command-line arguments


12
13
14
# File 'lib/mu/command/cmd_system.rb', line 12

def cmd_help argv
  help
end

#cmd_restart(argv) ⇒ Object

restarts the Mu system services (this does not reboot the appliance)

* argv = command-line arguments


18
19
20
21
22
23
# File 'lib/mu/command/cmd_system.rb', line 18

def cmd_restart argv
  setup argv
  response = @api.restart
  msg response
  return response
end

#cmd_status(argv) ⇒ Object

gets the complete System status page

* argv = command-line arguments


27
28
29
30
31
32
# File 'lib/mu/command/cmd_system.rb', line 27

def cmd_status argv
  setup argv
  response = @api.status
  msg response
  return response
end

#cmd_status2(argv) ⇒ Object

gets additional system status information, imncluding hard drive, model and serial data

* argv = command-line arguments


36
37
38
39
40
41
# File 'lib/mu/command/cmd_system.rb', line 36

def cmd_status2 argv
  setup argv
  response = @api.status2
  msg response
  return response
end