[CORD-2301]
Add config option for setting domainId for CarrierEthernet local app

Change-Id: I7ee0ea0f4191e1846b6ff917b187a4adddfa9854
diff --git a/roles/cord-profile/defaults/main.yml b/roles/cord-profile/defaults/main.yml
index a61b3fd..dff1840 100644
--- a/roles/cord-profile/defaults/main.yml
+++ b/roles/cord-profile/defaults/main.yml
@@ -1,4 +1,4 @@
-
+---
 # Copyright 2017-present Open Networking Foundation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,8 +13,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-
----
 # cord-profile/defaults/main.yml
 
 # where the cord_profile directory is on the config node
@@ -132,3 +130,7 @@
 # Need to track each application's version separately
 cord_config_app_version: "1.4.0-SNAPSHOT"
 cord_vtn_app_version: "1.4.0-SNAPSHOT"
+
+# used in carrierethernet-*.yaml.j2
+carrierethernet_domainid_prefix: "{{ site_name }}"
+
diff --git a/roles/cord-profile/templates/carrierethernet-local-app.yaml.j2 b/roles/cord-profile/templates/carrierethernet-local-app.yaml.j2
index 811a6a8..224a997 100644
--- a/roles/cord-profile/templates/carrierethernet-local-app.yaml.j2
+++ b/roles/cord-profile/templates/carrierethernet-local-app.yaml.j2
@@ -37,7 +37,7 @@
                       "netconfReplyTimeout": "120"
                   },
                   "org.opencord.ce.local.bigswitch.BigSwitchManager": {
-                      "domainId": "{{ ansible_default_ipv4.address }}-cord-onos"
+                      "domainId": "{{ carrierethernet_domainid_prefix }}-cord-onos"
                   }
               }
 
@@ -52,7 +52,7 @@
           component_config: >
               {
                   "org.opencord.ce.local.bigswitch.BigSwitchManager": {
-                      "domainId": "{{ ansible_default_ipv4.address }}-fabric-onos"
+                      "domainId": "{{ carrierethernet_domainid_prefix }}-fabric-onos"
                   }
               }