def test_get_temperature(self, duthost, localhost, platform_api_conn): # TODO: Do more sanity checking on the data we retrieve for i in range(self.num_sfps): temp = sfp.get_temperature(platform_api_conn, i) if self.expect(temp is not None, "Unable to retrieve transceiver {} temperatue".format(i)): self.expect(isinstance(temp, float), "Transceiver {} temperature appears incorrect".format(i)) self.assert_expectations()
def test_get_temperature(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"]: temp = sfp.get_temperature(platform_api_conn, i) if self.expect( temp is not None, "Unable to retrieve transceiver {} temperatue".format(i)): self.expect( isinstance(temp, float), "Transceiver {} temperature appears incorrect".format(i)) self.assert_expectations()