Class: Bmc::Sdk::PowerOn
- Inherits:
-
Object
- Object
- Bmc::Sdk::PowerOn
- Defined in:
- lib/commands.rb
Overview
PowerOn command will power on a specific server.
Instance Attribute Summary collapse
-
#serverID ⇒ Object
Returns the value of attribute serverID.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(client, serverID) ⇒ PowerOn
constructor
A new instance of PowerOn.
Constructor Details
#initialize(client, serverID) ⇒ PowerOn
Returns a new instance of PowerOn.
111 112 113 114 |
# File 'lib/commands.rb', line 111 def initialize(client, serverID) @client = client @serverID = serverID end |
Instance Attribute Details
#serverID ⇒ Object
Returns the value of attribute serverID.
109 110 111 |
# File 'lib/commands.rb', line 109 def serverID @serverID end |
Instance Method Details
#execute ⇒ Object
116 117 118 119 120 |
# File 'lib/commands.rb', line 116 def execute return @client.post( "#{Entrypoint}servers/#{serverID}/actions/power-on", headers: {'Content-Type': 'application/json'}) end |