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"],
|
"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:
|
||||||
|
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user