[CORD-1673]
Fixes to E-CORD pod deploy
includes #5016/1 and #4402/5
fix pubkey paths
Includes 5038/2
Fix high Logtash CPU usage (backport of part of CORD-1588)
post-China Mobile fixes

Change-Id: I07bf9a54afd803082491e37b3bcfd6557ec32cb7
diff --git a/roles/cord-profile/templates/carrierethernet-global-app.yaml.j2 b/roles/cord-profile/templates/carrierethernet-global-app.yaml.j2
new file mode 100644
index 0000000..43d04a2
--- /dev/null
+++ b/roles/cord-profile/templates/carrierethernet-global-app.yaml.j2
@@ -0,0 +1,25 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+imports:
+   - custom_types/xos.yaml
+
+description: carrierethernet-app onboarding, generated by platform-install
+topology_template:
+  node_templates:
+
+    service#ONOS_CORD:
+      type: tosca.nodes.ONOSService
+      properties:
+        no-delete: true
+        no-create: true
+        no-update: true
+
+    CarrierEthernet_ONOS_app:
+      type: tosca.nodes.ONOSApp
+      requirements:
+        - onos_tenant:
+            node: service#ONOS_CORD
+            relationship: tosca.relationships.TenantOfService
+      properties:
+        install_dependencies: http://mavenrepo:8080/repository/org/opencord/ce/ce-api/{{ cord_app_version }}/ce-api-{{ cord_app_version }}.oar, http://mavenrepo:8080/repository/org/opencord/ce/ecord-global-app/{{ cord_app_version }}/ecord-global-app-{{ cord_app_version }}.oar
+        dependencies: org.onosproject.drivers, org.onosproject.drivers.ovsdb, org.onosproject.openflow-base, org.onosproject.ovsdb-base
diff --git a/roles/cord-profile/templates/carrierethernet-local-app.yaml.j2 b/roles/cord-profile/templates/carrierethernet-local-app.yaml.j2
new file mode 100644
index 0000000..43d04a2
--- /dev/null
+++ b/roles/cord-profile/templates/carrierethernet-local-app.yaml.j2
@@ -0,0 +1,25 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+imports:
+   - custom_types/xos.yaml
+
+description: carrierethernet-app onboarding, generated by platform-install
+topology_template:
+  node_templates:
+
+    service#ONOS_CORD:
+      type: tosca.nodes.ONOSService
+      properties:
+        no-delete: true
+        no-create: true
+        no-update: true
+
+    CarrierEthernet_ONOS_app:
+      type: tosca.nodes.ONOSApp
+      requirements:
+        - onos_tenant:
+            node: service#ONOS_CORD
+            relationship: tosca.relationships.TenantOfService
+      properties:
+        install_dependencies: http://mavenrepo:8080/repository/org/opencord/ce/ce-api/{{ cord_app_version }}/ce-api-{{ cord_app_version }}.oar, http://mavenrepo:8080/repository/org/opencord/ce/ecord-global-app/{{ cord_app_version }}/ecord-global-app-{{ cord_app_version }}.oar
+        dependencies: org.onosproject.drivers, org.onosproject.drivers.ovsdb, org.onosproject.openflow-base, org.onosproject.ovsdb-base
diff --git a/roles/cord-profile/templates/ecord-services.yaml.j2 b/roles/cord-profile/templates/ecord-services.yaml.j2
index dc6a71f..312a861 100644
--- a/roles/cord-profile/templates/ecord-services.yaml.j2
+++ b/roles/cord-profile/templates/ecord-services.yaml.j2
@@ -82,7 +82,7 @@
 #       node_label: label_veg
         replaces: service_veg
       artifacts:
-        pubkey: /opt/xos/services/veg/keys/veg_rsa.pub
+        pubkey: /opt/cord_profile/key_import/veg_rsa.pub
 
     service#vrouter:
       type: tosca.nodes.VRouterService
diff --git a/roles/cord-profile/templates/mock-onos.yaml.j2 b/roles/cord-profile/templates/mock-onos.yaml.j2
index 1f733f9..a3953c6 100644
--- a/roles/cord-profile/templates/mock-onos.yaml.j2
+++ b/roles/cord-profile/templates/mock-onos.yaml.j2
@@ -1,3 +1,4 @@
+
 tosca_definitions_version: tosca_simple_yaml_1_0
 
 imports:
diff --git a/roles/cord-profile/templates/vee-service.yaml.j2 b/roles/cord-profile/templates/vee-service.yaml.j2
index 56a7de4..da07cc9 100644
--- a/roles/cord-profile/templates/vee-service.yaml.j2
+++ b/roles/cord-profile/templates/vee-service.yaml.j2
@@ -26,7 +26,7 @@
         no-create: true
         no-update: true
       artifacts:
-        pubkey: /opt/xos/services/veg/keys/veg_rsa.pub
+        pubkey: /opt/cord_profile/key_import/veg_rsa.pub
 
     service#vnodlocal:
       type: tosca.nodes.VNodLocalService
diff --git a/roles/cord-profile/templates/vnodglobal-service-complete.yaml.j2 b/roles/cord-profile/templates/vnodglobal-service-complete.yaml.j2
new file mode 100644
index 0000000..a1b57ff
--- /dev/null
+++ b/roles/cord-profile/templates/vnodglobal-service-complete.yaml.j2
@@ -0,0 +1,113 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+imports:
+   - custom_types/xos.yaml
+   - custom_types/metronet.yaml
+
+description: vnodglobal services, generated by platform-install
+
+topology_template:
+  node_templates:
+
+    enterpriselocation#onlab:
+      type: tosca.nodes.EnterpriseLocation
+      requirements:
+      properties:
+        name: onlab
+        cord_site_ip: 127.0.0.1
+        cord_site_port: 8181
+        cord_site_username: onos
+        cord_site_password: rocks
+        cord_site_type: onos
+
+
+    enterpriselocation#onlab1:
+      type: tosca.nodes.EnterpriseLocation
+      requirements:
+      properties:
+        name: onlab1
+        cord_site_ip: 127.0.0.2
+        cord_site_port: 8181
+        cord_site_username: onos
+        cord_site_password: rocks
+        cord_site_type: onos
+
+    onosmodel#onlab:
+      type: tosca.nodes.OnosModel
+      requirements:
+      properties:
+        name: onlabT
+        onos_ip: 127.0.0.1
+        onos_port: 8181
+        onos_username: onos
+        onos_password: rocks
+        onos_type: global
+
+    bandwidthprofile#bronze:
+      type: tosca.nodes.BandwidthProfile
+      requirements:
+      properties:
+        cbs: 1000
+        ebs: 1200
+        cir: 1000000
+        eir: 1200000
+        name: bronze
+
+    bandwidthprofile#silver:
+      type: tosca.nodes.BandwidthProfile
+      requirements:
+      properties:
+        cbs: 1500
+        ebs: 2000
+        cir: 1500000
+        eir: 2000000
+        name: silver
+
+    bandwidthprofile#gold:
+      type: tosca.nodes.BandwidthProfile
+      requirements:
+      properties:
+        cbs: 2000
+        ebs: 2700
+        cir: 2000000
+        eir: 2700000
+        name: gold
+
+    bandwidthprofile#platinum:
+      type: tosca.nodes.BandwidthProfile
+      requirements:
+      properties:
+        cbs: 2500
+        ebs: 3200
+        cir: 2500000
+        eir: 3200000
+        name: platinum
+
+    usernetworkinterface#UserNetworkInterface1:
+      type: tosca.nodes.UserNetworkInterface
+      requirements:
+      properties:
+        tenant: onlab
+        name: uni1
+        latlng: [37.973535, -122.531087]
+        cpe_id: netconf:192.168.56.10:830/0
+
+    usernetworkinterface#UserNetworkInterface2:
+      type: tosca.nodes.UserNetworkInterface
+      requirements:
+      properties:
+        tenant: onlab
+        name: uni2
+        latlng: [37.773972, -122.431297]
+        cpe_id: netconf:192.168.56.20:830/0
+
+    eline#testeline:
+      type: tosca.nodes.ELine
+      requirements:
+      properties:
+        name: testeline
+        connect_point_1_id: netconf:192.168.56.10:830/0
+        connect_point_2_id: netconf:192.168.56.20:830/0
+        vlanids: 100
+        cord_site_name: onlabT
+        bwp: gold
\ No newline at end of file
diff --git a/roles/cord-profile/templates/vnodglobal-service.yaml.j2 b/roles/cord-profile/templates/vnodglobal-service.yaml.j2
index a1b57ff..348f121 100644
--- a/roles/cord-profile/templates/vnodglobal-service.yaml.j2
+++ b/roles/cord-profile/templates/vnodglobal-service.yaml.j2
@@ -9,34 +9,11 @@
 topology_template:
   node_templates:
 
-    enterpriselocation#onlab:
-      type: tosca.nodes.EnterpriseLocation
-      requirements:
-      properties:
-        name: onlab
-        cord_site_ip: 127.0.0.1
-        cord_site_port: 8181
-        cord_site_username: onos
-        cord_site_password: rocks
-        cord_site_type: onos
-
-
-    enterpriselocation#onlab1:
-      type: tosca.nodes.EnterpriseLocation
-      requirements:
-      properties:
-        name: onlab1
-        cord_site_ip: 127.0.0.2
-        cord_site_port: 8181
-        cord_site_username: onos
-        cord_site_password: rocks
-        cord_site_type: onos
-
-    onosmodel#onlab:
+    onosmodel#globalONOS:
       type: tosca.nodes.OnosModel
       requirements:
       properties:
-        name: onlabT
+        name: globalONOS
         onos_ip: 127.0.0.1
         onos_port: 8181
         onos_username: onos
@@ -81,33 +58,4 @@
         ebs: 3200
         cir: 2500000
         eir: 3200000
-        name: platinum
-
-    usernetworkinterface#UserNetworkInterface1:
-      type: tosca.nodes.UserNetworkInterface
-      requirements:
-      properties:
-        tenant: onlab
-        name: uni1
-        latlng: [37.973535, -122.531087]
-        cpe_id: netconf:192.168.56.10:830/0
-
-    usernetworkinterface#UserNetworkInterface2:
-      type: tosca.nodes.UserNetworkInterface
-      requirements:
-      properties:
-        tenant: onlab
-        name: uni2
-        latlng: [37.773972, -122.431297]
-        cpe_id: netconf:192.168.56.20:830/0
-
-    eline#testeline:
-      type: tosca.nodes.ELine
-      requirements:
-      properties:
-        name: testeline
-        connect_point_1_id: netconf:192.168.56.10:830/0
-        connect_point_2_id: netconf:192.168.56.20:830/0
-        vlanids: 100
-        cord_site_name: onlabT
-        bwp: gold
\ No newline at end of file
+        name: platinum
\ No newline at end of file