Class: Bmc::Sdk::GetServer
- Inherits:
-
Object
- Object
- Bmc::Sdk::GetServer
- Defined in:
- lib/commands.rb
Overview
GetServer command will get server properties for a given server ID.
Instance Attribute Summary collapse
-
#serverID ⇒ Object
Returns the value of attribute serverID.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(client, serverID) ⇒ GetServer
constructor
A new instance of GetServer.
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
#serverID ⇒ Object
Returns the value of attribute serverID.
52 53 54 |
# File 'lib/commands.rb', line 52 def serverID @serverID end |
Instance Method Details
#execute ⇒ Object
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 |