)]}'
{"etc/keystone.conf.sample":[{"author":{"_account_id":6456,"name":"Sahdev Zala","email":"spzala@us.ibm.com","username":"spzala"},"change_message_id":"23933ee7dfd3e53c996b4a0d8362d056bb96671b","unresolved":false,"context_lines":[{"line_number":130,"context_line":"# allow_subtree_delete \u003d False"},{"line_number":131,"context_line":"# dumb_member \u003d cn\u003ddumb,dc\u003dexample,dc\u003dcom"},{"line_number":132,"context_line":"# get_one_scope \u003d base"},{"line_number":133,"context_line":"# get_all_scope \u003d single"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"# user_tree_dn \u003d ou\u003dUsers,dc\u003dexample,dc\u003dcom"},{"line_number":136,"context_line":"# user_filter \u003d"}],"source_content_type":"application/octet-stream","patch_set":3,"id":"AAAAM3%2F%2B8Rw%3D","line":133,"updated":"2013-02-13 19:40:17.000000000","message":"So if I understood correctly the three scopes are BASE (base dn), ONE (all entries one level under the base dn) and SUBTREE (all). Why we have variables key-value pair named like what you have? It’s confusing to me. Doesn’t something like get_base_scope instead of get_one_scope and get_all_scope \u003d one (or get_one_scope\u003dall) makes it easy to understand? Not requesting to make any changes (unless you feel the same way too) but more like curiosity questions.","commit_id":"f72926619b7ef923b53192e32c39804684d14efe"},{"author":{"_account_id":2340,"name":"Ionut Artarisi","email":"iartarisi@suse.cz","username":"mapleoin"},"change_message_id":"69cb2bb62fed31c45df078fbcd3454e3a796b082","unresolved":false,"context_lines":[{"line_number":130,"context_line":"# allow_subtree_delete \u003d False"},{"line_number":131,"context_line":"# dumb_member \u003d cn\u003ddumb,dc\u003dexample,dc\u003dcom"},{"line_number":132,"context_line":"# get_one_scope \u003d base"},{"line_number":133,"context_line":"# get_all_scope \u003d single"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"# user_tree_dn \u003d ou\u003dUsers,dc\u003dexample,dc\u003dcom"},{"line_number":136,"context_line":"# user_filter \u003d"}],"source_content_type":"application/octet-stream","patch_set":3,"id":"AAAAM3%2F%2B7Hc%3D","line":133,"in_reply_to":"AAAAM3%2F%2B8Rw%3D","updated":"2013-02-14 09:42:42.000000000","message":"This is more like get_one/all records as in find_one, find_all. The names are similar to the ones used in the backend for the get/get_all methods in keystone.common.ldap","commit_id":"f72926619b7ef923b53192e32c39804684d14efe"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"86d9dc9096256a9f8aed796c9871ad6ef288ba85","unresolved":false,"context_lines":[{"line_number":129,"context_line":"# use_dumb_member \u003d False"},{"line_number":130,"context_line":"# allow_subtree_delete \u003d False"},{"line_number":131,"context_line":"# dumb_member \u003d cn\u003ddumb,dc\u003dexample,dc\u003dcom"},{"line_number":132,"context_line":"# get_one_scope \u003d base"},{"line_number":133,"context_line":"# get_all_scope \u003d one"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"# user_tree_dn \u003d ou\u003dUsers,dc\u003dexample,dc\u003dcom"}],"source_content_type":"application/octet-stream","patch_set":5,"id":"AAAAM3%2F%2B6hY%3D","line":132,"updated":"2013-02-14 16:58:51.000000000","message":"I\u0027d suggest breaking these two options away from the rest of the above and adding a comment to explain the enumerated options","commit_id":"bd616f59cd6bad6495dec79cffbc813ab2e53072"},{"author":{"_account_id":2340,"name":"Ionut Artarisi","email":"iartarisi@suse.cz","username":"mapleoin"},"change_message_id":"c28b76eea0cf42719fb0cfb1ca135f12febd3d56","unresolved":false,"context_lines":[{"line_number":129,"context_line":"# use_dumb_member \u003d False"},{"line_number":130,"context_line":"# allow_subtree_delete \u003d False"},{"line_number":131,"context_line":"# dumb_member \u003d cn\u003ddumb,dc\u003dexample,dc\u003dcom"},{"line_number":132,"context_line":"# get_one_scope \u003d base"},{"line_number":133,"context_line":"# get_all_scope \u003d one"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"# user_tree_dn \u003d ou\u003dUsers,dc\u003dexample,dc\u003dcom"}],"source_content_type":"application/octet-stream","patch_set":5,"id":"AAAAM3%2F%2B4pM%3D","line":132,"in_reply_to":"AAAAM3%2F%2B6hY%3D","updated":"2013-02-15 16:17:55.000000000","message":"Done","commit_id":"bd616f59cd6bad6495dec79cffbc813ab2e53072"}],"keystone/common/ldap/core.py":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"be48caa86aa6fc014ce888c57837b46f9d249783","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        return {\u0027base\u0027: ldap.SCOPE_BASE,"},{"line_number":65,"context_line":"                \u0027one\u0027: ldap.SCOPE_ONELEVEL,"},{"line_number":66,"context_line":"                \u0027single\u0027: ldap.SCOPE_ONELEVEL,"},{"line_number":67,"context_line":"                \u0027subtree\u0027: ldap.SCOPE_SUBTREE}[scope]"},{"line_number":68,"context_line":"    except KeyError:"},{"line_number":69,"context_line":"        raise ValueError(_(\u0027Invalid LDAP scope: %s. Choose one of: \u0027"},{"line_number":70,"context_line":"                           \u0027\"base\", \"single\", and \"subtree\".\u0027 % scope))"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2B7%2BY%3D","line":67,"updated":"2013-02-13 21:32:27.000000000","message":"man ldapsearch has the scope values as base, one, sub, and children. We should use the same values.","commit_id":"f72926619b7ef923b53192e32c39804684d14efe"},{"author":{"_account_id":2340,"name":"Ionut Artarisi","email":"iartarisi@suse.cz","username":"mapleoin"},"change_message_id":"69cb2bb62fed31c45df078fbcd3454e3a796b082","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        return {\u0027base\u0027: ldap.SCOPE_BASE,"},{"line_number":65,"context_line":"                \u0027one\u0027: ldap.SCOPE_ONELEVEL,"},{"line_number":66,"context_line":"                \u0027single\u0027: ldap.SCOPE_ONELEVEL,"},{"line_number":67,"context_line":"                \u0027subtree\u0027: ldap.SCOPE_SUBTREE}[scope]"},{"line_number":68,"context_line":"    except KeyError:"},{"line_number":69,"context_line":"        raise ValueError(_(\u0027Invalid LDAP scope: %s. Choose one of: \u0027"},{"line_number":70,"context_line":"                           \u0027\"base\", \"single\", and \"subtree\".\u0027 % scope))"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2B7Gw%3D","line":67,"in_reply_to":"AAAAM3%2F%2B7%2BY%3D","updated":"2013-02-14 09:42:42.000000000","message":"I chose these names after looking at both the LDAP RFC and the python-ldap docs. The LDAP RFC has these names: baseObject, singleLevel, wholeSubtree. I guess in the end I mashed them all together and didn\u0027t end up with anything consistent. I\u0027ll switch to base, one and sub.\n\nFor \u0027children\u0027 - I\u0027m not sure python-ldap supports that.","commit_id":"f72926619b7ef923b53192e32c39804684d14efe"},{"author":{"_account_id":6456,"name":"Sahdev Zala","email":"spzala@us.ibm.com","username":"spzala"},"change_message_id":"23933ee7dfd3e53c996b4a0d8362d056bb96671b","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                \u0027subtree\u0027: ldap.SCOPE_SUBTREE}[scope]"},{"line_number":68,"context_line":"    except KeyError:"},{"line_number":69,"context_line":"        raise ValueError(_(\u0027Invalid LDAP scope: %s. Choose one of: \u0027"},{"line_number":70,"context_line":"                           \u0027\"base\", \"single\", and \"subtree\".\u0027 % scope))"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"class BaseLdap(object):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2B8RM%3D","line":70,"updated":"2013-02-13 19:40:17.000000000","message":"Why we have both \"\u0027one\u0027: ldap.SCOPE_ONELEVEL\" and \"\u0027single\u0027: ldap.SCOPE_ONELEVEL\" in the return statement but the message in the exception only mentioning \"single\"? Again, I believe \"one\" is better over \"single\" to correctly represent the scope in the error message. I am not very sure that I understood it correctly without discussion with you but giving -1 for now. Thanks!","commit_id":"f72926619b7ef923b53192e32c39804684d14efe"},{"author":{"_account_id":2340,"name":"Ionut Artarisi","email":"iartarisi@suse.cz","username":"mapleoin"},"change_message_id":"69cb2bb62fed31c45df078fbcd3454e3a796b082","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                \u0027subtree\u0027: ldap.SCOPE_SUBTREE}[scope]"},{"line_number":68,"context_line":"    except KeyError:"},{"line_number":69,"context_line":"        raise ValueError(_(\u0027Invalid LDAP scope: %s. Choose one of: \u0027"},{"line_number":70,"context_line":"                           \u0027\"base\", \"single\", and \"subtree\".\u0027 % scope))"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"class BaseLdap(object):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAM3%2F%2B7Gg%3D","line":70,"in_reply_to":"AAAAM3%2F%2B8RM%3D","updated":"2013-02-14 09:42:42.000000000","message":"both one and single were meant to help potential sysadmins who can\u0027t remember which name we\u0027re using for the singleLevel search. The error message would\u0027ve been confusing with both.","commit_id":"f72926619b7ef923b53192e32c39804684d14efe"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"86d9dc9096256a9f8aed796c9871ad6ef288ba85","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    try:"},{"line_number":67,"context_line":"        return LDAP_SCOPES[scope]"},{"line_number":68,"context_line":"    except KeyError:"},{"line_number":69,"context_line":"        raise ValueError(_(\u0027Invalid LDAP scope: %s. Choose one of: \u0027"},{"line_number":70,"context_line":"                           \u0027\"base\", \"one\", and \"sub\".\u0027 % scope))"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2B6hE%3D","line":69,"updated":"2013-02-14 16:58:51.000000000","message":"Make this dynamic to reduce maintenance, \n\n  ... Choose one of: %s\u0027 % \u0027, \u0027.join(LDAP_SCOPES.keys())","commit_id":"bd616f59cd6bad6495dec79cffbc813ab2e53072"},{"author":{"_account_id":2340,"name":"Ionut Artarisi","email":"iartarisi@suse.cz","username":"mapleoin"},"change_message_id":"c28b76eea0cf42719fb0cfb1ca135f12febd3d56","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    try:"},{"line_number":67,"context_line":"        return LDAP_SCOPES[scope]"},{"line_number":68,"context_line":"    except KeyError:"},{"line_number":69,"context_line":"        raise ValueError(_(\u0027Invalid LDAP scope: %s. Choose one of: \u0027"},{"line_number":70,"context_line":"                           \u0027\"base\", \"one\", and \"sub\".\u0027 % scope))"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2B4pA%3D","line":69,"in_reply_to":"AAAAM3%2F%2B6eQ%3D","updated":"2013-02-15 16:17:55.000000000","message":"Done","commit_id":"bd616f59cd6bad6495dec79cffbc813ab2e53072"},{"author":{"_account_id":2340,"name":"Ionut Artarisi","email":"iartarisi@suse.cz","username":"mapleoin"},"change_message_id":"c28b76eea0cf42719fb0cfb1ca135f12febd3d56","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    try:"},{"line_number":67,"context_line":"        return LDAP_SCOPES[scope]"},{"line_number":68,"context_line":"    except KeyError:"},{"line_number":69,"context_line":"        raise ValueError(_(\u0027Invalid LDAP scope: %s. Choose one of: \u0027"},{"line_number":70,"context_line":"                           \u0027\"base\", \"one\", and \"sub\".\u0027 % scope))"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2B4pE%3D","line":69,"in_reply_to":"AAAAM3%2F%2B6hE%3D","updated":"2013-02-15 16:17:55.000000000","message":"Done","commit_id":"bd616f59cd6bad6495dec79cffbc813ab2e53072"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"df63b9668374d532e8fe7b60e39e351467f15ed6","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    try:"},{"line_number":67,"context_line":"        return LDAP_SCOPES[scope]"},{"line_number":68,"context_line":"    except KeyError:"},{"line_number":69,"context_line":"        raise ValueError(_(\u0027Invalid LDAP scope: %s. Choose one of: \u0027"},{"line_number":70,"context_line":"                           \u0027\"base\", \"one\", and \"sub\".\u0027 % scope))"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2B6eQ%3D","line":69,"in_reply_to":"AAAAM3%2F%2B6hE%3D","updated":"2013-02-14 17:42:02.000000000","message":"also, you don\u0027t want the keys translated so they should not be in _()","commit_id":"bd616f59cd6bad6495dec79cffbc813ab2e53072"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"df63b9668374d532e8fe7b60e39e351467f15ed6","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        self.LDAP_USER \u003d conf.ldap.user"},{"line_number":90,"context_line":"        self.LDAP_PASSWORD \u003d conf.ldap.password"},{"line_number":91,"context_line":"        self.LDAP_GET_ONE_SCOPE \u003d ldap_scope(conf.ldap.get_one_scope)"},{"line_number":92,"context_line":"        self.LDAP_GET_ALL_SCOPE \u003d ldap_scope(conf.ldap.get_all_scope)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"        if self.options_name is not None:"},{"line_number":95,"context_line":"            self.suffix \u003d conf.ldap.suffix"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2B6co%3D","line":92,"updated":"2013-02-14 17:42:02.000000000","message":"Will the keystone server fail to start if the string is not valid? Just wondering if it would be better to log a warning and use the default if the string is not valid.","commit_id":"bd616f59cd6bad6495dec79cffbc813ab2e53072"},{"author":{"_account_id":2340,"name":"Ionut Artarisi","email":"iartarisi@suse.cz","username":"mapleoin"},"change_message_id":"c28b76eea0cf42719fb0cfb1ca135f12febd3d56","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        self.LDAP_USER \u003d conf.ldap.user"},{"line_number":90,"context_line":"        self.LDAP_PASSWORD \u003d conf.ldap.password"},{"line_number":91,"context_line":"        self.LDAP_GET_ONE_SCOPE \u003d ldap_scope(conf.ldap.get_one_scope)"},{"line_number":92,"context_line":"        self.LDAP_GET_ALL_SCOPE \u003d ldap_scope(conf.ldap.get_all_scope)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"        if self.options_name is not None:"},{"line_number":95,"context_line":"            self.suffix \u003d conf.ldap.suffix"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2B4rg%3D","line":92,"in_reply_to":"AAAAM3%2F%2B6co%3D","updated":"2013-02-15 16:17:55.000000000","message":"I actually think it\u0027s preferable to fail early than to run with an unexpected value and have a surprise, thinking that you typed subtree (even though the value should\u0027ve been \u0027sub\u0027), but the server complains about onelevel (default) queries.","commit_id":"bd616f59cd6bad6495dec79cffbc813ab2e53072"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"df63b9668374d532e8fe7b60e39e351467f15ed6","unresolved":false,"context_lines":[{"line_number":220,"context_line":"                                           self.object_class)"},{"line_number":221,"context_line":"        try:"},{"line_number":222,"context_line":"            res \u003d conn.search_s(self._id_to_dn(id), self.LDAP_GET_ONE_SCOPE,"},{"line_number":223,"context_line":"                                query, self.attribute_mapping.values())"},{"line_number":224,"context_line":"        except ldap.NO_SUCH_OBJECT:"},{"line_number":225,"context_line":"            return None"},{"line_number":226,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2B6cU%3D","line":223,"updated":"2013-02-14 17:42:02.000000000","message":"I\u0027m not seeing how this is going to work. This function gets an id like 12345678, so it\u0027s going to do a search like (to use the command-line):\n\n ldapsearch -b \"id\u003d12345678,cn\u003dUsers,dc\u003dOpenStack\" \"(objectclass\u003dperson)\"\n\nHow is changing the scope from BASE to ONELEVEL or SUBTREE going to work? The id\u003d12345678,cn\u003dUsers,dc\u003dOpenStack entry still has to exist.","commit_id":"bd616f59cd6bad6495dec79cffbc813ab2e53072"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"df63b9668374d532e8fe7b60e39e351467f15ed6","unresolved":false,"context_lines":[{"line_number":235,"context_line":"                                           self.object_class)"},{"line_number":236,"context_line":"        try:"},{"line_number":237,"context_line":"            return conn.search_s(self.tree_dn, self.LDAP_GET_ALL_SCOPE,"},{"line_number":238,"context_line":"                                 query, self.attribute_mapping.values())"},{"line_number":239,"context_line":"        except ldap.NO_SUCH_OBJECT:"},{"line_number":240,"context_line":"            return []"},{"line_number":241,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2B6cI%3D","line":238,"updated":"2013-02-14 17:42:02.000000000","message":"This one makes a little more sense since it\u0027s not using the user DN. Since the constraint imposed by self._id_to_dn() and _ldap_get() is in place (that the users must be directly under the \u0027users\u0027 entry) then only ONELEVEL is going to work.  \n\nIf I\u0027m incorrect about the constraint that users must be direct children of the users entry, then allowing BASE for this search is useless or dangerous.","commit_id":"bd616f59cd6bad6495dec79cffbc813ab2e53072"},{"author":{"_account_id":2062,"name":"Ralf Haferkamp","email":"rhafer@suse.com","username":"rhafer"},"change_message_id":"66606837b198f173377c559c5e7a5cdc10de85bb","unresolved":false,"context_lines":[{"line_number":150,"context_line":"                self.tree_dn, self.LDAP_SCOPE,"},{"line_number":151,"context_line":"                \u0027(\u0026(%(id_attr)s\u003d%(id)s)(objectclass\u003d%(objclass)s))\u0027 %"},{"line_number":152,"context_line":"                {\u0027id_attr\u0027: self.id_attr,"},{"line_number":153,"context_line":"                 \u0027id\u0027: ldap.dn.escape_dn_chars(str(id)),"},{"line_number":154,"context_line":"                 \u0027objclass\u0027: self.object_class})[0]"},{"line_number":155,"context_line":"        except ValueError, IndexError:"},{"line_number":156,"context_line":"            raise ldap.NO_SUCH_OBJECT"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2B4ik%3D","line":153,"updated":"2013-02-15 16:51:39.000000000","message":"escape_dn_chars() is probably wrong here. Inside LDAP filters there are different escaping rules. Use ldap.filter.escape_filter_chars() instead.","commit_id":"b94919a28663d7775e78f411f4b044a433e5988d"},{"author":{"_account_id":2062,"name":"Ralf Haferkamp","email":"rhafer@suse.com","username":"rhafer"},"change_message_id":"66606837b198f173377c559c5e7a5cdc10de85bb","unresolved":false,"context_lines":[{"line_number":227,"context_line":"                 \u0027%(filter)s\u0027"},{"line_number":228,"context_line":"                 \u0027(objectClass\u003d%(object_class)s))\u0027"},{"line_number":229,"context_line":"                 % {\u0027id_attr\u0027: self.id_attr,"},{"line_number":230,"context_line":"                    \u0027id\u0027: ldap.dn.escape_dn_chars(str(id)),"},{"line_number":231,"context_line":"                    \u0027filter\u0027: (filter or self.filter or \u0027\u0027),"},{"line_number":232,"context_line":"                    \u0027object_class\u0027: self.object_class})"},{"line_number":233,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2B4ic%3D","line":230,"updated":"2013-02-15 16:51:39.000000000","message":"Same here (escape_filter_chars())","commit_id":"b94919a28663d7775e78f411f4b044a433e5988d"}],"keystone/config.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"19b5a13db8e1d4c1ed80635e7c47e5604ba700a1","unresolved":false,"context_lines":[{"line_number":196,"context_line":"register_str(\u0027dumb_member\u0027, group\u003d\u0027ldap\u0027, default\u003d\u0027cn\u003ddumb,dc\u003dnonexistent\u0027)"},{"line_number":197,"context_line":"register_bool(\u0027allow_subtree_delete\u0027, group\u003d\u0027ldap\u0027, default\u003dFalse)"},{"line_number":198,"context_line":"register_int(\u0027get_one_scope\u0027, group\u003d\u0027ldap\u0027, default\u003d0)"},{"line_number":199,"context_line":"register_int(\u0027get_all_scope\u0027, group\u003d\u0027ldap\u0027, default\u003d1)"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"register_str(\u0027user_tree_dn\u0027, group\u003d\u0027ldap\u0027, default\u003dNone)"},{"line_number":202,"context_line":"register_str(\u0027user_filter\u0027, group\u003d\u0027ldap\u0027, default\u003dNone)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FA5E%3D","line":199,"updated":"2013-02-11 17:05:08.000000000","message":"register_bool\u0027s here with corresponding False / True values and then convert to ints in the driver... no need to expose driver implementation details to the user and force ourselves to handle values like -1 and +2","commit_id":"11a46aeebdc54f21a37b3b5394ea256c92c96d98"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"b2550f8bd1311cfcc408d9562a25dbae3f72a53c","unresolved":false,"context_lines":[{"line_number":196,"context_line":"register_str(\u0027dumb_member\u0027, group\u003d\u0027ldap\u0027, default\u003d\u0027cn\u003ddumb,dc\u003dnonexistent\u0027)"},{"line_number":197,"context_line":"register_bool(\u0027allow_subtree_delete\u0027, group\u003d\u0027ldap\u0027, default\u003dFalse)"},{"line_number":198,"context_line":"register_int(\u0027get_one_scope\u0027, group\u003d\u0027ldap\u0027, default\u003d0)"},{"line_number":199,"context_line":"register_int(\u0027get_all_scope\u0027, group\u003d\u0027ldap\u0027, default\u003d1)"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"register_str(\u0027user_tree_dn\u0027, group\u003d\u0027ldap\u0027, default\u003dNone)"},{"line_number":202,"context_line":"register_str(\u0027user_filter\u0027, group\u003d\u0027ldap\u0027, default\u003dNone)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FAw8%3D","line":199,"in_reply_to":"AAAAM3%2F%2FA3s%3D","updated":"2013-02-11 18:00:32.000000000","message":"Thanks for the clarification. I imagine that it would be easier to read \u0026 manage a configuration file it supported an enumeration. For example,\n\n  get_one_scope \u003d subtree\n\nmakes a lot more sense than:\n\n  get_one_scope \u003d 2","commit_id":"11a46aeebdc54f21a37b3b5394ea256c92c96d98"},{"author":{"_account_id":2340,"name":"Ionut Artarisi","email":"iartarisi@suse.cz","username":"mapleoin"},"change_message_id":"984fba9e44cb54f2a8340405aaaa8fddc35b9f07","unresolved":false,"context_lines":[{"line_number":196,"context_line":"register_str(\u0027dumb_member\u0027, group\u003d\u0027ldap\u0027, default\u003d\u0027cn\u003ddumb,dc\u003dnonexistent\u0027)"},{"line_number":197,"context_line":"register_bool(\u0027allow_subtree_delete\u0027, group\u003d\u0027ldap\u0027, default\u003dFalse)"},{"line_number":198,"context_line":"register_int(\u0027get_one_scope\u0027, group\u003d\u0027ldap\u0027, default\u003d0)"},{"line_number":199,"context_line":"register_int(\u0027get_all_scope\u0027, group\u003d\u0027ldap\u0027, default\u003d1)"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"register_str(\u0027user_tree_dn\u0027, group\u003d\u0027ldap\u0027, default\u003dNone)"},{"line_number":202,"context_line":"register_str(\u0027user_filter\u0027, group\u003d\u0027ldap\u0027, default\u003dNone)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FA3s%3D","line":199,"in_reply_to":"AAAAM3%2F%2FA5E%3D","updated":"2013-02-11 17:16:21.000000000","message":"Unfortunately it\u0027s not that easy; there are 3 possible values for these fields: 0, 1, 2 (i.e. BASE, ONELEVEL and SUBTREE). [1]\n\nI agree about exposing implementation details though. \n\nDo you think implementing something like register_enum would be a good idea? Or just using some predefined strings like \u0027base\u0027, \u0027onelevel\u0027 and \u0027subtree\u0027 and then checking them in BaseLdap\u0027s constructor?\n\n[1] http://www.python-ldap.org/doc/html/ldapurl.html?highlight\u003dscope#constants","commit_id":"11a46aeebdc54f21a37b3b5394ea256c92c96d98"},{"author":{"_account_id":2340,"name":"Ionut Artarisi","email":"iartarisi@suse.cz","username":"mapleoin"},"change_message_id":"5090ded25762dc6f0dadfad3ab9158b1e4400702","unresolved":false,"context_lines":[{"line_number":196,"context_line":"register_str(\u0027dumb_member\u0027, group\u003d\u0027ldap\u0027, default\u003d\u0027cn\u003ddumb,dc\u003dnonexistent\u0027)"},{"line_number":197,"context_line":"register_bool(\u0027allow_subtree_delete\u0027, group\u003d\u0027ldap\u0027, default\u003dFalse)"},{"line_number":198,"context_line":"register_int(\u0027get_one_scope\u0027, group\u003d\u0027ldap\u0027, default\u003d0)"},{"line_number":199,"context_line":"register_int(\u0027get_all_scope\u0027, group\u003d\u0027ldap\u0027, default\u003d1)"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"register_str(\u0027user_tree_dn\u0027, group\u003d\u0027ldap\u0027, default\u003dNone)"},{"line_number":202,"context_line":"register_str(\u0027user_filter\u0027, group\u003d\u0027ldap\u0027, default\u003dNone)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2B%2B9A%3D","line":199,"in_reply_to":"AAAAM3%2F%2FAw8%3D","updated":"2013-02-12 15:18:01.000000000","message":"I\u0027ve changed these to be strings and added the validation logic to BaseLdap for now. \n\nI\u0027ve opened a bug on oslo to hopefully get value restrictions on config options: https://bugs.launchpad.net/oslo/+bug/1123043 Maybe I\u0027ll have time for it later this week, but it also needs some other opinions I guess.","commit_id":"11a46aeebdc54f21a37b3b5394ea256c92c96d98"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"86d9dc9096256a9f8aed796c9871ad6ef288ba85","unresolved":false,"context_lines":[{"line_number":248,"context_line":"register_str(\u0027dumb_member\u0027, group\u003d\u0027ldap\u0027, default\u003d\u0027cn\u003ddumb,dc\u003dnonexistent\u0027)"},{"line_number":249,"context_line":"register_bool(\u0027allow_subtree_delete\u0027, group\u003d\u0027ldap\u0027, default\u003dFalse)"},{"line_number":250,"context_line":"register_str(\u0027get_one_scope\u0027, group\u003d\u0027ldap\u0027, default\u003d\u0027base\u0027)"},{"line_number":251,"context_line":"register_str(\u0027get_all_scope\u0027, group\u003d\u0027ldap\u0027, default\u003d\u0027one\u0027)"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"register_str(\u0027user_tree_dn\u0027, group\u003d\u0027ldap\u0027, default\u003dNone)"},{"line_number":254,"context_line":"register_str(\u0027user_filter\u0027, group\u003d\u0027ldap\u0027, default\u003dNone)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2B6gk%3D","line":251,"updated":"2013-02-14 16:58:51.000000000","message":"aww, I thought you meant oslo supported something like register_enum_str() or something, which i was excited about :P\n\nWith the validation in the driver, I think this is perfectly sufficient, though.","commit_id":"bd616f59cd6bad6495dec79cffbc813ab2e53072"},{"author":{"_account_id":6460,"name":"Brad Topol","email":"btopol@us.ibm.com","username":"btopol"},"change_message_id":"675f1b8a3f603228d6e2104f90ed0a100ee2f069","unresolved":false,"context_lines":[{"line_number":245,"context_line":"register_bool(\u0027use_dumb_member\u0027, group\u003d\u0027ldap\u0027, default\u003dFalse)"},{"line_number":246,"context_line":"register_str(\u0027dumb_member\u0027, group\u003d\u0027ldap\u0027, default\u003d\u0027cn\u003ddumb,dc\u003dnonexistent\u0027)"},{"line_number":247,"context_line":"register_bool(\u0027allow_subtree_delete\u0027, group\u003d\u0027ldap\u0027, default\u003dFalse)"},{"line_number":248,"context_line":"register_str(\u0027query_scope\u0027, group\u003d\u0027ldap\u0027, default\u003d\u0027one\u0027)"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"register_str(\u0027user_tree_dn\u0027, group\u003d\u0027ldap\u0027, default\u003dNone)"},{"line_number":251,"context_line":"register_str(\u0027user_filter\u0027, group\u003d\u0027ldap\u0027, default\u003dNone)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2BzuM%3D","line":248,"updated":"2013-02-18 20:50:57.000000000","message":"Shouldn\u0027t the default be sub and then folks need to explicitly set the value to one when they want to optimize?  That way folks aren\u0027t surprised when a search just goes one level?","commit_id":"159ffe48e986e524f5930ad41d376bdce2b6a07e"},{"author":{"_account_id":2340,"name":"Ionut Artarisi","email":"iartarisi@suse.cz","username":"mapleoin"},"change_message_id":"dbaac39e4c306f47497de59d6211fe15b3e8dd3e","unresolved":false,"context_lines":[{"line_number":245,"context_line":"register_bool(\u0027use_dumb_member\u0027, group\u003d\u0027ldap\u0027, default\u003dFalse)"},{"line_number":246,"context_line":"register_str(\u0027dumb_member\u0027, group\u003d\u0027ldap\u0027, default\u003d\u0027cn\u003ddumb,dc\u003dnonexistent\u0027)"},{"line_number":247,"context_line":"register_bool(\u0027allow_subtree_delete\u0027, group\u003d\u0027ldap\u0027, default\u003dFalse)"},{"line_number":248,"context_line":"register_str(\u0027query_scope\u0027, group\u003d\u0027ldap\u0027, default\u003d\u0027one\u0027)"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"register_str(\u0027user_tree_dn\u0027, group\u003d\u0027ldap\u0027, default\u003dNone)"},{"line_number":251,"context_line":"register_str(\u0027user_filter\u0027, group\u003d\u0027ldap\u0027, default\u003dNone)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2BySs%3D","line":248,"in_reply_to":"AAAAM3%2F%2BzuM%3D","updated":"2013-02-19 09:14:43.000000000","message":"I\u0027d like to keep the default to \u0027one\u0027 because this is the current behaviour of keystone. You can see the hardcoded default ONELEVEL scope in the diff to core.py.","commit_id":"159ffe48e986e524f5930ad41d376bdce2b6a07e"},{"author":{"_account_id":6460,"name":"Brad Topol","email":"btopol@us.ibm.com","username":"btopol"},"change_message_id":"e700bfc1ba1e4d4744cf0a232a1f059b0fef4812","unresolved":false,"context_lines":[{"line_number":246,"context_line":"register_str(\u0027dumb_member\u0027, group\u003d\u0027ldap\u0027, default\u003d\u0027cn\u003ddumb,dc\u003dnonexistent\u0027)"},{"line_number":247,"context_line":"register_bool(\u0027allow_subtree_delete\u0027, group\u003d\u0027ldap\u0027, default\u003dFalse)"},{"line_number":248,"context_line":"register_str(\u0027query_scope\u0027, group\u003d\u0027ldap\u0027, default\u003d\u0027one\u0027)"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"register_str(\u0027user_tree_dn\u0027, group\u003d\u0027ldap\u0027, default\u003dNone)"},{"line_number":251,"context_line":"register_str(\u0027user_filter\u0027, group\u003d\u0027ldap\u0027, default\u003dNone)"},{"line_number":252,"context_line":"register_str(\u0027user_objectclass\u0027, group\u003d\u0027ldap\u0027, default\u003d\u0027inetOrgPerson\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAM3%2F%2Bxxw%3D","line":249,"updated":"2013-02-19 14:10:03.000000000","message":"OK","commit_id":"159ffe48e986e524f5930ad41d376bdce2b6a07e"}],"tests/test_backend_ldap.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"19b5a13db8e1d4c1ed80635e7c47e5604ba700a1","unresolved":false,"context_lines":[{"line_number":399,"context_line":"    def test_configurable_ldap_get(self):"},{"line_number":400,"context_line":"        self.config([test.etcdir(\u0027keystone.conf.sample\u0027),"},{"line_number":401,"context_line":"                     test.testsdir(\u0027test_overrides.conf\u0027),"},{"line_number":402,"context_line":"                     test.testsdir(\u0027backend_ldap.conf\u0027)])"},{"line_number":403,"context_line":"        CONF.ldap.get_one_scope \u003d 42"},{"line_number":404,"context_line":"        self.identity_api \u003d identity_ldap.Identity()"},{"line_number":405,"context_line":"        user \u003d self.identity_api.user"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FA48%3D","line":402,"updated":"2013-02-11 17:05:08.000000000","message":"remove the calls to self.config(); they\u0027re all being removed in another patch","commit_id":"11a46aeebdc54f21a37b3b5394ea256c92c96d98"},{"author":{"_account_id":2340,"name":"Ionut Artarisi","email":"iartarisi@suse.cz","username":"mapleoin"},"change_message_id":"5090ded25762dc6f0dadfad3ab9158b1e4400702","unresolved":false,"context_lines":[{"line_number":399,"context_line":"    def test_configurable_ldap_get(self):"},{"line_number":400,"context_line":"        self.config([test.etcdir(\u0027keystone.conf.sample\u0027),"},{"line_number":401,"context_line":"                     test.testsdir(\u0027test_overrides.conf\u0027),"},{"line_number":402,"context_line":"                     test.testsdir(\u0027backend_ldap.conf\u0027)])"},{"line_number":403,"context_line":"        CONF.ldap.get_one_scope \u003d 42"},{"line_number":404,"context_line":"        self.identity_api \u003d identity_ldap.Identity()"},{"line_number":405,"context_line":"        user \u003d self.identity_api.user"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2B%2B9s%3D","line":402,"in_reply_to":"AAAAM3%2F%2FA48%3D","updated":"2013-02-12 15:18:01.000000000","message":"Done","commit_id":"11a46aeebdc54f21a37b3b5394ea256c92c96d98"},{"author":{"_account_id":2340,"name":"Ionut Artarisi","email":"iartarisi@suse.cz","username":"mapleoin"},"change_message_id":"984fba9e44cb54f2a8340405aaaa8fddc35b9f07","unresolved":false,"context_lines":[{"line_number":399,"context_line":"    def test_configurable_ldap_get(self):"},{"line_number":400,"context_line":"        self.config([test.etcdir(\u0027keystone.conf.sample\u0027),"},{"line_number":401,"context_line":"                     test.testsdir(\u0027test_overrides.conf\u0027),"},{"line_number":402,"context_line":"                     test.testsdir(\u0027backend_ldap.conf\u0027)])"},{"line_number":403,"context_line":"        CONF.ldap.get_one_scope \u003d 42"},{"line_number":404,"context_line":"        self.identity_api \u003d identity_ldap.Identity()"},{"line_number":405,"context_line":"        user \u003d self.identity_api.user"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FA3o%3D","line":402,"in_reply_to":"AAAAM3%2F%2FA48%3D","updated":"2013-02-11 17:16:21.000000000","message":"thanks for reminding me of that. The other patch is actually mine as well :)","commit_id":"11a46aeebdc54f21a37b3b5394ea256c92c96d98"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"19b5a13db8e1d4c1ed80635e7c47e5604ba700a1","unresolved":false,"context_lines":[{"line_number":415,"context_line":"        user._ldap_res_to_model(True)"},{"line_number":416,"context_line":"        self.mox.ReplayAll()"},{"line_number":417,"context_line":""},{"line_number":418,"context_line":"        user.get(\u0027user_id\u0027)"},{"line_number":419,"context_line":"        "},{"line_number":420,"context_line":"    def test_configurable_ldap_get_all(self):"},{"line_number":421,"context_line":"        self.config([test.etcdir(\u0027keystone.conf.sample\u0027),"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2FA40%3D","line":418,"updated":"2013-02-11 17:05:08.000000000","message":"can you assert anything about the response?","commit_id":"11a46aeebdc54f21a37b3b5394ea256c92c96d98"},{"author":{"_account_id":2340,"name":"Ionut Artarisi","email":"iartarisi@suse.cz","username":"mapleoin"},"change_message_id":"5090ded25762dc6f0dadfad3ab9158b1e4400702","unresolved":false,"context_lines":[{"line_number":415,"context_line":"        user._ldap_res_to_model(True)"},{"line_number":416,"context_line":"        self.mox.ReplayAll()"},{"line_number":417,"context_line":""},{"line_number":418,"context_line":"        user.get(\u0027user_id\u0027)"},{"line_number":419,"context_line":"        "},{"line_number":420,"context_line":"    def test_configurable_ldap_get_all(self):"},{"line_number":421,"context_line":"        self.config([test.etcdir(\u0027keystone.conf.sample\u0027),"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2B%2B9w%3D","line":418,"in_reply_to":"AAAAM3%2F%2FA40%3D","updated":"2013-02-12 15:18:01.000000000","message":"Done","commit_id":"11a46aeebdc54f21a37b3b5394ea256c92c96d98"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"86d9dc9096256a9f8aed796c9871ad6ef288ba85","unresolved":false,"context_lines":[{"line_number":414,"context_line":"        user_api.get_connection(user\u003dNone, password\u003dNone)"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    def test_wrong_ldap_scope(self):"},{"line_number":417,"context_line":"        CONF.ldap.get_one_scope \u003d \u0027invalid\u0027"},{"line_number":418,"context_line":"        self.assertRaisesRegexp(ValueError, \u0027Invalid LDAP scope: invalid. *\u0027,"},{"line_number":419,"context_line":"                                identity_ldap.Identity)"},{"line_number":420,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2B6gU%3D","line":417,"updated":"2013-02-14 16:58:51.000000000","message":"use uuid.uuid4().hex to illustrate that it\u0027s an arbitrary value","commit_id":"bd616f59cd6bad6495dec79cffbc813ab2e53072"},{"author":{"_account_id":2340,"name":"Ionut Artarisi","email":"iartarisi@suse.cz","username":"mapleoin"},"change_message_id":"c28b76eea0cf42719fb0cfb1ca135f12febd3d56","unresolved":false,"context_lines":[{"line_number":414,"context_line":"        user_api.get_connection(user\u003dNone, password\u003dNone)"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    def test_wrong_ldap_scope(self):"},{"line_number":417,"context_line":"        CONF.ldap.get_one_scope \u003d \u0027invalid\u0027"},{"line_number":418,"context_line":"        self.assertRaisesRegexp(ValueError, \u0027Invalid LDAP scope: invalid. *\u0027,"},{"line_number":419,"context_line":"                                identity_ldap.Identity)"},{"line_number":420,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2B4o4%3D","line":417,"in_reply_to":"AAAAM3%2F%2B6gU%3D","updated":"2013-02-15 16:17:55.000000000","message":"Done","commit_id":"bd616f59cd6bad6495dec79cffbc813ab2e53072"}]}
