示例#1
0
    def complete_device_specific_activation(self, device, results):
        """
        Perform an initial network operation to discover the device hardware
        and software version. Serial Number would be helpful as well.

        This method is called from within the base class's activate generator.

        :param device: A voltha.Device object, with possible device-type
                specific extensions. Such extensions shall be described as part of
                the device type specification returned by device_types().

        :param results: (dict) original adtran-hello RESTCONF results body
        """
        #
        # For the pizzabox OLT, periodically query the OLT state of all PONs. This
        # is simpler then having each PON port do its own poll.  From this, we can:
        #
        # o Discover any new or missing ONT/ONUs
        #
        # o TODO Discover any LOS for any ONT/ONUs
        #
        # o TODO Update some PON level statistics

        self.zmq_client = AdtranZmqClient(self.ip_address, self.rx_packet)
        # self.nc_client = manager.connect(host='',  # self.ip_address,
        #                                  username=self.rest_username,
        #                                  password=self.rest_password,
        #                                  hostkey_verify=False,
        #                                  allow_agent=False,
        #                                  look_for_keys=False)

        self.status_poll = reactor.callLater(1, self.poll_for_status)
        return None
示例#2
0
    def complete_device_specific_activation(self, device, reconciling):
        """
        Perform an initial network operation to discover the device hardware
        and software version. Serial Number would be helpful as well.

        This method is called from within the base class's activate generator.

        :param device: A voltha.Device object, with possible device-type
                specific extensions. Such extensions shall be described as part of
                the device type specification returned by device_types().

        :param reconciling: (boolean) True if taking over for another VOLTHA
        """
        # For the pizzabox OLT, periodically query the OLT state of all PONs. This
        # is simpler then having each PON port do its own poll.  From this, we can:
        #
        # o Discover any new or missing ONT/ONUs
        #
        # o TODO Discover any LOS for any ONT/ONUs
        #
        # o TODO Update some PON level statistics

        self.zmq_client = AdtranZmqClient(self.ip_address, rx_callback=self.rx_packet, port=self.zmq_port)
        self.status_poll = reactor.callLater(5, self.poll_for_status)
        return succeed('Done')
示例#3
0
    def reenable(self):
        super(AdtranOltHandler, self).reenable()

        self.zmq_client = AdtranZmqClient(self.ip_address,
                                          rx_callback=self.rx_packet,
                                          port=self.zmq_port)
        self.status_poll = reactor.callLater(1, self.poll_for_status)
示例#4
0
    def _finish_reboot(self, timeout, previous_oper_status,
                       previous_conn_status):
        super(AdtranOltHandler,
              self)._finish_reboot(timeout, previous_oper_status,
                                   previous_conn_status)

        self.zmq_client = AdtranZmqClient(self.ip_address,
                                          rx_callback=self.rx_packet,
                                          port=self.zmq_port)
        self.status_poll = reactor.callLater(1, self.poll_for_status)