Class: Bmc::Sdk::PowerOff
- Inherits:
-
Object
- Object
- Bmc::Sdk::PowerOff
- Defined in:
- lib/commands.rb
Overview
PowerOff command will power off a specific server.
Instance Attribute Summary collapse
-
#serverID ⇒ Object
Returns the value of attribute serverID.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(client, serverID) ⇒ PowerOff
constructor
A new instance of PowerOff.
Constructor Details
#initialize(client, serverID) ⇒ PowerOff
Returns a new instance of PowerOff.
91 92 93 94 |
# File 'lib/commands.rb', line 91 def initialize(client, serverID) @client = client @serverID = serverID end |
Instance Attribute Details
#serverID ⇒ Object
Returns the value of attribute serverID.
89 90 91 |
# File 'lib/commands.rb', line 89 def serverID @serverID end |
Instance Method Details
#execute ⇒ Object
96 97 98 99 100 |
# File 'lib/commands.rb', line 96 def execute return @client.post( "#{Entrypoint}servers/#{serverID}/actions/power-off", headers: {'Content-Type': 'application/json'}) end |