Class: Ropenstack::Image
- Inherits:
-
OpenstackService
- Object
- Rest
- OpenstackService
- Ropenstack::Image
- Defined in:
- lib/ropenstack/image.rb
Overview
-
Description: Implementation of the Glance API Client in Ruby
-
Author: Sam ‘Tehsmash’ Betts, John Davidge
-
Date: 30/06/2014
Defined Under Namespace
Instance Method Summary collapse
-
#initialize(location, token, type) ⇒ Image
constructor
A new instance of Image.
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) ⇒ Image
Returns a new instance of Image.
15 16 17 18 19 20 21 22 23 |
# File 'lib/ropenstack/image.rb', line 15 def initialize(location, token, type) super(location, token) case type when "image" then extend Version1 when "imagev2" then extend Version2 else raise Ropenstack::RopenstackError, "Invalid type passed to Image" end end |