|
@@ -637,10 +637,35 @@ class ONU implements DeviceInterface
|
|
|
*/
|
|
|
public function getDeviceData()
|
|
|
{
|
|
|
- return array(
|
|
|
+
|
|
|
+ $deviceData = array();
|
|
|
+ $deviceData['deviceType'] = get_class($this);
|
|
|
+ $deviceData['deviceId'] = $this->id;
|
|
|
+ $deviceData['ip'] = $this->ip;
|
|
|
+ $deviceData['tenancyId'] = $this->tenancyId;
|
|
|
+
|
|
|
+ $deviceExtraData = array('mac' => $this->mac, 'serialNumber' => $this->serialNumber, 'ponSerialNumber' => $this->ponSerialNumber,
|
|
|
+ 'clientId' => $this->clientId);
|
|
|
+
|
|
|
+ ($this->olt)? $olt = $this->getOlt()->getId() : $olt = null;
|
|
|
+ ($this->model)? $model = $this->getModel()->getId() : $model = null;
|
|
|
+ ($this->nap)? $nap = $this->getNap()->getId() : $nap = null;
|
|
|
+ ($this->profile)? $profile = $this->getProfile()->getId() : $profile = null;
|
|
|
+
|
|
|
+ $deviceExtraData['oltId'] = $olt;
|
|
|
+ $deviceExtraData['modelId'] = $model;
|
|
|
+ $deviceExtraData['napId'] = $nap;
|
|
|
+ $deviceExtraData['profileId'] = $profile;
|
|
|
+
|
|
|
+
|
|
|
+ $deviceData['extraData'] = json_encode($deviceExtraData);
|
|
|
+
|
|
|
+ return $deviceData;
|
|
|
+
|
|
|
+ /*return array(
|
|
|
'deviceType' => get_class($this),
|
|
|
'deviceId' => $this->id,
|
|
|
- );
|
|
|
+ );*/
|
|
|
}
|
|
|
|
|
|
}
|