Class: Bmc::Sdk::PowerOn

Inherits:
Object
  • Object
show all
Defined in:
lib/commands.rb

Overview

PowerOn command will power on a specific server.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#serverIDObject

Returns the value of attribute serverID.



109
110
111
# File 'lib/commands.rb', line 109

def serverID
  @serverID
end

Instance Method Details

#executeObject



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