def test_get_available_firmware_version(self, duthost, localhost, platform_api_conn): if self.num_components == 0: pytest.skip("No components found on device") for i in range(self.num_components): for image in range(image_list): avail_fw_version = component.get_available_firmware_version(platform_api_conn, i, image) if self.expect(avail_fw_version is not None, "Component {}: Failed to retrieve available firmware version from image {}".format(i, image)): self.expect(isinstance(avail_fw_version, STRING_TYPE), "Component {}: Available Firmware version appears to be incorrect from image {}".format(i, image)) self.assert_expectations()
def test_get_available_firmware_version(self, duthosts, enum_rand_one_per_hwsku_hostname, localhost, platform_api_conn): duthost = duthosts[enum_rand_one_per_hwsku_hostname] skip_release_for_platform(duthost, ["202012", "201911", "201811"], ["nokia"]) for i in range(self.num_components): for image in image_list: avail_fw_version = component.get_available_firmware_version(platform_api_conn, i, image) if self.expect(avail_fw_version is not None, "Component {}: Failed to retrieve available firmware version from image {}".format(i, image)): self.expect(isinstance(avail_fw_version, STRING_TYPE), "Component {}: Available Firmware version appears to be incorrect from image {}".format(i, image)) self.assert_expectations()