From fc79d0fbe5c198f1a2710f1f4fc3436b923df916 Mon Sep 17 00:00:00 2001 From: Joel Rebello Date: Tue, 28 Nov 2023 17:55:53 +0100 Subject: [PATCH] model/DeviceQueryor: define the new interface methods --- internal/model/model.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/internal/model/model.go b/internal/model/model.go index 1a58eb92..bf914b77 100644 --- a/internal/model/model.go +++ b/internal/model/model.go @@ -120,14 +120,13 @@ type DeviceQueryor interface { // Inventory returns the device inventory Inventory(ctx context.Context) (*common.Device, error) - // FirmwareInstall initiates the firmware install process returning a taskID for the install if any. - FirmwareInstall(ctx context.Context, componentSlug string, force bool, file *os.File) (taskID string, err error) - FirmwareInstallSteps(ctx context.Context, component string) ([]bconsts.FirmwareInstallStep, error) FirmwareUpload(ctx context.Context, component string, reader *os.File) (uploadVerifyTaskID string, err error) - FirmwareTaskStatus(ctx context.Context, kind bconsts.FirmwareInstallStep, component, taskID, installVersion string, tryOpen bool) (state, status string, err error) + FirmwareTaskStatus(ctx context.Context, kind bconsts.FirmwareInstallStep, component, taskID, installVersion string, tryOpen bool) (state bconsts.TaskState, status string, err error) FirmwareInstallUploaded(ctx context.Context, component, uploadVerifyTaskID string) (installTaskID string, err error) + + FirmwareInstallUploadAndInitiate(ctx context.Context, component string, file *os.File) (taskID string, err error) }