Class | Fog::Compute::Rackspace::Real
In: | lib/fog/rackspace/compute.rb lib/fog/rackspace/requests/compute/list_images_detail.rb lib/fog/rackspace/requests/compute/list_public_addresses.rb lib/fog/rackspace/requests/compute/update_server.rb lib/fog/rackspace/requests/compute/list_flavors_detail.rb lib/fog/rackspace/requests/compute/delete_image.rb lib/fog/rackspace/requests/compute/reboot_server.rb lib/fog/rackspace/requests/compute/get_image_details.rb lib/fog/rackspace/requests/compute/delete_server.rb lib/fog/rackspace/requests/compute/revert_resized_server.rb lib/fog/rackspace/requests/compute/list_servers.rb lib/fog/rackspace/requests/compute/list_flavors.rb lib/fog/rackspace/requests/compute/create_image.rb lib/fog/rackspace/requests/compute/list_addresses.rb lib/fog/rackspace/requests/compute/confirm_resized_server.rb lib/fog/rackspace/requests/compute/list_servers_detail.rb lib/fog/rackspace/requests/compute/resize_server.rb lib/fog/rackspace/requests/compute/create_server.rb lib/fog/rackspace/requests/compute/get_flavor_details.rb lib/fog/rackspace/requests/compute/get_server_details.rb lib/fog/rackspace/requests/compute/list_images.rb lib/fog/rackspace/requests/compute/list_private_addresses.rb lib/fog/rackspace/requests/compute/server_action.rb
Parent: | Object

### Methods

confirm_resized_server create_image create_server delete_image delete_server get_flavor_details get_image_details get_server_details list_addresses list_flavors list_flavors_detail list_images list_images_detail list_private_addresses list_public_addresses list_servers list_servers_detail new reboot_server reload request resize_server revert_resized_server server_action update_server

### Public Class methods

new(options={})

### Public Instance methods

confirm_resized_server(server_id)

Confirm resizing

#### Parameters

- server_id<~Integer> - Id of server to confirm

create_image(server_id, options = {})

Create an image from a running server

#### Parameters

- server_id<~Integer> - Id of server to create image from
- options<~Hash> - Name

#### Returns

- response<~Excon::Response>:
  - ‘image’<~Hash>:
    - ‘id’<~Integer> - Id of image
    - ‘name’<~String> - Name of image
    - ‘serverId’<~Integer> - Id of server

create_server(flavor_id, image_id, options = {})

Create a new server

#### Parameters

- flavor_id<~Integer> - Id of flavor for server
- image_id<~Integer> - Id of image for server
- name<~String> - Name of server
- options<~Hash>:
  - ‘metadata’<~Hash> - Up to 5 key value pairs containing 255 bytes of info
  - ‘name’<~String> - Name of server, defaults to "slice#{id}"
  - ‘personality’<~Array>: Up to 5 files to customize server
    - file<~Hash>:
      - ‘contents’<~String> - Contents of file (10kb total of contents)
      - ‘path’<~String> - Path to file (255 bytes total of path strings)

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
  - ‘server’<~Hash>:
    - ‘addresses’<~Hash>:
      - ‘public’<~Array> - public address strings
      - ‘private’<~Array> - private address strings
    - ‘adminPass’<~String> - Admin password for server
    - ‘flavorId’<~Integer> - Id of servers current flavor
    - ‘hostId’<~String>
    - ‘id’<~Integer> - Id of server
    - ‘imageId’<~Integer> - Id of image used to boot server
    - ‘metadata’<~Hash> - metadata
    - ‘name<~String> - Name of server
    - ‘progress’<~Integer> - Progress through current status
    - ‘status’<~String> - Current server status

delete_image(image_id)

Delete an image

#### Parameters

- image_id<~Integer> - Id of image to delete

delete_server(server_id)

Delete an existing server

#### Parameters

- id<~Integer> - Id of server to delete

get_flavor_details(flavor_id)

Get details for flavor by id

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
    - ‘id’<~Integer> - Id of the flavor
    - ‘name’<~String> - Name of the flavor
    - ‘ram’<~Integer> - Amount of ram for the flavor
    - ‘disk’<~Integer> - Amount of diskspace for the flavor

get_image_details(image_id)

Get details for image by id

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
    - ‘id’<~Integer> - Id of the image
    - ‘name’<~String> - Name of the image
    - ‘serverId’<~Integer> - Id of server image was created from
    - ‘status’<~Integer> - Status of image
    - ‘updated’<~String> - Timestamp of last update

get_server_details(server_id)

Get details about a server

#### Parameters

- server_id<~Integer> - Id of server to get details for

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
  - ‘server’<~Hash>:
    - ‘addresses’<~Hash>:
      - ‘public’<~Array> - public address strings
      - ‘private’<~Array> - private address strings
    - ‘flavorId’<~Integer> - Id of servers current flavor
    - ‘hostId’<~String>
    - ‘id’<~Integer> - Id of server
    - ‘imageId’<~Integer> - Id of image used to boot server
    - ‘metadata’<~Hash> - metadata
    - ‘name<~String> - Name of server
    - ‘progress’<~Integer> - Progress through current status
    - ‘status’<~String> - Current server status

list_addresses(server_id)

List all server addresses

#### Parameters

- server_id<~Integer> - Id of server to list addresses for

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
  - ‘addresses’<~Array>:
    - ‘public’<~Array> - Public ip addresses
    - ‘private’<~Array> - Private ip addresses

list_flavors()

List all flavors (IDs and names only)

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
    - ‘id’<~Integer> - Id of the flavor
    - ‘name’<~String> - Name of the flavor

list_flavors_detail()

List all flavors

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
    - ‘id’<~Integer> - Id of the flavor
    - ‘name’<~String> - Name of the flavor
    - ‘ram’<~Integer> - Amount of ram for the flavor
    - ‘disk’<~Integer> - Amount of diskspace for the flavor

list_images()

List all images (IDs and names only)

#### Returns

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

list_images_detail()

List all images

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
    - ‘id’<~Integer> - Id of the image
    - ‘name’<~String> - Name of the image
    - ‘updated’<~String> - Last update timestamp for image
    - ‘created’<~String> - Creation timestamp for image
    - ‘status’<~String> - Status of image

list_private_addresses(server_id)

List private server addresses

#### Parameters

- server_id<~Integer> - Id of server to list addresses for

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
    - ‘private’<~Array> - Public ip addresses

list_public_addresses(server_id)

List public server addresses

#### Parameters

- server_id<~Integer> - Id of server to list addresses for

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
    - ‘public’<~Array> - Public ip addresses

list_servers()

List all servers (IDs and names only)

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
  - ‘servers’<~Array>:
    - ‘id’<~Integer> - Id of server
    - ‘name<~String> - Name of server

list_servers_detail()

List all servers details

#### Returns

- response<~Excon::Response>:
  - body<~Hash>:
  - ‘servers’<~Array>:
    - ‘id’<~Integer> - Id of server
    - ‘name<~String> - Name of server
    - ‘imageId’<~Integer> - Id of image used to boot server
    - ‘flavorId’<~Integer> - Id of servers current flavor
    - ‘hostId’<~String>
    - ‘status’<~String> - Current server status
    - ‘progress’<~Integer> - Progress through current status
    - ‘addresses’<~Hash>:
      - ‘public’<~Array> - public address strings
      - ‘private’<~Array> - private address strings
    - ‘metadata’<~Hash> - metadata

reboot_server(server_id, type = 'SOFT')

Reboot an existing server

#### Parameters

- server_id<~Integer> - Id of server to reboot
- type<~String> - Type of reboot, must be in [‘HARD’, ‘SOFT’]

reload()
request(params)
resize_server(server_id, flavor_id)

Reboot an existing server

#### Parameters

- server_id<~Integer> - Id of server to resize
- size<~String> - new size. call list_flavors to get available flavors

revert_resized_server(server_id)

Revert resizing

#### Parameters

- server_id<~Integer> - Id of server to revert

server_action(server_id, body, expects=202)

Reboot an existing server

#### Parameters

- server_id<~Integer> - Id of server to reboot
- body<~String> - Body of the request, describes the action (see reboot_server as an example)
- expect<~Integer> - expected return, 202 except for confirm resize (204)

update_server(server_id, options = {})

Update an existing server

#### Parameters

# server_id<~Integer> - Id of server to update

- options<~Hash>:
  - adminPass<~String> - New admin password for server
  - name<~String> - New name for server

[Validate]