trunk merge with migration renumbering

This commit is contained in:
Trey Morris
2011-06-30 14:20:59 -05:00
3 changed files with 13 additions and 2 deletions

View File

@@ -1338,7 +1338,7 @@ def zone_create(context, values):
def zone_update(context, zone_id, values):
"""Update a child Zone entry."""
return IMPL.zone_update(context, values)
return IMPL.zone_update(context, zone_id, values)
def zone_delete(context, zone_id):

View File

@@ -3042,7 +3042,7 @@ def zone_update(context, zone_id, values):
if not zone:
raise exception.ZoneNotFound(zone_id=zone_id)
zone.update(values)
zone.save()
zone.save(session=session)
return zone

View File

@@ -764,6 +764,17 @@ def is_uuid_like(val):
return (len(val) == 36) and (val.count('-') == 4)
def bool_from_str(val):
"""Convert a string representation of a bool into a bool value"""
if not val:
return False
try:
return True if int(val) else False
except ValueError:
return val.lower() == 'true'
class Bootstrapper(object):
"""Provides environment bootstrapping capabilities for entry points."""