Class: Bmc::Sdk::CreateServer
- Inherits:
-
Object
- Object
- Bmc::Sdk::CreateServer
- Defined in:
- lib/commands.rb
Overview
CreateServer command create (request) a new server for account. Server DNS will be configured to access Google’s public DNS at 8.8.8.8.
Instance Attribute Summary collapse
-
#server ⇒ Object
Returns the value of attribute server.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(client, server) ⇒ CreateServer
constructor
server is a ProvisionedServer.
Constructor Details
#initialize(client, server) ⇒ CreateServer
server is a ProvisionedServer
13 14 15 16 |
# File 'lib/commands.rb', line 13 def initialize(client, server) @client = client @server = server end |
Instance Attribute Details
#server ⇒ Object
Returns the value of attribute server.
10 11 12 |
# File 'lib/commands.rb', line 10 def server @server end |
Instance Method Details
#execute ⇒ Object
18 19 20 21 22 23 |
# File 'lib/commands.rb', line 18 def execute return @client.post( "#{Entrypoint}servers", headers: {'Content-Type': 'application/json'}, body: @server.to_json) end |