)]}'
{"ironic_python_agent/agent.py":[{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"73e8dbfbbcde6e4f07dc4eb92ed86e0bdb6a6ee1","unresolved":false,"context_lines":[{"line_number":128,"context_line":"            propagate_map_exceptions\u003dTrue,"},{"line_number":129,"context_line":"        )"},{"line_number":130,"context_line":"        # lookup timeout in seconds"},{"line_number":131,"context_line":"        self.lookup_timeout \u003d 300"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"    def get_status(self):"},{"line_number":134,"context_line":"        \"\"\"Retrieve a serializable status.\"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2BQzs%3D","line":131,"updated":"2014-03-28 01:07:48.000000000","message":"Should this be configurable?","commit_id":"57b5f4b5625705462c3fe4a368c9d4b8d8fc46ac"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"f8b1968f8af6651ff9efc0bf0d45f18176606e35","unresolved":false,"context_lines":[{"line_number":195,"context_line":""},{"line_number":196,"context_line":"    def run(self):"},{"line_number":197,"context_line":"        \"\"\"Run the Ironic Python Agent.\"\"\""},{"line_number":198,"context_line":"        self.started_at \u003d _time()"},{"line_number":199,"context_line":"        # Get the UUID so we can heartbeat to Ironic"},{"line_number":200,"context_line":"        content \u003d self.api_client.lookup_node("},{"line_number":201,"context_line":"            hardware_info\u003dself.hardware.list_hardware_info()"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BM6s%3D","side":"PARENT","line":198,"updated":"2014-03-28 13:24:49.000000000","message":"I think this should still be set here.","commit_id":"6329ae46dba20cb194462ece583b2ed639c9e0c5"}],"ironic_python_agent/cmd/agent.py":[{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"f8b1968f8af6651ff9efc0bf0d45f18176606e35","unresolved":false,"context_lines":[{"line_number":59,"context_line":"                        help\u003d\u0027The initial interval for retries on the initial \u0027"},{"line_number":60,"context_line":"                             \u0027lookup call to Ironic. The interval will be \u0027"},{"line_number":61,"context_line":"                             \u0027doubled after each failure until timeout is \u0027"},{"line_number":62,"context_line":"                             \u0027exceeded.\u0027)"},{"line_number":63,"context_line":"    args \u003d parser.parse_args()"},{"line_number":64,"context_line":"    agent.build_agent(args.api_url,"},{"line_number":65,"context_line":"                      args.advertise_host,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BM5k%3D","line":62,"updated":"2014-03-28 13:24:49.000000000","message":"We\u0027re up to seven arguments now - I\u0027d like to consider using a config file rather than command-line arguments (especially for items like this where it should be common to all agents in an environment).\n\nHowever, if this would be an operational pain, I can deal with command line arguments. I\u0027d like to hear Jay\u0027s thoughts on this.","commit_id":"c2f9ce4639aa72df4439c9a05371eb9796347abd"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"723c4e6f7d225784fa391ef0349c726adbfea5dd","unresolved":false,"context_lines":[{"line_number":59,"context_line":"                        help\u003d\u0027The initial interval for retries on the initial \u0027"},{"line_number":60,"context_line":"                             \u0027lookup call to Ironic. The interval will be \u0027"},{"line_number":61,"context_line":"                             \u0027doubled after each failure until timeout is \u0027"},{"line_number":62,"context_line":"                             \u0027exceeded.\u0027)"},{"line_number":63,"context_line":"    args \u003d parser.parse_args()"},{"line_number":64,"context_line":"    agent.build_agent(args.api_url,"},{"line_number":65,"context_line":"                      args.advertise_host,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BK9I%3D","line":62,"in_reply_to":"AAAAWH%2F%2BM5k%3D","updated":"2014-03-28 16:42:27.000000000","message":"I think in a perfect world, people can run the agent without arguments and have it work because we have sane defaults and ability to pass args in via kernel command line.\n\nI think it could be valuable to support a config file, but I would not advise holding this change up because of it -- and I don\u0027t suspect I\u0027d want to use it when deploying the agent.","commit_id":"c2f9ce4639aa72df4439c9a05371eb9796347abd"},{"author":{"_account_id":10626,"name":"Russell Haering","email":"russellhaering@gmail.com","username":"russell_h"},"change_message_id":"527ec7733eb09a675c5c63519bc2e10966f48985","unresolved":false,"context_lines":[{"line_number":52,"context_line":"                        type\u003dint,"},{"line_number":53,"context_line":"                        help\u003d\u0027The amount of time to retry the initial lookup \u0027"},{"line_number":54,"context_line":"                             \u0027call to Ironic. After the timeout, an exception \u0027"},{"line_number":55,"context_line":"                             \u0027will be thrown and the agent will restart.\u0027)"},{"line_number":56,"context_line":"    parser.add_argument(\u0027--lookup-interval\u0027,"},{"line_number":57,"context_line":"                        default\u003d1,"},{"line_number":58,"context_line":"                        type\u003dint,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2BI3Q%3D","line":55,"updated":"2014-03-29 07:11:25.000000000","message":"This should say the agent will exit (non-zero, I think).","commit_id":"cba59e668201be0cf1d26b1aa9648955fdcc1460"}],"ironic_python_agent/ironic_api_client.py":[{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"73e8dbfbbcde6e4f07dc4eb92ed86e0bdb6a6ee1","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        except Exception:"},{"line_number":73,"context_line":"            raise errors.HeartbeatError(\u0027Invalid Heartbeat-Before header\u0027)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def lookup_node(self, hardware_info, starting_interval\u003d1, timeout\u003d300):"},{"line_number":76,"context_line":"        timer \u003d loopingcall.DynamicLoopingCall("},{"line_number":77,"context_line":"            self._do_lookup,"},{"line_number":78,"context_line":"            hardware_info\u003dhardware_info,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2BQzU%3D","line":75,"updated":"2014-03-28 01:07:48.000000000","message":"Should the defaults be configurable?","commit_id":"57b5f4b5625705462c3fe4a368c9d4b8d8fc46ac"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"73e8dbfbbcde6e4f07dc4eb92ed86e0bdb6a6ee1","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        # True is returned on timeout"},{"line_number":85,"context_line":"        if node_content is True:"},{"line_number":86,"context_line":"            raise errors.LookupNodeError(\u0027Could not look up node info. Check \u0027"},{"line_number":87,"context_line":"                                         \u0027logs for details.\u0027)"},{"line_number":88,"context_line":"        return node_content"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def _next_interval(self, interval, total_time, timeout):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAWH%2F%2BQzo%3D","line":87,"updated":"2014-03-28 01:07:48.000000000","message":"nit: indentation","commit_id":"57b5f4b5625705462c3fe4a368c9d4b8d8fc46ac"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"f8b1968f8af6651ff9efc0bf0d45f18176606e35","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        except Exception:"},{"line_number":73,"context_line":"            raise errors.HeartbeatError(\u0027Invalid Heartbeat-Before header\u0027)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def lookup_node(self, hardware_info, timeout\u003d300, starting_interval\u003d1):"},{"line_number":76,"context_line":"        timer \u003d loopingcall.DynamicLoopingCall("},{"line_number":77,"context_line":"            self._do_lookup,"},{"line_number":78,"context_line":"            hardware_info\u003dhardware_info,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BM8M%3D","line":75,"updated":"2014-03-28 13:24:49.000000000","message":"This is also still hardcoded.","commit_id":"c2f9ce4639aa72df4439c9a05371eb9796347abd"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"35af5b976c1622e8eaef4f6fed4a19e88e61f48e","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        return new_interval"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def _do_lookup(self, hardware_info, intervals\u003d[1], total_time\u003d[0],"},{"line_number":103,"context_line":"                   timeout\u003d300):"},{"line_number":104,"context_line":"        \"\"\"The actual call to lookup a node. Should be called inside"},{"line_number":105,"context_line":"        loopingcall.DynamicLoopingCall."},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BQsc%3D","line":103,"updated":"2014-03-28 01:37:14.000000000","message":"This still seems hardcoded? Or maybe it\u0027s OK here? I\u0027m not sure.","commit_id":"c2f9ce4639aa72df4439c9a05371eb9796347abd"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"f8b1968f8af6651ff9efc0bf0d45f18176606e35","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        return new_interval"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def _do_lookup(self, hardware_info, intervals\u003d[1], total_time\u003d[0],"},{"line_number":103,"context_line":"                   timeout\u003d300):"},{"line_number":104,"context_line":"        \"\"\"The actual call to lookup a node. Should be called inside"},{"line_number":105,"context_line":"        loopingcall.DynamicLoopingCall."},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BM8E%3D","line":103,"in_reply_to":"AAAAWH%2F%2BQsc%3D","updated":"2014-03-28 13:24:49.000000000","message":"+1 this shouldn\u0027t be hardcoded here.","commit_id":"c2f9ce4639aa72df4439c9a05371eb9796347abd"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"f8b1968f8af6651ff9efc0bf0d45f18176606e35","unresolved":false,"context_lines":[{"line_number":125,"context_line":"            interval \u003d self._next_interval(intervals[-1], total_time, timeout)"},{"line_number":126,"context_line":"            total_time[0] +\u003d interval"},{"line_number":127,"context_line":"            intervals.append(interval)"},{"line_number":128,"context_line":"            return interval"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        if response.status_code !\u003d requests.codes.OK:"},{"line_number":131,"context_line":"            self.log.warning(\u0027Invalid status code: %s\u0027 %"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BM7w%3D","line":128,"updated":"2014-03-28 13:24:49.000000000","message":"Looks like this bit of code is repeated 5 times, let\u0027s factor it out to a common method :)","commit_id":"c2f9ce4639aa72df4439c9a05371eb9796347abd"}],"ironic_python_agent/tests/ironic_api_client.py":[{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"f8b1968f8af6651ff9efc0bf0d45f18176606e35","unresolved":false,"context_lines":[{"line_number":110,"context_line":"            },"},{"line_number":111,"context_line":"            \u0027heartbeat_timeout\u0027: 300"},{"line_number":112,"context_line":"        }"},{"line_number":113,"context_line":"        response \u003d httmock.response(status_code\u003d200, content\u003d{"},{"line_number":114,"context_line":"            \u0027node\u0027: {"},{"line_number":115,"context_line":"                \u0027uuid\u0027: \u0027deadbeef-dabb-ad00-b105-f00d00bab10c\u0027"},{"line_number":116,"context_line":"            },"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BM5M%3D","line":113,"updated":"2014-03-28 13:24:49.000000000","message":"Couldn\u0027t this just be content\u003dcontent?\n\nAlso, it just occurred to me that httmock isn\u0027t in the global requirements file - are we allowed to use it for testing?","commit_id":"c2f9ce4639aa72df4439c9a05371eb9796347abd"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"f8b1968f8af6651ff9efc0bf0d45f18176606e35","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        self.api_client.session.request \u003d mock.Mock()"},{"line_number":120,"context_line":"        self.api_client.session.request.return_value \u003d response"},{"line_number":121,"context_line":"        returned_content \u003d self.api_client.lookup_node(hardware_info\u003dself"},{"line_number":122,"context_line":"                                                       .hardware_info)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        self.assertEqual(content, returned_content)"},{"line_number":125,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BM5Y%3D","line":122,"updated":"2014-03-28 13:24:49.000000000","message":"nitpick: could you move the whole argument down a line? This looks odd to me.","commit_id":"c2f9ce4639aa72df4439c9a05371eb9796347abd"}]}
