1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

OpenStack: base64 encode personality in rebuild

Updates the rebuild_server action so that it base64's the personality
just like we do in create_server.
This commit is contained in:
Dan Prince 2013-03-02 21:15:40 -05:00
parent b3c851cd07
commit 8542e93b24

View file

@ -11,7 +11,15 @@ module Fog
}}
body['rebuild']['adminPass'] = admin_pass if admin_pass
body['rebuild']['metadata'] = metadata if metadata
body['rebuild']['personality'] = personality if personality
if personality
body['rebuild']['personality'] = []
for file in personality
body['rebuild']['personality'] << {
'contents' => Base64.encode64(file['contents']),
'path' => file['path']
}
end
end
server_action(server_id, body, 202)
end