mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-22 09:50:37 +00:00
PEP8 fixes
This commit is contained in:
parent
014e230221
commit
47997b4b13
10 changed files with 29 additions and 37 deletions
|
@ -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)
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
from exceptions import *
|
|
@ -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,
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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), '')
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
from bootstrapvz.base import Task
|
||||
from bootstrapvz.common import phases
|
||||
from bootstrapvz.common.tasks import loopback
|
||||
|
||||
|
||||
class ConvertToVhd(Task):
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue