Class | Fog::Compute::BareMetalCloud::Real

In:

lib/fog/bare_metal_cloud/compute.rb
lib/fog/bare_metal_cloud/requests/compute/add_server.rb
lib/fog/bare_metal_cloud/requests/compute/cancel_server.rb
lib/fog/bare_metal_cloud/requests/compute/get_server.rb
lib/fog/bare_metal_cloud/requests/compute/list_images.rb
lib/fog/bare_metal_cloud/requests/compute/list_plans.rb
lib/fog/bare_metal_cloud/requests/compute/list_servers.rb
lib/fog/bare_metal_cloud/requests/compute/reboot_server.rb

Parent: | Object

### Methods

add_server cancel_server get_server list_images list_plans list_servers new reboot_server reload request

### Public Class methods

new(options={})

### Public Instance methods

add_server(plan_id, options = {})

Boot a new server

#### Parameters

- planId<~String> - The id of the plan to boot the server with
- options<~Hash>: optional extra arguments
  - imageId<~String> - Optional image to boot server from
  - name<~String> - Name to boot new server with

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
    - ‘server’<~Hash>:
      - ‘id’<~String> - Id of the image

cancel_server(server_id)

Shutdown a running server

#### Parameters

- serverId<~String> - The id of the server to shutdown

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
    - ‘server’<~Hash>:
      - ‘id’<~String> - Id of the image

get_server(server_id)

List servers

#### Returns

- response<~Excon::Response>:
  - server<~Hash>:
    - ‘id’<~String> - Id of the server
    - ‘ip’<~Hash>:
      - ‘address’<~String> - Address of the ip
      - ‘name’<~String> - Name of the ip
    - ‘login’<~Hash>:
      - ‘name’<~String> - Name of the login
      - ‘password’<~String> - Password of the login
      - ‘username’<~String> - Username of the login
    - ‘name’<~String> - Name of the server
    - ‘notes’<~String> - Notes about the server
    - ‘state’<~String> - State of the server

list_images()

List images

#### Returns

- response<~Excon::Response>:
  - body<~Array>:
    - ‘id’<~String> - Id of the image
    - ‘name’<~String> - Name of the image
    - ‘size’<~String> - Size of the image

list_plans()

List available plans

#### Returns

- response<~Excon::Response>:
  - body<~Array>:
    - ‘description’<~String> - Description of the plan
    - ‘id’<~String> - Id of the plan
    - ‘name’<~String> - Name of the plan
    - ‘rate’<~String> - Cost per hour of the plan
    - ‘os’<~String> - Operating system of the plan
    - ‘config’<~String> - Configuration of the plan

list_servers()

List servers

#### Returns

- response<~Excon::Response>:
  - body<~Array>:
    - server<~Hash>:
      - ‘id’<~String> - Id of the server
      - ‘ip’<~Hash>:
        - ‘address’<~String> - Address of the ip
        - ‘name’<~String> - Name of the ip
      - ‘login’<~Hash>:
        - ‘name’<~String> - Name of the login
        - ‘password’<~String> - Password of the login
        - ‘username’<~String> - Username of the login
      - ‘name’<~String> - Name of the server
      - ‘notes’<~String> - Notes about the server
      - ‘state’<~String> - State of the server

reboot_server(server_id)

Reboot a running server

#### Parameters

- serverId<~String> - The id of the server to reboot

reload()
request(params)

[Validate]