ActiveTest Service Creation.

Onboarding is done by running 'make activetest'. fusion.img, qt600.img, vta.img, and vpma.img
should be in the corresponding service_profile's image/ folder in order for images to be
uploaded in glance.

The measurement agents can be created through the different agents tenants. For example, to
create a VPMA tenant, run 'make vpma 1' where '1' can be any numberical identifier for the
tenant to be created.

Measurement agents will automatically register with the fusion controller through the use of
the synchronizer. Furthermore, tests can be orchestrated through XOS by modifying the models
for the vpma agents.

Change-Id: I69bab4b5f771c87126781799217bb36fda478fd3
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 0000000..ded4f63
--- /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 2016 Open Networking Laboratory
+
+  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..e388fcb
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,53 @@
+include ~/service-profile/mcord/Makefile
+
+ifneq (,$(filter $(firstword $(MAKECMDGOALS)),vpma vta qt600))
+  # use the rest as arguments for "run"
+  TARGET_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
+  # ...and turn them into do-nothing targets
+  $(eval $(TARGET_ARGS):;@:)
+endif
+
+activetest: activetest-onboard
+	$(RUN_TOSCA) $(SERVICE_DIR)/ActiveTest/pod-activetest.yaml
+
+activetest-onboard: $(CONFIG_DIR)/files/activetest_config activetest-flavors
+	sudo cp $(CONFIG_DIR)/id_rsa $(CONFIG_DIR)/key_import/activetest_rsa
+	sudo cp $(CONFIG_DIR)/id_rsa.pub $(CONFIG_DIR)/key_import/activetest_rsa.pub
+	$(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/ActiveTest/xos/ActiveTest-onboard.yaml
+	$(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/ActiveTest/xos/synchronizer/activetest-synchronizer.yaml
+	bash $(COMMON_DIR)/wait_for_onboarding_ready.sh 81 services/activetest
+	bash $(COMMON_DIR)/wait_for_onboarding_ready.sh 81 xos
+	bash $(COMMON_DIR)/wait_for_xos_port.sh 80
+
+foobar: $(CONFIG_DIR)/files/activetest_config
+
+$(CONFIG_DIR)/files/activetest_config:
+	cp $(SERVICE_DIR)/ActiveTest/xos/synchronizer/activetest_config $(CONFIG_DIR)/files/activetest_config
+
+clean: cleanup
+	./cleanup.sh
+	bash -c "source $(CONFIG_DIR)/admin-openrc.sh; nova list --all-tenants; neutron net-list"
+
+activetest-flavors:
+	bash -c "source $(CONFIG_DIR)/admin-openrc.sh; nova flavor-show activetest.vta || nova flavor-create activetest.vta auto 4096 64 2"
+
+.PHONY: vpma
+vpma:
+	sed 's/vpmatenant/vpmatenant$(TARGET_ARGS)/g' pod-vpma-template.yaml > pod-vpma.yaml
+	$(RUN_TOSCA) $(SERVICE_DIR)/ActiveTest/pod-vpma.yaml
+
+.PHONY: vta
+vta:
+	sed 's/vtatenant/vtatenant$(TARGET_ARGS)/g' pod-vta-template.yaml > pod-vta.yaml
+	$(RUN_TOSCA) $(SERVICE_DIR)/ActiveTest/pod-vta.yaml
+
+.PHONY: qt600
+qt600:
+	sed 's/qt600tenant/qt600tenant$(TARGET_ARGS)/g' pod-qt600-template.yaml > pod-qt600.yaml
+	$(RUN_TOSCA) $(SERVICE_DIR)/ActiveTest/pod-qt600.yaml
+
+activetest-tunnel:
+	$(eval NODES=$(shell bash -c "source $(CONFIG_DIR)/admin-openrc.sh ; nova host-list" | grep compute | awk '{print $$2}' ))
+	$(eval CONTROLLER_IP=$(shell bash -c "source $(CONFIG_DIR)/admin-openrc.sh ; nova list --image fusion --all-tenants | grep -o -E '172.27.0.[0-9]+'"))
+	@echo 'Run the following on HEAD NODE:'
+	@echo '  ssh -f -N -o ProxyCommand="ssh -W %h:%p $(NODES)" root@$(CONTROLLER_IP) -L 0.0.0.0:9443:$(CONTROLLER_IP):9443'
diff --git a/cleanup.sh b/cleanup.sh
new file mode 100755
index 0000000..c31c12a
--- /dev/null
+++ b/cleanup.sh
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+function cleanup_network {
+  NETWORK=$1
+  SUBNETS=`neutron net-show $NETWORK | grep -i subnets | awk '{print $4}'`
+  if [[ $SUBNETS != "" ]]; then
+      PORTS=`neutron port-list | grep -i $SUBNETS | awk '{print $2}'`
+      for PORT in $PORTS; do
+          echo "Deleting port $PORT"
+          neutron port-delete $PORT
+      done
+  fi
+  neutron net-delete $NETWORK
+}
+
+source ~/service-profile/cord/admin-openrc.sh
+
+cleanup_network lan_activetest_test_network1
+cleanup_network lan_activetest_public_network 
+
+echo "Deleting networks"
+# Delete all networks beginning with mysite_
+NETS=$( neutron net-list --all-tenants|grep mysite|awk '{print $2}' )
+for NET in $NETS
+do
+    neutron net-delete $NET
+done
+
+neutron net-delete lan_activetest_test_network1 || true
+neutron net-delete lan_activetest_public_network || true
diff --git a/pod-activetest.yaml b/pod-activetest.yaml
new file mode 100644
index 0000000..4333ca4
--- /dev/null
+++ b/pod-activetest.yaml
@@ -0,0 +1,294 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: Setup the ActiveTest on the pod
+
+imports:
+   - custom_types/xos.yaml
+   - custom_types/ActiveTest.yaml
+
+topology_template:
+  node_templates:
+
+    mysite:
+      type: tosca.nodes.Site
+
+    qt600:
+      type: tosca.nodes.Image
+
+    vpma:
+      type: tosca.nodes.Image
+
+    fusion:
+      type: tosca.nodes.Image
+
+    vta:
+      type: tosca.nodes.Image
+
+    activetest.vta:
+      type: tosca.nodes.Flavor
+
+    m1.small:
+      type: tosca.nodes.Flavor
+
+    m1.large:
+      type: tosca.nodes.Flavor
+
+    External:
+      type: tosca.nodes.NetworkTemplate
+      properties:
+          access: indirect
+
+    Private-Indirect:
+      type: tosca.nodes.NetworkTemplate
+      properties:
+          access: indirect
+
+    management:
+      type: tosca.nodes.network.Network.XOS
+      properties:
+          no-create: true
+          no-delete: true
+          no-update: true
+
+    mysite_activetest_network_slice:
+      description: This slice exists solely to own the activetest network
+      type: tosca.nodes.Slice
+      properties:
+          network: noauto
+      requirements:
+          - site:
+              node: mysite
+              relationship: tosca.relationships.MemberOfSite
+
+    mysite_activetest_test_network1_slice:
+      description: This slice exists solely to own the activetest test network 1
+      type: tosca.nodes.Slice
+      properties:
+          network: noauto
+      requirements:
+          - site:
+              node: mysite
+              relationship: tosca.relationships.MemberOfSite
+
+    lan_activetest_public_network:
+      type: tosca.nodes.network.Network.XOS
+      properties:
+          ip_version: 4
+      requirements:
+          - network_template:
+              node: External
+              relationship: tosca.relationships.UsesNetworkTemplate
+          - owner:
+              node: mysite_activetest_network_slice
+              relationship: tosca.relationships.MemberOfSlice
+          - connection:
+              node: mysite_activetest_slice1
+              relationship: tosca.relationships.ConnectsToSlice
+
+    lan_activetest_test_network1:
+      type: tosca.nodes.network.Network.XOS
+      properties:
+          ip_version: 4
+      requirements:
+          - network_template:
+              node: External
+              relationship: tosca.relationships.UsesNetworkTemplate
+          - owner:
+              node: mysite_activetest_test_network1_slice
+              relationship: tosca.relationships.MemberOfSlice
+          - connection1:
+              node: mysite_vpma_slice1
+              relationship: tosca.relationships.ConnectsToSlice
+          - connection2:
+              node: mysite_vta_slice1
+              relationship: tosca.relationships.ConnectsToSlice
+          - connection3:
+              node: mysite_qt600_slice1
+              relationship: tosca.relationships.ConnectsToSlice
+
+#    ActiveTest:
+#      type: tosca.nodes.ActiveTest
+#      properties:
+#          view_url: /admin/activetest/activetestservice
+#          kind: activetestservice
+#          public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE] }
+#          private_key_fn: /opt/xos/services/activetest/keys/activetest_rsa
+#      artifacts:
+#          pubkey: /opt/xos/services/activetest/keys/activetest_rsa.pub
+
+    ActiveTest:
+      type: tosca.nodes.ActiveTest
+      requirements:
+          - management:
+              node: management
+              relationship: tosca.relationships.UsesNetwork
+      properties:
+          view_url: /admin/activetest/activetestservice/$id$/
+          public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE] }
+          private_key_fn: /opt/xos/services/activetest/keys/activetest_rsa
+          kind: ActiveTest
+      artifacts:
+          pubkey: /opt/xos/services/activetest/keys/activetest_rsa.pub
+
+    VTA:
+      type: tosca.nodes.VtaService
+      requirements:
+          - management:
+              node: management
+              relationship: tosca.relationships.UsesNetwork
+      properties:
+          view_url: /admin/activetest/activetestservice/$id$/
+          public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE] }
+          private_key_fn: /opt/xos/services/activetest/keys/activetest_rsa
+          kind: ActiveTest
+      artifacts:
+          pubkey: /opt/xos/services/activetest/keys/activetest_rsa.pub
+
+    QT600:
+      type: tosca.nodes.Qt600Service
+      requirements:
+          - management:
+              node: management
+              relationship: tosca.relationships.UsesNetwork
+      properties:
+          view_url: /admin/activetest/activetestservice/$id$/
+          public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE] }
+          private_key_fn: /opt/xos/services/activetest/keys/activetest_rsa
+          kind: ActiveTest
+      artifacts:
+          pubkey: /opt/xos/services/activetest/keys/activetest_rsa.pub
+
+    VPMA:
+      type: tosca.nodes.VpmaService
+      requirements:
+          - management:
+              node: management
+              relationship: tosca.relationships.UsesNetwork
+      properties:
+          view_url: /admin/activetest/activetestservice/$id$/
+          public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE] }
+          private_key_fn: /opt/xos/services/activetest/keys/activetest_rsa
+          kind: ActiveTest
+      artifacts:
+          pubkey: /opt/xos/services/activetest/keys/activetest_rsa.pub
+
+    mysite_activetest_slice1:
+      description: ActiveTest Service Slice 1
+      type: tosca.nodes.Slice
+      properties:
+          network: noauto
+      requirements:
+          - site:
+              node: mysite
+              relationship: tosca.relationships.MemberOfSite
+          - management:
+              node: management
+              relationship: tosca.relationships.ConnectsToNetwork
+          - ActiveTest:
+              node: ActiveTest
+              relationship: tosca.relationships.MemberOfService
+          - image:
+              node: fusion
+              relationship: tosca.relationships.DefaultImage
+          - flavor:
+              node: m1.large
+              relationship: tosca.relationships.DefaultFlavor
+          - VTA:
+              node: VTA
+              relationship: tosca.relationships.MemberOfService
+          - VPMA:
+              node: VPMA
+              relationship: tosca.relationships.MemberOfService
+          - QT600:
+              node: QT600
+              relationship: tosca.relationships.MemberOfService
+
+    mysite_qt600_slice1:
+      description: ActiveTest QT600 Service Slice 1
+      type: tosca.nodes.Slice
+      properties:
+          network: noauto
+      requirements:
+          - site:
+              node: mysite
+              relationship: tosca.relationships.MemberOfSite
+          - management:
+              node: management
+              relationship: tosca.relationships.ConnectsToNetwork
+          - activetest:
+              node: lan_activetest_public_network
+              relationship: tosca.relationships.ConnectsToNetwork
+          - QT600:
+              node: QT600
+              relationship: tosca.relationships.MemberOfService
+          - image:
+              node: qt600
+              relationship: tosca.relationships.DefaultImage
+          - flavor:
+              node: m1.small
+              relationship: tosca.relationships.DefaultFlavor
+
+    mysite_vpma_slice1:
+      description: ActiveTest VPMA Service Slice 1
+      type: tosca.nodes.Slice
+      properties:
+          network: noauto
+      requirements:
+          - site:
+              node: mysite
+              relationship: tosca.relationships.MemberOfSite
+          - management:
+              node: management
+              relationship: tosca.relationships.ConnectsToNetwork
+          - activetest:
+              node: lan_activetest_public_network
+              relationship: tosca.relationships.ConnectsToNetwork
+          - VPMA:
+              node: VPMA
+              relationship: tosca.relationships.MemberOfService
+          - image:
+              node: vpma
+              relationship: tosca.relationships.DefaultImage
+          - flavor:
+              node: m1.small
+              relationship: tosca.relationships.DefaultFlavor
+
+    mysite_vta_slice1:
+      description: ActiveTest VTA Service Slice 1
+      type: tosca.nodes.Slice
+      properties:
+          network: noauto
+      requirements:
+          - site:
+              node: mysite
+              relationship: tosca.relationships.MemberOfSite
+          - management:
+              node: management
+              relationship: tosca.relationships.ConnectsToNetwork
+          - activetest:
+              node: lan_activetest_public_network
+              relationship: tosca.relationships.ConnectsToNetwork
+          - VTA:
+              node: VTA
+              relationship: tosca.relationships.MemberOfService
+          - image:
+              node: vta
+              relationship: tosca.relationships.DefaultImage
+          - flavor:
+              node: activetest.vta
+              relationship: tosca.relationships.DefaultFlavor
+
+    tenant#activetesttenant:
+        type: tosca.nodes.ActiveTestTenant
+        requirements:
+          - tenant:
+              node: ActiveTest
+              relationship: tosca.relationships.TenantOfService
+          - dependency:
+              node: mysite_activetest_slice1
+              relationship: tosca.relationships.DependsOn
+
+    EtherAssure:
+      type: tosca.nodes.DashboardView
+      properties:
+        url: https://localhost:9443
diff --git a/pod-qt600-template.yaml b/pod-qt600-template.yaml
new file mode 100644
index 0000000..984e48a
--- /dev/null
+++ b/pod-qt600-template.yaml
@@ -0,0 +1,26 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: Setup the ActiveTest on the pod
+
+imports:
+   - custom_types/xos.yaml
+   - custom_types/ActiveTest.yaml
+
+topology_template:
+  node_templates:
+    QT600:
+      type: tosca.nodes.Qt600Service
+      properties:
+          no-create: true
+          no-delete: true
+          no-update: true
+
+    tenant#qt600tenant:
+        type: tosca.nodes.Qt600Tenant
+        properties:
+            reflector: ""
+        requirements:
+          - tenant:
+              node: QT600
+              relationship: tosca.relationships.TenantOfService
+
diff --git a/pod-vpma-template.yaml b/pod-vpma-template.yaml
new file mode 100644
index 0000000..fd53bab
--- /dev/null
+++ b/pod-vpma-template.yaml
@@ -0,0 +1,26 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: Setup the ActiveTest on the pod
+
+imports:
+   - custom_types/xos.yaml
+   - custom_types/ActiveTest.yaml
+
+topology_template:
+  node_templates:
+    VPMA:
+      type: tosca.nodes.VpmaService
+      properties:
+          no-create: true
+          no-delete: true
+          no-update: true
+
+    tenant#vpmatenant:
+        type: tosca.nodes.VpmaTenant
+        properties:
+            reflector: ""
+        requirements:
+          - tenant:
+              node: VPMA
+              relationship: tosca.relationships.TenantOfService
+
diff --git a/pod-vta-template.yaml b/pod-vta-template.yaml
new file mode 100644
index 0000000..b24094d
--- /dev/null
+++ b/pod-vta-template.yaml
@@ -0,0 +1,24 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: Setup the ActiveTest on the pod
+
+imports:
+   - custom_types/xos.yaml
+   - custom_types/ActiveTest.yaml
+
+topology_template:
+  node_templates:
+    VTA:
+      type: tosca.nodes.VtaService
+      properties:
+          no-create: true
+          no-delete: true
+          no-update: true
+
+    tenant#vtatenant:
+        type: tosca.nodes.VtaTenant
+        requirements:
+          - tenant:
+              node: VTA
+              relationship: tosca.relationships.TenantOfService
+
diff --git a/xos/ActiveTest-onboard.yaml b/xos/ActiveTest-onboard.yaml
new file mode 100644
index 0000000..9afb877
--- /dev/null
+++ b/xos/ActiveTest-onboard.yaml
@@ -0,0 +1,26 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: Onboard the ActiveTest
+
+imports:
+   - custom_types/xos.yaml
+
+topology_template:
+  node_templates:
+    activetest:
+      type: tosca.nodes.ServiceController
+      properties:
+          base_url: file:///opt/xos_services/ActiveTest/xos/
+          # The following will concatenate with base_url automatically, if
+          # base_url is non-null.
+          models: models.py
+          admin: admin.py
+          synchronizer: synchronizer/manifest
+          synchronizer_run: activetest-synchronizer.py
+          tosca_custom_types: ActiveTest.yaml
+          tosca_resource: tosca/resources/activetest.py, tosca/resources/activetesttenant.py, tosca/resources/qt600tenant.py, tosca/resources/vpmatenant.py, tosca/resources/vtatenant.py
+          rest_service: api/service/activetest.py
+          rest_tenant: api/tenant/activetesttenant.py
+          private_key: file:///opt/xos/key_import/activetest_rsa
+          public_key: file:///opt/xos/key_import/activetest_rsa.pub
+
diff --git a/xos/ActiveTest.m4 b/xos/ActiveTest.m4
new file mode 100644
index 0000000..15af729
--- /dev/null
+++ b/xos/ActiveTest.m4
@@ -0,0 +1,93 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+# compile this with "m4 ActiveTest.m4 > ActiveTest.yaml"
+
+# include macros
+include(macros.m4)
+
+node_types:
+    tosca.nodes.ActiveTest:
+        derived_from: tosca.nodes.Root
+        description: >
+            ActiveTest Service
+        capabilities:
+            xos_base_service_caps
+        properties:
+            xos_base_props
+            xos_base_service_props
+
+    tosca.nodes.VtaService:
+        derived_from: tosca.nodes.Root
+        description: >
+            VTA Service
+        capabilities:
+            xos_base_service_caps
+        properties:
+            xos_base_props
+            xos_base_service_props
+
+    tosca.nodes.Qt600Service:
+        derived_from: tosca.nodes.Root
+        description: >
+            QT600 Service
+        capabilities:
+            xos_base_service_caps
+        properties:
+            xos_base_props
+            xos_base_service_props
+
+    tosca.nodes.VpmaService:
+        derived_from: tosca.nodes.Root
+        description: >
+            VPMA Service
+        capabilities:
+            xos_base_service_caps
+        properties:
+            xos_base_props
+            xos_base_service_props
+
+    tosca.nodes.ActiveTestTenant:
+        derived_from: tosca.nodes.Root
+        description: >
+            A Tenant of the ActiveTest service
+        properties:
+            xos_base_tenant_props
+
+    tosca.nodes.VtaTenant:
+        derived_from: tosca.nodes.Root
+        description: >
+            A Tenant of the VTA service
+        properties:
+            xos_base_tenant_props
+
+    tosca.nodes.Qt600Tenant:
+        derived_from: tosca.nodes.Root
+        description: >
+            A Tenant of the QT600 service
+        properties:
+            xos_base_tenant_props
+            is_reflector:
+                type: boolean
+                required: false
+            is_initiator:
+                type: boolean
+                required: false
+            reflector:
+                type: string
+                required: false
+
+    tosca.nodes.VpmaTenant:
+        derived_from: tosca.nodes.Root
+        description: >
+            A Tenant of the VPMA service
+        properties:
+            xos_base_tenant_props
+            is_reflector:
+                type: boolean
+                required: false
+            is_initiator:
+                type: boolean
+                required: false
+            reflector:
+                type: string
+                required: false
diff --git a/xos/ActiveTest.yaml b/xos/ActiveTest.yaml
new file mode 100644
index 0000000..6c36501
--- /dev/null
+++ b/xos/ActiveTest.yaml
@@ -0,0 +1,328 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+# compile this with "m4 ActiveTest.m4 > ActiveTest.yaml"
+
+# include macros
+# Note: Tosca derived_from isn't working the way I think it should, it's not
+#    inheriting from the parent template. Until we get that figured out, use
+#    m4 macros do our inheritance
+
+
+# Service
+
+
+# Subscriber
+
+
+
+
+# end m4 macros
+
+
+
+node_types:
+    tosca.nodes.ActiveTest:
+        derived_from: tosca.nodes.Root
+        description: >
+            ActiveTest Service
+        capabilities:
+            scalable:
+                type: tosca.capabilities.Scalable
+            service:
+                type: tosca.capabilities.xos.Service
+        properties:
+            no-delete:
+                type: boolean
+                default: false
+                description: Do not allow Tosca to delete this object
+            no-create:
+                type: boolean
+                default: false
+                description: Do not allow Tosca to create this object
+            no-update:
+                type: boolean
+                default: false
+                description: Do not allow Tosca to update this object
+            replaces:
+                type: string
+                required: false
+                descrption: Replaces/renames this object
+            kind:
+                type: string
+                default: generic
+                description: Type of service.
+            view_url:
+                type: string
+                required: false
+                description: URL to follow when icon is clicked in the Service Directory.
+            icon_url:
+                type: string
+                required: false
+                description: ICON to display in the Service Directory.
+            enabled:
+                type: boolean
+                default: true
+            published:
+                type: boolean
+                default: true
+                description: If True then display this Service in the Service Directory.
+            public_key:
+                type: string
+                required: false
+                description: Public key to install into Instances to allows Services to SSH into them.
+            private_key_fn:
+                type: string
+                required: false
+                description: Location of private key file
+            versionNumber:
+                type: string
+                required: false
+                description: Version number of Service.
+
+    tosca.nodes.VtaService:
+        derived_from: tosca.nodes.Root
+        description: >
+            VTA Service
+        capabilities:
+            scalable:
+                type: tosca.capabilities.Scalable
+            service:
+                type: tosca.capabilities.xos.Service
+        properties:
+            no-delete:
+                type: boolean
+                default: false
+                description: Do not allow Tosca to delete this object
+            no-create:
+                type: boolean
+                default: false
+                description: Do not allow Tosca to create this object
+            no-update:
+                type: boolean
+                default: false
+                description: Do not allow Tosca to update this object
+            replaces:
+                type: string
+                required: false
+                descrption: Replaces/renames this object
+            kind:
+                type: string
+                default: generic
+                description: Type of service.
+            view_url:
+                type: string
+                required: false
+                description: URL to follow when icon is clicked in the Service Directory.
+            icon_url:
+                type: string
+                required: false
+                description: ICON to display in the Service Directory.
+            enabled:
+                type: boolean
+                default: true
+            published:
+                type: boolean
+                default: true
+                description: If True then display this Service in the Service Directory.
+            public_key:
+                type: string
+                required: false
+                description: Public key to install into Instances to allows Services to SSH into them.
+            private_key_fn:
+                type: string
+                required: false
+                description: Location of private key file
+            versionNumber:
+                type: string
+                required: false
+                description: Version number of Service.
+
+    tosca.nodes.Qt600Service:
+        derived_from: tosca.nodes.Root
+        description: >
+            QT600 Service
+        capabilities:
+            scalable:
+                type: tosca.capabilities.Scalable
+            service:
+                type: tosca.capabilities.xos.Service
+        properties:
+            no-delete:
+                type: boolean
+                default: false
+                description: Do not allow Tosca to delete this object
+            no-create:
+                type: boolean
+                default: false
+                description: Do not allow Tosca to create this object
+            no-update:
+                type: boolean
+                default: false
+                description: Do not allow Tosca to update this object
+            replaces:
+                type: string
+                required: false
+                descrption: Replaces/renames this object
+            kind:
+                type: string
+                default: generic
+                description: Type of service.
+            view_url:
+                type: string
+                required: false
+                description: URL to follow when icon is clicked in the Service Directory.
+            icon_url:
+                type: string
+                required: false
+                description: ICON to display in the Service Directory.
+            enabled:
+                type: boolean
+                default: true
+            published:
+                type: boolean
+                default: true
+                description: If True then display this Service in the Service Directory.
+            public_key:
+                type: string
+                required: false
+                description: Public key to install into Instances to allows Services to SSH into them.
+            private_key_fn:
+                type: string
+                required: false
+                description: Location of private key file
+            versionNumber:
+                type: string
+                required: false
+                description: Version number of Service.
+
+    tosca.nodes.VpmaService:
+        derived_from: tosca.nodes.Root
+        description: >
+            VPMA Service
+        capabilities:
+            scalable:
+                type: tosca.capabilities.Scalable
+            service:
+                type: tosca.capabilities.xos.Service
+        properties:
+            no-delete:
+                type: boolean
+                default: false
+                description: Do not allow Tosca to delete this object
+            no-create:
+                type: boolean
+                default: false
+                description: Do not allow Tosca to create this object
+            no-update:
+                type: boolean
+                default: false
+                description: Do not allow Tosca to update this object
+            replaces:
+                type: string
+                required: false
+                descrption: Replaces/renames this object
+            kind:
+                type: string
+                default: generic
+                description: Type of service.
+            view_url:
+                type: string
+                required: false
+                description: URL to follow when icon is clicked in the Service Directory.
+            icon_url:
+                type: string
+                required: false
+                description: ICON to display in the Service Directory.
+            enabled:
+                type: boolean
+                default: true
+            published:
+                type: boolean
+                default: true
+                description: If True then display this Service in the Service Directory.
+            public_key:
+                type: string
+                required: false
+                description: Public key to install into Instances to allows Services to SSH into them.
+            private_key_fn:
+                type: string
+                required: false
+                description: Location of private key file
+            versionNumber:
+                type: string
+                required: false
+                description: Version number of Service.
+
+    tosca.nodes.ActiveTestTenant:
+        derived_from: tosca.nodes.Root
+        description: >
+            A Tenant of the ActiveTest service
+        properties:
+            kind:
+                type: string
+                default: generic
+                description: Kind of tenant
+            service_specific_id:
+                type: string
+                required: false
+                description: Service specific ID opaque to XOS but meaningful to service
+
+    tosca.nodes.VtaTenant:
+        derived_from: tosca.nodes.Root
+        description: >
+            A Tenant of the VTA service
+        properties:
+            kind:
+                type: string
+                default: generic
+                description: Kind of tenant
+            service_specific_id:
+                type: string
+                required: false
+                description: Service specific ID opaque to XOS but meaningful to service
+
+    tosca.nodes.Qt600Tenant:
+        derived_from: tosca.nodes.Root
+        description: >
+            A Tenant of the QT600 service
+        properties:
+            kind:
+                type: string
+                default: generic
+                description: Kind of tenant
+            service_specific_id:
+                type: string
+                required: false
+                description: Service specific ID opaque to XOS but meaningful to service
+            is_reflector:
+                type: boolean
+                required: false
+            is_initiator:
+                type: boolean
+                required: false
+            reflector:
+                type: string
+                required: false
+
+    tosca.nodes.VpmaTenant:
+        derived_from: tosca.nodes.Root
+        description: >
+            A Tenant of the VPMA service
+        properties:
+            kind:
+                type: string
+                default: generic
+                description: Kind of tenant
+            service_specific_id:
+                type: string
+                required: false
+                description: Service specific ID opaque to XOS but meaningful to service
+            is_reflector:
+                type: boolean
+                required: false
+            is_initiator:
+                type: boolean
+                required: false
+            reflector:
+                type: string
+                required: false
diff --git a/xos/admin.py b/xos/admin.py
new file mode 100644
index 0000000..f525e69
--- /dev/null
+++ b/xos/admin.py
@@ -0,0 +1,266 @@
+# admin.py - ActiveTest Django Admin
+
+from core.admin import ReadOnlyAwareAdmin, SliceInline
+from core.middleware import get_request
+from core.models import User
+
+from django import forms
+from django.contrib import admin
+
+from services.activetest.models import *
+
+class ActiveTestForm(forms.ModelForm):
+
+    class Meta:
+        model = ActiveTestService
+        fields = '__all__'
+
+class ActiveTestAdmin(ReadOnlyAwareAdmin):
+
+    model = ActiveTestService
+    verbose_name = ACTIVETEST_SERVICE_NAME_VERBOSE
+    verbose_name_plural = ACTIVETEST_SERVICE_NAME_VERBOSE_PLURAL
+    form = ActiveTestForm
+    inlines = [SliceInline]
+
+    list_display = ('backend_status_icon', 'name', 'enabled')
+    list_display_links = ('backend_status_icon', 'name' )
+
+    fieldsets = [(None, {
+        'fields': ['backend_status_text', 'name', 'enabled', 'versionNumber', 'description',],
+        'classes':['suit-tab suit-tab-general',],
+        })]
+
+    readonly_fields = ('backend_status_text', )
+    user_readonly_fields = ['name', 'enabled', 'versionNumber', 'description',]
+
+    extracontext_registered_admins = True
+
+    suit_form_tabs = (
+        ('general', 'ActiveTest Details', ),
+        ('slices', 'Slices',),
+        )
+
+    suit_form_includes = ((
+        'top',
+        'administration'),
+        )
+
+    def get_queryset(self, request):
+        return ActiveTestService.get_service_objects_by_user(request.user)
+
+admin.site.register(ActiveTestService, ActiveTestAdmin)
+
+class ActiveTestTenantForm(forms.ModelForm):
+
+    class Meta:
+        model = ActiveTestTenant
+        fields = '__all__'
+
+    creator = forms.ModelChoiceField(queryset=User.objects.all())
+
+    def __init__(self, *args, **kwargs):
+        super(ActiveTestTenantForm, self).__init__(*args, **kwargs)
+
+        self.fields['kind'].widget.attrs['readonly'] = True
+        self.fields['kind'].initial = ACTIVETEST_KIND
+
+        self.fields['provider_service'].queryset = ActiveTestService.get_service_objects().all()
+
+        if self.instance:
+            self.fields['creator'].initial = self.instance.creator
+
+        if (not self.instance) or (not self.instance.pk):
+            self.fields['creator'].initial = get_request().user
+            if ActiveTestService.get_service_objects().exists():
+                self.fields['provider_service'].initial = ActiveTestService.get_service_objects().all()[0]
+
+    def save(self, commit=True):
+        self.instance.creator = self.cleaned_data.get('creator')
+        return super(ActiveTestTenantForm, self).save(commit=commit)
+
+
+class ActiveTestTenantAdmin(ReadOnlyAwareAdmin):
+
+    verbose_name = ACTIVETEST_TENANT_NAME_VERBOSE
+    verbose_name_plural = ACTIVETEST_TENANT_NAME_VERBOSE_PLURAL
+
+    list_display = ('id', 'backend_status_icon', 'instance')
+    list_display_links = ('backend_status_icon', 'instance', 'id')
+
+    fieldsets = [(None, {
+        'fields': ['backend_status_text', 'kind', 'provider_service', 'instance', 'creator'],
+        'classes': ['suit-tab suit-tab-general'],
+        })]
+
+    readonly_fields = ('backend_status_text', 'instance',)
+
+    form = ActiveTestTenantForm
+
+    suit_form_tabs = (('general', 'Details'),)
+
+    def get_queryset(self, request):
+        return ActiveTestTenant.get_tenant_objects_by_user(request.user)
+
+admin.site.register(ActiveTestTenant, ActiveTestTenantAdmin)
+
+########################################################################################
+"""
+class VpmaForm(forms.ModelForm):
+
+    class Meta:
+        model = VpmaService
+        fields = '__all__'
+
+class VpmaAdmin(ReadOnlyAwareAdmin):
+
+    model = VpmaService
+    verbose_name = VPMA_SERVICE_NAME_VERBOSE
+    verbose_name_plural = VPMA_SERVICE_NAME_VERBOSE_PLURAL
+    form = VpmaForm
+    inlines = [SliceInline]
+
+    list_display = ('backend_status_icon', 'name', 'enabled')
+    list_display_links = ('backend_status_icon', 'name' )
+
+    fieldsets = [(None, {
+        'fields': ['backend_status_text', 'name', 'enabled', 'versionNumber', 'description',],
+        'classes':['suit-tab suit-tab-general',],
+        })]
+
+    readonly_fields = ('backend_status_text', )
+    user_readonly_fields = ['name', 'enabled', 'versionNumber', 'description',]
+
+    extracontext_registered_admins = True
+
+    suit_form_tabs = (
+        ('general', 'Vpma Details', ),
+        ('slices', 'Slices',),
+        )
+
+    suit_form_includes = ((
+        'top',
+        'administration'),
+        )
+
+    def get_queryset(self, request):
+        return VpmaService.get_service_objects_by_user(request.user)
+
+admin.site.register(VpmaService, VpmaAdmin)
+"""
+class Qt600TenantForm(forms.ModelForm):
+
+    class Meta:
+        model = Qt600Tenant
+        fields = '__all__'
+
+    creator = forms.ModelChoiceField(queryset=User.objects.all())
+
+    def __init__(self, *args, **kwargs):
+        super(Qt600TenantForm, self).__init__(*args, **kwargs)
+
+        self.fields['kind'].widget.attrs['readonly'] = True
+        self.fields['kind'].initial = ACTIVETEST_KIND
+
+        self.fields['provider_service'].queryset = Qt600Service.get_service_objects().all()
+
+        if self.instance:
+            self.fields['creator'].initial = self.instance.creator
+            self.fields['is_reflector'].initial = self.instance.is_reflector
+            self.fields['is_initiator'].initial = self.instance.is_initiator
+            self.fields['reflector'].initial = self.instance.reflector
+
+        if (not self.instance) or (not self.instance.pk):
+            self.fields['creator'].initial = get_request().user
+            if Qt600Service.get_service_objects().exists():
+                self.fields['provider_service'].initial = Qt600Service.get_service_objects().all()[0]
+
+    def save(self, commit=True):
+        self.instance.creator = self.cleaned_data.get('creator')
+        self.instance.is_reflector = self.cleaned_data.get('is_reflector')
+        self.instance.is_initiator = self.cleaned_data.get('is_initiator')
+        self.instance.reflector = self.cleaned_data.get('reflector')
+        return super(Qt600TenantForm, self).save(commit=commit)
+
+class Qt600TenantAdmin(ReadOnlyAwareAdmin):
+
+    verbose_name = QT600_TENANT_NAME_VERBOSE
+    verbose_name_plural = QT600_TENANT_NAME_VERBOSE_PLURAL
+
+    list_display = ('id', 'backend_status_icon', 'instance', 'is_reflector', 'is_initiator', 'reflector')
+    list_display_links = ('backend_status_icon', 'instance', 'is_reflector', 'is_initiator', 'reflector', 'id')
+
+    fieldsets = [(None, {
+        'fields': ['backend_status_text', 'kind', 'provider_service', 'instance', 'creator', 'is_reflector', 'is_initiator', 'reflector'],
+        'classes': ['suit-tab suit-tab-general'],
+        })]
+
+    readonly_fields = ('backend_status_text', 'instance',)
+
+    form = Qt600TenantForm
+
+    suit_form_tabs = (('general', 'Details'),)
+
+    def get_queryset(self, request):
+        return Qt600Tenant.get_tenant_objects_by_user(request.user)
+
+admin.site.register(Qt600Tenant, Qt600TenantAdmin)
+
+class VpmaTenantForm(forms.ModelForm):
+
+    class Meta:
+        model = VpmaTenant
+        fields = '__all__'
+
+    creator = forms.ModelChoiceField(queryset=User.objects.all())
+
+    def __init__(self, *args, **kwargs):
+        super(VpmaTenantForm, self).__init__(*args, **kwargs)
+
+        self.fields['kind'].widget.attrs['readonly'] = True
+        self.fields['kind'].initial = ACTIVETEST_KIND
+
+        self.fields['provider_service'].queryset = VpmaService.get_service_objects().all()
+
+        if self.instance:
+            self.fields['creator'].initial = self.instance.creator
+            self.fields['is_reflector'].initial = self.instance.is_reflector
+            self.fields['is_initiator'].initial = self.instance.is_initiator
+            self.fields['reflector'].initial = self.instance.reflector
+
+        if (not self.instance) or (not self.instance.pk):
+            self.fields['creator'].initial = get_request().user
+            if VpmaService.get_service_objects().exists():
+                self.fields['provider_service'].initial = VpmaService.get_service_objects().all()[0]
+
+    def save(self, commit=True):
+        self.instance.creator = self.cleaned_data.get('creator')
+        self.instance.is_reflector = self.cleaned_data.get('is_reflector')
+        self.instance.is_initiator = self.cleaned_data.get('is_initiator')
+        self.instance.reflector = self.cleaned_data.get('reflector')
+        return super(VpmaTenantForm, self).save(commit=commit)
+
+
+class VpmaTenantAdmin(ReadOnlyAwareAdmin):
+
+    verbose_name = VPMA_TENANT_NAME_VERBOSE
+    verbose_name_plural = VPMA_TENANT_NAME_VERBOSE_PLURAL
+
+    list_display = ('id', 'backend_status_icon', 'instance', 'is_reflector', 'is_initiator', 'reflector')
+    list_display_links = ('backend_status_icon', 'instance', 'is_reflector', 'is_initiator', 'reflector', 'id')
+
+    fieldsets = [(None, {
+        'fields': ['backend_status_text', 'kind', 'provider_service', 'instance', 'creator', 'is_reflector', 'is_initiator', 'reflector'],
+        'classes': ['suit-tab suit-tab-general'],
+        })]
+
+    readonly_fields = ('backend_status_text', 'instance',)
+
+    form = VpmaTenantForm
+
+    suit_form_tabs = (('general', 'Details'),)
+
+    def get_queryset(self, request):
+        return VpmaTenant.get_tenant_objects_by_user(request.user)
+
+admin.site.register(VpmaTenant, VpmaTenantAdmin)
diff --git a/xos/api/service/activetest.py b/xos/api/service/activetest.py
new file mode 100644
index 0000000..8492d93
--- /dev/null
+++ b/xos/api/service/activetest.py
@@ -0,0 +1,108 @@
+from rest_framework.decorators import api_view
+from rest_framework.response import Response
+from rest_framework.reverse import reverse
+from rest_framework import serializers
+from rest_framework import generics
+from rest_framework import viewsets
+from rest_framework import status
+from rest_framework.decorators import detail_route, list_route
+from rest_framework.views import APIView
+from core.models import *
+from django.forms import widgets
+from django.conf.urls import patterns, url
+from api.xosapi_helpers import PlusModelSerializer, XOSViewSet, ReadOnlyField
+from django.shortcuts import get_object_or_404
+from xos.apibase import XOSListCreateAPIView, XOSRetrieveUpdateDestroyAPIView, XOSPermissionDenied
+from xos.exceptions import *
+import json
+import subprocess
+from services.activetest.models import ActiveTestService, VpmaService, Qt600Service
+
+class ActiveTestSerializer(PlusModelSerializer):
+        id = ReadOnlyField()
+        humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
+
+        class Meta:
+            model = ActiveTestService
+            fields = ('humanReadableName',
+                      'id')
+
+        def getHumanReadableName(self, obj):
+            return obj.__unicode__()
+
+class ActiveTestViewSet(XOSViewSet):
+    base_name = "activetest"
+    method_name = "activetest"
+    method_kind = "viewset"
+    queryset = ActiveTestService.get_service_objects().all()
+    serializer_class = ActiveTestSerializer
+
+    @classmethod
+    def get_urlpatterns(self, api_path="^"):
+        patterns = super(ActiveTestViewSet, self).get_urlpatterns(api_path=api_path)
+        return patterns
+
+    def list(self, request):
+        object_list = self.filter_queryset(self.get_queryset())
+        serializer = self.get_serializer(object_list, many=True)
+        return Response(serializer.data)
+
+############################################################################################
+
+class VpmaSerializer(PlusModelSerializer):
+        id = ReadOnlyField()
+        humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
+
+        class Meta:
+            model = VpmaService
+            fields = ('humanReadableName',
+                      'id')
+
+        def getHumanReadableName(self, obj):
+            return obj.__unicode__()
+
+class VpmaViewSet(XOSViewSet):
+    base_name = "vpma"
+    method_name = "vpma"
+    method_kind = "viewset"
+    queryset = VpmaService.get_service_objects().all()
+    serializer_class = VpmaSerializer
+
+    @classmethod
+    def get_urlpatterns(self, api_path="^"):
+        patterns = super(VpmaViewSet, self).get_urlpatterns(api_path=api_path)
+        return patterns
+
+    def list(self, request):
+        object_list = self.filter_queryset(self.get_queryset())
+        serializer = self.get_serializer(object_list, many=True)
+        return Response(serializer.data)
+
+class Qt600Serializer(PlusModelSerializer):
+        id = ReadOnlyField()
+        humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
+
+        class Meta:
+            model = Qt600Service
+            fields = ('humanReadableName',
+                      'id')
+
+        def getHumanReadableName(self, obj):
+            return obj.__unicode__()
+
+class Qt600ViewSet(XOSViewSet):
+    base_name = "qt600"
+    method_name = "qt600"
+    method_kind = "viewset"
+    queryset = Qt600Service.get_service_objects().all()
+    serializer_class = Qt600Serializer
+
+    @classmethod
+    def get_urlpatterns(self, api_path="^"):
+        patterns = super(Qt600ViewSet, self).get_urlpatterns(api_path=api_path)
+        return patterns
+
+    def list(self, request):
+        object_list = self.filter_queryset(self.get_queryset())
+        serializer = self.get_serializer(object_list, many=True)
+        return Response(serializer.data)
diff --git a/xos/api/tenant/activetesttenant.py b/xos/api/tenant/activetesttenant.py
new file mode 100644
index 0000000..3da66dd
--- /dev/null
+++ b/xos/api/tenant/activetesttenant.py
@@ -0,0 +1,201 @@
+from rest_framework.decorators import api_view
+from rest_framework.response import Response
+from rest_framework.reverse import reverse
+from rest_framework import serializers
+from rest_framework import generics
+from rest_framework import status
+from core.models import *
+from django.forms import widgets
+from xos.apibase import XOSListCreateAPIView, XOSRetrieveUpdateDestroyAPIView, XOSPermissionDenied
+from api.xosapi_helpers import PlusModelSerializer, XOSViewSet, ReadOnlyField
+
+from services.activetest.models import ActiveTestTenant, ActiveTestService, VpmaService, VpmaTenant, Qt600Service, Qt600Tenant
+
+def get_default_activetest_service():
+    activetest_services = ActiveTestService.get_service_objects().all()
+    if activetest_services:
+        return activetest_services[0]
+    return None
+
+class ActiveTestTenantSerializer(PlusModelSerializer):
+        id = ReadOnlyField()
+        provider_service = serializers.PrimaryKeyRelatedField(queryset=ActiveTestService.get_service_objects().all(), default=get_default_activetest_service)
+        backend_status = ReadOnlyField()
+
+        humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
+
+        class Meta:
+            model = ActiveTestTenant
+            fields = ('humanReadableName', 'id', 'provider_service', 'backend_status')
+
+        def getHumanReadableName(self, obj):
+            return obj.__unicode__()
+
+class ActiveTestTenantViewSet(XOSViewSet):
+    base_name = "activetesttenant"
+    method_name = "activetesttenant"
+    method_kind = "viewset"
+    queryset = ActiveTestTenant.get_tenant_objects().all()
+    serializer_class = ActiveTestTenantSerializer
+
+
+    def list(self, request):
+        queryset = self.filter_queryset(self.get_queryset())
+        serializer = self.get_serializer(queryset, many=True)
+        return Response(serializer.data)
+
+#####################################################################################################################
+
+def get_default_vpma_service():
+    vpma_services = VpmaService.get_service_objects().all()
+    if vpma_services:
+        return vpma_services[0]
+    return None
+
+class VpmaTenantSerializer(PlusModelSerializer):
+        id = ReadOnlyField()
+        provider_service = serializers.PrimaryKeyRelatedField(queryset=VpmaService.get_service_objects().all(), default=get_default_vpma_service)
+        backend_status = ReadOnlyField()
+        is_reflector = serializers.BooleanField(required=False)
+        is_initiator = serializers.BooleanField(required=False)
+        reflector = serializers.CharField(required=False)
+
+        humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
+
+        class Meta:
+            model = VpmaTenant
+            fields = ('humanReadableName', 'id', 'provider_service', 'is_reflector', 'is_initiator', 'reflector', 'backend_status')
+
+        def getHumanReadableName(self, obj):
+            return obj.__unicode__()
+
+class VpmaTenantViewSet(XOSViewSet):
+    base_name = "vpmatenant"
+    method_name = "vpmatenant"
+    method_kind = "viewset"
+    queryset = VpmaTenant.get_tenant_objects().all()
+    serializer_class = VpmaTenantSerializer
+
+    @classmethod
+    def get_urlpatterns(self, api_path="^"):
+        patterns = super(VpmaTenantViewSet, self).get_urlpatterns(api_path=api_path)
+
+        # example to demonstrate adding a custom endpoint
+        patterns.append( self.detail_url("is_initiator/$", {"get": "get_is_initiator", "put": "set_is_initiator"}, "is_initiator") )
+        patterns.append( self.detail_url("is_reflector/$", {"get": "get_is_reflector", "put": "set_is_reflector"}, "is_reflector") )
+        patterns.append( self.detail_url("reflector/$", {"get": "get_reflector", "put": "set_reflector"}, "reflector") )
+
+        return patterns
+
+    def list(self, request):
+        queryset = self.filter_queryset(self.get_queryset())
+        serializer = self.get_serializer(queryset, many=True)
+        return Response(serializer.data)
+
+    def get_is_initiator(self, request, pk=None):
+        vpma_tenant = self.get_object()
+        return Response({"is_initiator": vpma_tenant.is_initiator})
+
+    def set_is_initiator(self, request, pk=None):
+        vpma_tenant = self.get_object()
+        vpma_tenant.is_initiator = request.data["is_initiator"]
+        vpma_tenant.save()
+        return Response({"is_initiator": vpma_tenant.is_initiator})
+
+    def get_is_reflector(self, request, pk=None):
+        vpma_tenant = self.get_object()
+        return Response({"is_reflector": vpma_tenant.is_reflector})
+
+    def set_is_reflector(self, request, pk=None):
+        vpma_tenant = self.get_object()
+        vpma_tenant.is_reflector = request.data["is_reflector"]
+        vpma_tenant.save()
+        return Response({"is_reflector": vpma_tenant.is_reflector})
+
+    def get_reflector(self, request, pk=None):
+        vpma_tenant = self.get_object()
+        return Response({"reflector": vpma_tenant.reflector})
+
+    def set_reflector(self, request, pk=None):
+        vpma_tenant = self.get_object()
+        vpma_tenant.reflector = request.data["reflector"]
+        vpma_tenant.save()
+        return Response({"reflector": vpma_tenant.reflector})
+
+#####################################################################################################################
+
+def get_default_qt600_service():
+    qt600_services = Qt600Service.get_service_objects().all()
+    if qt600_services:
+        return qt600_services[0]
+    return None
+
+class Qt600TenantSerializer(PlusModelSerializer):
+        id = ReadOnlyField()
+        provider_service = serializers.PrimaryKeyRelatedField(queryset=Qt600Service.get_service_objects().all(), default=get_default_qt600_service)
+        backend_status = ReadOnlyField()
+        is_reflector = serializers.BooleanField(required=False)
+        is_initiator = serializers.BooleanField(required=False)
+        reflector = serializers.CharField(required=False)
+
+        humanReadableName = serializers.SerializerMethodField("getHumanReadableName")
+
+        class Meta:
+            model = Qt600Tenant
+            fields = ('humanReadableName', 'id', 'provider_service', 'is_reflector', 'is_initiator', 'reflector', 'backend_status')
+
+        def getHumanReadableName(self, obj):
+            return obj.__unicode__()
+
+class Qt600TenantViewSet(XOSViewSet):
+    base_name = "qt600tenant"
+    method_name = "qt600tenant"
+    method_kind = "viewset"
+    queryset = Qt600Tenant.get_tenant_objects().all()
+    serializer_class = Qt600TenantSerializer
+
+    @classmethod
+    def get_urlpatterns(self, api_path="^"):
+        patterns = super(Qt600TenantViewSet, self).get_urlpatterns(api_path=api_path)
+
+        # example to demonstrate adding a custom endpoint
+        patterns.append( self.detail_url("is_initiator/$", {"get": "get_is_initiator", "put": "set_is_initiator"}, "is_initiator") )
+        patterns.append( self.detail_url("is_reflector/$", {"get": "get_is_reflector", "put": "set_is_reflector"}, "is_reflector") )
+        patterns.append( self.detail_url("reflector/$", {"get": "get_reflector", "put": "set_reflector"}, "reflector") )
+
+        return patterns
+
+    def list(self, request):
+        queryset = self.filter_queryset(self.get_queryset())
+        serializer = self.get_serializer(queryset, many=True)
+        return Response(serializer.data)
+
+    def get_is_initiator(self, request, pk=None):
+        qt600_tenant = self.get_object()
+        return Response({"is_initiator": qt600_tenant.is_initiator})
+
+    def set_is_initiator(self, request, pk=None):
+        qt600_tenant = self.get_object()
+        qt600_tenant.is_initiator = request.data["is_initiator"]
+        qt600_tenant.save()
+        return Response({"is_initiator": qt600_tenant.is_initiator})
+
+    def get_is_reflector(self, request, pk=None):
+        qt600_tenant = self.get_object()
+        return Response({"is_reflector": qt600_tenant.is_reflector})
+
+    def set_is_reflector(self, request, pk=None):
+        qt600_tenant = self.get_object()
+        qt600_tenant.is_reflector = request.data["is_reflector"]
+        qt600_tenant.save()
+        return Response({"is_reflector": qt600_tenant.is_reflector})
+
+    def get_reflector(self, request, pk=None):
+        qt600_tenant = self.get_object()
+        return Response({"reflector": qt600_tenant.reflector})
+
+    def set_reflector(self, request, pk=None):
+        qt600_tenant = self.get_object()
+        qt600_tenant.reflector = request.data["reflector"]
+        qt600_tenant.save()
+        return Response({"reflector": qt600_tenant.reflector})
diff --git a/xos/macros.m4 b/xos/macros.m4
new file mode 100644
index 0000000..1f48f10
--- /dev/null
+++ b/xos/macros.m4
@@ -0,0 +1,84 @@
+# Note: Tosca derived_from isn't working the way I think it should, it's not
+#    inheriting from the parent template. Until we get that figured out, use
+#    m4 macros do our inheritance
+
+define(xos_base_props,
+            no-delete:
+                type: boolean
+                default: false
+                description: Do not allow Tosca to delete this object
+            no-create:
+                type: boolean
+                default: false
+                description: Do not allow Tosca to create this object
+            no-update:
+                type: boolean
+                default: false
+                description: Do not allow Tosca to update this object
+            replaces:
+                type: string
+                required: false
+                descrption: Replaces/renames this object)
+# Service
+define(xos_base_service_caps,
+            scalable:
+                type: tosca.capabilities.Scalable
+            service:
+                type: tosca.capabilities.xos.Service)
+define(xos_base_service_props,
+            kind:
+                type: string
+                default: generic
+                description: Type of service.
+            view_url:
+                type: string
+                required: false
+                description: URL to follow when icon is clicked in the Service Directory.
+            icon_url:
+                type: string
+                required: false
+                description: ICON to display in the Service Directory.
+            enabled:
+                type: boolean
+                default: true
+            published:
+                type: boolean
+                default: true
+                description: If True then display this Service in the Service Directory.
+            public_key:
+                type: string
+                required: false
+                description: Public key to install into Instances to allows Services to SSH into them.
+            private_key_fn:
+                type: string
+                required: false
+                description: Location of private key file
+            versionNumber:
+                type: string
+                required: false
+                description: Version number of Service.)
+# Subscriber
+define(xos_base_subscriber_caps,
+            subscriber:
+                type: tosca.capabilities.xos.Subscriber)
+define(xos_base_subscriber_props,
+            kind:
+                type: string
+                default: generic
+                description: Kind of subscriber
+            service_specific_id:
+                type: string
+                required: false
+                description: Service specific ID opaque to XOS but meaningful to service)
+define(xos_base_tenant_props,
+            kind:
+                type: string
+                default: generic
+                description: Kind of tenant
+            service_specific_id:
+                type: string
+                required: false
+                description: Service specific ID opaque to XOS but meaningful to service)
+
+# end m4 macros
+
diff --git a/xos/make_synchronizer_manifest.sh b/xos/make_synchronizer_manifest.sh
new file mode 100644
index 0000000..4058982
--- /dev/null
+++ b/xos/make_synchronizer_manifest.sh
@@ -0,0 +1,2 @@
+#! /bin/bash
+find synchronizer -type f | cut -b 14- > synchronizer/manifest 
diff --git a/xos/models.py b/xos/models.py
new file mode 100644
index 0000000..664762b
--- /dev/null
+++ b/xos/models.py
@@ -0,0 +1,335 @@
+# models.py -  ExampleService Models
+
+from core.models import Service, TenantWithContainer
+from django.db import models, transaction
+
+ACTIVETEST_KIND = 'ActiveTest'
+ACTIVETEST_SERVICE_NAME = 'activetest'
+ACTIVETEST_SERVICE_NAME_VERBOSE = 'ACTIVETEST Service'
+ACTIVETEST_SERVICE_NAME_VERBOSE_PLURAL = 'ACTIVETEST Services'
+ACTIVETEST_TENANT_NAME_VERBOSE = 'ACTIVETEST Tenant'
+ACTIVETEST_TENANT_NAME_VERBOSE_PLURAL = 'ACTIVETEST Tenants'
+
+QT600_SERVICE_NAME = 'qt600'
+QT600_SERVICE_NAME_VERBOSE = 'QT600 Service'
+QT600_SERVICE_NAME_VERBOSE_PLURAL = 'QT600 Services'
+QT600_TENANT_NAME_VERBOSE = 'QT600 Tenant'
+QT600_TENANT_NAME_VERBOSE_PLURAL = 'QT600 Tenants'
+
+VPMA_SERVICE_NAME = 'vpma'
+VPMA_SERVICE_NAME_VERBOSE = 'VPMA Service'
+VPMA_SERVICE_NAME_VERBOSE_PLURAL = 'VPMA Services'
+VPMA_TENANT_NAME_VERBOSE = 'VPMA Tenant'
+VPMA_TENANT_NAME_VERBOSE_PLURAL = 'VPMA Tenants'
+
+VTA_SERVICE_NAME = 'vta'
+VTA_SERVICE_NAME_VERBOSE = 'VTA Service'
+VTA_SERVICE_NAME_VERBOSE_PLURAL = 'VTA Services'
+VTA_TENANT_NAME_VERBOSE = 'VTA Tenant'
+VTA_TENANT_NAME_VERBOSE_PLURAL = 'VTA Tenants'
+
+class ActiveTestService(Service):
+
+    KIND = ACTIVETEST_KIND
+
+    class Meta:
+        app_label = ACTIVETEST_SERVICE_NAME
+        verbose_name = ACTIVETEST_SERVICE_NAME_VERBOSE
+        proxy = True
+
+class Qt600Service(Service):
+
+    KIND = ACTIVETEST_KIND
+    class Meta:
+        app_label = QT600_SERVICE_NAME
+        verbose_name = QT600_SERVICE_NAME_VERBOSE
+        proxy = True
+
+class VpmaService(Service):
+
+    KIND = ACTIVETEST_KIND
+    class Meta:
+        app_label = VPMA_SERVICE_NAME
+        verbose_name = VPMA_SERVICE_NAME_VERBOSE
+        proxy = True
+
+class VtaService(Service):
+
+    KIND = ACTIVETEST_KIND
+    class Meta:
+        app_label = VTA_SERVICE_NAME
+        verbose_name = VTA_SERVICE_NAME_VERBOSE
+        proxy = True
+
+class ActiveTestTenant(TenantWithContainer):
+
+    KIND = ACTIVETEST_KIND
+
+    class Meta:
+        verbose_name = ACTIVETEST_TENANT_NAME_VERBOSE
+
+    def __init__(self, *args, **kwargs):
+        activetestservice = ActiveTestService.get_service_objects().all()
+        if activetestservice:
+            self._meta.get_field('provider_service').default = activetestservice[0].id
+        super(ActiveTestTenant, self).__init__(*args, **kwargs)
+
+    def save(self, *args, **kwargs):
+        super(ActiveTestTenant, self).save(*args, **kwargs)
+        model_policy_activetesttenant(self.pk)
+
+    def delete(self, *args, **kwargs):
+        self.cleanup_container()
+        super(ActiveTestTenant, self).delete(*args, **kwargs)
+
+    @property
+    def public_ip(self):
+        for port in self.instance.ports.all():
+            if "public" in port.network.name.lower():
+                return port.ip
+        return None
+
+def model_policy_activetesttenant(pk):
+    with transaction.atomic():
+        tenant = ActiveTestTenant.objects.select_for_update().filter(pk=pk)
+        if not tenant:
+            return
+        tenant = tenant[0]
+        tenant.manage_container()
+
+class Qt600Tenant(TenantWithContainer):
+
+    KIND = ACTIVETEST_KIND
+    sync_attributes = ["is_reflector","is_initiator","reflector_ip","reflector_public_ip","private_ip","public_ip"]
+    
+    is_reflector = models.BooleanField(default=False,help_text="True if this tenant should be a TWAMP reflector")
+    is_initiator = models.BooleanField(default=False,help_text="True if this tenant should be a TWAMP initiator")
+    reflector = models.CharField(max_length=254,default="", blank=True, help_text="The reflector node to use for the test")
+
+    class Meta:
+        verbose_name = QT600_TENANT_NAME_VERBOSE
+
+    def __init__(self, *args, **kwargs):
+        service = Qt600Service.get_service_objects().all()
+        if service:
+            self._meta.get_field('provider_service').default = service[0].id
+        super(Qt600Tenant, self).__init__(*args, **kwargs)
+
+    def save(self, *args, **kwargs):
+        super(Qt600Tenant, self).save(*args, **kwargs)
+        model_policy_qt600tenant(self.pk)
+
+    def delete(self, *args, **kwargs):
+        self.cleanup_container()
+        super(Qt600TenantTenant, self).delete(*args, **kwargs)
+
+    @property
+    def private_ip(self):
+        for port in self.instance.ports.all():
+            if "test_network" in port.network.name.lower():
+                return port.ip
+        return None
+
+    @property
+    def public_ip(self):
+        for port in self.instance.ports.all():
+            if "public" in port.network.name.lower():
+                return port.ip
+        return None
+
+    def get_reflector_vm(self):
+        service = [s for s in ActiveTestService.get_service_objects().all() if "qt600" in s.name.lower()]
+        if service and self.reflector:
+            slices = service[0].slices.all()
+            for slice in slices:
+                instance = [i for i in slice.instances.all() if self.reflector in i.instance_name.lower()]
+                if len(instance) > 0:
+                    return instance[0]
+        return None
+        
+    @property
+    def reflector_ip(self):
+        instance = self.get_reflector_vm()
+        if instance:
+            for port in instance.ports.all():
+                if "test_network" in port.network.name.lower():
+                    return port.ip
+        return None
+
+    @property
+    def reflector_public_ip(self):
+        instance = self.get_reflector_vm()
+        if instance:
+            for port in instance.ports.all():
+                if "public" in port.network.name.lower():
+                    return port.ip
+        return None
+
+    @property
+    def controller_ip(self):
+        service = [s for s in ActiveTestService.get_service_objects().all() if "activetest" in s.name.lower()]
+        if service:
+            slices = service[0].slices.all()
+            for slice in slices:
+                for instance in slice.instances.all():
+                    for port in instance.ports.all():
+                        if "public" in port.network.name.lower():
+                            return port.ip
+        return None
+
+
+def model_policy_qt600tenant(pk):
+    with transaction.atomic():
+        tenant = Qt600Tenant.objects.select_for_update().filter(pk=pk)
+        if not tenant:
+            return
+        tenant = tenant[0]
+        tenant.manage_container()
+
+class VpmaTenant(TenantWithContainer):
+
+    KIND = ACTIVETEST_KIND
+    sync_attributes = ["is_reflector","is_initiator","reflector_ip","reflector_public_ip","private_ip","public_ip"]
+    
+    is_reflector = models.BooleanField(default=False,help_text="True if this tenant should be a TWAMP reflector")
+    is_initiator = models.BooleanField(default=False,help_text="True if this tenant should be a TWAMP initiator")
+    reflector = models.CharField(max_length=254,default="", blank=True, help_text="The reflector node to use for the test")
+
+    class Meta:
+        verbose_name = VPMA_TENANT_NAME_VERBOSE
+
+    def __init__(self, *args, **kwargs):
+        service = VpmaService.get_service_objects().all()
+        if service:
+            self._meta.get_field('provider_service').default = service[0].id
+        super(VpmaTenant, self).__init__(*args, **kwargs)
+
+    def save(self, *args, **kwargs):
+        super(VpmaTenant, self).save(*args, **kwargs)
+        model_policy_vpmatenant(self.pk)
+
+    def delete(self, *args, **kwargs):
+        self.cleanup_container()
+        super(VpmaTenantTenant, self).delete(*args, **kwargs)
+
+    @property
+    def private_ip(self):
+        for port in self.instance.ports.all():
+            if "test_network" in port.network.name.lower():
+                return port.ip
+        return None
+
+    @property
+    def public_ip(self):
+        for port in self.instance.ports.all():
+            if "public" in port.network.name.lower():
+                return port.ip
+        return None
+
+    def get_reflector_vm(self):
+        service = [s for s in ActiveTestService.get_service_objects().all() if "vpma" in s.name.lower()]
+        if service and self.reflector:
+            slices = service[0].slices.all()
+            for slice in slices:
+                instance = [i for i in slice.instances.all() if self.reflector in i.instance_name.lower()]
+                if len(instance) > 0:
+                    return instance[0]
+        return None
+        
+    @property
+    def reflector_ip(self):
+        instance = self.get_reflector_vm()
+        if instance:
+            for port in instance.ports.all():
+                if "test_network" in port.network.name.lower():
+                    return port.ip
+        return None
+
+    @property
+    def reflector_public_ip(self):
+        instance = self.get_reflector_vm()
+        if instance:
+            for port in instance.ports.all():
+                if "public" in port.network.name.lower():
+                    return port.ip
+        return None
+
+    @property
+    def controller_ip(self):
+        service = [s for s in ActiveTestService.get_service_objects().all() if "activetest" in s.name.lower()]
+        if service:
+            slices = service[0].slices.all()
+            for slice in slices:
+                for instance in slice.instances.all():
+                    for port in instance.ports.all():
+                        if "public" in port.network.name.lower():
+                            return port.ip
+        return None
+
+
+def model_policy_vpmatenant(pk):
+    with transaction.atomic():
+        tenant = VpmaTenant.objects.select_for_update().filter(pk=pk)
+        if not tenant:
+            return
+        tenant = tenant[0]
+        tenant.manage_container()
+
+class VtaTenant(TenantWithContainer):
+
+    KIND = ACTIVETEST_KIND
+    sync_attributes = ["private_ip"]
+
+    class Meta:
+        verbose_name = VTA_TENANT_NAME_VERBOSE
+
+    def __init__(self, *args, **kwargs):
+        service = VtaService.get_service_objects().all()
+        if service:
+            self._meta.get_field('provider_service').default = service[0].id
+        super(VtaTenant, self).__init__(*args, **kwargs)
+
+    def save(self, *args, **kwargs):
+        super(VtaTenant, self).save(*args, **kwargs)
+        model_policy_vtatenant(self.pk)
+
+    def delete(self, *args, **kwargs):
+        self.cleanup_container()
+        super(VtaTenantTenant, self).delete(*args, **kwargs)
+
+    @property
+    def private_ip(self):
+        for port in self.instance.ports.all():
+            if "test_network" in port.network.name.lower():
+                return port.ip
+        return None
+
+    @property
+    def public_ip(self):
+        for port in self.instance.ports.all():
+            if "public" in port.network.name.lower():
+                return port.ip
+        return None
+
+    @property
+    def controller_ip(self):
+        service = [s for s in ActiveTestService.get_service_objects().all() if "activetest" in s.name.lower()]
+        if service:
+            slices = service[0].slices.all()
+            for slice in slices:
+                for instance in slice.instances.all():
+                    for port in instance.ports.all():
+                        if "public" in port.network.name.lower():
+                            return port.ip
+        return None
+
+def model_policy_vtatenant(pk):
+    with transaction.atomic():
+        tenant = VtaTenant.objects.select_for_update().filter(pk=pk)
+        if not tenant:
+            return
+        tenant = tenant[0]
+        tenant.manage_container()
+
+
+
diff --git a/xos/synchronizer/activetest-synchronizer.py b/xos/synchronizer/activetest-synchronizer.py
new file mode 100644
index 0000000..90d2c98
--- /dev/null
+++ b/xos/synchronizer/activetest-synchronizer.py
@@ -0,0 +1,14 @@
+#!/usr/bin/env python
+
+# Runs the standard XOS synchronizer
+
+import importlib
+import os
+import sys
+
+synchronizer_path = os.path.join(os.path.dirname(
+    os.path.realpath(__file__)), "../../synchronizers/base")
+sys.path.append(synchronizer_path)
+mod = importlib.import_module("xos-synchronizer")
+mod.main()
+
diff --git a/xos/synchronizer/activetest-synchronizer.yaml b/xos/synchronizer/activetest-synchronizer.yaml
new file mode 100644
index 0000000..f2ffa56
--- /dev/null
+++ b/xos/synchronizer/activetest-synchronizer.yaml
@@ -0,0 +1,14 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: This recipe provides additional configuration for the onboarded services.
+
+imports:
+   - custom_types/xos.yaml
+
+topology_template:
+  node_templates:
+    servicecontroller#activetest:
+      type: tosca.nodes.ServiceController
+      properties:
+        no-create: true
+        synchronizer_config: /root/setup/files/activetest_config
diff --git a/xos/synchronizer/activetest_config b/xos/synchronizer/activetest_config
new file mode 100644
index 0000000..2051d04
--- /dev/null
+++ b/xos/synchronizer/activetest_config
@@ -0,0 +1,29 @@
+# Required by XOS
+[db]
+name=xos
+user=postgres
+password=password
+host=localhost
+port=5432
+
+# Required by XOS
+[api]
+nova_enabled=True
+
+# Sets options for the synchronizer
+[observer]
+name=activetest
+dependency_graph=/opt/xos/synchronizers/activetest/model-deps
+steps_dir=/opt/xos/synchronizers/activetest/steps
+sys_dir=/opt/xos/synchronizers/activetest/sys
+logfile=/var/log/xos_backend.log
+pretend=False
+backoff_disabled=True
+save_ansible_output=True
+proxy_ssh=True
+proxy_ssh_key=/root/setup/node_key
+proxy_ssh_user=root
+
+[networking]
+use_vtn=True
+
diff --git a/xos/synchronizer/manifest b/xos/synchronizer/manifest
new file mode 100644
index 0000000..5d6d01c
--- /dev/null
+++ b/xos/synchronizer/manifest
@@ -0,0 +1,19 @@
+manifest
+steps/roles/setup_controller/tasks/main.yml
+steps/roles/setup_qt600/tasks/main.yml
+steps/roles/setup_vpma/tasks/main.yml
+steps/roles/setup_vta/tasks/main.yml
+steps/roles/setup_ma/tasks/main.yml
+steps/roles/setup_ma/files/fusion_controller.py
+steps/sync_activetesttenant.py
+steps/sync_qt600tenant.py
+steps/sync_vpmatenant.py
+steps/sync_vtatenant.py
+steps/activetesttenant_playbook.yaml
+steps/qt600tenant_playbook.yaml
+steps/vpmatenant_playbook.yaml
+steps/vtatenant_playbook.yaml
+model-deps
+activetest_config
+activetest-synchronizer.py
+run.sh
diff --git a/xos/synchronizer/model-deps b/xos/synchronizer/model-deps
new file mode 100644
index 0000000..0967ef4
--- /dev/null
+++ b/xos/synchronizer/model-deps
@@ -0,0 +1 @@
+{}
diff --git a/xos/synchronizer/run.sh b/xos/synchronizer/run.sh
new file mode 100755
index 0000000..2ec126d
--- /dev/null
+++ b/xos/synchronizer/run.sh
@@ -0,0 +1,2 @@
+export XOS_DIR=/opt/xos
+python activetest-synchronizer.py  -C $XOS_DIR/synchronizers/activetest/activetest_config
diff --git a/xos/synchronizer/steps/activetesttenant_playbook.yaml b/xos/synchronizer/steps/activetesttenant_playbook.yaml
new file mode 100644
index 0000000..0a7eaba
--- /dev/null
+++ b/xos/synchronizer/steps/activetesttenant_playbook.yaml
@@ -0,0 +1,13 @@
+---
+# activetesttenant_playbook - sets up the controller
+
+- hosts: "{{ instance_name }}"
+  connection: ssh
+  user: root
+  sudo: no
+  gather_facts: no
+  vars:
+    - public_ip: "{{ public_ip }}"
+
+  roles:
+    - setup_controller
diff --git a/xos/synchronizer/steps/qt600tenant_playbook.yaml b/xos/synchronizer/steps/qt600tenant_playbook.yaml
new file mode 100644
index 0000000..8218a36
--- /dev/null
+++ b/xos/synchronizer/steps/qt600tenant_playbook.yaml
@@ -0,0 +1,20 @@
+---
+# activetesttenant_playbook - sets up the controller
+
+- hosts: "{{ instance_name }}"
+  connection: ssh
+  user: root
+  sudo: no
+  gather_facts: no
+  vars:
+    - private_ip: "{{ private_ip }}"
+    - public_ip: "{{ public_ip }}"
+    - controller_ip: "{{ controller_ip }}"
+    - reflector_ip: "{{ reflector_ip }}"
+    - reflector_public_ip: "{{ reflector_public_ip }}"
+    - is_initiator: {{ is_initiator }}
+    - is_reflector: {{ is_reflector }}
+
+  roles:
+    - setup_ma
+    - setup_qt600
diff --git a/xos/synchronizer/steps/roles/setup_controller/tasks/main.yml b/xos/synchronizer/steps/roles/setup_controller/tasks/main.yml
new file mode 100644
index 0000000..86d1c96
--- /dev/null
+++ b/xos/synchronizer/steps/roles/setup_controller/tasks/main.yml
@@ -0,0 +1,29 @@
+---
+
+- name: check if need to set up controller
+  command: grep "localhost.fusion-controller" /etc/hosts
+  register: result
+  ignore_errors: True
+
+- name: setup /etc/hosts - delete default entry
+  shell: sed -i "/localhost.fusion-controller/d" /etc/hosts
+  when: result.rc == 0
+
+- name: setup /etc/hostname - set hostname
+  shell: sed -i "/localhost.fusion-controller/d" /etc/hostname
+  when: result.rc == 0
+
+- name: setup /etc/hosts - delete default entry
+  shell: echo "{{ public_ip }} $(hostname)" >> /etc/hosts
+  when: result.rc == 0
+
+- name: set controller ip in ui config
+  shell: |
+    python -c "import json as j;f='/ada/NTCtestui/config.json';d=j.load(open(f));d['fusion-controller']['hostname']='{{ public_ip }}';d['fusion-collector']['hostname']='{{ public_ip }}';j.dump(d,open(f,'w'))"
+  when: result.rc == 0
+
+- name: start fusion services
+  shell: /etc/init.d/npiu_adatdce restart
+  when: result.rc == 0
+
+   
diff --git a/xos/synchronizer/steps/roles/setup_ma/files/fusion_controller.py b/xos/synchronizer/steps/roles/setup_ma/files/fusion_controller.py
new file mode 100644
index 0000000..d1a8531
--- /dev/null
+++ b/xos/synchronizer/steps/roles/setup_ma/files/fusion_controller.py
@@ -0,0 +1,103 @@
+#!/usr/bin/python
+import requests, copy, json, datetime, os
+
+REFLECTOR_ID_FILE="/root/reflector_id"
+INITIATOR_ID_FILE="/root/initiator_id"
+
+##############################################################################################################################################################3
+
+start_reflector_template={u'agent': {u'primary': {u'config': u'primaryConfig',
+                                                  u'id': u'vpma1',
+                                                  u'type': u'inventory'}},
+                          u'config': [{u'primaryConfig': {u'ietf-lmap-control:lmap': {u'schedules': {u'schedule': [{u'action': [{u'name': u'TWAMP-REFLECTOR-PM-PROBE0-action',
+                                                                                                                                 u'option': [{u'id': u'source-ip',
+                                                                                                                                              u'value': u'10.0.0.0'},
+                                                                                                                                             {u'id': u'subnet',
+                                                                                                                                              u'value': u'255.255.255.0'},
+                                                                                                                                             {u'id': u'gateway',
+                                                                                                                                              u'value': u'0.0.0.0'},
+                                                                                                                                             {u'id': u'twamp',
+                                                                                                                                              u'value': u'{"ietf-twamp:twamp":{"twamp-server":{"server-admin-state":true,"server-tcp-port":"862","dscp":0,"mode":"bits.unauthenticated"}}}'}],
+                                                                                                                                 u'task': u'twamp-reflector'}],
+                                                                                                                    u'name': u'TWAMP-REFLECTOR-PM-PROBE0',
+                                                                                                                    u'start': u'immediate'}]}}}}],
+                          u'test': {}}
+
+##############################################################################################################################################################3
+
+start_initiator_template=u'{"agent":{"primary":{"type":"inventory","id":"%(initiator_name)s","config":"primaryConfig"}},"test":{"extended-config":{"test":{"nameOnProbe":"twamp-initiator","selected":true,"testType":"twamp","testTypeLabel":"TWAMP Initiator"},"testPoints":[{"ip":"%(initiator_ip)s","model":"vPMA","name":"%(initiator_name)s","port":"80","selected":true,"tag":"Test Point A","type":"inventory","vendor":"viavi","version":"1.0"},{"model":"vPMA","name":"Test Point B","selected":false,"tag":"Test Point B","type":"inventory","vendor":"viavi","version":"1.0"}],"pluginConfig":{"setup":{"version":"2","schedMode":"immediate","periodicDuration":"00:05:00","periodicInterval":"00:15:00","pmInterval":"1","enableRandomStart":"false","randomOffset":"00:10:00","enableRt":"true","rtInterval":"%(interval)s","srcIPAddress":"%(initiator_src_ip)s","srcNetmask":"255.255.255.0","gatewayIPAddress":"192.168.2.1","srcStartingPort":"50000","configToServicesMap":{},"serviceParamToConfigMap":{}},"connections":{"version":"2","connections":[{"version":"2","name":"My Session","enabled":"true","source":null,"destination":{"version":"2","ipv4DestMgmtAddr":"%(reflector_src_ip)s","dstMgmtPort":"862"},"network":null,"numFlows":1,"flows":[{"version":"1","flowName":"Flow 1","flowInUse":"true","flowIpv4DiffServVal":"0","flowPad":"483","flowUdpPort":"50000","flowTxInterval":"10","flowReflWaitTimeout":"2"}]}]}},"testInfo":{"comments":"","name":"Lorna-%(test_name)s"}},"test-list-data":{"customer":{}}},"config":[{"primaryConfig":{"ietf-lmap-control:lmap":{"schedules":{"schedule":[{"name":"Lorna-%(test_name)s","start":"immediate","action":[{"name":"Lorna-%(test_name)s-action","task":"twamp-initiator","option":[{"id":"subnet","value":"255.255.255.0"},{"id":"gateway","value":"0.0.0.0"},{"id":"twamp","value":"{\\"ietf-twamp:twamp\\":{\\"twamp-client\\":{\\"client-admin-state\\":true,\\"mode-preference-chain\\":[{\\"priority\\":1,\\"mode\\":\\"bits.unauthenticated\\"}],\\"twamp-client-ctrl-connection\\":[{\\"ctrl-connection-name\\":\\"My Session\\",\\"client-ip\\":\\"%(initiator_src_ip)s\\",\\"server-ip\\":\\"%(reflector_src_ip)s\\",\\"server-tcp-port\\":862,\\"dscp\\":0,\\"twamp-session-request\\":[{\\"test-session-name\\":\\"Flow 1\\",\\"sender-ip\\":\\"%(initiator_src_ip)s\\",\\"sender-udp-port\\":\\"50000\\",\\"reflector-ip\\":\\"%(reflector_src_ip)s\\",\\"reflector-udp-port\\":\\"50000\\",\\"timeout\\":\\"2\\",\\"padding-length\\":\\"483\\",\\"dscp\\":\\"0\\"}]}],\\"twamp-session-sender\\":{\\"session-sender-admin-state\\":true,\\"twamp-sender-test-session\\":[{\\"test-session-name\\":\\"Flow 1\\",\\"fill-mode\\":\\"fill-mode.zero\\",\\"periodic-interval\\":\\"10\\",\\"periodic-interval-units\\":\\"milliseconds\\"}]}}}}"}],"destination":["Lorna-%(test_name)s-results-periodic-pm","Lorna-%(test_name)s-results-periodic-rt"]}]},{"name":"Lorna-%(test_name)s-results-periodic-pm","start":"Lorna-%(test_name)s-results-periodic-pm-event","action":[{"name":"Lorna-%(test_name)s-results-periodic-pm-action","task":"results","option":[{"id":"result-type","value":"pm"},{"id":"channel","value":"http://%(controller_ip)s:26088/restconf/operations/ietf-lmap-report:report"}]}]},{"name":"Lorna-%(test_name)s-results-periodic-rt","start":"Lorna-%(test_name)s-results-periodic-rt-event","action":[{"name":"Lorna-%(test_name)s-results-periodic-rt-action","task":"results","option":[{"id":"result-type","value":"rt"},{"id":"channel","value":"http://%(controller_ip)s:26088/restconf/operations/ietf-lmap-report:report"}]}]}]},"events":{"event":[{"name":"Lorna-%(test_name)s-results-periodic-pm-event","periodic":{"interval":60}},{"name":"Lorna-%(test_name)s-results-periodic-rt-event","periodic":{"interval":5}}]}}}}]}'
+
+class FusionController:
+    def __init__(self,inventory_ip):
+        self.ip = inventory_ip
+        self.i_url="http://%s:30100"%self.ip # inventory url
+        self.c_url="http://%s:8080"%self.ip  # controller url
+        self.h = {"Content-Type":"application/json"}
+    def get_ma(self,ma_ip):
+        inventory = requests.post("%s/vibe/inventory/v2/queryDevices"%self.i_url, headers=self.h).json()
+        return [ma for ma in inventory if ma_ip in ma['connections'][0]['uri']][0]
+        
+    def start_reflector(self, reflector_ip, reflector_source_ip):
+        ma = self.get_ma(reflector_ip)
+        data = copy.deepcopy(start_reflector_template)
+        data['agent']['primary']['id']=ma['name']
+        config_options=data['config'][0]['primaryConfig']['ietf-lmap-control:lmap']['schedules']['schedule'][0]['action'][0]['option']
+        config_options[0]['value']=reflector_source_ip
+        r=requests.post("%s/sbi/restconf/data/ietf-lmap-control:lmap"%self.c_url,headers=self.h,data=json.dumps(data))
+        open(REFLECTOR_ID_FILE,"w").write(r.json()["id"])
+
+    def start_initiator(self, initiator_ip, initiator_source_ip, reflector_ip, reflector_source_ip, interval="1"):
+        reflector = self.get_ma(reflector_ip)
+        initiator = self.get_ma(initiator_ip)
+        
+	now = datetime.datetime.now()
+	timestamp = '{}-{}-{}-{}:{}'.format(now.year, now.month, now.day, now.hour, now.minute)
+        config_options={"initiator_name":initiator["name"],"initiator_ip":initiator_ip,"initiator_src_ip":initiator_source_ip,
+                        "reflector_name":reflector["name"],"reflector_ip":reflector_ip,"reflector_src_ip":reflector_source_ip,
+                        "interval":interval,"test_name":timestamp,"controller_ip":self.ip}
+        r=requests.post("%s/sbi/restconf/data/ietf-lmap-control:lmap"%self.c_url,headers=self.h,data=start_initiator_template%config_options)
+        open(INITIATOR_ID_FILE,"w").write(r.json()["id"])
+
+    def stop_test(self, id):
+       print("%s/sbi/restconf/operations/action/lmap?scheduleid=%s"%(self.c_url,id))
+       requests.post("%s/sbi/restconf/operations/action/lmap?scheduleid=%s"%(self.c_url,id),headers=self.h,data=json.dumps({'action':'cancel'}))
+
+
+def start_reflector(options):
+    f = FusionController(options.controller_ip)
+    f.start_reflector(options.reflector_ip,options.reflector_src_ip)
+
+def start_initiator(options):
+    f = FusionController(options.controller_ip)
+    f.start_initiator(options.initiator_ip,options.initiator_src_ip,options.reflector_ip,options.reflector_src_ip,options.results_interval)
+
+def stop_test(options,id_file):
+    if os.path.exists(id_file):
+        f = FusionController(options.controller_ip)
+        f.stop_test(open(id_file).read())
+        os.remove(id_file)
+
+if __name__=="__main__":
+    import argparse
+    parser = argparse.ArgumentParser()
+    parser.add_argument('--controller-ip', help='IP of the Server', default='172.27.0.3')
+    parser.add_argument('--results-interval', help='Results Interval', default='5')
+    parser.add_argument('--reflector-ip', help='IP of the Agent to use as Reflector', default='10.0.6.4')
+    parser.add_argument('--reflector-src-ip', help='Source IP of the reflector', default='10.0.7.3')
+    parser.add_argument('--initiator-ip', help='IP of the Agent to use as initiator', default='10.0.6.5')
+    parser.add_argument('--initiator-src-ip', help='Source IP of the reflector', default='10.0.7.4')
+    parser.add_argument("--start-reflector", help="start reflector", action="store_true")
+    parser.add_argument("--start-initiator", help="start initiator", action="store_true")
+    parser.add_argument("--stop-reflector", help="stop reflector", action="store_true")
+    parser.add_argument("--stop-initiator", help="stop initiator", action="store_true")
+
+    options = parser.parse_args()
+    if options.start_reflector:
+        start_reflector(options)
+    if options.start_initiator:
+        start_initiator(options)
+    if options.stop_reflector:
+        stop_test(options,REFLECTOR_ID_FILE)
+    if options.stop_initiator:
+        stop_test(options,INITIATOR_ID_FILE)
+    
diff --git a/xos/synchronizer/steps/roles/setup_ma/tasks/main.yml b/xos/synchronizer/steps/roles/setup_ma/tasks/main.yml
new file mode 100644
index 0000000..abd98ee
--- /dev/null
+++ b/xos/synchronizer/steps/roles/setup_ma/tasks/main.yml
@@ -0,0 +1,4 @@
+---
+
+- name: copy test controller script
+  copy: src=fusion_controller.py dest=/root/fusion_controller.py mode=0755
diff --git a/xos/synchronizer/steps/roles/setup_qt600/tasks/main.yml b/xos/synchronizer/steps/roles/setup_qt600/tasks/main.yml
new file mode 100644
index 0000000..a8ef516
--- /dev/null
+++ b/xos/synchronizer/steps/roles/setup_qt600/tasks/main.yml
@@ -0,0 +1,59 @@
+---
+
+- name: check if work should be done
+  stat: path=/tmp/init_completed
+  register: result
+
+- name: get interface of private_ip
+  register: private_interface
+  shell: |
+    ip addr | awk '/^[0-9]+:/ {   sub(/:/,"",$2); iface=$2 } /^[[:space:]]*inet / {   split($2, a, "/");  print iface" : "a[1] }' | grep "{{ private_ip }}" | cut -d " " -f 1
+  when: result.stat.exists == False
+
+- name: run vnf-setup 
+  shell: vnf-setup --controller-address {{controller_ip}} --controller-port 30500 --test-interface {{ private_interface.stdout }} --enable-single-test-mode
+  when: result.stat.exists == False
+
+- name: rm dhcp cache
+  shell: rm /var/lib/dhcp/dhclient.leases
+  when: result.stat.exists == False
+
+- name: rm test interface from /etc/network/interfaces
+  shell: |
+    sed -i '/{{ private_interface.stdout }}/d' /etc/network/interfaces
+  when: result.stat.exists == False
+
+- name: reset test interface ip
+  shell: ifconfig {{ private_interface.stdout }} 0.0.0.0
+  when: result.stat.exists == False
+
+- name: stop qt services
+  shell: /etc/init.d/vqt_startup stop
+  when: result.stat.exists == False
+
+- name: start apache service
+  shell: /etc/init.d/apache2 start
+  when: result.stat.exists == False
+
+- name: start qt services
+  shell: /etc/init.d/vqt_startup start
+  when: result.stat.exists == False
+
+- name: record task completed
+  shell: echo "done" > /tmp/init_completed
+#
+# - name: run reflector
+#   command: python /root/fusion_controller.py --start-reflector --controller-ip "{{ controller_ip }}" --reflector-ip "{{ public_ip }}"  --reflector-src-ip "{{ private_ip }}"
+#   when: is_reflector
+# 
+# - name: run initiator
+#   command: python /root/fusion_controller.py --start-initiator  --controller-ip "{{ controller_ip }}" --initiator-ip "{{ public_ip }}"  --initiator-src-ip "{{ private_ip }}" --reflector-ip "{{ reflector_public_ip }}"  --reflector-src-ip "{{ reflector_ip }}" 
+#   when: is_initiator
+# 
+# - name: stop reflector
+#   command: python /root/fusion_controller.py --stop-reflector --controller-ip "{{ controller_ip }}"
+#   when: is_reflector == False
+# 
+# - name: stop initiator
+#   command: python /root/fusion_controller.py --stop-initiator  --controller-ip "{{ controller_ip }}"
+#   when: is_initiator == False
diff --git a/xos/synchronizer/steps/roles/setup_vpma/tasks/main.yml b/xos/synchronizer/steps/roles/setup_vpma/tasks/main.yml
new file mode 100644
index 0000000..f26f827
--- /dev/null
+++ b/xos/synchronizer/steps/roles/setup_vpma/tasks/main.yml
@@ -0,0 +1,51 @@
+---
+
+- name: check if work should be done
+  stat: path=/tmp/init_completed
+  register: result
+
+- name: get interface of private_ip
+  register: private_interface
+  shell: |
+    ip addr | awk '/^[0-9]+:/ {   sub(/:/,"",$2); iface=$2 } /^[[:space:]]*inet / {   split($2, a, "/");  print iface" : "a[1] }' | grep "{{ private_ip }}" | cut -d " " -f 1
+  when: result.stat.exists == False
+
+- name: run vnf-setup 
+  shell: vnf-setup --controller-address {{controller_ip}} --controller-port 30500 --test-interface {{ private_interface.stdout }} --enable-single-test-mode
+  when: result.stat.exists == False
+
+- name: rm dhcp cache
+  shell: rm /var/lib/dhcp/dhclient.leases
+  when: result.stat.exists == False
+
+- name: rm test interface from /etc/network/interfaces
+  shell: |
+    sed -i '/{{ private_interface.stdout }}/d' /etc/network/interfaces
+  when: result.stat.exists == False
+
+- name: reset test interface ip
+  shell: ifconfig {{ private_interface.stdout }} 0.0.0.0
+  when: result.stat.exists == False
+
+- name: restart qt services
+  shell: /etc/init.d/vqt_startup restart
+  when: result.stat.exists == False
+
+- name: record task completed
+  shell: echo "done" > /tmp/init_completed
+
+- name: run reflector
+  command: python /root/fusion_controller.py --start-reflector --controller-ip "{{ controller_ip }}" --reflector-ip "{{ public_ip }}"  --reflector-src-ip "{{ private_ip }}"
+  when: is_reflector
+
+- name: run initiator
+  command: python /root/fusion_controller.py --start-initiator  --controller-ip "{{ controller_ip }}" --initiator-ip "{{ public_ip }}"  --initiator-src-ip "{{ private_ip }}" --reflector-ip "{{ reflector_public_ip }}"  --reflector-src-ip "{{ reflector_ip }}" 
+  when: is_initiator
+
+- name: stop reflector
+  command: python /root/fusion_controller.py --stop-reflector --controller-ip "{{ controller_ip }}"
+  when: is_reflector == False
+
+- name: stop initiator
+  command: python /root/fusion_controller.py --stop-initiator  --controller-ip "{{ controller_ip }}"
+  when: is_initiator == False
\ No newline at end of file
diff --git a/xos/synchronizer/steps/roles/setup_vta/tasks/main.yml b/xos/synchronizer/steps/roles/setup_vta/tasks/main.yml
new file mode 100644
index 0000000..8a00676
--- /dev/null
+++ b/xos/synchronizer/steps/roles/setup_vta/tasks/main.yml
@@ -0,0 +1,36 @@
+---
+
+- name: check if work should be done
+  stat: path=/tmp/init_completed
+  register: result
+
+- name: get interface of private_ip
+  register: private_interface
+  shell: |
+    ip addr | awk '/^[0-9]+:/ {   sub(/:/,"",$2); iface=$2 } /^[[:space:]]*inet / {   split($2, a, "/");  print iface" : "a[1] }' | grep "{{ private_ip }}" | cut -d " " -f 1
+  when: result.stat.exists == False
+
+- name: get interface of public_ip
+  register: public_interface
+  shell: |
+    ip addr | awk '/^[0-9]+:/ {   sub(/:/,"",$2); iface=$2 } /^[[:space:]]*inet / {   split($2, a, "/");  print iface" : "a[1] }' | grep "{{ public_ip }}" | cut -d " " -f 1
+  when: result.stat.exists == False
+
+- name: get gateway of private_ip
+  register: private_gateway
+  shell: |
+    echo {{ private_ip }} | cut -d '.' -f 1,2,3 | sed '/.*/ s/$/.1/'
+  when: result.stat.exists == False
+
+- name: setup vta
+  shell: |
+    vnf-setup --test-network {{private_interface.stdout}},{{private_ip}},255.255.255.0,{{private_gateway.stdout}} --management-interface {{public_interface.stdout}} --io-virtualization VIRTIO --test-speed 1G --tagging UNTAGGED --mtu-size 1450 --controller-address {{ controller_ip }}
+  when: result.stat.exists == False
+
+- name: record task completed
+  shell: echo "done" > /tmp/init_completed
+
+- name: restart vta
+  shell: reboot
+  when: result.stat.exists == False
+
diff --git a/xos/synchronizer/steps/sync_activetesttenant.py b/xos/synchronizer/steps/sync_activetesttenant.py
new file mode 100644
index 0000000..e97fbda
--- /dev/null
+++ b/xos/synchronizer/steps/sync_activetesttenant.py
@@ -0,0 +1,52 @@
+import os
+import sys
+from django.db.models import Q, F
+from services.activetest.models import ActiveTestService, ActiveTestTenant
+from synchronizers.base.SyncInstanceUsingAnsible import SyncInstanceUsingAnsible
+
+parentdir = os.path.join(os.path.dirname(__file__), "..")
+sys.path.insert(0, parentdir)
+
+class SyncActiveTestTenant(SyncInstanceUsingAnsible):
+
+    provides = [ActiveTestTenant]
+
+    observes = ActiveTestTenant
+
+    requested_interval = 0
+
+    template_name = "activetesttenant_playbook.yaml"
+
+    service_key_name = "/opt/xos/synchronizers/activetest/activetest_private_key"
+
+    def __init__(self, *args, **kwargs):
+        super(SyncActiveTestTenant, self).__init__(*args, **kwargs)
+
+    def fetch_pending(self, deleted):
+
+        if (not deleted):
+            objs = ActiveTestTenant.get_tenant_objects().filter(
+                Q(enacted__lt=F('updated')) | Q(enacted=None), Q(lazy_blocked=False))
+        else:
+            # If this is a deletion we get all of the deleted tenants..
+            objs = ActiveTestTenant.get_deleted_tenant_objects()
+
+        return objs
+
+    def get_activetestservice(self, o):
+        if not o.provider_service:
+            return None
+
+        activetestservice = ActiveTestService.get_service_objects().filter(id=o.provider_service.id)
+
+        if not activetestservice:
+            return None
+
+        return activetestservice[0]
+
+    # Gets the attributes that are used by the Ansible template but are not
+    # part of the set of default attributes.
+    def get_extra_attributes(self, o):
+        return { "public_ip": o.public_ip }
+
+
diff --git a/xos/synchronizer/steps/sync_qt600tenant.py b/xos/synchronizer/steps/sync_qt600tenant.py
new file mode 100644
index 0000000..216cb13
--- /dev/null
+++ b/xos/synchronizer/steps/sync_qt600tenant.py
@@ -0,0 +1,48 @@
+import os
+import sys
+from django.db.models import Q, F
+from services.activetest.models import Qt600Tenant
+from synchronizers.base.SyncInstanceUsingAnsible import SyncInstanceUsingAnsible
+
+parentdir = os.path.join(os.path.dirname(__file__), "..")
+sys.path.insert(0, parentdir)
+
+class SyncQt600Tenant(SyncInstanceUsingAnsible):
+
+    provides = [Qt600Tenant]
+
+    observes = Qt600Tenant
+
+    requested_interval = 0
+
+    template_name = "qt600tenant_playbook.yaml"
+
+    service_key_name = "/opt/xos/synchronizers/activetest/activetest_private_key"
+
+    def __init__(self, *args, **kwargs):
+        super(SyncQt600Tenant, self).__init__(*args, **kwargs)
+
+    def fetch_pending(self, deleted):
+
+        if (not deleted):
+            objs = Qt600Tenant.get_tenant_objects().filter(
+                Q(enacted__lt=F('updated')) | Q(enacted=None), Q(lazy_blocked=False))
+        else:
+            # If this is a deletion we get all of the deleted tenants..
+            objs = Qt600Tenant.get_deleted_tenant_objects()
+
+        return objs
+
+    # Gets the attributes that are used by the Ansible template but are not
+    # part of the set of default attributes.
+    def get_extra_attributes(self, o):
+        return { "private_ip":o.private_ip,
+                 "public_ip":o.public_ip,
+                 "controller_ip":o.controller_ip,
+                 "reflector_ip":o.reflector_ip,
+                 "reflector_public_ip":o.reflector_public_ip,
+                 "is_reflector":o.is_reflector,
+                 "is_initiator":o.is_initiator
+             }
+
+
diff --git a/xos/synchronizer/steps/sync_vpmatenant.py b/xos/synchronizer/steps/sync_vpmatenant.py
new file mode 100644
index 0000000..52b5e32
--- /dev/null
+++ b/xos/synchronizer/steps/sync_vpmatenant.py
@@ -0,0 +1,48 @@
+import os
+import sys
+from django.db.models import Q, F
+from services.activetest.models import VpmaTenant
+from synchronizers.base.SyncInstanceUsingAnsible import SyncInstanceUsingAnsible
+
+parentdir = os.path.join(os.path.dirname(__file__), "..")
+sys.path.insert(0, parentdir)
+
+class SyncVpmaTenant(SyncInstanceUsingAnsible):
+
+    provides = [VpmaTenant]
+
+    observes = VpmaTenant
+
+    requested_interval = 0
+
+    template_name = "vpmatenant_playbook.yaml"
+
+    service_key_name = "/opt/xos/synchronizers/activetest/activetest_private_key"
+
+    def __init__(self, *args, **kwargs):
+        super(SyncVpmaTenant, self).__init__(*args, **kwargs)
+
+    def fetch_pending(self, deleted):
+
+        if (not deleted):
+            objs = VpmaTenant.get_tenant_objects().filter(
+                Q(enacted__lt=F('updated')) | Q(enacted=None), Q(lazy_blocked=False))
+        else:
+            # If this is a deletion we get all of the deleted tenants..
+            objs = VpmaTenant.get_deleted_tenant_objects()
+
+        return objs
+
+    # Gets the attributes that are used by the Ansible template but are not
+    # part of the set of default attributes.
+    def get_extra_attributes(self, o):
+        return { "private_ip":o.private_ip,
+                 "public_ip":o.public_ip,
+                 "controller_ip":o.controller_ip,
+                 "reflector_ip":o.reflector_ip,
+                 "reflector_public_ip":o.reflector_public_ip,
+                 "is_reflector":o.is_reflector,
+                 "is_initiator":o.is_initiator
+             }
+
+
diff --git a/xos/synchronizer/steps/sync_vtatenant.py b/xos/synchronizer/steps/sync_vtatenant.py
new file mode 100644
index 0000000..1406e4b
--- /dev/null
+++ b/xos/synchronizer/steps/sync_vtatenant.py
@@ -0,0 +1,44 @@
+import os
+import sys
+from django.db.models import Q, F
+from services.activetest.models import VtaTenant
+from synchronizers.base.SyncInstanceUsingAnsible import SyncInstanceUsingAnsible
+
+parentdir = os.path.join(os.path.dirname(__file__), "..")
+sys.path.insert(0, parentdir)
+
+class SyncVtaTenant(SyncInstanceUsingAnsible):
+
+    provides = [VtaTenant]
+
+    observes = VtaTenant
+
+    requested_interval = 0
+
+    template_name = "vtatenant_playbook.yaml"
+
+    service_key_name = "/opt/xos/synchronizers/activetest/activetest_private_key"
+
+    def __init__(self, *args, **kwargs):
+        super(SyncVtaTenant, self).__init__(*args, **kwargs)
+
+    def fetch_pending(self, deleted):
+
+        if (not deleted):
+            objs = VtaTenant.get_tenant_objects().filter(
+                Q(enacted__lt=F('updated')) | Q(enacted=None), Q(lazy_blocked=False))
+        else:
+            # If this is a deletion we get all of the deleted tenants..
+            objs = VtaTenant.get_deleted_tenant_objects()
+
+        return objs
+
+    # Gets the attributes that are used by the Ansible template but are not
+    # part of the set of default attributes.
+    def get_extra_attributes(self, o):
+        return { "private_ip":o.private_ip,
+                 "public_ip":o.public_ip,
+                 "controller_ip":o.controller_ip
+             }
+
+
diff --git a/xos/synchronizer/steps/vpmatenant_playbook.yaml b/xos/synchronizer/steps/vpmatenant_playbook.yaml
new file mode 100644
index 0000000..26a12a1
--- /dev/null
+++ b/xos/synchronizer/steps/vpmatenant_playbook.yaml
@@ -0,0 +1,20 @@
+---
+# activetesttenant_playbook - sets up the controller
+
+- hosts: "{{ instance_name }}"
+  connection: ssh
+  user: root
+  sudo: no
+  gather_facts: no
+  vars:
+    - private_ip: "{{ private_ip }}"
+    - public_ip: "{{ public_ip }}"
+    - controller_ip: "{{ controller_ip }}"
+    - reflector_ip: "{{ reflector_ip }}"
+    - reflector_public_ip: "{{ reflector_public_ip }}"
+    - is_initiator: {{ is_initiator }}
+    - is_reflector: {{ is_reflector }}
+
+  roles:
+    - setup_ma
+    - setup_vpma
diff --git a/xos/synchronizer/steps/vtatenant_playbook.yaml b/xos/synchronizer/steps/vtatenant_playbook.yaml
new file mode 100644
index 0000000..fa036fb
--- /dev/null
+++ b/xos/synchronizer/steps/vtatenant_playbook.yaml
@@ -0,0 +1,16 @@
+---
+# activetesttenant_playbook - sets up the controller
+
+- hosts: "{{ instance_name }}"
+  connection: ssh
+  user: root
+  sudo: no
+  gather_facts: no
+  vars:
+    - private_ip: "{{ private_ip }}"
+    - public_ip: "{{ public_ip }}"
+    - controller_ip: "{{ controller_ip }}"
+
+  roles:
+    - setup_ma
+    - setup_vta
diff --git a/xos/tosca/resources/activetest.py b/xos/tosca/resources/activetest.py
new file mode 100644
index 0000000..9b734b5
--- /dev/null
+++ b/xos/tosca/resources/activetest.py
@@ -0,0 +1,105 @@
+from core.models import Service,User,CoarseTenant
+from services.activetest.models import ActiveTestService, Qt600Service, VpmaService, VtaService
+
+from xosresource import XOSResource
+
+class XOSActiveTestService(XOSResource):
+    provides = "tosca.nodes.ActiveTest"
+    xos_model = ActiveTestService
+    copyin_props = ["view_url", "icon_url", "enabled", "published", "public_key", "private_key_fn", "versionNumber"]
+
+    def postprocess(self, obj):
+        for provider_service_name in self.get_requirements("tosca.relationships.TenantOfService"):
+            provider_service = self.get_xos_object(ActiveTestService, name=provider_service_name)
+
+            existing_tenancy = CoarseTenant.get_tenant_objects().filter(provider_service = provider_service, subscriber_service = obj)
+            if existing_tenancy:
+                self.info("Tenancy relationship from %s to %s already exists" % (str(obj), str(provider_service)))
+            else:
+                tenancy = CoarseTenant(provider_service = provider_service,
+                                       subscriber_service = obj)
+                tenancy.save()
+
+                self.info("Created Tenancy relationship  from %s to %s" % (str(obj), str(provider_service)))
+
+    def can_delete(self, obj):
+        if obj.slices.exists():
+            self.info("Service %s has active slices; skipping delete" % obj.name)
+            return False
+        return super(XOSActiveTestService, self).can_delete(obj)
+
+class XOSQt600Service(XOSResource):
+    provides = "tosca.nodes.Qt600Service"
+    xos_model = Qt600Service
+    copyin_props = ["view_url", "icon_url", "enabled", "published", "public_key", "private_key_fn", "versionNumber"]
+
+    def postprocess(self, obj):
+        for provider_service_name in self.get_requirements("tosca.relationships.TenantOfService"):
+            provider_service = self.get_xos_object(Qt600Service, name=provider_service_name)
+
+            existing_tenancy = CoarseTenant.get_tenant_objects().filter(provider_service = provider_service, subscriber_service = obj)
+            if existing_tenancy:
+                self.info("Tenancy relationship from %s to %s already exists" % (str(obj), str(provider_service)))
+            else:
+                tenancy = CoarseTenant(provider_service = provider_service,
+                                       subscriber_service = obj)
+                tenancy.save()
+
+                self.info("Created Tenancy relationship  from %s to %s" % (str(obj), str(provider_service)))
+
+    def can_delete(self, obj):
+        if obj.slices.exists():
+            self.info("Service %s has active slices; skipping delete" % obj.name)
+            return False
+        return super(XOSQt600Service, self).can_delete(obj)
+
+class XOSVpmaService(XOSResource):
+    provides = "tosca.nodes.VpmaService"
+    xos_model = VpmaService
+    copyin_props = ["view_url", "icon_url", "enabled", "published", "public_key", "private_key_fn", "versionNumber"]
+
+    def postprocess(self, obj):
+        for provider_service_name in self.get_requirements("tosca.relationships.TenantOfService"):
+            provider_service = self.get_xos_object(VpmaService, name=provider_service_name)
+
+            existing_tenancy = CoarseTenant.get_tenant_objects().filter(provider_service = provider_service, subscriber_service = obj)
+            if existing_tenancy:
+                self.info("Tenancy relationship from %s to %s already exists" % (str(obj), str(provider_service)))
+            else:
+                tenancy = CoarseTenant(provider_service = provider_service,
+                                       subscriber_service = obj)
+                tenancy.save()
+
+                self.info("Created Tenancy relationship  from %s to %s" % (str(obj), str(provider_service)))
+
+    def can_delete(self, obj):
+        if obj.slices.exists():
+            self.info("Service %s has active slices; skipping delete" % obj.name)
+            return False
+        return super(XOSVpmaService, self).can_delete(obj)
+
+class XOSVtaService(XOSResource):
+    provides = "tosca.nodes.VtaService"
+    xos_model = VtaService
+    copyin_props = ["view_url", "icon_url", "enabled", "published", "public_key", "private_key_fn", "versionNumber"]
+
+    def postprocess(self, obj):
+        for provider_service_name in self.get_requirements("tosca.relationships.TenantOfService"):
+            provider_service = self.get_xos_object(VtaService, name=provider_service_name)
+
+            existing_tenancy = CoarseTenant.get_tenant_objects().filter(provider_service = provider_service, subscriber_service = obj)
+            if existing_tenancy:
+                self.info("Tenancy relationship from %s to %s already exists" % (str(obj), str(provider_service)))
+            else:
+                tenancy = CoarseTenant(provider_service = provider_service,
+                                       subscriber_service = obj)
+                tenancy.save()
+
+                self.info("Created Tenancy relationship  from %s to %s" % (str(obj), str(provider_service)))
+
+    def can_delete(self, obj):
+        if obj.slices.exists():
+            self.info("Service %s has active slices; skipping delete" % obj.name)
+            return False
+        return super(XOSVtaService, self).can_delete(obj)
+
diff --git a/xos/tosca/resources/activetesttenant.py b/xos/tosca/resources/activetesttenant.py
new file mode 100644
index 0000000..7b1a09d
--- /dev/null
+++ b/xos/tosca/resources/activetesttenant.py
@@ -0,0 +1,29 @@
+from core.models import Tenant, Service
+from services.activetest.models import ActiveTestTenant, ACTIVETEST_KIND as ACTIVETESTTENANT_KIND
+
+from xosresource import XOSResource
+
+class XOSActiveTestTenant(XOSResource):
+    provides = "tosca.nodes.ActiveTestTenant"
+    xos_model = ActiveTestTenant
+    name_field = "service_specific_id"
+    copyin_props = ("tenant_message",)
+
+    def get_xos_args(self, throw_exception=True):
+        args = super(XOSActiveTestTenant, self).get_xos_args()
+
+        # ActiveTestTenant must always have a provider_service
+        provider_name = self.get_requirement("tosca.relationships.TenantOfService", throw_exception=True)
+        if provider_name:
+            args["provider_service"] = self.get_xos_object(Service, throw_exception=True, name=provider_name)
+
+        return args
+
+    def get_existing_objs(self):
+        args = self.get_xos_args(throw_exception=False)
+        return ActiveTestTenant.get_tenant_objects().filter(provider_service=args["provider_service"], service_specific_id=args["service_specific_id"])
+        return []
+
+    def can_delete(self, obj):
+        return super(XOSActiveTestTenant, self).can_delete(obj)
+
diff --git a/xos/tosca/resources/qt600tenant.py b/xos/tosca/resources/qt600tenant.py
new file mode 100644
index 0000000..e223428
--- /dev/null
+++ b/xos/tosca/resources/qt600tenant.py
@@ -0,0 +1,28 @@
+from core.models import Tenant, Service
+from services.activetest.models import Qt600Tenant
+
+from xosresource import XOSResource
+
+class XOSQt600Tenant(XOSResource):
+    name_field = "service_specific_id"
+    provides = "tosca.nodes.Qt600Tenant"
+    copyin_props = ("is_reflector","is_initiator","reflector",)
+    xos_model = Qt600Tenant
+
+    def get_xos_args(self, throw_exception=True):
+        args = super(XOSQt600Tenant, self).get_xos_args()
+
+        # Qt600Tenant must always have a provider_service
+        provider_name = self.get_requirement("tosca.relationships.TenantOfService", throw_exception=True)
+        if provider_name:
+            args["provider_service"] = self.get_xos_object(Service, throw_exception=True, name=provider_name)
+
+        return args
+
+    def can_delete(self, obj):
+        return super(XOSQt600Tenant, self).can_delete(obj)
+
+    def get_existing_objs(self):
+        args = self.get_xos_args(throw_exception=False)
+        return Qt600Tenant.get_tenant_objects().filter(provider_service=args["provider_service"], service_specific_id=args["service_specific_id"])
+        return []
diff --git a/xos/tosca/resources/vpmatenant.py b/xos/tosca/resources/vpmatenant.py
new file mode 100644
index 0000000..3e45e26
--- /dev/null
+++ b/xos/tosca/resources/vpmatenant.py
@@ -0,0 +1,28 @@
+from core.models import Tenant, Service
+from services.activetest.models import VpmaTenant
+
+from xosresource import XOSResource
+
+class XOSVpmaTenant(XOSResource):
+    name_field = "service_specific_id"
+    provides = "tosca.nodes.VpmaTenant"
+    copyin_props = ("is_reflector","is_initiator","reflector",)
+    xos_model = VpmaTenant
+
+    def get_xos_args(self, throw_exception=True):
+        args = super(XOSVpmaTenant, self).get_xos_args()
+
+        # VpmaTenant must always have a provider_service
+        provider_name = self.get_requirement("tosca.relationships.TenantOfService", throw_exception=True)
+        if provider_name:
+            args["provider_service"] = self.get_xos_object(Service, throw_exception=True, name=provider_name)
+
+        return args
+
+    def can_delete(self, obj):
+        return super(XOSVpmaTenant, self).can_delete(obj)
+
+    def get_existing_objs(self):
+        args = self.get_xos_args(throw_exception=False)
+        return VpmaTenant.get_tenant_objects().filter(provider_service=args["provider_service"], service_specific_id=args["service_specific_id"])
+        return []
diff --git a/xos/tosca/resources/vtatenant.py b/xos/tosca/resources/vtatenant.py
new file mode 100644
index 0000000..e2ecf25
--- /dev/null
+++ b/xos/tosca/resources/vtatenant.py
@@ -0,0 +1,27 @@
+from core.models import Tenant, Service
+from services.activetest.models import VtaTenant
+
+from xosresource import XOSResource
+
+class XOSVtaTenant(XOSResource):
+    name_field = "service_specific_id"
+    provides = "tosca.nodes.VtaTenant"
+    xos_model = VtaTenant
+
+    def get_xos_args(self, throw_exception=True):
+        args = super(XOSVtaTenant, self).get_xos_args()
+
+        # VtaTenant must always have a provider_service
+        provider_name = self.get_requirement("tosca.relationships.TenantOfService", throw_exception=True)
+        if provider_name:
+            args["provider_service"] = self.get_xos_object(Service, throw_exception=True, name=provider_name)
+
+        return args
+
+    def can_delete(self, obj):
+        return super(XOSVtaTenant, self).can_delete(obj)
+
+    def get_existing_objs(self):
+        args = self.get_xos_args(throw_exception=False)
+        return VtaTenant.get_tenant_objects().filter(provider_service=args["provider_service"], service_specific_id=args["service_specific_id"])
+        return []