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:
parent
b3c851cd07
commit
8542e93b24
1 changed files with 9 additions and 1 deletions
|
@ -11,7 +11,15 @@ module Fog
|
||||||
}}
|
}}
|
||||||
body['rebuild']['adminPass'] = admin_pass if admin_pass
|
body['rebuild']['adminPass'] = admin_pass if admin_pass
|
||||||
body['rebuild']['metadata'] = metadata if metadata
|
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)
|
server_action(server_id, body, 202)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue