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

'Foreman' object has no attribute 'lifecycle_environments' #98

Open
achevalet opened this issue Jan 24, 2020 · 0 comments
Open

'Foreman' object has no attribute 'lifecycle_environments' #98

achevalet opened this issue Jan 24, 2020 · 0 comments

Comments

@achevalet
Copy link

I'm trying to manage lifecycle environments from katello plugins and I'm not sure what's going wrong.. The 'lifecycle_environments' is present in the definitions retrieved from the running foreman instance but there is no attribute for it:

>>> from foreman.client import Foreman
>>> fm = Foreman('https://foreman.com', ('admin','password'), api_version=2, use_cache=False, strict_cache=True)
>>> defs = fm._get_remote_defs()
>>> print defs["docs"]["resources"]["lifecycle_environments"]
{u'api_url': u'/api', u'deprecated': False, u'metadata': None, u'full_description': u'\n<p># Description</p>\n\n<p>An environment is a basic organization structure that groups hosts,\nproducts, repositories, etc.
.....

>>> fm.lifecycle_environments
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'Foreman' object has no attribute 'lifecycle_environments'
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