Class | Fog::Compute::BareMetalCloud::Real
In: | lib/fog/bare_metal_cloud/compute.rb lib/fog/bare_metal_cloud/requests/compute/reboot_server.rb lib/fog/bare_metal_cloud/requests/compute/list_plans.rb lib/fog/bare_metal_cloud/requests/compute/list_images.rb lib/fog/bare_metal_cloud/requests/compute/list_configurations.rb lib/fog/bare_metal_cloud/requests/compute/cancel_server.rb lib/fog/bare_metal_cloud/requests/compute/list_servers.rb lib/fog/bare_metal_cloud/requests/compute/get_server.rb lib/fog/bare_metal_cloud/requests/compute/add_server.rb lib/fog/bare_metal_cloud/requests/compute/add_server_by_configuration.rb
Parent: | Object

### Methods

add_server add_server_by_configuration cancel_server get_server list_configurations 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

add_server_by_configuration(config, options = {})

Boot a new server by configuration

#### Parameters

- config<~String> - The Hardware configuration string
- options<~Hash>: optional extra arguments
  - imageName<~String> - Optional imageName to be installed
  - name<~String> - Optional server Name

#### 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

#### Parameters

- serverId<~String> - Id of the server

#### Returns

- response<~Excon::Response>:
  - body<~Has>:
    - server<~Hash>:
      - ‘id’<~String> - Id of the server
      - ‘mac-address’<~String> - mac-address 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_configurations()

List Configurations

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
    - available-server<~Array>:
      - ‘configuration’<~String> - Hardware Configuration string
      - ‘quantity’<~String>: - quantity of servers to a certain configuration

list_images()

List images

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
    - ‘image’<~Array>
      - ‘Size’<~String> - Size of the image
      - ‘Name’<~String> - Name of the image

list_plans()

List available plans

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
    - ‘plan’<~Array>
      - ‘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<~Hash>:
    - server<~Array>:
      - ‘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]