rename cluster levels to non-underscore names

Change-Id: Ic9bdafbeb1333699ce424612f8b2e8d8dafb7be2
diff --git a/classes/cluster/sl-os-contrail/infra/config.yml b/classes/cluster/sl-os-contrail/infra/config.yml
new file mode 100755
index 0000000..4dbee00
--- /dev/null
+++ b/classes/cluster/sl-os-contrail/infra/config.yml
@@ -0,0 +1,223 @@
+classes:
+- service.git.client
+- system.docker.client
+- system.docker.host
+- system.linux.system.single
+- system.linux.system.repo.mcp.salt
+- system.linux.system.repo.mcp.openstack
+- system.openssh.client.lab
+- system.salt.master.api
+- system.salt.master.pkg
+- system.reclass.storage.salt
+- system.salt.minion.ca.salt_master
+- system.salt.minion.cert.proxy
+- system.sphinx.server.doc.reclass
+- system.keystone.client.core
+- system.keystone.client.service.aodh
+- system.keystone.client.service.ceilometer
+- system.keystone.client.service.designate
+- system.keystone.client.service.cinder
+- system.keystone.client.service.cinder2
+- system.keystone.client.service.cinder3
+- system.keystone.client.service.glance
+- system.keystone.client.service.glare
+- system.keystone.client.service.heat
+- system.keystone.client.service.heat-cfn
+- system.keystone.client.service.keystone
+- system.keystone.client.service.neutron
+- system.keystone.client.service.nova-ec2
+- system.keystone.client.service.nova21
+- system.keystone.client.service.nova-placement
+- system.mysql.client
+- system.mysql.client.database.cinder
+- system.mysql.client.database.glance
+- system.mysql.client.database.heat
+- system.mysql.client.database.keystone
+- system.mysql.client.database.nova
+- system.mysql.client.database.nova_api
+- system.mysql.client.database.neutron
+- system.reclass.storage.system.openstack_control_cluster
+- system.reclass.storage.system.opencontrail_control_cluster
+- cluster.sl-os-contrail.openstack.proxy
+- cluster.sl-os-contrail.stacklight.proxy
+- cluster.sl-os-contrail.openstack.dashboard
+- cluster.sl-os-contrail
+parameters:
+  _param:
+    reclass_data_repository: "https://gerrit.mcp.mirantis.net/salt-models/mcp-virtual-lab"
+    reclass_data_revision: master
+    reclass_config_master: ${_param:infra_config_deploy_address}
+    single_address: ${_param:infra_config_address}
+    salt_master_host: 127.0.0.1
+    salt_master_base_environment: prd
+    salt_minion_ca_host: ${linux:network:fqdn}
+    salt_api_password_hash: "$6$sGnRlxGf$al5jMCetLP.vfI/fTl3Z0N7Za1aeiexL487jAtyRABVfT3NlwZxQGVhO7S1N8OwS/34VHYwZQA8lkXwKMN/GS1"
+  linux:
+    network:
+      interface:
+        ens4:
+          enabled: true
+          type: eth
+          proto: static
+          address: ${_param:single_address}
+          netmask: 255.255.255.0
+  nginx:
+    server:
+      site:
+        nginx_proxy_openstack_web:
+          proxy:
+            host: cfg
+        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>>
+        opencontrail_control01:
+          expression: <<node_hostname>>__equals__ntw01
+          cluster_param:
+            opencontrail_control_node01_address:
+              value_template: <<node_control_ip>>
+        opencontrail_control02:
+          expression: <<node_hostname>>__equals__ntw02
+          cluster_param:
+            opencontrail_control_node02_address:
+              value_template: <<node_control_ip>>
+        opencontrail_control03:
+          expression: <<node_hostname>>__equals__ntw03
+          cluster_param:
+            opencontrail_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>>
+        stacklight_monitor01:
+          expression: <<node_hostname>>__equals__mon01
+          cluster_param:
+            stacklight_monitor_node01_address:
+              value_template: <<node_control_ip>>
+        stacklight_monitor02:
+          expression: <<node_hostname>>__equals__mon02
+          cluster_param:
+            stacklight_monitor_node02_address:
+              value_template: <<node_control_ip>>
+        stacklight_monitor03:
+          expression: <<node_hostname>>__equals__mon03
+          cluster_param:
+            stacklight_monitor_node03_address:
+              value_template: <<node_control_ip>>
+      node:
+        prx_node:
+          name: ${_param:openstack_proxy_node01_hostname}
+          domain: ${_param:cluster_domain}
+          classes:
+          - cluster.${_param:cluster_name}.stacklight.proxy
+          params:
+            salt_master_host: ${_param:infra_config_deploy_address}
+            linux_system_codename: xenial
+            single_address: ${_param:openstack_proxy_node01_address}
+        stacklight_monitor_node01:
+          name: ${_param:stacklight_monitor_node01_hostname}
+          domain: ${_param:cluster_domain}
+          classes:
+          - system.docker.swarm.master
+          - cluster.${_param:cluster_name}.stacklight.client
+          - cluster.${_param:cluster_name}.stacklight.server
+          params:
+            salt_master_host: ${_param:infra_config_deploy_address}
+            linux_system_codename: xenial
+            single_address: ${_param:stacklight_monitor_node01_address}
+            keepalived_vip_priority: 100
+        stacklight_monitor_node02:
+          name: ${_param:stacklight_monitor_node02_hostname}
+          domain: ${_param:cluster_domain}
+          classes:
+          - system.docker.swarm.manager
+          - cluster.${_param:cluster_name}.stacklight.server
+          params:
+            salt_master_host: ${_param:infra_config_deploy_address}
+            linux_system_codename: xenial
+            single_address: ${_param:stacklight_monitor_node02_address}
+            keepalived_vip_priority: 101
+        stacklight_monitor_node03:
+          name: ${_param:stacklight_monitor_node03_hostname}
+          domain: ${_param:cluster_domain}
+          classes:
+          - system.docker.swarm.manager
+          - cluster.${_param:cluster_name}.stacklight.server
+          params:
+            salt_master_host: ${_param:infra_config_deploy_address}
+            linux_system_codename: xenial
+            single_address: ${_param:stacklight_monitor_node03_address}
+            keepalived_vip_priority: 102
+        opencontrail_control_node01:
+          params:
+            rabbitmq_cluster_role: master
+        opencontrail_control_node02:
+          params:
+            rabbitmq_cluster_role: slave
+        opencontrail_control_node03:
+          params:
+            rabbitmq_cluster_role: slave
+        openstack_control_node01:
+          classes:
+          - service.galera.master.cluster
+          params:
+            linux_system_codename: xenial
+            mysql_cluster_role: master
+        openstack_control_node02:
+          classes:
+          - service.galera.slave.cluster
+          params:
+            linux_system_codename: xenial
+            mysql_cluster_role: slave
+        openstack_control_node03:
+          classes:
+          - service.galera.slave.cluster
+          params:
+            linux_system_codename: xenial
+            mysql_cluster_role: slave
diff --git a/classes/cluster/sl-os-contrail/infra/init.yml b/classes/cluster/sl-os-contrail/infra/init.yml
new file mode 100755
index 0000000..893c1d4
--- /dev/null
+++ b/classes/cluster/sl-os-contrail/infra/init.yml
@@ -0,0 +1,21 @@
+parameters:
+  _param:
+    cluster_domain: sl-os-contrail.local
+    cluster_name: sl_os_contrail
+    infra_config_deploy_address: 192.168.10.100
+    infra_config_address: 172.16.10.100
+    infra_config_hostname: cfg01
+    linux_system_repo_mcp_salt_version: nightly
+  linux:
+    network:
+      host:
+        cfg01:
+          address: ${_param:infra_config_address}
+          names:
+          - ${_param:infra_config_hostname}
+          - ${_param:infra_config_hostname}.${_param:cluster_domain}
+        cfg:
+          address: ${_param:infra_config_address}
+          names:
+          - cfg
+          - cfg.${_param:cluster_domain}