Merge "Fix make_test_data tools script"

This commit is contained in:
Jenkins 2014-08-06 14:01:01 +00:00 committed by Gerrit Code Review
commit 0d09af4533
2 changed files with 5 additions and 5 deletions

View File

@ -100,14 +100,14 @@ def main():
root_logger.setLevel(logging.DEBUG)
# Connect to the metering database
conn = storage.get_connection(cfg.CONF)
conn = storage.get_connection_from_config(cfg.CONF)
# Find the user and/or project for a real resource
if not (args.user or args.project):
for r in conn.get_resources():
if r['resource_id'] == args.resource:
args.user = r['user_id']
args.project = r['project_id']
if r.resource_id == args.resource:
args.user = r.user_id
args.project = r.project_id
break
# Compute start and end timestamps for the

View File

@ -118,7 +118,7 @@ def main(argv):
#ceilometer collector by default.
default_config_files=['/etc/ceilometer/ceilometer.conf'],
)
db = storage.get_connection(cfg.CONF)
db = storage.get_connection_from_config(cfg.CONF)
command = extra_args[0] if extra_args else 'help'
COMMANDS[command](db, extra_args[1:])