Cleanup isle 10

This commit is contained in:
Joshua Harlow 2012-02-15 15:50:24 -08:00
parent accf5cde0e
commit fb715c294e
3 changed files with 5 additions and 4 deletions

View File

@ -171,11 +171,11 @@ class StackConfigParser(IgnoreMissingConfigParser):
#form the dsn (from components we have...)
#dsn = "<driver>://<username>:<password>@<host>:<port>/<database>"
if not host:
msg = "Unable to fetch a database dsn - no host found"
msg = "Unable to fetch a database dsn - no sql host found"
raise excp.BadParamException(msg)
driver = self.get("db", "type")
if not driver:
msg = "Unable to fetch a database dsn - no driver type found"
msg = "Unable to fetch a database dsn - no db driver type found"
raise excp.BadParamException(msg)
dsn = driver + "://"
if user:
@ -203,6 +203,7 @@ def add_header(fn, contents):
lines.append("# On %s" % (date.rcf8222date()))
lines.append("# By user %s, group %s" % (sh.getuser(), sh.getgroupname()))
lines.append("# Comments may have been removed (TODO: darn python config writer)")
# TODO Maybe use https://code.google.com/p/iniparse/ which seems to preserve comments!
lines.append("")
if contents:
lines.append(contents)

View File

@ -754,7 +754,7 @@ class NovaConfConfigurator(object):
nova_conf.add('flat_interface', xs_flat_ifc)
nova_conf.add('firewall_driver', self._getstr('xs_firewall_driver'))
nova_conf.add('flat_network_bridge', self._getstr('xs_flat_network_bridge'))
elif drive_canon == 'libvirt':
elif drive_canon == virsh.VIRT_TYPE:
nova_conf.add('connection_type', 'libvirt')
nova_conf.add('firewall_driver', self._getstr('libvirt_firewall_driver'))
nova_conf.add('flat_network_bridge', self._getstr('flat_network_bridge'))

View File

@ -3,7 +3,7 @@ import os
import sys
#useful for running like the following
#find conf/ | grep ".json\$" | xargs python utils/list-pkgs.py "rhel-6"
#find conf/ | grep ".json\$" | xargs python tools/list_pkgs.py "rhel-6"
VER_LEN = 10
MAX_SUB_SEGMENTS = 2