From 79c49d1cc0f0654eb7fa3a4aa0150d418987c249 Mon Sep 17 00:00:00 2001 From: Alvin Garcia Date: Tue, 27 Mar 2012 17:43:42 +0800 Subject: [PATCH] [openstack|compute] Fixed creating image of a server --- lib/fog/openstack/requests/compute/create_image.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fog/openstack/requests/compute/create_image.rb b/lib/fog/openstack/requests/compute/create_image.rb index 7efc4238a..79299f396 100644 --- a/lib/fog/openstack/requests/compute/create_image.rb +++ b/lib/fog/openstack/requests/compute/create_image.rb @@ -9,7 +9,7 @@ module Fog 'metadata' => metadata }} data = server_action(server_id, body) - image_id = data.headers["Location"].scan(/.*\/(.*)/).flatten + image_id = data.headers["Location"].scan(/.*\/(.*)/).flatten[0] get_image_details(image_id) end