def restore_address_to_classic(public_ip)
response = Excon::Response.new
address = self.data[:addresses][public_ip]
if address
if address[:origin] == 'vpc'
raise Fog::Compute::AWS::Error.new("InvalidState => You cannot migrate an Elastic IP address that was originally allocated for use in EC2-VPC to EC2-Classic.")
end
address['domain'] = 'standard'
address.delete("allocationId")
response.status = 200
response.body = {
'requestId' => Fog::AWS::Mock.request_id,
'publicIp' => public_ip,
'status' => "InClassic"
}
response
else
raise Fog::Compute::AWS::NotFound.new("Address does not exist")
end
end