Skip to content
Open
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
5 changes: 0 additions & 5 deletions connect/connect.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"github.com/metal-stack/go-hal"
"github.com/metal-stack/go-hal/internal/dmi"
"github.com/metal-stack/go-hal/internal/redfish"
"github.com/metal-stack/go-hal/internal/vendors/lenovo"
"github.com/metal-stack/go-hal/internal/vendors/supermicro"
"github.com/metal-stack/go-hal/pkg/api"
)
Expand All @@ -31,8 +30,6 @@ func InBand(log logger.Logger) (hal.InBand, error) {
b.Vendor = api.GuessVendor(b.VendorString)
log.Debugw("connect", "vendor", b)
switch b.Vendor {
case api.VendorLenovo:
return lenovo.InBand(b, log)
case api.VendorSupermicro, api.VendorNovarion:
return supermicro.InBand(b, log)
case api.VendorVagrant:
Expand Down Expand Up @@ -62,8 +59,6 @@ func OutBand(ip string, ipmiPort int, user, password string, log logger.Logger,
b.Vendor = api.GuessVendor(b.VendorString)
log.Debugw("connect", "board", b)
switch b.Vendor {
case api.VendorLenovo:
return lenovo.OutBand(r, b), nil
case api.VendorSupermicro, api.VendorNovarion:
return supermicro.OutBand(r, b, ip, ipmiPort, user, password, log)
case api.VendorVagrant:
Expand Down
28 changes: 0 additions & 28 deletions connect/connect_test.go

This file was deleted.

2 changes: 1 addition & 1 deletion internal/ipmi/ipmitool.go
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ func GetBootOrderQualifiers(bootTarget hal.BootTarget, vendor api.Vendor) (uefiQ
switch vendor {
case api.VendorSupermicro, api.VendorNovarion:
bootDevQualifier = supermicroHDQualifier
case api.VendorLenovo, api.VendorDell, api.VendorVagrant, api.VendorUnknown, api.VendorGigabyte:
case api.VendorDell, api.VendorVagrant, api.VendorUnknown, api.VendorGigabyte:
fallthrough
default:
bootDevQualifier = hdQualifier
Expand Down
4 changes: 0 additions & 4 deletions internal/ipmi/rawCommands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ func TestRawCommands(t *testing.T) {
require.Equal(t, []string{"raw", "6", "71", "2", "1"}, RawEnableUser(uid))
require.Equal(t, []string{"raw", "6", "71", "130", "2", "115", "101", "99", "114", "101", "116", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"}, RawSetUserPassword(uid, userPassword))

require.Equal(t, []string{"raw", "0", "8", "5", "224", "4", "0", "0", "0"}, RawSetSystemBootOptions(hal.BootTargetPXE, api.VendorLenovo))
require.Equal(t, []string{"raw", "0", "8", "5", "224", "8", "0", "0", "0"}, RawSetSystemBootOptions(hal.BootTargetDisk, api.VendorLenovo))
require.Equal(t, []string{"raw", "0", "8", "5", "160", "24", "0", "0", "0"}, RawSetSystemBootOptions(hal.BootTargetBIOS, api.VendorLenovo))

require.Equal(t, []string{"raw", "0", "8", "5", "224", "4", "0", "0", "0"}, RawSetSystemBootOptions(hal.BootTargetPXE, api.VendorSupermicro))
require.Equal(t, []string{"raw", "0", "8", "5", "224", "36", "0", "0", "0"}, RawSetSystemBootOptions(hal.BootTargetDisk, api.VendorSupermicro))
require.Equal(t, []string{"raw", "0", "8", "5", "160", "24", "0", "0", "0"}, RawSetSystemBootOptions(hal.BootTargetBIOS, api.VendorSupermicro))
Expand Down
238 changes: 0 additions & 238 deletions internal/vendors/lenovo/lenovo.go

This file was deleted.

5 changes: 1 addition & 4 deletions pkg/api/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,6 @@ const (
VendorSupermicro
// VendorNovarion identifies all Novarion servers
VendorNovarion
// VendorLenovo identifies all Lenovo servers
VendorLenovo
// VendorDell identifies all Dell servers
VendorDell
// VendorVagrant is a virtual machine.
Expand All @@ -208,13 +206,12 @@ var (
vendors = [...]string{
VendorSupermicro: "Supermicro",
VendorNovarion: "Novarion-Systems",
VendorLenovo: "Lenovo",
VendorDell: "Dell",
VendorVagrant: "Vagrant",
VendorUnknown: "UNKNOWN",
VendorGigabyte: "Giga Computing",
}
allVendors = [...]Vendor{VendorSupermicro, VendorNovarion, VendorLenovo, VendorDell, VendorVagrant, VendorUnknown, VendorGigabyte}
allVendors = [...]Vendor{VendorSupermicro, VendorNovarion, VendorDell, VendorVagrant, VendorUnknown, VendorGigabyte}
)

func (v Vendor) String() string { return vendors[v] }
Expand Down
3 changes: 0 additions & 3 deletions pkg/api/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ func TestVendor_String(t *testing.T) {
}{
{name: "smc", v: VendorSupermicro, want: "Supermicro"},
{name: "dell", v: VendorDell, want: "Dell"},
{name: "lenovo", v: VendorLenovo, want: "Lenovo"},
{name: "unknown", v: VendorUnknown, want: "UNKNOWN"},
}
for i := range tests {
Expand All @@ -33,8 +32,6 @@ func TestGuessVendor(t *testing.T) {
}{
{name: "smc", vendor: "Supermicro", want: VendorSupermicro},
{name: "smc with space", vendor: " Supermicro ", want: VendorSupermicro},
{name: "lenovo", vendor: "Lenovo", want: VendorLenovo},
{name: "lenovolower", vendor: "lenovo", want: VendorLenovo},
{name: "empty", vendor: "", want: VendorUnknown},
{name: "unknown", vendor: "unknown", want: VendorUnknown},
{name: "vagrant", vendor: "vagrant", want: VendorVagrant},
Expand Down