Skip to content

Commit 8efcd20

Browse files
cloudvision/cvlib: Add attribute in Device class to identify preprovisioned device
This helps identify whether the device is actually talking to CloudVision or is just preprovisioned and expected to show up later. Change-Id: I2b704389a89ea2414901fa6e780f99df389e6210
1 parent 784065e commit 8efcd20

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

cloudvision/cvlib/device.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -328,23 +328,26 @@ class Device:
328328
'''
329329
Object to store device information
330330
331-
:param ip: IP address of device
332-
:param deviceId: ID of the device
333-
:param deviceMac: Mac address of the device
334-
:param hostName: Hostname of the device
335-
:param modelName: Model name of the device
331+
:param ip: IP address of device
332+
:param deviceId: ID of the device
333+
:param deviceMac: Mac address of the device
334+
:param hostName: Hostname of the device
335+
:param modelName: Model name of the device
336+
:param isPreprovisionedDevice: Boolean to indicate if the device is preprovisioned
336337
'''
337338

338339
def __init__(self, deviceId: Optional[str] = None,
339340
ip: Optional[str] = None,
340341
deviceMac: Optional[str] = "",
341342
hostName: Optional[str] = "",
342-
modelName: Optional[str] = ""):
343+
modelName: Optional[str] = "",
344+
isPreprovisionedDevice: Optional[bool] = False):
343345
self.id = deviceId
344346
self.ip = ip
345347
self.mac = deviceMac
346348
self.hostName = hostName
347349
self.modelName = modelName
350+
self.isPreprovisionedDevice = isPreprovisionedDevice
348351
# dict of interface name -> interface
349352
self._interfaces: Dict = {}
350353

0 commit comments

Comments
 (0)