def attach_network_interface(nic_id, instance_id, device_index)
response = Excon::Response.new
if self.data[:network_interfaces][nic_id]
attachment = self.data[:network_interfaces][nic_id]['attachment']
attachment['attachmentId'] = Fog::AWS::Mock.request_id
attachment['instanceId'] = instance_id
response.status = 200
response.body = {
'requestId' => Fog::AWS::Mock.request_id,
'attachmentId' => attachment['attachmentId']
}
else
raise Fog::Compute::AWS::NotFound.new("The network interface '#{nic_id}' does not exist")
end
response
end