def create_server(flavor_id, image_id, options = {})
response = Excon::Response.new
response.status = 202
data = {
'addresses' => { 'private' => ['0.0.0.0'], 'public' => ['0.0.0.0'] },
'flavorId' => flavor_id,
'id' => Fog::Mock.random_numbers(6).to_i,
'imageId' => image_id,
'hostId' => "123456789ABCDEF01234567890ABCDEF",
'metadata' => options['metadata'] || {},
'name' => options['name'] || "server_#{rand(999)}",
'progress' => 0,
'status' => 'BUILD'
}
self.data[:last_modified][:servers][data['id']] = Time.now
self.data[:servers][data['id']] = data
response.body = { 'server' => data.merge({'adminPass' => 'password'}) }
response
end