Exemple #1
0
 def test_get_name(self, duthost, localhost, platform_api_conn):
     for i in self.candidate_sfp:
         name = sfp.get_name(platform_api_conn, i)
         if self.expect(name is not None, "Unable to retrieve transceiver {} name".format(i)):
             self.expect(isinstance(name, STRING_TYPE), "Transceiver {} name appears incorrect".format(i))
             self.compare_value_with_platform_facts('name', name, i)
     self.assert_expectations()
Exemple #2
0
 def test_get_name(self, duthost, localhost, platform_api_conn):
     for i in range(self.num_sfps):
         name = sfp.get_name(platform_api_conn, i)
         if self.expect(name is not None,
                        "Unable to retrieve transceiver {} name".format(i)):
             self.expect(isinstance(name, STRING_TYPE),
                         "Transceiver {} name appears incorrect".format(i))
     self.assert_expectations()
Exemple #3
0
 def test_get_name(self,  duthosts, enum_rand_one_per_hwsku_hostname, localhost, platform_api_conn):
     expected_sfp_names = self.sfp_setup["sfp_fact_names"]
     for i in self.sfp_setup["sfp_test_port_indices"]:
         name = sfp.get_name(platform_api_conn, i)
         if self.expect(name is not None, "Unable to retrieve transceiver {} name".format(i)):
             self.expect(isinstance(name, STRING_TYPE), "Transceiver {} name appears incorrect".format(i))
             self.expect(name in expected_sfp_names,
                     "Transceiver name '{}' for PORT{} NOT found in platform.json".format(name, i))
     self.assert_expectations()
Exemple #4
0
 def test_get_name(self, duthosts, enum_rand_one_per_hwsku_hostname,
                   localhost, platform_api_conn):
     for i in self.sfp_setup["sfp_test_port_indices"]:
         name = sfp.get_name(platform_api_conn, i)
         if self.expect(name is not None,
                        "Unable to retrieve transceiver {} name".format(i)):
             self.expect(isinstance(name, STRING_TYPE),
                         "Transceiver {} name appears incorrect".format(i))
             self.compare_value_with_platform_facts(
                 'name', name, i,
                 duthosts[enum_rand_one_per_hwsku_hostname])
     self.assert_expectations()