Skip to content

Commit

Permalink
Merge pull request #1624 from dtantsur/deprecate-drivers
Browse files Browse the repository at this point in the history
⚠️ Remove ibmc and idrac drivers
  • Loading branch information
metal3-io-bot authored Mar 25, 2024
2 parents 46990e7 + 671aaea commit 21f3480
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 595 deletions.
6 changes: 3 additions & 3 deletions apis/metal3.io/v1alpha1/baremetalhost_validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ func TestValidateCreate(t *testing.T) {
ObjectMeta: om,
Spec: BareMetalHostSpec{
BMC: BMCDetails{
Address: "idrac://127.0.0.1",
Address: "redfish://127.0.0.1",
CredentialsName: "test1",
},
RAID: &RAIDConfig{
Expand All @@ -329,7 +329,7 @@ func TestValidateCreate(t *testing.T) {
ObjectMeta: om,
Spec: BareMetalHostSpec{
BMC: BMCDetails{
Address: "idrac://127.0.0.1",
Address: "redfish://127.0.0.1",
CredentialsName: "test1",
},
RAID: &RAIDConfig{
Expand Down Expand Up @@ -501,7 +501,7 @@ func TestValidateCreate(t *testing.T) {
ObjectMeta: om,
Spec: BareMetalHostSpec{
BMC: BMCDetails{
Address: "idrac://127.0.0.1",
Address: "redfish://127.0.0.1",
CredentialsName: "test1",
},
Image: &Image{
Expand Down
4 changes: 1 addition & 3 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,9 @@ communicate with them.
| Generic IPMI | IPMI | iPXE | `ipmi://<host>:<port>` or just `<host>:<port>` | Port is optional, defaults to 623 |
| Generic Redfish | Redfish | iPXE | `redfish://<host>:<port>/<systemID>` | System ID is a path like `/redfish/v1/Systems/System.Embedded.1` |
| | | Virtual media | `redfish-virtualmedia://<host>:<port>/<systemID>` | Virtual media support is vendor-dependent. Should not be used for Dell. |
| Dell iDRAC | WSMAN | iPXE | `idrac://<host>:<port>` | |
| | Redfish | iPXE | `idrac-redfish://<host>:<port>/<systemID>` | See above about system ID. |
| Dell iDRAC | Redfish | iPXE | `idrac-redfish://<host>:<port>/<systemID>` | See above about system ID. |
| | Redfish | Virtual media | `idrac-virtualmedia://<host>:<port>/<systemID>` | See above about system ID. |
| Fujitsu iRMC | iRMC | iPXE | `irmc://<host>:<port>` | Port is optional, the default is 443. |
| HUAWEI ibmc | ibmc | iPXE | `ibmc://<host>:<port>` | |
| HPE iLO 4 | iLO | iPXE | `ilo4://<host>:<port>` | Port is optional, the default is 443. |
| | iLO | Virtual media | `ilo4-virtualmedia://<host>:<port>` | |
| HPE iLO 5 | iLO | iPXE | `ilo5://<host>:<port>` | |
Expand Down
7 changes: 7 additions & 0 deletions pkg/hardwareutils/bmc/access.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ import (
"strings"
)

const (
noRaid = "no-raid"
ipxe = "ipxe"
enabled = "Enabled"
disabled = "Disabled"
)

// AccessDetailsFactory describes a callable that returns a new
// AccessDetails based on the input parameters.
type AccessDetailsFactory func(parsedURL *url.URL, disableCertificateVerification bool) (AccessDetails, error)
Expand Down
285 changes: 0 additions & 285 deletions pkg/hardwareutils/bmc/access_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,46 +138,6 @@ func TestParse(t *testing.T) {
Path: "",
},

{
Scenario: "idrac url",
Address: "idrac://192.168.122.1",
Type: "idrac",
Port: "",
Host: "192.168.122.1",
Hostname: "192.168.122.1",
Path: "",
},

{
Scenario: "idrac url with path",
Address: "idrac://192.168.122.1:6233/foo",
Type: "idrac",
Port: "6233",
Host: "192.168.122.1",
Hostname: "192.168.122.1:6233",
Path: "/foo",
},

{
Scenario: "idrac url ipv6",
Address: "idrac://[fe80::fc33:62ff:fe83:8a76]",
Type: "idrac",
Port: "",
Host: "fe80::fc33:62ff:fe83:8a76",
Hostname: "[fe80::fc33:62ff:fe83:8a76]",
Path: "",
},

{
Scenario: "idrac url, no sep",
Address: "idrac:192.168.122.1",
Type: "idrac",
Port: "",
Host: "192.168.122.1",
Hostname: "192.168.122.1",
Path: "",
},

{
Scenario: "irmc url",
Address: "irmc://192.168.122.1",
Expand Down Expand Up @@ -258,87 +218,6 @@ func TestParse(t *testing.T) {
Path: "",
},

// ibmc
{
Scenario: "ibmc url",
Address: "ibmc://192.168.122.1",
Type: "ibmc",
Port: "",
Host: "192.168.122.1",
Hostname: "192.168.122.1",
Path: "",
},

{
Scenario: "ibmc url path",
Address: "ibmc://192.168.122.1:6233/foo",
Type: "ibmc",
Port: "6233",
Host: "192.168.122.1",
Hostname: "192.168.122.1:6233",
Path: "/foo",
},

{
Scenario: "ibmc url with http scheme",
Address: "ibmc+http://192.168.122.1",
Type: "ibmc+http",
Port: "",
Host: "192.168.122.1",
Hostname: "192.168.122.1",
Path: "",
},

{
Scenario: "ibmc url with http scheme",
Address: "ibmc+https://192.168.122.1",
Type: "ibmc+https",
Port: "",
Host: "192.168.122.1",
Hostname: "192.168.122.1",
Path: "",
},

{
Scenario: "ibmc url path",
Address: "ibmc://192.168.122.1:6233/foo",
Type: "ibmc",
Port: "6233",
Host: "192.168.122.1",
Hostname: "192.168.122.1:6233",
Path: "/foo",
},

{
Scenario: "ibmc url ipv6",
Address: "ibmc://[fe80::fc33:62ff:fe83:8a76]",
Type: "ibmc",
Port: "",
Host: "fe80::fc33:62ff:fe83:8a76",
Hostname: "[fe80::fc33:62ff:fe83:8a76]",
Path: "",
},

{
Scenario: "ibmc url path ipv6",
Address: "ibmc://[fe80::fc33:62ff:fe83:8a76]:6233/foo",
Type: "ibmc",
Port: "6233",
Host: "fe80::fc33:62ff:fe83:8a76",
Hostname: "[fe80::fc33:62ff:fe83:8a76]:6233",
Path: "/foo",
},

{
Scenario: "ibmc url no sep",
Address: "ibmc:192.168.122.1",
Type: "ibmc",
Port: "",
Host: "192.168.122.1",
Hostname: "192.168.122.1",
Path: "",
},

{
Scenario: "ilo4 url",
Address: "ilo4://192.168.122.1",
Expand Down Expand Up @@ -493,18 +372,6 @@ func TestStaticDriverInfo(t *testing.T) {
power: "",
},

{
Scenario: "idrac",
input: "idrac://192.168.122.1",
needsMac: false,
driver: "idrac",
bios: "",
boot: "ipxe",
firmware: "",
management: "",
power: "",
},

{
Scenario: "irmc",
input: "irmc://192.168.122.1",
Expand Down Expand Up @@ -647,18 +514,6 @@ func TestStaticDriverInfo(t *testing.T) {
vendor: "idrac-redfish",
},

{
Scenario: "ibmc",
input: "ibmc://192.168.122.1:6233",
needsMac: true,
driver: "ibmc",
bios: "",
boot: "ipxe",
firmware: "",
management: "ibmc",
power: "ibmc",
},

{
Scenario: "ilo4",
input: "ilo4://192.168.122.1",
Expand Down Expand Up @@ -758,79 +613,6 @@ func TestDriverInfo(t *testing.T) {
},
},

{
Scenario: "idrac",
input: "idrac://192.168.122.1",
expects: map[string]interface{}{
"drac_address": "192.168.122.1",
"drac_password": "",
"drac_username": "",
"drac_verify_ca": false,
},
},

{
Scenario: "idrac http",
input: "idrac+http://192.168.122.1",
expects: map[string]interface{}{
"drac_address": "192.168.122.1",
"drac_protocol": "http",
"drac_password": "",
"drac_username": "",
"drac_verify_ca": false,
},
},

{
Scenario: "idrac https",
input: "idrac+https://192.168.122.1",
expects: map[string]interface{}{
"drac_address": "192.168.122.1",
"drac_protocol": "https",
"drac_password": "",
"drac_username": "",
"drac_verify_ca": false,
},
},

{
Scenario: "idrac port and path http",
input: "idrac://192.168.122.1:8080/foo",
expects: map[string]interface{}{
"drac_address": "192.168.122.1",
"drac_port": "8080",
"drac_path": "/foo",
"drac_password": "",
"drac_username": "",
"drac_verify_ca": false,
},
},

{
Scenario: "idrac ipv6",
input: "idrac://[fe80::fc33:62ff:fe83:8a76]/foo",
expects: map[string]interface{}{
"drac_address": "fe80::fc33:62ff:fe83:8a76",
"drac_path": "/foo",
"drac_password": "",
"drac_username": "",
"drac_verify_ca": false,
},
},

{
Scenario: "idrac ipv6 port and path",
input: "idrac://[fe80::fc33:62ff:fe83:8a76]:8080/foo",
expects: map[string]interface{}{
"drac_address": "fe80::fc33:62ff:fe83:8a76",
"drac_port": "8080",
"drac_path": "/foo",
"drac_password": "",
"drac_username": "",
"drac_verify_ca": false,
},
},

{
Scenario: "irmc",
input: "irmc://192.168.122.1",
Expand Down Expand Up @@ -1009,73 +791,6 @@ func TestDriverInfo(t *testing.T) {
},
},

// ibmc driver testcases
{
Scenario: "ibmc",
input: "ibmc://192.168.122.1/foo/bar",
expects: map[string]interface{}{
"ibmc_address": "https://192.168.122.1/foo/bar",
"ibmc_password": "",
"ibmc_username": "",
"ibmc_verify_ca": false,
},
},

{
Scenario: "ibmc http",
input: "ibmc+http://192.168.122.1/foo/bar",
expects: map[string]interface{}{
"ibmc_address": "http://192.168.122.1/foo/bar",
"ibmc_password": "",
"ibmc_username": "",
"ibmc_verify_ca": false,
},
},

{
Scenario: "ibmc https",
input: "ibmc+https://192.168.122.1/foo/bar",
expects: map[string]interface{}{
"ibmc_address": "https://192.168.122.1/foo/bar",
"ibmc_password": "",
"ibmc_username": "",
"ibmc_verify_ca": false,
},
},

{
Scenario: "ibmc port",
input: "ibmc://192.168.122.1:8080/foo/bar",
expects: map[string]interface{}{
"ibmc_address": "https://192.168.122.1:8080/foo/bar",
"ibmc_password": "",
"ibmc_username": "",
"ibmc_verify_ca": false,
},
},

{
Scenario: "ibmc ipv6",
input: "ibmc://[fe80::fc33:62ff:fe83:8a76]/foo/bar",
expects: map[string]interface{}{
"ibmc_address": "https://[fe80::fc33:62ff:fe83:8a76]/foo/bar",
"ibmc_password": "",
"ibmc_username": "",
"ibmc_verify_ca": false,
},
},

{
Scenario: "ibmc ipv6 port",
input: "ibmc://[fe80::fc33:62ff:fe83:8a76]:8080/foo",
expects: map[string]interface{}{
"ibmc_address": "https://[fe80::fc33:62ff:fe83:8a76]:8080/foo",
"ibmc_password": "",
"ibmc_username": "",
"ibmc_verify_ca": false,
},
},

{
Scenario: "ilo4",
input: "ilo4://192.168.122.1",
Expand Down
Loading

0 comments on commit 21f3480

Please sign in to comment.