Add support to use current node parameters as references in class name
so that with the following reclass config:
```
=> /etc/reclass/nodes/mynode.yml
classes:
- common
parameters:
project: myproject
=> /etc/reclass/classes/common.yml
class:
- ${project}
=> /etc/reclass/classes/myproject.yml
parameters:
some:
project: parameters
```
The mynode parameters would be merged successfully by reclass and we will
get the following result for the parameters:
```
parameters:
project: myproject
some:
project: parameters
```
Without this patch, this would result in the following error:
```
Failed to load ext_pillar reclass: ext_pillar.reclass: -> mynode
In yaml_fs:///etc/reclass/classes/common.yml
Class name ${project} not resolvable
```
diff --git a/reclass/core.py b/reclass/core.py
index 61443c2..67b0f92 100644
--- a/reclass/core.py
+++ b/reclass/core.py
@@ -229,6 +229,7 @@
base_entity.merge(self._get_class_mappings_entity(node_entity))
base_entity.merge(self._get_input_data_entity())
base_entity.merge_parameters(self._get_automatic_parameters(nodename, node_entity.environment))
+ base_entity.merge_parameters(Parameters(node_entity.parameters, self._settings, ''))
seen = {}
merge_base = self._recurse_entity(base_entity, seen=seen, nodename=nodename,
environment=node_entity.environment)