Пример #1
0
    def test_update_firmware(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):
                update_status = component.update_firmware(platform_api_conn, i, image)
                if self.expect(update_status is not None, "Component {}: Failed to update firmware from image {}".format(i, image)):
                    self.expect(isinstance(update_status, bool), "Component {}: Return of Firmware update appears to be incorrect from image {}".format(i, image))
        self.assert_expectations()
Пример #2
0
    def test_update_firmware(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:
                update_status = component.update_firmware(platform_api_conn, i, image)
                if self.expect(update_status is not None, "Component {}: Failed to update firmware from image {}".format(i, image)):
                    self.expect(isinstance(update_status, bool), "Component {}: Return of Firmware update appears to be incorrect from image {}".format(i, image))
        self.assert_expectations()