)]}'
{"keystoneclient/access.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"2fa11513a2cd7092d28ebdd3abb89f4b2d6be37b","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from keystoneclient.openstack.common import timeutils"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"# gap, in seconds, to determine whether the given token is about to expired"},{"line_number":24,"context_line":"DEFAULT_TOKEN_EXPIRES_GAP \u003d \u002730\u0027"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMH%2F%2F8hs%3D","line":23,"updated":"2012-11-14 19:31:42.000000000","message":"expired -\u003e expire","commit_id":"b784b99416297e43c44a6eec2d084e250d087532"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"2fa11513a2cd7092d28ebdd3abb89f4b2d6be37b","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"# gap, in seconds, to determine whether the given token is about to expired"},{"line_number":24,"context_line":"DEFAULT_TOKEN_EXPIRES_GAP \u003d \u002730\u0027"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class AccessInfo(dict):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMH%2F%2F8hg%3D","line":24,"updated":"2012-11-14 19:31:42.000000000","message":"i\u0027ve seen this referred to as a \"stale duration\" -- the period of time in which something is valid but pending expiration. Suggest renaming to:\n\n    STALE_TOKEN_DURATION","commit_id":"b784b99416297e43c44a6eec2d084e250d087532"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"2fa11513a2cd7092d28ebdd3abb89f4b2d6be37b","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":32,"context_line":"        dict.__init__(self, *args, **kwargs)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    def will_expire_soon(self, expires_gap\u003dDEFAULT_TOKEN_EXPIRES_GAP):"},{"line_number":35,"context_line":"        \"\"\" Determines if expiration is about to occur."},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"        :return: boolean : true if expiration is within the give expires gap"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMH%2F%2F8gs%3D","line":34,"updated":"2012-11-14 19:31:42.000000000","message":"the constant needs to be set inside the method, otherwise you can\u0027t really override it by changing the value of the constant:\n\n    def will_expire_soon(self, stale_duration\u003dNone):\n        stale_duration \u003d stale_duration or STALE_TOKEN_DURATION\n        ...","commit_id":"b784b99416297e43c44a6eec2d084e250d087532"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"2fa11513a2cd7092d28ebdd3abb89f4b2d6be37b","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    def will_expire_soon(self, expires_gap\u003dDEFAULT_TOKEN_EXPIRES_GAP):"},{"line_number":35,"context_line":"        \"\"\" Determines if expiration is about to occur."},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"        :return: boolean : true if expiration is within the give expires gap"},{"line_number":38,"context_line":"        \"\"\""},{"line_number":39,"context_line":"        iso_expires \u003d timeutils.parse_isotime(self.expires)"},{"line_number":40,"context_line":"        norm_expires \u003d timeutils.normalize_time(iso_expires)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMH%2F%2F8gk%3D","line":37,"updated":"2012-11-14 19:31:42.000000000","message":"blank line at the end","commit_id":"b784b99416297e43c44a6eec2d084e250d087532"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"2fa11513a2cd7092d28ebdd3abb89f4b2d6be37b","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    @property"},{"line_number":47,"context_line":"    def expires(self):"},{"line_number":48,"context_line":"        \"\"\" Returns the token expiration associated with the authentication"},{"line_number":49,"context_line":"        request."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"        :returns: str"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMH%2F%2F8gc%3D","line":48,"updated":"2012-11-14 19:31:42.000000000","message":"first line of docstr should fit on a single line","commit_id":"b784b99416297e43c44a6eec2d084e250d087532"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"2fa11513a2cd7092d28ebdd3abb89f4b2d6be37b","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        \"\"\" Returns the token expiration associated with the authentication"},{"line_number":49,"context_line":"        request."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"        :returns: str"},{"line_number":52,"context_line":"        \"\"\""},{"line_number":53,"context_line":"        return self[\u0027token\u0027][\u0027expires\u0027]"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMH%2F%2F8gg%3D","line":51,"updated":"2012-11-14 19:31:42.000000000","message":"blank line at the end","commit_id":"b784b99416297e43c44a6eec2d084e250d087532"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"2fa11513a2cd7092d28ebdd3abb89f4b2d6be37b","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"        :returns: str"},{"line_number":52,"context_line":"        \"\"\""},{"line_number":53,"context_line":"        return self[\u0027token\u0027][\u0027expires\u0027]"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    @property"},{"line_number":56,"context_line":"    def auth_token(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMH%2F%2F8gY%3D","line":53,"updated":"2012-11-14 19:31:42.000000000","message":"i feel like this property should return a datetime, not a string","commit_id":"b784b99416297e43c44a6eec2d084e250d087532"}],"keystoneclient/client.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"0c8774c3604ba833464b09375eb3d0aa671271be","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    def __init__(self, username\u003dNone, tenant_id\u003dNone, tenant_name\u003dNone,"},{"line_number":50,"context_line":"                 password\u003dNone, auth_url\u003dNone, region_name\u003dNone, timeout\u003dNone,"},{"line_number":51,"context_line":"                 endpoint\u003dNone, token\u003dNone, cacert\u003dNone, key\u003dNone,"},{"line_number":52,"context_line":"                 cert\u003dNone, insecure\u003dFalse, original_ip\u003dNone, no_keyring\u003dFalse,"},{"line_number":53,"context_line":"                 force_new_token\u003dFalse, token_expires_gap\u003d\u002715\u0027):"},{"line_number":54,"context_line":"        global has_keyring"},{"line_number":55,"context_line":"        super(HTTPClient, self).__init__(timeout\u003dtimeout, ca_certs\u003dcacert)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALn%2F%2FvUA%3D","line":52,"updated":"2012-11-09 01:57:09.000000000","message":"definitely avoid a double negative default here\n\n    use_keyring\u003dTrue","commit_id":"93d275adf19baa4926cc31643cd4a0f0b43acdec"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"7e85cf76969eb1f10eb5870cdbba3d18516cf1e5","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    def __init__(self, username\u003dNone, tenant_id\u003dNone, tenant_name\u003dNone,"},{"line_number":50,"context_line":"                 password\u003dNone, auth_url\u003dNone, region_name\u003dNone, timeout\u003dNone,"},{"line_number":51,"context_line":"                 endpoint\u003dNone, token\u003dNone, cacert\u003dNone, key\u003dNone,"},{"line_number":52,"context_line":"                 cert\u003dNone, insecure\u003dFalse, original_ip\u003dNone, no_keyring\u003dFalse,"},{"line_number":53,"context_line":"                 force_new_token\u003dFalse, token_expires_gap\u003d\u002715\u0027):"},{"line_number":54,"context_line":"        global has_keyring"},{"line_number":55,"context_line":"        super(HTTPClient, self).__init__(timeout\u003dtimeout, ca_certs\u003dcacert)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALn%2F%2Fubs%3D","line":52,"in_reply_to":"AAAALn%2F%2FvA4%3D","updated":"2012-11-09 19:45:59.000000000","message":"k. make sense","commit_id":"93d275adf19baa4926cc31643cd4a0f0b43acdec"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"a6c9e91373d0ed35ebffda02b80194a149edfd7c","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    def __init__(self, username\u003dNone, tenant_id\u003dNone, tenant_name\u003dNone,"},{"line_number":50,"context_line":"                 password\u003dNone, auth_url\u003dNone, region_name\u003dNone, timeout\u003dNone,"},{"line_number":51,"context_line":"                 endpoint\u003dNone, token\u003dNone, cacert\u003dNone, key\u003dNone,"},{"line_number":52,"context_line":"                 cert\u003dNone, insecure\u003dFalse, original_ip\u003dNone, no_keyring\u003dFalse,"},{"line_number":53,"context_line":"                 force_new_token\u003dFalse, token_expires_gap\u003d\u002715\u0027):"},{"line_number":54,"context_line":"        global has_keyring"},{"line_number":55,"context_line":"        super(HTTPClient, self).__init__(timeout\u003dtimeout, ca_certs\u003dcacert)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALn%2F%2FvA4%3D","line":52,"in_reply_to":"AAAALn%2F%2FvTE%3D","updated":"2012-11-09 12:14:19.000000000","message":"Instead of \"use a keyring\" the default variable name / value reads as \"don\u0027t not use a keyring.\"","commit_id":"93d275adf19baa4926cc31643cd4a0f0b43acdec"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"71b2fd5a7b9126fdd0210a77e984b4e8182cb9dc","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    def __init__(self, username\u003dNone, tenant_id\u003dNone, tenant_name\u003dNone,"},{"line_number":50,"context_line":"                 password\u003dNone, auth_url\u003dNone, region_name\u003dNone, timeout\u003dNone,"},{"line_number":51,"context_line":"                 endpoint\u003dNone, token\u003dNone, cacert\u003dNone, key\u003dNone,"},{"line_number":52,"context_line":"                 cert\u003dNone, insecure\u003dFalse, original_ip\u003dNone, no_keyring\u003dFalse,"},{"line_number":53,"context_line":"                 force_new_token\u003dFalse, token_expires_gap\u003d\u002715\u0027):"},{"line_number":54,"context_line":"        global has_keyring"},{"line_number":55,"context_line":"        super(HTTPClient, self).__init__(timeout\u003dtimeout, ca_certs\u003dcacert)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALn%2F%2FvTE%3D","line":52,"in_reply_to":"AAAALn%2F%2FvUA%3D","updated":"2012-11-09 02:26:19.000000000","message":"Not sure if I understand the rationale here.","commit_id":"93d275adf19baa4926cc31643cd4a0f0b43acdec"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"0c8774c3604ba833464b09375eb3d0aa671271be","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        self.original_token \u003d token"},{"line_number":71,"context_line":"        # user elect to disable keyring"},{"line_number":72,"context_line":"        if no_keyring:"},{"line_number":73,"context_line":"            has_keyring \u003d False"},{"line_number":74,"context_line":"        self.force_new_token \u003d force_new_token"},{"line_number":75,"context_line":"        self.token_expires_gap \u003d float(token_expires_gap)"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALn%2F%2FvUE%3D","line":73,"updated":"2012-11-09 01:57:09.000000000","message":"is there a reason you used a global for all this?\n\n    try:\n        self.use_keyring \u003d keyring and use_keyring\n    except NameError:\n        self.use_keyring \u003d False","commit_id":"93d275adf19baa4926cc31643cd4a0f0b43acdec"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"7e85cf76969eb1f10eb5870cdbba3d18516cf1e5","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        self.original_token \u003d token"},{"line_number":71,"context_line":"        # user elect to disable keyring"},{"line_number":72,"context_line":"        if no_keyring:"},{"line_number":73,"context_line":"            has_keyring \u003d False"},{"line_number":74,"context_line":"        self.force_new_token \u003d force_new_token"},{"line_number":75,"context_line":"        self.token_expires_gap \u003d float(token_expires_gap)"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALn%2F%2Fubk%3D","line":73,"in_reply_to":"AAAALn%2F%2FvA0%3D","updated":"2012-11-09 19:45:59.000000000","message":"Nova\u0027s doing the samething, using has_keyring global variable to indicate the availability of keyring. I don\u0027t see a problem with this practice.","commit_id":"93d275adf19baa4926cc31643cd4a0f0b43acdec"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"a6c9e91373d0ed35ebffda02b80194a149edfd7c","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        self.original_token \u003d token"},{"line_number":71,"context_line":"        # user elect to disable keyring"},{"line_number":72,"context_line":"        if no_keyring:"},{"line_number":73,"context_line":"            has_keyring \u003d False"},{"line_number":74,"context_line":"        self.force_new_token \u003d force_new_token"},{"line_number":75,"context_line":"        self.token_expires_gap \u003d float(token_expires_gap)"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALn%2F%2FvA0%3D","line":73,"in_reply_to":"AAAALn%2F%2FvTI%3D","updated":"2012-11-09 12:14:19.000000000","message":"Correct- I don\u0027t see a reason for it to be a global variable rather than scoped as an instance variable.","commit_id":"93d275adf19baa4926cc31643cd4a0f0b43acdec"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"71b2fd5a7b9126fdd0210a77e984b4e8182cb9dc","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        self.original_token \u003d token"},{"line_number":71,"context_line":"        # user elect to disable keyring"},{"line_number":72,"context_line":"        if no_keyring:"},{"line_number":73,"context_line":"            has_keyring \u003d False"},{"line_number":74,"context_line":"        self.force_new_token \u003d force_new_token"},{"line_number":75,"context_line":"        self.token_expires_gap \u003d float(token_expires_gap)"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALn%2F%2FvTI%3D","line":73,"in_reply_to":"AAAALn%2F%2FvUE%3D","updated":"2012-11-09 02:26:19.000000000","message":"See line 24-31. has_keyring indicates whether keyring is available. I am basically using it for no_keyring as convenience.","commit_id":"93d275adf19baa4926cc31643cd4a0f0b43acdec"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"2cd0462b3b652844e58474e7f975275cdfdab77a","unresolved":false,"context_lines":[{"line_number":111,"context_line":"            for index, key in enumerate(keys):"},{"line_number":112,"context_line":"                if key is None:"},{"line_number":113,"context_line":"                    keys[index] \u003d \u0027?\u0027"},{"line_number":114,"context_line":"            keyring_key \u003d \"/\".join(keys)"},{"line_number":115,"context_line":"            try:"},{"line_number":116,"context_line":"                raw_token \u003d keyring.get_password(\"keystoneclient_auth\","},{"line_number":117,"context_line":"                                                 keyring_key)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALn%2F%2FvAg%3D","line":114,"updated":"2012-11-09 12:29:35.000000000","message":"single quotes throughout (see HACKING)","commit_id":"93d275adf19baa4926cc31643cd4a0f0b43acdec"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"7e85cf76969eb1f10eb5870cdbba3d18516cf1e5","unresolved":false,"context_lines":[{"line_number":111,"context_line":"            for index, key in enumerate(keys):"},{"line_number":112,"context_line":"                if key is None:"},{"line_number":113,"context_line":"                    keys[index] \u003d \u0027?\u0027"},{"line_number":114,"context_line":"            keyring_key \u003d \"/\".join(keys)"},{"line_number":115,"context_line":"            try:"},{"line_number":116,"context_line":"                raw_token \u003d keyring.get_password(\"keystoneclient_auth\","},{"line_number":117,"context_line":"                                                 keyring_key)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALn%2F%2Fubg%3D","line":114,"in_reply_to":"AAAALn%2F%2FvAg%3D","updated":"2012-11-09 19:45:59.000000000","message":"Good catch.","commit_id":"93d275adf19baa4926cc31643cd4a0f0b43acdec"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"2cd0462b3b652844e58474e7f975275cdfdab77a","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                    raw_token \u003d pickle.loads(raw_token)"},{"line_number":120,"context_line":"                    # see if the token has expired"},{"line_number":121,"context_line":"                    timestamp \u003d raw_token[\u0027token\u0027][\u0027expires\u0027]"},{"line_number":122,"context_line":"                    expires \u003d iso8601.parse_date(timestamp).strftime(\u0027%s\u0027)"},{"line_number":123,"context_line":"                    if (time.time() + self.token_expires_gap) \u003e float(expires):"},{"line_number":124,"context_line":"                        # token has expired, don\u0027t use it"},{"line_number":125,"context_line":"                        raw_token \u003d None"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALn%2F%2FvAk%3D","line":122,"updated":"2012-11-09 12:29:35.000000000","message":"i think there\u0027s something in openstack.common.timeutils for this","commit_id":"93d275adf19baa4926cc31643cd4a0f0b43acdec"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"2cd0462b3b652844e58474e7f975275cdfdab77a","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                    if (time.time() + self.token_expires_gap) \u003e float(expires):"},{"line_number":124,"context_line":"                        # token has expired, don\u0027t use it"},{"line_number":125,"context_line":"                        raw_token \u003d None"},{"line_number":126,"context_line":"            except Exception, e:"},{"line_number":127,"context_line":"                raw_token \u003d None"},{"line_number":128,"context_line":"                _logger.debug(\u0027Unable to retrieve token from keyring %s\u0027 % (e))"},{"line_number":129,"context_line":"        return (keyring_key, raw_token)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALn%2F%2FvAc%3D","line":126,"updated":"2012-11-09 12:29:35.000000000","message":"This syntax is deprecated, as it looks like a tuple. use \u0027Exception as e\u0027","commit_id":"93d275adf19baa4926cc31643cd4a0f0b43acdec"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"7e85cf76969eb1f10eb5870cdbba3d18516cf1e5","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                    if (time.time() + self.token_expires_gap) \u003e float(expires):"},{"line_number":124,"context_line":"                        # token has expired, don\u0027t use it"},{"line_number":125,"context_line":"                        raw_token \u003d None"},{"line_number":126,"context_line":"            except Exception, e:"},{"line_number":127,"context_line":"                raw_token \u003d None"},{"line_number":128,"context_line":"                _logger.debug(\u0027Unable to retrieve token from keyring %s\u0027 % (e))"},{"line_number":129,"context_line":"        return (keyring_key, raw_token)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALn%2F%2FubY%3D","line":126,"in_reply_to":"AAAALn%2F%2FvAc%3D","updated":"2012-11-09 19:45:59.000000000","message":"Good catch.","commit_id":"93d275adf19baa4926cc31643cd4a0f0b43acdec"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"2cd0462b3b652844e58474e7f975275cdfdab77a","unresolved":false,"context_lines":[{"line_number":125,"context_line":"                        raw_token \u003d None"},{"line_number":126,"context_line":"            except Exception, e:"},{"line_number":127,"context_line":"                raw_token \u003d None"},{"line_number":128,"context_line":"                _logger.debug(\u0027Unable to retrieve token from keyring %s\u0027 % (e))"},{"line_number":129,"context_line":"        return (keyring_key, raw_token)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def store_token_into_keyring(self, keyring_key, raw_token):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALn%2F%2FvAQ%3D","line":128,"updated":"2012-11-09 12:29:35.000000000","message":"debug -\u003e error/warning","commit_id":"93d275adf19baa4926cc31643cd4a0f0b43acdec"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"7e85cf76969eb1f10eb5870cdbba3d18516cf1e5","unresolved":false,"context_lines":[{"line_number":125,"context_line":"                        raw_token \u003d None"},{"line_number":126,"context_line":"            except Exception, e:"},{"line_number":127,"context_line":"                raw_token \u003d None"},{"line_number":128,"context_line":"                _logger.debug(\u0027Unable to retrieve token from keyring %s\u0027 % (e))"},{"line_number":129,"context_line":"        return (keyring_key, raw_token)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def store_token_into_keyring(self, keyring_key, raw_token):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALn%2F%2FubM%3D","line":128,"in_reply_to":"AAAALn%2F%2FvAQ%3D","updated":"2012-11-09 19:45:59.000000000","message":"I am fine with warning. Error implies showstopper. Unable to retrieve token from keyring is not a showstopper since we\u0027ll do re-authenticate.","commit_id":"93d275adf19baa4926cc31643cd4a0f0b43acdec"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"2cd0462b3b652844e58474e7f975275cdfdab77a","unresolved":false,"context_lines":[{"line_number":133,"context_line":"            try:"},{"line_number":134,"context_line":"                keyring.set_password(\"keystoneclient_auth\","},{"line_number":135,"context_line":"                                     keyring_key, pickle.dumps(raw_token))"},{"line_number":136,"context_line":"            except Exception, e:"},{"line_number":137,"context_line":"                _logger.debug(\"Failed to store token into keyring %s\" % (e))"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def get_token(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALn%2F%2FvAY%3D","line":136,"updated":"2012-11-09 12:29:35.000000000","message":"Exception as e\n\nP.S. are there any specific exceptions you can catch here, and avoid putting tracebacks in the log?","commit_id":"93d275adf19baa4926cc31643cd4a0f0b43acdec"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"7e85cf76969eb1f10eb5870cdbba3d18516cf1e5","unresolved":false,"context_lines":[{"line_number":133,"context_line":"            try:"},{"line_number":134,"context_line":"                keyring.set_password(\"keystoneclient_auth\","},{"line_number":135,"context_line":"                                     keyring_key, pickle.dumps(raw_token))"},{"line_number":136,"context_line":"            except Exception, e:"},{"line_number":137,"context_line":"                _logger.debug(\"Failed to store token into keyring %s\" % (e))"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def get_token(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALn%2F%2FubA%3D","line":136,"in_reply_to":"AAAALn%2F%2FvAY%3D","updated":"2012-11-09 19:45:59.000000000","message":"I\u0027ll log it as warning. The reasons for the catch here are\n\n1) log the problem\n2) unable to store token into keyring is not a showstopper","commit_id":"93d275adf19baa4926cc31643cd4a0f0b43acdec"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"2cd0462b3b652844e58474e7f975275cdfdab77a","unresolved":false,"context_lines":[{"line_number":134,"context_line":"                keyring.set_password(\"keystoneclient_auth\","},{"line_number":135,"context_line":"                                     keyring_key, pickle.dumps(raw_token))"},{"line_number":136,"context_line":"            except Exception, e:"},{"line_number":137,"context_line":"                _logger.debug(\"Failed to store token into keyring %s\" % (e))"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def get_token(self):"},{"line_number":140,"context_line":"        \"\"\" Authenticate against the Identity API to get a token."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALn%2F%2FvAU%3D","line":137,"updated":"2012-11-09 12:29:35.000000000","message":"i assume this should log to error/warning, not debug?","commit_id":"93d275adf19baa4926cc31643cd4a0f0b43acdec"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"7e85cf76969eb1f10eb5870cdbba3d18516cf1e5","unresolved":false,"context_lines":[{"line_number":134,"context_line":"                keyring.set_password(\"keystoneclient_auth\","},{"line_number":135,"context_line":"                                     keyring_key, pickle.dumps(raw_token))"},{"line_number":136,"context_line":"            except Exception, e:"},{"line_number":137,"context_line":"                _logger.debug(\"Failed to store token into keyring %s\" % (e))"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def get_token(self):"},{"line_number":140,"context_line":"        \"\"\" Authenticate against the Identity API to get a token."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALn%2F%2Fua4%3D","line":137,"in_reply_to":"AAAALn%2F%2FvAU%3D","updated":"2012-11-09 19:45:59.000000000","message":"warning then.","commit_id":"93d275adf19baa4926cc31643cd4a0f0b43acdec"},{"author":{"_account_id":6,"name":"Joe Heck","email":"heckj@mac.com","username":"heckj"},"change_message_id":"908eae9e19e9c6bd4b2c82b8bdb2c9164caad711","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                self.use_keyring \u003d False"},{"line_number":100,"context_line":"                pass"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def authenticate(self, username\u003dNone, password\u003dNone, tenant_name\u003dNone,"},{"line_number":103,"context_line":"                     tenant_id\u003dNone, auth_url\u003dNone, token\u003dNone):"},{"line_number":104,"context_line":"        \"\"\" Authenticate user."},{"line_number":105,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAMH%2F%2F%2BLU%3D","line":102,"updated":"2012-11-13 17:24:57.000000000","message":"If we\u0027re going to make this something other than an abstract method, we should integrate your keyring mechanisms into the v2/client/authenticate() method and include that all here, refactoring to remove some of the cruft. Without doing that, we\u0027re laying up complexity pretty heavily.","commit_id":"0ac13cf01fd91266d10d7b95ffee373bcc1744c7"},{"author":{"_account_id":6,"name":"Joe Heck","email":"heckj@mac.com","username":"heckj"},"change_message_id":"908eae9e19e9c6bd4b2c82b8bdb2c9164caad711","unresolved":false,"context_lines":[{"line_number":170,"context_line":"                    keys[index] \u003d \u0027?\u0027"},{"line_number":171,"context_line":"            keyring_key \u003d \u0027/\u0027.join(keys)"},{"line_number":172,"context_line":"            try:"},{"line_number":173,"context_line":"                raw_token \u003d self._keyring.get_password(\"keystoneclient_auth\","},{"line_number":174,"context_line":"                                                       keyring_key)"},{"line_number":175,"context_line":"                if raw_token:"},{"line_number":176,"context_line":"                    raw_token \u003d self._pickle.loads(raw_token)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAMH%2F%2F%2BLE%3D","line":173,"updated":"2012-11-13 17:24:57.000000000","message":"Why aren\u0027t you using auth_ref and serializing that down, and then initializing/authenticate() with that as a reference to restore? That\u0027s the whole point of auth_ref.\n\nThis is making a side-pass and providing two paths that do effectively the same thing. Is there some changes that needs to happen to auth_ref to make that viable for you? Something that doesn\u0027t work?","commit_id":"0ac13cf01fd91266d10d7b95ffee373bcc1744c7"},{"author":{"_account_id":6,"name":"Joe Heck","email":"heckj@mac.com","username":"heckj"},"change_message_id":"908eae9e19e9c6bd4b2c82b8bdb2c9164caad711","unresolved":false,"context_lines":[{"line_number":177,"context_line":"                    # see if the token has expired"},{"line_number":178,"context_line":"                    timestamp \u003d raw_token[\u0027token\u0027][\u0027expires\u0027]"},{"line_number":179,"context_line":"                    expires \u003d self._iso8601.parse_date(timestamp)"},{"line_number":180,"context_line":"                    expires \u003d expires.strftime(\u0027%s\u0027)"},{"line_number":181,"context_line":"                    if (time.time() + self.token_expires_gap) \u003e float(expires):"},{"line_number":182,"context_line":"                        # token has expired, don\u0027t use it"},{"line_number":183,"context_line":"                        raw_token \u003d None"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAMH%2F%2F%2BKU%3D","line":180,"updated":"2012-11-13 17:24:57.000000000","message":"I learned the hard way with the last update that you need to use timeutils and normalize out the times here. Chances are the error you\u0027re seeing in devstack is a traceback hidden between services because it\u0027s not letting you compare the times. (haven\u0027t verified that). \n\ncheck out the code in auth_token middleware around expire_soon() and how it verifies the expiry for some example bits of how to do it.","commit_id":"0ac13cf01fd91266d10d7b95ffee373bcc1744c7"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"cd4c0987076d1651e9655343a07ef843e4b4e332","unresolved":false,"context_lines":[{"line_number":41,"context_line":"                 endpoint\u003dNone, token\u003dNone, cacert\u003dNone, key\u003dNone,"},{"line_number":42,"context_line":"                 cert\u003dNone, insecure\u003dFalse, original_ip\u003dNone, debug\u003dFalse,"},{"line_number":43,"context_line":"                 auth_ref\u003dNone, use_keyring\u003dTrue, force_new_token\u003dFalse,"},{"line_number":44,"context_line":"                 token_expires_gap\u003d\u002730\u0027):"},{"line_number":45,"context_line":"        super(HTTPClient, self).__init__(timeout\u003dtimeout, ca_certs\u003dcacert)"},{"line_number":46,"context_line":"        if cert:"},{"line_number":47,"context_line":"            if key:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAMH%2F%2F8uA%3D","line":44,"updated":"2012-11-14 17:44:02.000000000","message":"You have the magic constant \u002730\u0027 in two files here.  Lets get the default into a single place.","commit_id":"27f61456f0f0daa2e37ad08f4c93b044cbe485aa"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"a20c99f5f707447ad3d83759a6db6a2bf72daedd","unresolved":false,"context_lines":[{"line_number":41,"context_line":"                 endpoint\u003dNone, token\u003dNone, cacert\u003dNone, key\u003dNone,"},{"line_number":42,"context_line":"                 cert\u003dNone, insecure\u003dFalse, original_ip\u003dNone, debug\u003dFalse,"},{"line_number":43,"context_line":"                 auth_ref\u003dNone, use_keyring\u003dTrue, force_new_token\u003dFalse,"},{"line_number":44,"context_line":"                 token_expires_gap\u003d\u002730\u0027):"},{"line_number":45,"context_line":"        super(HTTPClient, self).__init__(timeout\u003dtimeout, ca_certs\u003dcacert)"},{"line_number":46,"context_line":"        if cert:"},{"line_number":47,"context_line":"            if key:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAMH%2F%2F8sQ%3D","line":44,"in_reply_to":"AAAAMH%2F%2F8uA%3D","updated":"2012-11-14 18:01:47.000000000","message":"Good catch!","commit_id":"27f61456f0f0daa2e37ad08f4c93b044cbe485aa"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"a5abfd83e0aa6e8fe9586290751c5e3bc5ef5f83","unresolved":false,"context_lines":[{"line_number":41,"context_line":"                 endpoint\u003dNone, token\u003dNone, cacert\u003dNone, key\u003dNone,"},{"line_number":42,"context_line":"                 cert\u003dNone, insecure\u003dFalse, original_ip\u003dNone, debug\u003dFalse,"},{"line_number":43,"context_line":"                 auth_ref\u003dNone, use_keyring\u003dTrue, force_new_token\u003dFalse,"},{"line_number":44,"context_line":"                 token_expires_gap\u003daccess.DEFAULT_TOKEN_EXPIRES_GAP):"},{"line_number":45,"context_line":"        super(HTTPClient, self).__init__(timeout\u003dtimeout, ca_certs\u003dcacert)"},{"line_number":46,"context_line":"        if cert:"},{"line_number":47,"context_line":"            if key:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMH%2F%2F8gE%3D","line":44,"updated":"2012-11-14 19:50:49.000000000","message":"same issue with referencing constants here as in the other function def","commit_id":"b784b99416297e43c44a6eec2d084e250d087532"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"a5abfd83e0aa6e8fe9586290751c5e3bc5ef5f83","unresolved":false,"context_lines":[{"line_number":90,"context_line":"                import keyring"},{"line_number":91,"context_line":"                import pickle"},{"line_number":92,"context_line":"                self._keyring \u003d keyring"},{"line_number":93,"context_line":"                self._pickle \u003d pickle"},{"line_number":94,"context_line":"            except ImportError:"},{"line_number":95,"context_line":"                _logger.warning(\u0027Failed to load keyring modules.\u0027)"},{"line_number":96,"context_line":"                self.use_keyring \u003d False"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMH%2F%2F8fg%3D","line":93,"updated":"2012-11-14 19:50:49.000000000","message":"would vastly prefer to attempt imports at the top of the file (regardless of whether they\u0027re called or not); keeping references to modules as instance variables is a bit unexpected","commit_id":"b784b99416297e43c44a6eec2d084e250d087532"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"a5abfd83e0aa6e8fe9586290751c5e3bc5ef5f83","unresolved":false,"context_lines":[{"line_number":92,"context_line":"                self._keyring \u003d keyring"},{"line_number":93,"context_line":"                self._pickle \u003d pickle"},{"line_number":94,"context_line":"            except ImportError:"},{"line_number":95,"context_line":"                _logger.warning(\u0027Failed to load keyring modules.\u0027)"},{"line_number":96,"context_line":"                self.use_keyring \u003d False"},{"line_number":97,"context_line":"                pass"},{"line_number":98,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMH%2F%2F8fQ%3D","line":95,"updated":"2012-11-14 19:50:49.000000000","message":"useful warning; definitely preserve that for when keyring is enabled but not installed)","commit_id":"b784b99416297e43c44a6eec2d084e250d087532"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"a5abfd83e0aa6e8fe9586290751c5e3bc5ef5f83","unresolved":false,"context_lines":[{"line_number":94,"context_line":"            except ImportError:"},{"line_number":95,"context_line":"                _logger.warning(\u0027Failed to load keyring modules.\u0027)"},{"line_number":96,"context_line":"                self.use_keyring \u003d False"},{"line_number":97,"context_line":"                pass"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def authenticate(self, username\u003dNone, password\u003dNone, tenant_name\u003dNone,"},{"line_number":100,"context_line":"                     tenant_id\u003dNone, auth_url\u003dNone, token\u003dNone):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMH%2F%2F8f0%3D","line":97,"updated":"2012-11-14 19:50:49.000000000","message":"remove pass","commit_id":"b784b99416297e43c44a6eec2d084e250d087532"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"a5abfd83e0aa6e8fe9586290751c5e3bc5ef5f83","unresolved":false,"context_lines":[{"line_number":97,"context_line":"                pass"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def authenticate(self, username\u003dNone, password\u003dNone, tenant_name\u003dNone,"},{"line_number":100,"context_line":"                     tenant_id\u003dNone, auth_url\u003dNone, token\u003dNone):"},{"line_number":101,"context_line":"        \"\"\" Authenticate user."},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        Uses the data provided at instantiation to authenticate against"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMH%2F%2F8f4%3D","line":100,"updated":"2012-11-14 19:50:49.000000000","message":"nice; i like moving this up to this class quite a bit","commit_id":"b784b99416297e43c44a6eec2d084e250d087532"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"a5abfd83e0aa6e8fe9586290751c5e3bc5ef5f83","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        * if token is not found in keyring"},{"line_number":128,"context_line":"        * if token retrieved from keyring is expired or about to"},{"line_number":129,"context_line":"          expired (as determined by token_expires_gap)"},{"line_number":130,"context_line":"        * if force_new_token is true"},{"line_number":131,"context_line":"        \"\"\""},{"line_number":132,"context_line":"        auth_url \u003d auth_url or self.auth_url"},{"line_number":133,"context_line":"        username \u003d username or self.username"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMH%2F%2F8fI%3D","line":130,"updated":"2012-11-14 19:50:49.000000000","message":"add a blank line at the end of the docstr","commit_id":"b784b99416297e43c44a6eec2d084e250d087532"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"a5abfd83e0aa6e8fe9586290751c5e3bc5ef5f83","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                                                               username,"},{"line_number":141,"context_line":"                                                               tenant_name,"},{"line_number":142,"context_line":"                                                               tenant_id,"},{"line_number":143,"context_line":"                                                               token)"},{"line_number":144,"context_line":"        new_token_needed \u003d False"},{"line_number":145,"context_line":"        if auth_ref is None or self.force_new_token:"},{"line_number":146,"context_line":"            new_token_needed \u003d True"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMH%2F%2F8e4%3D","line":143,"updated":"2012-11-14 19:50:49.000000000","message":"this looks like a pep8 failure, but it could just be a font rendering issue in gerrit","commit_id":"b784b99416297e43c44a6eec2d084e250d087532"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"a5abfd83e0aa6e8fe9586290751c5e3bc5ef5f83","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        return True"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    def get_token_from_keyring(self, auth_url, username, tenant_name,"},{"line_number":158,"context_line":"                               tenant_id, token):"},{"line_number":159,"context_line":"        \"\"\" Retrieve auth_ref from keyring."},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        If successful, (keyring_key, raw_token) is returned."}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMH%2F%2F8ek%3D","line":158,"updated":"2012-11-14 19:50:49.000000000","message":"it\u0027s a bit odd that get_token_from_keyring doesn\u0027t return the same type of thing as get_token","commit_id":"b784b99416297e43c44a6eec2d084e250d087532"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"a5abfd83e0aa6e8fe9586290751c5e3bc5ef5f83","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        keyring_key \u003d None"},{"line_number":165,"context_line":"        auth_ref \u003d None"},{"line_number":166,"context_line":"        if self.use_keyring:"},{"line_number":167,"context_line":"            keys \u003d [auth_url, username, tenant_name, tenant_id, token]"},{"line_number":168,"context_line":"            for index, key in enumerate(keys):"},{"line_number":169,"context_line":"                if key is None:"},{"line_number":170,"context_line":"                    keys[index] \u003d \u0027?\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMH%2F%2F8co%3D","line":167,"updated":"2012-11-14 19:50:49.000000000","message":"need to support user_id / username just like tenant_id / tenant_name (missing user_id support)","commit_id":"b784b99416297e43c44a6eec2d084e250d087532"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"a5abfd83e0aa6e8fe9586290751c5e3bc5ef5f83","unresolved":false,"context_lines":[{"line_number":168,"context_line":"            for index, key in enumerate(keys):"},{"line_number":169,"context_line":"                if key is None:"},{"line_number":170,"context_line":"                    keys[index] \u003d \u0027?\u0027"},{"line_number":171,"context_line":"            keyring_key \u003d \u0027/\u0027.join(keys)"},{"line_number":172,"context_line":"            try:"},{"line_number":173,"context_line":"                auth_ref \u003d self._keyring.get_password(\"keystoneclient_auth\","},{"line_number":174,"context_line":"                                                       keyring_key)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMH%2F%2F8eU%3D","line":171,"updated":"2012-11-14 19:50:49.000000000","message":"would be useful to extract the above few lines into a method like build_keyring_key() and use it\u0027s docstr to explain what a keyring_key is","commit_id":"b784b99416297e43c44a6eec2d084e250d087532"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"a5abfd83e0aa6e8fe9586290751c5e3bc5ef5f83","unresolved":false,"context_lines":[{"line_number":195,"context_line":"                _logger.warning(\"Failed to store token into keyring %s\" % (e))"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"    def process_token(self):"},{"line_number":198,"context_line":"        \"\"\" Extract and process information from the new auth_ref."},{"line_number":199,"context_line":"        \"\"\""},{"line_number":200,"context_line":"        raise NotImplementedError"},{"line_number":201,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMH%2F%2F8eE%3D","line":198,"updated":"2012-11-14 19:50:49.000000000","message":"one a one line docstr, the closing \"\"\" should be on the same line.","commit_id":"b784b99416297e43c44a6eec2d084e250d087532"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"a5abfd83e0aa6e8fe9586290751c5e3bc5ef5f83","unresolved":false,"context_lines":[{"line_number":199,"context_line":"        \"\"\""},{"line_number":200,"context_line":"        raise NotImplementedError"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"    def get_token(self, auth_url, username\u003dNone, password\u003dNone,"},{"line_number":203,"context_line":"                  tenant_name\u003dNone, tenant_id\u003dNone, token\u003dNone):"},{"line_number":204,"context_line":"        \"\"\" Authenticate against the Identity API and get a token."},{"line_number":205,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMH%2F%2F8ec%3D","line":202,"updated":"2012-11-14 19:50:49.000000000","message":"perhaps a more verbose name would be appropriate, to differentiate with _from_keyring, e.g.:\n\n    get_token_from_identity_service","commit_id":"b784b99416297e43c44a6eec2d084e250d087532"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"a5abfd83e0aa6e8fe9586290751c5e3bc5ef5f83","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        reference already associated with the client. Invoking this call"},{"line_number":211,"context_line":"        *always* makes a call to the Keystone."},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"        If successful, raw token is returned."},{"line_number":214,"context_line":"        \"\"\""},{"line_number":215,"context_line":"        raise NotImplementedError"},{"line_number":216,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMH%2F%2F8ds%3D","line":213,"updated":"2012-11-14 19:50:49.000000000","message":":returns:","commit_id":"b784b99416297e43c44a6eec2d084e250d087532"},{"author":{"_account_id":6,"name":"Joe Heck","email":"heckj@mac.com","username":"heckj"},"change_message_id":"bb9a5737b0db605c7286af90b2e896efdc2086c7","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        Used to store and retrieve auth_ref from keyring."},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        \"\"\""},{"line_number":166,"context_line":"        keys \u003d [auth_url, username, tenant_name, tenant_id, token]"},{"line_number":167,"context_line":"        for index, key in enumerate(keys):"},{"line_number":168,"context_line":"            if key is None:"},{"line_number":169,"context_line":"                keys[index] \u003d \u0027?\u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAMH%2F%2F77U%3D","line":166,"updated":"2012-11-15 04:55:28.000000000","message":"did you really want to include token in here? that could make for a hellashishly long key with a PKI token, plus I\u0027m not sure that you want to disambiguate across tokens - but more of username+tenant_name.\n\nif you have and use tenant_id, tenant_name is meaningless here\n\nAlso, an unscoped (or user-scoped) token won\u0027t have access to tenant_name or tenant_id, so an unscoped token is likely to throw a KeyError in those cases.","commit_id":"d0c091bdf7a2b3b5fd86d98afdb831d3567817e6"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"69b96475a3d6dbe19844e3f8f8c264edd13951f4","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        Used to store and retrieve auth_ref from keyring."},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        \"\"\""},{"line_number":166,"context_line":"        keys \u003d [auth_url, username, tenant_name, tenant_id, token]"},{"line_number":167,"context_line":"        for index, key in enumerate(keys):"},{"line_number":168,"context_line":"            if key is None:"},{"line_number":169,"context_line":"                keys[index] \u003d \u0027?\u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAMH%2F%2F77E%3D","line":166,"in_reply_to":"AAAAMH%2F%2F77U%3D","updated":"2012-11-15 05:07:28.000000000","message":"I want to token here because it can be rescoped. For example, use an unscoped token to get a scoped token. Keyring key should corresponding to exactly the user input to form a unique key. if tenant_name or tenant_id is not there, it will get replaced with \u0027?\u0027. See line 168-169.","commit_id":"d0c091bdf7a2b3b5fd86d98afdb831d3567817e6"}],"keystoneclient/shell.py":[{"author":{"_account_id":6,"name":"Joe Heck","email":"heckj@mac.com","username":"heckj"},"change_message_id":"908eae9e19e9c6bd4b2c82b8bdb2c9164caad711","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                                 \"against any certificate authorities. This \""},{"line_number":160,"context_line":"                                 \"option should be used with caution.\")"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        parser.add_argument(\u0027--no-keyring\u0027,"},{"line_number":163,"context_line":"                            default\u003dFalse,"},{"line_number":164,"context_line":"                            action\u003d\"store_true\","},{"line_number":165,"context_line":"                            dest\u003d\u0027no_keyring\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAMH%2F%2F%2BKE%3D","line":162,"updated":"2012-11-13 17:24:57.000000000","message":"I really like this option - currently it\u0027s driven in other clients by setting an environment variable. Let\u0027s touch base with Dean and Doug driving UnifiedCLI and suggest this as a common client option.","commit_id":"0ac13cf01fd91266d10d7b95ffee373bcc1744c7"},{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"cd4c0987076d1651e9655343a07ef843e4b4e332","unresolved":false,"context_lines":[{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        parser.add_argument(\u0027--token-expires-gap\u0027,"},{"line_number":181,"context_line":"                            metavar\u003d\u0027\u003cseconds\u003e\u0027,"},{"line_number":182,"context_line":"                            default\u003d\u002715\u0027,"},{"line_number":183,"context_line":"                            dest\u003d\u0027token_expires_gap\u0027,"},{"line_number":184,"context_line":"                            help\u003d\"Gap (in seconds) used to determine whether \""},{"line_number":185,"context_line":"                                 \"a token has expired when retrieving it \""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAMH%2F%2F8to%3D","line":182,"updated":"2012-11-14 17:44:02.000000000","message":"This is a different value than actually used: 30","commit_id":"27f61456f0f0daa2e37ad08f4c93b044cbe485aa"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"a5abfd83e0aa6e8fe9586290751c5e3bc5ef5f83","unresolved":false,"context_lines":[{"line_number":29,"context_line":"from keystoneclient.v2_0 import shell as shell_v2_0"},{"line_number":30,"context_line":"from keystoneclient.generic import shell as shell_generic"},{"line_number":31,"context_line":"from keystoneclient.contrib.bootstrap import shell as shell_bootstrap"},{"line_number":32,"context_line":"from keystoneclient.access import DEFAULT_TOKEN_EXPIRES_GAP"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"def env(*vars, **kwargs):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMH%2F%2F8dk%3D","line":32,"updated":"2012-11-14 19:50:49.000000000","message":"just import the module\n\n    from keystoneclient import access","commit_id":"b784b99416297e43c44a6eec2d084e250d087532"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"a5abfd83e0aa6e8fe9586290751c5e3bc5ef5f83","unresolved":false,"context_lines":[{"line_number":178,"context_line":"                                 \"new token and replace the existing one \""},{"line_number":179,"context_line":"                                 \"in keyring.\")"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"        parser.add_argument(\u0027--token-expires-gap\u0027,"},{"line_number":182,"context_line":"                            metavar\u003d\u0027\u003cseconds\u003e\u0027,"},{"line_number":183,"context_line":"                            default\u003dDEFAULT_TOKEN_EXPIRES_GAP,"},{"line_number":184,"context_line":"                            dest\u003d\u0027token_expires_gap\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMH%2F%2F8dc%3D","line":181,"updated":"2012-11-14 19:50:49.000000000","message":"--stale-token-duration","commit_id":"b784b99416297e43c44a6eec2d084e250d087532"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"a5abfd83e0aa6e8fe9586290751c5e3bc5ef5f83","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                                 \"a token has expired when retrieving it \""},{"line_number":187,"context_line":"                                 \"from keyring. This is useful in \""},{"line_number":188,"context_line":"                                 \"mitigating process or \""},{"line_number":189,"context_line":"                                 \"network delays. Default is 15 seconds.\")"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"        #FIXME(heckj):"},{"line_number":192,"context_line":"        # deprecated command line options for essex compatibility. To be"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAMH%2F%2F8dE%3D","line":189,"updated":"2012-11-14 19:50:49.000000000","message":"string format the default into here from the constant","commit_id":"b784b99416297e43c44a6eec2d084e250d087532"},{"author":{"_account_id":6,"name":"Joe Heck","email":"heckj@mac.com","username":"heckj"},"change_message_id":"bb9a5737b0db605c7286af90b2e896efdc2086c7","unresolved":false,"context_lines":[{"line_number":217,"context_line":""},{"line_number":218,"context_line":"            subparser \u003d subparsers.add_parser("},{"line_number":219,"context_line":"                command,"},{"line_number":220,"context_line":"                help\u003dhelp,"},{"line_number":221,"context_line":"                description\u003ddesc,"},{"line_number":222,"context_line":"                add_help\u003dFalse,"},{"line_number":223,"context_line":"                formatter_class\u003dOpenStackHelpFormatter)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAMH%2F%2F77Q%3D","side":"PARENT","line":220,"updated":"2012-11-15 04:55:28.000000000","message":"why remove this help?","commit_id":"e39351ec65bb00b33d3d57785976daefe9d27c2c"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"69b96475a3d6dbe19844e3f8f8c264edd13951f4","unresolved":false,"context_lines":[{"line_number":217,"context_line":""},{"line_number":218,"context_line":"            subparser \u003d subparsers.add_parser("},{"line_number":219,"context_line":"                command,"},{"line_number":220,"context_line":"                help\u003dhelp,"},{"line_number":221,"context_line":"                description\u003ddesc,"},{"line_number":222,"context_line":"                add_help\u003dFalse,"},{"line_number":223,"context_line":"                formatter_class\u003dOpenStackHelpFormatter)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAMH%2F%2F768%3D","side":"PARENT","line":220,"in_reply_to":"AAAAMH%2F%2F77Q%3D","updated":"2012-11-15 05:07:28.000000000","message":"F0ck! My bad. #vi-failed. I\u0027ll fix.","commit_id":"e39351ec65bb00b33d3d57785976daefe9d27c2c"}],"keystoneclient/v2_0/client.py":[{"author":{"_account_id":6,"name":"Joe Heck","email":"heckj@mac.com","username":"heckj"},"change_message_id":"908eae9e19e9c6bd4b2c82b8bdb2c9164caad711","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        \"\"\"Returns True if this client provides a service catalog.\"\"\""},{"line_number":140,"context_line":"        return hasattr(self, \u0027service_catalog\u0027)"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def process_token(self, raw_token):"},{"line_number":143,"context_line":"        \"\"\" Extract and process the given raw token."},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        And set the relevant authentication information."}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAMH%2F%2F%2BJU%3D","line":142,"updated":"2012-11-13 17:24:57.000000000","message":"this has the unfortunate side effect of breaking horizon, since they current rely and use the authenticate() method on the client, expecting it to act as a combination of get_token and process_token.\n\nFor at least a V2 client, we need to preserve that method and interface for the other projects.","commit_id":"0ac13cf01fd91266d10d7b95ffee373bcc1744c7"},{"author":{"_account_id":6,"name":"Joe Heck","email":"heckj@mac.com","username":"heckj"},"change_message_id":"bb9a5737b0db605c7286af90b2e896efdc2086c7","unresolved":false,"context_lines":[{"line_number":153,"context_line":"                self.management_url \u003d self.auth_ref.management_url[0]"},{"line_number":154,"context_line":"            self.tenant_name \u003d self.auth_ref.tenant_name"},{"line_number":155,"context_line":"            self.tenant_id \u003d self.auth_ref.tenant_id"},{"line_number":156,"context_line":"            self.user_id \u003d self.auth_ref.user_id"},{"line_number":157,"context_line":"        self._extract_service_catalog(self.auth_url, self.auth_ref)"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    def get_raw_token_from_identity_service(self, auth_url, username\u003dNone,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAMH%2F%2F77M%3D","line":156,"updated":"2012-11-15 04:55:28.000000000","message":"userid will be available regardless of scoped or unscoped - should be outside of this indent/stanza","commit_id":"d0c091bdf7a2b3b5fd86d98afdb831d3567817e6"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"69b96475a3d6dbe19844e3f8f8c264edd13951f4","unresolved":false,"context_lines":[{"line_number":153,"context_line":"                self.management_url \u003d self.auth_ref.management_url[0]"},{"line_number":154,"context_line":"            self.tenant_name \u003d self.auth_ref.tenant_name"},{"line_number":155,"context_line":"            self.tenant_id \u003d self.auth_ref.tenant_id"},{"line_number":156,"context_line":"            self.user_id \u003d self.auth_ref.user_id"},{"line_number":157,"context_line":"        self._extract_service_catalog(self.auth_url, self.auth_ref)"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    def get_raw_token_from_identity_service(self, auth_url, username\u003dNone,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAMH%2F%2F77A%3D","line":156,"in_reply_to":"AAAAMH%2F%2F77M%3D","updated":"2012-11-15 05:07:28.000000000","message":"Yes you\u0027re right. I may have to do a rebase after https://review.openstack.org/#/c/16047 is landed.\n\nShould I wait or make the manual change now? Please let me know.","commit_id":"d0c091bdf7a2b3b5fd86d98afdb831d3567817e6"}],"tests/test_shell.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"6f02c32d5592c74762e1db70833e25ab0dc0f2fa","unresolved":false,"context_lines":[{"line_number":96,"context_line":"                  \u0027--os-identity-api-version 2.0 \u0027"},{"line_number":97,"context_line":"                  \u0027--no-keyring \u0027"},{"line_number":98,"context_line":"                  \u0027--stale-duration 500 \u0027"},{"line_number":99,"context_line":"                  \u0027--force-new-token user-list\u0027)"},{"line_number":100,"context_line":"            assert do_tenant_mock.called"},{"line_number":101,"context_line":"            ((a, b), c) \u003d do_tenant_mock.call_args"},{"line_number":102,"context_line":"            actual \u003d (b.os_auth_url, b.os_password, b.os_tenant_id,"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAMH%2F%2F69o%3D","line":99,"updated":"2012-11-15 19:37:36.000000000","message":"does it make sense to force a new token while also disabling keyring?","commit_id":"20522902be6e3e41bc2e8e9b6548c98a4c7ef7ce"},{"author":{"_account_id":1916,"name":"Guang Yee","email":"gyee@suse.com","username":"guang-yee"},"change_message_id":"9220186455e160996396525d51d611c54f65e487","unresolved":false,"context_lines":[{"line_number":96,"context_line":"                  \u0027--os-identity-api-version 2.0 \u0027"},{"line_number":97,"context_line":"                  \u0027--no-keyring \u0027"},{"line_number":98,"context_line":"                  \u0027--stale-duration 500 \u0027"},{"line_number":99,"context_line":"                  \u0027--force-new-token user-list\u0027)"},{"line_number":100,"context_line":"            assert do_tenant_mock.called"},{"line_number":101,"context_line":"            ((a, b), c) \u003d do_tenant_mock.call_args"},{"line_number":102,"context_line":"            actual \u003d (b.os_auth_url, b.os_password, b.os_tenant_id,"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAMH%2F%2F6jI%3D","line":99,"in_reply_to":"AAAAMH%2F%2F69o%3D","updated":"2012-11-15 23:13:49.000000000","message":"No because they are intended for two different purposes. Force token is helpful in the situation where the token as revoked and we need to put the new one into keyring.","commit_id":"20522902be6e3e41bc2e8e9b6548c98a4c7ef7ce"}]}
