Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with relative class names in v1.7.0 #98

Open
MarinBernard opened this issue Oct 3, 2020 · 0 comments
Open

Error with relative class names in v1.7.0 #98

MarinBernard opened this issue Oct 3, 2020 · 0 comments

Comments

@MarinBernard
Copy link

Hi,

While v1.7.0 passes all unit tests, it seems it is unable to resolve relative class names:

# /etc/reclass/classes/testclass/init.yml
classes:
  - .subclass
# /etc/reclass/classes/testclass/subclass.yml
parameters:
  foo: bar
# /etc/reclass/nodes/testnodes.yml
classes:
  - testclass
$ reclass --inventory
Traceback (most recent call last):
  File "/home/marin/reclass/lib64/python3.6/site-packages/reclass-1.7.0-py3.6.egg/reclass/storage/memcache_proxy.py", line 51, in get_class
    return self._classes_cache[environment][name]
KeyError: 'subclass'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/marin/reclass/lib64/python3.6/site-packages/reclass-1.7.0-py3.6.egg/reclass/storage/yaml_fs/__init__.py", line 107, in get_class
    path = os.path.join(self.classes_uri, self._classes[name])
KeyError: 'subclass'

-> 
   Inventory Queries:
   -> testnode
      In yaml_fs:///etc/reclass/classes/testclass/init.yml
      Class subclass not found under yaml_fs:///etc/reclass/classes

Am I misunderstanding something here ?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant