diff --git a/tools/make_test_data.py b/tools/make_test_data.py index 4d2f3d818..e163eb127 100755 --- a/tools/make_test_data.py +++ b/tools/make_test_data.py @@ -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 diff --git a/tools/show_data.py b/tools/show_data.py index 1cea68eb7..d07c14e9c 100755 --- a/tools/show_data.py +++ b/tools/show_data.py @@ -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:])