diff --git a/samples/subscriber.yaml b/samples/subscriber.yaml
index 1c38756..6f06781 100644
--- a/samples/subscriber.yaml
+++ b/samples/subscriber.yaml
@@ -26,6 +26,5 @@
       properties:
         name: My House
         c_tag: 111
-        onu_device: 691d51a676f348319ca91972bc2bddcf
-        mac_address: 00:AA:00:00:00:01
-        ip_address: 10.8.2.1
+        s_tag: 222 
+        onu_device: BRCM1234 
diff --git a/xos/synchronizer/event_steps/onu_event.py b/xos/synchronizer/event_steps/onu_event.py
deleted file mode 100644
index 70181ed..0000000
--- a/xos/synchronizer/event_steps/onu_event.py
+++ /dev/null
@@ -1,78 +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.
-
-
-import json
-import time
-import os
-import sys
-from synchronizers.new_base.eventstep import EventStep
-from synchronizers.new_base.modelaccessor import VOLTService, ONUDevice, Service, model_accessor
-
-# from xos.exceptions import XOSValidationError
-
-class ONUEventStep(EventStep):
-    topics = ["onu.events"]
-    technology = "kafka"
-
-    max_onu_retry = 50
-
-    def __init__(self, *args, **kwargs):
-        super(ONUEventStep, self).__init__(*args, **kwargs)
-
-    def get_oss_service(self, onu_serial_number, retry=0):
-        try:
-            onu = ONUDevice.objects.get(serial_number=onu_serial_number)
-        except IndexError as e:
-            self.log.info("onu.events: get_oss_service", retry=retry, max_onu_retry=self.max_onu_retry)
-            if retry < self.max_onu_retry:
-                self.log.info("onu.events: No ONUDevice with serial_number %s is present in XOS, keep trying" % onu_serial_number)
-                time.sleep(10)
-                return self.get_oss_service(onu_serial_number, retry + 1)
-            else:
-                raise Exception("onu.events: No ONUDevice with serial_number %s is present in XOS" % onu_serial_number)
-
-        volt_service = onu.pon_port.olt_device.volt_service
-        service = Service.objects.get(id=volt_service.id)
-        osses = [s for s in service.subscriber_services if s.kind.lower() == "oss"]
-
-        if len(osses) > 1:
-            self.log.warn("onu.events: More than one OSS found for %s" % volt_service.name)
-        try:
-            return osses[0].leaf_model
-        except IndexError as e:
-            return None
-
-    def handle_onu_activate_event(self, event):
-        oss = self.get_oss_service(event["serial_number"])
-
-        if not oss:
-            self.log.info("onu.events: Not processing events as no OSS service is present (is it a provider of vOLT?")
-        else:
-            try:
-                self.log.info("onu.events: Calling OSS for ONUDevice with serial_number %s" % event["serial_number"])
-                oss.validate_onu(event)
-            except Exception, e:
-                self.log.exception("onu.events: Failing to validate ONU in OSS Service %s" % oss.name, onu_serial_number=event["serial_number"])
-                raise e
-
-    def process_event(self, event):
-        value = json.loads(event.value)
-        self.log.info("onu.events: received event", value=value)
-
-        if value["status"] == "activated":
-            self.log.info("onu.events: activate onu", value=value)
-            self.handle_onu_activate_event(value)
-
diff --git a/xos/synchronizer/event_steps/test_onu_events.py b/xos/synchronizer/event_steps/test_onu_events.py
deleted file mode 100644
index 805b39d..0000000
--- a/xos/synchronizer/event_steps/test_onu_events.py
+++ /dev/null
@@ -1,135 +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.
-
-import unittest
-from mock import patch, call, Mock, PropertyMock
-import json
-
-import os, sys
-
-# Hack to load synchronizer framework
-test_path=os.path.abspath(os.path.dirname(os.path.realpath(__file__)))
-xos_dir=os.path.join(test_path, "../../..")
-if not os.path.exists(os.path.join(test_path, "new_base")):
-    xos_dir=os.path.join(test_path, "../../../../../../orchestration/xos/xos")
-    services_dir = os.path.join(xos_dir, "../../xos_services")
-sys.path.append(xos_dir)
-sys.path.append(os.path.join(xos_dir, 'synchronizers', 'new_base'))
-# END Hack to load synchronizer framework
-
-# generate model from xproto
-def get_models_fn(service_name, xproto_name):
-    name = os.path.join(service_name, "xos", xproto_name)
-    if os.path.exists(os.path.join(services_dir, name)):
-        return name
-    else:
-        name = os.path.join(service_name, "xos", "synchronizer", "models", xproto_name)
-        if os.path.exists(os.path.join(services_dir, name)):
-            return name
-    raise Exception("Unable to find service=%s xproto=%s" % (service_name, xproto_name))
-# END generate model from xproto
-
-class TestSyncOLTDevice(unittest.TestCase):
-
-    def setUp(self):
-        global DeferredException
-
-        self.sys_path_save = sys.path
-        sys.path.append(xos_dir)
-        sys.path.append(os.path.join(xos_dir, 'synchronizers', 'new_base'))
-
-        # Setting up the config module
-        from xosconfig import Config
-        config = os.path.join(test_path, "../model_policies/test_config.yaml")
-        Config.clear()
-        Config.init(config, "synchronizer-config-schema.yaml")
-        # END Setting up the config module
-
-        from synchronizers.new_base.mock_modelaccessor_build import build_mock_modelaccessor
-        # build_mock_modelaccessor(xos_dir, services_dir, [get_models_fn("olt-service", "volt.xproto")])
-
-        # FIXME this is to get jenkins to pass the tests, somehow it is running tests in a different order
-        # and apparently it is not overriding the generated model accessor
-        build_mock_modelaccessor(xos_dir, services_dir, [get_models_fn("olt-service", "volt.xproto"),
-                                                         get_models_fn("vsg", "vsg.xproto"),
-                                                         get_models_fn("../profiles/rcord", "rcord.xproto")])
-        import synchronizers.new_base.modelaccessor
-        from onu_event import ONUEventStep, model_accessor
-
-        # import all class names to globals
-        for (k, v) in model_accessor.all_model_classes.items():
-            globals()[k] = v
-
-        self.log = Mock()
-
-        self.event_step = ONUEventStep(self.log)
-
-        self.event = Mock()
-        self.event.value = json.dumps({
-            'status': 'activated',
-            'serial_number': 'BRCM1234',
-            'uni_port_of_id': 'of:00100101',
-            'of_dpid': 'of:109299321'
-        })
-
-        self.onu = Mock()
-        self.onu.serial_number = "BRCM1234"
-        self.onu.pon_port.olt_device.volt_service.id = 1
-
-        self.service = Mock(id=1)
-        self.service.subscriber_services = []
-
-        self.oss = Mock()
-        self.oss.kind = "OSS"
-        self.oss.leaf_model = Mock()
-
-    def tearDown(self):
-        self.service.subscriber_services = []
-
-    def test_missing_onu(self):
-        self.event_step.max_onu_retry = 0
-        with patch.object(ONUDevice.objects, "get_items") as onu_device_mock:
-            onu_device_mock.side_effect = IndexError("No ONU")
-
-        with self.assertRaises(Exception) as e:
-            self.event_step.process_event(self.event)
-
-        self.assertEqual(e.exception.message, "onu.events: No ONUDevice with serial_number %s is present in XOS" % self.onu.serial_number)
-
-    def test_do_nothing(self):
-        with patch.object(ONUDevice.objects, "get_items") as onu_device_mock , \
-            patch.object(Service.objects, "get_items") as service_mock, \
-            patch.object(self.log, "info") as logInfo:
-
-            onu_device_mock.return_value = [self.onu]
-            service_mock.return_value = [self.service]
-
-            self.event_step.process_event(self.event)
-
-            logInfo.assert_called_with("onu.events: Not processing events as no OSS service is present (is it a provider of vOLT?")
-
-    def test_call_oss(self):
-        self.service.subscriber_services = [self.oss]
-
-        with patch.object(ONUDevice.objects, "get_items") as onu_device_mock , \
-            patch.object(Service.objects, "get_items") as service_mock, \
-            patch.object(self.oss.leaf_model, "validate_onu") as validate_onu:
-
-            onu_device_mock.return_value = [self.onu]
-
-            service_mock.return_value = [self.service]
-
-            self.event_step.process_event(self.event)
-
-            validate_onu.assert_called_with(json.loads(self.event.value))
diff --git a/xos/synchronizer/models/volt.xproto b/xos/synchronizer/models/volt.xproto
index 6871a3b..a1fb0dc 100644
--- a/xos/synchronizer/models/volt.xproto
+++ b/xos/synchronizer/models/volt.xproto
@@ -31,7 +31,7 @@
     optional string admin_state = 11 [help_text = "admin_state", null = True, db_index = False, blank = False, feedback_state = True];
     optional string oper_status = 12 [help_text = "oper_status", null = True, db_index = False, blank = False, feedback_state = True];
     optional string of_id = 13 [help_text = "openflow id", null = True, db_index = False, blank = False, feedback_state = True];
-    optional string dp_id = 14 [help_text = "datapath id", null = True, db_index = False, blank = False, feedback_state = True];
+    optional string dp_id = 14 [help_text = "datapath id", null = True, db_index = False, blank = False];
 
     required string uplink = 15 [help_text = "uplink port", null = False, db_index = False, blank = False];
     required string driver = 16 [default="voltha", help_text = "Olt driver", null = True, db_index = False, blank = False];
