-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Bug 1784624: baremetal: Enable the baremetal platform to override the default rhcos images #2757
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,6 +50,23 @@ func TestValidatePlatform(t *testing.T) { | |
| }, | ||
| network: network, | ||
| }, | ||
| { | ||
| name: "valid_with_os_image_overrides", | ||
| platform: &baremetal.Platform{ | ||
| APIVIP: "192.168.111.2", | ||
| DNSVIP: "192.168.111.3", | ||
| IngressVIP: "192.168.111.4", | ||
| Hosts: []*baremetal.Host{}, | ||
| LibvirtURI: "qemu://system", | ||
| ClusterProvisioningIP: "172.22.0.3", | ||
| BootstrapProvisioningIP: "172.22.0.2", | ||
| ExternalBridge: "br0", | ||
| ProvisioningBridge: "br1", | ||
| BootstrapOSImage: "http://192.168.111.1/images/qemu.x86_64.qcow2.gz?sha256=3b5a882c2af3e19d515b961855d144f293cab30190c2bdedd661af31a1fc4e2f", | ||
| ClusterOSImage: "http://192.168.111.1/images/metal.x86_64.qcow2.gz?sha256=340dfa4d92450f2eee852ed1e2d02e3138cc68d824827ef9cf0a40a7ea2f93da", | ||
|
||
| }, | ||
| network: network, | ||
| }, | ||
| { | ||
| name: "invalid_apivip", | ||
| platform: &baremetal.Platform{ | ||
|
|
@@ -195,6 +212,96 @@ func TestValidatePlatform(t *testing.T) { | |
| network: network, | ||
| expected: "Invalid value: \"192.168.111.5\": the IP must not be in 192.168.111.0/24 subnet", | ||
| }, | ||
| { | ||
| name: "invalid_bootstraposimage", | ||
| platform: &baremetal.Platform{ | ||
| APIVIP: "192.168.111.2", | ||
| DNSVIP: "192.168.111.3", | ||
| IngressVIP: "192.168.111.4", | ||
| Hosts: []*baremetal.Host{}, | ||
| LibvirtURI: "qemu://system", | ||
| ClusterProvisioningIP: "172.22.0.3", | ||
| BootstrapProvisioningIP: "172.22.0.2", | ||
| ExternalBridge: "br0", | ||
| ProvisioningBridge: "br1", | ||
| BootstrapOSImage: "192.168.111.1/images/qemu.x86_64.qcow2.gz?sha256=3b5a882c2af3e19d515b961855d144f293cab30190c2bdedd661af31a1fc4e2f", | ||
| ClusterOSImage: "http://192.168.111.1/images/metal.x86_64.qcow2.gz?sha256=340dfa4d92450f2eee852ed1e2d02e3138cc68d824827ef9cf0a40a7ea2f93da", | ||
| }, | ||
| network: network, | ||
| expected: "the URI provided.*is invalid", | ||
| }, | ||
| { | ||
| name: "invalid_clusterosimage", | ||
| platform: &baremetal.Platform{ | ||
| APIVIP: "192.168.111.2", | ||
| DNSVIP: "192.168.111.3", | ||
| IngressVIP: "192.168.111.4", | ||
| Hosts: []*baremetal.Host{}, | ||
| LibvirtURI: "qemu://system", | ||
| ClusterProvisioningIP: "172.22.0.3", | ||
| BootstrapProvisioningIP: "172.22.0.2", | ||
| ExternalBridge: "br0", | ||
| ProvisioningBridge: "br1", | ||
| BootstrapOSImage: "http://192.168.111.1/images/qemu.x86_64.qcow2.gz?sha256=3b5a882c2af3e19d515b961855d144f293cab30190c2bdedd661af31a1fc4e2f", | ||
| ClusterOSImage: "http//192.168.111.1/images/metal.x86_64.qcow2.gz?sha256=340dfa4d92450f2eee852ed1e2d02e3138cc68d824827ef9cf0a40a7ea2f93da", | ||
| }, | ||
| network: network, | ||
| expected: "the URI provided.*is invalid", | ||
| }, | ||
| { | ||
| name: "invalid_bootstraposimage_checksum", | ||
| platform: &baremetal.Platform{ | ||
| APIVIP: "192.168.111.2", | ||
| DNSVIP: "192.168.111.3", | ||
| IngressVIP: "192.168.111.4", | ||
| Hosts: []*baremetal.Host{}, | ||
| LibvirtURI: "qemu://system", | ||
| ClusterProvisioningIP: "172.22.0.3", | ||
| BootstrapProvisioningIP: "172.22.0.2", | ||
| ExternalBridge: "br0", | ||
| ProvisioningBridge: "br1", | ||
| BootstrapOSImage: "http://192.168.111.1/images/qemu.x86_64.qcow2.gz?md5sum=3b5a882c2af3e19d515b961855d144f293cab30190c2bdedd661af31a1fc4e2f", | ||
| ClusterOSImage: "http://192.168.111.1/images/metal.x86_64.qcow2.gz?sha256=340dfa4d92450f2eee852ed1e2d02e3138cc68d824827ef9cf0a40a7ea2f93da", | ||
| }, | ||
| network: network, | ||
| expected: "the sha256 parameter in the.*URI is missing", | ||
| }, | ||
| { | ||
| name: "invalid_clusterosimage_checksum", | ||
| platform: &baremetal.Platform{ | ||
| APIVIP: "192.168.111.2", | ||
| DNSVIP: "192.168.111.3", | ||
| IngressVIP: "192.168.111.4", | ||
| Hosts: []*baremetal.Host{}, | ||
| LibvirtURI: "qemu://system", | ||
| ClusterProvisioningIP: "172.22.0.3", | ||
| BootstrapProvisioningIP: "172.22.0.2", | ||
| ExternalBridge: "br0", | ||
| ProvisioningBridge: "br1", | ||
| BootstrapOSImage: "http://192.168.111.1/images/qemu.x86_64.qcow2.gz?sha256=3b5a882c2af3e19d515b961855d144f293cab30190c2bdedd661af31a1fc4e2f", | ||
| ClusterOSImage: "http://192.168.111.1/images/metal.x86_64.qcow2.gz?sha256=3ee852ed1e2d02e3138cc68d824827ef9cf0a40a7ea2f93da", | ||
| }, | ||
| network: network, | ||
| expected: "the sha256 parameter in the.*URI is invalid", | ||
| }, | ||
| { | ||
| name: "invalid_bootstraposimage_uri_scheme", | ||
| platform: &baremetal.Platform{ | ||
| APIVIP: "192.168.111.2", | ||
| DNSVIP: "192.168.111.3", | ||
| IngressVIP: "192.168.111.4", | ||
| Hosts: []*baremetal.Host{}, | ||
| LibvirtURI: "qemu://system", | ||
| ClusterProvisioningIP: "172.22.0.3", | ||
| BootstrapProvisioningIP: "172.22.0.2", | ||
| ExternalBridge: "br0", | ||
| ProvisioningBridge: "br1", | ||
| BootstrapOSImage: "xttp://192.168.111.1/images/qemu.x86_64.qcow2.gz?sha256=3b5a882c2af3e19d515b961855d144f293cab30190c2bdedd661af31a1fc4e2f", | ||
| ClusterOSImage: "http://192.168.111.1/images/metal.x86_64.qcow2.gz?sha256=340dfa4d92450f2eee852ed1e2d02e3138cc68d824827ef9cf0a40a7ea2f93da", | ||
| }, | ||
| network: network, | ||
| expected: "the URI provided.*must begin with http/https", | ||
| }, | ||
kirankt marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| for _, tc := range cases { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.