)]}'
{"tempest_lib/auth.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"d57b8a02f158319c23118644367f8a7d2150d9df","unresolved":false,"context_lines":[{"line_number":229,"context_line":""},{"line_number":230,"context_line":"class KeystoneV2AuthProvider(KeystoneAuthProvider):"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    EXPIRY_DATE_FORMAT \u003d \u0027%Y-%m-%dT%H:%M:%SZ\u0027"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    def _auth_client(self, auth_url):"},{"line_number":235,"context_line":"        return json_v2id.TokenClientJSON("}],"source_content_type":"text/x-python","patch_set":1,"id":"7ad8896b_bd344b4a","side":"PARENT","line":232,"updated":"2015-05-11 18:47:40.000000000","message":"so, to handle morgan\u0027s second use case, where a token with a floating point expiry is validated on v2 and produces a v2 token with a floating point expiry, this might look like:\n\n  EXPIRY_DATE_FORMATS \u003d (\n    \u0027%Y-%m-%dT%H:%M:%S.%fZ\u0027,\n    \u0027%Y-%m-%dT%H:%M:%SZ\u0027)\n\nwhere both formats are acceptable, and tempest should explicitly try to validate with both, accepting whichever succeeds (not sure it matters what order you try them in).\n\nthese two formats could / should also be refactored into global constants (i.e. ISO8601_INT_SECONDS, ISO8601_FLOAT_SECONDS).","commit_id":"c307ffc525d896e2071319c8067aec805804f92b"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"2118eed1f87d860eba0e9aa469309941b8d6eed4","unresolved":false,"context_lines":[{"line_number":302,"context_line":"    def is_expired(self, auth_data):"},{"line_number":303,"context_line":"        _, access \u003d auth_data"},{"line_number":304,"context_line":"        # Remove time zone from the parsed timestamp to allow comparison"},{"line_number":305,"context_line":"        expiry \u003d iso8601.parse_date("},{"line_number":306,"context_line":"            access[\u0027token\u0027][\u0027expires\u0027]).replace(tzinfo\u003dNone)"},{"line_number":307,"context_line":"        return (expiry - self.token_expiry_threshold \u003c\u003d"},{"line_number":308,"context_line":"                datetime.datetime.now())"}],"source_content_type":"text/x-python","patch_set":1,"id":"1aca2d91_7f86baba","line":305,"updated":"2015-05-06 08:10:03.000000000","message":"Not sure if its worth it, depends on other patterns in tempest, but there is an oslo util for that:\nhttps://github.com/openstack/oslo.utils/blob/master/oslo_utils/timeutils.py#L62","commit_id":"91363cdafe4b497d239733df3302b4ab9349c6d6"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"d57b8a02f158319c23118644367f8a7d2150d9df","unresolved":false,"context_lines":[{"line_number":305,"context_line":"        expiry \u003d iso8601.parse_date("},{"line_number":306,"context_line":"            access[\u0027token\u0027][\u0027expires\u0027]).replace(tzinfo\u003dNone)"},{"line_number":307,"context_line":"        return (expiry - self.token_expiry_threshold \u003c\u003d"},{"line_number":308,"context_line":"                datetime.datetime.now())"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":""},{"line_number":311,"context_line":"class KeystoneV3AuthProvider(KeystoneAuthProvider):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7ad8896b_fded338f","line":308,"updated":"2015-05-11 18:47:40.000000000","message":"dropping utcnow() in favor of now() is likely out of scope and wrong here?","commit_id":"91363cdafe4b497d239733df3302b4ab9349c6d6"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"5d61fb5d06a7ef86afaf3147122cc8fcb2615a70","unresolved":false,"context_lines":[{"line_number":305,"context_line":"        expiry \u003d datetime.datetime.strptime(access[\u0027token\u0027][\u0027expires\u0027],"},{"line_number":306,"context_line":"                                            self.EXPIRY_DATE_FORMAT)"},{"line_number":307,"context_line":"        return (expiry - self.token_expiry_threshold \u003c\u003d"},{"line_number":308,"context_line":"                datetime.datetime.utcnow())"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":""},{"line_number":311,"context_line":"class KeystoneV3AuthProvider(KeystoneAuthProvider):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5afe65bd_5d81d68e","side":"PARENT","line":308,"updated":"2015-06-01 21:36:34.000000000","message":"(nit) the way you\u0027ve written this, it looks like this could *almost* be a method on KeystoneAuthProvider now, instead of being nearly duplicated in both child classes. the only thing that appears different is the source of the token expiration, which could be passed to the super method?","commit_id":"c307ffc525d896e2071319c8067aec805804f92b"},{"author":{"_account_id":97,"name":"Daryl Walleck","email":"daryl.walleck@rackspace.com","username":"dwalleck"},"change_message_id":"17e8dcc6c564cb13f4e0ba4c2121bef81b1393b0","unresolved":false,"context_lines":[{"line_number":305,"context_line":"        expiry \u003d datetime.datetime.strptime(access[\u0027token\u0027][\u0027expires\u0027],"},{"line_number":306,"context_line":"                                            self.EXPIRY_DATE_FORMAT)"},{"line_number":307,"context_line":"        return (expiry - self.token_expiry_threshold \u003c\u003d"},{"line_number":308,"context_line":"                datetime.datetime.utcnow())"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":""},{"line_number":311,"context_line":"class KeystoneV3AuthProvider(KeystoneAuthProvider):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5afe65bd_a83f5d24","side":"PARENT","line":308,"in_reply_to":"5afe65bd_5d81d68e","updated":"2015-06-02 03:47:38.000000000","message":"This a pretty reasonable request which also addresses Steve\u0027s concern of code duplication. I\u0027ll take another pass at this","commit_id":"c307ffc525d896e2071319c8067aec805804f92b"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"dc305f07fae7348e124dd565499288adfe555e09","unresolved":false,"context_lines":[{"line_number":441,"context_line":""},{"line_number":442,"context_line":"    def is_expired(self, auth_data):"},{"line_number":443,"context_line":"        _, access \u003d auth_data"},{"line_number":444,"context_line":"        expiry \u003d None"},{"line_number":445,"context_line":"        for date_format in self.EXPIRY_DATE_FORMATS:"},{"line_number":446,"context_line":"            try:"},{"line_number":447,"context_line":"                expiry \u003d datetime.datetime.strptime(access[\u0027expires_at\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"5afe65bd_78aca0ed","line":444,"updated":"2015-06-01 21:42:24.000000000","message":"could create a common function since this is done twice in the exact same way","commit_id":"e1c719b0d1136b15548bc975cdff983a0a1b9fa9"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"89d00eb720b05d80fe3d81975d79a9229f2647a7","unresolved":false,"context_lines":[{"line_number":247,"context_line":""},{"line_number":248,"context_line":"class KeystoneV2AuthProvider(KeystoneAuthProvider):"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    DEFAULT_EXPIRY_DATE_FORMAT \u003d ISO8601_INT_SECONDS"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"    def _auth_client(self, auth_url):"},{"line_number":253,"context_line":"        return json_v2id.TokenClientJSON("}],"source_content_type":"text/x-python","patch_set":3,"id":"5afe65bd_9f1a9816","line":250,"updated":"2015-06-03 08:25:47.000000000","message":"Does this do anything anymore? If not we probably should just drop it because it\u0027s kinda confusing to declare this and never use it for anything.","commit_id":"a802275c761aa67beb01168cb9df574a4cec2509"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"441d2991db5d5a4f500c11b008b44530a5500fdd","unresolved":false,"context_lines":[{"line_number":247,"context_line":""},{"line_number":248,"context_line":"class KeystoneV2AuthProvider(KeystoneAuthProvider):"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    DEFAULT_EXPIRY_DATE_FORMAT \u003d ISO8601_INT_SECONDS"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"    def _auth_client(self, auth_url):"},{"line_number":253,"context_line":"        return json_v2id.TokenClientJSON("}],"source_content_type":"text/x-python","patch_set":3,"id":"5afe65bd_38fc7571","line":250,"in_reply_to":"5afe65bd_5f484a87","updated":"2015-06-04 08:06:13.000000000","message":"Hmm, yeah I\u0027m thinking modifying the unit tests to go through the list and just dropping this line from both of the subclasses is the way to go. Right now by including this and only using it for the unit tests we\u0027re not covering both cases in the unit tests and we\u0027re including this line unnecessarily.","commit_id":"a802275c761aa67beb01168cb9df574a4cec2509"},{"author":{"_account_id":97,"name":"Daryl Walleck","email":"daryl.walleck@rackspace.com","username":"dwalleck"},"change_message_id":"298c1dfafb4e23f9494eb960920262b32d6f2400","unresolved":false,"context_lines":[{"line_number":247,"context_line":""},{"line_number":248,"context_line":"class KeystoneV2AuthProvider(KeystoneAuthProvider):"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    DEFAULT_EXPIRY_DATE_FORMAT \u003d ISO8601_INT_SECONDS"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"    def _auth_client(self, auth_url):"},{"line_number":253,"context_line":"        return json_v2id.TokenClientJSON("}],"source_content_type":"text/x-python","patch_set":3,"id":"5afe65bd_5f484a87","line":250,"in_reply_to":"5afe65bd_9f1a9816","updated":"2015-06-03 19:53:28.000000000","message":"This is still referenced in the unit tests so that the default format of each provider still is tested. The only other option I see would be to have the unit tests run through all the formats in EXPIRY_DATE_FORMATS.","commit_id":"a802275c761aa67beb01168cb9df574a4cec2509"}]}
