Class: Bmc::Sdk::Reboot
- Inherits:
-
Object
- Object
- Bmc::Sdk::Reboot
- Defined in:
- lib/commands.rb
Overview
Reboot command will reboot a specific server.
Instance Attribute Summary collapse
-
#serverID ⇒ Object
Returns the value of attribute serverID.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(client, serverID) ⇒ Reboot
constructor
A new instance of Reboot.
Constructor Details
#initialize(client, serverID) ⇒ Reboot
Returns a new instance of Reboot.
131 132 133 134 |
# File 'lib/commands.rb', line 131 def initialize(client, serverID) @client = client @serverID = serverID end |
Instance Attribute Details
#serverID ⇒ Object
Returns the value of attribute serverID.
129 130 131 |
# File 'lib/commands.rb', line 129 def serverID @serverID end |
Instance Method Details
#execute ⇒ Object
136 137 138 139 140 |
# File 'lib/commands.rb', line 136 def execute return @client.post( "#{Entrypoint}servers/#{serverID}/actions/reboot", headers: {'Content-Type': 'application/json'}) end |