)]}'
{"nova/scheduler/filters/compute_filter.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"7697118bce8a15eb9ade0928898e21fab0da20a6","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        service \u003d host_state.service"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"        if not self.servicegroup_api.service_is_up(service) \\"},{"line_number":38,"context_line":"        or service[\u0027disabled\u0027]:"},{"line_number":39,"context_line":"            LOG.debug(_(\"%(host_state)s is disabled or has not been \""},{"line_number":40,"context_line":"                    \"heard from in a while\"), locals())"},{"line_number":41,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAALH%2F%2F3ZA%3D","line":38,"updated":"2012-08-07 20:45:14.000000000","message":"Instead of using backslash continuators, please use parens or structure like so:\n\n passes \u003d self.servicegroup_api.service_is_up(service)\n if not passes or service[\u0027disabled\u0027]:\n     ...","commit_id":"97502c1ab49bb7fbc6e3f1e1ae6cfd2c9e1b0106"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"a72ee161b87782b7b4b7a38d27faca8723cd8a8b","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        capabilities \u003d host_state.capabilities"},{"line_number":35,"context_line":"        service \u003d host_state.service"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"        passes \u003d self.servicegroup_api.service_is_up(service)"},{"line_number":38,"context_line":"        if not passes or service[\u0027disabled\u0027]:"},{"line_number":39,"context_line":"            LOG.debug(_(\"%(host_state)s is disabled or has not been \""},{"line_number":40,"context_line":"                    \"heard from in a while\"), locals())"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAALH%2F%2FG74%3D","line":37,"updated":"2012-10-18 12:23:32.000000000","message":"minor, but could we just change the temp variable to something like \"alive\" or \"up\". I realize the function is called passes, but \"if not passes\" just parses weird in my brain","commit_id":"40367db5dafb06bcd785616b8669727a13e1133c"},{"author":{"_account_id":1711,"name":"Yun Mao","email":"yunmao@gmail.com","username":"yunmao"},"change_message_id":"c904d243a99da996e0168c42ea83b5bbfd621d41","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        capabilities \u003d host_state.capabilities"},{"line_number":35,"context_line":"        service \u003d host_state.service"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"        passes \u003d self.servicegroup_api.service_is_up(service)"},{"line_number":38,"context_line":"        if not passes or service[\u0027disabled\u0027]:"},{"line_number":39,"context_line":"            LOG.debug(_(\"%(host_state)s is disabled or has not been \""},{"line_number":40,"context_line":"                    \"heard from in a while\"), locals())"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAALn%2F%2F7OE%3D","line":37,"updated":"2012-10-26 19:54:10.000000000","message":"sure.","commit_id":"40367db5dafb06bcd785616b8669727a13e1133c"}],"nova/service.py":[{"author":{"_account_id":159,"name":"Eric Windisch","email":"ewindisch@docker.com","username":"ewindisch"},"change_message_id":"0d459aaff83ff48d5c759f9fa479090b0487aa94","unresolved":false,"context_lines":[{"line_number":526,"context_line":"        \"\"\"Tasks to be run at a periodic interval.\"\"\""},{"line_number":527,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":528,"context_line":"        self.manager.periodic_tasks(ctxt, raise_on_error\u003draise_on_error)"},{"line_number":529,"context_line":""},{"line_number":530,"context_line":"    def report_state(self):"},{"line_number":531,"context_line":"        \"\"\"Update the state of this service in the datastore.\"\"\""},{"line_number":532,"context_line":"        ctxt \u003d context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAALH%2F%2F2v8%3D","side":"PARENT","line":529,"updated":"2012-08-07 16:00:36.000000000","message":"I believe this can now be pruned.","commit_id":"260e406f0f5a97962d4bde3998c272864365e0e7"},{"author":{"_account_id":5319,"name":"Sam Stoelinga","email":"sammiestoel@gmail.com","username":"sammiestoel"},"change_message_id":"ba06abb4b8e66ef777950d650c04748b9c2cfaf8","unresolved":false,"context_lines":[{"line_number":437,"context_line":""},{"line_number":438,"context_line":"        # Currently only scheduler service needs updates of services state"},{"line_number":439,"context_line":"        if \u0027nova-scheduler\u0027 \u003d\u003d self.binary:"},{"line_number":440,"context_line":"            self.servicegroup_api.subscribe_to_changes([\u0027compute\u0027, \u0027volume\u0027,"},{"line_number":441,"context_line":"                                                      \u0027network\u0027])"},{"line_number":442,"context_line":""},{"line_number":443,"context_line":"        if self.periodic_interval:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAALH%2F%2Fcag%3D","line":440,"updated":"2012-09-11 02:46:40.000000000","message":"This method doesn\u0027t work yet right? It would be nice to have a way to subscribe to changes with a custom made function, so a flag heartbeat_change_callback, that we can do something in case a node goes down or a service goes down.\n\nI may do some patch for also enabling a callback, what you think about this idea?","commit_id":"f0b36f77cb99299f171162e4b4346287af4d70bb"}],"nova/servicegroup/__init__.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"7697118bce8a15eb9ade0928898e21fab0da20a6","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"\"\"\""},{"line_number":17,"context_line":"The membership service for Nova. Different implementations can be plugged"},{"line_number":18,"context_line":"according to the Nova configuration.\"\"\""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from nova.servicegroup.api import API"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAALH%2F%2F2dk%3D","line":18,"updated":"2012-08-07 20:45:14.000000000","message":"femto-nit: Please put the ending \"\"\" on a separate line.","commit_id":"97502c1ab49bb7fbc6e3f1e1ae6cfd2c9e1b0106"}],"nova/servicegroup/api.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"7697118bce8a15eb9ade0928898e21fab0da20a6","unresolved":false,"context_lines":[{"line_number":22,"context_line":"from nova.openstack.common import cfg"},{"line_number":23,"context_line":"from nova.openstack.common import importutils"},{"line_number":24,"context_line":"from nova.openstack.common import log as logging"},{"line_number":25,"context_line":"from nova.utils import check_isinstance"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":28,"context_line":"_default_driver \u003d \u0027nova.servicegroup.db_driver.DB_Driver\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAALH%2F%2F2dM%3D","line":25,"updated":"2012-08-07 20:45:14.000000000","message":"Per the HACKING guidelines, please only import modules, not objects.","commit_id":"97502c1ab49bb7fbc6e3f1e1ae6cfd2c9e1b0106"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"7697118bce8a15eb9ade0928898e21fab0da20a6","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    def __new__(cls, *args, **kwargs):"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        if not cls._driver:"},{"line_number":44,"context_line":"            LOG.debug(_(\u0027ServiceGroup driver defined as an instance of %s \u0027),"},{"line_number":45,"context_line":"                      str(FLAGS.servicegroup_driver))"},{"line_number":46,"context_line":"            driver_class \u003d FLAGS.servicegroup_driver"},{"line_number":47,"context_line":"            # Check if ZooKeeper is installed"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAALH%2F%2F2dg%3D","line":44,"updated":"2012-08-07 20:45:14.000000000","message":"Please remove trailing space in message string.. (after %s)","commit_id":"97502c1ab49bb7fbc6e3f1e1ae6cfd2c9e1b0106"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"7697118bce8a15eb9ade0928898e21fab0da20a6","unresolved":false,"context_lines":[{"line_number":44,"context_line":"            LOG.debug(_(\u0027ServiceGroup driver defined as an instance of %s \u0027),"},{"line_number":45,"context_line":"                      str(FLAGS.servicegroup_driver))"},{"line_number":46,"context_line":"            driver_class \u003d FLAGS.servicegroup_driver"},{"line_number":47,"context_line":"            # Check if ZooKeeper is installed"},{"line_number":48,"context_line":"            if(driver_class.endswith(\u0027ZK_Driver\u0027)):"},{"line_number":49,"context_line":"                try:"},{"line_number":50,"context_line":"                    import zookeeper"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAALH%2F%2F2dQ%3D","line":47,"updated":"2012-08-07 20:45:14.000000000","message":"Please remove this section relating to zookeeper. The default driver is already set to the database one.","commit_id":"97502c1ab49bb7fbc6e3f1e1ae6cfd2c9e1b0106"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"7697118bce8a15eb9ade0928898e21fab0da20a6","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"        @param member_id: the joined member ID"},{"line_number":66,"context_line":"        @param group: the group name, of the joined member"},{"line_number":67,"context_line":"        @param service: the optional parameter for ZK driver and mandatory for"},{"line_number":68,"context_line":"            DB driver, this parameter can be used for notifications about"},{"line_number":69,"context_line":"        disconnect mode and update some internals"},{"line_number":70,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAALH%2F%2F2dE%3D","line":67,"updated":"2012-08-07 20:45:14.000000000","message":"Please remove mention of ZK from this base class. Should just be a description of what the service parameter is -- for instance, is it a string?","commit_id":"97502c1ab49bb7fbc6e3f1e1ae6cfd2c9e1b0106"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"7697118bce8a15eb9ade0928898e21fab0da20a6","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            DB driver, this parameter can be used for notifications about"},{"line_number":69,"context_line":"        disconnect mode and update some internals"},{"line_number":70,"context_line":"        \"\"\""},{"line_number":71,"context_line":"        LOG.debug(_(\u0027Join new ServiceGroup member %(id)s to the %(gr)s group,\\"},{"line_number":72,"context_line":"service \u003d %(sr)s\u0027), {\u0027id\u0027: member_id, \u0027gr\u0027: group, \u0027sr\u0027: service})"},{"line_number":73,"context_line":"        return self._driver.join(member_id, group, service)"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAALH%2F%2F2c0%3D","line":71,"updated":"2012-08-07 20:45:14.000000000","message":"When within parentheses, it is not necessary to use backslash continuators. Instead, do this:\n\n LOG.debug(_(\u0027Join new ServiceGroup member %(id)s to the %(gr)s group, \u0027\n             \u0027service \u003d %(sr)s\u0027), {\u0027id\u0027: member_id, \u0027gr\u0027: group, \u0027sr\u0027: service})\n\nAlternately, it would be cleaner to do:\n\n msg \u003d _(\u0027Join new ServiceGroup member %(member_id)s to the \u0027\n         \u0027%(group)s group, service \u003d %(service)s\u0027)\n LOG.debug(msg, locals())","commit_id":"97502c1ab49bb7fbc6e3f1e1ae6cfd2c9e1b0106"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"7697118bce8a15eb9ade0928898e21fab0da20a6","unresolved":false,"context_lines":[{"line_number":81,"context_line":"    def service_is_up(self, member_id):"},{"line_number":82,"context_line":"        \"\"\"Check if the given member is up\"\"\""},{"line_number":83,"context_line":"        LOG.debug(_(\u0027Check if the given member [%s] is part of the \\"},{"line_number":84,"context_line":"ServiceGroup, is up\u0027), member_id)"},{"line_number":85,"context_line":"        return self._driver.is_up(member_id)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def leave(self, context, member_id):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAALH%2F%2F2cs%3D","line":84,"updated":"2012-08-07 20:45:14.000000000","message":"See above comment about cleaning up messages in debug and not using backslash continuators.... here and throughout :)","commit_id":"97502c1ab49bb7fbc6e3f1e1ae6cfd2c9e1b0106"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"7697118bce8a15eb9ade0928898e21fab0da20a6","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        \"\"\""},{"line_number":91,"context_line":"        LOG.debug(_(\u0027Explicitly remove the given member [%s] from the \\"},{"line_number":92,"context_line":"ServiceGroup monitoring\u0027), member_id)"},{"line_number":93,"context_line":"        return self._driver.leave(member_id[\u0027host\u0027], member_id[\u0027topic\u0027])"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def get_all(self, group):"},{"line_number":96,"context_line":"        \"\"\"Returns ALL members of the given group.\"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAALH%2F%2F2co%3D","line":93,"updated":"2012-08-07 20:45:14.000000000","message":"When a variable in Nova (or any other core OpenStack project for that matter) is named XXXX_id, it generally indicates a string identifier. However, here and in many of the methods in this class, it looks like the variable is in fact a dictionary. Please rename the variables to remove the _id suffix where appropriate.","commit_id":"97502c1ab49bb7fbc6e3f1e1ae6cfd2c9e1b0106"},{"author":{"_account_id":159,"name":"Eric Windisch","email":"ewindisch@docker.com","username":"ewindisch"},"change_message_id":"685903cb36a0ad96ac64fa181f44c426186bc926","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        LOG.debug(msg, locals())"},{"line_number":65,"context_line":"        return self._driver.join(member_id, group_id, service)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def subscribe_to_changes(self, groups):"},{"line_number":68,"context_line":"        \"\"\"Subscribing to cache changes\"\"\""},{"line_number":69,"context_line":"        LOG.debug(_(\u0027Subscribing to changes in the %s ServiceGroup groups\u0027),"},{"line_number":70,"context_line":"                  str(groups))"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAALH%2F%2FG2c%3D","line":67,"updated":"2012-10-18 15:28:17.000000000","message":"I\u0027m not sure why this is needed or here. It isn\u0027t used by the DB backend.  I know the zookeeper code isn\u0027t merged, but if the zookeeper code requires this, it might be better to merge this method then - when its can be supported by a use-case.\n\nThe fact the DB driver doesn\u0027t provide this is scary. What happens when code builds on top of this public API and it doesn\u0027t get updates because the backend driver doesn\u0027t support it?\n\nIt might be better, in the long term, if this module simply sent a notification. Then, those could be consumed by applications that want to subscribe to changes.","commit_id":"40367db5dafb06bcd785616b8669727a13e1133c"},{"author":{"_account_id":1711,"name":"Yun Mao","email":"yunmao@gmail.com","username":"yunmao"},"change_message_id":"c904d243a99da996e0168c42ea83b5bbfd621d41","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        LOG.debug(msg, locals())"},{"line_number":65,"context_line":"        return self._driver.join(member_id, group_id, service)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def subscribe_to_changes(self, groups):"},{"line_number":68,"context_line":"        \"\"\"Subscribing to cache changes\"\"\""},{"line_number":69,"context_line":"        LOG.debug(_(\u0027Subscribing to changes in the %s ServiceGroup groups\u0027),"},{"line_number":70,"context_line":"                  str(groups))"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAALn%2F%2F7Ng%3D","line":67,"in_reply_to":"AAAALH%2F%2FG2c%3D","updated":"2012-10-26 19:54:10.000000000","message":"very good point. this is brought up by some other reviewer before. It\u0027s probably the best to not include this method at the moment with db only backend.","commit_id":"40367db5dafb06bcd785616b8669727a13e1133c"},{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"0f2c05393e60dff2f44dfb157e306e6b6a225500","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":30,"context_line":"_default_driver \u003d \u0027nova.servicegroup.db_driver.DbDriver\u0027"},{"line_number":31,"context_line":"servicegroup_driver_opt \u003d cfg.StrOpt(\u0027servicegroup_driver\u0027,"},{"line_number":32,"context_line":"                                   default\u003d_default_driver,"},{"line_number":33,"context_line":"                                   help\u003d\u0027The driver for servicegroup service.\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAALn%2F%2F6Jc%3D","line":30,"updated":"2012-10-29 13:53:50.000000000","message":"I would like to avoid adding more options that use a full Python path as the option\u0027s value.  The problems are:\n\n1) It\u0027s painful if the code gets moved around.  For example, what happens when/if this moves to openstack-common and then later moves into an oslo library release?\n\n2) I also don\u0027t like that it implicitly makes this API a *public* API that people can write modules to and drop them in.  We need to be very careful about what APIs we intentionally make public.\n\nThe default value can just be as simple as \"db\".  Internally that can be mapped to the appropriate class.","commit_id":"2599756946038f47e8786b3deafc31a6229558bc"},{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"831a35f2559509b1ae0939da34f40570672ab280","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":30,"context_line":"_default_driver \u003d \u0027nova.servicegroup.db_driver.DbDriver\u0027"},{"line_number":31,"context_line":"servicegroup_driver_opt \u003d cfg.StrOpt(\u0027servicegroup_driver\u0027,"},{"line_number":32,"context_line":"                                   default\u003d_default_driver,"},{"line_number":33,"context_line":"                                   help\u003d\u0027The driver for servicegroup service.\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAALn%2F%2F5aE%3D","line":30,"in_reply_to":"AAAALn%2F%2F5a8%3D","updated":"2012-10-30 01:24:14.000000000","message":"And I think those are all very poor examples to follow and they should all be changed.  :-)\n\nhttp://lists.openstack.org/pipermail/openstack-dev/2012-October/001931.html\n\nAgain, I\u0027m fine with this being pluggable, just not arbitrarily pluggable with anything by anyone.  That\u0027s a whole different ball game and comes with new rules about how the code must be maintained.","commit_id":"2599756946038f47e8786b3deafc31a6229558bc"},{"author":{"_account_id":1711,"name":"Yun Mao","email":"yunmao@gmail.com","username":"yunmao"},"change_message_id":"107378f8adf5f1ded8d8dd95ef18da8009713914","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":30,"context_line":"_default_driver \u003d \u0027nova.servicegroup.db_driver.DbDriver\u0027"},{"line_number":31,"context_line":"servicegroup_driver_opt \u003d cfg.StrOpt(\u0027servicegroup_driver\u0027,"},{"line_number":32,"context_line":"                                   default\u003d_default_driver,"},{"line_number":33,"context_line":"                                   help\u003d\u0027The driver for servicegroup service.\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAALn%2F%2FySc%3D","line":30,"in_reply_to":"AAAALn%2F%2F5aE%3D","updated":"2012-11-06 16:49:51.000000000","message":"It doesn\u0027t look like we reached a verdict on the mailing list. Because we have many places as Eric pointed out doing this full path practice, it doesn\u0027t seem to help much to only make the servicegroup API conform to a new, undecided, standard. I propose we leave the code as it is, continue to work on a new standard over the mailing list, get a blueprint on the new standard, and change the existing code (servicegroup, libvirt, rpc, networking) according to the blueprint. Thoughts?","commit_id":"2599756946038f47e8786b3deafc31a6229558bc"},{"author":{"_account_id":159,"name":"Eric Windisch","email":"ewindisch@docker.com","username":"ewindisch"},"change_message_id":"9c2f03fef6e3c6072400a58892a9a9825927e53c","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":30,"context_line":"_default_driver \u003d \u0027nova.servicegroup.db_driver.DbDriver\u0027"},{"line_number":31,"context_line":"servicegroup_driver_opt \u003d cfg.StrOpt(\u0027servicegroup_driver\u0027,"},{"line_number":32,"context_line":"                                   default\u003d_default_driver,"},{"line_number":33,"context_line":"                                   help\u003d\u0027The driver for servicegroup service.\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAALn%2F%2F5a8%3D","line":30,"in_reply_to":"AAAALn%2F%2F5bw%3D","updated":"2012-10-30 01:00:52.000000000","message":"We do this for libvirt, rpc, networking, etc... why not here? There seems to be good reason and interest in having this pluggable.","commit_id":"2599756946038f47e8786b3deafc31a6229558bc"},{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"a666efdff25c474e09067dfa95dc6db00f5fe5d4","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":30,"context_line":"_default_driver \u003d \u0027nova.servicegroup.db_driver.DbDriver\u0027"},{"line_number":31,"context_line":"servicegroup_driver_opt \u003d cfg.StrOpt(\u0027servicegroup_driver\u0027,"},{"line_number":32,"context_line":"                                   default\u003d_default_driver,"},{"line_number":33,"context_line":"                                   help\u003d\u0027The driver for servicegroup service.\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAALn%2F%2F5bw%3D","line":30,"in_reply_to":"AAAALn%2F%2F5hE%3D","updated":"2012-10-30 00:41:55.000000000","message":"I am absolutely ok with this being a configuration option.  I\u0027m *not* ok with the value you provide being a python path.\n\nFor the zookeeper plugin, it will get merged and you can just configure it by selecting \"zookeeper\" or something.","commit_id":"2599756946038f47e8786b3deafc31a6229558bc"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"5ff2e7296fbe41592d4b396f7a5bf6f10ee5c612","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":30,"context_line":"_default_driver \u003d \u0027nova.servicegroup.db_driver.DbDriver\u0027"},{"line_number":31,"context_line":"servicegroup_driver_opt \u003d cfg.StrOpt(\u0027servicegroup_driver\u0027,"},{"line_number":32,"context_line":"                                   default\u003d_default_driver,"},{"line_number":33,"context_line":"                                   help\u003d\u0027The driver for servicegroup service.\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAALn%2F%2F5hE%3D","line":30,"in_reply_to":"AAAALn%2F%2F6II%3D","updated":"2012-10-29 22:44:31.000000000","message":"We know there is at least going to be a zookeeper driver coming in in the near term. It does seem like we want a driver plug point here, and part of the intent with this API I thought.","commit_id":"2599756946038f47e8786b3deafc31a6229558bc"},{"author":{"_account_id":159,"name":"Eric Windisch","email":"ewindisch@docker.com","username":"ewindisch"},"change_message_id":"970bf9b51e6ad1e6ed7b95490269511751548071","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":30,"context_line":"_default_driver \u003d \u0027nova.servicegroup.db_driver.DbDriver\u0027"},{"line_number":31,"context_line":"servicegroup_driver_opt \u003d cfg.StrOpt(\u0027servicegroup_driver\u0027,"},{"line_number":32,"context_line":"                                   default\u003d_default_driver,"},{"line_number":33,"context_line":"                                   help\u003d\u0027The driver for servicegroup service.\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAALn%2F%2F6II%3D","line":30,"in_reply_to":"AAAALn%2F%2F6Jc%3D","updated":"2012-10-29 14:00:42.000000000","message":"Russell, I think this is a place where people will want to write their own plugins. There are plenty of other examples in the code where 3rd-party backends are supported.\n\nMailing list?","commit_id":"2599756946038f47e8786b3deafc31a6229558bc"},{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"0f2c05393e60dff2f44dfb157e306e6b6a225500","unresolved":false,"context_lines":[{"line_number":49,"context_line":"            cls._driver \u003d importutils.import_object(driver_class)"},{"line_number":50,"context_line":"            utils.check_isinstance(cls._driver, ServiceGroupDriver)"},{"line_number":51,"context_line":"            # we don\u0027t have to check that cls._driver is not NONE,"},{"line_number":52,"context_line":"            # check_isinstance does it"},{"line_number":53,"context_line":"        return super(API, cls).__new__(cls)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def join(self, member_id, group_id, service\u003dNone):"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAALn%2F%2F6JU%3D","line":52,"updated":"2012-10-29 13:53:50.000000000","message":"This block is not thread-safe.  I know that technically because of how greenthreads work it\u0027s not an issue right now, but I\u0027m hesitant to add more code that won\u0027t work if we can ever switch to real threads.","commit_id":"2599756946038f47e8786b3deafc31a6229558bc"},{"author":{"_account_id":1711,"name":"Yun Mao","email":"yunmao@gmail.com","username":"yunmao"},"change_message_id":"107378f8adf5f1ded8d8dd95ef18da8009713914","unresolved":false,"context_lines":[{"line_number":49,"context_line":"            cls._driver \u003d importutils.import_object(driver_class)"},{"line_number":50,"context_line":"            utils.check_isinstance(cls._driver, ServiceGroupDriver)"},{"line_number":51,"context_line":"            # we don\u0027t have to check that cls._driver is not NONE,"},{"line_number":52,"context_line":"            # check_isinstance does it"},{"line_number":53,"context_line":"        return super(API, cls).__new__(cls)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def join(self, member_id, group_id, service\u003dNone):"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAALn%2F%2FyS0%3D","line":52,"in_reply_to":"AAAALn%2F%2F6JU%3D","updated":"2012-11-06 16:49:51.000000000","message":"Could you elaborate this? I\u0027m not very familiar with the import code. Thanks.","commit_id":"2599756946038f47e8786b3deafc31a6229558bc"},{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"6636c593ecc59bab260c22a93d18318e140443e2","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    _driver \u003d None"},{"line_number":42,"context_line":"    _driver_name_class_mapping \u003d {\"db\": \"nova.servicegroup.db_driver.DbDriver\"}"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def __new__(cls, *args, **kwargs):"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        if not cls._driver:"},{"line_number":47,"context_line":"            LOG.debug(_(\u0027ServiceGroup driver defined as an instance of %s\u0027),"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAMH%2F%2F5c4%3D","line":44,"updated":"2012-11-16 16:17:52.000000000","message":"per my earlier thread-safe comment ...\n\nfrom nova.openstack.common import lockutils\n\n@lockutils.synchronized(\u0027nova.servicegroup.api.new\u0027)\ndef __new__(cls, *args, **kwargs):\n    ...","commit_id":"e0774f6bf7dde27376e156e413b23e51137e8df4"},{"author":{"_account_id":1711,"name":"Yun Mao","email":"yunmao@gmail.com","username":"yunmao"},"change_message_id":"35d342124acf66c73ac8afda5e43ff5270752c3a","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    _driver \u003d None"},{"line_number":42,"context_line":"    _driver_name_class_mapping \u003d {\"db\": \"nova.servicegroup.db_driver.DbDriver\"}"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def __new__(cls, *args, **kwargs):"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        if not cls._driver:"},{"line_number":47,"context_line":"            LOG.debug(_(\u0027ServiceGroup driver defined as an instance of %s\u0027),"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAMH%2F%2F5aQ%3D","line":44,"in_reply_to":"AAAAMH%2F%2F5c4%3D","updated":"2012-11-16 16:57:15.000000000","message":"Done","commit_id":"e0774f6bf7dde27376e156e413b23e51137e8df4"}],"nova/servicegroup/db_driver.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"7697118bce8a15eb9ade0928898e21fab0da20a6","unresolved":false,"context_lines":[{"line_number":26,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class DB_Driver(api.ServiceGroupDriver):"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def join(self, member_id, group, service\u003dNone):"},{"line_number":32,"context_line":"        \"\"\"Join the given service with it\u0027s group\"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAALH%2F%2F2bc%3D","line":29,"updated":"2012-08-07 20:45:14.000000000","message":"Can we name this DbDriver instead of DB_Driver, to better align with other driver class names in Nova? See, for example:\n\nVMWareESXDriver\nFakeDriver\nVIFDriver\nFirewallDriver\nIptablesFirewallDriver\n\netc, etc.\n\nAlso, if you want to, you could use a directory-based approach, and structure things like so:\n\n/nova/servicegroup/db/driver.py\n/nova/servicegroup/zookeeper/driver.py\n\nin a way similar to how the Nova virt drivers are structured.","commit_id":"97502c1ab49bb7fbc6e3f1e1ae6cfd2c9e1b0106"},{"author":{"_account_id":159,"name":"Eric Windisch","email":"ewindisch@docker.com","username":"ewindisch"},"change_message_id":"0d459aaff83ff48d5c759f9fa479090b0487aa94","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        LOG.debug(\u0027DB_Driver.is_up last_heartbeat \u003d %(lhb)s elapsed \u003d %(el)s\u0027,"},{"line_number":59,"context_line":"                  {\u0027lhb\u0027: str(last_heartbeat), \u0027el\u0027: str(elapsed)})"},{"line_number":60,"context_line":"        return abs(elapsed) \u003c\u003d FLAGS.service_down_time"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def get_all(self, group):"},{"line_number":63,"context_line":"        \"\"\""},{"line_number":64,"context_line":"        Returns ALL members of the given group"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAALH%2F%2F2wQ%3D","line":61,"updated":"2012-08-07 16:00:36.000000000","message":"Ideally, there should be an efficient get_one implemented here using .order_by(func.rand()).limit(1)","commit_id":"97502c1ab49bb7fbc6e3f1e1ae6cfd2c9e1b0106"}],"nova/tests/scheduler/test_scheduler.py":[{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"912bf9bd1bc59a34aa7bc8ba376ff6c432946749","unresolved":false,"context_lines":[{"line_number":266,"context_line":""},{"line_number":267,"context_line":"    # So we can subclass this test and re-use tests if we need."},{"line_number":268,"context_line":"    driver_cls \u003d driver.Scheduler"},{"line_number":269,"context_line":"    servicegroup_api \u003d servicegroup.API"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"    def setUp(self):"},{"line_number":272,"context_line":"        super(SchedulerTestCase, self).setUp()"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAALH%2F%2FJxQ%3D","line":269,"updated":"2012-10-10 20:34:57.000000000","message":"why add this here instead of just:\ns/self.servicegroup_api/servicegroup.API\n\nbelow?","commit_id":"40367db5dafb06bcd785616b8669727a13e1133c"},{"author":{"_account_id":1711,"name":"Yun Mao","email":"yunmao@gmail.com","username":"yunmao"},"change_message_id":"c904d243a99da996e0168c42ea83b5bbfd621d41","unresolved":false,"context_lines":[{"line_number":266,"context_line":""},{"line_number":267,"context_line":"    # So we can subclass this test and re-use tests if we need."},{"line_number":268,"context_line":"    driver_cls \u003d driver.Scheduler"},{"line_number":269,"context_line":"    servicegroup_api \u003d servicegroup.API"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"    def setUp(self):"},{"line_number":272,"context_line":"        super(SchedulerTestCase, self).setUp()"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAALn%2F%2F7OM%3D","line":269,"in_reply_to":"AAAALH%2F%2FJxQ%3D","updated":"2012-10-26 19:54:10.000000000","message":"hmm. this is actually a bug (or a mis use of the API class).","commit_id":"40367db5dafb06bcd785616b8669727a13e1133c"}],"nova/tests/test_db_servicegroup.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"7697118bce8a15eb9ade0928898e21fab0da20a6","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"import datetime"},{"line_number":16,"context_line":"import eventlet"},{"line_number":17,"context_line":"import mox"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from nova import context"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAALH%2F%2F2a4%3D","line":16,"updated":"2012-08-07 20:45:14.000000000","message":"Per HACKING, please separate std libs from 3rd party imports with a single newline... so:\n\n import datetime\n \n import eventlet\n import mox","commit_id":"97502c1ab49bb7fbc6e3f1e1ae6cfd2c9e1b0106"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"7697118bce8a15eb9ade0928898e21fab0da20a6","unresolved":false,"context_lines":[{"line_number":73,"context_line":"    def test_service_is_up(self):"},{"line_number":74,"context_line":"        fts_func \u003d datetime.datetime.fromtimestamp"},{"line_number":75,"context_line":"        fake_now \u003d 1000"},{"line_number":76,"context_line":"        #down_time \u003d 5"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        #self.flags(service_down_time\u003ddown_time)"},{"line_number":79,"context_line":"        self.mox.StubOutWithMock(timeutils, \u0027utcnow\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAALH%2F%2F2as%3D","line":76,"updated":"2012-08-07 20:45:14.000000000","message":"Please remove any leftover debugging/commented-out code here and below.","commit_id":"97502c1ab49bb7fbc6e3f1e1ae6cfd2c9e1b0106"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"a72ee161b87782b7b4b7a38d27faca8723cd8a8b","unresolved":false,"context_lines":[{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        # Up (equal)"},{"line_number":114,"context_line":"        timeutils.utcnow().AndReturn(fts_func(fake_now))"},{"line_number":115,"context_line":"        print \"utils.utcnow() \u003d %s\" % str(timeutils.utcnow())"},{"line_number":116,"context_line":"        service \u003d {\u0027updated_at\u0027: fts_func(fake_now - self.down_time),"},{"line_number":117,"context_line":"                   \u0027created_at\u0027: fts_func(fake_now - self.down_time)}"},{"line_number":118,"context_line":"        self.mox.ReplayAll()"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAALH%2F%2FG7w%3D","line":115,"updated":"2012-10-18 12:23:32.000000000","message":"shouldn\u0027t have a raw print sitting in here still","commit_id":"40367db5dafb06bcd785616b8669727a13e1133c"},{"author":{"_account_id":1711,"name":"Yun Mao","email":"yunmao@gmail.com","username":"yunmao"},"change_message_id":"c904d243a99da996e0168c42ea83b5bbfd621d41","unresolved":false,"context_lines":[{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        # Up (equal)"},{"line_number":114,"context_line":"        timeutils.utcnow().AndReturn(fts_func(fake_now))"},{"line_number":115,"context_line":"        print \"utils.utcnow() \u003d %s\" % str(timeutils.utcnow())"},{"line_number":116,"context_line":"        service \u003d {\u0027updated_at\u0027: fts_func(fake_now - self.down_time),"},{"line_number":117,"context_line":"                   \u0027created_at\u0027: fts_func(fake_now - self.down_time)}"},{"line_number":118,"context_line":"        self.mox.ReplayAll()"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAALn%2F%2F7Nc%3D","line":115,"in_reply_to":"AAAALH%2F%2FG7w%3D","updated":"2012-10-26 19:54:10.000000000","message":"Done","commit_id":"40367db5dafb06bcd785616b8669727a13e1133c"}],"nova/tests/test_utils.py":[{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"a72ee161b87782b7b4b7a38d27faca8723cd8a8b","unresolved":false,"context_lines":[{"line_number":30,"context_line":"from nova import exception"},{"line_number":31,"context_line":"from nova import flags"},{"line_number":32,"context_line":"from nova.openstack.common import timeutils"},{"line_number":33,"context_line":"from nova import servicegroup"},{"line_number":34,"context_line":"from nova import test"},{"line_number":35,"context_line":"from nova import utils"},{"line_number":36,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAALH%2F%2FG7s%3D","line":33,"updated":"2012-10-18 12:23:32.000000000","message":"unused import?","commit_id":"40367db5dafb06bcd785616b8669727a13e1133c"},{"author":{"_account_id":1711,"name":"Yun Mao","email":"yunmao@gmail.com","username":"yunmao"},"change_message_id":"c904d243a99da996e0168c42ea83b5bbfd621d41","unresolved":false,"context_lines":[{"line_number":30,"context_line":"from nova import exception"},{"line_number":31,"context_line":"from nova import flags"},{"line_number":32,"context_line":"from nova.openstack.common import timeutils"},{"line_number":33,"context_line":"from nova import servicegroup"},{"line_number":34,"context_line":"from nova import test"},{"line_number":35,"context_line":"from nova import utils"},{"line_number":36,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAALn%2F%2F7L4%3D","line":33,"in_reply_to":"AAAALH%2F%2FG7s%3D","updated":"2012-10-26 19:54:10.000000000","message":"Done","commit_id":"40367db5dafb06bcd785616b8669727a13e1133c"}]}
