Merge "Fix make_test_data tools script"
This commit is contained in:
commit
0d09af4533
@ -100,14 +100,14 @@ def main():
|
|||||||
root_logger.setLevel(logging.DEBUG)
|
root_logger.setLevel(logging.DEBUG)
|
||||||
|
|
||||||
# Connect to the metering database
|
# 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
|
# Find the user and/or project for a real resource
|
||||||
if not (args.user or args.project):
|
if not (args.user or args.project):
|
||||||
for r in conn.get_resources():
|
for r in conn.get_resources():
|
||||||
if r['resource_id'] == args.resource:
|
if r.resource_id == args.resource:
|
||||||
args.user = r['user_id']
|
args.user = r.user_id
|
||||||
args.project = r['project_id']
|
args.project = r.project_id
|
||||||
break
|
break
|
||||||
|
|
||||||
# Compute start and end timestamps for the
|
# Compute start and end timestamps for the
|
||||||
|
@ -118,7 +118,7 @@ def main(argv):
|
|||||||
#ceilometer collector by default.
|
#ceilometer collector by default.
|
||||||
default_config_files=['/etc/ceilometer/ceilometer.conf'],
|
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'
|
command = extra_args[0] if extra_args else 'help'
|
||||||
COMMANDS[command](db, extra_args[1:])
|
COMMANDS[command](db, extra_args[1:])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user