diff --git a/xos/configurations/cord/ceilometer_pub_sub.tar.gz b/xos/configurations/cord/ceilometer_pub_sub.tar.gz
new file mode 100644
index 0000000..eb88a2b
--- /dev/null
+++ b/xos/configurations/cord/ceilometer_pub_sub.tar.gz
Binary files differ
diff --git a/xos/configurations/cord/cord.yaml b/xos/configurations/cord/cord.yaml
index 2a61cf9..5d95d7a 100644
--- a/xos/configurations/cord/cord.yaml
+++ b/xos/configurations/cord/cord.yaml
@@ -262,7 +262,7 @@
               node: mysite
               relationship: tosca.relationships.MemberOfSite
           - vcpe_docker_image:
-              node: andybavier/docker-vcpe
+              node: docker-vcpe
               relationship: tosca.relationships.UsesImage
       properties:
           default_isolation: container
@@ -429,13 +429,14 @@
                 relationship: tosca.relationships.MemberOfSlice
 
     # docker image for vcpe containers
-    andybavier/docker-vcpe:
+    docker-vcpe:
       # TODO: need to attach this to mydeployment
       type: tosca.nodes.Image
       properties:
         kind: container
         container_format: na
         disk_format: na
+        path: andybavier/docker-vcpe
 
     # A subscriber
     My House:
diff --git a/xos/configurations/cord/install_ceilometer_patch.sh b/xos/configurations/cord/install_ceilometer_patch.sh
index d6b4056..77aa05b 100755
--- a/xos/configurations/cord/install_ceilometer_patch.sh
+++ b/xos/configurations/cord/install_ceilometer_patch.sh
@@ -3,9 +3,9 @@
     exit 0
 fi
 echo "Verifying if all the required files are present"
-if [ ! -f openstack_ceilometer_patch.tar.gz ];
+if [ ! -f openstack_ceilometer_patch.tar.gz ] || [ ! -f ceilometer_pub_sub.tar.gz ];
 then
-    echo "File openstack_ceilometer_patch.tar.gz not found"
+    echo "File openstack_ceilometer_patch.tar.gz or ceilometer_pub_sub.tar.gz not found"
     exit 1
 fi
 echo "Copying the ceilometer patch files to /usr/lib/python2.7/dist-packages/ceilometer"
@@ -20,3 +20,7 @@
 sudo service ceilometer-agent-notification restart
 echo "Restarting ceilometer-agent-central"
 sudo service ceilometer-agent-central restart
+tar -xzf ceilometer_pub_sub.tar.gz
+echo "Starting Ceilometer PUB/SUB service"
+cd ceilometer_pub_sub
+python sub_main.py &
diff --git a/xos/core/admin.py b/xos/core/admin.py
index e41ad1d..03f8c83 100644
--- a/xos/core/admin.py
+++ b/xos/core/admin.py
@@ -1206,7 +1206,7 @@
 class ImageAdmin(XOSBaseAdmin):
 
     fieldsets = [('Image Details',
-                   {'fields': ['backend_status_text', 'name', 'kind', 'disk_format', 'container_format'],
+                   {'fields': ['backend_status_text', 'name', 'kind', 'disk_format', 'container_format', 'tag', 'path'],
                     'classes': ['suit-tab suit-tab-general']})
                ]
     readonly_fields = ('backend_status_text', )
@@ -1215,7 +1215,7 @@
 
     inlines = [InstanceInline, ControllerImagesInline]
 
-    user_readonly_fields = ['name', 'disk_format', 'container_format']
+    user_readonly_fields = ['name', 'disk_format', 'container_format', 'tag', 'path']
 
     list_display = ['backend_status_icon', 'name', 'kind']
     list_display_links = ('backend_status_icon', 'name', )
diff --git a/xos/core/models/image.py b/xos/core/models/image.py
index 1a3cbf7..69d0f03 100644
--- a/xos/core/models/image.py
+++ b/xos/core/models/image.py
@@ -16,6 +16,8 @@
     path = StrippedCharField(max_length=256, null=True, blank=True, help_text="Path to image on local disk")
     deployments = models.ManyToManyField('Deployment', through='ImageDeployments', blank=True, help_text="Select which images should be instantiated on this deployment", related_name='images')
 
+    tag = StrippedCharField(max_length=256, null=True, blank=True, help_text="For Docker Images, tag of image")
+
     def __unicode__(self):  return u'%s' % (self.name)
 
 class ImageDeployments(PlCoreBase):
diff --git a/xos/core/models/service.py b/xos/core/models/service.py
index 135dce9..7cf2a6b 100644
--- a/xos/core/models/service.py
+++ b/xos/core/models/service.py
@@ -519,7 +519,7 @@
                      "trusty-server-multi-nic", # CloudLab
                     ]
 
-    LOOK_FOR_CONTAINER_IMAGES=["andybavier/docker-vcpe"]
+    LOOK_FOR_CONTAINER_IMAGES=["docker-vcpe"]
 
     class Meta:
         proxy = True
@@ -599,14 +599,6 @@
 
         raise XOSProgrammingError("No VPCE image (looked for %s)" % str(look_for_images))
 
-    @creator.setter
-    def creator(self, value):
-        if value:
-            value = value.id
-        if (value != self.get_attribute("creator_id", None)):
-            self.cached_creator=None
-        self.set_attribute("creator_id", value)
-
     def save_instance(self, instance):
         # Override this function to do custom pre-save or post-save processing,
         # such as creating ports for containers.
@@ -694,6 +686,11 @@
                 self.instance.delete()
             self.instance = None
 
+    def save(self, *args, **kwargs):
+        if (not self.creator) and (hasattr(self, "caller")) and (self.caller):
+            self.creator = self.caller
+        super(TenantWithContainer, self).save(*args, **kwargs)
+
 class CoarseTenant(Tenant):
     """ TODO: rename "CoarseTenant" --> "StaticTenant" """
     class Meta:
diff --git a/xos/core/xoslib/methods/ceilometerview.py b/xos/core/xoslib/methods/ceilometerview.py
index d02e716..5e0ac35 100644
--- a/xos/core/xoslib/methods/ceilometerview.py
+++ b/xos/core/xoslib/methods/ceilometerview.py
@@ -152,6 +152,23 @@
     else:
         return list(set(a) - set(b))
 
+def get_resource_map(request, ceilometer_url):
+    resource_map = {}
+    try:
+        resources = resource_list(request, ceilometer_url=ceilometer_url)
+        for r in resources:
+            if 'display_name' in r['metadata']:
+                name = r['metadata']['display_name']
+            elif 'name' in r['metadata']:
+                name = r['metadata']['name']
+            else:
+                name = r['resource_id']
+            resource_map[r['resource_id']] = name
+    except requests.exceptions.RequestException as e:
+        raise e
+
+    return resource_map
+
 class Meters(object):
     """Class for listing of available meters.
 
@@ -163,11 +180,12 @@
 
     """
 
-    def __init__(self, request=None, ceilometer_meter_list=None, ceilometer_url=None, tenant_map=None):
+    def __init__(self, request=None, ceilometer_meter_list=None, ceilometer_url=None, tenant_map=None, resource_map=None):
         # Storing the request.
         self._request = request
         self.ceilometer_url = ceilometer_url
         self.tenant_map = tenant_map
+        self.resource_map = resource_map
 
         # Storing the Ceilometer meter list
         if ceilometer_meter_list:
@@ -382,21 +400,23 @@
                 if meter_info:
                     label = meter_info["label"]
                     description = meter_info["description"]
-                    meter_type = meter_info["type"]
+                    meter_category = meter_info["type"]
                 else:
                     label = ""
                     description = ""
-                    meter_type = "Other"
+                    meter_category = "Other"
                 for meter in meter_candidates:
                     meter["label"] = label
                     meter["description"] = description
-                    meter["type"] = meter_type
+                    meter["category"] = meter_category
                     if meter["project_id"] in self.tenant_map.keys():
                         meter["slice"] = self.tenant_map[meter["project_id"]]["slice"]
                         meter["service"] = self.tenant_map[meter["project_id"]]["service"]
                     else:
                         meter["slice"] = meter["project_id"]
                         meter["service"] = "Other"
+                    if meter["resource_id"] in self.resource_map.keys():
+                        meter["resource_name"] = self.resource_map[meter["resource_id"]]
 
                 self._cached_meters[meter_name] = meter_candidates
 
@@ -929,7 +949,8 @@
         if (not tenant_ceilometer_url):
             raise XOSMissingField("Tenant ceilometer URL is missing")
         tenant_map = getTenantControllerTenantMap(request.user)
-        meters = Meters(request, ceilometer_url=tenant_ceilometer_url, tenant_map=tenant_map)
+        resource_map = get_resource_map(request, ceilometer_url=tenant_ceilometer_url)
+        meters = Meters(request, ceilometer_url=tenant_ceilometer_url, tenant_map=tenant_map, resource_map=resource_map)
         services = {
             _('Nova'): meters.list_nova(),
             _('Neutron'): meters.list_neutron(),
@@ -997,7 +1018,8 @@
             return Response(row)
 
         #Statistics query for all meter
-        meters = Meters(request, ceilometer_url=tenant_ceilometer_url, tenant_map=tenant_map)
+        resource_map = get_resource_map(request, ceilometer_url=tenant_ceilometer_url)
+        meters = Meters(request, ceilometer_url=tenant_ceilometer_url, tenant_map=tenant_map, resource_map=resource_map)
         services = {
             _('Nova'): meters.list_nova(),
             _('Neutron'): meters.list_neutron(),
@@ -1017,11 +1039,13 @@
                 statistic = statistics[-1]
                 row = {"name": 'none',
                        "slice": meter["slice"],
+                       "project_id": meter["project_id"],
                        "service": meter["service"],
                        "resource_id": meter["resource_id"],
+                       "resource_name": meter["resource_name"],
                        "meter": meter["name"],
                        "description": meter["description"],
-                       "type": service,
+                       "category": service,
                        "time": statistic["period_end"],
                        "value": statistic["avg"],
                        "unit": meter["unit"]}
@@ -1055,3 +1079,23 @@
         samples = sample_list(request, meter_name,
                            ceilometer_url=tenant_ceilometer_url, query=query, limit=limit) 
         return Response(samples)
+
+class ServiceAdjustScale(APIView):
+    method_kind = "list"
+    method_name = "serviceadjustscale"
+
+    def get(self, request, format=None):
+        if (not request.user.is_authenticated()) or (not request.user.is_admin()):
+            raise PermissionDenied("You must be authenticated admin user in order to use this API")
+        service = request.QUERY_PARAMS.get('service', None)
+        slice_hint = request.QUERY_PARAMS.get('slice_hint', None)
+        scale = request.QUERY_PARAMS.get('scale', None)
+        if not service or not slice_hint or not scale:
+            raise XOSMissingField("Mandatory fields missing")
+        services = Service.select_by_user(request.user)
+        logger.info('SRIKANTH: Services for this user %(services)s' % {'services':services})
+        if not services or (not services.get(name=service)):
+            raise XOSMissingField("Service not found")
+        service = services.get(name=service)
+        service.adjust_scale(slice_hint, scale)
+        return Response("Success")
diff --git a/xos/core/xoslib/methods/vtn.py b/xos/core/xoslib/methods/vtn.py
index 14dd458..1a2af53 100644
--- a/xos/core/xoslib/methods/vtn.py
+++ b/xos/core/xoslib/methods/vtn.py
@@ -55,7 +55,7 @@
 
     def get_service(self, request, pk=None, service=None):
         for xos_service in Service.objects.all():
-            if service in xos_service.get_vtn_ids():
+            if service in xos_service.get_vtn_src_ids():
                 return Response(xos_service.get_vtn_dependencies_ids())
         raise DoesNotExist()
 
diff --git a/xos/observers/monitoring_channel/templates/ceilometer_proxy_server.py b/xos/observers/monitoring_channel/templates/ceilometer_proxy_server.py
index 9329cfa..62f0804 100644
--- a/xos/observers/monitoring_channel/templates/ceilometer_proxy_server.py
+++ b/xos/observers/monitoring_channel/templates/ceilometer_proxy_server.py
@@ -5,6 +5,8 @@
 import json
 from ceilometerclient import client
 import logging
+import urllib
+import urllib2
 from wsgilog import WsgiLog
 
 web.config.debug=False
@@ -49,6 +51,7 @@
     r'^/v2/meters/(?P<meter_name>[A-Za-z0-9_:.\-]+)/statistics$', 'statistics_list',
     r'^/v2/samples$', 'sample_list',
     r'^/v2/resources$', 'resource_list',
+    r'^/v2/subscribe$', 'pubsub_handler',
 )
 
 app = web.application(urls, globals())
@@ -245,5 +248,36 @@
               resources.extend(results)
         return json.dumps([ob._info for ob in resources])
 
+class pubsub_handler:
+    def POST(self):
+        global config
+        parse_ceilometer_proxy_config()
+        data_str = unicode(web.data(),'iso-8859-1')
+        post_data = json.loads(data_str)
+        final_query=[]
+        for (k,v) in config.items('allowed_tenants'):
+             query = make_query(tenant_id=k)
+             final_query.extend(query)
+        if not final_query:
+             raise Exception("Not allowed to subscribe to any meters")
+        post_data["query"] = final_query
+        #TODO: The PUB/SUB url needs to be read from config
+        put_request = urllib2.Request("http://10.11.10.1:4455/subscribe", json.dumps(post_data))
+        put_request.get_method = lambda: 'SUB'
+        put_request.add_header('Content-Type', 'application/json')
+        response = urllib2.urlopen(put_request)
+        response_text = response.read()
+        return json.dumps(response_text)
+
+    def DELETE(self):
+        data_str = web.data()
+        #TODO: The PUB/SUB url needs to be read from config
+        put_request = urllib2.Request("http://10.11.10.1:4455/unsubscribe", data_str)
+        put_request.get_method = lambda: 'UNSUB'
+        put_request.add_header('Content-Type', 'application/json')
+        response = urllib2.urlopen(put_request)
+        response_text = response.read()
+        return json.dumps(response_text)
+
 if __name__ == "__main__":
     app.run(FileLog)
diff --git a/xos/observers/monitoring_channel/templates/ceilometer_pub_sub_consumer.py b/xos/observers/monitoring_channel/templates/ceilometer_pub_sub_consumer.py
new file mode 100644
index 0000000..ecbabb9
--- /dev/null
+++ b/xos/observers/monitoring_channel/templates/ceilometer_pub_sub_consumer.py
@@ -0,0 +1,212 @@
+import socket
+import requests
+import urllib2
+import json
+import msgpack
+import collections
+import time, thread, threading
+
+projects_map = {}
+
+UDP_IP = "0.0.0.0"
+UDP_PORT = 12346
+
+def acquire_xos_monitoring_channel():
+    url = "http://ctl:9999/xoslib/monitoringchannel/"
+    admin_auth=("padmin@vicci.org", "letmein")   # use your XOS username and password
+    monitoring_channels = requests.get(url, auth=admin_auth).json()
+    ceilometer_url = None
+    if not monitoring_channels:
+        print 'SRIKANTH: No monitoring channels for this user...'
+        return None
+    else:
+        monitoring_channel = monitoring_channels[0]
+    while not monitoring_channel['ceilometer_url']:
+         print 'SRIKANTH: Waiting for monitoring channel create'
+         sleep(0.5)
+         monitoring_channel = requests.get(url, auth=admin_auth).json()[0]
+    #TODO: Wait until URL is completely UP
+    while True:
+        print 'SRIKANTH: Waiting for ceilometer proxy URL %s is available' % monitoring_channel['ceilometer_url']
+        try:
+            response = urllib2.urlopen(monitoring_channel['ceilometer_url'],timeout=1)
+            break
+        except urllib2.HTTPError, e:
+            print 'SRIKANTH: HTTP error %s' % e.reason
+            break
+        except urllib2.URLError, e:
+            print 'SRIKANTH: URL error %(reason)s' % e.reason
+            pass
+    return monitoring_channel
+
+def print_samples():
+   print ""
+   print ""
+   for project in projects_map.keys():
+        print "project=%s, alarm_state=%s" % (project, projects_map[project]['alarm'])
+        for resource in projects_map[project]['resources'].keys():
+             print "resource=%s" % resource
+             for i in projects_map[project]['resources'][resource]:
+                  print "    time=%s val=%s" % ( i['timestamp'],i['counter_volume'])
+
+def periodic_print():
+     print_samples()
+     #Print every 1minute
+     threading.Timer(60, periodic_print).start()
+
+
+CPU_UPPER_THRESHOLD = 80 #80%
+CPU_LOWER_THRESHOLD = 30 #30%
+CPU_THRESHOLD_REPEAT = 3
+INITIAL_STATE = 'normal_config'
+SCALE_UP_EVALUATION = 'scale_up_eval'
+SCALE_DOWN_EVALUATION = 'scale_down_eval'
+SCALE_UP_ALARM = 'scale_up'
+SCALE_DOWN_ALARM = 'scale_down'
+
+def getXosTenantInfo(project):
+    print "SRIKANTH: Getting XOS info for openstack Project %s" % project
+    url = "http://ctl:9999/xos/controllerslices/"
+    admin_auth=("padmin@vicci.org", "letmein")   # use your XOS username and password
+    controller_slices = requests.get(url, auth=admin_auth).json()
+    for cslice in controller_slices:
+         if cslice['tenant_id'] == project:
+             print "SRIKANTH: Matching controller_slice=%s" % cslice['humanReadableName']
+             slice = requests.get(cslice['slice'], auth=admin_auth).json()
+             slice_name = slice['humanReadableName']
+             print "SRIKANTH: Matching slice=%s" % slice_name
+             service = requests.get(slice['service'], auth=admin_auth).json()
+             service_name = service['humanReadableName']
+             print "SRIKANTH: Matching service=%s" % service_name
+             return {'service':service_name, 'slice':slice_name}
+    logger.warn("SRIKANTH: Project %(project)s has no associated XOS slice" % {'project':project})
+    return None
+
+def handle_adjust_scale(project, adjust):
+    if (adjust != 'up') and (adjust != 'down'):
+        print "SRIKANTH: Invalid adjust value %s " % adjust
+        return
+    current_instances = len(projects_map[project]['resources'].keys())
+    if (current_instances <=1 and adjust == 'down'):
+        print "SRIKANTH: %s is running with already minimum instances and can not scale down further " % project
+        return
+    if (current_instances >=2 and adjust == 'up'):
+        print "SRIKANTH: %s is running with already maximum instances and can not scale up further " % project
+        return
+    xos_tenant = getXosTenantInfo(project)
+    if not xos_tenant:
+        print "SRIKANTH: Can not handle adjust_scale for Project %s because not associated with any slice" % project
+        return
+    xos_service = xos_tenant['service']
+    xos_slice = xos_tenant['slice']
+    if not xos_service or not xos_slice: 
+        print "SRIKANTH: Can not handle adjust_scale for Project %s because not associated with any service or slice" % project
+        return
+    print "SRIKANTH: SCALE %s for Project %s, Slice=%s, Service=%s from current=%d to new=%d" % (adjust, project, xos_slice, xos_service, current_instances, current_instances+1 if (adjust=='up') else current_instances-1)
+    query_params = {'service':xos_service, 'slice_hint':xos_slice, 'scale':current_instances+1 if (adjust=='up') else current_instances-1}
+    url = "http://ctl:9999/xoslib/serviceadjustscale/"
+    admin_auth=("padmin@vicci.org", "letmein")   # use your XOS username and password
+    response = requests.get(url, params=query_params, auth=admin_auth).json()
+    print "SRIKANTH: XOS adjust_scale response: %s" % response
+
+def periodic_cpu_threshold_evaluator():
+     for project in projects_map.keys():
+          aggregate_cpu_util = sum([resource_queue[-1]['counter_volume'] \
+                                     for resource_queue in projects_map[project]['resources'].values()]) \
+                                     /len(projects_map[project]['resources'].keys())
+
+          if (projects_map[project]['alarm'] == INITIAL_STATE or
+              projects_map[project]['alarm'] == SCALE_UP_ALARM or
+              projects_map[project]['alarm'] == SCALE_DOWN_ALARM):
+              if aggregate_cpu_util > CPU_UPPER_THRESHOLD:
+                  projects_map[project]['uthreadshold_count'] = 1
+                  projects_map[project]['alarm'] = SCALE_UP_EVALUATION
+                  if projects_map[project]['uthreadshold_count'] >= CPU_THRESHOLD_REPEAT:
+                      projects_map[project]['alarm'] = SCALE_UP_ALARM
+                      handle_adjust_scale(project, 'up')
+              elif aggregate_cpu_util < CPU_LOWER_THRESHOLD:
+                  projects_map[project]['lthreadshold_count'] = 1
+                  projects_map[project]['alarm'] = SCALE_DOWN_EVALUATION
+                  if projects_map[project]['lthreadshold_count'] >= CPU_THRESHOLD_REPEAT:
+                      projects_map[project]['alarm'] = SCALE_DOWN_ALARM
+                      handle_adjust_scale(project, 'down')
+              else:
+                  projects_map[project]['uthreadshold_count'] = 0
+                  projects_map[project]['lthreadshold_count'] = 0
+                  projects_map[project]['alarm'] = INITIAL_STATE
+          elif projects_map[project]['alarm'] == SCALE_UP_EVALUATION:
+              if aggregate_cpu_util > CPU_UPPER_THRESHOLD:
+                  projects_map[project]['uthreadshold_count'] += 1
+                  if projects_map[project]['uthreadshold_count'] >= CPU_THRESHOLD_REPEAT:
+                      projects_map[project]['alarm'] = SCALE_UP_ALARM
+                      handle_adjust_scale(project, 'up')
+              elif aggregate_cpu_util < CPU_LOWER_THRESHOLD:
+                  projects_map[project]['lthreadshold_count'] += 1
+                  projects_map[project]['alarm'] = SCALE_DOWN_EVALUATION
+              else:
+                  projects_map[project]['uthreadshold_count'] = 0
+                  projects_map[project]['alarm'] = INITIAL_STATE
+          elif projects_map[project]['alarm'] == SCALE_DOWN_EVALUATION:
+              if aggregate_cpu_util < CPU_LOWER_THRESHOLD:
+                  projects_map[project]['lthreadshold_count'] += 1
+                  if projects_map[project]['lthreadshold_count'] >= CPU_THRESHOLD_REPEAT:
+                      projects_map[project]['alarm'] = SCALE_DOWN_ALARM
+                      handle_adjust_scale(project, 'down')
+              elif aggregate_cpu_util > CPU_UPPER_THRESHOLD:
+                  projects_map[project]['uthreadshold_count'] += 1
+                  projects_map[project]['alarm'] = SCALE_UP_EVALUATION
+              else:
+                  projects_map[project]['lthreadshold_count'] = 0
+                  projects_map[project]['alarm'] = INITIAL_STATE
+     threading.Timer(60, periodic_cpu_threshold_evaluator).start()
+
+def read_notification_from_ceilometer(host,port):
+   udp = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) # UDP
+   udp.bind((host, port))
+
+   while True:
+      data, source = udp.recvfrom(64000)
+      try:
+         sample = msgpack.loads(data, encoding='utf-8')
+         if sample['counter_name'] != 'cpu_util':
+              continue
+         if sample['project_id'] not in projects_map.keys():
+              projects_map[sample['project_id']] = {}
+              projects_map[sample['project_id']]['resources'] = {}
+              projects_map[sample['project_id']]['uthreadshold_count'] = 0
+              projects_map[sample['project_id']]['lthreadshold_count'] = 0
+              projects_map[sample['project_id']]['alarm'] = INITIAL_STATE
+         resource_map = projects_map[sample['project_id']]['resources']
+         if sample['resource_id'] not in resource_map.keys():
+              resource_map[sample['resource_id']] = collections.deque(maxlen=10)
+         samples_map = resource_map[sample['resource_id']]
+         sample = {'counter_name':sample['counter_name'],
+                   'project_id':sample['project_id'],
+                   'resource_id':sample['resource_id'],
+                   'timestamp':sample['timestamp'],
+                   'counter_unit':sample['counter_unit'],
+                   'counter_volume':sample['counter_volume']}
+         samples_map.append(sample)
+      except Exception as e:
+         print e
+
+def main():
+   monitoring_channel = acquire_xos_monitoring_channel()
+   if not monitoring_channel:
+        print 'SRIKANTH: XOS monitoring_channel is not created... Create it before using this app'
+        return
+   thread.start_new(read_notification_from_ceilometer,(UDP_IP,UDP_PORT,))
+   ceilometer_url = monitoring_channel['ceilometer_url']
+   subscribe_data = {"sub_info":"cpu_util","app_id":"xos_auto_scale","target":"udp://10.11.10.1:12346"}
+   subscribe_url = ceilometer_url + 'v2/subscribe'
+   response = requests.post(subscribe_url, data=json.dumps(subscribe_data))
+   print 'SRIKANTH: Ceilometer Subscription status:%s' % response.text
+   #TODO: Fix the typo in 'sucess'
+   if (not 'sucess' in response.text) and (not 'already exists' in response.text):
+       print 'SRIKANTH: Ceilometer Subscription unsuccessful...Exiting'
+       return
+   periodic_cpu_threshold_evaluator()
+   periodic_print()
+
+if __name__ == "__main__":
+   main()
diff --git a/xos/observers/vtn/model-deps b/xos/observers/vtn/model-deps
new file mode 100644
index 0000000..0967ef4
--- /dev/null
+++ b/xos/observers/vtn/model-deps
@@ -0,0 +1 @@
+{}
diff --git a/xos/observers/vtn/run.sh b/xos/observers/vtn/run.sh
new file mode 100755
index 0000000..d7e5025
--- /dev/null
+++ b/xos/observers/vtn/run.sh
@@ -0,0 +1,2 @@
+export XOS_DIR=/opt/xos
+python vtn-observer.py  -C $XOS_DIR/observers/vtn/vtn_observer_config
diff --git a/xos/observers/vtn/start.sh b/xos/observers/vtn/start.sh
new file mode 100755
index 0000000..168074d
--- /dev/null
+++ b/xos/observers/vtn/start.sh
@@ -0,0 +1,2 @@
+export XOS_DIR=/opt/xos
+nohup python vtn-observer.py  -C $XOS_DIR/observers/vtn/vtn_observer_config > /dev/null 2>&1 &
diff --git a/xos/observers/vtn/steps/sync_tenant.py b/xos/observers/vtn/steps/sync_tenant.py
new file mode 100644
index 0000000..45f8722
--- /dev/null
+++ b/xos/observers/vtn/steps/sync_tenant.py
@@ -0,0 +1,48 @@
+import os
+import requests
+import socket
+import sys
+import base64
+from django.db.models import F, Q
+from xos.config import Config
+from observer.syncstep import SyncStep
+from core.models import Service
+from core.models.service import COARSE_KIND
+from cord.models import Tenant
+from util.logger import Logger, logging
+
+# hpclibrary will be in steps/..
+parentdir = os.path.join(os.path.dirname(__file__),"..")
+sys.path.insert(0,parentdir)
+
+logger = Logger(level=logging.INFO)
+
+class SyncTenant(SyncStep):
+    provides=[Tenant]
+    observes=Tenant
+    requested_interval=0
+
+    def __init__(self, **args):
+        SyncStep.__init__(self, **args)
+        self.saved_vtn_maps = []  # TODO: load this
+
+    def call(self, **args):
+        logger.info("sync'ing vtn services")
+        for service in Service.objects.all():
+           for id in service.get_vtn_src_ids():
+               dependencies = service.get_vtn_dependencies_ids()
+               if dependencies:
+                   for dependency in dependencies:
+                       vtn_maps.append( (id, dependency) )
+
+        for vtn_map in vtn_maps:
+            if not (vtn_map in self.saved_vtn_maps):
+               pass # call vtn rest api to add map
+
+        for vtn_map in self.saved_vtn_maps:
+            if not vtn_map in vtn_maps:
+                pass # call vtn rest api to delete map
+
+        self.saved_vtn_maps = vtn_maps
+        # TODO: save this
+
diff --git a/xos/observers/vtn/stop.sh b/xos/observers/vtn/stop.sh
new file mode 100755
index 0000000..261f029
--- /dev/null
+++ b/xos/observers/vtn/stop.sh
@@ -0,0 +1 @@
+pkill -9 -f vtn-observer.py
diff --git a/xos/observers/vtn/supervisor/vtn-observer.conf b/xos/observers/vtn/supervisor/vtn-observer.conf
new file mode 100644
index 0000000..714afa7
--- /dev/null
+++ b/xos/observers/vtn/supervisor/vtn-observer.conf
@@ -0,0 +1,2 @@
+[program:vtn-observer]
+command=python /opt/xos/observers/vbng/vtn-observer.py -C /opt/xos/observers/vbng/vtn_observer_config
diff --git a/xos/observers/vtn/vtn-observer.py b/xos/observers/vtn/vtn-observer.py
new file mode 100755
index 0000000..d6a71ff
--- /dev/null
+++ b/xos/observers/vtn/vtn-observer.py
@@ -0,0 +1,11 @@
+#!/usr/bin/env python
+
+# This imports and runs ../../xos-observer.py
+
+import importlib
+import os
+import sys
+observer_path = os.path.join(os.path.dirname(os.path.realpath(__file__)),"../..")
+sys.path.append(observer_path)
+mod = importlib.import_module("xos-observer")
+mod.main()
diff --git a/xos/observers/vtn/vtn_observer_config b/xos/observers/vtn/vtn_observer_config
new file mode 100644
index 0000000..19e9a39
--- /dev/null
+++ b/xos/observers/vtn/vtn_observer_config
@@ -0,0 +1,38 @@
+
+[plc]
+name=plc
+deployment=VICCI
+
+[db]
+name=xos
+user=postgres
+password=password
+host=localhost
+port=5432
+
+[api]
+host=128.112.171.237
+port=8000
+ssl_key=None
+ssl_cert=None
+ca_ssl_cert=None
+ratelimit_enabled=0
+omf_enabled=0
+mail_support_address=support@localhost
+nova_enabled=True
+
+[observer]
+name=vtn
+dependency_graph=/opt/xos/observers/vtn/model-deps
+steps_dir=/opt/xos/observers/vtn/steps
+sys_dir=/opt/xos/observers/vtn/sys
+deleters_dir=/opt/xos/observers/vtn/deleters
+log_file=console
+#/var/log/hpc.log
+driver=None
+pretend=False
+backoff_disabled=True
+
+[feefie]
+client_id='vicci_dev_central'
+user_id='pl'
diff --git a/xos/openstack_observer/steps/sync_container.py b/xos/openstack_observer/steps/sync_container.py
index 272e5f8..039fb55 100644
--- a/xos/openstack_observer/steps/sync_container.py
+++ b/xos/openstack_observer/steps/sync_container.py
@@ -103,7 +103,10 @@
     def get_extra_attributes(self, o):
         fields={}
         fields["ansible_tag"] = "container-%s" % str(o.id)
-        fields["docker_image"] = o.image.name
+        if o.image.tag:
+            fields["docker_image"] = o.image.path + ":" + o.image.tag
+        else:
+            fields["docker_image"] = o.image.path
         fields["ports"] = self.get_ports(o)
         if o.volumes:
             fields["volumes"] = [x.strip() for x in o.volumes.split(",")]
diff --git a/xos/tosca/custom_types/xos.m4 b/xos/tosca/custom_types/xos.m4
index 907d54c..10910fb 100644
--- a/xos/tosca/custom_types/xos.m4
+++ b/xos/tosca/custom_types/xos.m4
@@ -93,6 +93,21 @@
         properties:
             xos_base_service_props
 
+    tosca.nodes.Tenant:
+        derived_from: tosca.nodes.Root
+        description: >
+            An ONOS Tenant.
+        properties:
+            xos_base_tenant_props
+            service_specific_attribute:
+                type: string
+                required: false
+                description: Service-specific attribute, usually a string containing a json dictionary
+            model:
+                type: string
+                required: false
+                description: Name of model to use when instantiating tenant
+
     tosca.nodes.ONOSService:
         derived_from: tosca.nodes.Root
         description: >
@@ -488,7 +503,11 @@
             path:
                 type: string
                 required: false
-                description: Path to Image file inside XOS docker container.
+                description: Path to Image file
+            tag:
+                type: string
+                required: false
+                description: For Docker images, tag of image
 
     tosca.nodes.Controller:
         derived_from: tosca.nodes.Root
diff --git a/xos/tosca/custom_types/xos.yaml b/xos/tosca/custom_types/xos.yaml
index 60968a5..4c12e7f 100644
--- a/xos/tosca/custom_types/xos.yaml
+++ b/xos/tosca/custom_types/xos.yaml
@@ -61,6 +61,28 @@
                 required: false
                 description: Version number of Service.
 
+    tosca.nodes.Tenant:
+        derived_from: tosca.nodes.Root
+        description: >
+            An ONOS Tenant.
+        properties:
+            kind:
+                type: string
+                default: generic
+                description: Kind of tenant
+            service_specific_id:
+                type: string
+                required: false
+                description: Service specific ID opaque to XOS but meaningful to service
+            service_specific_attribute:
+                type: string
+                required: false
+                description: Service-specific attribute, usually a string containing a json dictionary
+            model:
+                type: string
+                required: false
+                description: Name of model to use when instantiating tenant
+
     tosca.nodes.ONOSService:
         derived_from: tosca.nodes.Root
         description: >
@@ -643,7 +665,11 @@
             path:
                 type: string
                 required: false
-                description: Path to Image file inside XOS docker container.
+                description: Path to Image file
+            tag:
+                type: string
+                required: false
+                description: For Docker images, tag of image
 
     tosca.nodes.Controller:
         derived_from: tosca.nodes.Root
diff --git a/xos/tosca/resources/image.py b/xos/tosca/resources/image.py
index 938c5cd..fcd53b4 100644
--- a/xos/tosca/resources/image.py
+++ b/xos/tosca/resources/image.py
@@ -15,7 +15,7 @@
 class XOSImage(XOSResource):
     provides = "tosca.nodes.Image"
     xos_model = Image
-    copyin_props = ["disk_format", "container_format", "path", "kind"]
+    copyin_props = ["disk_format", "container_format", "path", "kind", "tag"]
 
     def get_xos_args(self):
         args = super(XOSImage, self).get_xos_args()
diff --git a/xos/tosca/resources/tenant.py b/xos/tosca/resources/tenant.py
new file mode 100644
index 0000000..831f6eb
--- /dev/null
+++ b/xos/tosca/resources/tenant.py
@@ -0,0 +1,60 @@
+import importlib
+import os
+import pdb
+import sys
+import tempfile
+sys.path.append("/opt/tosca")
+from translator.toscalib.tosca_template import ToscaTemplate
+import pdb
+
+from ceilometer.models import Tenant, Service
+
+from xosresource import XOSResource
+
+class XOSTenant(XOSResource):
+    provides = "tosca.nodes.Tenant"
+    xos_model = Tenant
+    name_field = None
+    copyin_props = ("kind", "service_specific_attribute")
+
+    def get_xos_args(self, throw_exception=True):
+        args = super(XOSTenant, self).get_xos_args()
+
+        provider_name = self.get_requirement("tosca.relationships.MemberOfService", throw_exception=throw_exception)
+        if provider_name:
+            args["provider_service"] = self.get_xos_object(Service, throw_exception=throw_exception, name=provider_name)
+
+        return args
+
+    def get_existing_objs(self):
+        args = self.get_xos_args(throw_exception=False)
+        provider_service = args.get("provider", None)
+        if provider_service:
+            return [ self.get_xos_object(provider_service=provider_service) ]
+        return []
+
+    def create(self):
+        model_class = self.get_property("model")
+        if model_class:
+            model_name = ".".join(model_class.split(".")[:-1])
+            class_name = model_class.split(".")[-1]
+            module = importlib.import_module(model_name)
+            xos_model = getattr(module, class_name)
+        else:
+            xos_model = self.xos_model
+
+        xos_args = self.get_xos_args()
+        xos_obj = xos_model(**xos_args)
+        xos_obj.caller = self.user
+        xos_obj.save()
+
+        self.info("Created %s '%s'" % (self.xos_model.__name__,str(xos_obj)))
+
+        self.postprocess(xos_obj)
+
+    def postprocess(self, obj):
+        pass
+
+    def can_delete(self, obj):
+        return super(XOSTenant, self).can_delete(obj)
+
diff --git a/xos/tosca/samples/helloworld-chain.yaml b/xos/tosca/samples/helloworld-chain.yaml
index decd3cf..c72aa3d 100644
--- a/xos/tosca/samples/helloworld-chain.yaml
+++ b/xos/tosca/samples/helloworld-chain.yaml
@@ -25,6 +25,21 @@
 
     service_helloworld:
       type: tosca.nodes.Service
+      properties:
+          kind: helloworldservice_complete
+          view_url: /admin/helloworldservice_complete/helloworldservicecomplete/$id$/
+
+    tenant_helloworld:
+       type: tosca.nodes.Tenant
+       properties:
+           kind: helloworldservice_complete
+           service_specific_attribute: "{\"display_message\": \"Hello World from Tosca\"}"
+           model: helloworldservice_complete.models.HelloWorldTenantComplete
+       requirements:
+           - provider_service:
+               node: service_helloworld
+               relationship: tosca.relationships.MemberOfService
+
 
     mysite_helloworld:
       type: tosca.nodes.Slice
@@ -51,26 +66,3 @@
               node: mysite_helloworld
               relationship: tosca.relationships.ConnectsToSlice
 
-    # we need at least one instance to make the Networks instantiate
-    helloworld_instance:
-      type: tosca.nodes.Compute
-      capabilities:
-        # Host container properties
-        host:
-         properties:
-           num_cpus: 1
-           disk_size: 10 GB
-           mem_size: 4 MB
-        # Guest Operating System properties
-        os:
-          properties:
-            # host Operating System image properties
-            architecture: x86_64
-            type: linux
-            distribution: rhel
-            version: 6.5
-      requirements:
-          - slice:
-                node: mysite_helloworld
-                relationship: tosca.relationships.MemberOfSlice
-
