CORD-1253 onboard the AddressManager service

Change-Id: I56aa0befc38de0a43f53b886a348cf61bc25e0aa
diff --git a/profile_manifests/mock-rcord.yml b/profile_manifests/mock-rcord.yml
index 861d16c..898cfee 100644
--- a/profile_manifests/mock-rcord.yml
+++ b/profile_manifests/mock-rcord.yml
@@ -82,6 +82,9 @@
     keypair: onos_rsa
   - name: vrouter
     path: orchestration/xos_services/vrouter
+  - name: addressmanager
+    path: orchestration/xos_services/addressmanager
+    synchronizer: false
   - name: vsg
     path: orchestration/xos_services/vsg
     keypair: vsg_rsa
diff --git a/profile_manifests/rcord.yml b/profile_manifests/rcord.yml
index 88e2845..b37dc8f 100644
--- a/profile_manifests/rcord.yml
+++ b/profile_manifests/rcord.yml
@@ -70,6 +70,9 @@
     keypair: onos_rsa
   - name: vrouter
     path: orchestration/xos_services/vrouter
+  - name: addressmanager
+    path: orchestration/xos_services/addressmanager
+    synchronizer: false
   - name: vsg
     path: orchestration/xos_services/vsg
     keypair: vsg_rsa
diff --git a/roles/cord-profile/templates/cord-services.yaml.j2 b/roles/cord-profile/templates/cord-services.yaml.j2
index 2662f00..ce8311f 100644
--- a/roles/cord-profile/templates/cord-services.yaml.j2
+++ b/roles/cord-profile/templates/cord-services.yaml.j2
@@ -23,6 +23,7 @@
 imports:
    - custom_types/xos.yaml
    - custom_types/vtr.yaml
+   - custom_types/addressmanager.yaml
 
 topology_template:
   node_templates:
@@ -113,6 +114,9 @@
     service#vsg:
       type: tosca.nodes.VSGService
       requirements:
+        - addressing_tenant:
+            node: service#addressmanager
+            relationship: tosca.relationships.TenantOfService
         - vrouter_tenant:
             node: service#vrouter
             relationship: tosca.relationships.TenantOfService
@@ -126,11 +130,8 @@
       artifacts:
         pubkey: /opt/cord_profile/key_import/vsg_rsa.pub
 
-    service#vrouter:
-      type: tosca.nodes.VRouterService
-      properties:
-        view_url: /admin/vrouter/vrouterservice/$id$/
-        replaces: service_vrouter
+    service#addressmanager:
+      type: tosca.nodes.AddressManagerService
       requirements:
         - addresses_vsg:
             node: addresses_vsg
@@ -139,6 +140,12 @@
             node: addresses_public
             relationship: tosca.relationships.ProvidesAddresses
 
+    service#vrouter:
+      type: tosca.nodes.VRouterService
+      properties:
+        view_url: /admin/vrouter/vrouterservice/$id$/
+        replaces: service_vrouter
+
     vRouter_ONOS_app:
       type: tosca.nodes.ONOSvRouterApp
       requirements:
@@ -250,11 +257,11 @@
             node: out#wanside
             relationship: tosca.relationships.IsType
 
-    vrouter_wanside:
+    addressmanager_wanside:
       type: tosca.nodes.ServiceInterface
       requirements:
         - service:
-            node: service#vrouter
+            node: service#addressmanager
             relationship: tosca.relationships.MemberOfService
         - interface:
             node: in#wanside
diff --git a/roles/cord-profile/templates/public-net.yaml.j2 b/roles/cord-profile/templates/public-net.yaml.j2
index d7ddd25..7e43e11 100644
--- a/roles/cord-profile/templates/public-net.yaml.j2
+++ b/roles/cord-profile/templates/public-net.yaml.j2
@@ -20,6 +20,7 @@
 
 imports:
    - custom_types/xos.yaml
+   - custom_types/addressmanager.yaml
 
 description: public network config, generated by platform-install
 
@@ -31,9 +32,9 @@
       type: tosca.nodes.Site
 
 
-# vrouter service, fully created in cord-service.yaml
-    service#vrouter:
-      type: tosca.nodes.VRouterService
+# Address Manager service, fully created in cord-service.yaml
+    service#addressmanager:
+      type: tosca.nodes.AddressManagerService
 
 # public network
 
@@ -55,8 +56,8 @@
           - owner:
               node: {{ site_name }}_public
               relationship: tosca.relationships.MemberOfSlice
-          - vrouter_tenant:
-              node: service#vrouter
+          - addressmanager_service_instance:
+              node: service#addressmanager
               relationship: tosca.relationships.TenantOfService
 
 
diff --git a/roles/cord-profile/templates/services.yaml.j2 b/roles/cord-profile/templates/services.yaml.j2
index 256f5d9..faaa936 100644
--- a/roles/cord-profile/templates/services.yaml.j2
+++ b/roles/cord-profile/templates/services.yaml.j2
@@ -23,6 +23,7 @@
 imports:
    - custom_types/xos.yaml
    - custom_types/vtr.yaml
+   - custom_types/addressmanager.yaml
 
 topology_template:
   node_templates:
@@ -76,6 +77,9 @@
       properties:
           view_url: /admin/vrouter/vrouterservice/$id$/
           replaces: service_vrouter
+
+    service#addressmanager:
+      type: tosca.nodes.AddressManagerService
       requirements:
           - addresses_vsg:
               node: addresses_vsg
@@ -83,4 +87,3 @@
           - addresses_service1:
               node: addresses_exampleservice-public
               relationship: tosca.relationships.ProvidesAddresses
-