Class: Bmc::Sdk::DeleteServer
- Inherits:
-
Object
- Object
- Bmc::Sdk::DeleteServer
- Defined in:
- lib/commands.rb
Overview
DeleteServer command will deprovision specific server with the given server ID.
Instance Attribute Summary collapse
-
#serverID ⇒ Object
Returns the value of attribute serverID.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(client, serverID) ⇒ DeleteServer
constructor
A new instance of DeleteServer.
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
#serverID ⇒ Object
Returns the value of attribute serverID.
32 33 34 |
# File 'lib/commands.rb', line 32 def serverID @serverID end |
Instance Method Details
#execute ⇒ Object
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 |