VOL-1116 Openolt reboot
Change-Id: Ib84f2d2966e3cca4a39d508984277f07a073fabf
diff --git a/voltha/adapters/openolt/openolt_device.py b/voltha/adapters/openolt/openolt_device.py
index ce082dd..d4e67c3 100644
--- a/voltha/adapters/openolt/openolt_device.py
+++ b/voltha/adapters/openolt/openolt_device.py
@@ -953,3 +953,13 @@
onu_id=child_device.proxy_address.onu_id,
serial_number=serial_number)
self.stub.DeleteOnu(onu)
+
+ def reboot(self):
+ self.log.debug('rebooting openolt device', device_id = self.device_id)
+ try:
+ self.stub.Reboot(openolt_pb2.Empty())
+ except Exception as e:
+ self.log.error('something went wrong with the reboot', error=e)
+ else:
+ self.log.info('device rebooted')
+