mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-10 14:35:43 +09:00
bug #3396: econe-register should accept both ami-ID or ID options as an arg
(cherry picked from commit 7e8693d6d7)
This commit is contained in:
1 parent
da7b29738e
commit
8a0f49d8a4
1 file changed
+5
-1
@@ -132,8 +132,12 @@ class EC2QueryServer < CloudServer
|
||||
def register_image(params)
|
||||
# Get the Image ID
|
||||
image_id = params['ImageLocation']
|
||||
image = ImageEC2.new(Image.build_xml(image_id.to_i), @client)
|
||||
|
||||
if image_id =~ /ami\-(.+)/
|
||||
image_id = $1
|
||||
end
|
||||
|
||||
image = ImageEC2.new(Image.build_xml(image_id.to_i), @client)
|
||||
rc = image.info
|
||||
if OpenNebula.is_error?(rc)
|
||||
return rc
|
||||
|
||||
Reference in new issue
Block a user