[Kimchi-devel] [PATCH 1/3] Fix pep8 in src/kimchi/vmtemplate.py
Aline Manera
alinefm at linux.vnet.ibm.com
Tue Apr 1 18:56:11 UTC 2014
Reviewed-by: Aline Manera <alinefm at linux.vnet.ibm.com>
On 03/28/2014 06:34 PM, Rodrigo Trujillo wrote:
> Fixes minor pep8 issues
>
> Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo at linux.vnet.ibm.com>
> ---
> src/kimchi/vmtemplate.py | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/src/kimchi/vmtemplate.py b/src/kimchi/vmtemplate.py
> index 26f7d89..d127cec 100644
> --- a/src/kimchi/vmtemplate.py
> +++ b/src/kimchi/vmtemplate.py
> @@ -15,7 +15,7 @@
> #
> # You should have received a copy of the GNU Lesser General Public
> # License along with this library; if not, write to the Free Software
> -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
> +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
>
> import os
> import string
> @@ -33,6 +33,7 @@ from lxml.builder import E
>
> QEMU_NAMESPACE = "xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'"
>
> +
> class VMTemplate(object):
> _bus_to_dev = {'ide': 'hd', 'virtio': 'vd', 'scsi': 'sd'}
>
> @@ -152,7 +153,8 @@ class VMTemplate(object):
> dev = "%s%s" % (self._bus_to_dev[self.info['disk_bus']],
> string.lowercase[index])
> fmt = 'raw' if self._get_storage_type() in ['logical'] else 'qcow2'
> - params = {'src': src, 'dev': dev, 'bus': self.info['disk_bus'], 'type': fmt}
> + params = {'src': src, 'dev': dev, 'bus': self.info['disk_bus'],
> + 'type': fmt}
> ret += """
> <disk type='file' device='disk'>
> <driver name='qemu' type='%(type)s' cache='none'/>
> @@ -193,7 +195,7 @@ class VMTemplate(object):
> <target dev='%(dev)s' bus='scsi'/>
> </disk>"""
> if not self.fc_host_support:
> - disk_xml = disk_xml.replace('volume','block')
> + disk_xml = disk_xml.replace('volume', 'block')
>
> pool = self._storage_validate()
> # Creating disk xml for each lun passed
> @@ -323,7 +325,7 @@ class VMTemplate(object):
> qemu_stream_dns)
>
> if not urlparse.urlparse(self.info['cdrom']).scheme in \
> - libvirt_stream_protocols and params.get('iso_stream', False):
> + libvirt_stream_protocols and params.get('iso_stream', False):
> params['qemu-namespace'] = QEMU_NAMESPACE
> params['qemu-stream-cmdline'] = cdrom_xml
> else:
More information about the Kimchi-devel
mailing list