add gitignore

* change capitalization for vbox
This commit is contained in:
Neil Hanlon 2022-07-13 19:18:43 -04:00
parent ca47a82d99
commit 03d0c585ae
Signed by: neil
GPG Key ID: 705BC21EC3C70F34
3 changed files with 5 additions and 4 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.swp

View File

@ -106,7 +106,7 @@ ALLOWED_TYPE_VARIANTS = {
"Container": ["Base", "Minimal", "UBI"], "Container": ["Base", "Minimal", "UBI"],
"EC2": None, "EC2": None,
"GenericCloud": None, "GenericCloud": None,
"Vagrant": ["Libvirt", "VBox"] "Vagrant": ["Libvirt", "Vbox"]
} }
def valid_type_variant(_type: str, variant: str="") -> bool: def valid_type_variant(_type: str, variant: str="") -> bool:
if _type not in ALLOWED_TYPE_VARIANTS: if _type not in ALLOWED_TYPE_VARIANTS:

View File

@ -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"] # ["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"]: if self.image_type in ["Vagrant"]:
_map = { _map = {
"VBox": "vmdk", "Vbox": "vmdk",
"Libvirt": "qcow2" "Libvirt": "qcow2"
} }
output = f"{_map[self.variant]}" #type: ignore output = f"{_map[self.variant]}" #type: ignore
@ -126,7 +126,7 @@ class ImageBuild:
if self.stage_commands: 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: try:
os.mkdir(self.outdir) os.mkdir(self.outdir)
@ -263,7 +263,7 @@ class ImageBuild:
def package(self) -> int: def package(self) -> int:
# Some build types don't need to be packaged by imagefactory # Some build types don't need to be packaged by imagefactory
# @TODO remove business logic if possible # @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 "" self.target_uuid = self.base_uuid if hasattr(self, 'base_uuid') else ""
if self.target_uuid: if self.target_uuid: