Class: Ropenstack::BlockStorage

Inherits:
OpenstackService show all
Defined in:
lib/ropenstack/blockStorage.rb

Overview

  • Name: BlockStorage

  • Description: Implementation of the Block Storage API Client in Ruby.

  • Author: Sam ‘Tehsmash’ Betts

  • Date: 01/15/2013

Defined Under Namespace

Modules: Version1, Version2

Instance Method Summary collapse

Methods inherited from Rest

#build_headers, #build_http, #delete_request, #do_request, #error_manager, #get_request, #post_request, #put_request

Constructor Details

#initialize(location, token, type) ⇒ BlockStorage

Returns a new instance of BlockStorage.



15
16
17
18
19
20
21
22
23
# File 'lib/ropenstack/blockStorage.rb', line 15

def initialize(location, token, type)
  super(location, token)
  case type
  when "volume" then extend Version1
  when "volumev2" then extend Version2
  else 
    raise Ropenstack::RopenstackError, "Invalid Type Passed to BlockStorage"
  end
end