Exemple #1
0
 def test_get_rx_los(self, duthost, localhost, platform_api_conn):
     # TODO: Do more sanity checking on the data we retrieve
     for i in range(self.num_sfps):
         rx_los = sfp.get_rx_los(platform_api_conn, i)
         if self.expect(rx_los is not None, "Unable to retrieve transceiver {} RX loss-of-signal data".format(i)):
             self.expect(isinstance(rx_los, list) and (all(isinstance(item, bool) for item in rx_los)),
                         "Transceiver {} RX loss-of-signal data appears incorrect".format(i))
     self.assert_expectations()
Exemple #2
0
    def test_get_rx_los(self, duthosts, enum_rand_one_per_hwsku_hostname, localhost, platform_api_conn):
        # TODO: Do more sanity checking on the data we retrieve
        duthost = duthosts[enum_rand_one_per_hwsku_hostname]
        skip_release_for_platform(duthost, ["202012"], ["arista", "mlnx"])

        for i in self.sfp_setup["sfp_test_port_indices"]:
            info_dict = sfp.get_transceiver_info(platform_api_conn, i)

            if not self.is_xcvr_optical(info_dict):
                logger.info("test_get_rx_los: Skipping transceiver {} (not applicable for this transceiver type)".format(i))
                continue

            rx_los = sfp.get_rx_los(platform_api_conn, i)
            if self.expect(rx_los is not None, "Unable to retrieve transceiver {} RX loss-of-signal data".format(i)):
                self.expect(isinstance(rx_los, list) and (all(isinstance(item, bool) for item in rx_los)),
                            "Transceiver {} RX loss-of-signal data appears incorrect".format(i))
        self.assert_expectations()