Class: Bmc::Sdk::GetServer

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

Overview

GetServer command will get server properties for a given server ID.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client, serverID) ⇒ GetServer

Returns a new instance of GetServer.



54
55
56
57
# File 'lib/commands.rb', line 54

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

Instance Attribute Details

#serverIDObject

Returns the value of attribute serverID.



52
53
54
# File 'lib/commands.rb', line 52

def serverID
  @serverID
end

Instance Method Details

#executeObject



59
60
61
62
63
# File 'lib/commands.rb', line 59

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