Move volume imports in fs/__init__

This commit is contained in:
Anders Ingemann 2014-04-07 21:45:45 +02:00
parent 399dfa3fa0
commit 1371f639ac

View file

@ -9,10 +9,6 @@ def load_volume(data, bootloader):
Returns: Returns:
Volume. The volume that represents all information pertaining to the volume we bootstrap on Volume. The volume that represents all information pertaining to the volume we bootstrap on
""" """
from bootstrapvz.common.fs.loopbackvolume import LoopbackVolume
from bootstrapvz.providers.ec2.ebsvolume import EBSVolume
from bootstrapvz.common.fs.virtualdiskimage import VirtualDiskImage
from bootstrapvz.common.fs.virtualmachinedisk import VirtualMachineDisk
# Create a mapping between valid partition maps in the manifest and their corresponding classes # Create a mapping between valid partition maps in the manifest and their corresponding classes
from partitionmaps.gpt import GPTPartitionMap from partitionmaps.gpt import GPTPartitionMap
from partitionmaps.msdos import MSDOSPartitionMap from partitionmaps.msdos import MSDOSPartitionMap
@ -23,7 +19,12 @@ def load_volume(data, bootloader):
} }
# Instantiate the partition map # Instantiate the partition map
partition_map = partition_maps.get(data['partitions']['type'])(data['partitions'], bootloader) partition_map = partition_maps.get(data['partitions']['type'])(data['partitions'], bootloader)
# Create a mapping between valid volume backings in the manifest and their corresponding classes # Create a mapping between valid volume backings in the manifest and their corresponding classes
from bootstrapvz.common.fs.loopbackvolume import LoopbackVolume
from bootstrapvz.providers.ec2.ebsvolume import EBSVolume
from bootstrapvz.common.fs.virtualdiskimage import VirtualDiskImage
from bootstrapvz.common.fs.virtualmachinedisk import VirtualMachineDisk
volume_backings = {'raw': LoopbackVolume, volume_backings = {'raw': LoopbackVolume,
's3': LoopbackVolume, 's3': LoopbackVolume,
'vdi': VirtualDiskImage, 'vdi': VirtualDiskImage,