rename class_not_found to class_notfound
diff --git a/reclass/core.py b/reclass/core.py
index fb8ee42..02c8da6 100644
--- a/reclass/core.py
+++ b/reclass/core.py
@@ -100,7 +100,7 @@
try:
class_entity = self._storage.get_class(klass, environment, self._settings)
except ClassNotFound as e:
- if self._settings.ignore_class_not_found:
+ if self._settings.ignore_class_notfound:
continue
e.nodename = nodename
e.uri = entity.uri
diff --git a/reclass/defaults.py b/reclass/defaults.py
index 7fcb2a0..c28d0b4 100644
--- a/reclass/defaults.py
+++ b/reclass/defaults.py
@@ -37,7 +37,7 @@
ALLOW_DICT_OVER_SCALAR = False
AUTOMATIC_RECLASS_PARAMETERS = True
-IGNORE_CLASS_NOT_FOUND = False
+IGNORE_CLASS_NOTFOUND = False
DEFAULT_ENVIRONMENT = 'base'
INVENTORY_IGNORE_FAILED_NODE = False
diff --git a/reclass/settings.py b/reclass/settings.py
index f6168fd..7e0f7ee 100644
--- a/reclass/settings.py
+++ b/reclass/settings.py
@@ -17,7 +17,7 @@
self.inventory_ignore_failed_node = options.get('inventory_ignore_failed_node', reclass.defaults.INVENTORY_IGNORE_FAILED_NODE)
self.inventory_ignore_failed_render = options.get('inventory_ignore_failed_render', reclass.defaults.INVENTORY_IGNORE_FAILED_RENDER)
self.reference_sentinels = options.get('reference_sentinels', reclass.defaults.REFERENCE_SENTINELS)
- self.ignore_class_not_found = options.get('ignore_class_not_found', reclass.defaults.IGNORE_CLASS_NOT_FOUND)
+ self.ignore_class_notfound = options.get('ignore_class_notfound', reclass.defaults.IGNORE_CLASS_NOTFOUND)
self.ref_parser = reclass.values.parser_funcs.get_ref_parser(self.escape_character, self.reference_sentinels, self.export_sentinels)
self.simple_ref_parser = reclass.values.parser_funcs.get_simple_ref_parser(self.escape_character, self.reference_sentinels, self.export_sentinels)
@@ -34,4 +34,5 @@
and self.dict_key_override_prefix == other.dict_key_override_prefix \
and self.escape_character == other.escape_character \
and self.export_sentinels == other.export_sentinels \
- and self.reference_sentinels == other.reference_sentinels
+ and self.reference_sentinels == other.reference_sentinels \
+ and self.ignore_class_notfound == other.ignore_class_notfound
diff --git a/reclass/tests/data/01/nodes/class_not_found.yml b/reclass/tests/data/01/nodes/class_notfound.yml
similarity index 100%
rename from reclass/tests/data/01/nodes/class_not_found.yml
rename to reclass/tests/data/01/nodes/class_notfound.yml
diff --git a/reclass/tests/test_core.py b/reclass/tests/test_core.py
index e0097b7..eb9a5b4 100644
--- a/reclass/tests/test_core.py
+++ b/reclass/tests/test_core.py
@@ -33,15 +33,15 @@
params = { 'int': 1, 'bool': True, 'string': '1', '_reclass_': { 'environment': 'base', 'name': {'full': 'data_types', 'short': 'data_types' } } }
self.assertEqual(node['parameters'], params)
- def test_raise_class_not_found(self):
+ def test_raise_class_notfound(self):
reclass = self._core('01')
with self.assertRaises(ClassNotFound):
- node = reclass.nodeinfo('class_not_found')
+ node = reclass.nodeinfo('class_notfound')
- def test_ignore_class_not_found(self):
- reclass = self._core('01', opts={ 'ignore_class_not_found': True })
- node = reclass.nodeinfo('class_not_found')
- params = { 'node_test': 'class not found', '_reclass_': { 'environment': 'base', 'name': {'full': 'class_not_found', 'short': 'class_not_found' } } }
+ def test_ignore_class_notfound(self):
+ reclass = self._core('01', opts={ 'ignore_class_notfound': True })
+ node = reclass.nodeinfo('class_notfound')
+ params = { 'node_test': 'class not found', '_reclass_': { 'environment': 'base', 'name': {'full': 'class_notfound', 'short': 'class_notfound' } } }
self.assertEqual(node['parameters'], params)