summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSalvatore Orlando <salvatore.orlando@eu.citrix.com>2011-03-14 14:52:19 +0000
committerSalvatore Orlando <salvatore.orlando@eu.citrix.com>2011-03-14 14:52:19 +0000
commite2aed1036c0fb61a2924ffa28d66f87539d43ba1 (patch)
tree418a85cdb750c8916cbf859cc09b597c4b972a3c
parent68dae00b7b1580c4b816058f748b272fe5e07c64 (diff)
Fixed pep8 errors
-rw-r--r--nova/tests/db/fakes.py2
-rw-r--r--nova/tests/test_xenapi.py6
-rw-r--r--nova/virt/xenapi/vm_utils.py8
-rw-r--r--nova/virt/xenapi/vmops.py4
4 files changed, 10 insertions, 10 deletions
diff --git a/nova/tests/db/fakes.py b/nova/tests/db/fakes.py
index 142f6b1c6..22a60e012 100644
--- a/nova/tests/db/fakes.py
+++ b/nova/tests/db/fakes.py
@@ -77,7 +77,7 @@ def stub_out_db_instance_api(stubs):
'mac_address': values['mac_address'],
'vcpus': type_data['vcpus'],
'local_gb': type_data['local_gb'],
- 'os_type': values['os_type']
+ 'os_type': values['os_type'],
}
return FakeModel(base_options)
diff --git a/nova/tests/test_xenapi.py b/nova/tests/test_xenapi.py
index 60ef39cbb..7119f3078 100644
--- a/nova/tests/test_xenapi.py
+++ b/nova/tests/test_xenapi.py
@@ -78,7 +78,7 @@ class XenAPIVolumeTestCase(test.TestCase):
'ramdisk_id': 3,
'instance_type': 'm1.large',
'mac_address': 'aa:bb:cc:dd:ee:ff',
- 'os_type': 'linux'
+ 'os_type': 'linux',
}
def _create_volume(self, size='0'):
@@ -328,7 +328,7 @@ class XenAPIVMTestCase(test.TestCase):
'ramdisk_id': ramdisk_id,
'instance_type': instance_type,
'mac_address': 'aa:bb:cc:dd:ee:ff',
- 'os_type': os_type
+ 'os_type': os_type,
}
conn = xenapi_conn.get_connection(False)
instance = db.instance_create(values)
@@ -473,7 +473,7 @@ class XenAPIMigrateInstance(test.TestCase):
'ramdisk_id': None,
'instance_type': 'm1.large',
'mac_address': 'aa:bb:cc:dd:ee:ff',
- 'os_type': 'linux'
+ 'os_type': 'linux',
}
stubs.stub_out_migration_methods(self.stubs)
glance_stubs.stubout_glance_client(self.stubs,
diff --git a/nova/virt/xenapi/vm_utils.py b/nova/virt/xenapi/vm_utils.py
index 53e402dd2..1dad29736 100644
--- a/nova/virt/xenapi/vm_utils.py
+++ b/nova/virt/xenapi/vm_utils.py
@@ -138,7 +138,7 @@ class VMHelper(HelperBase):
'VCPUs_at_startup': vcpus,
'VCPUs_max': vcpus,
'VCPUs_params': {},
- 'xenstore_data': {}
+ 'xenstore_data': {},
}
# Complete VM configuration record according to the image type
@@ -465,14 +465,14 @@ class VMHelper(HelperBase):
vdi_size += MBR_SIZE_BYTES
name_label = get_name_label_for_image(image)
- vdi_ref = cls.create_vdi(session, sr_ref, name_label,
+ vdi_ref = cls.create_vdi(session, sr_ref, name_label,
vdi_size, False)
-
+
with_vdi_attached_here(session, vdi_ref, False,
lambda dev:
_stream_disk(dev, image_type,
virtual_size, image_file))
- if image_type in (ImageType.KERNEL,ImageType.RAMDISK):
+ if image_type in (ImageType.KERNEL, ImageType.RAMDISK):
#we need to invoke a plugin for copying VDI's
#content into proper path
LOG.debug(_("Copying VDI %s to /boot/guest on dom0"), vdi_ref)
diff --git a/nova/virt/xenapi/vmops.py b/nova/virt/xenapi/vmops.py
index 8489a7216..58ffff8fb 100644
--- a/nova/virt/xenapi/vmops.py
+++ b/nova/virt/xenapi/vmops.py
@@ -164,8 +164,8 @@ class VMOps(object):
use_pv_kernel = VMHelper.determine_is_pv(self._session, instance.id,
vdi_ref, disk_image_type, instance.os_type)
try:
- vm_ref = VMHelper.create_vm(self._session, instance, kernel, ramdisk,
- use_pv_kernel)
+ vm_ref = VMHelper.create_vm(self._session, instance,
+ kernel, ramdisk, use_pv_kernel)
except BaseException as vm_create_error:
# if the spwan process fails here it will be necessary to
# clean up kernel and ramdisk (VDIs and files in dom0)