mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-10-10 17:19:51 +00:00
PEP8 fixes
This commit is contained in:
parent
2e5d291b9c
commit
51a3e488e3
9 changed files with 14 additions and 18 deletions
|
@ -1 +0,0 @@
|
|||
from exceptions import *
|
|
@ -70,6 +70,7 @@ def config_get(path, config_path):
|
|||
config = config.get(key)
|
||||
return config
|
||||
|
||||
|
||||
def copy_tree(from_path, to_path):
|
||||
from shutil import copy
|
||||
import os
|
||||
|
@ -86,4 +87,3 @@ def copy_tree(from_path,to_path):
|
|||
for path in files:
|
||||
copy(os.path.join(abs_prefix, path),
|
||||
os.path.join(to_path, prefix, path))
|
||||
|
||||
|
|
|
@ -14,9 +14,7 @@ def resolve_tasks(taskset, manifest):
|
|||
if manifest.system['release'] in ['wheezy', 'stable']:
|
||||
taskset.add(tasks.AddBackports)
|
||||
|
||||
taskset.update([ tasks.SetMetadataSource,
|
||||
tasks.AddCloudInitPackages,
|
||||
])
|
||||
taskset.update([tasks.SetMetadataSource, tasks.AddCloudInitPackages])
|
||||
|
||||
options = manifest.plugins['cloud_init']
|
||||
if 'username' in options:
|
||||
|
|
|
@ -5,4 +5,3 @@ def resolve_tasks(taskset, manifest):
|
|||
if manifest.system['release'] in ['wheezy', 'stable']:
|
||||
taskset.add(tasks.AddBackports)
|
||||
taskset.update([tasks.AddONEContextPackage])
|
||||
|
||||
|
|
|
@ -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):
|
||||
|
@ -18,6 +17,7 @@ class AddBackports(Task):
|
|||
info.source_lists.add('backports', 'deb {apt_mirror} {system.release}-backports main')
|
||||
info.source_lists.add('backports', 'deb-src {apt_mirror} {system.release}-backports main')
|
||||
|
||||
|
||||
class AddONEContextPackage(Task):
|
||||
description = 'Adding the OpenNebula context package'
|
||||
phase = phases.preparation
|
||||
|
|
|
@ -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), '')
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue