)]}'
{"auth/__init__.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"03754e08169728584c5fe4e340d907a72d624a2d","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":15,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":16,"context_line":"#    under the License."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"\"\"\""},{"line_number":19,"context_line":"This auth module is intended to allow Openstack client-tools to select from a"},{"line_number":20,"context_line":"variety of authentication strategies, including NoAuth (the default), and"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACH%2F%2F%2B9Y%3D","line":17,"updated":"2011-08-26 16:13:45.000000000","message":"This code looks great, but is there a reason this is not in the glance/ directory and module structure? I think this should be /glance/auth.py, at least until an openstack-common/skeleton project more mature?","commit_id":"e08fd8a596dc2737bb3b7fa84bb49d9cc8b23f0a"},{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"ac1cdaa168b5b6ab2ad3990883beae959ee17fa9","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":15,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":16,"context_line":"#    under the License."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"\"\"\""},{"line_number":19,"context_line":"This auth module is intended to allow Openstack client-tools to select from a"},{"line_number":20,"context_line":"variety of authentication strategies, including NoAuth (the default), and"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACH%2F%2F%2B8s%3D","line":17,"in_reply_to":"AAAACH%2F%2F%2B9Y%3D","updated":"2011-08-26 16:36:23.000000000","message":"The idea with having it outside of Glance was:\n\n1. This eventually should live on its own as a separate component that python-novaclient, glance, and future projects should share.\n\n2. Having it outside of the `glance` module, would enforce that fact, preventing any subtle dependencies from creeping in.\n\nI would prefer to keep it as a separate module to retain the enforced separation, but if you feel strongly about this, of course, I\u0027d be happy to move under glance.","commit_id":"e08fd8a596dc2737bb3b7fa84bb49d9cc8b23f0a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"03754e08169728584c5fe4e340d907a72d624a2d","unresolved":false,"context_lines":[{"line_number":35,"context_line":"import urlparse"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"class AuthorizationFailure(Exception):"},{"line_number":39,"context_line":"    pass"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACH%2F%2F%2B9I%3D","line":38,"updated":"2011-08-26 16:13:45.000000000","message":"Can we put these in glance.common.exception?","commit_id":"e08fd8a596dc2737bb3b7fa84bb49d9cc8b23f0a"},{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"ac1cdaa168b5b6ab2ad3990883beae959ee17fa9","unresolved":false,"context_lines":[{"line_number":35,"context_line":"import urlparse"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"class AuthorizationFailure(Exception):"},{"line_number":39,"context_line":"    pass"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACH%2F%2F%2B8o%3D","line":38,"in_reply_to":"AAAACH%2F%2F%2B9I%3D","updated":"2011-08-26 16:36:23.000000000","message":"Again, I didn\u0027t want any dependencies on a separate module. The hope here is that this get\u0027s extracted into a separate module and is pip-required into both glance and novaclient.","commit_id":"e08fd8a596dc2737bb3b7fa84bb49d9cc8b23f0a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"03754e08169728584c5fe4e340d907a72d624a2d","unresolved":false,"context_lines":[{"line_number":125,"context_line":"                break"},{"line_number":126,"context_line":"        else:"},{"line_number":127,"context_line":"            # Guard against a redirection loop"},{"line_number":128,"context_line":"            raise Exception(\"Exceeded max redirects %s\" % MAX_REDIRECTS)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def _v1_auth(self, token_url):"},{"line_number":131,"context_line":"        creds \u003d self.creds"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACH%2F%2F%2B9M%3D","line":128,"updated":"2011-08-26 16:13:45.000000000","message":"i18n strings","commit_id":"e08fd8a596dc2737bb3b7fa84bb49d9cc8b23f0a"},{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"ac1cdaa168b5b6ab2ad3990883beae959ee17fa9","unresolved":false,"context_lines":[{"line_number":125,"context_line":"                break"},{"line_number":126,"context_line":"        else:"},{"line_number":127,"context_line":"            # Guard against a redirection loop"},{"line_number":128,"context_line":"            raise Exception(\"Exceeded max redirects %s\" % MAX_REDIRECTS)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def _v1_auth(self, token_url):"},{"line_number":131,"context_line":"        creds \u003d self.creds"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACH%2F%2F%2B8k%3D","line":128,"in_reply_to":"AAAACH%2F%2F%2B9M%3D","updated":"2011-08-26 16:36:23.000000000","message":"D\u0027oh","commit_id":"e08fd8a596dc2737bb3b7fa84bb49d9cc8b23f0a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"03754e08169728584c5fe4e340d907a72d624a2d","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        elif resp.status \u003d\u003d 305:"},{"line_number":182,"context_line":"            raise RedirectException(resp[\u0027location\u0027])"},{"line_number":183,"context_line":"        else:"},{"line_number":184,"context_line":"            raise Exception(\u0027Unexpected response: %s\u0027 % resp.status)"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"    @property"},{"line_number":187,"context_line":"    def is_authenticated(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACH%2F%2F%2B9U%3D","line":184,"updated":"2011-08-26 16:13:45.000000000","message":"i18n strings","commit_id":"e08fd8a596dc2737bb3b7fa84bb49d9cc8b23f0a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"03754e08169728584c5fe4e340d907a72d624a2d","unresolved":false,"context_lines":[{"line_number":203,"context_line":"    elif strategy \u003d\u003d \u0027keystone\u0027:"},{"line_number":204,"context_line":"        return KeystoneStrategy"},{"line_number":205,"context_line":"    else:"},{"line_number":206,"context_line":"        raise Exception(\"Unknown auth strategy \u0027%s\u0027\" % strategy)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACH%2F%2F%2B9Q%3D","line":206,"updated":"2011-08-26 16:13:45.000000000","message":"i18n strings","commit_id":"e08fd8a596dc2737bb3b7fa84bb49d9cc8b23f0a"}],"bin/glance":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"03754e08169728584c5fe4e340d907a72d624a2d","unresolved":false,"context_lines":[{"line_number":61,"context_line":"                return SUCCESS if ret is None else ret"},{"line_number":62,"context_line":"            except Exception, e:"},{"line_number":63,"context_line":"                options \u003d args[0]"},{"line_number":64,"context_line":"                if options.debug:"},{"line_number":65,"context_line":"                    raise"},{"line_number":66,"context_line":"                print \"Failed to %s. Got error:\" % action"},{"line_number":67,"context_line":"                pieces \u003d unicode(e).split(\u0027\\n\u0027)"}],"source_content_type":"application/octet-stream","patch_set":2,"id":"AAAACH%2F%2F%2B9A%3D","line":64,"updated":"2011-08-26 16:13:45.000000000","message":"I don\u0027t understand the need for this...","commit_id":"e08fd8a596dc2737bb3b7fa84bb49d9cc8b23f0a"},{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"ac1cdaa168b5b6ab2ad3990883beae959ee17fa9","unresolved":false,"context_lines":[{"line_number":61,"context_line":"                return SUCCESS if ret is None else ret"},{"line_number":62,"context_line":"            except Exception, e:"},{"line_number":63,"context_line":"                options \u003d args[0]"},{"line_number":64,"context_line":"                if options.debug:"},{"line_number":65,"context_line":"                    raise"},{"line_number":66,"context_line":"                print \"Failed to %s. Got error:\" % action"},{"line_number":67,"context_line":"                pieces \u003d unicode(e).split(\u0027\\n\u0027)"}],"source_content_type":"application/octet-stream","patch_set":2,"id":"AAAACH%2F%2F%2B8g%3D","line":64,"in_reply_to":"AAAACH%2F%2F%2B9A%3D","updated":"2011-08-26 16:36:23.000000000","message":"@catch_error hides the traceback from us which was really annoying while trying to debug this. So, I added a --debug mode which showed the original traceback.","commit_id":"e08fd8a596dc2737bb3b7fa84bb49d9cc8b23f0a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"03754e08169728584c5fe4e340d907a72d624a2d","unresolved":false,"context_lines":[{"line_number":973,"context_line":"                 password\u003dos.getenv(\u0027NOVA_API_KEY\u0027),"},{"line_number":974,"context_line":"                 tenant_id\u003dos.getenv(\u0027NOVA_PROJECT_ID\u0027),"},{"line_number":975,"context_line":"                 auth_url\u003dos.getenv(\u0027NOVA_URL\u0027),"},{"line_number":976,"context_line":"                 strategy\u003dos.getenv(\u0027NOVA_AUTH_STRATEGY\u0027, \u0027noauth\u0027))"},{"line_number":977,"context_line":""},{"line_number":978,"context_line":"    return glance_client.Client(host\u003doptions.host, port\u003doptions.port,"},{"line_number":979,"context_line":"                                auth_tok\u003doptions.auth_token, creds\u003dcreds)"}],"source_content_type":"application/octet-stream","patch_set":2,"id":"AAAACH%2F%2F%2B9E%3D","line":976,"updated":"2011-08-26 16:13:45.000000000","message":"Hmm, I\u0027m not comfortable with the Nova-ness of the above. While it\u0027s technically not adding a dependency on Nova, it smells too much like tight coupling with Nova, which we\u0027ve always tried to avoid.\n\nInstead of NOVA_ or GLANCE_, what about using:\n\nOS_AUTH_USER\n\nOS_AUTH_KEY\n\nOS_AUTH_TENANT\n\nOS_AUTH_URL\n\nOS_AUTH_STRATEGY\n\nAnd novarc could have a simple addition that maps NOVA_API_KEY \u003d\u003e OS_AUTH_KEY, NOVA_PROJECT_ID \u003d\u003e OS_AUTH_TENANT, etc","commit_id":"e08fd8a596dc2737bb3b7fa84bb49d9cc8b23f0a"},{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"ac1cdaa168b5b6ab2ad3990883beae959ee17fa9","unresolved":false,"context_lines":[{"line_number":973,"context_line":"                 password\u003dos.getenv(\u0027NOVA_API_KEY\u0027),"},{"line_number":974,"context_line":"                 tenant_id\u003dos.getenv(\u0027NOVA_PROJECT_ID\u0027),"},{"line_number":975,"context_line":"                 auth_url\u003dos.getenv(\u0027NOVA_URL\u0027),"},{"line_number":976,"context_line":"                 strategy\u003dos.getenv(\u0027NOVA_AUTH_STRATEGY\u0027, \u0027noauth\u0027))"},{"line_number":977,"context_line":""},{"line_number":978,"context_line":"    return glance_client.Client(host\u003doptions.host, port\u003doptions.port,"},{"line_number":979,"context_line":"                                auth_tok\u003doptions.auth_token, creds\u003dcreds)"}],"source_content_type":"application/octet-stream","patch_set":2,"id":"AAAACH%2F%2F%2B8c%3D","line":976,"in_reply_to":"AAAACH%2F%2F%2B9E%3D","updated":"2011-08-26 16:36:23.000000000","message":"Yeah, jk0 went back and forth on this...\n\nThe idea w/ above is that we didn\u0027t want people to have to make serious novarc changes, or, worse, maintain a parallel glancerc file.\n\nYour suggestion seems pretty reasonable, though.","commit_id":"e08fd8a596dc2737bb3b7fa84bb49d9cc8b23f0a"}],"glance/common/auth.py":[{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"7bfc3744da68087e4ff4abb814e0567054dfeef8","unresolved":false,"context_lines":[{"line_number":82,"context_line":"           case, we rewrite the url to contain /v2.0/ and retry using the v2"},{"line_number":83,"context_line":"           protocol."},{"line_number":84,"context_line":"        \"\"\""},{"line_number":85,"context_line":"        def _authenticate(auth_url):"},{"line_number":86,"context_line":"            token_url \u003d urlparse.urljoin(auth_url, \"tokens\")"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"            # 1. Check Keystone version"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAACH%2F%2F%2Bxs%3D","line":85,"updated":"2011-08-31 00:28:46.000000000","message":"Can you break this out of \u0027authenticate\u0027? I find it really cuts down on readability when functions are embedded like this.","commit_id":"371775d64130e78f98d0fc3318416f6f487b5e47"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"4ba6c47b69799dcc10bf6a20c2e6a21a1a64fa9f","unresolved":false,"context_lines":[{"line_number":82,"context_line":"           case, we rewrite the url to contain /v2.0/ and retry using the v2"},{"line_number":83,"context_line":"           protocol."},{"line_number":84,"context_line":"        \"\"\""},{"line_number":85,"context_line":"        def _authenticate(auth_url):"},{"line_number":86,"context_line":"            token_url \u003d urlparse.urljoin(auth_url, \"tokens\")"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"            # 1. Check Keystone version"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAACH%2F%2F%2Bvg%3D","line":85,"in_reply_to":"AAAACH%2F%2F%2Bvw%3D","updated":"2011-08-31 16:59:25.000000000","message":"Ok, sounds like you feel pretty strongly about this. I\u0027m fine with it based on your reasoning.","commit_id":"371775d64130e78f98d0fc3318416f6f487b5e47"},{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"6bf2d974bdaa0724fd96abce0b9a3862f7847c2e","unresolved":false,"context_lines":[{"line_number":82,"context_line":"           case, we rewrite the url to contain /v2.0/ and retry using the v2"},{"line_number":83,"context_line":"           protocol."},{"line_number":84,"context_line":"        \"\"\""},{"line_number":85,"context_line":"        def _authenticate(auth_url):"},{"line_number":86,"context_line":"            token_url \u003d urlparse.urljoin(auth_url, \"tokens\")"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"            # 1. Check Keystone version"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAACH%2F%2F%2Bvw%3D","line":85,"in_reply_to":"AAAACH%2F%2F%2Bxs%3D","updated":"2011-08-31 16:21:24.000000000","message":"Disagree here; IMHO embedding functions is idiomatic. The benefits are:\n\n1. Makes very clear this is intended to be call here and *only* here.\n\n2. Makes clear that this function is performing a small amount of  work (acting as a helper), rather than a top-level method which may do much more.\n\n3. Forms a closure, allowing you to access variables from the outer-scoped methods, making some things much cleaner to express.\n\nAnother thing I like about it in this particular case, is it groups the 3 (small) steps into a single method which matches the comment well. It\u0027s very easy to see at a glance where each of the 3 scenarios fits in.","commit_id":"371775d64130e78f98d0fc3318416f6f487b5e47"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"7bfc3744da68087e4ff4abb814e0567054dfeef8","unresolved":false,"context_lines":[{"line_number":108,"context_line":"                # 3. In some configurations nova makes redirection to"},{"line_number":109,"context_line":"                # v2.0 keystone endpoint. Also, new location does not"},{"line_number":110,"context_line":"                # contain real endpoint, only hostname and port."},{"line_number":111,"context_line":"                v2_is_missing \u003d auth_url.find(\u0027v2.0\u0027) \u003c 0"},{"line_number":112,"context_line":"                if v2_is_missing:"},{"line_number":113,"context_line":"                    auth_url \u003d urlparse.urljoin(auth_url, \u0027v2.0/\u0027)"},{"line_number":114,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAACH%2F%2F%2Bxo%3D","line":111,"updated":"2011-08-31 00:28:46.000000000","message":"This seems like a convoluted way to say \"\u0027v2.0\u0027 not in auth_url\". Why not just combine this line and the one below?","commit_id":"371775d64130e78f98d0fc3318416f6f487b5e47"},{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"6bf2d974bdaa0724fd96abce0b9a3862f7847c2e","unresolved":false,"context_lines":[{"line_number":108,"context_line":"                # 3. In some configurations nova makes redirection to"},{"line_number":109,"context_line":"                # v2.0 keystone endpoint. Also, new location does not"},{"line_number":110,"context_line":"                # contain real endpoint, only hostname and port."},{"line_number":111,"context_line":"                v2_is_missing \u003d auth_url.find(\u0027v2.0\u0027) \u003c 0"},{"line_number":112,"context_line":"                if v2_is_missing:"},{"line_number":113,"context_line":"                    auth_url \u003d urlparse.urljoin(auth_url, \u0027v2.0/\u0027)"},{"line_number":114,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAACH%2F%2F%2Bvs%3D","line":111,"in_reply_to":"AAAACH%2F%2F%2Bxo%3D","updated":"2011-08-31 16:21:24.000000000","message":"That works as well.","commit_id":"371775d64130e78f98d0fc3318416f6f487b5e47"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"7bfc3744da68087e4ff4abb814e0567054dfeef8","unresolved":false,"context_lines":[{"line_number":185,"context_line":"        return self.auth_token is not None"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    @staticmethod"},{"line_number":188,"context_line":"    def _do_request(url, method, headers\u003dNone, body\u003dNone):"},{"line_number":189,"context_line":"        headers \u003d headers or {}"},{"line_number":190,"context_line":"        conn \u003d httplib2.Http()"},{"line_number":191,"context_line":"        conn.force_exception_to_status_code \u003d True"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAACH%2F%2F%2Bxk%3D","line":188,"updated":"2011-08-31 00:28:46.000000000","message":"This looks like its duplicated from the base http client. Any way to utilize what we already have?","commit_id":"371775d64130e78f98d0fc3318416f6f487b5e47"},{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"6bf2d974bdaa0724fd96abce0b9a3862f7847c2e","unresolved":false,"context_lines":[{"line_number":188,"context_line":"    def _do_request(url, method, headers\u003dNone, body\u003dNone):"},{"line_number":189,"context_line":"        headers \u003d headers or {}"},{"line_number":190,"context_line":"        conn \u003d httplib2.Http()"},{"line_number":191,"context_line":"        conn.force_exception_to_status_code \u003d True"},{"line_number":192,"context_line":"        headers[\u0027User-Agent\u0027] \u003d \u0027glance-client\u0027"},{"line_number":193,"context_line":"        resp, resp_body \u003d conn.request(url, method, headers\u003dheaders, body\u003dbody)"},{"line_number":194,"context_line":"        return resp, resp_body"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAACH%2F%2F%2Bvo%3D","line":191,"updated":"2011-08-31 16:21:24.000000000","message":"The advantage of using httplib2 here (a dependency we already have), is that it can accept a url directly w/o having to parse out the host and port , connecting, then parse out the path, make a request to that path, etc.\n\nMy feeling here is, if it makes things dramatically simpler (e.g. a one-liner), then it\u0027s okay to choose a slightly different approach then one we\u0027re already using.","commit_id":"371775d64130e78f98d0fc3318416f6f487b5e47"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"4ba6c47b69799dcc10bf6a20c2e6a21a1a64fa9f","unresolved":false,"context_lines":[{"line_number":188,"context_line":"    def _do_request(url, method, headers\u003dNone, body\u003dNone):"},{"line_number":189,"context_line":"        headers \u003d headers or {}"},{"line_number":190,"context_line":"        conn \u003d httplib2.Http()"},{"line_number":191,"context_line":"        conn.force_exception_to_status_code \u003d True"},{"line_number":192,"context_line":"        headers[\u0027User-Agent\u0027] \u003d \u0027glance-client\u0027"},{"line_number":193,"context_line":"        resp, resp_body \u003d conn.request(url, method, headers\u003dheaders, body\u003dbody)"},{"line_number":194,"context_line":"        return resp, resp_body"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAACH%2F%2F%2Bvc%3D","line":191,"in_reply_to":"AAAACH%2F%2F%2Bvo%3D","updated":"2011-08-31 16:59:25.000000000","message":"Yeah, this is much simpler than the implementation in common.client.BaseClient. I\u0027m fine with it.","commit_id":"371775d64130e78f98d0fc3318416f6f487b5e47"}],"glance/common/auth/__init__.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"81e697d865814fa6337793df737aba00865fe6f5","unresolved":false,"context_lines":[{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        tenant \u003d creds.get(\u0027tenant\u0027)"},{"line_number":131,"context_line":"        if tenant:"},{"line_number":132,"context_line":"            headers[\u0027X-Auth-Project-Id\u0027] \u003d tenant"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        resp, resp_body \u003d self._do_request(token_url, \u0027GET\u0027, headers\u003dheaders)"},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAACH%2F%2F%2B6U%3D","line":132,"updated":"2011-08-26 23:14:31.000000000","message":"I think this should be X-Auth-Tenant instead of X-Auth-Project-Id, right? Nova should be the code that translates/copies the X-Auth-Tenant value into X-Auth-Project-Id that it might need itself...","commit_id":"786fdf15715266f8c7946b9e3979fcb38519376c"}],"glance/common/client.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"03754e08169728584c5fe4e340d907a72d624a2d","unresolved":false,"context_lines":[{"line_number":3,"context_line":"import socket"},{"line_number":4,"context_line":"import urllib"},{"line_number":5,"context_line":"import urlparse"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"# See http://code.google.com/p/python-nose/issues/detail?id\u003d373"},{"line_number":8,"context_line":"# The code below enables glance.client standalone to work with i18n _() blocks"},{"line_number":9,"context_line":"import __builtin__"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACH%2F%2F%2B88%3D","line":6,"updated":"2011-08-26 16:13:45.000000000","message":"Most of the code in here looks great. One little nit below, though","commit_id":"e08fd8a596dc2737bb3b7fa84bb49d9cc8b23f0a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"03754e08169728584c5fe4e340d907a72d624a2d","unresolved":false,"context_lines":[{"line_number":175,"context_line":"                headers[\u0027x-auth-token\u0027] \u003d self.auth_tok"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"            if \u0027x-auth-project-id\u0027 not in headers and self.tenant:"},{"line_number":178,"context_line":"                headers[\u0027x-auth-project-id\u0027] \u003d self.tenant"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"            if \u0027x-role\u0027 not in headers and self.role:"},{"line_number":181,"context_line":"                headers[\u0027x-role\u0027] \u003d self.role"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACH%2F%2F%2B%2BE%3D","line":178,"updated":"2011-08-26 16:13:45.000000000","message":"This looks specifically like Nova... what is the purpose of the above?","commit_id":"e08fd8a596dc2737bb3b7fa84bb49d9cc8b23f0a"},{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"ac1cdaa168b5b6ab2ad3990883beae959ee17fa9","unresolved":false,"context_lines":[{"line_number":175,"context_line":"                headers[\u0027x-auth-token\u0027] \u003d self.auth_tok"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"            if \u0027x-auth-project-id\u0027 not in headers and self.tenant:"},{"line_number":178,"context_line":"                headers[\u0027x-auth-project-id\u0027] \u003d self.tenant"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"            if \u0027x-role\u0027 not in headers and self.role:"},{"line_number":181,"context_line":"                headers[\u0027x-role\u0027] \u003d self.role"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACH%2F%2F%2B8U%3D","line":178,"in_reply_to":"AAAACH%2F%2F%2B%2BE%3D","updated":"2011-08-26 16:36:23.000000000","message":"You\u0027re right, I\u0027ll need to investigate this a little more to wrap my head around exactly why this was needed.","commit_id":"e08fd8a596dc2737bb3b7fa84bb49d9cc8b23f0a"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"7bfc3744da68087e4ff4abb814e0567054dfeef8","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        self.auth_tok \u003d auth_tok"},{"line_number":63,"context_line":"        self.connection \u003d None"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def set_auth_token(self, auth_tok):"},{"line_number":66,"context_line":"        \"\"\""},{"line_number":67,"context_line":"        Updates the authentication token for this client connection."},{"line_number":68,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAACH%2F%2F%2Bx8%3D","side":"PARENT","line":65,"updated":"2011-08-31 00:28:46.000000000","message":"Nova depends on this in image/glance.py, have you looked into that at all?","commit_id":"ecbcc09ce5c337a84d8adf19f957529c4f76a075"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"4ba6c47b69799dcc10bf6a20c2e6a21a1a64fa9f","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        self.auth_tok \u003d auth_tok"},{"line_number":63,"context_line":"        self.connection \u003d None"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def set_auth_token(self, auth_tok):"},{"line_number":66,"context_line":"        \"\"\""},{"line_number":67,"context_line":"        Updates the authentication token for this client connection."},{"line_number":68,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAACH%2F%2F%2BvY%3D","side":"PARENT","line":65,"in_reply_to":"AAAACH%2F%2F%2Bv0%3D","updated":"2011-08-31 16:59:25.000000000","message":"Definitely agree.","commit_id":"ecbcc09ce5c337a84d8adf19f957529c4f76a075"},{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"6bf2d974bdaa0724fd96abce0b9a3862f7847c2e","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        self.auth_tok \u003d auth_tok"},{"line_number":63,"context_line":"        self.connection \u003d None"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def set_auth_token(self, auth_tok):"},{"line_number":66,"context_line":"        \"\"\""},{"line_number":67,"context_line":"        Updates the authentication token for this client connection."},{"line_number":68,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAACH%2F%2F%2Bv0%3D","side":"PARENT","line":65,"in_reply_to":"AAAACH%2F%2F%2Bx8%3D","updated":"2011-08-31 16:21:24.000000000","message":"Opps missed that.\n\nI\u0027ll add this back for now.\n\nStill thinks it\u0027s a good idea to rip out this useless method, but I\u0027ll do that *after* modifying nova.","commit_id":"ecbcc09ce5c337a84d8adf19f957529c4f76a075"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"7bfc3744da68087e4ff4abb814e0567054dfeef8","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        self.auth_tok \u003d auth_tok"},{"line_number":70,"context_line":"        self.creds \u003d creds or {}"},{"line_number":71,"context_line":"        self.connection \u003d None"},{"line_number":72,"context_line":"        self.doc_root \u003d self.DEFAULT_DOC_ROOT if doc_root is None else doc_root"},{"line_number":73,"context_line":"        self.auth_plugin \u003d self.make_auth_plugin(self.creds)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def configure_from_url(self, url):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAACH%2F%2F%2Bx4%3D","line":72,"updated":"2011-08-31 00:28:46.000000000","message":"I\u0027m curious what use case you see here. Clients aren\u0027t supposed to expose urls to end users, so shouldn\u0027t we just hard-code the \u0027DEFAULT_DOC_ROOT\u0027 and be done with it?","commit_id":"371775d64130e78f98d0fc3318416f6f487b5e47"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"4ba6c47b69799dcc10bf6a20c2e6a21a1a64fa9f","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        self.auth_tok \u003d auth_tok"},{"line_number":70,"context_line":"        self.creds \u003d creds or {}"},{"line_number":71,"context_line":"        self.connection \u003d None"},{"line_number":72,"context_line":"        self.doc_root \u003d self.DEFAULT_DOC_ROOT if doc_root is None else doc_root"},{"line_number":73,"context_line":"        self.auth_plugin \u003d self.make_auth_plugin(self.creds)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def configure_from_url(self, url):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAACH%2F%2F%2BvU%3D","line":72,"in_reply_to":"AAAACH%2F%2F%2Bv4%3D","updated":"2011-08-31 16:59:25.000000000","message":"I guess what I\u0027m asking is why do we support accepting a doc_root in __init__ at all? I don\u0027t see when we would use that. We are just going to change DEFAULT_DOC_ROOT in any subclasses, so we should be able to depend fully on that.","commit_id":"371775d64130e78f98d0fc3318416f6f487b5e47"},{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"92aebe1df58c7c4542eebb98a58572193db78ed3","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        self.auth_tok \u003d auth_tok"},{"line_number":70,"context_line":"        self.creds \u003d creds or {}"},{"line_number":71,"context_line":"        self.connection \u003d None"},{"line_number":72,"context_line":"        self.doc_root \u003d self.DEFAULT_DOC_ROOT if doc_root is None else doc_root"},{"line_number":73,"context_line":"        self.auth_plugin \u003d self.make_auth_plugin(self.creds)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def configure_from_url(self, url):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAACH%2F%2F%2BvE%3D","line":72,"in_reply_to":"AAAACH%2F%2F%2BvU%3D","updated":"2011-08-31 17:57:10.000000000","message":"Good question. Some of the tests make use of it, but that can be changed.\n\nI guess it was a flexibility thing, but I think I\u0027m in agreement with you here, this probably a YAGNI thing. We can always add it back if something *actually* ends up using this in a real way.","commit_id":"371775d64130e78f98d0fc3318416f6f487b5e47"},{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"6bf2d974bdaa0724fd96abce0b9a3862f7847c2e","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        self.auth_tok \u003d auth_tok"},{"line_number":70,"context_line":"        self.creds \u003d creds or {}"},{"line_number":71,"context_line":"        self.connection \u003d None"},{"line_number":72,"context_line":"        self.doc_root \u003d self.DEFAULT_DOC_ROOT if doc_root is None else doc_root"},{"line_number":73,"context_line":"        self.auth_plugin \u003d self.make_auth_plugin(self.creds)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def configure_from_url(self, url):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAACH%2F%2F%2Bv4%3D","line":72,"in_reply_to":"AAAACH%2F%2F%2Bx4%3D","updated":"2011-08-31 16:21:24.000000000","message":"The Registry and API have different doc roots, but share the same base-class. Originally this was handled by an initialization parameter in the sub-class; I just refactored it to be a class variable so we could ditch the otherwise useless overrides of __init__.","commit_id":"371775d64130e78f98d0fc3318416f6f487b5e47"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"7bfc3744da68087e4ff4abb814e0567054dfeef8","unresolved":false,"context_lines":[{"line_number":172,"context_line":""},{"line_number":173,"context_line":"            c \u003d connection_type(self.host, self.port)"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"            if self.doc_root:"},{"line_number":176,"context_line":"                action \u003d \u0027/\u0027.join([self.doc_root, action.lstrip(\u0027/\u0027)])"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"            # Do a simple request or a chunked request, depending"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAACH%2F%2F%2Bx0%3D","line":175,"updated":"2011-08-31 00:28:46.000000000","message":"If you default to an empty string in DEFAULT_DOC_ROOT instead of None, you don\u0027t need this if statement.","commit_id":"371775d64130e78f98d0fc3318416f6f487b5e47"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"4ba6c47b69799dcc10bf6a20c2e6a21a1a64fa9f","unresolved":false,"context_lines":[{"line_number":172,"context_line":""},{"line_number":173,"context_line":"            c \u003d connection_type(self.host, self.port)"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"            if self.doc_root:"},{"line_number":176,"context_line":"                action \u003d \u0027/\u0027.join([self.doc_root, action.lstrip(\u0027/\u0027)])"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"            # Do a simple request or a chunked request, depending"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAACH%2F%2F%2BvQ%3D","line":175,"in_reply_to":"AAAACH%2F%2F%2Bv8%3D","updated":"2011-08-31 16:59:25.000000000","message":"It would have the same result, but I see your point. Forget this one.","commit_id":"371775d64130e78f98d0fc3318416f6f487b5e47"},{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"6bf2d974bdaa0724fd96abce0b9a3862f7847c2e","unresolved":false,"context_lines":[{"line_number":172,"context_line":""},{"line_number":173,"context_line":"            c \u003d connection_type(self.host, self.port)"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"            if self.doc_root:"},{"line_number":176,"context_line":"                action \u003d \u0027/\u0027.join([self.doc_root, action.lstrip(\u0027/\u0027)])"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"            # Do a simple request or a chunked request, depending"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAACH%2F%2F%2Bv8%3D","line":175,"in_reply_to":"AAAACH%2F%2F%2Bx0%3D","updated":"2011-08-31 16:21:24.000000000","message":"I don\u0027t think that\u0027s quite true:\n\n\u0027/\u0027.join([\u0027\u0027, \u0027\u0027]) -\u003e \u0027/\u0027 instead of \u0027\u0027. So if the DOC_ROOT were \u0027\u0027, we\u0027d be changing incoming actions that were \u0027\u0027 to \u0027/\u0027.\n\nWouldn\u0027t make a difference given our current URL routing (I think), but still think it\u0027s a bad practice to have a client secretly switch a path from \u0027\u0027 -\u003e \u0027/\u0027.","commit_id":"371775d64130e78f98d0fc3318416f6f487b5e47"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"bc25cdcbcdfe8682c26c1c9505071e95bf6f866f","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        self.auth_tok \u003d auth_tok"},{"line_number":70,"context_line":"        self.creds \u003d creds or {}"},{"line_number":71,"context_line":"        self.connection \u003d None"},{"line_number":72,"context_line":"        self.doc_root \u003d self.DEFAULT_DOC_ROOT if doc_root is None else doc_root"},{"line_number":73,"context_line":"        self.auth_plugin \u003d self.make_auth_plugin(self.creds)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def set_auth_token(self, auth_tok):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAACH%2F%2F%2BuU%3D","line":72,"updated":"2011-08-31 21:08:42.000000000","message":"Did you mean to change this line? Just unsure of the outcome of the comments from patch set 6.","commit_id":"be6d6294f9878f2f5ce37b5532d5afb9c6b03142"},{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"96f2da0c34becf468ea10ebf8e08e2f2e1b78635","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        self.auth_tok \u003d auth_tok"},{"line_number":70,"context_line":"        self.creds \u003d creds or {}"},{"line_number":71,"context_line":"        self.connection \u003d None"},{"line_number":72,"context_line":"        self.doc_root \u003d self.DEFAULT_DOC_ROOT if doc_root is None else doc_root"},{"line_number":73,"context_line":"        self.auth_plugin \u003d self.make_auth_plugin(self.creds)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def set_auth_token(self, auth_tok):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAACH%2F%2F%2BuM%3D","line":72,"in_reply_to":"AAAACH%2F%2F%2BuU%3D","updated":"2011-08-31 21:47:33.000000000","message":"I wanted to change this per your comments, but each alternative I experimented with either make the code a bit more complicated or introduced some hard-to-track down bugs.\n\nGiven that this is brittle (but working), I decided to leave as is for now.\n\nThat said, I would fully support revisiting this is a future patch if we want to \u0027clean this up\u0027.","commit_id":"be6d6294f9878f2f5ce37b5532d5afb9c6b03142"}],"glance/common/context.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"03754e08169728584c5fe4e340d907a72d624a2d","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        construct an appropriate context from it."},{"line_number":75,"context_line":"        \"\"\""},{"line_number":76,"context_line":"        auth_tok \u003d req.headers.get(\u0027X-Auth-Token\u0027)"},{"line_number":77,"context_line":"        tenant \u003d req.headers.get(\u0027X-Auth-Project-Id\u0027)"},{"line_number":78,"context_line":"        role \u003d req.headers.get(\u0027X-Role\u0027)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        if role:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACH%2F%2F%2B%2BA%3D","line":77,"updated":"2011-08-26 16:13:45.000000000","message":"Again, this seems Nova-specific. I\u0027d prefer to have a generic X-Auth-Tenant header, instead of the Nova-specific \"project\"...","commit_id":"e08fd8a596dc2737bb3b7fa84bb49d9cc8b23f0a"},{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"ac1cdaa168b5b6ab2ad3990883beae959ee17fa9","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        construct an appropriate context from it."},{"line_number":75,"context_line":"        \"\"\""},{"line_number":76,"context_line":"        auth_tok \u003d req.headers.get(\u0027X-Auth-Token\u0027)"},{"line_number":77,"context_line":"        tenant \u003d req.headers.get(\u0027X-Auth-Project-Id\u0027)"},{"line_number":78,"context_line":"        role \u003d req.headers.get(\u0027X-Role\u0027)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        if role:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACH%2F%2F%2B8Q%3D","line":77,"in_reply_to":"AAAACH%2F%2F%2B%2BA%3D","updated":"2011-08-26 16:36:23.000000000","message":"Agreed, I\u0027ll look into this again.","commit_id":"e08fd8a596dc2737bb3b7fa84bb49d9cc8b23f0a"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"7bfc3744da68087e4ff4abb814e0567054dfeef8","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        if auth_tok:"},{"line_number":93,"context_line":"            if req.headers.get(\u0027X-Identity-Status\u0027) \u003d\u003d \u0027Confirmed\u0027:"},{"line_number":94,"context_line":"                # 1. Auth-token is passed, check other headers"},{"line_number":95,"context_line":"                user \u003d req.headers.get(\u0027X-User\u0027)"},{"line_number":96,"context_line":"                tenant \u003d req.headers.get(\u0027X-Tenant\u0027)"},{"line_number":97,"context_line":"                roles \u003d [r.strip() for r in req.headers.get(\u0027X-Role\u0027, \u0027\u0027).split(\u0027,\u0027)]"},{"line_number":98,"context_line":"                is_admin \u003d \u0027Admin\u0027 in roles"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAACH%2F%2F%2Bxw%3D","line":95,"updated":"2011-08-31 00:28:46.000000000","message":"Can you use X-Auth-User, X-Auth-Tenant, and X-Auth-Role?","commit_id":"371775d64130e78f98d0fc3318416f6f487b5e47"},{"author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"change_message_id":"4ba6c47b69799dcc10bf6a20c2e6a21a1a64fa9f","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        if auth_tok:"},{"line_number":93,"context_line":"            if req.headers.get(\u0027X-Identity-Status\u0027) \u003d\u003d \u0027Confirmed\u0027:"},{"line_number":94,"context_line":"                # 1. Auth-token is passed, check other headers"},{"line_number":95,"context_line":"                user \u003d req.headers.get(\u0027X-User\u0027)"},{"line_number":96,"context_line":"                tenant \u003d req.headers.get(\u0027X-Tenant\u0027)"},{"line_number":97,"context_line":"                roles \u003d [r.strip() for r in req.headers.get(\u0027X-Role\u0027, \u0027\u0027).split(\u0027,\u0027)]"},{"line_number":98,"context_line":"                is_admin \u003d \u0027Admin\u0027 in roles"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAACH%2F%2F%2BvM%3D","line":95,"in_reply_to":"AAAACH%2F%2F%2Bwg%3D","updated":"2011-08-31 16:59:25.000000000","message":"Agreed.","commit_id":"371775d64130e78f98d0fc3318416f6f487b5e47"},{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"6bf2d974bdaa0724fd96abce0b9a3862f7847c2e","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        if auth_tok:"},{"line_number":93,"context_line":"            if req.headers.get(\u0027X-Identity-Status\u0027) \u003d\u003d \u0027Confirmed\u0027:"},{"line_number":94,"context_line":"                # 1. Auth-token is passed, check other headers"},{"line_number":95,"context_line":"                user \u003d req.headers.get(\u0027X-User\u0027)"},{"line_number":96,"context_line":"                tenant \u003d req.headers.get(\u0027X-Tenant\u0027)"},{"line_number":97,"context_line":"                roles \u003d [r.strip() for r in req.headers.get(\u0027X-Role\u0027, \u0027\u0027).split(\u0027,\u0027)]"},{"line_number":98,"context_line":"                is_admin \u003d \u0027Admin\u0027 in roles"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAACH%2F%2F%2Bwg%3D","line":95,"in_reply_to":"AAAACH%2F%2F%2Bxw%3D","updated":"2011-08-31 16:21:24.000000000","message":"Those headers are provided by Keystone\u0027s AuthToken middleware. Not sure why the \u0027Auth\u0027 part was omitted (perhaps because it\u0027s after the authn phase?), but if we want to change that, it should probably be in a separate patch to keystone.","commit_id":"371775d64130e78f98d0fc3318416f6f487b5e47"},{"author":{"_account_id":360,"name":"Dan Prince","email":"dprince@redhat.com","username":"dan-prince"},"change_message_id":"e9a5872ea4c2e2e4b868c9a467567a73d3da9b14","unresolved":false,"context_lines":[{"line_number":96,"context_line":"                tenant \u003d req.headers.get(\u0027X-Tenant\u0027)"},{"line_number":97,"context_line":"                roles \u003d [r.strip()"},{"line_number":98,"context_line":"                         for r in req.headers.get(\u0027X-Role\u0027, \u0027\u0027).split(\u0027,\u0027)]"},{"line_number":99,"context_line":"                is_admin \u003d \u0027Admin\u0027 in roles"},{"line_number":100,"context_line":"            else:"},{"line_number":101,"context_line":"                # 2. Indentity-Status not confirmed"},{"line_number":102,"context_line":"                # FIXME(sirp): not sure what the correct behavior in this case"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAACH%2F%2F%2Bs8%3D","line":99,"updated":"2011-09-10 18:07:20.000000000","message":"Also, Can we ignore case on the role check.\n\nNova currently ignores case on the role check as well.","commit_id":"be6d6294f9878f2f5ce37b5532d5afb9c6b03142"}],"glance/tests/functional/test_bin_glance.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"03754e08169728584c5fe4e340d907a72d624a2d","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        # environment in which NOVA_AUTH_STRATEGY\u003dkeystone. The test server we"},{"line_number":36,"context_line":"        # spin up won\u0027t have keystone support, so we need to switch to the"},{"line_number":37,"context_line":"        # NoAuth strategy."},{"line_number":38,"context_line":"        os.environ[\u0027NOVA_AUTH_STRATEGY\u0027] \u003d \u0027noauth\u0027"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def test_add_list_delete_list(self):"},{"line_number":41,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACH%2F%2F%2B84%3D","line":38,"updated":"2011-08-26 16:13:45.000000000","message":"Same comment from earlier about NOVA_AUTH_STRATEGY \u003d\u003e OS_AUTH_STRATEGY","commit_id":"e08fd8a596dc2737bb3b7fa84bb49d9cc8b23f0a"},{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"ac1cdaa168b5b6ab2ad3990883beae959ee17fa9","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        # environment in which NOVA_AUTH_STRATEGY\u003dkeystone. The test server we"},{"line_number":36,"context_line":"        # spin up won\u0027t have keystone support, so we need to switch to the"},{"line_number":37,"context_line":"        # NoAuth strategy."},{"line_number":38,"context_line":"        os.environ[\u0027NOVA_AUTH_STRATEGY\u0027] \u003d \u0027noauth\u0027"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def test_add_list_delete_list(self):"},{"line_number":41,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACH%2F%2F%2B8M%3D","line":38,"in_reply_to":"AAAACH%2F%2F%2B84%3D","updated":"2011-08-26 16:36:23.000000000","message":"Yep, will work on a fix.","commit_id":"e08fd8a596dc2737bb3b7fa84bb49d9cc8b23f0a"}],"glance/tests/unit/test_api.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"03754e08169728584c5fe4e340d907a72d624a2d","unresolved":false,"context_lines":[{"line_number":1179,"context_line":"        db_api.image_create(self.context, extra_fixture)"},{"line_number":1180,"context_line":""},{"line_number":1181,"context_line":"        req \u003d webob.Request.blank(\u0027/images/detail?is_public\u003dNone\u0027)"},{"line_number":1182,"context_line":"        req.headers[\u0027X-Role\u0027] \u003d \"Admin\""},{"line_number":1183,"context_line":"        res \u003d req.get_response(self.api)"},{"line_number":1184,"context_line":"        res_dict \u003d json.loads(res.body)"},{"line_number":1185,"context_line":"        self.assertEquals(res.status_int, 200)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACH%2F%2F%2B80%3D","line":1182,"updated":"2011-08-26 16:13:45.000000000","message":"Is this necessary if the noauth strategy is used?","commit_id":"e08fd8a596dc2737bb3b7fa84bb49d9cc8b23f0a"},{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"ac1cdaa168b5b6ab2ad3990883beae959ee17fa9","unresolved":false,"context_lines":[{"line_number":1179,"context_line":"        db_api.image_create(self.context, extra_fixture)"},{"line_number":1180,"context_line":""},{"line_number":1181,"context_line":"        req \u003d webob.Request.blank(\u0027/images/detail?is_public\u003dNone\u0027)"},{"line_number":1182,"context_line":"        req.headers[\u0027X-Role\u0027] \u003d \"Admin\""},{"line_number":1183,"context_line":"        res \u003d req.get_response(self.api)"},{"line_number":1184,"context_line":"        res_dict \u003d json.loads(res.body)"},{"line_number":1185,"context_line":"        self.assertEquals(res.status_int, 200)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACH%2F%2F%2B8Y%3D","line":1182,"in_reply_to":"AAAACH%2F%2F%2B80%3D","updated":"2011-08-26 16:36:23.000000000","message":"Great question; I know we needed to add this to get the test pass; but at the moment, I can\u0027t remember exactly why.\n\nI suspect it\u0027s because we defaulted is_admin\u003dFalse when Admin isn\u0027t present; however, if NoAuth is used, we should probably use is_admin\u003dTrue.... so this is probably a bug. Nice catch!","commit_id":"e08fd8a596dc2737bb3b7fa84bb49d9cc8b23f0a"}]}
