diff --git a/xos/admin.py b/xos/admin.py
deleted file mode 100644
index 50ac7fc..0000000
--- a/xos/admin.py
+++ /dev/null
@@ -1,134 +0,0 @@
-
-# Copyright 2017-present Open Networking Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-# admin.py - ExampleService Django Admin
-
-from core.admin import ReadOnlyAwareAdmin, SliceInline
-from core.middleware import get_request
-from core.models import User
-
-from django import forms
-from django.contrib import admin
-
-from services.exampleservice.models import *
-
-class ExampleServiceForm(forms.ModelForm):
-
-    class Meta:
-        model = ExampleService
-        fields = '__all__'
-
-    def __init__(self, *args, **kwargs):
-        super(ExampleServiceForm, self).__init__(*args, **kwargs)
-
-        if self.instance:
-            self.fields['service_message'].initial = self.instance.service_message
-
-    def save(self, commit=True):
-        self.instance.service_message = self.cleaned_data.get('service_message')
-        return super(ExampleServiceForm, self).save(commit=commit)
-
-class ExampleServiceAdmin(ReadOnlyAwareAdmin):
-
-    model = ExampleService
-    verbose_name = SERVICE_NAME_VERBOSE
-    verbose_name_plural = SERVICE_NAME_VERBOSE_PLURAL
-    form = ExampleServiceForm
-    inlines = [SliceInline]
-
-    list_display = ('backend_status_icon', 'name', 'service_message', 'enabled')
-    list_display_links = ('backend_status_icon', 'name', 'service_message' )
-
-    fieldsets = [(None, {
-        'fields': ['backend_status_text', 'name', 'enabled', 'versionNumber', 'service_message', 'description',],
-        'classes':['suit-tab suit-tab-general',],
-        })]
-
-    readonly_fields = ('backend_status_text', )
-    user_readonly_fields = ['name', 'enabled', 'versionNumber', 'description',]
-
-    extracontext_registered_admins = True
-
-    suit_form_tabs = (
-        ('general', 'Example Service Details', ),
-        ('slices', 'Slices',),
-        )
-
-    suit_form_includes = ((
-        'top',
-        'administration'),
-        )
-
-    def get_queryset(self, request):
-        return ExampleService.select_by_user(request.user)
-
-admin.site.register(ExampleService, ExampleServiceAdmin)
-
-class ExampleTenantForm(forms.ModelForm):
-
-    class Meta:
-        model = ExampleTenant
-        fields = '__all__'
-
-    creator = forms.ModelChoiceField(queryset=User.objects.all())
-
-    def __init__(self, *args, **kwargs):
-        super(ExampleTenantForm, self).__init__(*args, **kwargs)
-
-        self.fields['kind'].widget.attrs['readonly'] = True
-        self.fields['kind'].initial = SERVICE_NAME
-
-        self.fields['provider_service'].queryset = ExampleService.objects.all()
-
-        if self.instance:
-            self.fields['creator'].initial = self.instance.creator
-            self.fields['tenant_message'].initial = self.instance.tenant_message
-
-        if (not self.instance) or (not self.instance.pk):
-            self.fields['creator'].initial = get_request().user
-            if ExampleService.objects.exists():
-                self.fields['provider_service'].initial = ExampleService.objects.all()[0]
-
-    def save(self, commit=True):
-        self.instance.creator = self.cleaned_data.get('creator')
-        self.instance.tenant_message = self.cleaned_data.get('tenant_message')
-        return super(ExampleTenantForm, self).save(commit=commit)
-
-
-class ExampleTenantAdmin(ReadOnlyAwareAdmin):
-
-    verbose_name = TENANT_NAME_VERBOSE
-    verbose_name_plural = TENANT_NAME_VERBOSE_PLURAL
-
-    list_display = ('id', 'backend_status_icon', 'instance', 'tenant_message')
-    list_display_links = ('backend_status_icon', 'instance', 'tenant_message', 'id')
-
-    fieldsets = [(None, {
-        'fields': ['backend_status_text', 'kind', 'provider_service', 'instance', 'creator', 'tenant_message'],
-        'classes': ['suit-tab suit-tab-general'],
-        })]
-
-    readonly_fields = ('backend_status_text', 'instance',)
-
-    form = ExampleTenantForm
-
-    suit_form_tabs = (('general', 'Details'),)
-
-    def get_queryset(self, request):
-        return ExampleTenant.select_by_user(request.user)
-
-admin.site.register(ExampleTenant, ExampleTenantAdmin)
-
diff --git a/xos/api/service/exampleservice.py b/xos/api/service/exampleservice.py
deleted file mode 100644
index 51aee08..0000000
--- a/xos/api/service/exampleservice.py
+++ /dev/null
@@ -1,70 +0,0 @@
-
-# Copyright 2017-present Open Networking Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-from rest_framework.decorators import api_view
-from rest_framework.response import Response
-from rest_framework.reverse import reverse
-from rest_framework import serializers
-from rest_framework import generics
-from rest_framework import viewsets
-from rest_framework import status
-from rest_framework.decorators import detail_route, list_route
-from rest_framework.views import APIView
-from core.models import *
-from django.forms import widgets
-from django.conf.urls import patterns, url
-from api.xosapi_helpers import PlusModelSerializer, XOSViewSet, ReadOnlyField
-from django.shortcuts import get_object_or_404
-from xos.apibase import XOSListCreateAPIView, XOSRetrieveUpdateDestroyAPIView, XOSPermissionDenied
-from xos.exceptions import *
-import json
-import subprocess
-from services.exampleservice.models import ExampleService
-
-class ExampleServiceSerializer(PlusModelSerializer):
-        id = ReadOnlyField()
-        humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
-        service_message = serializers.CharField(required=False)
-
-        class Meta:
-            model = ExampleService
-            fields = ('humanReadableName',
-                      'id',
-                      'service_message')
-
-        def getHumanReadableName(self, obj):
-            return obj.__unicode__()
-
-class ExampleServiceViewSet(XOSViewSet):
-    base_name = "exampleservice"
-    method_name = "exampleservice"
-    method_kind = "viewset"
-    queryset = ExampleService.objects.all()
-    serializer_class = ExampleServiceSerializer
-
-    @classmethod
-    def get_urlpatterns(self, api_path="^"):
-        patterns = super(ExampleServiceViewSet, self).get_urlpatterns(api_path=api_path)
-
-        return patterns
-
-    def list(self, request):
-        object_list = self.filter_queryset(self.get_queryset())
-
-        serializer = self.get_serializer(object_list, many=True)
-
-        return Response(serializer.data)
-
diff --git a/xos/api/tenant/exampletenant.py b/xos/api/tenant/exampletenant.py
deleted file mode 100644
index 120a4aa..0000000
--- a/xos/api/tenant/exampletenant.py
+++ /dev/null
@@ -1,83 +0,0 @@
-
-# Copyright 2017-present Open Networking Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-from rest_framework.decorators import api_view
-from rest_framework.response import Response
-from rest_framework.reverse import reverse
-from rest_framework import serializers
-from rest_framework import generics
-from rest_framework import status
-from core.models import *
-from django.forms import widgets
-from xos.apibase import XOSListCreateAPIView, XOSRetrieveUpdateDestroyAPIView, XOSPermissionDenied
-from api.xosapi_helpers import PlusModelSerializer, XOSViewSet, ReadOnlyField
-
-from services.exampleservice.models import ExampleTenant, ExampleService
-
-def get_default_example_service():
-    example_services = ExampleService.objects.all()
-    if example_services:
-        return example_services[0]
-    return None
-
-class ExampleTenantSerializer(PlusModelSerializer):
-        id = ReadOnlyField()
-        provider_service = serializers.PrimaryKeyRelatedField(queryset=ExampleService.objects.all(), default=get_default_example_service)
-        tenant_message = serializers.CharField(required=False)
-        backend_status = ReadOnlyField()
-
-        humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
-
-        class Meta:
-            model = ExampleTenant
-            fields = ('humanReadableName', 'id', 'provider_service', 'tenant_message', 'backend_status')
-
-        def getHumanReadableName(self, obj):
-            return obj.__unicode__()
-
-class ExampleTenantViewSet(XOSViewSet):
-    base_name = "exampletenant"
-    method_name = "exampletenant"
-    method_kind = "viewset"
-    queryset = ExampleTenant.objects.all()
-    serializer_class = ExampleTenantSerializer
-
-    @classmethod
-    def get_urlpatterns(self, api_path="^"):
-        patterns = super(ExampleTenantViewSet, self).get_urlpatterns(api_path=api_path)
-
-        # example to demonstrate adding a custom endpoint
-        patterns.append( self.detail_url("message/$", {"get": "get_message", "put": "set_message"}, "message") )
-
-        return patterns
-
-    def list(self, request):
-        queryset = self.filter_queryset(self.get_queryset())
-
-        serializer = self.get_serializer(queryset, many=True)
-
-        return Response(serializer.data)
-
-    def get_message(self, request, pk=None):
-        example_tenant = self.get_object()
-        return Response({"tenant_message": example_tenant.tenant_message})
-
-    def set_message(self, request, pk=None):
-        example_tenant = self.get_object()
-        example_tenant.tenant_message = request.data["tenant_message"]
-        example_tenant.save()
-        return Response({"tenant_message": example_tenant.tenant_message})
-
diff --git a/xos/attic/header.py b/xos/attic/header.py
index 17d1bf4..3ee13a7 100644
--- a/xos/attic/header.py
+++ b/xos/attic/header.py
@@ -23,5 +23,5 @@
 SERVICE_NAME = 'exampleservice'
 SERVICE_NAME_VERBOSE = 'Example Service'
 SERVICE_NAME_VERBOSE_PLURAL = 'Example Services'
-TENANT_NAME_VERBOSE = 'Example Tenant'
-TENANT_NAME_VERBOSE_PLURAL = 'Example Tenants'
+SERVICE_INSTANCE_NAME_VERBOSE = 'Example Service Instance'
+SERVICE_INSTANCE_VERBOSE_PLURAL = 'Example Service Instances'
diff --git a/xos/exampleservice-onboard.yaml b/xos/exampleservice-onboard.yaml
index f0b3ef3..29a40b1 100644
--- a/xos/exampleservice-onboard.yaml
+++ b/xos/exampleservice-onboard.yaml
@@ -30,11 +30,8 @@
           # The following will concatenate with base_url automatically, if
           # base_url is non-null.
           xproto: ./
-          admin: admin.py
           tosca_custom_types: exampleservice.yaml
-          tosca_resource: tosca/resources/exampleservice.py, tosca/resources/exampletenant.py
-          rest_service: api/service/exampleservice.py
-          rest_tenant: api/tenant/exampletenant.py
+          tosca_resource: tosca/resources/exampleservice.py, tosca/resources/exampleserviceinstance.py
           private_key: file:///opt/xos/key_import/exampleservice_rsa
           public_key: file:///opt/xos/key_import/exampleservice_rsa.pub
 
diff --git a/xos/exampleservice.m4 b/xos/exampleservice.m4
index 6886a8c..214130c 100644
--- a/xos/exampleservice.m4
+++ b/xos/exampleservice.m4
@@ -35,6 +35,17 @@
                 type: string
                 required: false
 
+    tosca.nodes.ExampleServiceInstance:
+        derived_from: tosca.nodes.Root
+        description: >
+            A ServiceInstance of the example service
+        properties:
+            xos_base_tenant_props
+            tenant_message:
+                type: string
+                required: false
+
+    # deprecated, replaced by ExampleServiceInstance
     tosca.nodes.ExampleTenant:
         derived_from: tosca.nodes.Root
         description: >
diff --git a/xos/exampleservice.xproto b/xos/exampleservice.xproto
index 0d5a70b..7356f3a 100644
--- a/xos/exampleservice.xproto
+++ b/xos/exampleservice.xproto
@@ -6,8 +6,8 @@
 }
 
 
-message ExampleTenant (TenantWithContainer){
-     option name = "exampletenant";
-     option verbose_name = "Example Tenant";
+message ExampleServiceInstance (TenantWithContainer){
+     option name = "exampleserviceinstance";
+     option verbose_name = "Example Service Instance";
      required string tenant_message = 1 [help_text = "Tenant Message to Display", max_length = 254, null = False, db_index = False, blank = False];
 }
diff --git a/xos/exampleservice.yaml b/xos/exampleservice.yaml
index 5594ff9..04eed5c 100644
--- a/xos/exampleservice.yaml
+++ b/xos/exampleservice.yaml
@@ -98,6 +98,24 @@
                 type: string
                 required: false
 
+    tosca.nodes.ExampleServiceInstance:
+        derived_from: tosca.nodes.Root
+        description: >
+            A ServiceInstance of the example service
+        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
+            tenant_message:
+                type: string
+                required: false
+
+    # deprecated, replaced by ExampleServiceInstance
     tosca.nodes.ExampleTenant:
         derived_from: tosca.nodes.Root
         description: >
diff --git a/xos/synchronizer/exampleservice_config.yaml b/xos/synchronizer/exampleservice_config.yaml
index d41f45d..275a09f 100644
--- a/xos/synchronizer/exampleservice_config.yaml
+++ b/xos/synchronizer/exampleservice_config.yaml
@@ -20,7 +20,7 @@
   password: "@/opt/xos/services/exampleservice/credentials/xosadmin@opencord.org"
 required_models:
   - ExampleService
-  - ExampleTenant
+  - ExampleServiceInstance
   - ServiceDependency
   - ServiceMonitoringAgentInfo
 dependency_graph: "/opt/xos/synchronizers/exampleservice/model-deps"
diff --git a/xos/synchronizer/model_policies/model_policy_exampletenant.py b/xos/synchronizer/model_policies/model_policy_exampleserviceinstance.py
similarity index 87%
rename from xos/synchronizer/model_policies/model_policy_exampletenant.py
rename to xos/synchronizer/model_policies/model_policy_exampleserviceinstance.py
index ee2880a..8244204 100644
--- a/xos/synchronizer/model_policies/model_policy_exampletenant.py
+++ b/xos/synchronizer/model_policies/model_policy_exampleserviceinstance.py
@@ -17,5 +17,5 @@
 from synchronizers.new_base.modelaccessor import *
 from synchronizers.new_base.model_policies.model_policy_tenantwithcontainer import TenantWithContainerPolicy
 
-class ExampleTenantPolicy(TenantWithContainerPolicy):
-    model_name = "ExampleTenant"
+class ExampleServiceInstancePolicy(TenantWithContainerPolicy):
+    model_name = "ExampleServiceInstance"
diff --git a/xos/synchronizer/steps/exampletenant_playbook.yaml b/xos/synchronizer/steps/exampleserviceinstance_playbook.yaml
similarity index 95%
rename from xos/synchronizer/steps/exampletenant_playbook.yaml
rename to xos/synchronizer/steps/exampleserviceinstance_playbook.yaml
index 0902bc4..5830815 100644
--- a/xos/synchronizer/steps/exampletenant_playbook.yaml
+++ b/xos/synchronizer/steps/exampleserviceinstance_playbook.yaml
@@ -15,7 +15,7 @@
 
 
 ---
-# exampletenant_playbook
+# exampleserviceinstance_playbook
 
 - hosts: "{{ instance_name }}"
   connection: ssh
diff --git a/xos/synchronizer/steps/sync_exampletenant.py b/xos/synchronizer/steps/sync_exampleserviceinstance.py
similarity index 87%
rename from xos/synchronizer/steps/sync_exampletenant.py
rename to xos/synchronizer/steps/sync_exampleserviceinstance.py
index d37e4c3..3462960 100644
--- a/xos/synchronizer/steps/sync_exampletenant.py
+++ b/xos/synchronizer/steps/sync_exampleserviceinstance.py
@@ -25,22 +25,22 @@
 
 logger = Logger(level=logging.INFO)
 
-class SyncExampleTenant(SyncInstanceUsingAnsible):
+class SyncExampleServiceInstance(SyncInstanceUsingAnsible):
 
-    provides = [ExampleTenant]
+    provides = [ExampleServiceInstance]
 
-    observes = ExampleTenant
+    observes = ExampleServiceInstance
 
     requested_interval = 0
 
-    template_name = "exampletenant_playbook.yaml"
+    template_name = "exampleserviceinstance_playbook.yaml"
 
     service_key_name = "/opt/xos/synchronizers/exampleservice/exampleservice_private_key"
 
     watches = [ModelLink(ServiceDependency,via='servicedependency'), ModelLink(ServiceMonitoringAgentInfo,via='monitoringagentinfo')]
 
     def __init__(self, *args, **kwargs):
-        super(SyncExampleTenant, self).__init__(*args, **kwargs)
+        super(SyncExampleServiceInstance, self).__init__(*args, **kwargs)
 
     def get_exampleservice(self, o):
         if not o.owner:
@@ -76,7 +76,7 @@
             logger.info("handle watch notifications for service monitoring agent info...ignoring because target_uri attribute in monitoring agent info:%s is null" % (monitoring_agent_info))
             return
 
-        objs = ExampleTenant.objects.all()
+        objs = ExampleServiceInstance.objects.all()
         for obj in objs:
             if obj.owner.id != monitoring_agent_info.service.id:
                 logger.info("handle watch notifications for service monitoring agent info...ignoring because service attribute in monitoring agent info:%s is not matching" % (monitoring_agent_info))
@@ -87,7 +87,7 @@
                logger.warn("handle watch notifications for service monitoring agent info...: No valid instance found for object %s" % (str(obj)))
                return
 
-            logger.info("handling watch notification for monitoring agent info:%s for ExampleTenant object:%s" % (monitoring_agent_info, obj))
+            logger.info("handling watch notification for monitoring agent info:%s for ExampleServiceInstance object:%s" % (monitoring_agent_info, obj))
 
             #Run ansible playbook to update the routing table entries in the instance
             fields = self.get_ansible_fields(instance)
@@ -95,5 +95,5 @@
             fields["target_uri"] = monitoring_agent_info.target_uri
 
             template_name = "monitoring_agent.yaml"
-            super(SyncExampleTenant, self).run_playbook(obj, fields, template_name)
+            super(SyncExampleServiceInstance, self).run_playbook(obj, fields, template_name)
         pass
diff --git a/xos/tosca/resources/exampletenant.py b/xos/tosca/resources/exampleserviceinstance.py
similarity index 65%
rename from xos/tosca/resources/exampletenant.py
rename to xos/tosca/resources/exampleserviceinstance.py
index 1d6c76a..7b8f640 100644
--- a/xos/tosca/resources/exampletenant.py
+++ b/xos/tosca/resources/exampleserviceinstance.py
@@ -1,4 +1,3 @@
-
 # Copyright 2017-present Open Networking Foundation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,21 +12,22 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-
 from xosresource import XOSResource
 from core.models import Service
-from services.exampleservice.models import ExampleTenant, SERVICE_NAME as EXAMPLETENANT_KIND
+from services.exampleservice.models import ExampleServiceInstance
 
-class XOSExampleTenant(XOSResource):
-    provides = "tosca.nodes.ExampleTenant"
-    xos_model = ExampleTenant
+class XOSExampleServiceInstance(XOSResource):
+    provides = ["tosca.nodes.ExampleServiceInstance",
+                "tosca.nodes.ExampleTenant"            # deprecated
+                ]
+    xos_model = ExampleServiceInstance
     name_field = "service_specific_id"
     copyin_props = ("tenant_message",)
 
     def get_xos_args(self, throw_exception=True):
-        args = super(XOSExampleTenant, self).get_xos_args()
+        args = super(XOSExampleServiceInstance, self).get_xos_args()
 
-        # ExampleTenant must always have a provider_service
+        # ExampleServiceInstance must always have a provider_service
         provider_name = self.get_requirement("tosca.relationships.TenantOfService", throw_exception=True)
         if provider_name:
             args["owner"] = self.get_xos_object(Service, throw_exception=True, name=provider_name)
@@ -36,9 +36,9 @@
 
     def get_existing_objs(self):
         args = self.get_xos_args(throw_exception=False)
-        return ExampleTenant.objects.filter(owner=args["owner"], service_specific_id=args["service_specific_id"])
+        return ExampleServiceInstance.objects.filter(owner=args["owner"], service_specific_id=args["service_specific_id"])
         return []
 
     def can_delete(self, obj):
-        return super(XOSExampleTenant, self).can_delete(obj)
+        return super(XOSExampleServiceInstance, self).can_delete(obj)
 
