Skip to content

Commit

Permalink
purge unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
joelrebel committed Aug 15, 2024
1 parent 94aba27 commit 453a8ec
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 129 deletions.
6 changes: 1 addition & 5 deletions cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,7 @@ func runWorker(ctx context.Context) {
}

func initStore(ctx context.Context, config *app.Configuration, logger *logrus.Logger) (store.Repository, error) {
switch {
// from CLI flags
case strings.HasSuffix(storeKind, ".yml"), strings.HasSuffix(storeKind, ".yaml"):
return store.NewYamlInventory(storeKind)
case storeKind == string(model.InventoryStoreServerservice):
if storeKind == string(model.InventoryStoreServerservice) {
return store.NewServerserviceStore(ctx, config.FleetDBAPIOptions, logger)
}

Expand Down
42 changes: 0 additions & 42 deletions internal/store/yaml.go

This file was deleted.

23 changes: 0 additions & 23 deletions internal/worker/outofband.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,26 +139,3 @@ func (h *OobConditionTaskHandler) HandleTask(
hLogger.Info("task for device completed")
return nil
}

// newTaskFromMsg returns a new task object with the given parameters
func newTaskFromCondition(condition *rctypes.Condition, dryRun, faultInjection bool) (*model.Task, error) {
parameters := &rctypes.FirmwareInstallTaskParameters{}
if err := json.Unmarshal(condition.Parameters, parameters); err != nil {
return nil, errors.Wrap(errInitTask, "Firmware install task parameters error: "+err.Error())
}

t, err := model.NewTask(condition.ID, parameters)
if err != nil {
return nil, err
}

if faultInjection && condition.Fault != nil {
t.Fault = condition.Fault
}

if dryRun {
t.Parameters.DryRun = true
}

return &t, nil
}
59 changes: 0 additions & 59 deletions internal/worker/worker_test.go

This file was deleted.

0 comments on commit 453a8ec

Please sign in to comment.