[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 4fb3b8f..72c6b9b 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
@@ -131,3 +129,7 @@
 # Need to track each application's version separately
 cord_config_app_version: "1.3.0"
 cord_vtn_app_version: "1.3.0"
+
+# 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 bb268bf..d7fce70 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,6 +52,6 @@
           component_config: >
               {
                   "org.opencord.ce.local.bigswitch.BigSwitchManager": {
-                      "domainId": "{{ ansible_default_ipv4.address }}-fabric-onos"
+                      "domainId": "{{ carrierethernet_domainid_prefix }}-fabric-onos"
                   }
               }
\ No newline at end of file