Skip to content

Commit c56cdd0

Browse files
Merge pull request #391 from elfosardo/support-ironic-image32
✨ Support ironic-image 32.0
2 parents ec45850 + eac0a05 commit c56cdd0

File tree

4 files changed

+23
-13
lines changed

4 files changed

+23
-13
lines changed

api/v1alpha1/ironic_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ var (
3434
// expectations.
3535
var SupportedVersions = map[Version]string{
3636
VersionLatest: "latest",
37+
Version320: "release-32.0",
3738
Version310: "release-31.0",
3839
Version300: "release-30.0",
3940
}

pkg/ironic/validation_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ func TestValidateIronic(t *testing.T) {
216216
Ironic: metal3api.IronicSpec{
217217
Version: "42.42",
218218
},
219-
ExpectedError: "version 42.42 is not supported, supported versions are 30.0, 31.0, latest",
219+
ExpectedError: "version 42.42 is not supported, supported versions are 30.0, 31.0, 32.0, latest",
220220
},
221221
{
222222
Scenario: "change existing database config",

pkg/ironic/version_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ func TestWithIronicOverrides(t *testing.T) {
6262

6363
Ironic: metal3api.Ironic{
6464
Spec: metal3api.IronicSpec{
65-
Version: "31.0",
65+
Version: "32.0",
6666
},
6767
},
6868

6969
Expected: VersionInfo{
70-
InstalledVersion: metal3api.Version310,
71-
IronicImage: "quay.io/metal3-io/ironic:release-31.0",
70+
InstalledVersion: metal3api.Version320,
71+
IronicImage: "quay.io/metal3-io/ironic:release-32.0",
7272
KeepalivedImage: "quay.io/metal3-io/keepalived:latest",
7373
RamdiskDownloaderImage: "quay.io/metal3-io/ironic-ipa-downloader:latest",
7474
MariaDBImage: "quay.io/metal3-io/mariadb:latest",
@@ -79,13 +79,13 @@ func TestWithIronicOverrides(t *testing.T) {
7979

8080
Ironic: metal3api.Ironic{
8181
Spec: metal3api.IronicSpec{
82-
Version: "30.0",
82+
Version: "31.0",
8383
},
8484
},
8585

8686
Expected: VersionInfo{
87-
InstalledVersion: metal3api.Version300,
88-
IronicImage: "quay.io/metal3-io/ironic:release-30.0",
87+
InstalledVersion: metal3api.Version310,
88+
IronicImage: "quay.io/metal3-io/ironic:release-31.0",
8989
KeepalivedImage: "quay.io/metal3-io/keepalived:latest",
9090
RamdiskDownloaderImage: "quay.io/metal3-io/ironic-ipa-downloader:latest",
9191
MariaDBImage: "quay.io/metal3-io/mariadb:latest",

test/suite_test.go

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,12 @@ import (
6161
// https://docs.openstack.org/ironic/latest/contributor/webapi-version-history.html
6262
const (
6363
// NOTE(dtantsur): latest is now at least 1.99, so we can rely on this
64-
// value to check that specifying Version: 31.0 actually installs 31.0.
64+
// value to check that specifying Version: 32.0 actually installs 32.0.
6565
apiVersionIn300 = "1.99"
6666
apiVersionIn310 = "1.99"
67+
apiVersionIn320 = "1.101"
6768
// Update this periodically to make sure we're installing the latest version by default.
68-
knownAPIMinorVersion = 99
69+
knownAPIMinorVersion = 101
6970

7071
numberOfNodes = 100
7172

@@ -916,8 +917,12 @@ var _ = Describe("Ironic object tests", func() {
916917
testUpgrade("30.0", "31.0", apiVersionIn300, apiVersionIn310, namespace)
917918
})
918919

919-
It("creates Ironic 31.0 and upgrades to latest", Label("v310-to-latest", "upgrade"), func() {
920-
testUpgrade("31.0", "latest", apiVersionIn310, "", namespace)
920+
It("creates Ironic 31.0 and upgrades to 32.0", Label("v310-to-320", "upgrade"), func() {
921+
testUpgrade("31.0", "32.0", apiVersionIn310, apiVersionIn320, namespace)
922+
})
923+
924+
It("creates Ironic 32.0 and upgrades to latest", Label("v320-to-latest", "upgrade"), func() {
925+
testUpgrade("32.0", "latest", apiVersionIn320, "", namespace)
921926
})
922927

923928
It("refuses to downgrade Ironic with a database", Label("no-db-downgrade", "upgrade"), func() {
@@ -954,8 +959,12 @@ var _ = Describe("Ironic object tests", func() {
954959
testUpgradeHA("30.0", "31.0", apiVersionIn300, apiVersionIn310, namespace)
955960
})
956961

957-
It("creates Ironic 31.0 with HA and upgrades to latest", Label("ha-v310-to-latest", "ha", "upgrade"), func() {
958-
testUpgradeHA("31.0", "latest", apiVersionIn310, "", namespace)
962+
It("creates Ironic 31.0 with HA and upgrades to 32.0", Label("ha-v310-to-320", "ha", "upgrade"), func() {
963+
testUpgradeHA("31.0", "32.0", apiVersionIn310, apiVersionIn320, namespace)
964+
})
965+
966+
It("creates Ironic 32.0 with HA and upgrades to latest", Label("ha-v320-to-latest", "ha", "upgrade"), func() {
967+
testUpgradeHA("32.0", "latest", apiVersionIn320, "", namespace)
959968
})
960969

961970
It("creates Ironic with keepalived and DHCP", Label("keepalived-dnsmasq"), func() {

0 commit comments

Comments
 (0)