Skip to content

Commit

Permalink
RHEL-9/Azure: rename "RHUI" functions to "internal"
Browse files Browse the repository at this point in the history
The previously named "RHUI" image types do not include any RHUI-specific
configuration. These images are still build only internally for RHEL.
Let's rename them to "internal". The actual image type names is still
kept untouched for backward compatibility.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
  • Loading branch information
thozza committed Sep 16, 2024
1 parent 3547519 commit 5ee01a1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions pkg/distro/rhel/rhel9/azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ func mkAzureImgType(rd *rhel.Distribution) *rhel.ImageType {
return it
}

// Azure RHUI image type
func mkAzureRhuiImgType(rd *rhel.Distribution) *rhel.ImageType {
// Azure RHEL-internal image type
func mkAzureInternalImgType(rd *rhel.Distribution) *rhel.ImageType {
it := rhel.NewImageType(
"azure-rhui",
"disk.vhd.xz",
Expand All @@ -54,12 +54,12 @@ func mkAzureRhuiImgType(rd *rhel.Distribution) *rhel.ImageType {
it.Bootable = true
it.DefaultSize = 64 * common.GibiByte
it.DefaultImageConfig = defaultAzureImageConfig(rd)
it.BasePartitionTables = azureRhuiBasePartitionTables
it.BasePartitionTables = azureInternalBasePartitionTables

return it
}

func mkAzureSapRhuiImgType(rd *rhel.Distribution) *rhel.ImageType {
func mkAzureSapInternalImgType(rd *rhel.Distribution) *rhel.ImageType {
it := rhel.NewImageType(
"azure-sap-rhui",
"disk.vhd.xz",
Expand All @@ -78,7 +78,7 @@ func mkAzureSapRhuiImgType(rd *rhel.Distribution) *rhel.ImageType {
it.Bootable = true
it.DefaultSize = 64 * common.GibiByte
it.DefaultImageConfig = sapAzureImageConfig(rd)
it.BasePartitionTables = azureRhuiBasePartitionTables
it.BasePartitionTables = azureInternalBasePartitionTables

return it
}
Expand Down Expand Up @@ -177,7 +177,7 @@ func azureSapPackageSet(t *rhel.ImageType) rpmmd.PackageSet {
}

// PARTITION TABLES
func azureRhuiBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
func azureInternalBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
var bootSize uint64
switch {
case common.VersionLessThan(t.Arch().Distro().OsVersion(), "9.3") && t.IsRHEL():
Expand Down
6 changes: 3 additions & 3 deletions pkg/distro/rhel/rhel9/distro.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,10 +332,10 @@ func newDistro(name string, major, minor int) *rhel.Distribution {
)

if rd.IsRHEL() { // RHEL-only (non-CentOS) image types
x86_64.AddImageTypes(azureX64Platform, mkAzureRhuiImgType(rd))
aarch64.AddImageTypes(azureAarch64Platform, mkAzureRhuiImgType(rd))
x86_64.AddImageTypes(azureX64Platform, mkAzureInternalImgType(rd))
aarch64.AddImageTypes(azureAarch64Platform, mkAzureInternalImgType(rd))

x86_64.AddImageTypes(azureX64Platform, mkAzureSapRhuiImgType(rd))
x86_64.AddImageTypes(azureX64Platform, mkAzureSapInternalImgType(rd))

// keep the RHEL EC2 x86_64 images before 9.3 BIOS-only for backward compatibility
if common.VersionLessThan(rd.OsVersion(), "9.3") {
Expand Down

0 comments on commit 5ee01a1

Please sign in to comment.