Class: Smartdc::Client
- Inherits:
-
Object
- Object
- Smartdc::Client
- Includes:
- CassetteRack::Request, Api::Analytics, Api::Analytics::Heatmap, Api::Datacenters, Api::Images, Api::Keys, Api::Machines, Api::Machines::Metadata, Api::Machines::Snapshots, Api::Machines::Tags, Api::Packages
- Defined in:
- lib/smartdc/client.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
Methods included from Api::Analytics::Heatmap
#analytic_details, #analytic_image
Methods included from Api::Analytics
#analytic, #analytics, #create_analytic, #describe_analytics, #destroy_analytic, #value_analytic
Methods included from Api::Machines::Snapshots
#create_machine_snapshot, #destroy_machine_snapshot, #machine_snapshot, #machine_snapshots, #start_machine_snapshot
Methods included from Api::Machines::Metadata
#destroy_machine_metadata, #machine_metadata, #update_machine_metadata
Methods included from Api::Machines::Tags
#create_machine_tag, #destroy_machine_tag, #machine_tag, #machine_tags
Methods included from Api::Machines
#create_machine, #destroy_machine, #machine, #machines, #reboot_machine, #resize_machine, #start_machine, #stop_machine
Methods included from Api::Keys
#create_key, #destroy_key, #key, #keys
Methods included from Api::Packages
Methods included from Api::Images
Methods included from Api::Datacenters
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/smartdc/client.rb', line 28 def initialize(={}) = Smartdc.config..merge() auth = Smartdc::Auth.new() date = Time.now.gmtime.to_s @request_options = { builder: [:middleware], url: [:url], ssl: { verify: [:ssl_verify] }, headers: { date: date, authorization: auth.signature(date), 'content-type' => 'application/json', accept: 'application/json', 'x-api-version' => [:version] } } end |