Skip to content

Commit

Permalink
Merge "Fix issue with retrieving the db usage info in analytics-api" …
Browse files Browse the repository at this point in the history
…into R3.1
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Aug 18, 2016
2 parents dee138b + 0ec8bf7 commit 3701277
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/opserver/analytics_db.py
Expand Up @@ -411,14 +411,14 @@ def get_dbusage_info(self, ip, port, user, password):
uve_url = "http://" + ip + ":" + str(port) + \
"/analytics/uves/database-nodes?cfilt=DatabaseUsageInfo"
data = OpServerUtils.get_url_http(uve_url, user, password)
node_dburls = json.loads(data)
node_dburls = json.loads(data.text)

for node_dburl in node_dburls:
# calculate disk usage percentage for analytics in each
# cassandra node
db_uve_data = OpServerUtils.get_url_http(node_dburl['href'],
user, password)
db_uve_state = json.loads(db_uve_data)
db_uve_state = json.loads(db_uve_data.text)
db_usage_in_perc = (100*
float(db_uve_state['DatabaseUsageInfo']['database_usage'][0]['analytics_db_size_1k'])/
float(db_uve_state['DatabaseUsageInfo']['database_usage'][0]['disk_space_available_1k'] +
Expand Down

0 comments on commit 3701277

Please sign in to comment.