blob: ea20a9bb944fbbea171c7659dd6245eee9c042b0 [file] [log] [blame]
Shad Ansarid88692c2022-02-01 22:47:43 +00001"""
Shad Ansarib046c152022-06-07 14:34:14 -07002SPDX-FileCopyrightText: 2022-present Intel Corporation
Shad Ansarid88692c2022-02-01 22:47:43 +00003SPDX-FileCopyrightText: 2020-present Open Networking Foundation <info@opennetworking.org>
Shad Ansarib046c152022-06-07 14:34:14 -07004SPDX-License-Identifier: Apache-2.0
Shad Ansarid88692c2022-02-01 22:47:43 +00005"""
6
7import logging as log
8from datetime import datetime
9
10
11class Device(object):
Shad Ansariae3903e2022-02-05 01:03:01 +000012 def __init__(self, imsi_id, imsi, last_reachable=datetime.min, ip=None):
Shad Ansarid88692c2022-02-01 22:47:43 +000013 # log.debug("creating device, imsi_id={}, imsi={}, ip={}".format(imsi_id, imsi, ip))
14 self.imsi_id = imsi_id
15 self.imsi = imsi
16 self.ip = ip
17 self.reachable = False
Shad Ansariae3903e2022-02-05 01:03:01 +000018 self.last_reachable = last_reachable
Shad Ansari0508ddf2022-03-24 03:16:51 +000019
20 def __str__(self):
21 return("imsi_id={}, imsi={}, ip={}".format(self.imsi_id, self.imsi, self.ip))