Module Fog::Compute::Brightbox::Shared
In: lib/fog/brightbox/compute.rb

Methods

Included Modules

Fog::Brightbox::OAuth2

Public Class methods

Creates a new instance of the Brightbox Compute service

@note If you create service using just a refresh token when it

  expires the service will no longer be able to authenticate.

@param [Hash] options @option options [String] :brightbox_api_url Override the default (or configured) API endpoint @option options [String] :brightbox_auth_url Override the default (or configured) API authentication endpoint @option options [String] :brightbox_client_id Client identifier to authenticate with (overrides configured) @option options [String] :brightbox_secret Client secret to authenticate with (overrides configured) @option options [String] :brightbox_username Email or user identifier for user based authentication @option options [String] :brightbox_password Password for user based authentication @option options [String] :brightbox_account Account identifier to scope this connection to @option options [String] :connection_options Settings to pass to underlying {Fog::Connection} @option options [Boolean] :persistent Sets a persistent HTTP {Fog::Connection} @option options [String] :brightbox_access_token Sets the OAuth access token to use rather than requesting a new token @option options [String] :brightbox_refresh_token Sets the refresh token to use when requesting a newer access token @option options [String] :brightbox_token_management Overide the existing behaviour to request access tokens if expired (default is `true`)

Public Instance methods

Returns the current access token or nil @return [String,nil]

Returns true if an access token is set @return [Boolean]

Returns the scoped account being used for requests

  • For API clients this is the owning account
  • For User applications this is the account specified by either account_id option on the service or the brightbox_account setting in your configuration

@return [Fog::Compute::Brightbox::Account]

Returns true if authentication is being performed as a user @return [Boolean]

Returns an identifier for the default image for use

Currently tries to find the latest version Ubuntu LTS (i686) widening up to the latest, official version of Ubuntu available.

Highly recommended that you actually select the image you want to run on your servers yourself!

@return [String, nil]

Requests a new access token

@return [String] New access token

Requests a new access token and raises if there is a problem

@return [String] New access token @raise [Excon::Errors::BadRequest] The credentials are expired or incorrect

Returns the current refresh token or nil @return [String,nil]

This returns the account identifier that the request should be scoped by based on the options passed to the request and current configuration

@param [String] options_account Any identifier passed into the request

@return [String, nil] The account identifier to scope the request to or nil

Sets the scoped account for future requests @param [String] scoped_account Identifier of the account to scope request to

Resets the scoped account back to intially configured one

[Validate]