Skip to content

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

@achevalet

Description

@achevalet

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions