diff --git a/xos/admin.py b/xos/admin.py
deleted file mode 100644
index 6ab7524..0000000
--- a/xos/admin.py
+++ /dev/null
@@ -1,171 +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 django.contrib import admin
-
-from services.volt.models import *
-from django import forms
-from django.utils.safestring import mark_safe
-from django.contrib.auth.admin import UserAdmin
-from django.contrib.admin.widgets import FilteredSelectMultiple
-from django.contrib.auth.forms import ReadOnlyPasswordHashField
-from django.contrib.auth.signals import user_logged_in
-from django.utils import timezone
-from django.contrib.contenttypes import generic
-from suit.widgets import LinkedSelect
-from core.admin import ServiceAppAdmin,SliceInline,ServiceAttrAsTabInline, ReadOnlyAwareAdmin, XOSTabularInline, ServicePrivilegeInline, SubscriberLinkInline, ProviderLinkInline, ProviderDependencyInline,SubscriberDependencyInline
-from core.middleware import get_request
-
-from functools import update_wrapper
-from django.contrib.admin.views.main import ChangeList
-from django.core.urlresolvers import reverse
-from django.contrib.admin.utils import quote
-
-#-----------------------------------------------------------------------------
-# vOLT
-#-----------------------------------------------------------------------------
-
-class VOLTServiceAdmin(ReadOnlyAwareAdmin):
-    model = VOLTService
-    verbose_name = "vOLT Service"
-    verbose_name_plural = "vOLT Service"
-    list_display = ("backend_status_icon", "name", "enabled")
-    list_display_links = ('backend_status_icon', 'name', )
-    fieldsets = [(None, {'fields': ['backend_status_text', 'name','enabled','versionNumber', 'description',"view_url","icon_url" ], 'classes':['suit-tab suit-tab-general']})]
-    readonly_fields = ('backend_status_text', )
-    inlines = [SliceInline,ServiceAttrAsTabInline,ServicePrivilegeInline,ProviderDependencyInline,SubscriberDependencyInline]
-
-    extracontext_registered_admins = True
-
-    user_readonly_fields = ["name", "enabled", "versionNumber", "description"]
-
-    suit_form_tabs =(('general', 'vOLT Service Details'),
-        ('administration', 'Administration'),
-        #('tools', 'Tools'),
-        ('slices','Slices'),
-        ('serviceattrs','Additional Attributes'),
-        ('servicetenants', 'Dependencies'),
-        ('serviceprivileges','Privileges'),
-    )
-
-    suit_form_includes = (('voltadmin.html', 'top', 'administration'),
-                           ) #('hpctools.html', 'top', 'tools') )
-
-class VOLTTenantForm(forms.ModelForm):
-    s_tag = forms.CharField()
-    c_tag = forms.CharField()
-    creator = forms.ModelChoiceField(queryset=User.objects.all())
-
-    def __init__(self,*args,**kwargs):
-        super (VOLTTenantForm,self ).__init__(*args,**kwargs)
-        self.fields['owner'].queryset = VOLTService.objects.all()
-        if self.instance:
-            # fields for the attributes
-            self.fields['c_tag'].initial = self.instance.c_tag
-            self.fields['s_tag'].initial = self.instance.s_tag
-            self.fields['creator'].initial = self.instance.creator
-        if (not self.instance) or (not self.instance.pk):
-            # default fields for an 'add' form
-            self.fields['creator'].initial = get_request().user
-            if VOLTService.objects.exists():
-               self.fields["owner"].initial = VOLTService.objects.all()[0]
-
-    def save(self, commit=True):
-        self.instance.s_tag = self.cleaned_data.get("s_tag")
-        self.instance.c_tag = self.cleaned_data.get("c_tag")
-        self.instance.creator = self.cleaned_data.get("creator")
-        return super(VOLTTenantForm, self).save(commit=commit)
-
-    class Meta:
-        model = VOLTTenant
-        fields = '__all__'
-
-
-class VOLTTenantAdmin(ReadOnlyAwareAdmin):
-    list_display = ('backend_status_icon', 'id', 'service_specific_id', 's_tag', 'c_tag', )
-    list_display_links = ('backend_status_icon', 'id')
-    fieldsets = [ (None, {'fields': ['backend_status_text', 'owner', 'service_specific_id', # 'service_specific_attribute',
-                                     's_tag', 'c_tag', 'creator'],
-                          'classes':['suit-tab suit-tab-general']})]
-    readonly_fields = ('backend_status_text', 'service_specific_attribute')
-    inlines = (ProviderLinkInline, SubscriberLinkInline)
-    form = VOLTTenantForm
-
-    suit_form_tabs = (('general','Details'), ('servicelinks','Links'),)
-
-    def get_queryset(self, request):
-        return VOLTTenant.select_by_user(request.user)
-
-class AccessDeviceInline(XOSTabularInline):
-    model = AccessDevice
-    fields = ['volt_device','uplink','vlan']
-    readonly_fields = []
-    extra = 0
-#    max_num = 0
-    suit_classes = 'suit-tab suit-tab-accessdevices'
-
-#    @property
-#    def selflink_reverse_path(self):
-#        return "admin:cord_volttenant_change"
-
-class VOLTDeviceAdmin(ReadOnlyAwareAdmin):
-    list_display = ('backend_status_icon', 'name', 'openflow_id', 'driver' )
-    list_display_links = ('backend_status_icon', 'name', 'openflow_id')
-    fieldsets = [ (None, {'fields': ['backend_status_text','name','volt_service','openflow_id','driver','access_agent'],
-                          'classes':['suit-tab suit-tab-general']})]
-    readonly_fields = ('backend_status_text',)
-    inlines = [AccessDeviceInline]
-
-    suit_form_tabs = (('general','Details'), ('accessdevices','Access Devices'))
-
-class AccessDeviceAdmin(ReadOnlyAwareAdmin):
-    list_display = ('backend_status_icon', 'id', 'volt_device', 'uplink', 'vlan' )
-    list_display_links = ('backend_status_icon', 'id')
-    fieldsets = [ (None, {'fields': ['backend_status_text','volt_device','uplink','vlan'],
-                          'classes':['suit-tab suit-tab-general']})]
-    readonly_fields = ('backend_status_text',)
-
-    suit_form_tabs = (('general','Details'),)
-
-class AgentPortMappingInline(XOSTabularInline):
-    model = AgentPortMapping
-    fields = ['access_agent', 'mac', 'port']
-    readonly_fields = []
-    extra = 0
-#    max_num = 0
-    suit_classes = 'suit-tab suit-tab-accessportmaps'
-
-#    @property
-#    def selflink_reverse_path(self):
-#        return "admin:cord_volttenant_change"
-
-class AccessAgentAdmin(ReadOnlyAwareAdmin):
-    list_display = ('backend_status_icon', 'name', 'mac' )
-    list_display_links = ('backend_status_icon', 'name')
-    fieldsets = [ (None, {'fields': ['backend_status_text','name','volt_service','mac'],
-                          'classes':['suit-tab suit-tab-general']})]
-    readonly_fields = ('backend_status_text',)
-    inlines= [AgentPortMappingInline]
-
-    suit_form_tabs = (('general','Details'), ('accessportmaps', 'Port Mappings'))
-
-admin.site.register(VOLTService, VOLTServiceAdmin)
-admin.site.register(VOLTTenant, VOLTTenantAdmin)
-admin.site.register(VOLTDevice, VOLTDeviceAdmin)
-admin.site.register(AccessDevice, AccessDeviceAdmin)
-admin.site.register(AccessAgent, AccessAgentAdmin)
-
-
diff --git a/xos/attic/accessagent_model.py b/xos/attic/accessagent_model.py
deleted file mode 100644
index b80d979..0000000
--- a/xos/attic/accessagent_model.py
+++ /dev/null
@@ -1,17 +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.
-
-
-def __unicode__(self): return u'%s' % (self.name)
diff --git a/xos/attic/accessdevice_model.py b/xos/attic/accessdevice_model.py
deleted file mode 100644
index 507cd58..0000000
--- a/xos/attic/accessdevice_model.py
+++ /dev/null
@@ -1,17 +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.
-
-
-def __unicode__(self): return u'%s-%d:%d' % (self.volt_device.name,self.uplink,self.vlan)
diff --git a/xos/attic/agentportmapping_model.py b/xos/attic/agentportmapping_model.py
deleted file mode 100644
index d80baab..0000000
--- a/xos/attic/agentportmapping_model.py
+++ /dev/null
@@ -1,17 +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.
-
-
-def __unicode__(self): return u'%s-%s-%s' % (self.access_agent.name, self.port, self.mac)
diff --git a/xos/attic/header.py b/xos/attic/header.py
deleted file mode 100644
index 0bb8be2..0000000
--- a/xos/attic/header.py
+++ /dev/null
@@ -1,39 +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 django.db import models
-from django.db.models import *
-from core.models import Service, XOSBase, Slice, Instance, ServiceInstance, ServiceInstanceLink, Node, Image, User, Flavor, NetworkParameter, NetworkParameterType, Port, AddressPool, User
-from core.models.xosbase import StrippedCharField
-import os
-from django.db import models, transaction
-from django.forms.models import model_to_dict
-from django.db.models import Q
-from operator import itemgetter, attrgetter, methodcaller
-from core.models import Tag
-from core.models.service import LeastLoadedNodeScheduler
-from services.vrouter.models import VRouterService, VRouterTenant
-from services.rcord.models import CordSubscriberRoot
-import traceback
-from xos.exceptions import *
-from xosconfig import Config
-
-class ConfigurationError(Exception):
-    pass
-
-VOLT_KIND = "vOLT"
-
-CORD_USE_VTN = getattr(Config(), "networking_use_vtn", False)
diff --git a/xos/attic/voltdevice_model.py b/xos/attic/voltdevice_model.py
deleted file mode 100644
index b80d979..0000000
--- a/xos/attic/voltdevice_model.py
+++ /dev/null
@@ -1,17 +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.
-
-
-def __unicode__(self): return u'%s' % (self.name)
diff --git a/xos/attic/volttenant_model.py b/xos/attic/volttenant_model.py
deleted file mode 100644
index c7a3420..0000000
--- a/xos/attic/volttenant_model.py
+++ /dev/null
@@ -1,69 +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.
-
-
-def __init__(self, *args, **kwargs):
-    volt_services = VOLTService.objects.all()
-    if volt_services:
-        self._meta.get_field("owner").default = volt_services[0].id
-    super(VOLTTenant, self).__init__(*args, **kwargs)
-    self.cached_vcpe = None
-
-@property
-def vcpe(self):
-    # TODO: hardcoded service dependency
-    from services.vsg.models import VSGTenant
-
-    vsg = None
-    for link in self.subscribed_links:
-        # cast from base class to derived class
-        vsgs = VSGTenant.objects.filter(serviceinstance_ptr=link.provider_service_instance)
-        if vsgs:
-            vsg = vsgs[0]
-
-    if not vsg:
-        return None
-
-    # always return the same object when possible
-    if (self.cached_vcpe) and (self.cached_vcpe.id == vsg.id):
-        return self.cached_vcpe
-
-    vsg.caller = self.creator
-    self.cached_vcpe = vsg
-    return vsg
-
-@vcpe.setter
-def vcpe(self, value):
-    raise XOSConfigurationError("vOLT.vCPE cannot be set this way -- create a new vCPE object and set its subscriber_tenant instead")
-
-@property
-def subscriber(self):
-    for link in self.provided_links:
-        # cast from base class to derived class
-        roots = CordSubscriberRoot.objects.filter(serviceinstance_ptr=link.subscriber_service_instance)
-        if roots:
-            return roots[0]
-    return None
-
-def save(self, *args, **kwargs):
-    if not self.creator:
-        if not getattr(self, "caller", None):
-            # caller must be set when creating a vCPE since it creates a slice
-            raise XOSProgrammingError("VOLTTenant's self.caller was not set")
-        self.creator = self.caller
-        if not self.creator:
-            raise XOSProgrammingError("VOLTTenant's self.creator was not set")
-
-    super(VOLTTenant, self).save(*args, **kwargs)
diff --git a/xos/header.py b/xos/header.py
deleted file mode 120000
index 721b5c0..0000000
--- a/xos/header.py
+++ /dev/null
@@ -1 +0,0 @@
-attic/header.py
\ No newline at end of file
diff --git a/xos/synchronizer/Dockerfile.synchronizer b/xos/synchronizer/Dockerfile.synchronizer
deleted file mode 100644
index a9d5e65..0000000
--- a/xos/synchronizer/Dockerfile.synchronizer
+++ /dev/null
@@ -1,56 +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.
-
-
-# xosproject/volt-synchronizer
-
-FROM xosproject/xos-synchronizer-base:candidate
-
-ADD . /opt/xos/synchronizers/volt
-
-ENTRYPOINT []
-
-WORKDIR "/opt/xos/synchronizers/volt"
-
-# Label image
-ARG org_label_schema_schema_version=1.0
-ARG org_label_schema_name=volt-synchronizer
-ARG org_label_schema_version=unknown
-ARG org_label_schema_vcs_url=unknown
-ARG org_label_schema_vcs_ref=unknown
-ARG org_label_schema_build_date=unknown
-ARG org_opencord_vcs_commit_date=unknown
-ARG org_opencord_component_chameleon_version=unknown
-ARG org_opencord_component_chameleon_vcs_url=unknown
-ARG org_opencord_component_chameleon_vcs_ref=unknown
-ARG org_opencord_component_xos_version=unknown
-ARG org_opencord_component_xos_vcs_url=unknown
-ARG org_opencord_component_xos_vcs_ref=unknown
-
-LABEL org.label-schema.schema-version=$org_label_schema_schema_version \
-      org.label-schema.name=$org_label_schema_name \
-      org.label-schema.version=$org_label_schema_version \
-      org.label-schema.vcs-url=$org_label_schema_vcs_url \
-      org.label-schema.vcs-ref=$org_label_schema_vcs_ref \
-      org.label-schema.build-date=$org_label_schema_build_date \
-      org.opencord.vcs-commit-date=$org_opencord_vcs_commit_date \
-      org.opencord.component.chameleon.version=$org_opencord_component_chameleon_version \
-      org.opencord.component.chameleon.vcs-url=$org_opencord_component_chameleon_vcs_url \
-      org.opencord.component.chameleon.vcs-ref=$org_opencord_component_chameleon_vcs_ref \
-      org.opencord.component.xos.version=$org_opencord_component_xos_version \
-      org.opencord.component.xos.vcs-url=$org_opencord_component_xos_vcs_url \
-      org.opencord.component.xos.vcs-ref=$org_opencord_component_xos_vcs_ref
-
-CMD bash -c "cd /opt/xos/synchronizers/volt; ./run.sh"
diff --git a/xos/synchronizer/model-deps b/xos/synchronizer/model-deps
deleted file mode 100644
index 0967ef4..0000000
--- a/xos/synchronizer/model-deps
+++ /dev/null
@@ -1 +0,0 @@
-{}
diff --git a/xos/synchronizer/model_policies/model_policy_volttenant.py b/xos/synchronizer/model_policies/model_policy_volttenant.py
deleted file mode 100644
index ef5ba4e..0000000
--- a/xos/synchronizer/model_policies/model_policy_volttenant.py
+++ /dev/null
@@ -1,94 +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 synchronizers.new_base.modelaccessor import *
-from synchronizers.new_base.policy import Policy
-
-class VOLTTenantPolicy(Policy):
-    model_name = "VOLTTenant"
-
-    def handle_create(self, tenant):
-        return self.handle_update(tenant)
-
-    def handle_update(self, tenant):
-        self.manage_vsg(tenant)
-        self.manage_subscriber(tenant)
-        self.cleanup_orphans(tenant)
-
-    def handle_delete(self, tenant):
-        if tenant.vcpe:
-            tenant.vcpe.delete()
-
-    def manage_vsg(self, tenant):
-        # Each VOLT object owns exactly one VCPE object
-
-        if tenant.deleted:
-            self.logger.info("MODEL_POLICY: volttenant %s deleted, deleting vsg" % tenant)
-            return
-
-        # Check to see if the wrong s-tag is set. This can only happen if the
-        # user changed the s-tag after the VoltTenant object was created.
-        if tenant.vcpe and tenant.vcpe.instance:
-            s_tags = Tag.objects.filter(content_type=tenant.vcpe.instance.self_content_type_id,
-                                        object_id=tenant.vcpe.instance.id, name="s_tag")
-            if s_tags and (s_tags[0].value != str(tenant.s_tag)):
-                self.logger.info("MODEL_POLICY: volttenant %s s_tag changed, deleting vsg" % tenant)
-                tenant.vcpe.delete()
-
-        if tenant.vcpe is None:
-            vsgServices = VSGService.objects.all()
-            if not vsgServices:
-                raise XOSConfigurationError("No VSG Services available")
-
-            self.logger.info("MODEL_POLICY: volttenant %s creating vsg" % tenant)
-
-            vcpe = VSGTenant(owner=vsgServices[0])
-            vcpe.creator = tenant.creator
-            vcpe.save()
-            link = ServiceInstanceLink(provider_service_instance = vcpe, subscriber_service_instance = tenant)
-            link.save()
-
-    def manage_subscriber(self, tenant):
-        # check for existing link to a root
-        links = tenant.provided_links.all()
-        for link in links:
-            roots = CordSubscriberRoot.objects.filter(id = link.subscriber_service_instance.id)
-            if roots:
-                return
-
-        subs = CordSubscriberRoot.objects.filter(service_specific_id = tenant.service_specific_id)
-        if subs:
-            self.logger.info("MODEL_POLICY: volttenant %s using existing subscriber root" % tenant)
-            sub = subs[0]
-        else:
-            self.logger.info("MODEL_POLICY: volttenant %s creating new subscriber root" % tenant)
-            sub = CordSubscriberRoot(service_specific_id = tenant.service_specific_id,
-                                     name = "autogenerated-for-vOLT-%s" % tenant.id)
-            sub.save()
-
-        link = ServiceInstanceLink(provider_service_instance = tenant, subscriber_service_instance = sub)
-        link.save()
-
-    def cleanup_orphans(self, tenant):
-        # ensure vOLT only has one vCPE
-        cur_vcpe = tenant.vcpe
-
-        links = tenant.subscribed_links.all()
-        for link in links:
-            vsgs = VSGTenant.objects.filter(id = link.provider_service_instance.id)
-            for vsg in vsgs:
-                if (not cur_vcpe) or (vsg.id != cur_vcpe.id):
-                    vsg.delete()
diff --git a/xos/synchronizer/run.sh b/xos/synchronizer/run.sh
deleted file mode 100755
index 2f90845..0000000
--- a/xos/synchronizer/run.sh
+++ /dev/null
@@ -1,17 +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.
-
-
-python volt-synchronizer.py
diff --git a/xos/synchronizer/volt-synchronizer.py b/xos/synchronizer/volt-synchronizer.py
deleted file mode 100755
index 25ab599..0000000
--- a/xos/synchronizer/volt-synchronizer.py
+++ /dev/null
@@ -1,32 +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.
-
-
-#!/usr/bin/env python
-
-# This imports and runs ../../xos-observer.py
-
-import importlib
-import os
-import sys
-from xosconfig import Config
-
-config_file = os.path.abspath(os.path.dirname(os.path.realpath(__file__)) + '/volt_config.yaml')
-Config.init(config_file, 'synchronizer-config-schema.yaml')
-
-observer_path = os.path.join(os.path.dirname(os.path.realpath(__file__)),"../../synchronizers/new_base")
-sys.path.append(observer_path)
-mod = importlib.import_module("xos-synchronizer")
-mod.main()
diff --git a/xos/synchronizer/volt_config.yaml b/xos/synchronizer/volt_config.yaml
deleted file mode 100644
index fdcd31f..0000000
--- a/xos/synchronizer/volt_config.yaml
+++ /dev/null
@@ -1,22 +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.
-
-
-name: volt-synchronizer
-accessor:
-  username: xosadmin@opencord.org
-  password: "@/opt/xos/services/volt/credentials/xosadmin@opencord.org"
-dependency_graph: "/opt/xos/synchronizers/volt/model-deps"
-model_policies_dir: "/opt/xos/synchronizers/volt/model_policies"
\ No newline at end of file
diff --git a/xos/templates/voltadmin.html b/xos/templates/voltadmin.html
deleted file mode 100644
index b971d15..0000000
--- a/xos/templates/voltadmin.html
+++ /dev/null
@@ -1,28 +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.
--->
-
-
-<div class = "row text-center">
-    <div class="col-xs-12">
-        <a href="/admin/volt/volttenant/">vOLT Tenants</a>
-    </div><div class="col-xs-12">
-        <a href="/admin/volt/voltdevice/">vOLT Devices</a>
-    </div><div class="col-xs-12">
-        <a href="/admin/volt/accessagent/">vOLT Access Agents</a>
-    </div>
-</div>
-
diff --git a/xos/tosca/resources/CORDSubscriber.py b/xos/tosca/resources/CORDSubscriber.py
deleted file mode 100644
index 69f6652..0000000
--- a/xos/tosca/resources/CORDSubscriber.py
+++ /dev/null
@@ -1,32 +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 core.models import User, TenantRootPrivilege, TenantRootRole
-from services.rcord.models import CordSubscriberRoot
-from xosresource import XOSResource
-
-class XOSCORDSubscriber(XOSResource):
-    provides = "tosca.nodes.CORDSubscriber"
-    xos_model = CordSubscriberRoot
-    copyin_props = ["service_specific_id", "firewall_enable", "url_filter_enable", "cdn_enable", "url_filter_level"]
-
-#    def postprocess(self, obj):
-#        rolemap = ( ("tosca.relationships.AdminPrivilege", "admin"), ("tosca.relationships.AccessPrivilege", "access"), )
-#        self.postprocess_privileges(TenantRootRole, TenantRootPrivilege, rolemap, obj, "tenant_root")
-
-    def can_delete(self, obj):
-        return super(XOSCORDSubscriber, self).can_delete(obj)
-
diff --git a/xos/tosca/resources/CORDUser.py b/xos/tosca/resources/CORDUser.py
deleted file mode 100644
index 2a061bb..0000000
--- a/xos/tosca/resources/CORDUser.py
+++ /dev/null
@@ -1,71 +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 core.models import User
-from services.rcord.models import CordSubscriberRoot
-
-from xosresource import XOSResource
-
-class XOSCORDUser(XOSResource):
-    provides = "tosca.nodes.CORDUser"
-
-    def get_model_class_name(self):
-        return "CORDUser"
-
-    def get_subscriber_root(self, throw_exception=True):
-        sub_name = self.get_requirement("tosca.relationships.SubscriberDevice", throw_exception=throw_exception)
-        sub = self.get_xos_object(CordSubscriberRoot, name=sub_name, throw_exception=throw_exception)
-        return sub
-
-    def get_existing_objs(self):
-        result = []
-        sub = self.get_subscriber_root(throw_exception=False)
-        if not sub:
-           return []
-        for user in sub.devices:
-            if user["name"] == self.obj_name:
-                result.append(user)
-        return result
-
-    def get_xos_args(self):
-        args = {"name": self.obj_name,
-                "level": self.get_property("level"),
-                "mac": self.get_property("mac")}
-        return args
-
-
-    def create(self):
-        xos_args = self.get_xos_args()
-        sub = self.get_subscriber_root()
-
-        sub.create_device(**xos_args)
-        sub.save()
-
-        self.info("Created CORDUser %s for Subscriber %s" % (self.obj_name, sub.name))
-
-    def update(self, obj):
-        pass
-
-    def delete(self, obj):
-        if (self.can_delete(obj)):
-            self.info("destroying CORDUser %s" % obj["name"])
-            sub = self.get_subscriber_root()
-            sub.delete_user(obj["id"])
-            sub.save()
-
-    def can_delete(self, obj):
-        return True
-
diff --git a/xos/tosca/resources/VOLTTenant.py b/xos/tosca/resources/VOLTTenant.py
deleted file mode 100644
index 856d990..0000000
--- a/xos/tosca/resources/VOLTTenant.py
+++ /dev/null
@@ -1,61 +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 core.models import User, ServiceInstanceLink
-from services.volt.models import VOLTTenant, VOLTService, VOLT_KIND
-from services.rcord.models import CordSubscriberRoot
-
-from xosresource import XOSResource
-
-class XOSVOLTTenant(XOSResource):
-    provides = "tosca.nodes.VOLTTenant"
-    xos_model = VOLTTenant
-    copyin_props = ["service_specific_id", "s_tag", "c_tag"]
-    name_field = None
-
-    def get_xos_args(self, throw_exception=True):
-        args = super(XOSVOLTTenant, self).get_xos_args()
-
-        provider_name = self.get_requirement("tosca.relationships.MemberOfService", throw_exception=throw_exception)
-        if provider_name:
-            args["owner"] = self.get_xos_object(VOLTService, 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("owner", None)
-        service_specific_id = args.get("service_specific_id", None)
-        if (provider_service) and (service_specific_id):
-            existing_obj = self.get_xos_object(VOLTTenant, owner=provider_service, service_specific_id=service_specific_id, throw_exception=False)
-            if existing_obj:
-                return [ existing_obj ]
-        return []
-
-    def postprocess(self, obj):
-        subscriber_name = self.get_requirement("tosca.relationships.BelongsToSubscriber")
-        if subscriber_name:
-            subscriber = self.get_xos_object(CordSubscriberRoot, throw_exception=True, name=subscriber_name)
-
-            links = ServiceInstanceLink.objects.filter(provider_service_instance = obj,
-                                                       subscriber_service_instance = subscriber)
-            if not links:
-                link = ServiceInstanceLink(provider_service_instance = obj, subscriber_service_instance = subscriber)
-                link.save()
-
-    def can_delete(self, obj):
-        return super(XOSVOLTTenant, self).can_delete(obj)
-
diff --git a/xos/tosca/resources/accessagent.py b/xos/tosca/resources/accessagent.py
deleted file mode 100644
index fedf959..0000000
--- a/xos/tosca/resources/accessagent.py
+++ /dev/null
@@ -1,65 +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 services.volt.models import AccessAgent, VOLTDevice, VOLTService, AgentPortMapping
-from xosresource import XOSResource
-
-class XOSAccessAgent(XOSResource):
-    provides = "tosca.nodes.AccessAgent"
-    xos_model = AccessAgent
-    copyin_props = ["mac"]
-
-    def get_xos_args(self, throw_exception=True):
-        args = super(XOSAccessAgent, self).get_xos_args()
-
-        volt_service_name = self.get_requirement("tosca.relationships.MemberOfService", throw_exception=throw_exception)
-        if volt_service_name:
-            args["volt_service"] = self.get_xos_object(VOLTService, throw_exception=throw_exception, name=volt_service_name)
-
-        return args
-
-    def postprocess(self, obj):
-        # For convenient, allow the port mappings to be specified by a Tosca
-        # string with commas between lines.
-        #      <port> <mac>,
-        #      <port> <mac>,
-        #      ...
-        #      <port> <mac>
-
-        port_mappings_str = self.get_property("port_mappings")
-        port_mappings = []
-        if port_mappings_str:
-            lines = [x.strip() for x in port_mappings_str.split(",")]
-            for line in lines:
-                if not (" " in line):
-                    raise "Malformed port mapping `%s`", line
-                (port, mac) = line.split(" ")
-                port=port.strip()
-                mac=mac.strip()
-                port_mappings.append( (port, mac) )
-
-            for apm in list(AgentPortMapping.objects.filter(access_agent=obj)):
-                if (apm.port, apm.mac) not in port_mappings:
-                    print "Deleting AgentPortMapping '%s'" % apm
-                    apm.delete()
-
-            for port_mapping in port_mappings:
-                existing_objs = AgentPortMapping.objects.filter(access_agent=obj, port=port_mapping[0], mac=port_mapping[1])
-                if not existing_objs:
-                    apm = AgentPortMapping(access_agent=obj, port=port_mapping[0], mac=port_mapping[1])
-                    apm.save()
-                    print "Created AgentPortMapping '%s'" % apm
-
diff --git a/xos/tosca/resources/accessdevice.py b/xos/tosca/resources/accessdevice.py
deleted file mode 100644
index a9fd999..0000000
--- a/xos/tosca/resources/accessdevice.py
+++ /dev/null
@@ -1,49 +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 services.volt.models import AccessDevice, VOLTDevice
-from xosresource import XOSResource
-
-class XOSAccessDevice(XOSResource):
-    provides = "tosca.nodes.AccessDevice"
-    xos_model = AccessDevice
-    copyin_props = ["uplink", "vlan"]
-    name_field = None
-
-    def get_xos_args(self, throw_exception=True):
-        args = super(XOSAccessDevice, self).get_xos_args()
-
-        volt_device_name = self.get_requirement("tosca.relationships.MemberOfDevice", throw_exception=throw_exception)
-        if volt_device_name:
-            args["volt_device"] = self.get_xos_object(VOLTDevice, throw_exception=throw_exception, name=volt_device_name)
-
-        return args
-
-    # AccessDevice has no name field, so we rely on matching the keys. We assume
-    # the for a given VOLTDevice, there is only one AccessDevice per (uplink, vlan)
-    # pair.
-
-    def get_existing_objs(self):
-        args = self.get_xos_args(throw_exception=False)
-        volt_device = args.get("volt_device", None)
-        uplink = args.get("uplink", None)
-        vlan = args.get("vlan", None)
-        if (volt_device is not None) and (uplink is not None) and (vlan is not None):
-            existing_obj = self.get_xos_object(AccessDevice, volt_device=volt_device, uplink=uplink, vlan=vlan, throw_exception=False)
-            if existing_obj:
-                return [ existing_obj ]
-        return []
-
diff --git a/xos/tosca/resources/voltdevice.py b/xos/tosca/resources/voltdevice.py
deleted file mode 100644
index ef3d05e..0000000
--- a/xos/tosca/resources/voltdevice.py
+++ /dev/null
@@ -1,61 +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 services.volt.models import VOLTDevice, VOLTService, AccessDevice, AccessAgent
-from xosresource import XOSResource
-
-class XOSVOLTDevice(XOSResource):
-    provides = "tosca.nodes.VOLTDevice"
-    xos_model = VOLTDevice
-    copyin_props = ["openflow_id", "driver"]
-
-    def get_xos_args(self, throw_exception=True):
-        args = super(XOSVOLTDevice, self).get_xos_args()
-
-        volt_service_name = self.get_requirement("tosca.relationships.MemberOfService", throw_exception=throw_exception)
-        if volt_service_name:
-            args["volt_service"] = self.get_xos_object(VOLTService, throw_exception=throw_exception, name=volt_service_name)
-
-        agent_name = self.get_requirement("tosca.relationships.UsesAgent", throw_exception=throw_exception)
-        if agent_name:
-            args["access_agent"] = self.get_xos_object(AccessAgent, throw_exception=throw_exception, name=agent_name)
-
-        return args
-
-    def postprocess(self, obj):
-        access_devices_str = self.get_property("access_devices")
-        access_devices = []
-        if access_devices_str:
-            lines = [x.strip() for x in access_devices_str.split(",")]
-            for line in lines:
-                if not (" " in line):
-                    raise "Malformed access device `%s`", line
-                (uplink, vlan) = line.split(" ")
-                uplink=int(uplink.strip())
-                vlan=int(vlan.strip())
-                access_devices.append( (uplink, vlan) )
-
-            for ad in list(AccessDevice.objects.filter(volt_device=obj)):
-                if (ad.uplink, ad.vlan) not in access_devices:
-                    print "Deleting AccessDevice '%s'" % ad
-                    ad.delete()
-
-            for access_device in access_devices:
-                existing_objs = AccessDevice.objects.filter(volt_device=obj, uplink=access_device[0], vlan=access_device[1])
-                if not existing_objs:
-                    ad = AccessDevice(volt_device=obj, uplink=access_device[0], vlan=access_device[1])
-                    ad.save()
-                    print "Created AccessDevice '%s'" % ad
diff --git a/xos/tosca/resources/voltservice.py b/xos/tosca/resources/voltservice.py
deleted file mode 100644
index cc28c35..0000000
--- a/xos/tosca/resources/voltservice.py
+++ /dev/null
@@ -1,23 +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 services.volt.models import VOLTService
-from service import XOSService
-
-class XOSVOLTService(XOSService):
-    provides = "tosca.nodes.VOLTService"
-    xos_model = VOLTService
-    copyin_props = ["view_url", "icon_url", "kind", "enabled", "published", "public_key", "private_key_fn", "versionNumber"]
diff --git a/xos/volt-onboard.yaml b/xos/volt-onboard.yaml
deleted file mode 100644
index 85b9aef..0000000
--- a/xos/volt-onboard.yaml
+++ /dev/null
@@ -1,39 +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.
-
-
-tosca_definitions_version: tosca_simple_yaml_1_0
-
-description: Onboard the exampleservice
-
-imports:
-   - custom_types/xos.yaml
-
-topology_template:
-  node_templates:
-    servicecontroller#volt:
-      type: tosca.nodes.ServiceController
-      properties:
-          base_url: file:///opt/xos_services/olt/xos/
-          # The following will concatenate with base_url automatically, if
-          # base_url is non-null.
-          xproto: ./
-          admin: admin.py
-          admin_template: templates/voltadmin.html
-          #synchronizer: synchronizer/manifest
-          tosca_resource: tosca/resources/voltdevice.py, tosca/resources/voltservice.py, tosca/resources/CORDSubscriber.py, tosca/resources/CORDUser.py, tosca/resources/VOLTTenant.py, tosca/resources/accessagent.py, tosca/resources/accessdevice.py
-          private_key: file:///opt/xos/key_import/volt_rsa
-          public_key: file:///opt/xos/key_import/volt_rsa.pub
-
diff --git a/xos/volt.xproto b/xos/volt.xproto
deleted file mode 100644
index e1f5ddf..0000000
--- a/xos/volt.xproto
+++ /dev/null
@@ -1,49 +0,0 @@
-option name = "volt";
-
-message VOLTService (Service){
-     option verbose_name = "vOLT Service";
-     option kind = "vOLT";
-}
-
-message VOLTTenant (ServiceInstance){
-     option kind = "vOLT";
-     option verbose_name = "vOLT Tenant";
-
-     optional int32 s_tag = 1 [help_text = "s-tag", null = True, db_index = False, blank = True];
-     optional int32 c_tag = 2 [help_text = "c-tag", null = True, db_index = False, blank = True];
-     optional manytoone creator->User:created_volts = 3 [db_index = True, null = True, blank = True];
-}
-
-message AccessAgent (XOSBase){
-     option verbose_name = "Access Agent";
-
-     required string name = 1 [help_text = "name of agent", max_length = 254, null = False, db_index = False, blank = False];
-     required manytoone volt_service->VOLTService:access_agents = 2 [db_index = True, null = False, blank = False];
-     optional string mac = 3 [help_text = "MAC Address or Access Agent", max_length = 32, null = True, db_index = False, blank = True];
-}
-
-message VOLTDevice (XOSBase){
-     option verbose_name = "vOLT Device";
-
-     required string name = 1 [help_text = "name of device", max_length = 254, null = False, db_index = False, blank = False];
-     required manytoone volt_service->VOLTService:volt_devices = 2 [db_index = True, null = False, blank = False];
-     optional string openflow_id = 3 [help_text = "OpenFlow ID", max_length = 254, null = True, db_index = False, blank = True];
-     optional string driver = 4 [help_text = "driver", max_length = 254, null = True, db_index = False, blank = True];
-     optional manytoone access_agent->AccessAgent:volt_devices = 5 [db_index = True, null = True, blank = True];
-}
-
-message AccessDevice (XOSBase){
-     option verbose_name = "Access Device";
-
-     required manytoone volt_device->VOLTDevice:access_devices = 1 [db_index = True, null = False, blank = False];
-     optional int32 uplink = 2 [db_index = False, null = True, blank = True];
-     optional int32 vlan = 3 [db_index = False, null = True, blank = True];
-}
-
-message AgentPortMapping (XOSBase){
-     option verbose_name = "Agent Port Mapping";
-
-     required manytoone access_agent->AccessAgent:port_mappings = 1 [db_index = True, null = False, blank = False];
-     optional string mac = 2 [help_text = "MAC Address", max_length = 32, null = True, db_index = False, blank = True];
-     optional string port = 3 [help_text = "Openflow port ID", max_length = 32, null = True, db_index = False, blank = True];
-}
