lib/fog/openstack/requests/compute/rebuild_server.rb in fog-1.10.0 vs lib/fog/openstack/requests/compute/rebuild_server.rb in fog-1.10.1
- old
+ new
@@ -9,10 +9,18 @@
'imageRef' => image_ref,
'name' => name
}}
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
end