from .handler import ExpectedHandlerError, CrTplHandler
-__version__ = '0.4.3'
+__version__ = '0.5.1'
LOG = logging.getLogger(__name__)
self.handler.config = self.config
if self.args.rotate:
self.handler.rotate_only = True
+ if self.args.abort:
+ self.handler.abort = True
+
self.handler.initialized = True
self.initialized = True
"""
+ self.arg_parser.add_argument(
+ '-A', '--abort', dest='abort', action='store_true',
+ help="Abort creation of VMWare template after successsful creation of template VM.",
+ )
+
vmware_group = self.arg_parser.add_argument_group('VMWare options')
vmware_group.add_argument(
from .config import CrTplConfiguration
-__version__ = '0.7.7'
+__version__ = '0.8.1'
LOG = logging.getLogger(__name__)
TZ = pytz.timezone('Europe/Berlin')
self.ssh_timeout = 30
self.max_wait_for_shutdown = 600
self.rotate_only = False
+ self.abort = False
if initialized:
self.initialized = True
"Could not find VM after creating.")
self.poweron_vm()
self.wait_for_finish_install()
- self.post_install_tasks_ssh()
- self.poweroff_vm()
- self.change_mac_address()
- self.rotate_templates()
- if not self.rotate_only:
- self.rename_and_change_vm()
+ if not self.abort:
+ self.post_install_tasks_ssh()
+ self.poweroff_vm()
+ self.change_mac_address()
+ if not self.abort:
+ self.rotate_templates()
+ if not self.rotate_only:
+ self.rename_and_change_vm()
finally:
LOG.debug("Disconnecting from vSphere host {h}:{p} ...".format(
h=self.config.vsphere_host, p=self.config.vsphere_port))