moving virtual labs to new templates && system update

Change-Id: I713b73cbfe1a8f168dfd6dcaf5fd4ec34df47758
diff --git a/classes/cluster/virtual-mcp05-ovs/infra/config.yml b/classes/cluster/virtual-mcp05-ovs/infra/config.yml
index f09d72e..6994b27 100644
--- a/classes/cluster/virtual-mcp05-ovs/infra/config.yml
+++ b/classes/cluster/virtual-mcp05-ovs/infra/config.yml
@@ -14,9 +14,6 @@
 - system.keystone.client.service.nova21
 - system.mysql.client.single
 - system.reclass.storage.system.openstack_control_cluster
-- system.reclass.storage.system.openstack_compute_multi
-- system.reclass.storage.system.openstack_gateway_single
-- system.reclass.storage.system.openstack_dashboard_single
 - system.reclass.storage.system.stacklight_server_cluster
 - cluster.virtual-mcp05-ovs.openstack.proxy
 - cluster.virtual-mcp05-ovs.stacklight.proxy
@@ -50,42 +47,114 @@
             host: prx
         nginx_proxy_openstack_api_heat_cfn:
           enabled: false
+  salt:
+    master:
+      reactor:
+        reclass/minion/classify:
+        - salt://reclass/reactor/node_register.sls
   reclass:
     storage:
+      class_mapping:
+        common_node:
+          expression: all
+          node_param:
+            single_address:
+              value_template: <<node_control_ip>>
+            linux_system_codename:
+              value_template: <<node_os>>
+            salt_master_host:
+              value_template: <<node_master_ip>>
+        infra_config:
+          expression: <<node_hostname>>__startswith__cfg
+          cluster_param:
+            infra_config_address:
+              value_template: <<node_control_ip>>
+            infra_config_deploy_address:
+              value_template: <<node_deploy_ip>>
+            cluster_domain:
+              value_template: <<node_domain>>
+        openstack_control01:
+          expression: <<node_hostname>>__equals__ctl01
+          cluster_param:
+            openstack_control_node01_address:
+              value_template: <<node_control_ip>>
+        openstack_control02:
+          expression: <<node_hostname>>__equals__ctl02
+          cluster_param:
+            openstack_control_node02_address:
+              value_template: <<node_control_ip>>
+        openstack_control03:
+          expression: <<node_hostname>>__equals__ctl03
+          cluster_param:
+            openstack_control_node03_address:
+              value_template: <<node_control_ip>>
+        openstack_compute:
+          expression: <<node_hostname>>__startswith__cmp
+          node_class:
+            value_template:
+              - cluster.<<node_cluster>>.openstack.compute
+          node_param:
+            tenant_address:
+              value_template: <<node_tenant_ip>>
+            external_address:
+              value_template: <<node_external_ip>>
+        openstack_gateway:
+          expression: <<node_hostname>>__startswith__gtw
+          node_class:
+            value_template:
+              - cluster.<<node_cluster>>.openstack.gateway
+          node_param:
+            tenant_address:
+              value_template: <<node_tenant_ip>>
+            external_address:
+              value_template: <<node_external_ip>>
+          cluster_param:
+            openstack_gateway_node01_address:
+              value_template: <<node_control_ip>>
+        stacklight_monitor_node01:
+          expression: <<node_hostname>>__equals__mon01
+          cluster_param:
+            stacklight_monitor_node03_address:
+              value_template: <<node_control_ip>>
+        stacklight_monitor_node02:
+          expression: <<node_hostname>>__equals__mon02
+          cluster_param:
+            stacklight_monitor_node03_address:
+              value_template: <<node_control_ip>>
+        stacklight_monitor_node03:
+          expression: <<node_hostname>>__equals__mon03
+          cluster_param:
+            stacklight_monitor_node03_address:
+              value_template: <<node_control_ip>>
+        openstack_dashboard:
+          expression: <<node_hostname>>__startswith__prx
+          node_class:
+            value_template:
+              - cluster.<<node_cluster>>.openstack.dashboard
+              - cluster.<<node_cluster>>.openstack.proxy
+          cluster_param:
+            openstack_proxy_node01_address:
+              value_template: <<node_control_ip>>
       node:
         openstack_control_node01:
           classes:
           - service.galera.master.cluster
           params:
             mysql_cluster_role: master
+            linux_system_codename: xenial
         openstack_control_node02:
           classes:
           - service.galera.slave.cluster
           params:
             mysql_cluster_role: slave
+            linux_system_codename: xenial
         openstack_control_node03:
           classes:
           - service.galera.slave.cluster
           params:
             mysql_cluster_role: slave
-        openstack_compute_node01:
-          params:
-            single_address: 172.16.10.105
-            tenant_address: 10.1.0.105
-            external_address: 10.16.0.105
-        openstack_compute_node02:
-          params:
-            single_address: 172.16.10.106
-            tenant_address: 10.1.0.106
-            external_address: 10.16.0.106
-        openstack_gateway_node01:
-          params:
-            tenant_address: 10.1.0.110
-            external_address: 10.16.0.110
-        openstack_proxy_node01:
-          classes:
-          - cluster.virtual-mcp05-ovs.openstack.proxy
+            linux_system_codename: xenial
         stacklight_server_node01:
           classes:
           - system.influxdb.server.single
-          - system.influxdb.database.stacklight
+          - system.influxdb.database.stacklight
\ No newline at end of file
diff --git a/classes/cluster/virtual-mcp05-ovs/init.yml b/classes/cluster/virtual-mcp05-ovs/init.yml
index 27f0242..0db990b 100644
--- a/classes/cluster/virtual-mcp05-ovs/init.yml
+++ b/classes/cluster/virtual-mcp05-ovs/init.yml
@@ -13,26 +13,34 @@
     cluster_domain: virtual-mcp05-ovs.local
     cluster_name: virtual-mcp05-ovs
     # infra service addresses
-    infra_config_address: 172.16.10.100
+    infra_config_address: 172.16.10.90
     # openstack service addresses
-    openstack_proxy_address: 172.16.10.121
-    openstack_proxy_node01_address: 172.16.10.121
+    openstack_proxy_hostname: prx
+    openstack_proxy_address: ${_param:openstack_proxy_node01_address}
+    openstack_proxy_node01_hostname: prx01
+    openstack_proxy_node01_address: ${_param:infra_config_address}
+    openstack_control_hostname: ctl
+    openstack_control_node01_hostname: ctl01
+    openstack_control_node02_hostname: ctl02
+    openstack_control_node03_hostname: ctl03
     openstack_control_address: 172.16.10.254
-    openstack_control_node01_address: 172.16.10.101
-    openstack_control_node02_address: 172.16.10.102
-    openstack_control_node03_address: 172.16.10.103
+    openstack_control_node01_address: 172.16.10.91
+    openstack_control_node02_address: 172.16.10.92
+    openstack_control_node03_address: 172.16.10.93
+    openstack_gateway_hostname: gtw
+    openstack_gateway_address: ${_param:openstack_gateway_node01_address}
+    openstack_gateway_node01_hostname: gtw01
+    openstack_gateway_node01_address: 172.16.10.94
     openstack_database_address: ${_param:openstack_control_address}
     openstack_message_queue_address: ${_param:openstack_control_address}
     openstack_message_queue_node01_address: ${_param:openstack_control_node01_address}
     openstack_message_queue_node02_address: ${_param:openstack_control_node02_address}
     openstack_message_queue_node03_address: ${_param:openstack_control_node03_address}
-    openstack_gateway_address: 172.16.10.110
+
     # stacklight service addresses
     stacklight_monitor_address: 172.16.10.253
     stacklight_monitor_node01_address: 172.16.10.107
     stacklight_monitor_node02_address: 172.16.10.108
     stacklight_monitor_node03_address: 172.16.10.109
-
     stacklight_telemetry_address: ${_param:stacklight_monitor_address}
-    stacklight_telemetry_node01_address: ${_param:stacklight_monitor_node01_address}
     stacklight_log_address: ${_param:stacklight_monitor_address}
\ No newline at end of file
diff --git a/classes/cluster/virtual-mcp05-ovs/openstack/compute.yml b/classes/cluster/virtual-mcp05-ovs/openstack/compute.yml
index 9316e40..8737159 100644
--- a/classes/cluster/virtual-mcp05-ovs/openstack/compute.yml
+++ b/classes/cluster/virtual-mcp05-ovs/openstack/compute.yml
@@ -3,6 +3,7 @@
 - system.nova.compute.cluster
 - system.neutron.compute.cluster
 - system.linux.network.interface.single_ovs_dvr
+- system.linux.network.hosts
 - system.heka.alarm.openstack_compute
 - cluster.virtual-mcp05-ovs
 parameters:
diff --git a/classes/cluster/virtual-mcp05-ovs/openstack/init.yml b/classes/cluster/virtual-mcp05-ovs/openstack/init.yml
index a557f04..442516f 100644
--- a/classes/cluster/virtual-mcp05-ovs/openstack/init.yml
+++ b/classes/cluster/virtual-mcp05-ovs/openstack/init.yml
@@ -119,13 +119,4 @@
           names:
           - gtw01
           - gtw01.${_param:cluster_domain}
-        cmp01:
-          address: 172.16.10.105
-          names:
-          - cmp01
-          - cmp01.${_param:cluster_domain}
-        cmp02:
-          address: 172.16.10.106
-          names:
-          - cmp02
-          - cmp02.${_param:cluster_domain}
+