)]}'
{"nova/scheduler/chance.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"c2ae13d163cf9f94b3c2e475ea7d093017869a61","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        dests \u003d []"},{"line_number":67,"context_line":"        for i in range(num_instances):"},{"line_number":68,"context_line":"            host \u003d self._schedule(context, CONF.compute_topic, spec_obj)"},{"line_number":69,"context_line":"            # Shuffle between all nodes in case we have more than once per"},{"line_number":70,"context_line":"            # service"},{"line_number":71,"context_line":"            nodes \u003d objects.ComputeNodeList.get_all_by_host(context, host\u003dhost)"},{"line_number":72,"context_line":"            cn \u003d random.choice(nodes)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_67119552","line":69,"updated":"2017-05-22 15:45:11.000000000","message":"s/once/one/ ?","commit_id":"e751304e4c75cf78ad91d2dcebed6e88c835aea8"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"5ee9ae450b6bf6937fa410b74304dc775c07742f","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            host \u003d self._schedule(context, CONF.compute_topic, spec_obj)"},{"line_number":69,"context_line":"            # Shuffle between all nodes in case we have more than once per"},{"line_number":70,"context_line":"            # service"},{"line_number":71,"context_line":"            nodes \u003d objects.ComputeNodeList.get_all_by_host(context, host\u003dhost)"},{"line_number":72,"context_line":"            cn \u003d random.choice(nodes)"},{"line_number":73,"context_line":"            host_state \u003d dict(host\u003dcn.host, nodename\u003dcn.hypervisor_hostname,"},{"line_number":74,"context_line":"                              limits\u003dNone)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff0f0b1f_0462daae","line":71,"updated":"2017-05-22 14:08:44.000000000","message":"just to make it clear, ChanceScheduler doesn\u0027t support yet cellsV2, see the comment from Dan L64 so it\u0027s fine to directly lookup computes like this.","commit_id":"e751304e4c75cf78ad91d2dcebed6e88c835aea8"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"f19adcd1fc220a4f49e5ab8f0d4bed2ddb3e75d1","unresolved":false,"context_lines":[{"line_number":59,"context_line":"    def select_destinations(self, context, spec_obj):"},{"line_number":60,"context_line":"        \"\"\"Selects random destinations.\"\"\""},{"line_number":61,"context_line":"        num_instances \u003d spec_obj.num_instances"},{"line_number":62,"context_line":"        # NOTE(timello): Returns a list of dicts with \u0027host\u0027, \u0027nodename\u0027 and"},{"line_number":63,"context_line":"        # \u0027limits\u0027 as keys for compatibility with filter_scheduler."},{"line_number":64,"context_line":"        # TODO(danms): This needs to be extended to support multiple cells"},{"line_number":65,"context_line":"        # and limiting the destination scope to a single requested cell"},{"line_number":66,"context_line":"        dests \u003d []"}],"source_content_type":"text/x-python","patch_set":4,"id":"df140735_cf9986c4","line":63,"range":{"start_line":62,"start_character":0,"end_line":63,"end_character":67},"updated":"2017-06-02 12:26:22.000000000","message":"Unrelated; but this should go in the docstring instead.","commit_id":"f485c77c409fa4cbbe49824e395d51c2be72aa5d"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"f19adcd1fc220a4f49e5ab8f0d4bed2ddb3e75d1","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            host \u003d self._schedule(context, CONF.compute_topic, spec_obj)"},{"line_number":69,"context_line":"            # Shuffle between all nodes in case we have more than one per"},{"line_number":70,"context_line":"            # service"},{"line_number":71,"context_line":"            nodes \u003d objects.ComputeNodeList.get_all_by_host(context, host\u003dhost)"},{"line_number":72,"context_line":"            cn \u003d random.choice(nodes)"},{"line_number":73,"context_line":"            host_state \u003d dict(host\u003dcn.host, nodename\u003dcn.hypervisor_hostname,"},{"line_number":74,"context_line":"                              limits\u003dNone)"}],"source_content_type":"text/x-python","patch_set":4,"id":"df140735_2fe482e0","line":71,"updated":"2017-06-02 12:26:22.000000000","message":"Don\u0027t know how many hosts and computes-per-host we\u0027re expecting, but it might be nice to cache the dict of {host: [cn, ...]} as we go, for efficiency when num_instances is big.","commit_id":"f485c77c409fa4cbbe49824e395d51c2be72aa5d"}],"nova/tests/unit/scheduler/test_chance_scheduler.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"f19adcd1fc220a4f49e5ab8f0d4bed2ddb3e75d1","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        (host, node) \u003d (dests[1][\u0027host\u0027], dests[1][\u0027nodename\u0027])"},{"line_number":77,"context_line":"        self.assertEqual(\u0027host2\u0027, host)"},{"line_number":78,"context_line":"        self.assertEqual(\u0027foo\u0027, node)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        calls \u003d [mock.call(all_hosts),"},{"line_number":81,"context_line":"                 mock.call(mock_get_all(self.context, \u0027host3\u0027)),"},{"line_number":82,"context_line":"                 mock.call(all_hosts),"}],"source_content_type":"text/x-python","patch_set":4,"id":"df140735_8ffb8e45","line":79,"updated":"2017-06-02 12:26:22.000000000","message":"[Unrelated]: assertIsNone(dests[N][\u0027limits\u0027])","commit_id":"f485c77c409fa4cbbe49824e395d51c2be72aa5d"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"f19adcd1fc220a4f49e5ab8f0d4bed2ddb3e75d1","unresolved":false,"context_lines":[{"line_number":81,"context_line":"                 mock.call(mock_get_all(self.context, \u0027host3\u0027)),"},{"line_number":82,"context_line":"                 mock.call(all_hosts),"},{"line_number":83,"context_line":"                 mock.call(mock_get_all(self.context, \u0027host2\u0027))]"},{"line_number":84,"context_line":"        self.assertEqual(calls, mock_random_choice.call_args_list)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def test_select_destinations_no_valid_host(self):"},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"df140735_ef10caaa","line":84,"updated":"2017-06-02 12:26:22.000000000","message":"[Unrelated] or:\n\n mock_random_choice.assert_has_calls(calls)","commit_id":"f485c77c409fa4cbbe49824e395d51c2be72aa5d"}]}
