Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Novarion Server Support #56

Merged
merged 9 commits into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v3
with:
args: -p bugs -p unused

- name: Set up Go 1.18
uses: actions/setup-go@v2
- name: Set up Go 1.21
uses: actions/setup-go@v4
with:
go-version: '1.18.x'
go-version: '1.21.x'

- name: Test
run: |
Expand Down
4 changes: 2 additions & 2 deletions connect/connect.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func InBand(log logger.Logger) (hal.InBand, error) {
switch b.Vendor {
case api.VendorLenovo:
return lenovo.InBand(b, log)
case api.VendorSupermicro:
case api.VendorSupermicro, api.VendorNovarion:
return supermicro.InBand(b, log)
case api.VendorVagrant:
return vagrant.InBand(b, log)
Expand All @@ -56,7 +56,7 @@ func OutBand(ip string, ipmiPort int, user, password string, log logger.Logger)
switch b.Vendor {
case api.VendorLenovo:
return lenovo.OutBand(r, b), nil
case api.VendorSupermicro:
case api.VendorSupermicro, api.VendorNovarion:
return supermicro.OutBand(r, b, ip, ipmiPort, user, password, log)
case api.VendorVagrant:
return vagrant.OutBand(b, ip, ipmiPort, user, password), nil
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/metal-stack/go-hal

go 1.18
go 1.20

require (
github.com/avast/retry-go/v4 v4.3.2
Expand Down
7 changes: 4 additions & 3 deletions internal/console/console.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,12 @@ func Open(s ssh.Session, cmd *exec.Cmd) error {
<-done

if winSizeErr != nil {
err = fmt.Errorf("exit ssh session:%s error:%w", s.Exit(1), winSizeErr)
// FIXME why calling s.Exit(1) in the error message ?
err = fmt.Errorf("exit ssh session:%s error:%w", s.Exit(1), winSizeErr) // nolint:errorlint
} else if stdinErr != nil {
err = fmt.Errorf("exit ssh session:%s error:%w", s.Exit(1), stdinErr)
err = fmt.Errorf("exit ssh session:%s error:%w", s.Exit(1), stdinErr) // nolint:errorlint
} else if stdoutErr != nil {
err = fmt.Errorf("exit ssh session:%s error:%w", s.Exit(1), stdoutErr)
err = fmt.Errorf("exit ssh session:%s error:%w", s.Exit(1), stdoutErr) // nolint:errorlint
} else {
err2 := s.Exit(0)
if err2 != nil {
Expand Down
2 changes: 1 addition & 1 deletion internal/ipmi/ipmitool.go
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ func GetBootOrderQualifiers(bootTarget hal.BootTarget, vendor api.Vendor) (uefiQ
case hal.BootTargetDisk:
uefiQualifier = persistentUEFIQualifier
switch vendor {
case api.VendorSupermicro:
case api.VendorSupermicro, api.VendorNovarion:
bootDevQualifier = supermicroHDQualifier
case api.VendorLenovo, api.VendorDell, api.VendorVagrant, api.VendorUnknown:
fallthrough
Expand Down
5 changes: 4 additions & 1 deletion pkg/api/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ const (
VendorUnknown Vendor = iota
// VendorSupermicro identifies all Supermicro servers
VendorSupermicro
// VendorNovarion identifies all Novarion servers
VendorNovarion
// VendorLenovo identifies all Lenovo servers
VendorLenovo
// VendorDell identifies all Dell servers
Expand All @@ -189,12 +191,13 @@ const (
var (
vendors = [...]string{
VendorSupermicro: "Supermicro",
VendorNovarion: "Novarion-Systems",
VendorLenovo: "Lenovo",
VendorDell: "Dell",
VendorVagrant: "Vagrant",
VendorUnknown: "UNKNOWN",
}
allVendors = [...]Vendor{VendorSupermicro, VendorLenovo, VendorDell, VendorVagrant, VendorUnknown}
allVendors = [...]Vendor{VendorSupermicro, VendorNovarion, VendorLenovo, VendorDell, VendorVagrant, VendorUnknown}
)

func (v Vendor) String() string { return vendors[v] }
Expand Down