From 0ce533e0e194741b6ade7eed12c107628d0e6d3d Mon Sep 17 00:00:00 2001 From: Craig Vyvial Date: Thu, 24 May 2012 13:16:08 -0500 Subject: fixing issue with db.volume_update not returning the volume_ref fixes bug #1003664 - changed the sqlalchemy db api code to return the volume_ref from the volume_update method. This was causing the volume notifications to have the incorrect information in the payload. - Fixed up the unit tests because they started failing badly. - fixed the volume-usage-audit reading the default config values - fix hacking issue with volume-usage-audit Change-Id: Iba5634b0c351a6cc0c48b697217a6f85533de93e --- bin/volume-usage-audit | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'bin') diff --git a/bin/volume-usage-audit b/bin/volume-usage-audit index d8591557c..0329d184e 100755 --- a/bin/volume-usage-audit +++ b/bin/volume-usage-audit @@ -57,15 +57,14 @@ from nova import flags from nova import log as logging from nova import rpc from nova import utils -import nova.volume.utils - +from nova.volume import utils as volume_utils FLAGS = flags.FLAGS if __name__ == '__main__': rpc.register_opts(FLAGS) admin_context = context.get_admin_context() - utils.default_flagfile() + utils.default_cfgfile() flags.FLAGS(sys.argv) logging.setup() begin, end = utils.last_completed_audit_period() @@ -77,7 +76,7 @@ if __name__ == '__main__': print "Found %d volumes" % len(volumes) for volume_ref in volumes: try: - nova.volume.utils.notify_usage_exists( + volume_utils.notify_usage_exists( admin_context, volume_ref) except Exception, e: print traceback.format_exc(e) -- cgit