add gitignore
* change capitalization for vbox
This commit is contained in:
parent
ca47a82d99
commit
03d0c585ae
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.swp
|
@ -106,7 +106,7 @@ ALLOWED_TYPE_VARIANTS = {
|
||||
"Container": ["Base", "Minimal", "UBI"],
|
||||
"EC2": None,
|
||||
"GenericCloud": None,
|
||||
"Vagrant": ["Libvirt", "VBox"]
|
||||
"Vagrant": ["Libvirt", "Vbox"]
|
||||
}
|
||||
def valid_type_variant(_type: str, variant: str="") -> bool:
|
||||
if _type not in ALLOWED_TYPE_VARIANTS:
|
||||
|
@ -116,7 +116,7 @@ class ImageBuild:
|
||||
# ["qemu-img", "convert", "-f", "raw", "-o", "subformat=fixed,force_size" ,"-O", "vpc", lambda: f"{STORAGE_DIR}/{self.target_uuid}.body", f"{self.outdir}/{self.outname}.vhd"]
|
||||
if self.image_type in ["Vagrant"]:
|
||||
_map = {
|
||||
"VBox": "vmdk",
|
||||
"Vbox": "vmdk",
|
||||
"Libvirt": "qcow2"
|
||||
}
|
||||
output = f"{_map[self.variant]}" #type: ignore
|
||||
@ -126,7 +126,7 @@ class ImageBuild:
|
||||
|
||||
|
||||
if self.stage_commands:
|
||||
self.stage_commands += ["cp", "-v", lambda: f"{STORAGE_DIR}/{self.target_uuid}.meta", f"{self.outdir}/build.meta"]
|
||||
self.stage_commands.append(["cp", "-v", lambda: f"{STORAGE_DIR}/{self.target_uuid}.meta", f"{self.outdir}/build.meta"])
|
||||
|
||||
try:
|
||||
os.mkdir(self.outdir)
|
||||
@ -263,7 +263,7 @@ class ImageBuild:
|
||||
def package(self) -> int:
|
||||
# Some build types don't need to be packaged by imagefactory
|
||||
# @TODO remove business logic if possible
|
||||
if self.image_type in ["GenericCloud", "EC2", "Azure"]:
|
||||
if self.image_type in ["GenericCloud", "EC2", "Azure", "Vagrant"]:
|
||||
self.target_uuid = self.base_uuid if hasattr(self, 'base_uuid') else ""
|
||||
|
||||
if self.target_uuid:
|
||||
|
Loading…
Reference in New Issue
Block a user