Skip to content

Commit

Permalink
image/live: renamed to disk
Browse files Browse the repository at this point in the history
Renames the `image/live` to `image/disk`. Als renames all image types in
all distros to be called `diskImage` instead of `liveImage`.

This much better describes what the old `liveImage` did (build various
disk images).
  • Loading branch information
supakeen committed Jul 12, 2023
1 parent dc91567 commit de1bcae
Show file tree
Hide file tree
Showing 19 changed files with 53 additions and 53 deletions.
10 changes: 5 additions & 5 deletions pkg/distro/fedora/distro.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ var (
kernelOptions: defaultKernelOptions,
bootable: true,
defaultSize: 5 * common.GibiByte,
image: liveImage,
image: diskImage,
buildPipelines: []string{"build"},
payloadPipelines: []string{"os", "image", "qcow2"},
exports: []string{"qcow2"},
Expand Down Expand Up @@ -230,7 +230,7 @@ var (
kernelOptions: defaultKernelOptions,
bootable: true,
defaultSize: 2 * common.GibiByte,
image: liveImage,
image: diskImage,
buildPipelines: []string{"build"},
payloadPipelines: []string{"os", "image", "vpc"},
exports: []string{"vpc"},
Expand Down Expand Up @@ -259,7 +259,7 @@ var (
kernelOptions: defaultKernelOptions,
bootable: true,
defaultSize: 2 * common.GibiByte,
image: liveImage,
image: diskImage,
buildPipelines: []string{"build"},
payloadPipelines: []string{"os", "image", "vmdk"},
exports: []string{"vmdk"},
Expand All @@ -277,7 +277,7 @@ var (
kernelOptions: defaultKernelOptions,
bootable: true,
defaultSize: 2 * common.GibiByte,
image: liveImage,
image: diskImage,
buildPipelines: []string{"build"},
payloadPipelines: []string{"os", "image", "vmdk", "ovf", "archive"},
exports: []string{"archive"},
Expand Down Expand Up @@ -340,7 +340,7 @@ var (
kernelOptions: defaultKernelOptions,
bootable: true,
defaultSize: 2 * common.GibiByte,
image: liveImage,
image: diskImage,
buildPipelines: []string{"build"},
payloadPipelines: []string{"os", "image"},
exports: []string{"image"},
Expand Down
4 changes: 2 additions & 2 deletions pkg/distro/fedora/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,15 +200,15 @@ func osCustomizations(

// IMAGES

func liveImage(workload workload.Workload,
func diskImage(workload workload.Workload,
t *imageType,
customizations *blueprint.Customizations,
options distro.ImageOptions,
packageSets map[string]rpmmd.PackageSet,
containers []container.SourceSpec,
rng *rand.Rand) (image.ImageKind, error) {

img := image.NewLiveImage()
img := image.NewDiskImage()
img.Platform = t.platform
img.OSCustomizations = osCustomizations(t, packageSets[osPkgsKey], containers, customizations)
img.Environment = t.environment
Expand Down
2 changes: 1 addition & 1 deletion pkg/distro/fedora_core/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ func diskImage(workload workload.Workload,
containers []container.SourceSpec,
rng *rand.Rand) (image.ImageKind, error) {

img := image.NewLiveImage()
img := image.NewDiskImage()
img.Platform = t.platform
img.OSCustomizations = osCustomizations(t, packageSets[osPkgsKey], containers, customizations)
img.Environment = t.environment
Expand Down
2 changes: 1 addition & 1 deletion pkg/distro/rhel7/azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var azureRhuiImgType = imageType{
kernelOptions: "ro crashkernel=auto console=tty1 console=ttyS0 earlyprintk=ttyS0 rootdelay=300 scsi_mod.use_blk_mq=y",
bootable: true,
defaultSize: 64 * common.GibiByte,
image: liveImage,
image: diskImage,
buildPipelines: []string{"build"},
payloadPipelines: []string{"os", "image", "vpc", "xz"},
exports: []string{"xz"},
Expand Down
4 changes: 2 additions & 2 deletions pkg/distro/rhel7/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,15 +216,15 @@ func osCustomizations(
return osc
}

func liveImage(workload workload.Workload,
func diskImage(workload workload.Workload,
t *imageType,
customizations *blueprint.Customizations,
options distro.ImageOptions,
packageSets map[string]rpmmd.PackageSet,
containers []container.SourceSpec,
rng *rand.Rand) (image.ImageKind, error) {

img := image.NewLiveImage()
img := image.NewDiskImage()
img.Platform = t.platform
img.OSCustomizations = osCustomizations(t, packageSets[osPkgsKey], options, containers, customizations)
img.Environment = t.environment
Expand Down
2 changes: 1 addition & 1 deletion pkg/distro/rhel7/qcow2.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var qcow2ImgType = imageType{
defaultImageConfig: qcow2DefaultImgConfig,
bootable: true,
defaultSize: 10 * common.GibiByte,
image: liveImage,
image: diskImage,
buildPipelines: []string{"build"},
payloadPipelines: []string{"os", "image", "qcow2"},
exports: []string{"qcow2"},
Expand Down
12 changes: 6 additions & 6 deletions pkg/distro/rhel8/ami.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func amiImgTypeX86_64(rd distribution) imageType {
kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 crashkernel=auto",
bootable: true,
defaultSize: 10 * common.GibiByte,
image: liveImage,
image: diskImage,
buildPipelines: []string{"build"},
payloadPipelines: []string{"os", "image"},
exports: []string{"image"},
Expand Down Expand Up @@ -49,7 +49,7 @@ func ec2ImgTypeX86_64(rd distribution) imageType {
kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 crashkernel=auto",
bootable: true,
defaultSize: 10 * common.GibiByte,
image: liveImage,
image: diskImage,
buildPipelines: []string{"build"},
payloadPipelines: []string{"os", "image", "xz"},
exports: []string{"xz"},
Expand Down Expand Up @@ -77,7 +77,7 @@ func ec2HaImgTypeX86_64(rd distribution) imageType {
kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 crashkernel=auto",
bootable: true,
defaultSize: 10 * common.GibiByte,
image: liveImage,
image: diskImage,
buildPipelines: []string{"build"},
payloadPipelines: []string{"os", "image", "xz"},
exports: []string{"xz"},
Expand All @@ -98,7 +98,7 @@ func amiImgTypeAarch64(rd distribution) imageType {
kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 iommu.strict=0 crashkernel=auto",
bootable: true,
defaultSize: 10 * common.GibiByte,
image: liveImage,
image: diskImage,
buildPipelines: []string{"build"},
payloadPipelines: []string{"os", "image"},
exports: []string{"image"},
Expand Down Expand Up @@ -126,7 +126,7 @@ func ec2ImgTypeAarch64(rd distribution) imageType {
kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 iommu.strict=0 crashkernel=auto",
bootable: true,
defaultSize: 10 * common.GibiByte,
image: liveImage,
image: diskImage,
buildPipelines: []string{"build"},
payloadPipelines: []string{"os", "image", "xz"},
exports: []string{"xz"},
Expand Down Expand Up @@ -154,7 +154,7 @@ func ec2SapImgTypeX86_64(rd distribution) imageType {
kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 crashkernel=auto processor.max_cstate=1 intel_idle.max_cstate=1",
bootable: true,
defaultSize: 10 * common.GibiByte,
image: liveImage,
image: diskImage,
buildPipelines: []string{"build"},
payloadPipelines: []string{"os", "image", "xz"},
exports: []string{"xz"},
Expand Down
10 changes: 5 additions & 5 deletions pkg/distro/rhel8/azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func azureRhuiImgType() imageType {
kernelOptions: defaultAzureKernelOptions,
bootable: true,
defaultSize: 64 * common.GibiByte,
image: liveImage,
image: diskImage,
buildPipelines: []string{"build"},
payloadPipelines: []string{"os", "image", "vpc", "xz"},
exports: []string{"xz"},
Expand All @@ -47,7 +47,7 @@ func azureSapRhuiImgType(rd distribution) imageType {
kernelOptions: defaultAzureKernelOptions,
bootable: true,
defaultSize: 64 * common.GibiByte,
image: liveImage,
image: diskImage,
buildPipelines: []string{"build"},
payloadPipelines: []string{"os", "image", "vpc", "xz"},
exports: []string{"xz"},
Expand All @@ -67,7 +67,7 @@ func azureByosImgType() imageType {
kernelOptions: defaultAzureKernelOptions,
bootable: true,
defaultSize: 4 * common.GibiByte,
image: liveImage,
image: diskImage,
buildPipelines: []string{"build"},
payloadPipelines: []string{"os", "image", "vpc"},
exports: []string{"vpc"},
Expand All @@ -88,7 +88,7 @@ func azureImgType() imageType {
kernelOptions: defaultAzureKernelOptions,
bootable: true,
defaultSize: 4 * common.GibiByte,
image: liveImage,
image: diskImage,
buildPipelines: []string{"build"},
payloadPipelines: []string{"os", "image", "vpc"},
exports: []string{"vpc"},
Expand All @@ -110,7 +110,7 @@ func azureEap7RhuiImgType() imageType {
kernelOptions: defaultAzureKernelOptions,
bootable: true,
defaultSize: 64 * common.GibiByte,
image: liveImage,
image: diskImage,
buildPipelines: []string{"build"},
payloadPipelines: []string{"os", "image", "vpc", "xz"},
exports: []string{"xz"},
Expand Down
4 changes: 2 additions & 2 deletions pkg/distro/rhel8/gce.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func gceImgType(rd distribution) imageType {
kernelOptions: gceKernelOptions,
bootable: true,
defaultSize: 20 * common.GibiByte,
image: liveImage,
image: diskImage,
buildPipelines: []string{"build"},
payloadPipelines: []string{"os", "image", "archive"},
exports: []string{"archive"},
Expand All @@ -43,7 +43,7 @@ func gceRhuiImgType(rd distribution) imageType {
kernelOptions: gceKernelOptions,
bootable: true,
defaultSize: 20 * common.GibiByte,
image: liveImage,
image: diskImage,
buildPipelines: []string{"build"},
payloadPipelines: []string{"os", "image", "archive"},
exports: []string{"archive"},
Expand Down
4 changes: 2 additions & 2 deletions pkg/distro/rhel8/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,15 +227,15 @@ func osCustomizations(
return osc
}

func liveImage(workload workload.Workload,
func diskImage(workload workload.Workload,
t *imageType,
customizations *blueprint.Customizations,
options distro.ImageOptions,
packageSets map[string]rpmmd.PackageSet,
containers []container.SourceSpec,
rng *rand.Rand) (image.ImageKind, error) {

img := image.NewLiveImage()
img := image.NewDiskImage()
img.Platform = t.platform
img.OSCustomizations = osCustomizations(t, packageSets[osPkgsKey], options, containers, customizations)
img.Environment = t.environment
Expand Down
4 changes: 2 additions & 2 deletions pkg/distro/rhel8/qcow2.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func qcow2ImgType(rd distribution) imageType {
},
bootable: true,
defaultSize: 10 * common.GibiByte,
image: liveImage,
image: diskImage,
buildPipelines: []string{"build"},
payloadPipelines: []string{"os", "image", "qcow2"},
exports: []string{"qcow2"},
Expand Down Expand Up @@ -58,7 +58,7 @@ func openstackImgType() imageType {
kernelOptions: "ro net.ifnames=0",
bootable: true,
defaultSize: 4 * common.GibiByte,
image: liveImage,
image: diskImage,
buildPipelines: []string{"build"},
payloadPipelines: []string{"os", "image", "qcow2"},
exports: []string{"qcow2"},
Expand Down
4 changes: 2 additions & 2 deletions pkg/distro/rhel8/vmdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func vmdkImgType() imageType {
kernelOptions: vmdkKernelOptions,
bootable: true,
defaultSize: 4 * common.GibiByte,
image: liveImage,
image: diskImage,
buildPipelines: []string{"build"},
payloadPipelines: []string{"os", "image", "vmdk"},
exports: []string{"vmdk"},
Expand All @@ -37,7 +37,7 @@ func ovaImgType() imageType {
kernelOptions: vmdkKernelOptions,
bootable: true,
defaultSize: 4 * common.GibiByte,
image: liveImage,
image: diskImage,
buildPipelines: []string{"build"},
payloadPipelines: []string{"os", "image", "vmdk", "ovf", "archive"},
exports: []string{"archive"},
Expand Down
12 changes: 6 additions & 6 deletions pkg/distro/rhel9/ami.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var (
kernelOptions: amiKernelOptions,
bootable: true,
defaultSize: 10 * common.GibiByte,
image: liveImage,
image: diskImage,
buildPipelines: []string{"build"},
payloadPipelines: []string{"os", "image"},
exports: []string{"image"},
Expand All @@ -39,7 +39,7 @@ var (
kernelOptions: amiKernelOptions,
bootable: true,
defaultSize: 10 * common.GibiByte,
image: liveImage,
image: diskImage,
buildPipelines: []string{"build"},
payloadPipelines: []string{"os", "image", "xz"},
exports: []string{"xz"},
Expand All @@ -58,7 +58,7 @@ var (
kernelOptions: amiKernelOptions,
bootable: true,
defaultSize: 10 * common.GibiByte,
image: liveImage,
image: diskImage,
buildPipelines: []string{"build"},
payloadPipelines: []string{"os", "image", "xz"},
exports: []string{"xz"},
Expand All @@ -76,7 +76,7 @@ var (
kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 iommu.strict=0",
bootable: true,
defaultSize: 10 * common.GibiByte,
image: liveImage,
image: diskImage,
buildPipelines: []string{"build"},
payloadPipelines: []string{"os", "image"},
exports: []string{"image"},
Expand All @@ -95,7 +95,7 @@ var (
kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 iommu.strict=0",
bootable: true,
defaultSize: 10 * common.GibiByte,
image: liveImage,
image: diskImage,
buildPipelines: []string{"build"},
payloadPipelines: []string{"os", "image", "xz"},
exports: []string{"xz"},
Expand All @@ -114,7 +114,7 @@ var (
kernelOptions: "console=ttyS0,115200n8 console=tty0 net.ifnames=0 rd.blacklist=nouveau nvme_core.io_timeout=4294967295 processor.max_cstate=1 intel_idle.max_cstate=1",
bootable: true,
defaultSize: 10 * common.GibiByte,
image: liveImage,
image: diskImage,
buildPipelines: []string{"build"},
payloadPipelines: []string{"os", "image", "xz"},
exports: []string{"xz"},
Expand Down
6 changes: 3 additions & 3 deletions pkg/distro/rhel9/azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var (
kernelOptions: defaultAzureKernelOptions,
bootable: true,
defaultSize: 4 * common.GibiByte,
image: liveImage,
image: diskImage,
buildPipelines: []string{"build"},
payloadPipelines: []string{"os", "image", "vpc"},
exports: []string{"vpc"},
Expand All @@ -42,7 +42,7 @@ var (
kernelOptions: defaultAzureKernelOptions,
bootable: true,
defaultSize: 4 * common.GibiByte,
image: liveImage,
image: diskImage,
buildPipelines: []string{"build"},
payloadPipelines: []string{"os", "image", "vpc"},
exports: []string{"vpc"},
Expand All @@ -62,7 +62,7 @@ var (
kernelOptions: defaultAzureKernelOptions,
bootable: true,
defaultSize: 64 * common.GibiByte,
image: liveImage,
image: diskImage,
buildPipelines: []string{"build"},
payloadPipelines: []string{"os", "image", "vpc", "xz"},
exports: []string{"xz"},
Expand Down
4 changes: 2 additions & 2 deletions pkg/distro/rhel9/gce.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var (
kernelOptions: gceKernelOptions,
bootable: true,
defaultSize: 20 * common.GibiByte,
image: liveImage,
image: diskImage,
buildPipelines: []string{"build"},
payloadPipelines: []string{"os", "image", "archive"},
exports: []string{"archive"},
Expand All @@ -39,7 +39,7 @@ var (
kernelOptions: gceKernelOptions,
bootable: true,
defaultSize: 20 * common.GibiByte,
image: liveImage,
image: diskImage,
buildPipelines: []string{"build"},
payloadPipelines: []string{"os", "image", "archive"},
exports: []string{"archive"},
Expand Down
4 changes: 2 additions & 2 deletions pkg/distro/rhel9/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,15 +224,15 @@ func osCustomizations(
return osc
}

func liveImage(workload workload.Workload,
func diskImage(workload workload.Workload,
t *imageType,
customizations *blueprint.Customizations,
options distro.ImageOptions,
packageSets map[string]rpmmd.PackageSet,
containers []container.SourceSpec,
rng *rand.Rand) (image.ImageKind, error) {

img := image.NewLiveImage()
img := image.NewDiskImage()
img.Platform = t.platform
img.OSCustomizations = osCustomizations(t, packageSets[osPkgsKey], options, containers, customizations)
img.Environment = t.environment
Expand Down
Loading

0 comments on commit de1bcae

Please sign in to comment.