Class: Bmc::Sdk::Reset

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

Overview

Reset command will reset the configuration for a specific server.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client, server) ⇒ Reset

server is a ProvisionedServer



152
153
154
155
# File 'lib/commands.rb', line 152

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

Instance Attribute Details

#serverObject

Returns the value of attribute server.



149
150
151
# File 'lib/commands.rb', line 149

def server
  @server
end

Instance Method Details

#executeObject



157
158
159
160
161
162
# File 'lib/commands.rb', line 157

def execute
  return @client.post(
    "#{Entrypoint}servers/#{@server.id}/actions/reset",
    headers: {'Content-Type': 'application/json'},
    body: @server.to_json)
end