Merge pull request #29 from salt-formulas/revert-26-ref-in-classes
Revert "Interpolate references in class names"
diff --git a/README-extentions.rst b/README-extentions.rst
index 9085b57..97d78af 100644
--- a/README-extentions.rst
+++ b/README-extentions.rst
@@ -208,55 +208,6 @@
group_errors: True
-Use references in class names
------------------------------
-
-Allows to use references in the class names.
-
-Assuming following setup:
-
-.. code-block:: yaml
- #/etc/reclass/classes/first.yml
- parameters:
- _class:
- env:
- override: 'env.dev'
- lab:
- name: default
-
- #/etc/reclass/classes/lab/env/dev.yml
- parameters:
- lab:
- name: dev
-
- #/etc/reclass/classes/second.yml
- classes:
- - first
- - lab.${_class:env:override}
-
-
-Reclass --nodeinfo then returns:
-
-.. code-block:: yaml
-
- ...
- ...
- applications: []
- environment: base
- exports: {}
- classes:
- - first
- - lab.${_class:env:override}
- - second
- parameters:
- _class:
- env:
- override: env.dev
- lab:
- name: dev
- ...
- ...
-
Inventory Queries
-----------------
diff --git a/reclass/core.py b/reclass/core.py
index 92e7c25..9a23d89 100644
--- a/reclass/core.py
+++ b/reclass/core.py
@@ -22,7 +22,6 @@
from reclass.output.yaml_outputter import ExplicitDumper
from reclass.datatypes import Entity, Classes, Parameters, Exports
from reclass.errors import MappingFormatError, ClassNotFound, InvQueryClassNotFound, InvQueryError, InterpolationError
-from reclass.values.parser import Parser
try:
basestring
@@ -98,10 +97,6 @@
return Entity(self._settings, parameters=p, name='input data')
def _recurse_entity(self, entity, merge_base=None, seen=None, nodename=None, environment=None):
-
- # values/parser in order to interpolate references in classes
- _parser = Parser()
-
if seen is None:
seen = {}
@@ -112,8 +107,6 @@
merge_base = Entity(self._settings, name='empty (@{0})'.format(nodename))
for klass in entity.classes.as_list():
- if merge_base is not None:
- klass=str(_parser.parse(klass, self._settings).render(merge_base.parameters.as_dict(), {}))
if klass not in seen:
try:
class_entity = self._storage.get_class(klass, environment, self._settings)