def test_reset(self, duthost, localhost, platform_api_conn): # TODO: Verify that the transceiver was actually reset for i in range(self.num_sfps): ret = sfp.reset(platform_api_conn, i) self.expect(ret is True, "Failed to reset transceiver {}".format(i)) self.assert_expectations()
def test_reset(self, duthosts, enum_rand_one_per_hwsku_hostname, localhost, platform_api_conn): # TODO: Verify that the transceiver was actually reset for i in self.candidate_sfp: ret = sfp.reset(platform_api_conn, i) self.expect(ret is True, "Failed to reset transceiver {}".format(i)) self.assert_expectations()
def test_reset(self, duthosts, enum_rand_one_per_hwsku_hostname, localhost, platform_api_conn): # TODO: Verify that the transceiver was actually reset 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.expect(info_dict is not None, "Unable to retrieve transceiver {} info".format(i)): continue ret = sfp.reset(platform_api_conn, i) if self.is_xcvr_resettable(info_dict): self.expect(ret is True, "Failed to reset transceiver {}".format(i)) else: self.expect(ret is False, "Resetting transceiver {} succeeded but should have failed".format(i)) self.assert_expectations()
def test_reset(self, duthosts, enum_rand_one_per_hwsku_hostname, localhost, platform_api_conn): # TODO: Verify that the transceiver was actually reset for i in self.candidate_sfp: info_dict = sfp.get_transceiver_info(platform_api_conn, i) if not self.expect( info_dict is not None, "Unable to retrieve transceiver {} info".format(i)): continue ret = sfp.reset(platform_api_conn, i) if self.is_xcvr_resettable(info_dict): self.expect(ret is True, "Failed to reset transceiver {}".format(i)) else: self.expect( ret is False, "Resetting transceiver {} succeeded but should have failed" .format(i)) self.assert_expectations()