Workflow-driver for VOLTHA2.x and EPON adapter

Change-Id: I6ecb60014f005f7691d2c7ccd1c1ef56de79a5d4
diff --git a/Dockerfile.synchronizer b/Dockerfile.synchronizer
new file mode 100644
index 0000000..136ec71
--- /dev/null
+++ b/Dockerfile.synchronizer
@@ -0,0 +1,61 @@
+# Copyright 2020-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.
+
+# docker build -t xosproject/ntt-workflow-driver-synchronizer:candidate -f Dockerfile.synchronizer .
+
+# xosproject/ntt-workflow-driver-synchronizer
+
+FROM xosproject/alpine-grpc-base:0.9.0
+
+# Install pip packages
+COPY requirements.txt /tmp/requirements.txt
+RUN pip install -r /tmp/requirements.txt \
+ && pip freeze > /var/xos/pip_freeze_ntt_workflow_driver_service_`date -u +%Y%m%dT%H%M%S`
+
+# Copy files
+COPY xos/synchronizer /opt/xos/synchronizers/ntt-workflow-driver
+COPY VERSION /opt/xos/synchronizers/ntt-workflow-driver/
+
+WORKDIR "/opt/xos/synchronizers/ntt-workflow-driver"
+
+# Label image
+ARG org_label_schema_schema_version=1.0
+ARG org_label_schema_name=ntt-workflow-driver-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 ["/usr/bin/python", "/opt/xos/synchronizers/ntt-workflow-driver/ntt-workflow-driver-synchronizer.py"]
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 0000000..785250d
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright 2020 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.
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..286194f
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,84 @@
+# Copyright 2020-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.
+
+# Configure shell
+SHELL = bash -e -o pipefail
+
+# Variables
+VERSION                  ?= $(shell cat ./VERSION)
+SERVICE_NAME             ?= $(notdir $(abspath .))
+SYNCHRONIZER_NAME        ?= ntt-workflow-driver-synchronizer
+
+## Docker related
+DOCKER_REGISTRY          ?=
+DOCKER_REPOSITORY        ?=
+DOCKER_BUILD_ARGS        ?=
+DOCKER_TAG               ?= ${VERSION}
+DOCKER_IMAGENAME         := ${DOCKER_REGISTRY}${DOCKER_REPOSITORY}${SYNCHRONIZER_NAME}:${DOCKER_TAG}
+
+## Docker labels. Only set ref and commit date if committed
+DOCKER_LABEL_VCS_URL     ?= $(shell git remote get-url $(shell git remote))
+DOCKER_LABEL_VCS_REF     ?= $(shell git diff-index --quiet HEAD -- && git rev-parse HEAD || echo "unknown")
+DOCKER_LABEL_COMMIT_DATE ?= $(shell git diff-index --quiet HEAD -- && git show -s --format=%cd --date=iso-strict HEAD || echo "unknown" )
+DOCKER_LABEL_BUILD_DATE  ?= $(shell date -u "+%Y-%m-%dT%H:%M:%SZ")
+
+## Migration related - paths are relative to the xos subdirectory within this repo
+XOS_DIR                  ?= "../../../xos"
+SERVICES_DIR             ?= "../.."
+
+all: test
+
+docker-build:
+	docker build $(DOCKER_BUILD_ARGS) \
+    -t ${DOCKER_IMAGENAME} \
+    --build-arg org_label_schema_version="${VERSION}" \
+    --build-arg org_label_schema_vcs_url="${DOCKER_LABEL_VCS_URL}" \
+    --build-arg org_label_schema_vcs_ref="${DOCKER_LABEL_VCS_REF}" \
+    --build-arg org_label_schema_build_date="${DOCKER_LABEL_BUILD_DATE}" \
+    --build-arg org_opencord_vcs_commit_date="${DOCKER_LABEL_COMMIT_DATE}" \
+    -f Dockerfile.synchronizer .
+
+docker-push:
+	docker push ${DOCKER_IMAGENAME}
+
+test: test-unit test-migration test-xproto
+
+test-unit:
+	tox
+
+venv-service:
+	virtualenv $@;\
+    source ./$@/bin/activate ; set -u ;\
+    pip install -r requirements.txt xosmigrate~=4.0.0
+
+create-migration: venv-service
+	source ./venv-service/bin/activate; set -u;\
+    cd xos; xos-migrate --xos-dir ${XOS_DIR} --services-dir ${SERVICES_DIR} -s ${SERVICE_NAME}
+
+test-migration: venv-service
+	source ./venv-service/bin/activate; set -u;\
+    cd xos; xos-migrate --xos-dir ${XOS_DIR} --services-dir ${SERVICES_DIR} -s ${SERVICE_NAME} --check
+
+test-xproto: venv-service
+	source ./venv-service/bin/activate; set -u;\
+    xosgenx --lint --strict xos/synchronizer/models/ntt-workflow-driver.xproto
+
+clean:
+	find . -name '*.pyc' | xargs rm -f
+	rm -rf \
+    .tox \
+    venv-service \
+    xos/.coverage \
+    xos/coverage.xml \
+    xos/nose2-results.xml
diff --git a/VERSION b/VERSION
new file mode 100644
index 0000000..3eefcb9
--- /dev/null
+++ b/VERSION
@@ -0,0 +1 @@
+1.0.0
diff --git a/docs/README.md b/docs/README.md
new file mode 100644
index 0000000..f888b1f
--- /dev/null
+++ b/docs/README.md
@@ -0,0 +1,106 @@
+# NTT Workflow Driver Service
+
+This service implements the ONU and Subscriber management logic for a sample workflow to support the IEEE standard PON. 
+
+> NOTE1: This service depends on models contained in the R-CORD and OLT Services, so make sure that the `rcord-synchronizer` and `volt-synchronzier` are running
+
+> NOTE2: When this service runs, make sure that [`voltha-eponolt-adater`](https://github.com/opencord/voltha-eponolt-adapter) and [`voltha-epononu-adapter`](https://github.com/opencord/voltha-epononu-adapter) are used as VOLTHA adapter. 
+
+## Models
+
+This service is composed of the following models:
+
+- `NttWorkflowDriverServiceInstance`. This model holds various state associated with the state machine for validating a subscriber's ONU.
+    - `serial_number`. Serial number of ONU.
+    - NOTE: we might consider creating ONU always in APPROVED 
+    - `authentication_state`. [`AWAITING` | `STARTED` | `REQUESTED` | `APPROVED` | `DENIED`]. Current authentication state.
+    - `of_dpid`. OLT Openflow ID.
+    - `uni_port_id`. ONU UNI Port ID.
+    - `admin_onu_state`. [`AWAITING` | `ENABLED` | `DISABLED`]. ONU administrative state.
+    - `status_message`. Status text of current state machine state.
+    - `mac_address`. Subscriber mac address.
+    - `oper_onu_status`. [`AWAITING` | `ENABLED` | `DISABLED`]. ONU operational state.
+- `NttWorkflowDriverOltInformation`. This model holds various parameter associated with the detected OLTs.
+    - `of_dpid`. OLT mac address.
+    - `olt_location`. OLT location information. 
+    - `olt_package`. OLT package information (SIEPON package A or B). 
+    - `port_no`. Number of the port where the OLT was inserted. 
+- `NttWorkflowDriverWhiteListEntry`. This model holds a whitelist authorizing an ONU. The mac address authentication is implemented as package A and the IEEE802.1X authentication is implemented as package B. It is also possible to specify the range of the port number where the OLT is inserted. 
+    - `owner`. Relation to the NttWorkflowDriverService that owns this whitelist entry.
+    - `mac_address`. MAC address of ONU.
+    - `pon_port_from`. Starting port number where OLT insertion is allowed. 
+    - `pon_port_to`. Last port number where OLT insertion is allowed.
+
+## Example Tosca - Create a whitelist entry
+
+```yaml
+tosca_definitions_version: tosca_simple_yaml_1_0
+imports:
+  - custom_types/nttworkflowdriverwhitelistentry.yaml
+  - custom_types/nttworkflowdriverservice.yaml
+description: Create an entry in the whitelist
+topology_template:
+  node_templates:
+
+    service#nttworkflow:
+      type: tosca.nodes.NttWorkflowDriverService
+      properties:
+        name: ntt-workflow-driver
+        must-exist: true
+
+    whitelist:
+      type: tosca.nodes.NttWorkflowDriverWhiteListEntry
+      properties:
+        mac_address: 0a0a0a0a0a0a
+        pon_port_from: 536870912
+        pon_port_to: 536870915
+      requirements:
+        - owner:
+            node: service#nttworkflow
+            relationship: tosca.relationships.BelongsToOne
+```
+
+## Integration with other Services
+
+This service integrates closely with the `R-CORD` and `vOLT` services, directly manipulating models (`RCORDSubscriber`, `ONUDevice`, `TechnologyProfile`) in those services.
+
+## Synchronizer Workflows
+
+This synchronizer implements only event_steps and model_policies. It's job is to listen for events and execute a state machine associated with those events. Service Instances are created automatically when ONU events are received. As the state machine changes various states for authentication, etc., those changes will be propagated to the appropriate objects in the `R-CORD` and `vOLT` services.
+
+### Model Policy: NttWorkflowDriverServiceInstancePolicy
+
+This model policy is responsible for reacting to state changes that are caused by various event steps, implementing the state machine described above.
+
+### Event Step: ONUEventStep
+
+Listens on `onu.events` and updates the `onu_state` of `NttWorkflowDriverServiceInstance`. Listens on `authentication events` and updates the authentication_state fields of `NttWorkflowDriverServiceInstance`. Automatically creates `NttWorkflowDriverServiceInstance` and `NttWorkflowDriverOltInformation` as necessary.
+
+## Events format
+
+This events are generated by various applications running on top of ONOS and published on a Kafka bus.
+Here is the structure of the events and their topics.
+
+### onu.events
+
+```json
+{
+  "timestamp": "2018-09-11T01:00:49.506Z",
+  "status": "activated", // or disabled
+  "serialNumber": "ALPHe3d1cfde", // ONU serial number
+  "portNumber": "16", // uni port
+  "deviceId": "of:000000000a5a0072" // OLT OpenFlow Id
+}
+```
+
+### authentication.events
+
+```json
+{
+  "timestamp": "2018-09-11T00:41:47.483Z",
+  "deviceId": "of:000000000a5a0072", // OLT OpenFlow Id
+  "portNumber": "16", // uni port
+  "serialNumber": "ALPHe3d1cfde", // ONU serial number
+  "authenticationState": "STARTED" // REQUESTED, APPROVED, DENIED
+}
+```
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..f1569ab
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,3 @@
+xossynchronizer~=4.0.1
+xosapi~=4.0.1
+xoskafka~=4.0.1
diff --git a/samples/oss-service.yaml b/samples/oss-service.yaml
new file mode 100644
index 0000000..c4c043a
--- /dev/null
+++ b/samples/oss-service.yaml
@@ -0,0 +1,27 @@
+# Copyright 2020-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.
+
+# curl -H "xos-username: admin@opencord.org" -H "xos-password: letmein" -X POST --data-binary @oss-service.yaml http://192.168.99.100:30007/run
+
+tosca_definitions_version: tosca_simple_yaml_1_0
+imports:
+  - custom_types/nttworkflowdriverservice.yaml
+description: Create an instance of the OSS Service and connect it to the vOLT Service
+topology_template:
+  node_templates:
+    service#oss:
+      type: tosca.nodes.NttWorkflowDriverService
+      properties:
+        name: ntt-workflow-driver
+        kind: oss
diff --git a/samples/whitelist.yaml b/samples/whitelist.yaml
new file mode 100644
index 0000000..69b5641
--- /dev/null
+++ b/samples/whitelist.yaml
@@ -0,0 +1,40 @@
+# Copyright 2020-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.
+
+# curl -H "xos-username: admin@opencord.org" -H "xos-password: letmein" -X POST --data-binary @whitelist.yaml http://172.17.0.2:30007/run
+
+tosca_definitions_version: tosca_simple_yaml_1_0
+imports:
+  - custom_types/nttworkflowdriverwhitelistentry.yaml
+  - custom_types/nttworkflowdriverservice.yaml
+description: Create an entry in the whitelist
+topology_template:
+  node_templates:
+
+    service#nttworkflow:
+      type: tosca.nodes.NttWorkflowDriverService
+      properties:
+        name: ntt-workflow-driver
+        must-exist: true
+
+    whitelist:
+      type: tosca.nodes.NttWorkflowDriverWhiteListEntry
+      properties:
+        mac_address: 0a0a0a0a0a0a
+        pon_port_from: 536870912
+        pon_port_to: 536870915
+      requirements:
+        - owner:
+            node: service#nttworkflow
+            relationship: tosca.relationships.BelongsToOne
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 0000000..c7011ac
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,46 @@
+; Copyright 2020-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.
+
+[tox]
+envlist = py27
+; future; envlist = py27,py35,py36,py37
+skip_missing_interpreters = true
+skipsdist = True
+
+[testenv]
+deps =
+  -r requirements.txt
+  requests_mock
+  nose2
+;  flake8
+
+changedir = xos
+commands =
+  nose2 -c ../tox.ini --verbose --junit-xml
+; future: flake8
+
+[flake8]
+max-line-length = 119
+
+[unittest]
+plugins = nose2.plugins.junitxml
+
+[junit-xml]
+path = nose2-results.xml
+
+[coverage]
+always-on = True
+coverage-report =
+  term
+  xml
diff --git a/xos/synchronizer/__init__.py b/xos/synchronizer/__init__.py
new file mode 100644
index 0000000..8612cfd
--- /dev/null
+++ b/xos/synchronizer/__init__.py
@@ -0,0 +1,13 @@
+# Copyright 2020-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.
diff --git a/xos/synchronizer/config.yaml b/xos/synchronizer/config.yaml
new file mode 100644
index 0000000..34ff082
--- /dev/null
+++ b/xos/synchronizer/config.yaml
@@ -0,0 +1,44 @@
+
+# Copyright 2020-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: ntt-workflow-driver
+core_version: ">=4.0.0"
+required_models:
+  - NttWorkflowDriverService
+  - NttWorkflowDriverServiceInstance
+  - NttWorkflowDriverOltInformation
+  - RCORDSubscriber
+  - ONUDevice
+  - TechnologyProfile
+model_policies_dir: "/opt/xos/synchronizers/ntt-workflow-driver/model_policies"
+models_dir: "/opt/xos/synchronizers/ntt-workflow-driver/models"
+event_steps_dir: "/opt/xos/synchronizers/ntt-workflow-driver/event_steps"
+logging:
+  version: 1
+  handlers:
+    console:
+      class: logging.StreamHandler
+    file:
+      class: logging.handlers.RotatingFileHandler
+      filename: /var/log/xos.log
+      maxBytes: 10485760
+      backupCount: 5
+  loggers:
+    'multistructlog':
+      handlers:
+          - console
+          - file
+      level: DEBUG
diff --git a/xos/synchronizer/event_steps/__init__.py b/xos/synchronizer/event_steps/__init__.py
new file mode 100644
index 0000000..8612cfd
--- /dev/null
+++ b/xos/synchronizer/event_steps/__init__.py
@@ -0,0 +1,13 @@
+# Copyright 2020-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.
diff --git a/xos/synchronizer/event_steps/auth_event.py b/xos/synchronizer/event_steps/auth_event.py
new file mode 100644
index 0000000..f51855c
--- /dev/null
+++ b/xos/synchronizer/event_steps/auth_event.py
@@ -0,0 +1,34 @@
+# Copyright 2020-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
+from xossynchronizer.event_steps.eventstep import EventStep
+from helpers import NttHelpers
+
+
+class SubscriberAuthEventStep(EventStep):
+    topics = ["authentication.events"]
+    technology = "kafka"
+
+    def __init__(self, *args, **kwargs):
+        super(SubscriberAuthEventStep, self).__init__(*args, **kwargs)
+
+    def process_event(self, event):
+        value = json.loads(event.value)
+        self.log.info("authentication.events: Got event for subscriber", event_value=value)
+        
+        si = NttHelpers.find_or_create_ntt_si(self.model_accessor, self.log, value)
+        self.log.debug("authentication.events: Updating service instance", si=si)
+        si.authentication_state = value["authenticationState"]
+        si.save_changed_fields(always_update_timestamp=True)
\ No newline at end of file
diff --git a/xos/synchronizer/event_steps/onu_event.py b/xos/synchronizer/event_steps/onu_event.py
new file mode 100644
index 0000000..14a95ac
--- /dev/null
+++ b/xos/synchronizer/event_steps/onu_event.py
@@ -0,0 +1,81 @@
+
+# Copyright 2020-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
+from xossynchronizer.event_steps.eventstep import EventStep
+from helpers import NttHelpers
+import requests
+from requests.auth import HTTPBasicAuth
+
+class ONUEventStep(EventStep):
+    topics = ["onu.events"]
+    technology = "kafka"
+
+    max_onu_retry = 50
+
+    def __init__(self, *args, **kwargs):
+        super(ONUEventStep, self).__init__(*args, **kwargs)
+
+    def process_event(self, event):
+        value = json.loads(event.value)
+        self.log.info("onu.events: received event", value=value)
+        # This is needed to be compatible with both Voltha 1.7 and Voltha 2.x
+        # It supposes to have only 1 subscriber per ONU and the subscriber is connected to the first port
+        if "-" in value["serialNumber"] and not value["serialNumber"].endswith("-1"):
+            self.log.info("Skip event, only consider [serialNumber]-1 events")
+            return
+
+        ntt_oi = NttHelpers.find_or_create_ntt_oi(self.model_accessor, self.log, value)
+        ntt_oi.no_sync = False
+        ntt_oi.of_dpid = value["deviceId"]
+        ntt_oi.save_changed_fields(always_update_timestamp=True)
+        ntt_si = NttHelpers.find_or_create_ntt_si(self.model_accessor, self.log, value)
+        if value["status"] == "activated":
+            self.log.info("onu.events: activated onu", value=value)
+            ntt_si.no_sync = False
+            ntt_si.uni_port_id = long(value["portNumber"])
+            ntt_si.of_dpid = value["deviceId"]
+            ntt_si.oper_onu_status = "ENABLED"
+            ntt_si.save_changed_fields(always_update_timestamp=True)
+        elif value["status"] == "disabled":
+            self.log.info("onu.events: disabled onu, resetting the subscriber", value=value)
+            ntt_si.oper_onu_status = "DISABLED"
+            ntt_si.save_changed_fields(always_update_timestamp=True)
+            
+            log.debug("Removing subscriber with info",
+                uni_port_id = ntt_si.uni_port_id,
+                dp_id = ntt_si.of_dpid
+            )
+
+            onos_voltha_basic_auth = HTTPBasicAuth("karaf", "karaf")
+
+            handle = "%s/%s" % (ntt_si.of_dpid, ntt_si.uni_port_id)
+            # TODO store URL and PORT in the vOLT Service model
+            full_url = "http://129.60.110.180:8181/onos/olt/oltapp/%s" % (handle)
+
+            log.info("Sending request to onos-voltha", url=full_url)
+
+            request = requests.delete(full_url, auth=onos_voltha_basic_auth)
+
+            if request.status_code != 204:
+                raise Exception("Failed to remove subscriber from onos-voltha: %s" % request.text)
+
+            log.info("Removed Subscriber from onos voltha", response=request.text)
+
+            return
+        else:
+            self.log.warn("onu.events: Unknown status value: %s" % value["status"], value=value)
+            return
\ No newline at end of file
diff --git a/xos/synchronizer/event_steps/test_auth_event.py b/xos/synchronizer/event_steps/test_auth_event.py
new file mode 100644
index 0000000..9b1b954
--- /dev/null
+++ b/xos/synchronizer/event_steps/test_auth_event.py
@@ -0,0 +1,95 @@
+# Copyright 2020-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, Mock
+import json
+
+import os
+import sys
+
+test_path = os.path.abspath(os.path.dirname(os.path.realpath(__file__)))
+
+
+class TestSubscriberAuthEvent(unittest.TestCase):
+
+    def setUp(self):
+
+        self.sys_path_save = sys.path
+
+        # Setting up the config module
+        from xosconfig import Config
+        config = os.path.join(test_path, "../test_config.yaml")
+        Config.clear()
+        Config.init(config, "synchronizer-config-schema.yaml")
+        from multistructlog import create_logger
+        log = create_logger(Config().get('logging'))
+        # END Setting up the config module
+
+        from xossynchronizer.mock_modelaccessor_build import mock_modelaccessor_config
+        mock_modelaccessor_config(test_path, [("ntt-workflow-driver", "ntt-workflow-driver.xproto"),
+                                              ("olt-service", "volt.xproto"),
+                                              ("rcord", "rcord.xproto")])
+
+        import xossynchronizer.modelaccessor
+        import mock_modelaccessor
+        reload(mock_modelaccessor)  # in case nose2 loaded it in a previous test
+        reload(xossynchronizer.modelaccessor)      # in case nose2 loaded it in a previous test
+
+        from xossynchronizer.modelaccessor import model_accessor
+        from auth_event import SubscriberAuthEventStep
+
+        # import all class names to globals
+        for (k, v) in model_accessor.all_model_classes.items():
+            globals()[k] = v
+
+        self.model_accessor = model_accessor
+        self.log = log
+
+        self.event_step = SubscriberAuthEventStep(model_accessor=self.model_accessor, log=self.log)
+
+        self.event = Mock()
+
+        self.ntt_si = NttWorkflowDriverServiceInstance()
+        self.ntt_si.serial_number = "BRCM1234"
+        self.ntt_si.save = Mock()
+
+    def tearDown(self):
+        sys.path = self.sys_path_save
+
+    def test_authenticate_subscriber(self):
+
+        self.event.value = json.dumps({
+            'authenticationState': "APPROVED",
+            'deviceId': "of:0000000ce2314000",
+            'portNumber': "101",
+            'serialNumber': "BRCM1234",
+        })
+
+        with patch.object(NttWorkflowDriverServiceInstance.objects, "get_items") as ntt_si_mock:
+
+            ntt_si_mock.return_value = [self.ntt_si]
+
+            self.event_step.process_event(self.event)
+
+            self.ntt_si.save.assert_called()
+            self.ntt_si.save.assert_called_with(
+                always_update_timestamp=True, update_fields=[
+                    'authentication_state', 'serial_number', 'updated'])
+            self.assertEqual(self.ntt_si.authentication_state, 'APPROVED')
+
+
+if __name__ == '__main__':
+    sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), ".."))  # for import of helpers.py
+    unittest.main()
\ No newline at end of file
diff --git a/xos/synchronizer/event_steps/test_onu_events.py b/xos/synchronizer/event_steps/test_onu_events.py
new file mode 100644
index 0000000..22e031e
--- /dev/null
+++ b/xos/synchronizer/event_steps/test_onu_events.py
@@ -0,0 +1,226 @@
+# Copyright 2020-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, Mock
+import json
+
+import os
+import sys
+
+test_path = os.path.abspath(os.path.dirname(os.path.realpath(__file__)))
+
+
+class TestSyncOLTDevice(unittest.TestCase):
+
+    def setUp(self):
+
+        self.sys_path_save = sys.path
+
+        # Setting up the config module
+        from xosconfig import Config
+        config = os.path.join(test_path, "../test_config.yaml")
+        Config.clear()
+        Config.init(config, "synchronizer-config-schema.yaml")
+        # END Setting up the config module
+
+        from xossynchronizer.mock_modelaccessor_build import mock_modelaccessor_config
+        mock_modelaccessor_config(test_path, [("ntt-workflow-driver", "ntt-workflow-driver.xproto"),
+                                              ("olt-service", "volt.xproto"),
+                                              ("rcord", "rcord.xproto")])
+
+        import xossynchronizer.modelaccessor
+        import mock_modelaccessor
+        reload(mock_modelaccessor)  # in case nose2 loaded it in a previous test
+        reload(xossynchronizer.modelaccessor)      # in case nose2 loaded it in a previous test
+
+        from xossynchronizer.modelaccessor import model_accessor
+        from onu_event import ONUEventStep
+
+        # import all class names to globals
+        for (k, v) in model_accessor.all_model_classes.items():
+            globals()[k] = v
+
+        self.model_accessor = model_accessor
+        self.log = Mock()
+
+        self.event_step = ONUEventStep(model_accessor=self.model_accessor, log=self.log)
+
+        self.event = Mock()
+        self.event_dict = {
+            'status': 'activated',
+            'serialNumber': 'BRCM1234',
+            'deviceId': 'of:109299321',
+            'portNumber': '16'
+        }
+        self.event.value = json.dumps(self.event_dict)
+
+        self.pppoe = NttWorkflowDriverService(name="ntt-workflow-driver")
+
+        self.pon_port = PONPort()
+        self.pon_port.port_no = 1234
+
+        self.onu = ONUDevice()
+        self.onu.pon_port = self.pon_port
+        self.onu.serial_number = "BRCM1234"
+        self.onu.mac_address = "0a0a0a"
+        
+        self.technologyProfile = TechnologyProfile()
+        self.technologyProfile.profile_id = 64
+        self.technologyProfile.profile_value = '{"profile_type": "EPON","epon_attribute": {"package_type": "A"}}'
+
+    def tearDown(self):
+        sys.path = self.sys_path_save
+
+    def test_create_instance(self):
+
+        with patch.object(NttWorkflowDriverServiceInstance.objects, "get_items") as ntt_si_mock, \
+             patch.object(NttWorkflowDriverOltInformation.objects, "get_items") as ntt_oi_mock, \
+                patch.object(NttWorkflowDriverService.objects, "get_items") as service_mock, \
+                patch.object(NttWorkflowDriverServiceInstance, "save", autospec=True) as mock_save, \
+                patch.object(ONUDevice.objects, "get_items") as onu_mock, \
+                patch.object(TechnologyProfile.objects, "get_items") as technologyProfile_mock:
+
+            ntt_si_mock.return_value = []
+            ntt_oi_mock.return_value = []
+            service_mock.return_value = [self.pppoe]
+            onu_mock.return_value = [self.onu]
+            technologyProfile_mock.return_value = [self.technologyProfile]
+
+            self.event_step.process_event(self.event)
+
+            ntt_si = mock_save.call_args[0][0]
+
+            self.assertEqual(mock_save.call_count, 1)
+
+            self.assertEqual(ntt_si.serial_number, self.event_dict['serialNumber'])
+            self.assertEqual(ntt_si.of_dpid, self.event_dict['deviceId'])
+            self.assertEqual(ntt_si.uni_port_id, long(self.event_dict['portNumber']))
+            # Receiving an ONU event doesn't change the admin_onu_state until the model policy runs
+            self.assertEqual(ntt_si.admin_onu_state, "AWAITING")
+            self.assertEqual(ntt_si.oper_onu_status, "ENABLED")
+
+    def test_reuse_instance(self):
+
+        si = NttWorkflowDriverServiceInstance(
+            serial_number=self.event_dict["serialNumber"],
+            of_dpid="foo",
+            uni_port_id="foo"
+        )
+
+        oi = NttWorkflowDriverOltInformation(
+            of_dpid="of:109299321"
+        )
+
+        with patch.object(NttWorkflowDriverServiceInstance.objects, "get_items") as ntt_si_mock, \
+                patch.object(NttWorkflowDriverOltInformation.objects, "get_items") as ntt_oi_mock, \
+                patch.object(NttWorkflowDriverServiceInstance, "save", autospec=True) as mock_save:
+
+            ntt_si_mock.return_value = [si]
+            ntt_oi_mock.return_value = [oi]
+
+            self.event_step.process_event(self.event)
+
+            ntt_si = mock_save.call_args[0][0]
+
+            self.assertEqual(mock_save.call_count, 1)
+
+            self.assertEqual(ntt_si.serial_number, self.event_dict['serialNumber'])
+            self.assertEqual(ntt_si.of_dpid, self.event_dict['deviceId'])
+            self.assertEqual(ntt_si.uni_port_id, long(self.event_dict['portNumber']))
+            # Receiving an ONU event doesn't change the admin_onu_state until the model policy runs
+            self.assertEqual(ntt_si.admin_onu_state, "AWAITING")
+            self.assertEqual(ntt_si.oper_onu_status, "ENABLED")
+
+    def test_disable_onu(self):
+        self.event_dict = {
+            'status': 'disabled',
+            'serialNumber': 'BRCM1234',
+            'deviceId': 'of:109299321',
+            'portNumber': '16',
+        }
+
+        si = NttWorkflowDriverServiceInstance(
+            serial_number=self.event_dict["serialNumber"],
+            of_dpid="foo",
+            uni_port_id="foo",
+            admin_onu_state="ENABLED",
+            oper_onu_status="ENABLED",
+        )
+
+        oi = NttWorkflowDriverOltInformation(
+            of_dpid="of:109299321"
+        )
+
+        self.event.value = json.dumps(self.event_dict)
+
+        with patch.object(NttWorkflowDriverServiceInstance.objects, "get_items") as ntt_si_mock, \
+                patch.object(NttWorkflowDriverOltInformation.objects, "get_items") as ntt_oi_mock, \
+                patch.object(NttWorkflowDriverServiceInstance, "save_changed_fields", autospec=True) as mock_save:
+            ntt_si_mock.return_value = [si]
+            ntt_oi_mock.return_value = [oi]
+
+            self.event_step.process_event(self.event)
+
+            ntt_si = mock_save.call_args[0][0]
+
+            self.assertEqual(mock_save.call_count, 1)
+
+            # Receiving an ONU event doesn't change the admin_onu_state until the model policy runs
+            self.assertEqual(ntt_si.admin_onu_state, 'ENABLED')
+            self.assertEqual(ntt_si.oper_onu_status, 'DISABLED')
+
+    def test_enable_onu(self):
+        self.event_dict = {
+            'status': 'activated',
+            'serialNumber': 'BRCM1234',
+            'deviceId': 'of:109299321',
+            'portNumber': '16',
+        }
+
+        si = NttWorkflowDriverServiceInstance(
+            serial_number=self.event_dict["serialNumber"],
+            of_dpid="foo",
+            uni_port_id="foo",
+            admin_onu_state="DISABLED",
+            oper_onu_status="DISABLED",
+        )
+
+        oi = NttWorkflowDriverOltInformation(
+            of_dpid="of:109299321"
+        )
+
+        self.event.value = json.dumps(self.event_dict)
+
+        with patch.object(NttWorkflowDriverServiceInstance.objects, "get_items") as ntt_si_mock, \
+                patch.object(NttWorkflowDriverOltInformation.objects, "get_items") as ntt_oi_mock, \
+                patch.object(NttWorkflowDriverServiceInstance, "save_changed_fields", autospec=True) as mock_save:
+            ntt_si_mock.return_value = [si]
+            ntt_oi_mock.return_value = [oi]
+
+            self.event_step.process_event(self.event)
+
+            ntt_si = mock_save.call_args[0][0]
+
+            self.assertEqual(mock_save.call_count, 1)
+
+            # Receiving an ONU event doesn't change the admin_onu_state until the model policy runs
+            self.assertEqual(ntt_si.admin_onu_state, 'DISABLED')
+            self.assertEqual(ntt_si.oper_onu_status, 'ENABLED')
+
+
+
+if __name__ == '__main__':
+    sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), ".."))  # for import of helpers.py
+    unittest.main()
diff --git a/xos/synchronizer/helpers.py b/xos/synchronizer/helpers.py
new file mode 100644
index 0000000..7d66e8f
--- /dev/null
+++ b/xos/synchronizer/helpers.py
@@ -0,0 +1,171 @@
+# Copyright 2020-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
+from xossynchronizer.steps.syncstep import DeferredException
+import time
+import requests
+from requests.auth import HTTPBasicAuth
+
+class NttHelpers():
+    @staticmethod
+    def validate_onu(model_accessor, log, ntt_si):
+        """
+        This method validate an ONU against the whitelist and set the appropriate state.
+        It's expected that the deferred exception is managed in the caller method,
+        for example a model_policy or a sync_step.
+
+        :param ntt_si: NttWorkflowDriverServiceInstance
+        :return: [boolean, string]
+        """
+        tech_value = json.loads(model_accessor.TechnologyProfile.objects.get(profile_id=64).profile_value)
+        if tech_value["profile_type"] == "EPON":
+            tech = tech_value["epon_attribute"]["package_type"]
+        else:
+            tech = tech_value["profile_type"]
+              
+        oss_service = ntt_si.owner.leaf_model
+
+        # See if there is a matching entry in the whitelist.
+        matching_entries = model_accessor.NttWorkflowDriverWhiteListEntry.objects.filter(
+            owner_id=oss_service.id,
+        )
+        
+        matching_entries = [e for e in matching_entries if e.mac_address.lower() == ntt_si.mac_address.lower()]
+        
+        if len(matching_entries) == 0:
+            log.warn("ONU not found in whitelist")
+            return [False, "ONU not found in whitelist"]
+
+        whitelisted = matching_entries[0]
+        try:
+            onu = model_accessor.ONUDevice.objects.get(serial_number=ntt_si.serial_number.split("-")[0])
+            pon_port = onu.pon_port
+        except IndexError:
+            raise DeferredException("ONU device %s is not know to XOS yet" % ntt_si.serial_number)
+
+        if onu.admin_state == "ADMIN_DISABLED":
+            return [False, "ONU has been manually disabled"]
+
+        if pon_port.port_no < whitelisted.pon_port_from or pon_port.port_no > whitelisted.pon_port_to:
+            log.warn("PON port is not approved.")
+            return [False, "PON port is not approved."]
+        
+        if tech == "B":
+            if ntt_si.authentication_state == "DENIED":
+                return [False, "IEEE802.1X authentication has not been denied."]
+            elif ntt_si.authentication_state != "APPROVED":
+                return [True, "IEEE802.1X authentication has not been done yet."]
+        else:
+            pass
+
+        log.debug("Adding subscriber with info",
+            uni_port_id = ntt_si.uni_port_id,
+            dp_id = ntt_si.of_dpid
+        )
+        
+        time.sleep(180)
+
+        onos_voltha_basic_auth = HTTPBasicAuth("karaf", "karaf")
+
+        handle = "%s/%s" % (ntt_si.of_dpid, ntt_si.uni_port_id)
+        # TODO store URL and PORT in the vOLT Service model
+        full_url = "http://129.60.110.180:8181/onos/olt/oltapp/%s" % (handle)
+
+        log.info("Sending request to onos-voltha", url=full_url)
+
+        request = requests.post(full_url, auth=onos_voltha_basic_auth)
+
+        if request.status_code != 200:
+            raise Exception("Failed to add subscriber in onos-voltha: %s" % request.text)
+        log.info("Added Subscriber in onos voltha", response=request.text)
+
+        return [True, "ONU has been validated"]
+
+    @staticmethod
+    def find_or_create_ntt_si(model_accessor, log, event):
+        try:
+            ntt_si = model_accessor.NttWorkflowDriverServiceInstance.objects.get(
+                serial_number=event["serialNumber"]
+            )
+            try:
+                onu = model_accessor.ONUDevice.objects.get(serial_number=event["serialNumber"].split("-")[0])
+                ntt_si.mac_address = onu.mac_address
+            except IndexError:
+                log.debug("NttHelpers: ONU has been deleted", si=ntt_si)
+            log.debug("NttHelpers: Found existing NttWorkflowDriverServiceInstance", si=ntt_si)
+        except IndexError:
+            # create an NttWorkflowDriverServiceInstance, the validation will be
+            # triggered in the corresponding sync step
+            while True:
+                try:
+                    onu = model_accessor.ONUDevice.objects.get(serial_number=event["serialNumber"].split("-")[0])
+                    break
+                except IndexError:
+                    time.sleep(1)
+                    continue
+
+            ntt_si = model_accessor.NttWorkflowDriverServiceInstance(
+                serial_number=event["serialNumber"],
+                of_dpid=event["deviceId"],
+                uni_port_id=long(event["portNumber"]),
+                mac_address=onu.mac_address,
+                # we assume there is only one NttWorkflowDriverService
+                owner=model_accessor.NttWorkflowDriverService.objects.first()
+            )
+            log.debug("NttHelpers: Created new NttWorkflowDriverServiceInstance", si=ntt_si)
+        return ntt_si
+
+    @staticmethod
+    def find_or_create_ntt_oi(model_accessor, log, event):
+        try:
+            ntt_oi = model_accessor.NttWorkflowDriverOltInformation.objects.get(
+                of_dpid=event["deviceId"]
+            )
+            try:
+                onu = model_accessor.ONUDevice.objects.get(serial_number=event["serialNumber"].split("-")[0])
+                ntt_oi.port_no = onu.pon_port.port_no
+                tech_value = json.loads(model_accessor.TechnologyProfile.objects.get(profile_id=64).profile_value)
+                if tech_value["profile_type"] == "EPON":
+                    tech = tech_value["epon_attribute"]["package_type"]
+                else:
+                    tech = tech_value["profile_type"]
+                ntt_oi.olt_package = tech
+            except IndexError:
+                log.debug("NttHelpers: ONU has been deleted", oi=ntt_oi)
+            log.debug("NttHelpers: Found existing NttWorkflowDriverOltInformation", oi=ntt_oi)
+        except IndexError:
+            while True:
+                try:
+                    onu = model_accessor.ONUDevice.objects.get(serial_number=event["serialNumber"].split("-")[0])
+                    break
+                except IndexError:
+                    time.sleep(1)
+                    continue
+
+            tech_value = json.loads(model_accessor.TechnologyProfile.objects.get(profile_id=64).profile_value)
+            if tech_value["profile_type"] == "EPON":
+                tech = tech_value["epon_attribute"]["package_type"]
+            else:
+                tech = tech_value["profile_type"]
+
+            pon_port = onu.pon_port
+            ntt_oi = model_accessor.NttWorkflowDriverOltInformation(
+                of_dpid=event["deviceId"],
+                olt_package=tech,
+                port_no=pon_port.port_no,
+                owner=model_accessor.NttWorkflowDriverService.objects.first()
+            )
+            log.debug("NttHelpers: Created new NttWorkflowDriverOltInformation", oi=ntt_oi)
+        return ntt_oi
\ No newline at end of file
diff --git a/xos/synchronizer/migrations/0001_initial.py b/xos/synchronizer/migrations/0001_initial.py
new file mode 100644
index 0000000..19cfbe8
--- /dev/null
+++ b/xos/synchronizer/migrations/0001_initial.py
@@ -0,0 +1,106 @@
+# 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.
+
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.27 on 2020-01-14 19:25
+from __future__ import unicode_literals
+
+import core.models.xosbase_header
+from django.db import migrations, models
+import django.db.models.deletion
+import django.utils.timezone
+
+
+class Migration(migrations.Migration):
+
+    initial = True
+
+    dependencies = [
+        ('core', '0012_backupoperation_decl_uuid'),
+    ]
+
+    operations = [
+        migrations.CreateModel(
+            name='NttWorkflowDriverService',
+            fields=[
+                ('service_decl_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='core.Service_decl')),
+            ],
+            options={
+                'verbose_name': 'NttWorkflowDriver Service',
+            },
+            bases=('core.service',),
+        ),
+        migrations.CreateModel(
+            name='NttWorkflowDriverServiceInstance',
+            fields=[
+                ('serviceinstance_decl_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='core.ServiceInstance_decl')),
+                ('serial_number', models.CharField(help_text=b'Serial number of ONU', max_length=256, unique=True)),
+                ('authentication_state', models.CharField(choices=[(b'AWAITING', b'Awaiting'), (b'STARTED', b'Started'), (b'REQUESTED', b'Requested'), (b'APPROVED', b'Approved'), (b'DENIED', b'Denied')], default=b'AWAITING', help_text=b'Subscriber authentication state', max_length=50)),
+                ('of_dpid', models.CharField(help_text=b'OLT MAC address', max_length=256)),
+                ('uni_port_id', models.IntegerField(help_text=b'ONU UNI port ID')),
+                ('admin_onu_state', models.CharField(choices=[(b'AWAITING', b'Awaiting'), (b'ENABLED', b'Enabled'), (b'DISABLED', b'Disabled')], default=b'AWAITING', help_text=b'ONU administrative state', max_length=256)),
+                ('status_message', models.CharField(blank=True, default=b'', help_text=b'Status text of current state machine state', max_length=256, null=True)),
+                ('pppoe_state', models.CharField(choices=[(b'AWAITING', b'Awaiting'), (b'INITIATED', b'Initiated'), (b'CONNECTED', b'Connected'), (b'DISCONNECTED', b'Disconnected')], default=b'AWAITING', help_text=b'State of the subscriber PPPoE session', max_length=256)),
+                ('pppoe_session_id', models.CharField(blank=True, help_text=b'Subscriber PPPoE session ID', max_length=20, null=True)),
+                ('ipcp_state', models.CharField(choices=[(b'AWAITING', b'Awaiting'), (b'CONF_ACK', b'Ack'), (b'CONF_REQUEST', b'Requested')], default=b'AWAITING', help_text=b'State of the IPCP protocol for IP address assignment', max_length=256)),
+                ('ip_address', models.CharField(blank=True, help_text=b'Subscriber IP address, learned from IPCP', max_length=20, null=True)),
+                ('mac_address', models.CharField(blank=True, help_text=b'Subscriber MAC address', max_length=20, null=True)),
+                ('oper_onu_status', models.CharField(choices=[(b'AWAITING', b'Awaiting'), (b'ENABLED', b'Enabled'), (b'DISABLED', b'Disabled')], default=b'AWAITING', help_text=b'ONU operational state', max_length=256)),
+            ],
+            options={
+                'verbose_name': 'NttWorkflowDriver Service Instance',
+            },
+            bases=('core.serviceinstance',),
+        ),
+        migrations.CreateModel(
+            name='NttWorkflowDriverWhiteListEntry',
+            fields=[
+                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+                ('created', models.DateTimeField(auto_now_add=True, help_text=b'Time this model was created')),
+                ('updated', models.DateTimeField(default=django.utils.timezone.now, help_text=b'Time this model was changed by a non-synchronizer')),
+                ('enacted', models.DateTimeField(blank=True, default=None, help_text=b'When synced, set to the timestamp of the data that was synced', null=True)),
+                ('policed', models.DateTimeField(blank=True, default=None, help_text=b'When policed, set to the timestamp of the data that was policed', null=True)),
+                ('backend_register', models.CharField(blank=True, default=b'{}', max_length=1024, null=True)),
+                ('backend_need_delete', models.BooleanField(default=False)),
+                ('backend_need_reap', models.BooleanField(default=False)),
+                ('backend_status', models.CharField(default=b'Provisioning in progress', max_length=1024)),
+                ('backend_code', models.IntegerField(default=0)),
+                ('deleted', models.BooleanField(default=False)),
+                ('write_protect', models.BooleanField(default=False)),
+                ('lazy_blocked', models.BooleanField(default=False)),
+                ('no_sync', models.BooleanField(default=False)),
+                ('no_policy', models.BooleanField(default=False)),
+                ('policy_status', models.CharField(blank=True, default=b'Policy in process', max_length=1024, null=True)),
+                ('policy_code', models.IntegerField(blank=True, default=0, null=True)),
+                ('leaf_model_name', models.CharField(help_text=b'The most specialized model in this chain of inheritance, often defined by a service developer', max_length=1024)),
+                ('backend_need_delete_policy', models.BooleanField(default=False, help_text=b'True if delete model_policy must be run before object can be reaped')),
+                ('xos_managed', models.BooleanField(default=True, help_text=b'True if xos is responsible for creating/deleting this object')),
+                ('backend_handle', models.CharField(blank=True, help_text=b'Handle used by the backend to track this object', max_length=1024, null=True)),
+                ('changed_by_step', models.DateTimeField(blank=True, default=None, help_text=b'Time this model was changed by a sync step', null=True)),
+                ('changed_by_policy', models.DateTimeField(blank=True, default=None, help_text=b'Time this model was changed by a model policy', null=True)),
+                ('mac_address', models.CharField(blank=True, help_text=b'ONU MAC Address for package A authentication', max_length=256, null=True)),
+                ('pon_port_from', models.IntegerField(help_text=b'Start ID of approved PON Port')),
+                ('pon_port_to', models.IntegerField(help_text=b'End ID of approved PON Port')),
+                ('owner', models.ForeignKey(help_text=b'NttWorkflowDriverService that owns this white list entry', on_delete=django.db.models.deletion.CASCADE, related_name='whitelist_entries', to='ntt-workflow-driver.NttWorkflowDriverService')),
+            ],
+            options={
+                'verbose_name': 'ONU Whitelist',
+            },
+            bases=(models.Model, core.models.xosbase_header.PlModelMixIn),
+        ),
+        migrations.AlterUniqueTogether(
+            name='nttworkflowdriverwhitelistentry',
+            unique_together=set([('owner', 'mac_address')]),
+        ),
+    ]
diff --git a/xos/synchronizer/migrations/0002_auto.py b/xos/synchronizer/migrations/0002_auto.py
new file mode 100644
index 0000000..028b5cb
--- /dev/null
+++ b/xos/synchronizer/migrations/0002_auto.py
@@ -0,0 +1,64 @@
+# 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.
+
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.11 on 2020-11-21 07:39
+from __future__ import unicode_literals
+
+import core.models.xosbase_header
+from django.db import migrations, models
+import django.db.models.deletion
+import django.utils.timezone
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('ntt-workflow-driver', '0001_initial'),
+    ]
+
+    operations = [
+
+        migrations.RemoveField(
+            model_name='nttworkflowdriverserviceinstance',
+            name='pppoe_state',
+        ),
+        migrations.RemoveField(
+            model_name='nttworkflowdriverserviceinstance',
+            name='pppoe_session_id',
+        ),
+        migrations.RemoveField(
+            model_name='nttworkflowdriverserviceinstance',
+            name='ipcp_state',
+        ),
+        migrations.RemoveField(
+            model_name='nttworkflowdriverserviceinstance',
+            name='ip_address',
+        ),
+
+        migrations.CreateModel(
+            name='NttWorkflowDriverOltInformation',
+            fields=[
+                ('serviceinstance_decl_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='core.ServiceInstance_decl')),
+                ('of_dpid', models.CharField(help_text=b'OLT MAC address', max_length=256)),
+                ('olt_location', models.CharField(blank=True, help_text=b'OLT location', max_length=254, null=True)),
+                ('olt_package', models.CharField(blank=True, help_text=b'Package', max_length=254, null=True)),
+                ('port_no', models.IntegerField(blank=True, help_text=b'Port number', null=True)),
+            ],
+            options={
+                'verbose_name': 'NttWorkflowDriver Olt Information',
+            },
+            bases=('core.serviceinstance',),
+        ),
+    ]
\ No newline at end of file
diff --git a/xos/synchronizer/migrations/__init__.py b/xos/synchronizer/migrations/__init__.py
new file mode 100644
index 0000000..dd67de8
--- /dev/null
+++ b/xos/synchronizer/migrations/__init__.py
@@ -0,0 +1,13 @@
+# Copyright 2020-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.
\ No newline at end of file
diff --git a/xos/synchronizer/model_policies/__init__.py b/xos/synchronizer/model_policies/__init__.py
new file mode 100644
index 0000000..8612cfd
--- /dev/null
+++ b/xos/synchronizer/model_policies/__init__.py
@@ -0,0 +1,13 @@
+# Copyright 2020-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.
diff --git a/xos/synchronizer/model_policies/model_policy_ntt_workflow_driver_serviceinstance.py b/xos/synchronizer/model_policies/model_policy_ntt_workflow_driver_serviceinstance.py
new file mode 100644
index 0000000..1c06af7
--- /dev/null
+++ b/xos/synchronizer/model_policies/model_policy_ntt_workflow_driver_serviceinstance.py
@@ -0,0 +1,76 @@
+
+# Copyright 2020-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 helpers import NttHelpers
+from xossynchronizer.model_policies.policy import Policy
+
+import os
+import sys
+
+sync_path = os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), ".."))
+sys.path.append(sync_path)
+
+
+class DeferredException(Exception):
+    pass
+
+
+class NttWorkflowDriverServiceInstancePolicy(Policy):
+    model_name = "NttWorkflowDriverServiceInstance"
+
+    def handle_create(self, si):
+        self.logger.debug("MODEL_POLICY: handle_create for NttWorkflowDriverServiceInstance %s " % si.id)
+        self.handle_update(si)
+
+    def handle_update(self, si):
+        self.logger.debug("MODEL_POLICY: handle_update for NttWorkflowDriverServiceInstance %s " %
+                          (si.id), onu_state=si.admin_onu_state, authentication_state=si.authentication_state)
+        self.process_onu_state(si)
+        si.save_changed_fields()
+
+    # Check the whitelist to see if the ONU is valid.  If it is, make sure that it's enabled.
+    def process_onu_state(self, si):
+        [valid, message] = NttHelpers.validate_onu(self.model_accessor, self.logger, si)
+        si.status_message = message
+        if valid:
+            si.admin_onu_state = "ENABLED"
+            self.update_onu(si.serial_number, "ENABLED")
+            if si.authentication_state == '':
+                si.authentication_state = "APPROVED"
+        else:
+            si.admin_onu_state = "DISABLED"
+            self.update_onu(si.serial_number, "DISABLED")
+            si.authentication_state = "DENIED"
+
+    def update_onu(self, serial_number, admin_state):
+        onu = [onu for onu in self.model_accessor.ONUDevice.objects.all()
+               if onu.serial_number.lower() == serial_number.lower().split('-')[0]][0]
+        if onu.admin_state == "ADMIN_DISABLED":
+            self.logger.debug(
+                "MODEL_POLICY: ONUDevice [%s] has been manually disabled, not changing state to %s" %
+                (onu.serial_number, admin_state))
+            return
+        if onu.admin_state == admin_state:
+            self.logger.debug(
+                "MODEL_POLICY: ONUDevice [%s] already has admin_state to %s" %
+                (onu.serial_number, admin_state))
+        else:
+            self.logger.debug("MODEL_POLICY: setting ONUDevice [%s] admin_state to %s" % (onu.serial_number, admin_state))
+            onu.admin_state = admin_state
+            onu.save_changed_fields(always_update_timestamp=True)
+
+    def handle_delete(self, si):
+        pass
diff --git a/xos/synchronizer/model_policies/model_policy_ntt_workflow_driver_whitelistentry.py b/xos/synchronizer/model_policies/model_policy_ntt_workflow_driver_whitelistentry.py
new file mode 100644
index 0000000..a3506c2
--- /dev/null
+++ b/xos/synchronizer/model_policies/model_policy_ntt_workflow_driver_whitelistentry.py
@@ -0,0 +1,80 @@
+# Copyright 2020-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 helpers import NttHelpers
+from xossynchronizer.model_policies.policy import Policy
+import os
+import sys
+
+sync_path = os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), ".."))
+sys.path.append(sync_path)
+
+
+class NttWorkflowDriverWhiteListEntryPolicy(Policy):
+    model_name = "NttWorkflowDriverWhiteListEntry"
+
+    def handle_create(self, whitelist):
+        self.handle_update(whitelist)
+
+    # Update the SI if the onu_state has changed.
+    # The SI model policy will take care of updating other state.
+    def validate_onu_state(self, si):
+        [valid, message] = NttHelpers.validate_onu(self.model_accessor, self.logger, si)
+        if valid:
+            si.admin_onu_state = "ENABLED"
+        else:
+            si.admin_onu_state = "DISABLED"
+
+        self.logger.debug(
+            "MODEL_POLICY: activating NttWorkflowDriverServiceInstance because of change in the whitelist",
+            si=si,
+            onu_state=si.admin_onu_state,
+            authentication_state=si.authentication_state)
+
+        si.status_message = message
+        si.save_changed_fields(always_update_timestamp=True)
+
+    def handle_update(self, whitelist):
+        self.logger.debug("MODEL_POLICY: handle_update for NttWorkflowDriverWhiteListEntry", whitelist=whitelist)
+
+        sis = self.model_accessor.NttWorkflowDriverServiceInstance.objects.all()
+
+        for si in sis:
+
+            if si.mac_address.lower() != whitelist.mac_address.lower():
+                # NOTE we don't care about this SI as it has a different serial number
+                continue
+
+            self.validate_onu_state(si)
+
+        whitelist.backend_need_delete_policy = True
+        whitelist.save_changed_fields()
+
+    def handle_delete(self, whitelist):
+        self.logger.debug(
+            "MODEL_POLICY: handle_delete for NttWorkflowDriverWhiteListEntry")
+
+        # BUG: Sometimes the delete policy is not called, because the reaper deletes
+
+        assert(whitelist.owner)
+
+        sis = self.model_accessor.NttWorkflowDriverServiceInstance.objects.all()
+        sis = [si for si in sis if si.mac_address.lower() == whitelist.mac_address.lower()]
+
+        for si in sis:
+            self.validate_onu_state(si)
+
+        whitelist.backend_need_reap = True
+        whitelist.save_changed_fields()
diff --git a/xos/synchronizer/model_policies/test_model_policy_ntt_workflow_driver_serviceinstance.py b/xos/synchronizer/model_policies/test_model_policy_ntt_workflow_driver_serviceinstance.py
new file mode 100644
index 0000000..86e20cd
--- /dev/null
+++ b/xos/synchronizer/model_policies/test_model_policy_ntt_workflow_driver_serviceinstance.py
@@ -0,0 +1,135 @@
+
+# Copyright 2020-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
+
+import os
+import sys
+
+test_path = os.path.abspath(os.path.dirname(os.path.realpath(__file__)))
+
+
+class TestModelPolicyNttWorkflowDriverServiceInstance(unittest.TestCase):
+    def setUp(self):
+
+        self.sys_path_save = sys.path
+
+        config = os.path.join(test_path, "../test_config.yaml")
+        from xosconfig import Config
+        Config.clear()
+        Config.init(config, 'synchronizer-config-schema.yaml')
+
+        from xossynchronizer.mock_modelaccessor_build import mock_modelaccessor_config
+        mock_modelaccessor_config(test_path, [("ntt-workflow-driver", "ntt-workflow-driver.xproto"),
+                                              ("olt-service", "volt.xproto"),
+                                              ("rcord", "rcord.xproto")])
+
+        import xossynchronizer.modelaccessor
+        import mock_modelaccessor
+        reload(mock_modelaccessor)  # in case nose2 loaded it in a previous test
+        reload(xossynchronizer.modelaccessor)      # in case nose2 loaded it in a previous test
+
+        from xossynchronizer.modelaccessor import model_accessor
+        from model_policy_ntt_workflow_driver_serviceinstance import NttWorkflowDriverServiceInstancePolicy, NttHelpers
+        self.NttHelpers = NttHelpers
+
+        # import all class names to globals
+        for (k, v) in model_accessor.all_model_classes.items():
+            globals()[k] = v
+
+        # Some of the functions we call have side-effects. For example, creating a VSGServiceInstance may lead to
+        # creation of tags. Ideally, this wouldn't happen, but it does. So make sure we reset the world.
+        model_accessor.reset_all_object_stores()
+
+        self.policy = NttWorkflowDriverServiceInstancePolicy(model_accessor=model_accessor)
+        self.si = NttWorkflowDriverServiceInstance()
+        self.si.owner = NttWorkflowDriverService()
+        self.si.serial_number = "BRCM1234"
+
+    def tearDown(self):
+        sys.path = self.sys_path_save
+
+    def test_update_onu(self):
+
+        onu = ONUDevice(
+            serial_number="BRCM1234",
+            admin_state="ENABLED"
+        )
+        with patch.object(ONUDevice.objects, "get_items") as get_onu, \
+                patch.object(onu, "save") as onu_save:
+            get_onu.return_value = [onu]
+
+            self.policy.update_onu("brcm1234", "ENABLED")
+            onu_save.assert_not_called()
+
+            self.policy.update_onu("brcm1234", "DISABLED")
+            self.assertEqual(onu.admin_state, "DISABLED")
+            onu_save.assert_called_with(
+                always_update_timestamp=True, update_fields=[
+                    'admin_state', 'serial_number', 'updated'])
+
+    def test_enable_onu(self):
+        with patch.object(self.NttHelpers, "validate_onu") as validate_onu, \
+                patch.object(self.policy, "update_onu") as update_onu:
+            validate_onu.return_value = [True, "valid onu"]
+
+            self.policy.process_onu_state(self.si)
+
+            update_onu.assert_called_once()
+            update_onu.assert_called_with("BRCM1234", "ENABLED")
+
+            self.assertIn("valid onu", self.si.status_message)
+
+    def test_disable_onu(self):
+        with patch.object(self.NttHelpers, "validate_onu") as validate_onu, \
+                patch.object(self.policy, "update_onu") as update_onu:
+            validate_onu.return_value = [False, "invalid onu"]
+
+            self.policy.process_onu_state(self.si)
+
+            update_onu.assert_called_once()
+            update_onu.assert_called_with("BRCM1234", "DISABLED")
+
+            self.assertIn("invalid onu", self.si.status_message)
+
+    def test_handle_update_validate_onu(self):
+        """
+        Testing that handle_update calls validate_onu with the correct parameters
+        when necessary
+        """
+        with patch.object(self.policy, "process_onu_state") as process_onu_state, \
+                patch.object(self.policy, "update_onu") as update_onu:
+            update_onu.return_value = None
+
+            self.si.admin_onu_state = "AWAITING"
+            self.si.oper_onu_status = "AWAITING"
+            self.policy.handle_update(self.si)
+            process_onu_state.assert_called_with(self.si)
+
+            self.si.admin_onu_state = "ENABLED"
+            self.si.oper_onu_status = "ENABLED"
+            self.policy.handle_update(self.si)
+            process_onu_state.assert_called_with(self.si)
+
+            self.si.admin_onu_state = "DISABLED"
+            self.si.oper_onu_status = "DISABLED"
+            self.policy.handle_update(self.si)
+            process_onu_state.assert_called_with(self.si)
+
+if __name__ == '__main__':
+    sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), ".."))
+    unittest.main()
diff --git a/xos/synchronizer/model_policies/test_model_policy_ntt_workflow_driver_whitelistentry.py b/xos/synchronizer/model_policies/test_model_policy_ntt_workflow_driver_whitelistentry.py
new file mode 100644
index 0000000..32f309a
--- /dev/null
+++ b/xos/synchronizer/model_policies/test_model_policy_ntt_workflow_driver_whitelistentry.py
@@ -0,0 +1,129 @@
+
+# Copyright 2020-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
+
+import os
+import sys
+
+test_path = os.path.abspath(os.path.dirname(os.path.realpath(__file__)))
+
+
+class TestModelPolicyNttWorkflowDriverWhiteListEntry(unittest.TestCase):
+    def setUp(self):
+        self.sys_path_save = sys.path
+
+        config = os.path.join(test_path, "../test_config.yaml")
+        from xosconfig import Config
+        Config.clear()
+        Config.init(config, 'synchronizer-config-schema.yaml')
+
+        from xossynchronizer.mock_modelaccessor_build import mock_modelaccessor_config
+        mock_modelaccessor_config(test_path, [("ntt-workflow-driver", "ntt-workflow-driver.xproto"),
+                                              ("olt-service", "volt.xproto"),
+                                              ("rcord", "rcord.xproto")])
+
+        import xossynchronizer.modelaccessor
+        import mock_modelaccessor
+        reload(mock_modelaccessor)  # in case nose2 loaded it in a previous test
+        reload(xossynchronizer.modelaccessor)      # in case nose2 loaded it in a previous test
+
+        from xossynchronizer.modelaccessor import model_accessor
+        from model_policy_ntt_workflow_driver_whitelistentry import NttWorkflowDriverWhiteListEntryPolicy, NttHelpers
+        self.NttHelpers = NttHelpers
+
+        from mock_modelaccessor import MockObjectList
+        self.MockObjectList = MockObjectList
+
+        # import all class names to globals
+        for (k, v) in model_accessor.all_model_classes.items():
+            globals()[k] = v
+
+        # Some of the functions we call have side-effects. For example, creating a VSGServiceInstance may lead to
+        # creation of tags. Ideally, this wouldn't happen, but it does. So make sure we reset the world.
+        model_accessor.reset_all_object_stores()
+
+        self.policy = NttWorkflowDriverWhiteListEntryPolicy(model_accessor=model_accessor)
+
+        self.service = NttWorkflowDriverService()
+
+    def tearDown(self):
+        sys.path = self.sys_path_save
+        self.service = None
+
+    def test_enable_onu(self):
+        si = NttWorkflowDriverServiceInstance(mac_address="0a0a0a", owner_id=self.service.id, valid="invalid")
+        with patch.object(self.NttHelpers, "validate_onu") as validate_onu, \
+                patch.object(si, "save") as save_si:
+            validate_onu.return_value = [True, "valid onu"]
+
+            self.policy.validate_onu_state(si)
+
+            save_si.assert_called_once()
+            save_si.assert_called_with(
+                always_update_timestamp=True, update_fields=[
+                    'admin_onu_state', 'mac_address', 'status_message', 'updated'])
+
+    def test_disable_onu(self):
+        si = NttWorkflowDriverServiceInstance(mac_address="0a0a0a", owner_id=self.service.id, valid="invalid")
+        with patch.object(self.NttHelpers, "validate_onu") as validate_onu, \
+                patch.object(si, "save") as save_si:
+            validate_onu.return_value = [False, "invalid onu"]
+
+            self.policy.validate_onu_state(si)
+
+            save_si.assert_called_once()
+            save_si.assert_called_with(
+                always_update_timestamp=True, update_fields=[
+                    'admin_onu_state', 'mac_address', 'status_message', 'updated'])
+
+    def test_whitelist_update(self):
+        si = NttWorkflowDriverServiceInstance(mac_address="0a0a0a", owner_id=self.service.id)
+        wle = NttWorkflowDriverWhiteListEntry(mac_address="0a0a0a", owner_id=self.service.id, owner=self.service)
+        with patch.object(NttWorkflowDriverServiceInstance.objects, "get_items") as oss_si_items, \
+                patch.object(self.policy, "validate_onu_state") as validate_onu_state, \
+                patch.object(wle, "save") as wle_save:
+            oss_si_items.return_value = [si]
+
+            self.policy.handle_update(wle)
+
+            validate_onu_state.assert_called_with(si)
+            self.assertTrue(wle.backend_need_delete_policy)
+            wle_save.assert_called_with(
+                always_update_timestamp=False, update_fields=[
+                    'backend_need_delete_policy', 'mac_address', 'owner'])
+
+    def test_whitelist_delete(self):
+        si = NttWorkflowDriverServiceInstance(mac_address="0a0a0a", owner_id=self.service.id)
+        wle = NttWorkflowDriverWhiteListEntry(mac_address="0a0a0a", owner_id=self.service.id, owner=self.service)
+        with patch.object(NttWorkflowDriverServiceInstance.objects, "get_items") as oss_si_items, \
+                patch.object(self.policy, "validate_onu_state") as validate_onu_state, \
+                patch.object(wle, "save") as wle_save:
+            oss_si_items.return_value = [si]
+
+            self.policy.handle_delete(wle)
+
+            validate_onu_state.assert_called_with(si)
+            self.assertTrue(wle.backend_need_reap)
+            wle_save.assert_called_with(
+                always_update_timestamp=False, update_fields=[
+                    'backend_need_reap', 'mac_address', 'owner'])
+
+
+if __name__ == '__main__':
+    sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), ".."))
+    unittest.main()
diff --git a/xos/synchronizer/models/ntt-workflow-driver.xproto b/xos/synchronizer/models/ntt-workflow-driver.xproto
new file mode 100644
index 0000000..cf00c14
--- /dev/null
+++ b/xos/synchronizer/models/ntt-workflow-driver.xproto
@@ -0,0 +1,93 @@
+option name = "ntt-workflow-driver";
+option app_label = "ntt-workflow-driver";
+
+message NttWorkflowDriverService (Service){
+    option verbose_name = "NttWorkflowDriver Service";
+    option kind = "control";
+    option description = "Service that manages the EPON subscriber workflow";
+}
+
+message NttWorkflowDriverServiceInstance (ServiceInstance){
+    option owner_class_name = "NttWorkflowDriverService";
+    option verbose_name = "NttWorkflowDriver Service Instance";
+    option description = "Workflow settings for a particular ONU Device";
+    option policy_implemented = "True";
+
+    required string serial_number = 2 [
+        help_text = "Serial number of ONU",
+        max_length = 256,
+        tosca_key=True,
+        unique = True];
+    required string authentication_state = 3 [
+        help_text = "Subscriber authentication state",
+        choices = "(('AWAITING', 'Awaiting'), ('STARTED', 'Started'), ('REQUESTED', 'Requested'), ('APPROVED', 'Approved'), ('DENIED', 'Denied'), )",
+        default = "AWAITING",
+        feedback_state = True,
+        max_length = 50];
+    required string of_dpid = 4 [
+        help_text = "OLT MAC address",
+        max_length = 256];
+    required int32 uni_port_id = 5 [
+        help_text = "ONU UNI port ID"];
+    required string admin_onu_state = 6 [
+        help_text = "ONU administrative state",
+        choices = "(('AWAITING', 'Awaiting'), ('ENABLED', 'Enabled'), ('DISABLED', 'Disabled'))",
+        default = "AWAITING",
+        feedback_state = True,
+        max_length = 256];
+    optional string status_message = 7 [
+        help_text = "Status text of current state machine state",
+        default = "",
+        max_length = 256];
+    
+    optional string mac_address = 10 [
+        help_text = "Subscriber MAC address",
+        feedback_state = True,
+        max_length = 20];
+    required string oper_onu_status = 11 [
+        help_text = "ONU operational state",
+        choices = "(('AWAITING', 'Awaiting'), ('ENABLED', 'Enabled'), ('DISABLED', 'Disabled'))",
+        default = "AWAITING",
+        feedback_state = True,
+        max_length = 256];
+}
+
+message NttWorkflowDriverWhiteListEntry (XOSBase) {
+    option verbose_name = "ONU Whitelist";
+    option plural = "nttworkflowdriverwhitelistentries";
+    option description = "White list entry";
+    option policy_implemented = "True";
+
+    required manytoone owner->NttWorkflowDriverService:whitelist_entries = 1:1001 [
+        help_text = "NttWorkflowDriverService that owns this white list entry",
+        db_index = True,
+        tosca_key = True];
+    optional string mac_address = 2 [
+        help_text = "ONU MAC Address for package A authentication",
+        max_length = 256,
+        tosca_key = True];
+    required int32 pon_port_from = 3 [
+        help_text = "Start ID of approved PON Port"];
+    required int32 pon_port_to = 4 [
+        help_text = "End ID of approved PON Port"];
+}
+
+message NttWorkflowDriverOltInformation (ServiceInstance){
+    option owner_class_name = "NttWorkflowDriverService";
+    option verbose_name = "NttWorkflowDriver Olt Information";
+    option description = "OLT information";
+    option policy_implemented = "True";
+
+    required string of_dpid = 2 [
+        help_text = "OLT MAC address",
+        max_length = 256];
+    optional string olt_location = 3 [
+        help_text = "OLT location",
+        max_length = 256];
+    optional string olt_package = 4 [
+        help_text = "Package",
+        max_length = 256];
+    optional uint32 port_no = 5 [
+        help_text = "Port number",
+        max_length = 256];
+}
diff --git a/xos/synchronizer/ntt-workflow-driver-synchronizer.py b/xos/synchronizer/ntt-workflow-driver-synchronizer.py
new file mode 100644
index 0000000..a1d9173
--- /dev/null
+++ b/xos/synchronizer/ntt-workflow-driver-synchronizer.py
@@ -0,0 +1,32 @@
+#!/usr/bin/env python
+
+# Copyright 2020-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.
+
+# This imports and runs ../../xos-observer.py
+
+import os
+from xossynchronizer import Synchronizer
+from xosconfig import Config
+
+
+base_config_file = os.path.abspath(os.path.dirname(os.path.realpath(__file__)) + '/config.yaml')
+mounted_config_file = os.path.abspath(os.path.dirname(os.path.realpath(__file__)) + '/mounted_config.yaml')
+
+if os.path.isfile(mounted_config_file):
+    Config.init(base_config_file, 'synchronizer-config-schema.yaml', mounted_config_file)
+else:
+    Config.init(base_config_file, 'synchronizer-config-schema.yaml')
+
+Synchronizer().run()
diff --git a/xos/synchronizer/test_config.yaml b/xos/synchronizer/test_config.yaml
new file mode 100644
index 0000000..7e7c3c7
--- /dev/null
+++ b/xos/synchronizer/test_config.yaml
@@ -0,0 +1,31 @@
+
+# Copyright 2020-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: test-NttWorkflowDriverService-config
+accessor:
+  username: xosadmin@opencord.org
+  password: "sample"
+  kind: "testframework"
+logging:
+  version: 1
+  handlers:
+    console:
+      class: logging.StreamHandler
+  loggers:
+    'multistructlog':
+      handlers:
+          - console
+#      level: DEBUG
diff --git a/xos/synchronizer/test_helpers.py b/xos/synchronizer/test_helpers.py
new file mode 100644
index 0000000..780f71d
--- /dev/null
+++ b/xos/synchronizer/test_helpers.py
@@ -0,0 +1,166 @@
+# Copyright 2020-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
+
+test_path=os.path.abspath(os.path.dirname(os.path.realpath(__file__)))
+
+
+class TestNttHelpers(unittest.TestCase):
+
+    def setUp(self):
+
+        self.sys_path_save = sys.path
+
+        # Setting up the config module
+        from xosconfig import Config
+        config = os.path.join(test_path, "test_config.yaml")
+        Config.clear()
+        Config.init(config, "synchronizer-config-schema.yaml")
+        # END Setting up the config module
+
+        from multistructlog import create_logger
+        self.log = create_logger(Config().get('logging'))
+
+        from xossynchronizer.mock_modelaccessor_build import mock_modelaccessor_config
+        mock_modelaccessor_config(test_path, [("ntt-workflow-driver", "ntt-workflow-driver.xproto"),
+                                              ("olt-service", "volt.xproto"),
+                                              ("rcord", "rcord.xproto")])
+
+        import xossynchronizer.modelaccessor
+        import mock_modelaccessor
+        reload(mock_modelaccessor) # in case nose2 loaded it in a previous test
+        reload(xossynchronizer.modelaccessor)      # in case nose2 loaded it in a previous test
+
+        from xossynchronizer.modelaccessor import model_accessor
+        from helpers import NttHelpers
+
+        # import all class names to globals
+        for (k, v) in model_accessor.all_model_classes.items():
+            globals()[k] = v
+
+        self.helpers = NttHelpers
+        self.model_accessor = model_accessor
+
+        self._volt = VOLTService()
+        self._volt.id = 1
+
+        self.volt = Service()
+        self.volt.id = 1
+        self.volt.name = "vOLT"
+        self.volt.leaf_model = self._volt
+
+        self.pon_port = PONPort()
+        self.pon_port.port_no = 1234
+
+        self.onu = ONUDevice()
+        self.onu.pon_port = self.pon_port
+        self.onu.serial_number = "BRCM1234"
+
+        self.technologyProfile = TechnologyProfile()
+        self.technologyProfile.profile_id = 64
+        self.technologyProfile.profile_value = '{"profile_type": "EPON","epon_attribute": {"package_type": "A"}}'
+
+        self.ntt_si = NttWorkflowDriverServiceInstance(
+            serial_number="BRCM1234",
+            owner=self.volt,
+            owner_id=self.volt.id,
+            mac_address="0a0a0a",
+            of_dpid="of:1234"
+        )
+
+        self.whitelist_entry = NttWorkflowDriverWhiteListEntry(
+            mac_address="0a0a0a",
+            owner=self.volt,
+            owner_id=self.volt.id,
+            pon_port_from=1234,
+            pon_port_to=1235,
+        )
+
+
+    def tearDown(self):
+        sys.path = self.sys_path_save
+
+    def test_not_in_whitelist(self):
+
+        with patch.object(NttWorkflowDriverWhiteListEntry.objects, "get_items") as whitelist_mock, \
+            patch.object(TechnologyProfile.objects, "get_items") as technologyProfile_mock:
+            whitelist_mock.return_value = []
+            technologyProfile_mock.return_value = [self.technologyProfile]
+
+            [res, message] = self.helpers.validate_onu(self.model_accessor, self.log, self.ntt_si)
+
+            self.assertFalse(res)
+            self.assertEqual(message, "ONU not found in whitelist")
+
+    def test_wrong_location_port(self):
+        self.pon_port.port_no = 666
+        with patch.object(NttWorkflowDriverWhiteListEntry.objects, "get_items") as whitelist_mock, \
+            patch.object(ONUDevice.objects, "get_items") as onu_mock, \
+            patch.object(TechnologyProfile.objects, "get_items") as technologyProfile_mock:
+            whitelist_mock.return_value = [self.whitelist_entry]
+            onu_mock.return_value = [self.onu]
+            technologyProfile_mock.return_value = [self.technologyProfile]
+
+            [res, message] = self.helpers.validate_onu(self.model_accessor, self.log, self.ntt_si)
+
+            self.assertFalse(res)
+            self.assertEqual(message, "PON port is not approved.")
+
+    def test_deferred_validation(self):
+        with patch.object(NttWorkflowDriverWhiteListEntry.objects, "get_items") as whitelist_mock, \
+            patch.object(ONUDevice.objects, "get_items") as onu_mock, \
+            patch.object(TechnologyProfile.objects, "get_items") as technologyProfile_mock:
+            whitelist_mock.return_value = [self.whitelist_entry]
+            onu_mock.return_value = []
+            technologyProfile_mock.return_value = [self.technologyProfile]
+
+            with self.assertRaises(Exception) as e:
+                self.helpers.validate_onu(self.model_accessor, self.log, self.ntt_si)
+
+            self.assertEqual(e.exception.message, "ONU device %s is not know to XOS yet" % self.ntt_si.serial_number)
+
+    def test_validating_onu(self):
+        with patch.object(NttWorkflowDriverWhiteListEntry.objects, "get_items") as whitelist_mock, \
+            patch.object(ONUDevice.objects, "get_items") as onu_mock, \
+            patch.object(TechnologyProfile.objects, "get_items") as technologyProfile_mock:
+            whitelist_mock.return_value = [self.whitelist_entry]
+            onu_mock.return_value = [self.onu]
+            technologyProfile_mock.return_value = [self.technologyProfile]
+
+            [res, message] = self.helpers.validate_onu(self.model_accessor, self.log, self.ntt_si)
+
+            self.assertTrue(res)
+            self.assertEqual(message, "ONU has been validated")
+
+    def test_validating_onu_uppercase(self):
+        self.whitelist_entry.mac_address = "0A0A0A"
+        with patch.object(NttWorkflowDriverWhiteListEntry.objects, "get_items") as whitelist_mock, \
+            patch.object(ONUDevice.objects, "get_items") as onu_mock, \
+            patch.object(TechnologyProfile.objects, "get_items") as technologyProfile_mock:
+            whitelist_mock.return_value = [self.whitelist_entry]
+            onu_mock.return_value = [self.onu]
+            technologyProfile_mock.return_value = [self.technologyProfile]
+
+            [res, message] = self.helpers.validate_onu(self.model_accessor, self.log, self.ntt_si)
+
+            self.assertTrue(res)
+            self.assertEqual(message, "ONU has been validated")
+
+if __name__ == '__main__':
+    unittest.main()
\ No newline at end of file
diff --git a/xos/unittest.cfg b/xos/unittest.cfg
new file mode 100644
index 0000000..3db2d53
--- /dev/null
+++ b/xos/unittest.cfg
@@ -0,0 +1,14 @@
+[unittest]
+plugins=nose2.plugins.junitxml
+code-directories=synchronizer
+                 model_policies
+                 steps
+                 pull_steps
+                 event_steps
+
+[coverage]
+always-on = True
+coverage = synchronizer
+coverage-report = term
+coverage-report = html
+coverage-report = xml