From bec6d625c1db82342c82a178a25cf1398993db87 Mon Sep 17 00:00:00 2001 From: Pete Fotheringham Date: Tue, 25 Nov 2014 14:02:25 +0000 Subject: Whitespace and line endings? --- morphlib/exts/kvm.write | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'morphlib') diff --git a/morphlib/exts/kvm.write b/morphlib/exts/kvm.write index 16f188b5..eeb7c6b5 100755 --- a/morphlib/exts/kvm.write +++ b/morphlib/exts/kvm.write @@ -31,23 +31,23 @@ import morphlib.writeexts class KvmPlusSshWriteExtension(morphlib.writeexts.WriteExtension): '''Create a KVM/LibVirt virtual machine during Morph's deployment. - + The location command line argument is the pathname of the disk image to be created. The user is expected to provide the location argument using the following syntax: - + kvm+ssh://HOST/GUEST/PATH - + where: - + * HOST is the host on which KVM/LibVirt is running * GUEST is the name of the guest virtual machine on that host * PATH is the path to the disk image that should be created, on that host - + The extension will connect to HOST via ssh to run libvirt's command line management tools. - + ''' location_pattern = '^/(?P[^/]+)(?P/.+)$' @@ -55,15 +55,15 @@ class KvmPlusSshWriteExtension(morphlib.writeexts.WriteExtension): def process_args(self, args): if len(args) != 2: raise cliapp.AppException('Wrong number of command line args') - + temp_root, location = args ssh_host, vm_name, vm_path = self.parse_location(location) autostart = self.get_environment_boolean('AUTOSTART') - + fd, raw_disk = tempfile.mkstemp() os.close(fd) self.create_local_system(temp_root, raw_disk) - + try: self.transfer(raw_disk, ssh_host, vm_path) self.create_libvirt_guest(ssh_host, vm_name, vm_path, autostart) @@ -105,7 +105,7 @@ class KvmPlusSshWriteExtension(morphlib.writeexts.WriteExtension): def create_libvirt_guest(self, ssh_host, vm_name, vm_path, autostart): '''Create the libvirt virtual machine.''' - + self.status(msg='Creating libvirt/kvm virtual machine') attach_disks = self.parse_attach_disks() @@ -135,4 +135,3 @@ class KvmPlusSshWriteExtension(morphlib.writeexts.WriteExtension): ['virsh', '--connect', 'qemu:///system', 'autostart', vm_name]) KvmPlusSshWriteExtension().run() - -- cgit v1.2.1