diff --git a/planetstack/openstack_observer/ceilometer.py b/planetstack/openstack_observer/ceilometer.py
index f93dc1a..ccdfb23 100644
--- a/planetstack/openstack_observer/ceilometer.py
+++ b/planetstack/openstack_observer/ceilometer.py
@@ -11,16 +11,16 @@
 from core.models import *
 
 def object_to_filter(model_name, pk):
-	filter_dict = {
-		'Slice':[Slice, 'tenant_id', 'project_id'],
-		'Sliver':[Sliver, 'instance_id', 'resource_id'],
-		'Site':[Site, 'tenant_id', 'project_id']
-	}
-	
-	mod,field,tag = filter_dict[model_name]
-	obj = mod.objects.get(pk=pk)
-	return '%s=%s'%(tag,mod[field])
-	
+    filter_dict = {
+            'Slice':[Slice, 'tenant_id', 'project_id'],
+            'Sliver':[Sliver, 'instance_id', 'resource_id'],
+            'Site':[Site, 'tenant_id', 'project_id']
+    }
+
+    mod,field,tag = filter_dict[model_name]
+    obj = mod.objects.get(pk=pk)
+    return '%s=%s'%(tag,mod[field])
+
 
 def cli_to_array(cli_query):
     '''This converts from the cli list of queries to what is required
@@ -78,8 +78,8 @@
 
     stats.average/=len(meters)
     return stats
-        
-                
+
+
 
 class CeilometerDriver(MonitorDriver):
     def get_meter(self, meter, obj, pk, keystone=None):
@@ -95,14 +95,14 @@
         token = ceilometer_client.auth_token
 
         ceilo_endpoint = client._get_endpoint(ceilometer_client, **keystone)
-	#ceilometer = client.get_client(2, username=keystone['username'], password=keystone['password'], tenant_name=keystone['tenant_name'], auth_url=keystone['auth_url'])
+            #ceilometer = client.get_client(2, username=keystone['username'], password=keystone['password'], tenant_name=keystone['tenant_name'], auth_url=keystone['auth_url'])
 
         ceilometer = client.Client('2',endpoint = ceilo_endpoint, token = lambda: token)
 
         cur_ts = datetime.datetime.fromtimestamp(time.time()-86400)
         str_ts = cur_ts.strftime('%Y-%m-%dT%H:%M:%S')
-        
-		object_filter = object_to_filter(obj, pk)
+
+            object_filter = object_to_filter(obj, pk)
         filter=';'.join([object_filter,'timestamp>%s'%str_ts])
         #query = cli_to_array("project_id=124de34266b24f57957345cdb43cc9ff;timestamp>2014-12-11T00:00:00")
         query = cli_to_array(filter)
@@ -111,4 +111,3 @@
 
         stats = meters_to_stats(meters)
         return stats
-
