예제 #1
0
 def test_is_replaceable(self, duthosts, enum_rand_one_per_hwsku_hostname, platform_api_conn):
     duthost = duthosts[enum_rand_one_per_hwsku_hostname]
     skip_release_for_platform(duthost, ["202012"], ["arista", "mlnx"])
     for sfp_id in self.sfp_setup["sfp_test_port_indices"]:
         replaceable = sfp.is_replaceable(platform_api_conn, sfp_id)
         if self.expect(replaceable is not None, "Failed to perform is_replaceable for sfp {}".format(sfp_id)):
             self.expect(isinstance(replaceable, bool), "Replaceable value must be a bool value for sfp {}".format(sfp_id))
     self.assert_expectations()
예제 #2
0
 def test_is_replaceable(self, platform_api_conn):
     for sfp_id in self.candidate_sfp:
         replaceable = sfp.is_replaceable(platform_api_conn, sfp_id)
         if self.expect(
                 replaceable is not None,
                 "Failed to perform is_replaceable for sfp {}".format(
                     sfp_id)):
             self.expect(
                 isinstance(replaceable, bool),
                 "Replaceable value must be a bool value for sfp {}".format(
                     sfp_id))
     self.assert_expectations()