Fix make_test_data tools script
Method get_connection has been renamed to get_connection_from_config. Resource is object not dictionary, so attributes needs to be accessed that way. Change-Id: I19e09f3e9077d3346b4361fa6975a3e696e2e765 Related-Bug: #1349791
This commit is contained in:
parent
670736a2b6
commit
db04f196bd
@ -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
|
||||
|
@ -117,7 +117,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:])
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user