mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
bug #3396: econe-register should accept both ami-ID or ID options as an arg
(cherry picked from commit 7e8693d6d74214cbffefc8ab5883b1390fbb4729)
This commit is contained in:
parent
da7b29738e
commit
8a0f49d8a4
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user