Class: Bmc::Sdk::DeleteServer

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

Overview

DeleteServer command will deprovision specific server with the given server ID.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client, serverID) ⇒ DeleteServer

Returns a new instance of DeleteServer.



34
35
36
37
# File 'lib/commands.rb', line 34

def initialize(client, serverID)
  @client = client
  @serverID = serverID
end

Instance Attribute Details

#serverIDObject

Returns the value of attribute serverID.



32
33
34
# File 'lib/commands.rb', line 32

def serverID
  @serverID
end

Instance Method Details

#executeObject



39
40
41
42
43
# File 'lib/commands.rb', line 39

def execute
  return @client.delete(
    "#{Entrypoint}servers/#{serverID}",
    headers: {'Content-Type': 'application/json'})
end