From f1ef97f59f9ad3b10eacdcdf0b1f21b6926c6509 Mon Sep 17 00:00:00 2001 From: "Stepan G. Fedorov" Date: Tue, 8 Nov 2011 15:05:41 +0400 Subject: [PATCH] [clodo|compute] Enable :get_image_details --- lib/fog/clodo/compute.rb | 2 +- lib/fog/clodo/models/compute/images.rb | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/fog/clodo/compute.rb b/lib/fog/clodo/compute.rb index 15d96d631..48b4fbd39 100644 --- a/lib/fog/clodo/compute.rb +++ b/lib/fog/clodo/compute.rb @@ -15,7 +15,7 @@ module Fog request_path 'fog/clodo/requests/compute' request :create_server request :delete_server -# request :get_image_details # Not supported by API + request :get_image_details # Not supported by API request :list_images request :list_images_detail request :list_servers diff --git a/lib/fog/clodo/models/compute/images.rb b/lib/fog/clodo/models/compute/images.rb index c296ef0d7..a6b1843af 100644 --- a/lib/fog/clodo/models/compute/images.rb +++ b/lib/fog/clodo/models/compute/images.rb @@ -15,6 +15,9 @@ module Fog end def get(image_id) + image = connection.get_image_details(image_id).body['image'] + new(image) if image + rescue Fog::Compute::Clodo::NotFound nil end