)]}'
{"bin/glance":[{"author":{"_account_id":2036,"name":"Juerg Haefliger","email":"juerg.haefliger@hpe.com","username":"juergh"},"change_message_id":"6212a9aae557cb0cf5ef1b6c5e4069423b616da8","unresolved":false,"context_lines":[{"line_number":752,"context_line":"                 auth_url\u003doptions.auth_url or os.getenv(\u0027OS_AUTH_URL\u0027),"},{"line_number":753,"context_line":"                 strategy\u003dforce_strategy or options.auth_strategy or \\"},{"line_number":754,"context_line":"                          os.getenv(\u0027OS_AUTH_STRATEGY\u0027, \u0027noauth\u0027),"},{"line_number":755,"context_line":"                 region\u003doptions.region or os.getenv(\u0027OS_REGION_NAME\u0027))"},{"line_number":756,"context_line":""},{"line_number":757,"context_line":"    if creds[\u0027strategy\u0027] \u003d\u003d \u0027keystone\u0027 and not creds[\u0027auth_url\u0027]:"},{"line_number":758,"context_line":"        msg \u003d (\"--auth_url option or OS_AUTH_URL environment variable \""}],"source_content_type":"application/octet-stream","patch_set":1,"id":"AAAAEn%2F%2F308%3D","line":755,"updated":"2012-02-22 08:15:23.000000000","message":"More of a general question than a comment: What\u0027s the reason for introducing a new set of OS_* env variables and not just stick with OS_AUTH_*? For consistency reasons, we should also check for OS_AUTH_REGION_NAME.","commit_id":"d2c80c79be30485d61ccf3c4170b6f83d8f3d92f"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"5bd49ac76ceb95ccef962bd8c5ed158052be435a","unresolved":false,"context_lines":[{"line_number":752,"context_line":"                 auth_url\u003doptions.auth_url or os.getenv(\u0027OS_AUTH_URL\u0027),"},{"line_number":753,"context_line":"                 strategy\u003dforce_strategy or options.auth_strategy or \\"},{"line_number":754,"context_line":"                          os.getenv(\u0027OS_AUTH_STRATEGY\u0027, \u0027noauth\u0027),"},{"line_number":755,"context_line":"                 region\u003doptions.region or os.getenv(\u0027OS_REGION_NAME\u0027))"},{"line_number":756,"context_line":""},{"line_number":757,"context_line":"    if creds[\u0027strategy\u0027] \u003d\u003d \u0027keystone\u0027 and not creds[\u0027auth_url\u0027]:"},{"line_number":758,"context_line":"        msg \u003d (\"--auth_url option or OS_AUTH_URL environment variable \""}],"source_content_type":"application/octet-stream","patch_set":1,"id":"AAAAEn%2F%2F4a8%3D","line":755,"updated":"2012-02-21 17:24:22.000000000","message":"Tiny nit, but \n\n        region\u003doptions.region or os.getenv(\u0027OS_REGION_NAME\u0027),\n    )\n\nwould be more diff-friendly if and when a new option is added.","commit_id":"d2c80c79be30485d61ccf3c4170b6f83d8f3d92f"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"362143f598222a3df3c8e3662b36992c972185ab","unresolved":false,"context_lines":[{"line_number":752,"context_line":"                 auth_url\u003doptions.auth_url or os.getenv(\u0027OS_AUTH_URL\u0027),"},{"line_number":753,"context_line":"                 strategy\u003dforce_strategy or options.auth_strategy or \\"},{"line_number":754,"context_line":"                          os.getenv(\u0027OS_AUTH_STRATEGY\u0027, \u0027noauth\u0027),"},{"line_number":755,"context_line":"                 region\u003doptions.region or os.getenv(\u0027OS_REGION_NAME\u0027))"},{"line_number":756,"context_line":""},{"line_number":757,"context_line":"    if creds[\u0027strategy\u0027] \u003d\u003d \u0027keystone\u0027 and not creds[\u0027auth_url\u0027]:"},{"line_number":758,"context_line":"        msg \u003d (\"--auth_url option or OS_AUTH_URL environment variable \""}],"source_content_type":"application/octet-stream","patch_set":1,"id":"AAAAEn%2F%2F3yk%3D","line":755,"in_reply_to":"AAAAEn%2F%2F308%3D","updated":"2012-02-22 13:21:15.000000000","message":"Juerg, I followed the format of this (very good) wiki write up which is trying to align nova and glance environment variables: http://wiki.openstack.org/CLIAuth. I didn\u0027t see any value in putting in an old format which would then have to be migrated/deprecated. Nova will probably change to use the new style for this variable eventually.","commit_id":"d2c80c79be30485d61ccf3c4170b6f83d8f3d92f"},{"author":{"_account_id":2036,"name":"Juerg Haefliger","email":"juerg.haefliger@hpe.com","username":"juergh"},"change_message_id":"6212a9aae557cb0cf5ef1b6c5e4069423b616da8","unresolved":false,"context_lines":[{"line_number":810,"context_line":"    parser.add_option(\u0027-K\u0027, \u0027--password\u0027, dest\u003d\"password\","},{"line_number":811,"context_line":"                      metavar\u003d\"PASSWORD\", default\u003dNone,"},{"line_number":812,"context_line":"                      help\u003d\"Password used to acquire an authentication token\")"},{"line_number":813,"context_line":"    parser.add_option(\u0027-r\u0027, \u0027--region\u0027, dest\u003d\"region\","},{"line_number":814,"context_line":"                      metavar\u003d\"REGION\", default\u003dNone,"},{"line_number":815,"context_line":"                      help\u003d\"Region name. When using keystone authentication \""},{"line_number":816,"context_line":"                      \"this flag identifies the region name to use when \""}],"source_content_type":"application/octet-stream","patch_set":1,"id":"AAAAEn%2F%2F300%3D","line":813,"updated":"2012-02-22 08:15:23.000000000","message":"Capital -R for consistency with the other options.","commit_id":"d2c80c79be30485d61ccf3c4170b6f83d8f3d92f"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"362143f598222a3df3c8e3662b36992c972185ab","unresolved":false,"context_lines":[{"line_number":810,"context_line":"    parser.add_option(\u0027-K\u0027, \u0027--password\u0027, dest\u003d\"password\","},{"line_number":811,"context_line":"                      metavar\u003d\"PASSWORD\", default\u003dNone,"},{"line_number":812,"context_line":"                      help\u003d\"Password used to acquire an authentication token\")"},{"line_number":813,"context_line":"    parser.add_option(\u0027-r\u0027, \u0027--region\u0027, dest\u003d\"region\","},{"line_number":814,"context_line":"                      metavar\u003d\"REGION\", default\u003dNone,"},{"line_number":815,"context_line":"                      help\u003d\"Region name. When using keystone authentication \""},{"line_number":816,"context_line":"                      \"this flag identifies the region name to use when \""}],"source_content_type":"application/octet-stream","patch_set":1,"id":"AAAAEn%2F%2F3x4%3D","line":813,"in_reply_to":"AAAAEn%2F%2F300%3D","updated":"2012-02-22 13:21:15.000000000","message":"I don\u0027t think I\u0027m setting a precedent here, eg -p/--port is used to specify the port number.","commit_id":"d2c80c79be30485d61ccf3c4170b6f83d8f3d92f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"7811d6ac7c5522227544eee96e8b2295b8a73b49","unresolved":false,"context_lines":[{"line_number":810,"context_line":"    parser.add_option(\u0027-K\u0027, \u0027--password\u0027, dest\u003d\"password\","},{"line_number":811,"context_line":"                      metavar\u003d\"PASSWORD\", default\u003dNone,"},{"line_number":812,"context_line":"                      help\u003d\"Password used to acquire an authentication token\")"},{"line_number":813,"context_line":"    parser.add_option(\u0027-r\u0027, \u0027--region\u0027, dest\u003d\"region\","},{"line_number":814,"context_line":"                      metavar\u003d\"REGION\", default\u003dNone,"},{"line_number":815,"context_line":"                      help\u003d\"Region name. When using keystone authentication \""},{"line_number":816,"context_line":"                      \"this flag identifies the region name to use when \""}],"source_content_type":"application/octet-stream","patch_set":1,"id":"AAAAEn%2F%2F3wE%3D","line":813,"in_reply_to":"AAAAEn%2F%2F3x4%3D","updated":"2012-02-22 14:37:11.000000000","message":"I actually agree with Juerg (but probably not for the reason Juerg expects) :)\n\nAll of the other authentication-related options use capital letters and so I agree for consistency it might be good to use -R.","commit_id":"d2c80c79be30485d61ccf3c4170b6f83d8f3d92f"},{"author":{"_account_id":2036,"name":"Juerg Haefliger","email":"juerg.haefliger@hpe.com","username":"juergh"},"change_message_id":"6212a9aae557cb0cf5ef1b6c5e4069423b616da8","unresolved":false,"context_lines":[{"line_number":813,"context_line":"    parser.add_option(\u0027-r\u0027, \u0027--region\u0027, dest\u003d\"region\","},{"line_number":814,"context_line":"                      metavar\u003d\"REGION\", default\u003dNone,"},{"line_number":815,"context_line":"                      help\u003d\"Region name. When using keystone authentication \""},{"line_number":816,"context_line":"                      \"this flag identifies the region name to use when \""},{"line_number":817,"context_line":"                      \"selecting the service endpoint.\")"},{"line_number":818,"context_line":"    parser.add_option(\u0027-T\u0027, \u0027--tenant\u0027, dest\u003d\"tenant\","},{"line_number":819,"context_line":"                      metavar\u003d\"TENANT\", default\u003dNone,"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"AAAAEn%2F%2F30w%3D","line":816,"updated":"2012-02-22 08:15:23.000000000","message":"The option is not really a flag.","commit_id":"d2c80c79be30485d61ccf3c4170b6f83d8f3d92f"}],"doc/source/glance.rst":[{"author":{"_account_id":2036,"name":"Juerg Haefliger","email":"juerg.haefliger@hpe.com","username":"juergh"},"change_message_id":"6212a9aae557cb0cf5ef1b6c5e4069423b616da8","unresolved":false,"context_lines":[{"line_number":107,"context_line":"    -r, --region          When using keystone authentication this flag"},{"line_number":108,"context_line":"                          identifies the region name to use when selecting the"},{"line_number":109,"context_line":"                          service endpoint."},{"line_number":110,"context_line":"                          requests. The server certificate will not be"},{"line_number":111,"context_line":"    --limit\u003dLIMIT         Page size to use while requesting image metadata"},{"line_number":112,"context_line":"    --marker\u003dMARKER       Image index after which to begin pagination"},{"line_number":113,"context_line":"    --sort_key\u003dKEY        Sort results by this image attribute."}],"source_content_type":"text/x-rst","patch_set":1,"id":"AAAAEn%2F%2F30s%3D","line":110,"updated":"2012-02-22 08:15:23.000000000","message":"Same comment as before: It\u0027s not a flag. And:\n-r REGION, --region\u003dREGION\n\nUnrelated to this patch: There are other options that are missing from this help text. I should post a patch and go through the process since you stole my trial bug :-)","commit_id":"d2c80c79be30485d61ccf3c4170b6f83d8f3d92f"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"5bd49ac76ceb95ccef962bd8c5ed158052be435a","unresolved":false,"context_lines":[{"line_number":107,"context_line":"    -r, --region          When using keystone authentication this flag"},{"line_number":108,"context_line":"                          identifies the region name to use when selecting the"},{"line_number":109,"context_line":"                          service endpoint."},{"line_number":110,"context_line":"                          requests. The server certificate will not be"},{"line_number":111,"context_line":"    --limit\u003dLIMIT         Page size to use while requesting image metadata"},{"line_number":112,"context_line":"    --marker\u003dMARKER       Image index after which to begin pagination"},{"line_number":113,"context_line":"    --sort_key\u003dKEY        Sort results by this image attribute."}],"source_content_type":"text/x-rst","patch_set":1,"id":"AAAAEn%2F%2F4a4%3D","line":110,"updated":"2012-02-21 17:24:22.000000000","message":"Stray copy\u0027n\u0027paste of the line:\n\n  requests. The server certificate will not be","commit_id":"d2c80c79be30485d61ccf3c4170b6f83d8f3d92f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"7811d6ac7c5522227544eee96e8b2295b8a73b49","unresolved":false,"context_lines":[{"line_number":107,"context_line":"    -r, --region          When using keystone authentication this flag"},{"line_number":108,"context_line":"                          identifies the region name to use when selecting the"},{"line_number":109,"context_line":"                          service endpoint."},{"line_number":110,"context_line":"                          requests. The server certificate will not be"},{"line_number":111,"context_line":"    --limit\u003dLIMIT         Page size to use while requesting image metadata"},{"line_number":112,"context_line":"    --marker\u003dMARKER       Image index after which to begin pagination"},{"line_number":113,"context_line":"    --sort_key\u003dKEY        Sort results by this image attribute."}],"source_content_type":"text/x-rst","patch_set":1,"id":"AAAAEn%2F%2F3wA%3D","line":110,"in_reply_to":"AAAAEn%2F%2F30s%3D","updated":"2012-02-22 14:37:11.000000000","message":"Juergh, please do open a bug on Launchpad and assign yourself! I agree, Stuart totally stole your trial bug :)","commit_id":"d2c80c79be30485d61ccf3c4170b6f83d8f3d92f"}],"doc/source/man/glance.rst":[{"author":{"_account_id":2036,"name":"Juerg Haefliger","email":"juerg.haefliger@hpe.com","username":"juergh"},"change_message_id":"6212a9aae557cb0cf5ef1b6c5e4069423b616da8","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        authorities. This option should be used with caution."},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"  **-r, --region**"},{"line_number":103,"context_line":"        When using keystone authentication this flag identifies the"},{"line_number":104,"context_line":"        region name to use when selecting the service endpoint."},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"  **-A TOKEN, --auth_token\u003dTOKEN**"}],"source_content_type":"text/x-rst","patch_set":1,"id":"AAAAEn%2F%2F30o%3D","line":103,"updated":"2012-02-22 08:15:23.000000000","message":"Not a flag.","commit_id":"d2c80c79be30485d61ccf3c4170b6f83d8f3d92f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"7811d6ac7c5522227544eee96e8b2295b8a73b49","unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"  **-r, --region**"},{"line_number":103,"context_line":"        When using keystone authentication this flag identifies the"},{"line_number":104,"context_line":"        region name to use when selecting the service endpoint."},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"  **-A TOKEN, --auth_token\u003dTOKEN**"},{"line_number":107,"context_line":"        Authentication token to use to identify the client to the glance server"}],"source_content_type":"text/x-rst","patch_set":1,"id":"AAAAEn%2F%2F4U0%3D","line":104,"updated":"2012-02-22 14:37:11.000000000","message":"Might want to add a note about default behaviour (where region\u003dNone)","commit_id":"d2c80c79be30485d61ccf3c4170b6f83d8f3d92f"}],"glance/common/auth.py":[{"author":{"_account_id":2036,"name":"Juerg Haefliger","email":"juerg.haefliger@hpe.com","username":"juergh"},"change_message_id":"6212a9aae557cb0cf5ef1b6c5e4069423b616da8","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        self.auth_token \u003d None"},{"line_number":43,"context_line":"        # TODO(sirp): For now we\u0027re just dealing with one endpoint, eventually"},{"line_number":44,"context_line":"        # this should expose the entire service catalog so that the client can"},{"line_number":45,"context_line":"        # choose which service/region/(public/private net) combo they want."},{"line_number":46,"context_line":"        self.management_url \u003d None"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def authenticate(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEn%2F%2F30k%3D","line":45,"updated":"2012-02-22 08:15:23.000000000","message":"The comment needs to be updated.","commit_id":"d2c80c79be30485d61ccf3c4170b6f83d8f3d92f"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"5bd49ac76ceb95ccef962bd8c5ed158052be435a","unresolved":false,"context_lines":[{"line_number":76,"context_line":"    def __init__(self, creds):"},{"line_number":77,"context_line":"        self.creds \u003d creds"},{"line_number":78,"context_line":"        self.check_auth_params()"},{"line_number":79,"context_line":"        BaseStrategy.__init__(self)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def check_auth_params(self):"},{"line_number":82,"context_line":"        # Ensure that supplied credential parameters are as required"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEn%2F%2F4ao%3D","line":79,"updated":"2012-02-21 17:24:22.000000000","message":"More pythonic as:\n\n    super(KeystoneStrategy, self).__init__()\n\ni.e. let the the python interpreter figure out the immediate superclass.","commit_id":"d2c80c79be30485d61ccf3c4170b6f83d8f3d92f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"7811d6ac7c5522227544eee96e8b2295b8a73b49","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        if self.creds[\u0027auth_url\u0027].rstrip(\u0027/\u0027).endswith(\u0027v2.0\u0027):"},{"line_number":92,"context_line":"            if \u0027tenant\u0027 not in self.creds:"},{"line_number":93,"context_line":"                raise exception.MissingCredentialError(required\u003d\u0027tenant\u0027)"},{"line_number":94,"context_line":"            if \u0027region\u0027 not in self.creds:"},{"line_number":95,"context_line":"                raise exception.MissingCredentialError(required\u003d\u0027region\u0027)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def authenticate(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEn%2F%2F4Us%3D","line":94,"updated":"2012-02-22 14:37:11.000000000","message":"Is region really required? If only a single glance endpoint is returned from Keystone, should we not ignore a missing region and simply use the single returned Glance endpoint?","commit_id":"d2c80c79be30485d61ccf3c4170b6f83d8f3d92f"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"5bd49ac76ceb95ccef962bd8c5ed158052be435a","unresolved":false,"context_lines":[{"line_number":92,"context_line":"            if \u0027tenant\u0027 not in self.creds:"},{"line_number":93,"context_line":"                raise exception.MissingCredentialError(required\u003d\u0027tenant\u0027)"},{"line_number":94,"context_line":"            if \u0027region\u0027 not in self.creds:"},{"line_number":95,"context_line":"                raise exception.MissingCredentialError(required\u003d\u0027region\u0027)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def authenticate(self):"},{"line_number":98,"context_line":"        \"\"\"Authenticate with the Keystone service."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEn%2F%2F4ag%3D","line":95,"updated":"2012-02-21 17:24:22.000000000","message":"Might be clearer to again follow the for loop style above, e.g.\n\n    def _check_required(required, creds):\n        if required not in creds:\n\t    raise exception.MissingCredentialError(required\u003drequired)\n\n    for required in (\u0027tenant\u0027, region\u0027):\n        _check_required(required, self.creds)","commit_id":"d2c80c79be30485d61ccf3c4170b6f83d8f3d92f"},{"author":{"_account_id":2036,"name":"Juerg Haefliger","email":"juerg.haefliger@hpe.com","username":"juergh"},"change_message_id":"6212a9aae557cb0cf5ef1b6c5e4069423b616da8","unresolved":false,"context_lines":[{"line_number":208,"context_line":""},{"line_number":209,"context_line":"            # FIXME(sirp): for now just use the first region endpoint we"},{"line_number":210,"context_line":"            # get back from the service catalog for glance, and use the"},{"line_number":211,"context_line":"            # public url."},{"line_number":212,"context_line":"            glance_endpoint \u003d None"},{"line_number":213,"context_line":"            for service in resp_auth[\u0027serviceCatalog\u0027]:"},{"line_number":214,"context_line":"                if glance_endpoint is not None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEn%2F%2F30c%3D","line":211,"updated":"2012-02-22 08:15:23.000000000","message":"Your patch fixes that, right?","commit_id":"d2c80c79be30485d61ccf3c4170b6f83d8f3d92f"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"362143f598222a3df3c8e3662b36992c972185ab","unresolved":false,"context_lines":[{"line_number":208,"context_line":""},{"line_number":209,"context_line":"            # FIXME(sirp): for now just use the first region endpoint we"},{"line_number":210,"context_line":"            # get back from the service catalog for glance, and use the"},{"line_number":211,"context_line":"            # public url."},{"line_number":212,"context_line":"            glance_endpoint \u003d None"},{"line_number":213,"context_line":"            for service in resp_auth[\u0027serviceCatalog\u0027]:"},{"line_number":214,"context_line":"                if glance_endpoint is not None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEn%2F%2F3yU%3D","line":211,"in_reply_to":"AAAAEn%2F%2F30c%3D","updated":"2012-02-22 13:21:15.000000000","message":"Juerg, I modified the comment to say \u0027region endpoint\u0027. I think the comment is ok as is since we are \u0027just using\u0027 the public url and don\u0027t give a way to select either admin or internal urls.","commit_id":"d2c80c79be30485d61ccf3c4170b6f83d8f3d92f"},{"author":{"_account_id":2036,"name":"Juerg Haefliger","email":"juerg.haefliger@hpe.com","username":"juergh"},"change_message_id":"6212a9aae557cb0cf5ef1b6c5e4069423b616da8","unresolved":false,"context_lines":[{"line_number":211,"context_line":"            # public url."},{"line_number":212,"context_line":"            glance_endpoint \u003d None"},{"line_number":213,"context_line":"            for service in resp_auth[\u0027serviceCatalog\u0027]:"},{"line_number":214,"context_line":"                if glance_endpoint is not None:"},{"line_number":215,"context_line":"                    break"},{"line_number":216,"context_line":"                if service[\u0027type\u0027] \u003d\u003d \u0027image\u0027:"},{"line_number":217,"context_line":"                    for endpoint in service[\u0027endpoints\u0027]:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEn%2F%2F30Y%3D","line":214,"updated":"2012-02-22 08:15:23.000000000","message":"Don\u0027t understand. Why would glance_endpoint ever be not None here? Oh, is this the multi-level breaking? Yeah, that is confusing :-)","commit_id":"d2c80c79be30485d61ccf3c4170b6f83d8f3d92f"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"5bd49ac76ceb95ccef962bd8c5ed158052be435a","unresolved":false,"context_lines":[{"line_number":212,"context_line":"            glance_endpoint \u003d None"},{"line_number":213,"context_line":"            for service in resp_auth[\u0027serviceCatalog\u0027]:"},{"line_number":214,"context_line":"                if glance_endpoint is not None:"},{"line_number":215,"context_line":"                    break"},{"line_number":216,"context_line":"                if service[\u0027type\u0027] \u003d\u003d \u0027image\u0027:"},{"line_number":217,"context_line":"                    for endpoint in service[\u0027endpoints\u0027]:"},{"line_number":218,"context_line":"                        if endpoint[\u0027region\u0027] \u003d\u003d self.creds[\u0027region\u0027]:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEn%2F%2F4ac%3D","line":215,"updated":"2012-02-21 17:24:22.000000000","message":"Mutiple levels of breaking can be a little unclear from a readabilty perspective.\n\nHow about factoring out this nested for loop into a helper method, then replace the inner break with a return statement? AFAICS the outter break would then no longer be required.","commit_id":"d2c80c79be30485d61ccf3c4170b6f83d8f3d92f"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"c332a15bbe133233d7c5e25b15ce934776c1151e","unresolved":false,"context_lines":[{"line_number":196,"context_line":"            if \u0027region\u0027 in self.creds:"},{"line_number":197,"context_line":"                region \u003d self.creds[\u0027region\u0027]"},{"line_number":198,"context_line":"            else:"},{"line_number":199,"context_line":"                region \u003d None"},{"line_number":200,"context_line":"            for service in service_catalog:"},{"line_number":201,"context_line":"                if service[\u0027type\u0027] \u003d\u003d \u0027image\u0027:"},{"line_number":202,"context_line":"                    for ep in service[\u0027endpoints\u0027]:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F1Jg%3D","line":199,"updated":"2012-02-28 14:55:15.000000000","message":"Clearer as:\n\n  region \u003d self.creds.get(\u0027region\u0027)","commit_id":"3cb49c98b5ae482668ca3589862ae6e2cf98253c"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"9a4e1f110ae9de9637641a7c5f0d4d86bac6798f","unresolved":false,"context_lines":[{"line_number":196,"context_line":"            if \u0027region\u0027 in self.creds:"},{"line_number":197,"context_line":"                region \u003d self.creds[\u0027region\u0027]"},{"line_number":198,"context_line":"            else:"},{"line_number":199,"context_line":"                region \u003d None"},{"line_number":200,"context_line":"            for service in service_catalog:"},{"line_number":201,"context_line":"                if service[\u0027type\u0027] \u003d\u003d \u0027image\u0027:"},{"line_number":202,"context_line":"                    for ep in service[\u0027endpoints\u0027]:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F1II%3D","line":199,"in_reply_to":"AAAAEn%2F%2F1Jg%3D","updated":"2012-02-28 15:56:45.000000000","message":"Definitely.","commit_id":"3cb49c98b5ae482668ca3589862ae6e2cf98253c"}],"glance/common/client.py":[{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"5bd49ac76ceb95ccef962bd8c5ed158052be435a","unresolved":false,"context_lines":[{"line_number":339,"context_line":"        Returns an instantiated authentication plugin."},{"line_number":340,"context_line":"        \"\"\""},{"line_number":341,"context_line":"        strategy \u003d creds.get(\u0027strategy\u0027, \u0027noauth\u0027)"},{"line_number":342,"context_line":"        plugin \u003d auth.get_plugin_from_strategy(strategy, creds)"},{"line_number":343,"context_line":"        return plugin"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"    def get_connection_type(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEn%2F%2F4aQ%3D","line":342,"updated":"2012-02-21 17:24:22.000000000","message":"Nice!","commit_id":"d2c80c79be30485d61ccf3c4170b6f83d8f3d92f"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"362143f598222a3df3c8e3662b36992c972185ab","unresolved":false,"context_lines":[{"line_number":339,"context_line":"        Returns an instantiated authentication plugin."},{"line_number":340,"context_line":"        \"\"\""},{"line_number":341,"context_line":"        strategy \u003d creds.get(\u0027strategy\u0027, \u0027noauth\u0027)"},{"line_number":342,"context_line":"        plugin \u003d auth.get_plugin_from_strategy(strategy, creds)"},{"line_number":343,"context_line":"        return plugin"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"    def get_connection_type(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEn%2F%2F3yQ%3D","line":342,"in_reply_to":"AAAAEn%2F%2F4aQ%3D","updated":"2012-02-22 13:21:15.000000000","message":"Well thank you!","commit_id":"d2c80c79be30485d61ccf3c4170b6f83d8f3d92f"}],"glance/tests/unit/test_auth.py":[{"author":{"_account_id":2036,"name":"Juerg Haefliger","email":"juerg.haefliger@hpe.com","username":"juergh"},"change_message_id":"6212a9aae557cb0cf5ef1b6c5e4069423b616da8","unresolved":false,"context_lines":[{"line_number":96,"context_line":"                \u0027auth_url\u0027: \u0027http://localhost/badauthurl/\u0027,"},{"line_number":97,"context_line":"                \u0027password\u0027: \u0027pass\u0027,"},{"line_number":98,"context_line":"                \u0027strategy\u0027: \u0027keystone\u0027,"},{"line_number":99,"context_line":"                \u0027region\u0027: \u0027RegionOne\u0027"},{"line_number":100,"context_line":"            },  # v1 Keystone"},{"line_number":101,"context_line":"            {"},{"line_number":102,"context_line":"                \u0027username\u0027: \u0027user1\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEn%2F%2F30U%3D","line":99,"updated":"2012-02-22 08:15:23.000000000","message":"v1 doesn\u0027t know about \u0027region\u0027.","commit_id":"d2c80c79be30485d61ccf3c4170b6f83d8f3d92f"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"362143f598222a3df3c8e3662b36992c972185ab","unresolved":false,"context_lines":[{"line_number":96,"context_line":"                \u0027auth_url\u0027: \u0027http://localhost/badauthurl/\u0027,"},{"line_number":97,"context_line":"                \u0027password\u0027: \u0027pass\u0027,"},{"line_number":98,"context_line":"                \u0027strategy\u0027: \u0027keystone\u0027,"},{"line_number":99,"context_line":"                \u0027region\u0027: \u0027RegionOne\u0027"},{"line_number":100,"context_line":"            },  # v1 Keystone"},{"line_number":101,"context_line":"            {"},{"line_number":102,"context_line":"                \u0027username\u0027: \u0027user1\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEn%2F%2F3yI%3D","line":99,"in_reply_to":"AAAAEn%2F%2F30U%3D","updated":"2012-02-22 13:21:15.000000000","message":"Nova may set OS_REGION_NAME in the future, I felt it would be useful to check that presence of that variable wouldn\u0027t break v1 auth.","commit_id":"d2c80c79be30485d61ccf3c4170b6f83d8f3d92f"},{"author":{"_account_id":2036,"name":"Juerg Haefliger","email":"juerg.haefliger@hpe.com","username":"juergh"},"change_message_id":"6212a9aae557cb0cf5ef1b6c5e4069423b616da8","unresolved":false,"context_lines":[{"line_number":143,"context_line":"                \u0027username\u0027: \u0027wronguser\u0027,"},{"line_number":144,"context_line":"                \u0027auth_url\u0027: \u0027http://localhost/badauthurl/\u0027,"},{"line_number":145,"context_line":"                \u0027strategy\u0027: \u0027keystone\u0027,"},{"line_number":146,"context_line":"                \u0027region\u0027: \u0027RegionOne\u0027,"},{"line_number":147,"context_line":"                \u0027password\u0027: \u0027pass\u0027"},{"line_number":148,"context_line":"            },  # wrong username"},{"line_number":149,"context_line":"            {"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEn%2F%2F30Q%3D","line":146,"updated":"2012-02-22 08:15:23.000000000","message":"v1 doesn\u0027t now about \u0027region\u0027.","commit_id":"d2c80c79be30485d61ccf3c4170b6f83d8f3d92f"},{"author":{"_account_id":2036,"name":"Juerg Haefliger","email":"juerg.haefliger@hpe.com","username":"juergh"},"change_message_id":"6212a9aae557cb0cf5ef1b6c5e4069423b616da8","unresolved":false,"context_lines":[{"line_number":150,"context_line":"                \u0027username\u0027: \u0027user1\u0027,"},{"line_number":151,"context_line":"                \u0027auth_url\u0027: \u0027http://localhost/badauthurl/\u0027,"},{"line_number":152,"context_line":"                \u0027strategy\u0027: \u0027keystone\u0027,"},{"line_number":153,"context_line":"                \u0027region\u0027: \u0027RegionOne\u0027,"},{"line_number":154,"context_line":"                \u0027password\u0027: \u0027badpass\u0027"},{"line_number":155,"context_line":"            },  # bad password..."},{"line_number":156,"context_line":"        ]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEn%2F%2F30M%3D","line":153,"updated":"2012-02-22 08:15:23.000000000","message":"Same here. This is a v1 URL.","commit_id":"d2c80c79be30485d61ccf3c4170b6f83d8f3d92f"},{"author":{"_account_id":2036,"name":"Juerg Haefliger","email":"juerg.haefliger@hpe.com","username":"juergh"},"change_message_id":"6212a9aae557cb0cf5ef1b6c5e4069423b616da8","unresolved":false,"context_lines":[{"line_number":169,"context_line":"                \u0027username\u0027: \u0027user1\u0027,"},{"line_number":170,"context_line":"                \u0027auth_url\u0027: \u0027http://localhost/redirect/\u0027,"},{"line_number":171,"context_line":"                \u0027password\u0027: \u0027pass\u0027,"},{"line_number":172,"context_line":"                \u0027region\u0027: \u0027RegionOne\u0027"},{"line_number":173,"context_line":"            }"},{"line_number":174,"context_line":"        ]"},{"line_number":175,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEn%2F%2F30I%3D","line":172,"updated":"2012-02-22 08:15:23.000000000","message":"Same here.","commit_id":"d2c80c79be30485d61ccf3c4170b6f83d8f3d92f"},{"author":{"_account_id":2036,"name":"Juerg Haefliger","email":"juerg.haefliger@hpe.com","username":"juergh"},"change_message_id":"6212a9aae557cb0cf5ef1b6c5e4069423b616da8","unresolved":false,"context_lines":[{"line_number":188,"context_line":"                \u0027auth_url\u0027: \u0027http://localhost/redirect/\u0027,"},{"line_number":189,"context_line":"                \u0027password\u0027: \u0027pass\u0027,"},{"line_number":190,"context_line":"                \u0027strategy\u0027: \u0027keystone\u0027,"},{"line_number":191,"context_line":"                \u0027region\u0027: \u0027RegionOne\u0027"},{"line_number":192,"context_line":"            }"},{"line_number":193,"context_line":"        ]"},{"line_number":194,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEn%2F%2F30E%3D","line":191,"updated":"2012-02-22 08:15:23.000000000","message":"Same here.","commit_id":"d2c80c79be30485d61ccf3c4170b6f83d8f3d92f"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"5bd49ac76ceb95ccef962bd8c5ed158052be435a","unresolved":false,"context_lines":[{"line_number":307,"context_line":"            except exception.MissingCredentialError:"},{"line_number":308,"context_line":"                continue"},{"line_number":309,"context_line":"            self.fail(\"Failed to raise MissingCredentialError when supplying \""},{"line_number":310,"context_line":"                \"no region: %r\" % creds)"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"        wrong_region_creds \u003d ["},{"line_number":313,"context_line":"            {"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEn%2F%2F4aM%3D","line":310,"updated":"2012-02-21 17:24:22.000000000","message":"Slight clearer sturcture below?\n\n        for creds in no_region_creds:\n\t\ttry:\n\t\t         plugin \u003d auth.KeystoneStrategy(creds)\n\t\t         plugin.authenticate()\n                         self.fail(\"Failed to raise MissingCredentialError when ...\")\n\t\texcept exception.MissingCredentialError:\n\t\t         pass\n\ni.e. avoiding the continue to by-pass the self.fail().","commit_id":"d2c80c79be30485d61ccf3c4170b6f83d8f3d92f"},{"author":{"_account_id":2036,"name":"Juerg Haefliger","email":"juerg.haefliger@hpe.com","username":"juergh"},"change_message_id":"6212a9aae557cb0cf5ef1b6c5e4069423b616da8","unresolved":false,"context_lines":[{"line_number":337,"context_line":"                \u0027password\u0027: \u0027pass\u0027,"},{"line_number":338,"context_line":"                \u0027region\u0027: \u0027RegionOne\u0027"},{"line_number":339,"context_line":"            }"},{"line_number":340,"context_line":"        ]"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"        for creds in no_strategy_creds:"},{"line_number":343,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEn%2F%2F3z8%3D","line":340,"updated":"2012-02-22 08:15:23.000000000","message":"Maybe lump no_strategy_creds together with no_region_creds into a missing_creds array.","commit_id":"d2c80c79be30485d61ccf3c4170b6f83d8f3d92f"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"c332a15bbe133233d7c5e25b15ce934776c1151e","unresolved":false,"context_lines":[{"line_number":237,"context_line":"                self.fail(\"Failed to raise MissingCredentialError when \""},{"line_number":238,"context_line":"                          \"supplying no strategy: %r\" % creds)"},{"line_number":239,"context_line":"            except exception.MissingCredentialError:"},{"line_number":240,"context_line":"                continue  # Expected"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"        good_creds \u003d ["},{"line_number":243,"context_line":"            {"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F1JY%3D","line":240,"updated":"2012-02-28 14:55:15.000000000","message":"No need for continue at the end of a for loop (as there\u0027s nothing to skip) - the pass statement would be more appropriate here.","commit_id":"3cb49c98b5ae482668ca3589862ae6e2cf98253c"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"9a4e1f110ae9de9637641a7c5f0d4d86bac6798f","unresolved":false,"context_lines":[{"line_number":237,"context_line":"                self.fail(\"Failed to raise MissingCredentialError when \""},{"line_number":238,"context_line":"                          \"supplying no strategy: %r\" % creds)"},{"line_number":239,"context_line":"            except exception.MissingCredentialError:"},{"line_number":240,"context_line":"                continue  # Expected"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"        good_creds \u003d ["},{"line_number":243,"context_line":"            {"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAEn%2F%2F1IE%3D","line":240,"in_reply_to":"AAAAEn%2F%2F1JY%3D","updated":"2012-02-28 15:56:45.000000000","message":"Sure. Or even don\u0027t define no_strategy_creds as a list and also change to pass.","commit_id":"3cb49c98b5ae482668ca3589862ae6e2cf98253c"}]}
