Class: Bmc::Sdk::Shutdown
- Inherits:
-
Object
- Object
- Bmc::Sdk::Shutdown
- Defined in:
- lib/commands.rb
Overview
Shutdown command will shutdown a specific server
Instance Attribute Summary collapse
-
#serverID ⇒ Object
Returns the value of attribute serverID.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(client, serverID) ⇒ Shutdown
constructor
A new instance of Shutdown.
Constructor Details
#initialize(client, serverID) ⇒ Shutdown
Returns a new instance of Shutdown.
173 174 175 176 |
# File 'lib/commands.rb', line 173 def initialize(client, serverID) @client = client @serverID = serverID end |
Instance Attribute Details
#serverID ⇒ Object
Returns the value of attribute serverID.
171 172 173 |
# File 'lib/commands.rb', line 171 def serverID @serverID end |
Instance Method Details
#execute ⇒ Object
178 179 180 181 182 |
# File 'lib/commands.rb', line 178 def execute return @client.post( "#{Entrypoint}servers/#{serverID}/actions/shutdown", headers: {'Content-Type': 'application/json'}) end |