Class: Bmc::Sdk::Reboot

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

Overview

Reboot command will reboot a specific server.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#serverIDObject

Returns the value of attribute serverID.



129
130
131
# File 'lib/commands.rb', line 129

def serverID
  @serverID
end

Instance Method Details

#executeObject



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