Skip to content
This repository has been archived by the owner on May 9, 2020. It is now read-only.

Acl is not supported when using autoconfigure() #62

Open
mioi opened this issue Oct 14, 2016 · 1 comment
Open

Acl is not supported when using autoconfigure() #62

mioi opened this issue Oct 14, 2016 · 1 comment

Comments

@mioi
Copy link

mioi commented Oct 14, 2016

Even when using a Chef endpoint that is on version 12, Acl is unsupported when ChefAPI is instantiated with autoconfigure().

An instance of the Acl class doesn't seem to get initialized (via the reload() function), due to is_supported() returning False:
https://github.com/coderanger/pychef/blob/master/chef/acl.py#L113

is_supported() returns True, even when my Chef server is on version 12. It seems like it's because the value returned from version_parsed on my ChefAPI object is returning a version much lesser than 12; it is returning 0.10.8. This is the default value for version:

https://github.com/coderanger/pychef/blob/master/chef/api.py#L59

My Chef client is instantiated with autoconfigure(), so the default version of 0.10.8 can't be overwritten.

In the end, I think that there is a conflation of "chef server version" and "chef api version" in the Acl class.

@mioi
Copy link
Author

mioi commented Oct 14, 2016

The workaround for now seems to be to call a reload() on the Acl object.

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

No branches or pull requests

1 participant