Code Changes includes:
 1.Sychronizer for ceilometer service.
 2.Added files:
   i.xos/synchronizer/steps/sync_ceilometerservice.py(Ceilometer sychronizer )
   ii.xos/synchronizer/steps/sync_ceilometerservice.yaml(Ansible yaml file which will be run as part of sychronizer)
   iii.xos/synchronizer/templates/update-keystone-endpoints.py.j2 (to change endpoints in keystone)
 3.Modified init script of ceilometer service image for starting pub-sub module
 4. [api] default_api_return_limit = 1000 in README and ceilometer.conf.j2 for both mitaka-v2 and mitaka-v3

Change-Id: I2ab935c2fc507a00729d14cf87bae81990b75ed9
diff --git a/xos/synchronizer/steps/sync_ceilometerservice.py b/xos/synchronizer/steps/sync_ceilometerservice.py
new file mode 100644
index 0000000..298e9d7
--- /dev/null
+++ b/xos/synchronizer/steps/sync_ceilometerservice.py
@@ -0,0 +1,69 @@
+import hashlib
+import os
+import socket
+import sys
+import base64
+import time
+#import threading
+import subprocess
+import random
+import tempfile
+#from sshtunnel import SSHTunnelForwarder
+from django.db.models import F, Q
+from xos.config import Config
+from synchronizers.base.syncstep import SyncStep
+from synchronizers.base.ansible import run_template_ssh
+from synchronizers.base.SyncInstanceUsingAnsible import SyncInstanceUsingAnsible
+from core.models import Service, Slice
+from services.monitoring.models import CeilometerService, MonitoringChannel
+from xos.logger import Logger, logging
+
+parentdir = os.path.join(os.path.dirname(__file__),"..")
+sys.path.insert(0,parentdir)
+
+logger = Logger(level=logging.INFO)
+
+class SyncCeilometerService(SyncInstanceUsingAnsible):
+    provides=[CeilometerService]
+    observes=CeilometerService
+    requested_interval=0
+    template_name = "sync_ceilometerservice.yaml"
+    service_key_name = "/opt/xos/synchronizers/monitoring/monitoring_channel_private_key"
+
+    def __init__(self, *args, **kwargs):
+        super(SyncCeilometerService, self).__init__(*args, **kwargs)
+
+    def fetch_pending(self, deleted):
+        if (not deleted):
+            objs = CeilometerService.get_service_objects().filter(Q(enacted__lt=F('updated')) | Q(enacted=None),Q(lazy_blocked=False))
+        else:
+            objs = CeilometerService.get_deleted_service_objects()
+
+        return objs
+
+    def get_instance(self, o):
+        return o.get_instance()
+
+    def get_extra_attributes(self, o):
+        fields={}
+        fields["instance_hostname"] = o.get_instance().instance_name.replace("_","-")
+        #fields = {"instance_hostname": o.get_instance().instance_name.replace("_","-"),
+        #          "instance_ip": o.get_instance().private_ip()}
+
+
+        return fields
+
+    def sync_fields(self, o, fields):
+        # the super causes the playbook to be run
+        super(SyncCeilometerService, self).sync_fields(o, fields)
+
+    def run_playbook(self, o, fields):
+        instance = self.get_instance(o)
+        #if (instance.isolation=="container"):
+            # If the instance is already a container, then we don't need to
+            # install ONOS.
+        #    return
+        super(SyncCeilometerService,self).run_playbook(o, fields)
+
+    def delete_record(self, m):
+        pass