Skip to content

Commit

Permalink
outofband/actions: rework transitions
Browse files Browse the repository at this point in the history
- Group stateswitch.Transition and related types into the internal Transition type
In thier original form the stateswitch.Transition types were disjoint and
were declared all over the place. This adds the internal Transition type
which groups together the Transition state, handler, docs and related
objects.

- Generate Transitions from bmclib FirmwareInstallSteps
Since BMCs have varying ordering, requirements for a firmware install process,
we let bmclib tell us how a firmware install should be performed through
the bmclib.FirmwareInstallSteps() method and order the Transitions
based on FirmwareInstallSteps()
  • Loading branch information
joelrebel committed Nov 20, 2023
1 parent b584eaa commit 81efbdf
Show file tree
Hide file tree
Showing 4 changed files with 941 additions and 362 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@ REPO := "https://github.com/metal-toolbox/flasher.git"
.DEFAULT_GOAL := help

## lint
lint:
lint: gen-mock
golangci-lint run --config .golangci.yml

## Go test
test:
test: lint
CGO_ENABLED=0 go test -timeout 1m -v -covermode=atomic ./...

## Generate mocks
gen-mock:
mockgen -source internal/model/model.go -destination internal/fixtures/mock.go -package fixtures

## build-osx
build-osx:
ifeq ($(GO_VERSION), 0)
Expand Down
200 changes: 200 additions & 0 deletions internal/fixtures/mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 81efbdf

Please sign in to comment.