PEP8 fixes

This commit is contained in:
Tiago Ilieve 2014-04-27 11:05:53 -03:00
parent 014e230221
commit 47997b4b13
10 changed files with 29 additions and 37 deletions

View file

@ -31,5 +31,5 @@ def load_volume(data, bootloader):
'vmdk': VirtualMachineDisk,
'ebs': EBSVolume
}
# Create the volume with the partition map as an argument
# Create the volume with the partition map as an argument
return volume_backings.get(data['backing'])(partition_map)

View file

@ -1 +0,0 @@
from exceptions import *

View file

@ -144,10 +144,10 @@ class FStab(Task):
import os.path
p_map = info.volume.partition_map
mount_points = [{'path': '/',
'partition': p_map.root,
'dump': '1',
'pass_num': '1',
}]
'partition': p_map.root,
'dump': '1',
'pass_num': '1',
}]
if hasattr(p_map, 'boot'):
mount_points.append({'path': '/boot',
'partition': p_map.boot,

View file

@ -52,9 +52,8 @@ class SetUsername(Task):
class SetMetadataSource(Task):
description = 'Setting metadata source'
#phase = phases.system_modification
phase = phases.package_installation
successors = [apt.AptUpdate]
successors = [apt.AptUpdate]
@classmethod
def run(cls, info):

View file

@ -1,7 +1,6 @@
from bootstrapvz.base import Task
from bootstrapvz.common.tasks import apt
from bootstrapvz.common import phases
import os
class AddBackports(Task):

View file

@ -2,6 +2,7 @@ from bootstrapvz.base import Task
from bootstrapvz.common import phases
from bootstrapvz.common.tasks import apt
from bootstrapvz.common.tasks import network
from bootstrapvz.common.tools import sed_i
import os
@ -82,7 +83,6 @@ class ApplyPuppetManifest(Task):
'puppet', 'apply', manifest_path])
os.remove(manifest_dst)
from bootstrapvz.common.tools import sed_i
hosts_path = os.path.join(info.root, 'etc/hosts')
sed_i(hosts_path, '127.0.0.1\s*{hostname}\n?'.format(hostname=hostname), '')

View file

@ -10,7 +10,6 @@ def validate_manifest(data, validator, error):
def resolve_tasks(taskset, manifest):
from bootstrapvz.common.tasks import security
from bootstrapvz.common.tasks import loopback
from bootstrapvz.common.tasks import network
taskset.discard(security.DisableSSHPasswordAuthentication)
taskset.discard(loopback.MoveImage)

View file

@ -45,18 +45,18 @@ def resolve_tasks(taskset, manifest):
taskset.add(network.RemoveHostname)
taskset.update([tasks.packages.DefaultPackages,
loopback.Create,
security.EnableShadowConfig,
network.RemoveDNSInfo,
network.ConfigureNetworkIF,
initd.AddSSHKeyGeneration,
initd.InstallInitScripts,
tasks.packages.Waagent,
tasks.boot.ConfigureGrub,
cleanup.ClearMOTD,
cleanup.CleanTMP,
tasks.image.ConvertToVhd,
])
loopback.Create,
security.EnableShadowConfig,
network.RemoveDNSInfo,
network.ConfigureNetworkIF,
initd.AddSSHKeyGeneration,
initd.InstallInitScripts,
tasks.packages.Waagent,
tasks.boot.ConfigureGrub,
cleanup.ClearMOTD,
cleanup.CleanTMP,
tasks.image.ConvertToVhd,
])
if manifest.bootstrapper.get('tarball', False):
taskset.add(bootstrap.MakeTarball)

View file

@ -1,6 +1,5 @@
from bootstrapvz.base import Task
from bootstrapvz.common import phases
from bootstrapvz.common.tasks import loopback
class ConvertToVhd(Task):

View file

@ -43,19 +43,16 @@ def resolve_tasks(taskset, manifest):
taskset.add(network.RemoveHostname)
taskset.update([tasks.packages.DefaultPackages,
loopback.Create,
security.EnableShadowConfig,
network.RemoveDNSInfo,
network.ConfigureNetworkIF,
initd.AddSSHKeyGeneration,
initd.InstallInitScripts,
cleanup.ClearMOTD,
cleanup.CleanTMP,
loopback.MoveImage,
])
loopback.Create,
security.EnableShadowConfig,
network.RemoveDNSInfo,
network.ConfigureNetworkIF,
initd.AddSSHKeyGeneration,
initd.InstallInitScripts,
cleanup.ClearMOTD,
cleanup.CleanTMP,
loopback.MoveImage,
])
if manifest.bootstrapper.get('tarball', False):
taskset.add(bootstrap.MakeTarball)