Merge pull request #13 from salt-formulas/dynamic-metadata-readme
Sample class mapping for dynamic classification
diff --git a/README.rst b/README.rst
index ed5effc..c57a0a4 100644
--- a/README.rst
+++ b/README.rst
@@ -1,6 +1,6 @@
===============
-reclass formula
+Reclass Formula
===============
reclass is an “external node classifier” (ENC) as can be used with automation
@@ -8,8 +8,8 @@
merging data sources recursively.
-Sample pillars
-==============
+Sample Metadata
+===============
Reclass storage with data fetched from git
@@ -31,14 +31,19 @@
.. literalinclude:: tests/pillar/generate_multi.sls
:language: yaml
-Reclass storage with arbitrary class mappings
+Reclass storage with simple class mappings
.. literalinclude:: tests/pillar/class_mapping.sls
:language: yaml
+Reclass models with dynamic node classification
-External links
-==============
+.. literalinclude:: tests/pillar/node_classify.sls
+ :language: yaml
+
+
+More Information
+================
* http://reclass.pantsfullofunix.net/index.html
* http://reclass.pantsfullofunix.net/operations.html
diff --git a/tests/pillar/node_classify.sls b/tests/pillar/node_classify.sls
new file mode 100644
index 0000000..86cbb6f
--- /dev/null
+++ b/tests/pillar/node_classify.sls
@@ -0,0 +1,52 @@
+reclass:
+ storage:
+ enabled: true
+ class_mapping:
+ common_node:
+ type: all
+ node_param:
+ single_address:
+ value_template: node_ip
+ linux_system_codename:
+ value_template: node_os
+ infra_config_node:
+ type: hostname__startswith
+ expression: cfg
+ node_class:
+ - cluster.<<node_cluster>>.infra.config
+ node_param:
+ reclass_config_master:
+ value_template: node_ip
+ openstack_control:
+ type: hostname__startswith
+ expression: ctl
+ node_class:
+ - cluster.<<cluster>>.openstack.control
+ openstack_control_node_member01:
+ type: hostname__equals
+ expression: ctl01
+ cluster_param:
+ openstack_control_node01_address:
+ value_template: node_ip
+ node_param:
+ openstack_control_vip_address:
+ value_template: node_ip
+ keepalived_vip_priority:
+ value: 103
+ opencontrail_database_id:
+ value: 1
+ rabbitmq_cluster_role:
+ value: master
+ openstack_control_node_member02:
+ type: hostname__equals
+ expression: ctl02
+ cluster_param:
+ openstack_control_node01_address:
+ value_template: node_ip
+ node_param:
+ keepalived_vip_priority:
+ value: 102
+ opencontrail_database_id:
+ value: 2
+ rabbitmq_cluster_role:
+ value: slave