)]}'
{"akanda/rug/drivers.py":[{"author":{"_account_id":1420,"name":"Adam Gandelman","email":"adamg@ubuntu.com","username":"gandelman-a"},"change_message_id":"884f2debab75c88136b99b4b6420f01ed981bf5e","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"class InstanceDriver(object):"},{"line_number":19,"context_line":"    \"\"\"This is the abstract for any akanda-rug driver\"\"\""},{"line_number":20,"context_line":"    RESOURCE_NAME \u003d \u0027unknown\u0027"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"    def __init__(self, image_uuid, log):"},{"line_number":23,"context_line":"        self.image_uuid \u003d image_uuid"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_74ae4d82","line":20,"updated":"2015-06-24 18:17:59.000000000","message":"Might want to add a __str__() to this class to print RESOURCE_NAME rather than accessing it directly like you do from logging calls in other files.","commit_id":"f32b6443f5f2912d5b80a21bc67227338be4ea35"},{"author":{"_account_id":1420,"name":"Adam Gandelman","email":"adamg@ubuntu.com","username":"gandelman-a"},"change_message_id":"884f2debab75c88136b99b4b6420f01ed981bf5e","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        return None"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"class RouterDriver(InstanceDriver):"},{"line_number":47,"context_line":"    \"\"\"Router driver code\"\"\""},{"line_number":48,"context_line":"    RESOURCE_NAME \u003d \u0027Router\u0027"},{"line_number":49,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_d48dd931","line":46,"updated":"2015-06-24 18:17:59.000000000","message":"I think drivers.py should be moved to akanda/rug/drivers/base.py and\nRouterDriver to akanda/rug/drivers/router.py","commit_id":"f32b6443f5f2912d5b80a21bc67227338be4ea35"},{"author":{"_account_id":1420,"name":"Adam Gandelman","email":"adamg@ubuntu.com","username":"gandelman-a"},"change_message_id":"884f2debab75c88136b99b4b6420f01ed981bf5e","unresolved":false,"context_lines":[{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    @property"},{"line_number":78,"context_line":"    def default_image_uuid(self):"},{"line_number":79,"context_line":"        return cfg.CONF.router_image_uuid"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"options \u003d {\u0027router\u0027: RouterDriver}"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_5493095b","line":79,"updated":"2015-06-24 18:17:59.000000000","message":"We should move this config option to its own [router] group or something. I have a patch up that cleans up config registration, it would be good to stack this patch ontop of https://review.openstack.org/#/c/191993/, move declaration + registration of this option here (or wherever RouterDriver lives), and move it to its own config group.   Long term I think we want in-tree drivers to have their own config group with options registered close to the driver code itself.","commit_id":"f32b6443f5f2912d5b80a21bc67227338be4ea35"},{"author":{"_account_id":1420,"name":"Adam Gandelman","email":"adamg@ubuntu.com","username":"gandelman-a"},"change_message_id":"884f2debab75c88136b99b4b6420f01ed981bf5e","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        return cfg.CONF.router_image_uuid"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"options \u003d {\u0027router\u0027: RouterDriver}"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_54a1c992","line":82,"updated":"2015-06-24 18:17:59.000000000","message":"Rather than depend on this dict everywhere else, we can declare it somewhere in akanda.rug.drivers.__init__.py/base.py/etc and wrap access to it in a factory function of some sort, ie:\n\n  def driver_factory(driver_name):\n      return DRIVERS[\u0027name\u0027]\n\nthen have the other places that need to load a driver use driver_factory().  This\u0027ll make it much easier to unit test, and let us extend driver_factory in the future to do things like use stevedore, support out-of-tree drivers (if we choose), etc.","commit_id":"f32b6443f5f2912d5b80a21bc67227338be4ea35"}],"akanda/rug/instance_manager.py":[{"author":{"_account_id":1420,"name":"Adam Gandelman","email":"adamg@ubuntu.com","username":"gandelman-a"},"change_message_id":"884f2debab75c88136b99b4b6420f01ed981bf5e","unresolved":false,"context_lines":[{"line_number":156,"context_line":"            self.instance_info.confirm_up()"},{"line_number":157,"context_line":"            if self.instance_info.boot_duration:"},{"line_number":158,"context_line":"                self.log.info(\u0027%s booted in %s seconds after %s attempts\u0027,"},{"line_number":159,"context_line":"                              self.driver.RESOURCE_NAME,"},{"line_number":160,"context_line":"                              self.instance_info.boot_duration.total_seconds(),"},{"line_number":161,"context_line":"                              self._boot_counter.count)"},{"line_number":162,"context_line":"            # Always reset the boot counter, even if we didn\u0027t boot"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_d4307958","line":159,"updated":"2015-06-24 18:17:59.000000000","message":"If you add the __str__() method that I mention in driver.py, you can pass just self.driver and avoid having to access the RESOURCE_NAME attr.","commit_id":"f32b6443f5f2912d5b80a21bc67227338be4ea35"}],"akanda/rug/tenant.py":[{"author":{"_account_id":1420,"name":"Adam Gandelman","email":"adamg@ubuntu.com","username":"gandelman-a"},"change_message_id":"884f2debab75c88136b99b4b6420f01ed981bf5e","unresolved":false,"context_lines":[{"line_number":167,"context_line":"                worker_context\u003dworker_context,"},{"line_number":168,"context_line":"                queue_warning_threshold\u003dself._queue_warning_threshold,"},{"line_number":169,"context_line":"                reboot_error_threshold\u003dself._reboot_error_threshold,"},{"line_number":170,"context_line":"                driver\u003ddrivers.options[driver],"},{"line_number":171,"context_line":"            )"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"            self.state_machines[instance_id] \u003d sm"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_1471010c","line":170,"updated":"2015-06-24 18:17:59.000000000","message":"Here is where I\u0027d suggest using some kind of driver factory as I mention in driver.py","commit_id":"f32b6443f5f2912d5b80a21bc67227338be4ea35"}]}
