fixes from review comments
This commit is contained in:
@@ -32,11 +32,9 @@ start = datetime.datetime(year=yesterday.year, month=yesterday.month, day=yester
|
||||
end = start + datetime.timedelta(hours=length-1, minutes=59, seconds=59)
|
||||
|
||||
instance_map = {} # { uuid : [request_id, request_id, ...] }
|
||||
metadata = {'raw_text': True, 'instances': instance_map}
|
||||
metadata = {'format': 'json', 'instances': instance_map}
|
||||
report = [metadata]
|
||||
|
||||
#report.append("Generating report for %s to %s" % (start, end))
|
||||
|
||||
dstart = dt.dt_to_decimal(start)
|
||||
dend = dt.dt_to_decimal(end)
|
||||
|
||||
@@ -73,11 +71,11 @@ for uuid_dict in updates:
|
||||
for req_dict in reqs:
|
||||
req = req_dict['request_id']
|
||||
|
||||
raws = list(models.RawData.objects.filter(request_id=req)\
|
||||
.exclude(event='compute.instance.exists')\
|
||||
raws = list(models.RawData.objects.filter(request_id=req)
|
||||
.exclude(event='compute.instance.exists')
|
||||
.values("id", "when", "routing_key", "old_state",
|
||||
"state", "tenant", "event", "image_type",
|
||||
"deployment")\
|
||||
"deployment")
|
||||
.order_by('when'))
|
||||
|
||||
_start = None
|
||||
|
@@ -22,9 +22,9 @@ import argparse
|
||||
import datetime
|
||||
import json
|
||||
import sys
|
||||
from os import environ
|
||||
import os
|
||||
|
||||
sys.path.append(environ.get('STACKTACH_INSTALL_DIR', '/stacktach'))
|
||||
sys.path.append(os.environ.get('STACKTACH_INSTALL_DIR', '/stacktach'))
|
||||
|
||||
from stacktach import datetime_to_decimal as dt
|
||||
from stacktach import models
|
||||
|
@@ -3,11 +3,10 @@ import datetime
|
||||
import json
|
||||
import sys
|
||||
import time
|
||||
from os import environ
|
||||
|
||||
import os
|
||||
import prettytable
|
||||
|
||||
sys.path.append(environ.get('STACKTACH_INSTALL_DIR', '/stacktach'))
|
||||
sys.path.append(os.environ.get('STACKTACH_INSTALL_DIR', '/stacktach'))
|
||||
|
||||
from stacktach import datetime_to_decimal as dt
|
||||
from stacktach import image_type
|
||||
|
Reference in New Issue
Block a user