Repository: osbuild/osbuild-composer
Pull request #175 (2019-12-16 00:02:49)

distro: rename openstack and vmdk images to match lorax


Patch:
diff --git a/internal/distro/fedora30/distro.go b/internal/distro/fedora30/distro.go
index 42f485d45..9e25b07f1 100644
--- a/internal/distro/fedora30/distro.go
+++ b/internal/distro/fedora30/distro.go
@@ -156,7 +156,7 @@ func New() *Fedora30 {
 	}
 
 	r.outputs["openstack"] = output{
-		Name:     "image.qcow2",
+		Name:     "disk.qcow2",
 		MimeType: "application/x-qemu-disk",
 		Packages: []string{
 			"@Core",
@@ -175,7 +175,7 @@ func New() *Fedora30 {
 		},
 		KernelOptions: "ro biosdevname=0 net.ifnames=0",
 		Bootable:      true,
-		Assembler:     func(uefi bool) *pipeline.Assembler { return r.qemuAssembler("qcow2", "image.qcow2", uefi) },
+		Assembler:     func(uefi bool) *pipeline.Assembler { return r.qemuAssembler("qcow2", "disk.qcow2", uefi) },
 	}
 
 	r.outputs["tar"] = output{
@@ -198,7 +198,7 @@ func New() *Fedora30 {
 	}
 
 	r.outputs["vhd"] = output{
-		Name:     "image.vhd",
+		Name:     "disk.vhd",
 		MimeType: "application/x-vhd",
 		Packages: []string{
 			"@Core",
@@ -216,7 +216,7 @@ func New() *Fedora30 {
 		},
 		KernelOptions: "ro biosdevname=0 net.ifnames=0",
 		Bootable:      true,
-		Assembler:     func(uefi bool) *pipeline.Assembler { return r.qemuAssembler("vpc", "image.vhd", uefi) },
+		Assembler:     func(uefi bool) *pipeline.Assembler { return r.qemuAssembler("vpc", "disk.vhd", uefi) },
 	}
 
 	r.outputs["vmdk"] = output{
diff --git a/internal/distro/rhel82/distro.go b/internal/distro/rhel82/distro.go
index 389591229..80b3c3795 100644
--- a/internal/distro/rhel82/distro.go
+++ b/internal/distro/rhel82/distro.go
@@ -276,7 +276,7 @@ func New() *RHEL82 {
 	}
 
 	r.outputs["openstack"] = output{
-		Name:     "image.qcow2",
+		Name:     "disk.qcow2",
 		MimeType: "application/x-qemu-disk",
 		Packages: []string{
 			// Defaults
@@ -299,7 +299,7 @@ func New() *RHEL82 {
 		},
 		Bootable:      true,
 		KernelOptions: "ro net.ifnames=0",
-		Assembler:     func(uefi bool) *pipeline.Assembler { return r.qemuAssembler("qcow2", "image.qcow2", 3*GigaByte, uefi) },
+		Assembler:     func(uefi bool) *pipeline.Assembler { return r.qemuAssembler("qcow2", "disk.qcow2", 3*GigaByte, uefi) },
 	}
 
 	r.outputs["tar"] = output{
@@ -327,7 +327,7 @@ func New() *RHEL82 {
 	}
 
 	r.outputs["vhd"] = output{
-		Name:     "image.vhd",
+		Name:     "disk.vhd",
 		MimeType: "application/x-vhd",
 		Packages: []string{
 			// Defaults
@@ -363,7 +363,7 @@ func New() *RHEL82 {
 		DefaultTarget: "multi-user.target",
 		Bootable:      true,
 		KernelOptions: "ro biosdevname=0 rootdelay=300 console=ttyS0 earlyprintk=ttyS0 net.ifnames=0",
-		Assembler:     func(uefi bool) *pipeline.Assembler { return r.qemuAssembler("vpc", "image.vhd", 3*GigaByte, uefi) },
+		Assembler:     func(uefi bool) *pipeline.Assembler { return r.qemuAssembler("vpc", "disk.vhd", 3*GigaByte, uefi) },
 	}
 
 	r.outputs["vmdk"] = output{


Test patch:
diff --git a/internal/distro/fedora30/distro_test.go b/internal/distro/fedora30/distro_test.go
index f6c7a4f30..56818dadd 100644
--- a/internal/distro/fedora30/distro_test.go
+++ b/internal/distro/fedora30/distro_test.go
@@ -51,7 +51,7 @@ func TestFilenameFromType(t *testing.T) {
 		{
 			name:  "openstack",
 			args:  args{"openstack"},
-			want:  "image.qcow2",
+			want:  "disk.qcow2",
 			want1: "application/x-qemu-disk",
 		},
 		{
@@ -75,7 +75,7 @@ func TestFilenameFromType(t *testing.T) {
 		{
 			name:  "vhd",
 			args:  args{"vhd"},
-			want:  "image.vhd",
+			want:  "disk.vhd",
 			want1: "application/x-vhd",
 		},
 		{
diff --git a/internal/distro/rhel82/distro_test.go b/internal/distro/rhel82/distro_test.go
index 3a7bf6044..7aa2d24e6 100644
--- a/internal/distro/rhel82/distro_test.go
+++ b/internal/distro/rhel82/distro_test.go
@@ -51,7 +51,7 @@ func TestFilenameFromType(t *testing.T) {
 		{
 			name:  "openstack",
 			args:  args{"openstack"},
-			want:  "image.qcow2",
+			want:  "disk.qcow2",
 			want1: "application/x-qemu-disk",
 		},
 		{
@@ -75,7 +75,7 @@ func TestFilenameFromType(t *testing.T) {
 		{
 			name:  "vhd",
 			args:  args{"vhd"},
-			want:  "image.vhd",
+			want:  "disk.vhd",
 			want1: "application/x-vhd",
 		},
 		{
diff --git a/test/cases/openstack_empty_blueprint.json b/test/cases/openstack_empty_blueprint.json
index be183a83f..6ad6a163a 100644
--- a/test/cases/openstack_empty_blueprint.json
+++ b/test/cases/openstack_empty_blueprint.json
@@ -6,7 +6,7 @@
       "fedora": "sha256:9f596e18f585bee30ac41c11fb11a83ed6b11d5b341c1cb56ca4015d7717cb97"
     },
     "output-format": "openstack",
-    "filename": "image.qcow2",
+    "filename": "disk.qcow2",
     "blueprint": {}
   },
   "pipeline": {
@@ -118,7 +118,7 @@
       "name": "org.osbuild.qemu",
       "options": {
         "format": "qcow2",
-        "filename": "image.qcow2",
+        "filename": "disk.qcow2",
         "size": 3222274048,
         "ptuuid": "0x14fc63d2",
         "pttype": "mbr",
diff --git a/test/cases/openstack_local_boot.json b/test/cases/openstack_local_boot.json
index 371126db4..b258740bb 100644
--- a/test/cases/openstack_local_boot.json
+++ b/test/cases/openstack_local_boot.json
@@ -6,7 +6,7 @@
     "distro": "fedora-30",
     "arch": "x86_64",
     "output-format": "openstack",
-    "filename": "image.qcow2",
+    "filename": "disk.qcow2",
     "blueprint-draft": {
       "name": "openstack-boot-test",
       "description": "Image for boot test",
@@ -168,7 +168,7 @@
       "name": "org.osbuild.qemu",
       "options": {
         "format": "qcow2",
-        "filename": "image.qcow2",
+        "filename": "disk.qcow2",
         "size": 3222274048,
         "ptuuid": "0x14fc63d2",
         "pttype": "mbr",
diff --git a/test/cases/rhel82_openstack.json b/test/cases/rhel82_openstack.json
index 83e53b7e5..17fd2b23c 100644
--- a/test/cases/rhel82_openstack.json
+++ b/test/cases/rhel82_openstack.json
@@ -9,7 +9,7 @@
       "baseos": "sha256:3ce6f4ffa7d05b81fec2ba5a1c4917b351231c3433f2f5eed86ed5f8f97168a1",
       "appstream": "sha256:662e1dc0e465dd5e8efec9f42ef24ac9fd8418294254c3c98ea0342d6e903aed"
     },
-    "filename": "image.qcow2",
+    "filename": "disk.qcow2",
     "output-format": "openstack",
     "blueprint": {}
   },
@@ -128,7 +128,7 @@
       "name": "org.osbuild.qemu",
       "options": {
         "format": "qcow2",
-        "filename": "image.qcow2",
+        "filename": "disk.qcow2",
         "size": 3221225472,
         "ptuuid": "0x14fc63d2",
         "pttype": "mbr",
diff --git a/test/cases/rhel82_vhd.json b/test/cases/rhel82_vhd.json
index cb8dadc35..16e655b02 100644
--- a/test/cases/rhel82_vhd.json
+++ b/test/cases/rhel82_vhd.json
@@ -9,7 +9,7 @@
       "baseos": "sha256:3ce6f4ffa7d05b81fec2ba5a1c4917b351231c3433f2f5eed86ed5f8f97168a1",
       "appstream": "sha256:662e1dc0e465dd5e8efec9f42ef24ac9fd8418294254c3c98ea0342d6e903aed"
     },
-    "filename": "image.vhd",
+    "filename": "disk.vhd",
     "output-format": "vhd",
     "blueprint": {}
   },
@@ -143,7 +143,7 @@
       "name": "org.osbuild.qemu",
       "options": {
         "format": "vpc",
-        "filename": "image.vhd",
+        "filename": "disk.vhd",
         "size": 3221225472,
         "ptuuid": "0x14fc63d2",
         "pttype": "mbr",
diff --git a/test/cases/vhd_empty_blueprint.json b/test/cases/vhd_empty_blueprint.json
index a677cfe61..78af91d4a 100644
--- a/test/cases/vhd_empty_blueprint.json
+++ b/test/cases/vhd_empty_blueprint.json
@@ -6,7 +6,7 @@
       "fedora": "sha256:9f596e18f585bee30ac41c11fb11a83ed6b11d5b341c1cb56ca4015d7717cb97"
     },
     "output-format": "vhd",
-    "filename": "image.vhd",
+    "filename": "disk.vhd",
     "blueprint": {}
   },
   "pipeline": {
@@ -117,7 +117,7 @@
       "name": "org.osbuild.qemu",
       "options": {
         "format": "vpc",
-        "filename": "image.vhd",
+        "filename": "disk.vhd",
         "size": 3222274048,
         "ptuuid": "0x14fc63d2",
         "pttype": "mbr",
diff --git a/test/cases/vhd_local_boot.json b/test/cases/vhd_local_boot.json
index be24216f0..c5d10bfda 100644
--- a/test/cases/vhd_local_boot.json
+++ b/test/cases/vhd_local_boot.json
@@ -6,7 +6,7 @@
     "distro": "fedora-30",
     "arch": "x86_64",
     "output-format": "vhd",
-    "filename": "image.vhd",
+    "filename": "disk.vhd",
     "blueprint-draft": {
       "name": "vhd-boot-test",
       "description": "Image for boot test",
@@ -167,7 +167,7 @@
       "name": "org.osbuild.qemu",
       "options": {
         "format": "qcow2",
-        "filename": "image.vhd",
+        "filename": "disk.vhd",
         "size": 3222274048,
         "ptuuid": "0x14fc63d2",
         "pttype": "mbr",