From b29fab32fcd3681be880f15d31b861996309e210 Mon Sep 17 00:00:00 2001 From: Matthew Aynalem Date: Wed, 14 Mar 2018 21:02:28 -0700 Subject: [PATCH] Revert "add builder/hyperv-vmcx (#94)" This reverts commit e3e5d11b3d8c7545437a96e5ed192c7a8a1b9602. --- README.rst | 1 - src/packerlicious/builder.py | 61 +--------------------- tests/packerlicious/test_builder_hyperv.py | 28 ---------- 3 files changed, 1 insertion(+), 89 deletions(-) diff --git a/README.rst b/README.rst index cf61a1d..48663cd 100644 --- a/README.rst +++ b/README.rst @@ -103,7 +103,6 @@ Builders: - file - googlecompute - hyperv-iso -- hyperv-vmcx - lxc - lxd - null diff --git a/src/packerlicious/builder.py b/src/packerlicious/builder.py index 1bc647e..068dcec 100644 --- a/src/packerlicious/builder.py +++ b/src/packerlicious/builder.py @@ -120,6 +120,7 @@ class Alicloud(PackerBuilder): } + class AmazonSourceAmiFilter(PackerProperty): """ https://www.packer.io/docs/builders/amazon-ebs.html#source_ami_filter @@ -800,64 +801,6 @@ class HyperV(PackerBuilder): } -class HyperVvmcx(PackerBuilder): - """ - Hyper-V Builder (from a vmcx) - https://www.packer.io/docs/builders/hyperv-vmcx.html - """ - resource_type = "hyperv-vmcx" - - props = { - 'clone_from_vmxc_path': (str, False), - 'clone_from_vm_name': (str, False), - 'clone_from_snapshot_name': (str, False), - 'clone_all_snapshots': (validator.boolean, False), - 'boot_command': ([str], False), - 'boot_wait': (str, False), - 'cpu': (int, False), - 'enable_dynamic_memory': (validator.boolean, False), - 'enable_mac_spoofing': (validator.boolean, False), - 'enable_secure_boot': (validator.boolean, False), - 'enable_virtualization_extensions': (validator.boolean, False), - 'floppy_files': ([str], False), - 'floppy_dirs': ([str], False), - 'guest_additions_mode': (str, False), - 'guest_additions_path': (str, False), - 'http_directory': (str, False), - 'http_port_min': (int, False), - 'http_port_max': (int, False), - 'iso_checksum': (str, False), - 'iso_checksum_type': (str, False), - 'iso_url': (str, False), - 'iso_urls': ([str], False), - 'iso_target_extension': (str, False), - 'iso_target_path': (str, False), - 'output_directory': (str, False), - 'ram_size': (int, False), - 'secondary_iso_images': ([str], False), - 'shutdown_command': (str, False), - 'shutdown_timeout': (str, False), - 'skip_compaction': (validator.boolean, False), - 'switch_name': (str, False), - 'switch_vlan_id': (str, False), - 'vlan_id': (str, False), - 'vm_name': (str, False), - } - - def validate(self): - conds = [ - 'clone_from_vmxc_path', - 'clone_from_vm_name' - ] - validator.exactly_one(self.__class__.__name__, self.properties, conds) - - iso_url_conds = [ - 'iso_url', - 'iso_urls' - ] - validator.mutually_exclusive(self.__class__.__name__, self.properties, iso_url_conds) - - class LXD(PackerBuilder): """ LXD Builder @@ -872,7 +815,6 @@ class LXD(PackerBuilder): 'command_wrapper': (str, False), } - class LXC(PackerBuilder): """ LXC Builder @@ -892,7 +834,6 @@ class LXC(PackerBuilder): 'template_parameters': ([str], False), } - class Null(PackerBuilder): """ Null Builder diff --git a/tests/packerlicious/test_builder_hyperv.py b/tests/packerlicious/test_builder_hyperv.py index e95e3c4..be9cdcb 100644 --- a/tests/packerlicious/test_builder_hyperv.py +++ b/tests/packerlicious/test_builder_hyperv.py @@ -11,31 +11,3 @@ def test_required_fields_missing(self): with pytest.raises(ValueError) as excinfo: b.to_dict() assert 'required' in str(excinfo.value) - - -class TestHyperVvmcxBuilder(object): - - def test_required_fields_missing(self): - b = builder.HyperVvmcx() - - with pytest.raises(ValueError) as excinfo: - b.to_dict() - assert 'HyperVvmcx: one of the following must be specified: clone_from_vmxc_path, clone_from_vm_name' == str(excinfo.value) - - def test_exactly_one_clone_from_required(self): - b = builder.HyperVvmcx( - clone_from_vmxc_path="c:\\virtual machines\\ubuntu-12.04.5-server-amd64", - clone_from_vm_name="ubuntu-12.04.5-server-amd64" - ) - - with pytest.raises(ValueError) as excinfo: - b.to_dict() - assert 'HyperVvmcx: only one of the following can be specified: clone_from_vmxc_path, clone_from_vm_name' == str( - excinfo.value) - - def test_exactly_one_clone_from_specified(self): - b = builder.HyperVvmcx( - clone_from_vmxc_path="c:\\virtual machines\\ubuntu-12.04.5-server-amd64", - ) - - b.to_dict()