diff --git a/xos/attic/header.py b/xos/attic/header.py
index d3d30ed..7883c2d 100644
--- a/xos/attic/header.py
+++ b/xos/attic/header.py
@@ -24,7 +24,7 @@
 from operator import itemgetter, attrgetter, methodcaller
 from core.models import Tag
 from core.models.service import LeastLoadedNodeScheduler
-from services.vrouter.models import VRouterService, VRouterTenant
+from services.addressmanager.models import AddressManagerService, AddressManagerServiceInstance
 import traceback
 from xos.exceptions import *
 from django.contrib.contenttypes.models import ContentType
diff --git a/xos/attic/vsgtenant_model.py b/xos/attic/vsgtenant_model.py
index f343cc3..22a1a9a 100644
--- a/xos/attic/vsgtenant_model.py
+++ b/xos/attic/vsgtenant_model.py
@@ -20,25 +20,25 @@
 
 def __init__(self, *args, **kwargs):
     super(VSGTenant, self).__init__(*args, **kwargs)
-    self.cached_vrouter=None
+    self.cached_address_service_instance=None
 
 @property
-def vrouter(self):
-    vrouter = self.get_newest_subscribed_tenant(VRouterTenant)
-    if not vrouter:
+def address_service_instance(self):
+    address_service_instance = self.get_newest_subscribed_tenant(AddressManagerServiceInstance)
+    if not address_service_instance:
         return None
 
     # always return the same object when possible
-    if (self.cached_vrouter) and (self.cached_vrouter.id == vrouter.id):
-        return self.cached_vrouter
+    if (self.cached_address_service_instance) and (self.cached_address_service_instance.id == address_service_instance.id):
+        return self.cached_address_service_instance
 
-    vrouter.caller = self.creator
-    self.cached_vrouter = vrouter
-    return vrouter
+    address_service_instance.caller = self.creator
+    self.cached_address_service_instance = address_service_instance
+    return address_service_instance
 
-@vrouter.setter
-def vrouter(self, value):
-    raise XOSConfigurationError("VSGTenant.vrouter setter is not implemented")
+@address_service_instance.setter
+def address_service_instance(self, value):
+    raise XOSConfigurationError("VSGTenant.address_service_instance setter is not implemented")
 
 @property
 def volt(self):
@@ -61,37 +61,37 @@
     else:
         return "no-instance"
 
-def get_vrouter_field(self, name, default=None):
-    if self.vrouter:
-        return getattr(self.vrouter, name, default)
+def get_address_service_instance_field(self, name, default=None):
+    if self.address_service_instance:
+        return getattr(self.address_service_instance, name, default)
     else:
         return default
 
 @property
 def wan_container_ip(self):
-    return self.get_vrouter_field("public_ip", None)
+    return self.get_address_service_instance_field("public_ip", None)
 
 @property
 def wan_container_mac(self):
-    return self.get_vrouter_field("public_mac", None)
+    return self.get_address_service_instance_field("public_mac", None)
 
 @property
 def wan_container_netbits(self):
-    return self.get_vrouter_field("netbits", None)
+    return self.get_address_service_instance_field("netbits", None)
 
 @property
 def wan_container_gateway_ip(self):
-    return self.get_vrouter_field("gateway_ip", None)
+    return self.get_address_service_instance_field("gateway_ip", None)
 
 @property
 def wan_container_gateway_mac(self):
-    return self.get_vrouter_field("gateway_mac", None)
+    return self.get_address_service_instance_field("gateway_mac", None)
 
 @property
 def wan_vm_ip(self):
     tags = Tag.objects.filter(content_type=self.instance.get_content_type_key(), object_id=self.instance.id, name="vm_vrouter_tenant")
     if tags:
-        tenant = VRouterTenant.objects.get(id=tags[0].value)
+        tenant = AddressManagerServiceInstance.objects.get(id=tags[0].value)
         return tenant.public_ip
     else:
         raise Exception("no vm_vrouter_tenant tag for instance %s" % o.instance)
@@ -100,7 +100,7 @@
 def wan_vm_mac(self):
     tags = Tag.objects.filter(content_type=self.instance.get_content_type_key(), object_id=self.instance.id, name="vm_vrouter_tenant")
     if tags:
-        tenant = VRouterTenant.objects.get(id=tags[0].value)
+        tenant = AddressManagerServiceInstance.objects.get(id=tags[0].value)
         return tenant.public_mac
     else:
         raise Exception("no vm_vrouter_tenant tag for instance %s" % o.instance)
diff --git a/xos/synchronizer/model_policies/model_policy_vsgtenant.py b/xos/synchronizer/model_policies/model_policy_vsgtenant.py
index f8600ce..86f6257 100644
--- a/xos/synchronizer/model_policies/model_policy_vsgtenant.py
+++ b/xos/synchronizer/model_policies/model_policy_vsgtenant.py
@@ -26,32 +26,31 @@
 
     def handle_update(self, tenant):
         self.manage_container(tenant)
-        self.manage_vrouter(tenant)
+        self.manage_address_service_instance(tenant)
         self.cleanup_orphans(tenant)
 
     def handle_delete(self, tenant):
-        if tenant.vrouter:
-            tenant.vrouter.delete()
+        if tenant.address_service_instance:
+            tenant.address_service_instance.delete()
 
-    def manage_vrouter(self, tenant):
+    def manage_address_service_instance(self, tenant):
         if tenant.deleted:
             return
 
-        if tenant.vrouter is None:
-            vrouter = self.allocate_public_service_instance(address_pool_name="addresses_vsg", subscriber_tenant=tenant)
-            vrouter.save()
+        if tenant.address_service_instance is None:
+            address_service_instance = self.allocate_public_service_instance(address_pool_name="addresses_vsg", subscriber_tenant=tenant)
+            address_service_instance.save()
 
     def cleanup_orphans(self, tenant):
-        # ensure vSG only has one vRouter
-        cur_vrouter = tenant.vrouter
+        # ensure vSG only has one AddressManagerServiceInstance
+        cur_asi = tenant.address_service_instance
         for link in tenant.subscribed_links.all():
             # TODO: hardcoded dependency
-            # cast from ServiceInstance to VRouterTenant
-            vrouters = VRouterTenant.objects.filter(id = link.provider_service_instance.id)
-            for vrouter in vrouters:
-                if (not cur_vrouter) or (vrouter.id != cur_vrouter.id):
-                    # print "XXX clean up orphaned vrouter", vrouter
-                    vrouter.delete()
+            # cast from ServiceInstance to AddressManagerServiceInstance
+            asis = AddressManagerServiceInstance.objects.filter(id = link.provider_service_instance.id)
+            for asi in asis:
+                if (not cur_asi) or (asi.id != cur_asi.id):
+                    asi.delete()
 
     def get_vsg_service(self, tenant):
         return VSGService.objects.get(id=tenant.owner.id)
@@ -177,12 +176,12 @@
             # be configured.
             tags = Tag.objects.filter(content_type=instance.self_content_type_id, object_id=instance.id, name="vm_vrouter_tenant")
             if not tags:
-                vrouter = self.allocate_public_service_instance(address_pool_name="addresses_vsg",
-                                                                subscriber_service=tenant.owner)
-                vrouter.set_attribute("tenant_for_instance_id", instance.id)
-                vrouter.save()
+                address_service_instance = self.allocate_public_service_instance(address_pool_name="addresses_vsg",
+                                                                                 subscriber_service=tenant.owner)
+                address_service_instance.set_attribute("tenant_for_instance_id", instance.id)
+                address_service_instance.save()
                 # TODO: potential partial failure
-                tag = Tag(service=tenant.owner, content_type=instance.self_content_type_id, object_id=instance.id, name="vm_vrouter_tenant", value="%d" % vrouter.id)
+                tag = Tag(service=tenant.owner, content_type=instance.self_content_type_id, object_id=instance.id, name="vm_vrouter_tenant", value="%d" % address_service_instance.id)
                 tag.save()
 
             instance.no_sync = False   # allow the synchronizer to run now
diff --git a/xos/synchronizer/model_policies/test_model_policy_vsgtenant.py b/xos/synchronizer/model_policies/test_model_policy_vsgtenant.py
index f647bc9..4951ee8 100644
--- a/xos/synchronizer/model_policies/test_model_policy_vsgtenant.py
+++ b/xos/synchronizer/model_policies/test_model_policy_vsgtenant.py
@@ -176,9 +176,9 @@
     def set_parameter(self, name, value):
         pass
 
-class MockVRouterTenantObjects(MockObjectStore): pass
-class MockVRouterTenant(MockObject):
-    objects = get_MockObjectStore("VRouterTenant")
+class MockAddressManagerServiceInstanceObjects(MockObjectStore): pass
+class MockAddressManagerServiceInstance(MockObject):
+    objects = get_MockObjectStore("AddressManagerServiceInstance")
     public_ip = None
     public_mac = None
     address_pool_id = None
@@ -243,45 +243,45 @@
         model_policy_vsgtenant.NetworkParameter = MockNetworkParameter
 
     @patch.object(VSGTenantPolicy, "manage_container")
-    @patch.object(VSGTenantPolicy, "manage_vrouter")
+    @patch.object(VSGTenantPolicy, "manage_address_service_instance")
     @patch.object(VSGTenantPolicy, "cleanup_orphans")
-    def test_handle_create(self, cleanup_orphans, manage_vrouter, manage_container):
+    def test_handle_create(self, cleanup_orphans, manage_address_service_instance, manage_container):
         self.policy.handle_create(self.tenant)
         manage_container.assert_called_with(self.tenant)
-        manage_vrouter.assert_called_with(self.tenant)
+        manage_address_service_instance.assert_called_with(self.tenant)
         cleanup_orphans.assert_called_with(self.tenant)
 
     @patch.object(VSGTenantPolicy, "manage_container")
-    @patch.object(VSGTenantPolicy, "manage_vrouter")
+    @patch.object(VSGTenantPolicy, "manage_address_service_instance")
     @patch.object(VSGTenantPolicy, "cleanup_orphans")
-    def test_handle_update(self, cleanup_orphans, manage_vrouter, manage_container):
+    def test_handle_update(self, cleanup_orphans, manage_address_service_instance, manage_container):
         self.policy.handle_create(self.tenant)
         manage_container.assert_called_with(self.tenant)
-        manage_vrouter.assert_called_with(self.tenant)
+        manage_address_service_instance.assert_called_with(self.tenant)
         cleanup_orphans.assert_called_with(self.tenant)
 
-    @patch.object(MockVRouterTenant, "delete")
-    def test_handle_delete_vrouter_exist(self, vroutertenant_delete):
-        vrtenant = MockVRouterTenant()
-        self.tenant.vrouter = vrtenant
+    @patch.object(MockAddressManagerServiceInstance, "delete")
+    def test_handle_delete_asi_exist(self, amsi_delete):
+        vrtenant = MockAddressManagerServiceInstance()
+        self.tenant.address_service_instance = vrtenant
         self.policy.handle_delete(self.tenant)
-        vroutertenant_delete.assert_called()
+        amsi_delete.assert_called()
 
-    @patch.object(MockVRouterTenant, "delete")
-    def test_handle_delete_vrouter_noexist(self, vroutertenant_delete):
-        self.tenant.vrouter = None
+    @patch.object(MockAddressManagerServiceInstance, "delete")
+    def test_handle_delete_asi_noexist(self, amsi_delete):
+        self.tenant.address_service_instance = None
         self.policy.handle_delete(self.tenant)
-        vroutertenant_delete.assert_not_called()
+        amsi_delete.assert_not_called()
 
-    @patch.object(MockVRouterTenantObjects, "get_items")
-    @patch.object(MockVRouterTenant, "delete")
-    def test_cleanup_orphans(self, vroutertenant_delete, vroutertenant_objects):
-        vrtenant = MockVRouterTenant(id=1)
-        self.tenant.vrouter = vrtenant
-        some_other_vrtenant = MockVRouterTenant(id=2, subscriber_tenant_id = self.tenant.id)
-        vroutertenant_objects.get_items = [some_other_vrtenant]
+    @patch.object(MockAddressManagerServiceInstanceObjects, "get_items")
+    @patch.object(MockAddressManagerServiceInstance, "delete")
+    def test_cleanup_orphans(self, amsi_delete, amsi_objects):
+        vrtenant = MockAddressManagerServiceInstance(id=1)
+        self.tenant.address_service_instance = vrtenant
+        some_other_vrtenant = MockAddressManagerServiceInstance(id=2, subscriber_tenant_id = self.tenant.id)
+        amsi_objects.get_items = [some_other_vrtenant]
         self.policy.handle_delete(self.tenant)
-        vroutertenant_delete.assert_called()
+        amsi_delete.assert_called()
 
     @patch.object(MockTag, "objects")
     def test_find_instance_for_s_tag_noexist(self, tag_objects):
@@ -430,7 +430,7 @@
                               pick, get_psi, get_image, tenant_save, volt,
                               vsgservice_objects, flavor_objects, node_objects, npt_objects):
         # setup mocks
-        vrtenant = MockVRouterTenant(public_ip="1.2.3.4", public_mac="01:02:03:04:05:06")
+        vrtenant = MockAddressManagerServiceInstance(public_ip="1.2.3.4", public_mac="01:02:03:04:05:06")
         vsgservice=MockVSGService(name="myvsgservice", id=1, slices=MockObjectList(initial=[self.slice]))
         vsgservice_objects.return_value = [vsgservice]
         self.tenant.owner = vsgservice
@@ -474,7 +474,7 @@
         self.assertEqual(tag.value, "222")
         self.assertEqual(tag.object_id, instance.id)
 
-        # The instance should have a tag pointing to its vrouter
+        # The instance should have a tag pointing to its address_service_instance
         tag = MockTag.objects.get(name="vm_vrouter_tenant")
         self.assertNotEqual(tag.value, vrtenant.id)
         self.assertEqual(tag.object_id, instance.id)
@@ -483,13 +483,13 @@
         get_psi.assert_called()
 
     @patch.object(VSGTenantPolicy, "allocate_public_service_instance")
-    def test_manage_vrouter(self, get_psi):
-        vrtenant = MockVRouterTenant(public_ip="1.2.3.4", public_mac="01:02:03:04:05:06")
+    def test_manage_address_service_instance(self, get_psi):
+        vrtenant = MockAddressManagerServiceInstance(public_ip="1.2.3.4", public_mac="01:02:03:04:05:06")
         get_psi.return_value = vrtenant
 
-        self.tenant.vrouter = None
+        self.tenant.address_service_instance = None
 
-        self.policy.manage_vrouter(self.tenant)
+        self.policy.manage_address_service_instance(self.tenant)
 
         get_psi.assert_called_with(address_pool_name="addresses_vsg", subscriber_tenant=self.tenant)
 
