Exemple #1
0
 def test_get_voltage(self, duthost, localhost, platform_api_conn):
     # TODO: Do more sanity checking on the data we retrieve
     for i in range(self.num_sfps):
         voltage = sfp.get_voltage(platform_api_conn, i)
         if self.expect(voltage is not None, "Unable to retrieve transceiver {} voltage".format(i)):
             self.expect(isinstance(voltage, float), "Transceiver {} voltage appears incorrect".format(i))
     self.assert_expectations()
Exemple #2
0
    def test_get_voltage(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"]:
            voltage = sfp.get_voltage(platform_api_conn, i)
            if self.expect(
                    voltage is not None,
                    "Unable to retrieve transceiver {} voltage".format(i)):
                self.expect(
                    isinstance(voltage, float),
                    "Transceiver {} voltage appears incorrect".format(i))
        self.assert_expectations()
Exemple #3
0
    def test_get_voltage(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_voltage: Skipping transceiver {} (not applicable for this transceiver type)".format(i))
                continue

            voltage = sfp.get_voltage(platform_api_conn, i)
            if self.expect(voltage is not None, "Unable to retrieve transceiver {} voltage".format(i)):
                self.expect(isinstance(voltage, float), "Transceiver {} voltage appears incorrect".format(i))
        self.assert_expectations()