)]}'
{"nova/scheduler/driver.py":[{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"6c26be788f76ae584f86ef695be3c6e96dbcc20f","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            that satisfies the request_spec and filter_properties."},{"line_number":69,"context_line":"        \"\"\""},{"line_number":70,"context_line":"        msg \u003d _(\"Driver must implement select_destinations\")"},{"line_number":71,"context_line":"        raise NotImplementedError(msg)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba15a1d1_ad1ba01b","line":71,"updated":"2015-09-22 11:44:12.000000000","message":"should we just \u0027pass\u0027 if it\u0027s a abstract class?","commit_id":"afb1d585da4043b70e65b39b5d2027f183fb67fd"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"afa1b6613c01bf7ee816f2fe4aa2405547296996","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            that satisfies the request_spec and filter_properties."},{"line_number":69,"context_line":"        \"\"\""},{"line_number":70,"context_line":"        msg \u003d _(\"Driver must implement select_destinations\")"},{"line_number":71,"context_line":"        raise NotImplementedError(msg)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba15a1d1_d122cd53","line":71,"in_reply_to":"ba15a1d1_959ec5b6","updated":"2015-09-24 07:18:18.000000000","message":"But raising NotImplemented is hardly an implementation. Having a class call super() and get NotImplemented exception back doesn\u0027t make much sense. I\u0027d say make it pass in the absence of a real implementation.","commit_id":"afb1d585da4043b70e65b39b5d2027f183fb67fd"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"9035baa778b032ecbc65ca361195bf84c25d1c74","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            that satisfies the request_spec and filter_properties."},{"line_number":69,"context_line":"        \"\"\""},{"line_number":70,"context_line":"        msg \u003d _(\"Driver must implement select_destinations\")"},{"line_number":71,"context_line":"        raise NotImplementedError(msg)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba15a1d1_bcbc2d6d","line":71,"in_reply_to":"ba15a1d1_ad1ba01b","updated":"2015-09-22 13:01:27.000000000","message":"No, that\u0027s possible to have it implemented and called by super(), see :\n\n\"Unlike Java abstract methods, these abstract methods may have an implementation. This implementation can be called via the super() mechanism from the class that overrides it. This could be useful as an end-point for a super-call in a framework that uses cooperative multiple-inheritance.\"\n\nhttps://docs.python.org/2/library/abc.html#abc.abstractmethod","commit_id":"afb1d585da4043b70e65b39b5d2027f183fb67fd"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"0f229c2b3572ae58cdcb4cc7576386fc42dfd73c","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            that satisfies the request_spec and filter_properties."},{"line_number":69,"context_line":"        \"\"\""},{"line_number":70,"context_line":"        msg \u003d _(\"Driver must implement select_destinations\")"},{"line_number":71,"context_line":"        raise NotImplementedError(msg)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba15a1d1_959ec5b6","line":71,"in_reply_to":"ba15a1d1_bcbc2d6d","updated":"2015-09-22 20:16:15.000000000","message":"yes, make sense, thanks~","commit_id":"afb1d585da4043b70e65b39b5d2027f183fb67fd"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"d474534f7d816fb23ef604a0031a329293fc511e","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            that satisfies the request_spec and filter_properties."},{"line_number":69,"context_line":"        \"\"\""},{"line_number":70,"context_line":"        msg \u003d _(\"Driver must implement select_destinations\")"},{"line_number":71,"context_line":"        raise NotImplementedError(msg)"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba15a1d1_31d9c957","line":71,"updated":"2015-09-24 07:19:12.000000000","message":"Think this should be replaced with pass, see my reply in previous patchset.","commit_id":"8d4da8ba790218b908369f058f91a6fe7a9de3d0"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"bbb8381358a6556628ff94ef2f1390c2e82eb3ed","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            that satisfies the request_spec and filter_properties."},{"line_number":69,"context_line":"        \"\"\""},{"line_number":70,"context_line":"        msg \u003d _(\"Driver must implement select_destinations\")"},{"line_number":71,"context_line":"        raise NotImplementedError(msg)"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba15a1d1_626691bc","line":71,"in_reply_to":"ba15a1d1_31d9c957","updated":"2015-09-24 08:54:06.000000000","message":"Well, you\u0027re certainly right, I just wanted to stress on that\u0027s not a mandatory thing. Giving a NotImplemented when calling super() is maybe not the best answer to give and for that it\u0027s okay to consider a new respin","commit_id":"8d4da8ba790218b908369f058f91a6fe7a9de3d0"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"821d3c80f8c80879e4f0587a22a48b41c387e6cb","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        :return: A list of dicts with \u0027host\u0027, \u0027nodename\u0027 and \u0027limits\u0027 as keys"},{"line_number":67,"context_line":"            that satisfies the request_spec and filter_properties."},{"line_number":68,"context_line":"        \"\"\""},{"line_number":69,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a1a9d01_c4834855","line":69,"updated":"2015-09-28 10:29:20.000000000","message":"would it not be better to return an empty list, if we are going for this approach?","commit_id":"55460dcb4ec0bbfea6506f0683070fb23ad5c87f"},{"author":{"_account_id":15701,"name":"venkatesh","email":"p.venkatesh551@gmail.com","username":"venkatesh"},"change_message_id":"babaf1c07eab1bd41c1092b9b9f92eb2803ebeaa","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        :return: A list of dicts with \u0027host\u0027, \u0027nodename\u0027 and \u0027limits\u0027 as keys"},{"line_number":67,"context_line":"            that satisfies the request_spec and filter_properties."},{"line_number":68,"context_line":"        \"\"\""},{"line_number":69,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a1a9d01_c6c32756","line":69,"in_reply_to":"9a1a9d01_61801c47","updated":"2015-09-29 03:42:13.000000000","message":"I don\u0027t think so such a use case really exist in this scenario, subclass is overriding at that time also, we can return empty list, but returning empty list does not make sense, we have to select some host based on filters","commit_id":"55460dcb4ec0bbfea6506f0683070fb23ad5c87f"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"769e6b689e737465190dcfe5c36a9e7b77658a8f","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        :return: A list of dicts with \u0027host\u0027, \u0027nodename\u0027 and \u0027limits\u0027 as keys"},{"line_number":67,"context_line":"            that satisfies the request_spec and filter_properties."},{"line_number":68,"context_line":"        \"\"\""},{"line_number":69,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a1a9d01_61801c47","line":69,"in_reply_to":"9a1a9d01_b0be80d2","updated":"2015-09-28 16:12:33.000000000","message":"Actually John made a very good point. Since abc.abstractmethod allows to call super(), some drivers could allow to choose the default behaviour of returning an empty list.\n\nThat said, I don\u0027t want to nitpick, just reemphasizing that abc doesn\u0027t necessarly require an empty method.","commit_id":"55460dcb4ec0bbfea6506f0683070fb23ad5c87f"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"8181b79480ede5dd45ee2fb25aa7a58f8731073b","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        :return: A list of dicts with \u0027host\u0027, \u0027nodename\u0027 and \u0027limits\u0027 as keys"},{"line_number":67,"context_line":"            that satisfies the request_spec and filter_properties."},{"line_number":68,"context_line":"        \"\"\""},{"line_number":69,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a1a9d01_62944342","line":69,"in_reply_to":"9a1a9d01_bf04f217","updated":"2015-09-30 12:28:19.000000000","message":"Like I said previously, see the note in https://docs.python.org/2/library/abc.html#abc.abstractmethod\n\nPlease stop comparing Java and Python patterns, that\u0027s like comparing apples with bananas.","commit_id":"55460dcb4ec0bbfea6506f0683070fb23ad5c87f"},{"author":{"_account_id":15701,"name":"venkatesh","email":"p.venkatesh551@gmail.com","username":"venkatesh"},"change_message_id":"f7ffbd78bc7969b86d7b58eef6ae57aaec7e3d18","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        :return: A list of dicts with \u0027host\u0027, \u0027nodename\u0027 and \u0027limits\u0027 as keys"},{"line_number":67,"context_line":"            that satisfies the request_spec and filter_properties."},{"line_number":68,"context_line":"        \"\"\""},{"line_number":69,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a1a9d01_b0be80d2","line":69,"in_reply_to":"9a1a9d01_c4834855","updated":"2015-09-28 15:25:37.000000000","message":"Every subclass of Scheduler should implement abstract methods, returning empty list does not have any impact.","commit_id":"55460dcb4ec0bbfea6506f0683070fb23ad5c87f"},{"author":{"_account_id":14358,"name":"Marian Horban","email":"m.horban@gmail.com","username":"mhorban"},"change_message_id":"a74b23778cfe7dbdb5d3839720864ab84f5cf668","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        :return: A list of dicts with \u0027host\u0027, \u0027nodename\u0027 and \u0027limits\u0027 as keys"},{"line_number":67,"context_line":"            that satisfies the request_spec and filter_properties."},{"line_number":68,"context_line":"        \"\"\""},{"line_number":69,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a1a9d01_bf04f217","line":69,"in_reply_to":"9a1a9d01_c6c32756","updated":"2015-09-29 06:38:11.000000000","message":"In Java and C++ \"abstract method is a method that is declared without an implementation\". So I think you should not implement it. Even \u0027pass\u0027 there is redundant.","commit_id":"55460dcb4ec0bbfea6506f0683070fb23ad5c87f"}],"nova/tests/unit/scheduler/fakes.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"552859d6bebd71ecaf41e334d40d35b0d5e64cb1","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from nova import objects"},{"line_number":22,"context_line":"from nova.scheduler import driver"},{"line_number":23,"context_line":"from nova.scheduler import host_manager"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"NUMA_TOPOLOGY \u003d objects.NUMATopology("},{"line_number":27,"context_line":"                           cells\u003d[objects.NUMACell("}],"source_content_type":"text/x-python","patch_set":2,"id":"ba15a1d1_b2e602ae","line":24,"updated":"2015-09-18 15:21:33.000000000","message":"nit: that extra line was not necessary","commit_id":"2dc9a180b5752522c882993ba5f78982d509f3c8"}],"nova/tests/unit/scheduler/test_scheduler.py":[{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"878f681a68c62a6827818e22ca8b5d8055c0bfb3","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        # Correct scheduler driver"},{"line_number":54,"context_line":"        manager \u003d self.manager"},{"line_number":55,"context_line":"        self.assertIsInstance(manager.driver, self.driver_cls)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def test_select_destination(self):"},{"line_number":58,"context_line":"        with mock.patch.object(self.manager.driver, \u0027select_destinations\u0027"},{"line_number":59,"context_line":"                ) as select_destinations:"}],"source_content_type":"text/x-python","patch_set":22,"id":"da85f559_73a36150","line":56,"updated":"2015-11-13 20:52:35.000000000","message":"had better rename test_select_destination to test_select_destinations\n\nthis is a legacy nit.","commit_id":"865d6e518fd303038caa9d0793cc373199352f9d"},{"author":{"_account_id":15701,"name":"venkatesh","email":"p.venkatesh551@gmail.com","username":"venkatesh"},"change_message_id":"ef1dfe2a37033bd57536ff885005c280f4e18154","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        # Correct scheduler driver"},{"line_number":54,"context_line":"        manager \u003d self.manager"},{"line_number":55,"context_line":"        self.assertIsInstance(manager.driver, self.driver_cls)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def test_select_destination(self):"},{"line_number":58,"context_line":"        with mock.patch.object(self.manager.driver, \u0027select_destinations\u0027"},{"line_number":59,"context_line":"                ) as select_destinations:"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba8a016a_0abf6fd1","line":56,"in_reply_to":"ba8a016a_79e4db0c","updated":"2015-11-16 11:02:42.000000000","message":"sure","commit_id":"865d6e518fd303038caa9d0793cc373199352f9d"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"0e883145bba74e6dee1b1432fc6886141d900983","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        # Correct scheduler driver"},{"line_number":54,"context_line":"        manager \u003d self.manager"},{"line_number":55,"context_line":"        self.assertIsInstance(manager.driver, self.driver_cls)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def test_select_destination(self):"},{"line_number":58,"context_line":"        with mock.patch.object(self.manager.driver, \u0027select_destinations\u0027"},{"line_number":59,"context_line":"                ) as select_destinations:"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba8a016a_79e4db0c","line":56,"in_reply_to":"da85f559_65a3739f","updated":"2015-11-16 10:09:07.000000000","message":"Right, it\u0027s not part of the change, so feel free to submit a separate change","commit_id":"865d6e518fd303038caa9d0793cc373199352f9d"},{"author":{"_account_id":15701,"name":"venkatesh","email":"p.venkatesh551@gmail.com","username":"venkatesh"},"change_message_id":"a069b63b6e7bb5673f11f88eefd9052c18105d19","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        # Correct scheduler driver"},{"line_number":54,"context_line":"        manager \u003d self.manager"},{"line_number":55,"context_line":"        self.assertIsInstance(manager.driver, self.driver_cls)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def test_select_destination(self):"},{"line_number":58,"context_line":"        with mock.patch.object(self.manager.driver, \u0027select_destinations\u0027"},{"line_number":59,"context_line":"                ) as select_destinations:"}],"source_content_type":"text/x-python","patch_set":22,"id":"da85f559_65a3739f","line":56,"in_reply_to":"da85f559_73a36150","updated":"2015-11-16 04:28:34.000000000","message":"This method name is not part of my changes.","commit_id":"865d6e518fd303038caa9d0793cc373199352f9d"}]}
