class Bmc::Sdk::Reboot

Reboot command will reboot a specific server.

@see developers.phoenixnap.com/docs/bmc/1/routes/servers/%7Bserver_id%7D/actions/reboot/post

Attributes

serverID[RW]

Public Class Methods

new(client, serverID) click to toggle source
# File lib/commands.rb, line 131
def initialize(client, serverID)
  @client = client
  @serverID = serverID
end

Public Instance Methods

execute() click to toggle source
# File lib/commands.rb, line 136
def execute
  return @client.post(
    "#{Entrypoint}servers/#{serverID}/actions/reboot", 
    headers: {'Content-Type': 'application/json'})
end