From e32b1fda9dcc8697c9425478dfcbf9fb7975dc86 Mon Sep 17 00:00:00 2001 From: Felix Matouschek Date: Mon, 29 Jan 2024 16:06:21 +0100 Subject: [PATCH] chore: Drop rhcos and rhcosprerelease containerdisks Drop the rhcos and rhcosprerelease containerdisks, since they are not used anymore. Signed-off-by: Felix Matouschek --- artifacts/rhcos/rhcos.go | 100 --------------- artifacts/rhcos/rhcos_test.go | 80 ------------ artifacts/rhcos/testdata/rhcos-4.8.checksum | 31 ----- artifacts/rhcos/testdata/rhcos-4.9.checksum | 33 ----- artifacts/rhcosprerelease/rhcos.go | 114 ------------------ artifacts/rhcosprerelease/rhcos_test.go | 80 ------------ .../rhcos-latest-4.9-prerelease.checksum | 33 ----- .../testdata/rhcos-latest-prerelease.checksum | 37 ------ cmd/medius/common/registry.go | 84 ------------- 9 files changed, 592 deletions(-) delete mode 100644 artifacts/rhcos/rhcos.go delete mode 100644 artifacts/rhcos/rhcos_test.go delete mode 100644 artifacts/rhcos/testdata/rhcos-4.8.checksum delete mode 100644 artifacts/rhcos/testdata/rhcos-4.9.checksum delete mode 100644 artifacts/rhcosprerelease/rhcos.go delete mode 100644 artifacts/rhcosprerelease/rhcos_test.go delete mode 100644 artifacts/rhcosprerelease/testdata/rhcos-latest-4.9-prerelease.checksum delete mode 100644 artifacts/rhcosprerelease/testdata/rhcos-latest-prerelease.checksum diff --git a/artifacts/rhcos/rhcos.go b/artifacts/rhcos/rhcos.go deleted file mode 100644 index 206fb141..00000000 --- a/artifacts/rhcos/rhcos.go +++ /dev/null @@ -1,100 +0,0 @@ -package rhcos - -import ( - "bytes" - "fmt" - - "github.com/containers/image/v5/pkg/compression/types" - v1 "kubevirt.io/api/core/v1" - - "kubevirt.io/containerdisks/pkg/api" - "kubevirt.io/containerdisks/pkg/docs" - "kubevirt.io/containerdisks/pkg/hashsum" - "kubevirt.io/containerdisks/pkg/http" - "kubevirt.io/containerdisks/pkg/tests" -) - -type rhcos struct { - Version string - Variant string - getter http.Getter - Arch string - Compression string - AppendLatest bool - AdditionalLabels map[string]string -} - -//nolint:lll -const description = `RHCOS images for KubeVirt. -
-
-Visit [https://docs.openshift.com/container-platform/latest/architecture/architecture-rhcos.html) to learn more about Red Hat Enterprise Linux CoreOS.` - -func (r *rhcos) Metadata() *api.Metadata { - return &api.Metadata{ - Name: "rhcos", - Version: r.Version, - Description: description, - ExampleUserData: docs.UserData{ - Username: "core", - }, - AdditionalLabels: r.AdditionalLabels, - } -} - -func (r *rhcos) Inspect() (*api.ArtifactDetails, error) { - baseURL := fmt.Sprintf("https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/%s/", r.Version) - if r.AppendLatest { - baseURL += "latest/" - } - checksumURL := baseURL + "sha256sum.txt" - raw, err := r.getter.GetAll(checksumURL) - if err != nil { - return nil, fmt.Errorf("error downloading the rhcos sha256sum.txt file: %v", err) - } - checksums, err := hashsum.Parse(bytes.NewReader(raw), hashsum.ChecksumFormatGNU) - if err != nil { - return nil, fmt.Errorf("error reading the sha256sum.txt file: %v", err) - } - if checksum, exists := checksums[r.Variant]; exists { - return &api.ArtifactDetails{ - SHA256Sum: checksum, - DownloadURL: baseURL + r.Variant, - Compression: r.Compression, - AdditionalUniqueTags: []string{checksum}, - }, nil - } - return nil, fmt.Errorf("file %q does not exist in the sha256sum file: %v", r.Variant, err) -} - -func (r *rhcos) VM(name, imgRef, userData string) *v1.VirtualMachine { - return docs.NewVM( - name, - imgRef, - docs.WithRng(), - docs.WithCloudInitConfigDrive(userData), - ) -} - -func (r *rhcos) UserData(data *docs.UserData) string { - return docs.Ignition(data) -} - -func (r *rhcos) Tests() []api.ArtifactTest { - return []api.ArtifactTest{ - tests.GuestOsInfo, - tests.SSH, - } -} - -func New(release string, appendLatest bool, additionalLabels map[string]string) *rhcos { - return &rhcos{ - Version: release, - Arch: "x86_64", - Variant: "rhcos-openstack.x86_64.qcow2.gz", - getter: &http.HTTPGetter{}, - Compression: types.GzipAlgorithmName, - AppendLatest: appendLatest, - AdditionalLabels: additionalLabels, - } -} diff --git a/artifacts/rhcos/rhcos_test.go b/artifacts/rhcos/rhcos_test.go deleted file mode 100644 index 08f087ce..00000000 --- a/artifacts/rhcos/rhcos_test.go +++ /dev/null @@ -1,80 +0,0 @@ -package rhcos - -import ( - "testing" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - - "kubevirt.io/api/instancetype" - - "kubevirt.io/containerdisks/pkg/api" - "kubevirt.io/containerdisks/pkg/docs" - "kubevirt.io/containerdisks/testutil" -) - -var _ = Describe("Rhcos", func() { - DescribeTable("Inspect should be able to parse checksum files", - func(release, mockFile string, details *api.ArtifactDetails, additionalLabels map[string]string, metadata *api.Metadata) { - c := New(release, true, additionalLabels) - c.getter = testutil.NewMockGetter(mockFile) - got, err := c.Inspect() - Expect(err).NotTo(HaveOccurred()) - Expect(got).To(Equal(details)) - Expect(c.Metadata()).To(Equal(metadata)) - }, - Entry("rhcos:4.9", "4.9", "testdata/rhcos-4.9.checksum", - &api.ArtifactDetails{ - SHA256Sum: "3466690807fb710102559ea57daac0484c59ed4d914996882d601b8bb7a7ada8", - DownloadURL: "https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.9/latest/rhcos-openstack.x86_64.qcow2.gz", - Compression: "gzip", - AdditionalUniqueTags: []string{"3466690807fb710102559ea57daac0484c59ed4d914996882d601b8bb7a7ada8"}, - }, - map[string]string{ - instancetype.DefaultInstancetypeLabel: "u1.small", - instancetype.DefaultPreferenceLabel: "rhel.8", - }, - &api.Metadata{ - Name: "rhcos", - Version: "4.9", - Description: description, - ExampleUserData: docs.UserData{ - Username: "core", - }, - AdditionalLabels: map[string]string{ - instancetype.DefaultInstancetypeLabel: "u1.small", - instancetype.DefaultPreferenceLabel: "rhel.8", - }, - }, - ), - Entry("rhcos:4.8", "4.8", "testdata/rhcos-4.8.checksum", - &api.ArtifactDetails{ - SHA256Sum: "99da4ed945b391d452e55a3a7809c799e4c74f69acbee1ecaec78f368c4e369e", - DownloadURL: "https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.8/latest/rhcos-openstack.x86_64.qcow2.gz", - Compression: "gzip", - AdditionalUniqueTags: []string{"99da4ed945b391d452e55a3a7809c799e4c74f69acbee1ecaec78f368c4e369e"}, - }, - map[string]string{ - instancetype.DefaultInstancetypeLabel: "u1.small", - instancetype.DefaultPreferenceLabel: "rhel.8", - }, - &api.Metadata{ - Name: "rhcos", - Version: "4.8", - Description: description, - ExampleUserData: docs.UserData{ - Username: "core", - }, - AdditionalLabels: map[string]string{ - instancetype.DefaultInstancetypeLabel: "u1.small", - instancetype.DefaultPreferenceLabel: "rhel.8", - }, - }, - ), - ) -}) - -func TestRhcos(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Rhcos Suite") -} diff --git a/artifacts/rhcos/testdata/rhcos-4.8.checksum b/artifacts/rhcos/testdata/rhcos-4.8.checksum deleted file mode 100644 index 712f9640..00000000 --- a/artifacts/rhcos/testdata/rhcos-4.8.checksum +++ /dev/null @@ -1,31 +0,0 @@ -c081a65325330379e91707475b8dadf82e0f2d5c1c9f7f056fcd978641bb5114 rhcos-4.8.14-x86_64-aws.x86_64.vmdk.gz -801498fe0ccb754b898bef30e4d226f796874e615d7719b00d64b8054d434481 rhcos-4.8.14-x86_64-azure.x86_64.vhd.gz -5231bdd554841c01fbd1092ea96c39b06dda3187549c0672a5f5c5e4d7eecdad rhcos-4.8.14-x86_64-gcp.x86_64.tar.gz -440ce3c4367a10fa66436638cef6ed938848050fd7f0de2d78d1294a4f56995d rhcos-4.8.14-x86_64-ibmcloud.x86_64.qcow2.gz -5b6f1b728a5e656ef128a54f9534f7d3d63953ef46e726a808aacf1ce9ad2742 rhcos-4.8.14-x86_64-live-initramfs.x86_64.img -d13269e6c60119397210418781b7057673c4018692d28a868e248a0b550ea247 rhcos-4.8.14-x86_64-live-kernel-x86_64 -bd005071f295762a613ff42c26ce453be7c19d35594b68c94fab6797b4d834d4 rhcos-4.8.14-x86_64-live-rootfs.x86_64.img -dc0c7af647137c9b16210c977896dc756b72b5e568774daf199964ca020935ae rhcos-4.8.14-x86_64-live.x86_64.iso -9cf43a94eded275b2fb54bbb164ce63b18d7e696ca6c15f8cea4bb09941a0e57 rhcos-4.8.14-x86_64-metal4k.x86_64.raw.gz -6e67556bebee87b6d85d776a8b728ef727fb2e55c77a183f7979e8b89211b4db rhcos-4.8.14-x86_64-metal.x86_64.raw.gz -99da4ed945b391d452e55a3a7809c799e4c74f69acbee1ecaec78f368c4e369e rhcos-4.8.14-x86_64-openstack.x86_64.qcow2.gz -4e1c0dc1bcebcedf861256474db12822830e004e823e8a7968c6bed59002e924 rhcos-4.8.14-x86_64-ostree.x86_64.tar -0105a1de918e94e9c456f32dac63e3cf296efa0b59f543fc23c1ef00ebb15a5f rhcos-4.8.14-x86_64-qemu.x86_64.qcow2.gz -28eabddd539b3e0bd3d39c08a63f96cfd674817e25e4a84b67f9ca29baafd88a rhcos-4.8.14-x86_64-vmware.x86_64.ova -c081a65325330379e91707475b8dadf82e0f2d5c1c9f7f056fcd978641bb5114 rhcos-aws.x86_64.vmdk.gz -801498fe0ccb754b898bef30e4d226f796874e615d7719b00d64b8054d434481 rhcos-azure.x86_64.vhd.gz -5231bdd554841c01fbd1092ea96c39b06dda3187549c0672a5f5c5e4d7eecdad rhcos-gcp.x86_64.tar.gz -440ce3c4367a10fa66436638cef6ed938848050fd7f0de2d78d1294a4f56995d rhcos-ibmcloud.x86_64.qcow2.gz -5b6f1b728a5e656ef128a54f9534f7d3d63953ef46e726a808aacf1ce9ad2742 rhcos-installer-initramfs.x86_64.img -d13269e6c60119397210418781b7057673c4018692d28a868e248a0b550ea247 rhcos-installer-kernel-x86_64 -bd005071f295762a613ff42c26ce453be7c19d35594b68c94fab6797b4d834d4 rhcos-installer-rootfs.x86_64.img -5b6f1b728a5e656ef128a54f9534f7d3d63953ef46e726a808aacf1ce9ad2742 rhcos-live-initramfs.x86_64.img -d13269e6c60119397210418781b7057673c4018692d28a868e248a0b550ea247 rhcos-live-kernel-x86_64 -bd005071f295762a613ff42c26ce453be7c19d35594b68c94fab6797b4d834d4 rhcos-live-rootfs.x86_64.img -dc0c7af647137c9b16210c977896dc756b72b5e568774daf199964ca020935ae rhcos-live.x86_64.iso -9cf43a94eded275b2fb54bbb164ce63b18d7e696ca6c15f8cea4bb09941a0e57 rhcos-metal4k.x86_64.raw.gz -6e67556bebee87b6d85d776a8b728ef727fb2e55c77a183f7979e8b89211b4db rhcos-metal.x86_64.raw.gz -99da4ed945b391d452e55a3a7809c799e4c74f69acbee1ecaec78f368c4e369e rhcos-openstack.x86_64.qcow2.gz -4e1c0dc1bcebcedf861256474db12822830e004e823e8a7968c6bed59002e924 rhcos-ostree.x86_64.tar -0105a1de918e94e9c456f32dac63e3cf296efa0b59f543fc23c1ef00ebb15a5f rhcos-qemu.x86_64.qcow2.gz -28eabddd539b3e0bd3d39c08a63f96cfd674817e25e4a84b67f9ca29baafd88a rhcos-vmware.x86_64.ova \ No newline at end of file diff --git a/artifacts/rhcos/testdata/rhcos-4.9.checksum b/artifacts/rhcos/testdata/rhcos-4.9.checksum deleted file mode 100644 index 86455b71..00000000 --- a/artifacts/rhcos/testdata/rhcos-4.9.checksum +++ /dev/null @@ -1,33 +0,0 @@ -006896e8a02f6d5f0950cb97f5be904c0d052570254616e3ca05d3e4a76b2710 rhcos-4.9.0-x86_64-aws.x86_64.vmdk.gz -68e219825af597580aaf60930c08966d3304182e259b4744ada54d1409865fd3 rhcos-4.9.0-x86_64-azurestack.x86_64.vhd.gz -1c0de512132c239614ef9a8b9be6c8b5692ed405990dd64daa1f4f391bbb7382 rhcos-4.9.0-x86_64-azure.x86_64.vhd.gz -031cbf6a3c00e89383a42266d00e48501aebaa4b9aaf2a1f80e44e90d1b66a82 rhcos-4.9.0-x86_64-gcp.x86_64.tar.gz -c5c6be77aac71d93522a5099464f0cb8084db304dec5693933e8b970a7885185 rhcos-4.9.0-x86_64-ibmcloud.x86_64.qcow2.gz -54a07a62f336f760c61641a0ec54f70eefc6cc262399ef9bdd38376c88d8c9bd rhcos-4.9.0-x86_64-live-initramfs.x86_64.img -d13269e6c60119397210418781b7057673c4018692d28a868e248a0b550ea247 rhcos-4.9.0-x86_64-live-kernel-x86_64 -3b5ba1e98d9852907aaffe4acda9af7b293bdb88008f310631a8a5b4333ea378 rhcos-4.9.0-x86_64-live-rootfs.x86_64.img -0e92c3ad698ef68057011f7cc5b9fd07356b8711a55f735aaae22c91b996c96e rhcos-4.9.0-x86_64-live.x86_64.iso -9b4548b8b87322dd4d659922cddd287060d6b4ac53992d121ac32442a471f793 rhcos-4.9.0-x86_64-metal4k.x86_64.raw.gz -ef9a304cba0c0050486965e38b3c6c614c0646af0b0de493c99eb6a14703cb5a rhcos-4.9.0-x86_64-metal.x86_64.raw.gz -3466690807fb710102559ea57daac0484c59ed4d914996882d601b8bb7a7ada8 rhcos-4.9.0-x86_64-openstack.x86_64.qcow2.gz -6708a9fbf379a2e53a9b61ae18fad2fb472bd746d4a04638dbb412195de10a24 rhcos-4.9.0-x86_64-ostree.x86_64.tar -cae8928e0cd35b88fcec7c07b1072155bde17d7dd44985f8b0d9e3862c556602 rhcos-4.9.0-x86_64-qemu.x86_64.qcow2.gz -6c8bfdee5930f12368b9f46a11aea736a068208262f7747f3bac54eb581531f5 rhcos-4.9.0-x86_64-vmware.x86_64.ova -006896e8a02f6d5f0950cb97f5be904c0d052570254616e3ca05d3e4a76b2710 rhcos-aws.x86_64.vmdk.gz -68e219825af597580aaf60930c08966d3304182e259b4744ada54d1409865fd3 rhcos-azurestack.x86_64.vhd.gz -1c0de512132c239614ef9a8b9be6c8b5692ed405990dd64daa1f4f391bbb7382 rhcos-azure.x86_64.vhd.gz -031cbf6a3c00e89383a42266d00e48501aebaa4b9aaf2a1f80e44e90d1b66a82 rhcos-gcp.x86_64.tar.gz -c5c6be77aac71d93522a5099464f0cb8084db304dec5693933e8b970a7885185 rhcos-ibmcloud.x86_64.qcow2.gz -54a07a62f336f760c61641a0ec54f70eefc6cc262399ef9bdd38376c88d8c9bd rhcos-installer-initramfs.x86_64.img -d13269e6c60119397210418781b7057673c4018692d28a868e248a0b550ea247 rhcos-installer-kernel-x86_64 -3b5ba1e98d9852907aaffe4acda9af7b293bdb88008f310631a8a5b4333ea378 rhcos-installer-rootfs.x86_64.img -54a07a62f336f760c61641a0ec54f70eefc6cc262399ef9bdd38376c88d8c9bd rhcos-live-initramfs.x86_64.img -d13269e6c60119397210418781b7057673c4018692d28a868e248a0b550ea247 rhcos-live-kernel-x86_64 -3b5ba1e98d9852907aaffe4acda9af7b293bdb88008f310631a8a5b4333ea378 rhcos-live-rootfs.x86_64.img -0e92c3ad698ef68057011f7cc5b9fd07356b8711a55f735aaae22c91b996c96e rhcos-live.x86_64.iso -9b4548b8b87322dd4d659922cddd287060d6b4ac53992d121ac32442a471f793 rhcos-metal4k.x86_64.raw.gz -ef9a304cba0c0050486965e38b3c6c614c0646af0b0de493c99eb6a14703cb5a rhcos-metal.x86_64.raw.gz -3466690807fb710102559ea57daac0484c59ed4d914996882d601b8bb7a7ada8 rhcos-openstack.x86_64.qcow2.gz -6708a9fbf379a2e53a9b61ae18fad2fb472bd746d4a04638dbb412195de10a24 rhcos-ostree.x86_64.tar -cae8928e0cd35b88fcec7c07b1072155bde17d7dd44985f8b0d9e3862c556602 rhcos-qemu.x86_64.qcow2.gz -6c8bfdee5930f12368b9f46a11aea736a068208262f7747f3bac54eb581531f5 rhcos-vmware.x86_64.ova \ No newline at end of file diff --git a/artifacts/rhcosprerelease/rhcos.go b/artifacts/rhcosprerelease/rhcos.go deleted file mode 100644 index 3b15c1b3..00000000 --- a/artifacts/rhcosprerelease/rhcos.go +++ /dev/null @@ -1,114 +0,0 @@ -package rhcosprerelease - -import ( - "bytes" - "fmt" - "strings" - - "github.com/containers/image/v5/pkg/compression/types" - v1 "kubevirt.io/api/core/v1" - - "kubevirt.io/containerdisks/pkg/api" - "kubevirt.io/containerdisks/pkg/docs" - "kubevirt.io/containerdisks/pkg/hashsum" - "kubevirt.io/containerdisks/pkg/http" - "kubevirt.io/containerdisks/pkg/tests" -) - -type rhcos struct { - Version string - Variant string - getter http.Getter - Arch string - Compression string - AdditionalLabels map[string]string -} - -//nolint:lll -const description = `RHCOS prerelease images for KubeVirt. -
-
-Visit [https://docs.openshift.com/container-platform/latest/architecture/architecture-rhcos.html) to learn more about Red Hat Enterprise Linux CoreOS.` - -func (r *rhcos) Metadata() *api.Metadata { - return &api.Metadata{ - Name: "rhcos", - Version: strings.TrimPrefix(r.Version, "latest-") + "-pre-release", - Description: description, - ExampleUserData: docs.UserData{ - Username: "core", - }, - AdditionalLabels: r.AdditionalLabels, - } -} - -func (r *rhcos) Inspect() (*api.ArtifactDetails, error) { - baseURL := fmt.Sprintf("https://mirror.openshift.com/pub/openshift-v4/x86_64/dependencies/rhcos/pre-release/%s/", r.Version) - checksumURL := baseURL + "sha256sum.txt" - raw, err := r.getter.GetAll(checksumURL) - if err != nil { - return nil, fmt.Errorf("error downloading the rhcos sha256sum.txt file: %v", err) - } - checksums, err := hashsum.Parse(bytes.NewReader(raw), hashsum.ChecksumFormatGNU) - if err != nil { - return nil, fmt.Errorf("error reading the sha256sum.txt file: %v", err) - } - - var artifact *api.ArtifactDetails - if checksum, exists := checksums[r.Variant]; exists { - artifact = &api.ArtifactDetails{ - SHA256Sum: checksum, - DownloadURL: baseURL + r.Variant, - Compression: r.Compression, - } - } else { - return nil, fmt.Errorf("file %q does not exist in the sha256sum file: %v", r.Variant, err) - } - - for variant, checksum := range checksums { - if variant == r.Variant { - continue - } - - if checksum == artifact.SHA256Sum { - additionalTag := strings.TrimSuffix(strings.TrimPrefix(variant, "rhcos-"), "-x86_64-openstack.x86_64.qcow2.gz") - if !strings.Contains(additionalTag, "rc.") { - continue - } - artifact.AdditionalUniqueTags = append(artifact.AdditionalUniqueTags, additionalTag) - } - } - artifact.AdditionalUniqueTags = append(artifact.AdditionalUniqueTags, artifact.SHA256Sum) - return artifact, nil -} - -func (r *rhcos) VM(name, imgRef, userData string) *v1.VirtualMachine { - return docs.NewVM( - name, - imgRef, - docs.WithRng(), - docs.WithCloudInitConfigDrive(userData), - ) -} - -func (r *rhcos) UserData(data *docs.UserData) string { - return docs.Ignition(data) -} - -func (r *rhcos) Tests() []api.ArtifactTest { - return []api.ArtifactTest{ - tests.GuestOsInfo, - tests.SSH, - } -} - -func New(release string, additionalLabels map[string]string) *rhcos { - return &rhcos{ - Version: release, - Arch: "x86_64", - Variant: "rhcos-openstack.x86_64.qcow2.gz", - getter: &http.HTTPGetter{}, - Compression: types.GzipAlgorithmName, - AdditionalLabels: additionalLabels, - } -} diff --git a/artifacts/rhcosprerelease/rhcos_test.go b/artifacts/rhcosprerelease/rhcos_test.go deleted file mode 100644 index 511459d6..00000000 --- a/artifacts/rhcosprerelease/rhcos_test.go +++ /dev/null @@ -1,80 +0,0 @@ -package rhcosprerelease - -import ( - "testing" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - - "kubevirt.io/api/instancetype" - - "kubevirt.io/containerdisks/pkg/api" - "kubevirt.io/containerdisks/pkg/docs" - "kubevirt.io/containerdisks/testutil" -) - -var _ = Describe("RhcosPrerelease", func() { - DescribeTable("Inspect should be able to parse checksum files", - func(release, mockFile string, details *api.ArtifactDetails, additionalLabels map[string]string, metadata *api.Metadata) { - c := New(release, additionalLabels) - c.getter = testutil.NewMockGetter(mockFile) - got, err := c.Inspect() - Expect(err).NotTo(HaveOccurred()) - Expect(got).To(Equal(details)) - Expect(c.Metadata()).To(Equal(metadata)) - }, - Entry("rhcos:4.9", "latest-4.9", "testdata/rhcos-latest-4.9-prerelease.checksum", - &api.ArtifactDetails{ - SHA256Sum: "3466690807fb710102559ea57daac0484c59ed4d914996882d601b8bb7a7ada8", - DownloadURL: "https://mirror.openshift.com/pub/openshift-v4/x86_64/dependencies/rhcos/pre-release/latest-4.9/rhcos-openstack.x86_64.qcow2.gz", //nolint:lll - Compression: "gzip", - AdditionalUniqueTags: []string{"4.9.0-rc.7", "3466690807fb710102559ea57daac0484c59ed4d914996882d601b8bb7a7ada8"}, - }, - map[string]string{ - instancetype.DefaultInstancetypeLabel: "u1.small", - instancetype.DefaultPreferenceLabel: "rhel.8", - }, - &api.Metadata{ - Name: "rhcos", - Version: "4.9-pre-release", - Description: description, - ExampleUserData: docs.UserData{ - Username: "core", - }, - AdditionalLabels: map[string]string{ - instancetype.DefaultInstancetypeLabel: "u1.small", - instancetype.DefaultPreferenceLabel: "rhel.8", - }, - }, - ), - Entry("rhcos:latest", "latest", "testdata/rhcos-latest-prerelease.checksum", - &api.ArtifactDetails{ - SHA256Sum: "f581896eee37216021bfce9ddd5e1fd8289c366ca0d1db25221c77688de85fd7", - DownloadURL: "https://mirror.openshift.com/pub/openshift-v4/x86_64/dependencies/rhcos/pre-release/latest/rhcos-openstack.x86_64.qcow2.gz", //nolint:lll - Compression: "gzip", - AdditionalUniqueTags: []string{"4.10.0-rc.1", "f581896eee37216021bfce9ddd5e1fd8289c366ca0d1db25221c77688de85fd7"}, - }, - map[string]string{ - instancetype.DefaultInstancetypeLabel: "u1.small", - instancetype.DefaultPreferenceLabel: "rhel.8", - }, - &api.Metadata{ - Name: "rhcos", - Version: "latest-pre-release", - Description: description, - ExampleUserData: docs.UserData{ - Username: "core", - }, - AdditionalLabels: map[string]string{ - instancetype.DefaultInstancetypeLabel: "u1.small", - instancetype.DefaultPreferenceLabel: "rhel.8", - }, - }, - ), - ) -}) - -func TestRhcosPrerelease(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "RhcosPrerelease Suite") -} diff --git a/artifacts/rhcosprerelease/testdata/rhcos-latest-4.9-prerelease.checksum b/artifacts/rhcosprerelease/testdata/rhcos-latest-4.9-prerelease.checksum deleted file mode 100644 index 731919ee..00000000 --- a/artifacts/rhcosprerelease/testdata/rhcos-latest-4.9-prerelease.checksum +++ /dev/null @@ -1,33 +0,0 @@ -006896e8a02f6d5f0950cb97f5be904c0d052570254616e3ca05d3e4a76b2710 rhcos-4.9.0-rc.7-x86_64-aws.x86_64.vmdk.gz -68e219825af597580aaf60930c08966d3304182e259b4744ada54d1409865fd3 rhcos-4.9.0-rc.7-x86_64-azurestack.x86_64.vhd.gz -1c0de512132c239614ef9a8b9be6c8b5692ed405990dd64daa1f4f391bbb7382 rhcos-4.9.0-rc.7-x86_64-azure.x86_64.vhd.gz -031cbf6a3c00e89383a42266d00e48501aebaa4b9aaf2a1f80e44e90d1b66a82 rhcos-4.9.0-rc.7-x86_64-gcp.x86_64.tar.gz -c5c6be77aac71d93522a5099464f0cb8084db304dec5693933e8b970a7885185 rhcos-4.9.0-rc.7-x86_64-ibmcloud.x86_64.qcow2.gz -54a07a62f336f760c61641a0ec54f70eefc6cc262399ef9bdd38376c88d8c9bd rhcos-4.9.0-rc.7-x86_64-live-initramfs.x86_64.img -d13269e6c60119397210418781b7057673c4018692d28a868e248a0b550ea247 rhcos-4.9.0-rc.7-x86_64-live-kernel-x86_64 -3b5ba1e98d9852907aaffe4acda9af7b293bdb88008f310631a8a5b4333ea378 rhcos-4.9.0-rc.7-x86_64-live-rootfs.x86_64.img -0e92c3ad698ef68057011f7cc5b9fd07356b8711a55f735aaae22c91b996c96e rhcos-4.9.0-rc.7-x86_64-live.x86_64.iso -9b4548b8b87322dd4d659922cddd287060d6b4ac53992d121ac32442a471f793 rhcos-4.9.0-rc.7-x86_64-metal4k.x86_64.raw.gz -ef9a304cba0c0050486965e38b3c6c614c0646af0b0de493c99eb6a14703cb5a rhcos-4.9.0-rc.7-x86_64-metal.x86_64.raw.gz -3466690807fb710102559ea57daac0484c59ed4d914996882d601b8bb7a7ada8 rhcos-4.9.0-rc.7-x86_64-openstack.x86_64.qcow2.gz -6708a9fbf379a2e53a9b61ae18fad2fb472bd746d4a04638dbb412195de10a24 rhcos-4.9.0-rc.7-x86_64-ostree.x86_64.tar -cae8928e0cd35b88fcec7c07b1072155bde17d7dd44985f8b0d9e3862c556602 rhcos-4.9.0-rc.7-x86_64-qemu.x86_64.qcow2.gz -6c8bfdee5930f12368b9f46a11aea736a068208262f7747f3bac54eb581531f5 rhcos-4.9.0-rc.7-x86_64-vmware.x86_64.ova -006896e8a02f6d5f0950cb97f5be904c0d052570254616e3ca05d3e4a76b2710 rhcos-aws.x86_64.vmdk.gz -68e219825af597580aaf60930c08966d3304182e259b4744ada54d1409865fd3 rhcos-azurestack.x86_64.vhd.gz -1c0de512132c239614ef9a8b9be6c8b5692ed405990dd64daa1f4f391bbb7382 rhcos-azure.x86_64.vhd.gz -031cbf6a3c00e89383a42266d00e48501aebaa4b9aaf2a1f80e44e90d1b66a82 rhcos-gcp.x86_64.tar.gz -c5c6be77aac71d93522a5099464f0cb8084db304dec5693933e8b970a7885185 rhcos-ibmcloud.x86_64.qcow2.gz -54a07a62f336f760c61641a0ec54f70eefc6cc262399ef9bdd38376c88d8c9bd rhcos-installer-initramfs.x86_64.img -d13269e6c60119397210418781b7057673c4018692d28a868e248a0b550ea247 rhcos-installer-kernel-x86_64 -3b5ba1e98d9852907aaffe4acda9af7b293bdb88008f310631a8a5b4333ea378 rhcos-installer-rootfs.x86_64.img -54a07a62f336f760c61641a0ec54f70eefc6cc262399ef9bdd38376c88d8c9bd rhcos-live-initramfs.x86_64.img -d13269e6c60119397210418781b7057673c4018692d28a868e248a0b550ea247 rhcos-live-kernel-x86_64 -3b5ba1e98d9852907aaffe4acda9af7b293bdb88008f310631a8a5b4333ea378 rhcos-live-rootfs.x86_64.img -0e92c3ad698ef68057011f7cc5b9fd07356b8711a55f735aaae22c91b996c96e rhcos-live.x86_64.iso -9b4548b8b87322dd4d659922cddd287060d6b4ac53992d121ac32442a471f793 rhcos-metal4k.x86_64.raw.gz -ef9a304cba0c0050486965e38b3c6c614c0646af0b0de493c99eb6a14703cb5a rhcos-metal.x86_64.raw.gz -3466690807fb710102559ea57daac0484c59ed4d914996882d601b8bb7a7ada8 rhcos-openstack.x86_64.qcow2.gz -6708a9fbf379a2e53a9b61ae18fad2fb472bd746d4a04638dbb412195de10a24 rhcos-ostree.x86_64.tar -cae8928e0cd35b88fcec7c07b1072155bde17d7dd44985f8b0d9e3862c556602 rhcos-qemu.x86_64.qcow2.gz -6c8bfdee5930f12368b9f46a11aea736a068208262f7747f3bac54eb581531f5 rhcos-vmware.x86_64.ova \ No newline at end of file diff --git a/artifacts/rhcosprerelease/testdata/rhcos-latest-prerelease.checksum b/artifacts/rhcosprerelease/testdata/rhcos-latest-prerelease.checksum deleted file mode 100644 index b62c6666..00000000 --- a/artifacts/rhcosprerelease/testdata/rhcos-latest-prerelease.checksum +++ /dev/null @@ -1,37 +0,0 @@ -12c6cd2edb2ef80a90ee3c038491e35df83c5800b686a41240d1dd33b4ca7463 rhcos-4.10.0-rc.1-x86_64-aliyun.x86_64.qcow2.gz -2b4eb22e26f13d7bf9c5696f0484216aeda70dead1b85d7affec7ea9e8b124f6 rhcos-4.10.0-rc.1-x86_64-aws.x86_64.vmdk.gz -3e67e191b7953022cb6e53a1382855102479ccf2eabf1d41763b86f090fa7d1a rhcos-4.10.0-rc.1-x86_64-azurestack.x86_64.vhd.gz -620a9368a0f09067f40240aa66bbcea04dce18b9586a7049433872ff2d7452f5 rhcos-4.10.0-rc.1-x86_64-azure.x86_64.vhd.gz -eaf972601eee2b976c1892e597e93f7574bd0a04b1fe92cfcbebf9f2bf11ef71 rhcos-4.10.0-rc.1-x86_64-gcp.x86_64.tar.gz -58b6a3401f0d333cba9fdb0351d54dcf55dcd8dc2df5169d7c2c18e8d69cc511 rhcos-4.10.0-rc.1-x86_64-ibmcloud.x86_64.qcow2.gz -9d6a562839d2760fc35a6645a9a0e337ed561a5ae2d1242d37fea95bf21b2ac5 rhcos-4.10.0-rc.1-x86_64-live-initramfs.x86_64.img -0c4d5c1c4b5c230de4b98d921569996ea765eb2b16d3531a4bd98d796833c0e3 rhcos-4.10.0-rc.1-x86_64-live-kernel-x86_64 -d32f9e6afb4091046ab9a06602169932c963a514014603e504dd0ea7c86a388a rhcos-4.10.0-rc.1-x86_64-live-rootfs.x86_64.img -2905c1f0d85739e8600e8816c0d32711fb4002be4f845e0b20eeab35314e5b58 rhcos-4.10.0-rc.1-x86_64-live.x86_64.iso -4166c4aa8e3ff588d21c06538a9fbb536d6c1957f8c43f0d3ea49ded83f30cb5 rhcos-4.10.0-rc.1-x86_64-metal4k.x86_64.raw.gz -abb9f690eeeeb108a625d56b08ea7dc9da3130ddc8d4db97c80e1ac84d91e030 rhcos-4.10.0-rc.1-x86_64-metal.x86_64.raw.gz -d6eb51223074fa4bb4adca181731cb349772bea5513c227e5bfe789f9f187371 rhcos-4.10.0-rc.1-x86_64-nutanix.x86_64.qcow2.gz -f581896eee37216021bfce9ddd5e1fd8289c366ca0d1db25221c77688de85fd7 rhcos-4.10.0-rc.1-x86_64-openstack.x86_64.qcow2.gz -f6ffef4cfbd2d274f08b1389d18d1b662c7eb5cc0d53b25123bc408594f6b082 rhcos-4.10.0-rc.1-x86_64-ostree.x86_64.ociarchive -66f6333c94ce444b619f9a413ff7b00925a51c6ecbdbadf730622861ce36f95e rhcos-4.10.0-rc.1-x86_64-qemu.x86_64.qcow2.gz -3d75bcf4d1245f1d10865072b3a735333f2fbc7262b55fafc0fbead8c8c3517d rhcos-4.10.0-rc.1-x86_64-vmware.x86_64.ova -12c6cd2edb2ef80a90ee3c038491e35df83c5800b686a41240d1dd33b4ca7463 rhcos-aliyun.x86_64.qcow2.gz -2b4eb22e26f13d7bf9c5696f0484216aeda70dead1b85d7affec7ea9e8b124f6 rhcos-aws.x86_64.vmdk.gz -3e67e191b7953022cb6e53a1382855102479ccf2eabf1d41763b86f090fa7d1a rhcos-azurestack.x86_64.vhd.gz -620a9368a0f09067f40240aa66bbcea04dce18b9586a7049433872ff2d7452f5 rhcos-azure.x86_64.vhd.gz -eaf972601eee2b976c1892e597e93f7574bd0a04b1fe92cfcbebf9f2bf11ef71 rhcos-gcp.x86_64.tar.gz -58b6a3401f0d333cba9fdb0351d54dcf55dcd8dc2df5169d7c2c18e8d69cc511 rhcos-ibmcloud.x86_64.qcow2.gz -9d6a562839d2760fc35a6645a9a0e337ed561a5ae2d1242d37fea95bf21b2ac5 rhcos-installer-initramfs.x86_64.img -0c4d5c1c4b5c230de4b98d921569996ea765eb2b16d3531a4bd98d796833c0e3 rhcos-installer-kernel-x86_64 -d32f9e6afb4091046ab9a06602169932c963a514014603e504dd0ea7c86a388a rhcos-installer-rootfs.x86_64.img -9d6a562839d2760fc35a6645a9a0e337ed561a5ae2d1242d37fea95bf21b2ac5 rhcos-live-initramfs.x86_64.img -0c4d5c1c4b5c230de4b98d921569996ea765eb2b16d3531a4bd98d796833c0e3 rhcos-live-kernel-x86_64 -d32f9e6afb4091046ab9a06602169932c963a514014603e504dd0ea7c86a388a rhcos-live-rootfs.x86_64.img -2905c1f0d85739e8600e8816c0d32711fb4002be4f845e0b20eeab35314e5b58 rhcos-live.x86_64.iso -4166c4aa8e3ff588d21c06538a9fbb536d6c1957f8c43f0d3ea49ded83f30cb5 rhcos-metal4k.x86_64.raw.gz -abb9f690eeeeb108a625d56b08ea7dc9da3130ddc8d4db97c80e1ac84d91e030 rhcos-metal.x86_64.raw.gz -d6eb51223074fa4bb4adca181731cb349772bea5513c227e5bfe789f9f187371 rhcos-nutanix.x86_64.qcow2.gz -f581896eee37216021bfce9ddd5e1fd8289c366ca0d1db25221c77688de85fd7 rhcos-openstack.x86_64.qcow2.gz -f6ffef4cfbd2d274f08b1389d18d1b662c7eb5cc0d53b25123bc408594f6b082 rhcos-ostree.x86_64.ociarchive -66f6333c94ce444b619f9a413ff7b00925a51c6ecbdbadf730622861ce36f95e rhcos-qemu.x86_64.qcow2.gz -3d75bcf4d1245f1d10865072b3a735333f2fbc7262b55fafc0fbead8c8c3517d rhcos-vmware.x86_64.ova \ No newline at end of file diff --git a/cmd/medius/common/registry.go b/cmd/medius/common/registry.go index 3f42a529..df04ca6e 100644 --- a/cmd/medius/common/registry.go +++ b/cmd/medius/common/registry.go @@ -10,8 +10,6 @@ import ( "kubevirt.io/containerdisks/artifacts/centosstream" "kubevirt.io/containerdisks/artifacts/fedora" "kubevirt.io/containerdisks/artifacts/generic" - "kubevirt.io/containerdisks/artifacts/rhcos" - "kubevirt.io/containerdisks/artifacts/rhcosprerelease" "kubevirt.io/containerdisks/artifacts/ubuntu" "kubevirt.io/containerdisks/pkg/api" "kubevirt.io/containerdisks/pkg/docs" @@ -25,88 +23,6 @@ type Entry struct { } var staticRegistry = []Entry{ - { - Artifact: rhcos.New( - "4.9", - true, - defaultLabels("u1.small", "rhel.8"), - ), - UseForDocs: false, - }, - { - Artifact: rhcos.New( - "4.10", - true, - defaultLabels("u1.small", "rhel.8"), - ), - UseForDocs: false, - }, - { - Artifact: rhcos.New( - "4.11", - true, - defaultLabels("u1.small", "rhel.8"), - ), - UseForDocs: false, - }, - { - Artifact: rhcos.New( - "4.12", - true, - defaultLabels("u1.small", "rhel.8"), - ), - UseForDocs: true, - }, - { - Artifact: rhcos.New( - "latest", - false, - defaultLabels("u1.small", "rhel.9"), - ), - UseForDocs: false, - }, - { - Artifact: rhcosprerelease.New( - "latest-4.9", - defaultLabels("u1.small", "rhel.8"), - ), - UseForDocs: false, - }, - { - Artifact: rhcosprerelease.New( - "latest-4.10", - defaultLabels("u1.small", "rhel.8"), - ), - UseForDocs: false, - }, - { - Artifact: rhcosprerelease.New( - "latest-4.11", - defaultLabels("u1.small", "rhel.8"), - ), - UseForDocs: false, - }, - { - Artifact: rhcosprerelease.New( - "latest-4.12", - defaultLabels("u1.small", "rhel.8"), - ), - UseForDocs: false, - }, - { - Artifact: rhcosprerelease.New( - "latest-4.13", - defaultLabels("u1.small", "rhel.9"), - ), - UseForDocs: false, - }, - { - Artifact: rhcosprerelease.New( - "latest", - defaultLabels("u1.small", "rhel.9"), - ), - UseForDocs: false, - }, { Artifact: centos.New("8.4", nil), UseForDocs: false,