On Thursday, January 19, 2012 at 4:10 AM, Roberto C. Morano wrote:
Hello,The restrictions are there just to ensure that we don't have any gotchas when
I'm working in a project to manage desktop computers configurations with
Chef and we are using databags to host users' specific configurations.
At the very begining, databags seemed the correct and easy place to hold
these confs, but we found that we will have problems with users, for
example, using dots in their usernames, because databag ids do not
support this.
I've been hacking around Chef code trying (I haven't been able to yet)
to make it to support it, but I wanted to know the original reason for
this restriction.
Could any Chef developer tell me why is this restriction applied exactly?
Thank you in advance.
using the IDs in URLs, either with the Chef Server, or with CouchDB's HTTP
API. In this case, I think everything will be fine if we relax the
restriction.
The code is here:
https://github.com/opscode/chef/blob/master/chef/lib/chef/data_bag_item.rb#L41
Looking at the router code for the API server, it *should* support this okay:
https://github.com/opscode/chef/blob/master/chef-server-api/config/router.rb
Though I'm a bit concerned that magic content type selection could be an issue, for
example if you had a data bag item with the ID "foo.xml", It's possible that
your request would be interpreted as a request for an XML response. If that is the
case, there's probably a workaround.
--
Dan DeLeo
Archive powered by MHonArc 2.6.16.