)]}'
{"placement/objects/resource_provider.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b508ff255c7228398b80b1e1078ee30c2677a15b","unresolved":false,"context_lines":[{"line_number":3331,"context_line":"    return [(rp_id, root_id) for rp_id, root_id in res]"},{"line_number":3332,"context_line":""},{"line_number":3333,"context_line":""},{"line_number":3334,"context_line":"RPCandidate \u003d collections.namedtuple(\u0027RPCandidates\u0027, \u0027id root_id rc_id\u0027)"},{"line_number":3335,"context_line":""},{"line_number":3336,"context_line":""},{"line_number":3337,"context_line":"class RPCandidateList(object):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_8de6b9af","line":3334,"updated":"2019-02-28 20:47:51.000000000","message":"Consider moving this namedtuple and class to a new module. This one is too big already.","commit_id":"5165f2a779ab5817b2aedcecc6f8c7d0b0bb95cc"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b508ff255c7228398b80b1e1078ee30c2677a15b","unresolved":false,"context_lines":[{"line_number":3340,"context_line":"    the resource provider ID, the second element being the root provider ID"},{"line_number":3341,"context_line":"    and the third being resource class ID."},{"line_number":3342,"context_line":"    \"\"\""},{"line_number":3343,"context_line":"    def __init__(self, object\u003dNone):"},{"line_number":3344,"context_line":"        self.rp_candidates \u003d object or set()"},{"line_number":3345,"context_line":""},{"line_number":3346,"context_line":"    def __len__(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_68d8237e","line":3343,"range":{"start_line":3343,"start_character":23,"end_line":3343,"end_character":29},"updated":"2019-02-28 20:47:51.000000000","message":"object is a reserved word, please use something else (rp_candidates?).","commit_id":"5165f2a779ab5817b2aedcecc6f8c7d0b0bb95cc"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b508ff255c7228398b80b1e1078ee30c2677a15b","unresolved":false,"context_lines":[{"line_number":3346,"context_line":"    def __len__(self):"},{"line_number":3347,"context_line":"        return len(self.rp_candidates)"},{"line_number":3348,"context_line":""},{"line_number":3349,"context_line":"    def __add__(self, other):"},{"line_number":3350,"context_line":"        \"\"\"This is used to get trees that can satisfy all requested resource."},{"line_number":3351,"context_line":"        We define here that adding two RPCandidateList is to simply combine"},{"line_number":3352,"context_line":"        the two list of candidates but if the tree is not in the both"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_ed666529","line":3349,"range":{"start_line":3349,"start_character":8,"end_line":3349,"end_character":15},"updated":"2019-02-28 20:47:51.000000000","message":"The semantic of this guy is pretty obscure. Suggest making it a normal public method with a descriptive name (merge_by_common_trees?) rather than overriding \u0027+\u0027.","commit_id":"5165f2a779ab5817b2aedcecc6f8c7d0b0bb95cc"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b508ff255c7228398b80b1e1078ee30c2677a15b","unresolved":false,"context_lines":[{"line_number":3372,"context_line":"        self.rp_candidates |\u003d set("},{"line_number":3373,"context_line":"            RPCandidate(id\u003drp[0], root_id\u003drp[1], rc_id\u003drc_id) for rp in rps)"},{"line_number":3374,"context_line":""},{"line_number":3375,"context_line":"    def rps(self):"},{"line_number":3376,"context_line":"        \"\"\"Returns a set of IDs of nominated resource providers\"\"\""},{"line_number":3377,"context_line":"        return set(p.id for p in self.rp_candidates)"},{"line_number":3378,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_ed098594","line":3375,"updated":"2019-02-28 20:47:51.000000000","message":"could make these @property getters","commit_id":"5165f2a779ab5817b2aedcecc6f8c7d0b0bb95cc"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b508ff255c7228398b80b1e1078ee30c2677a15b","unresolved":false,"context_lines":[{"line_number":3489,"context_line":"        # filter provs_with_inv to have only trees with enough inventories"},{"line_number":3490,"context_line":"        # for this resource class. Here \"tree\" includes sharing providers"},{"line_number":3491,"context_line":"        # in its terminology"},{"line_number":3492,"context_line":"        provs_with_inv +\u003d provs_with_inv_rc"},{"line_number":3493,"context_line":""},{"line_number":3494,"context_line":"        if not len(provs_with_inv):"},{"line_number":3495,"context_line":"            return []"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_8d69d9f8","line":3492,"range":{"start_line":3492,"start_character":23,"end_line":3492,"end_character":25},"updated":"2019-02-28 20:47:51.000000000","message":"as noted above, this +\u003d is not at all intuitive in what it\u0027s actually doing.","commit_id":"5165f2a779ab5817b2aedcecc6f8c7d0b0bb95cc"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b508ff255c7228398b80b1e1078ee30c2677a15b","unresolved":false,"context_lines":[{"line_number":3491,"context_line":"        # in its terminology"},{"line_number":3492,"context_line":"        provs_with_inv +\u003d provs_with_inv_rc"},{"line_number":3493,"context_line":""},{"line_number":3494,"context_line":"        if not len(provs_with_inv):"},{"line_number":3495,"context_line":"            return []"},{"line_number":3496,"context_line":""},{"line_number":3497,"context_line":"    if not len(provs_with_inv):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_8d7f99dd","line":3494,"range":{"start_line":3494,"start_character":15,"end_line":3494,"end_character":34},"updated":"2019-02-28 20:47:51.000000000","message":"Implement __bool__ (as len(self)) so you can just say\n\n if not provs_with_inv:","commit_id":"5165f2a779ab5817b2aedcecc6f8c7d0b0bb95cc"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b508ff255c7228398b80b1e1078ee30c2677a15b","unresolved":false,"context_lines":[{"line_number":3494,"context_line":"        if not len(provs_with_inv):"},{"line_number":3495,"context_line":"            return []"},{"line_number":3496,"context_line":""},{"line_number":3497,"context_line":"    if not len(provs_with_inv):"},{"line_number":3498,"context_line":"        return []"},{"line_number":3499,"context_line":""},{"line_number":3500,"context_line":"    # If \u0027member_of\u0027 has values, do a separate lookup to identify the"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_0d4c09c6","line":3497,"range":{"start_line":3497,"start_character":11,"end_line":3497,"end_character":30},"updated":"2019-02-28 20:47:51.000000000","message":"__bool__ this","commit_id":"5165f2a779ab5817b2aedcecc6f8c7d0b0bb95cc"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b508ff255c7228398b80b1e1078ee30c2677a15b","unresolved":false,"context_lines":[{"line_number":3777,"context_line":"                      resource class ID)s for providers that matched the"},{"line_number":3778,"context_line":"                      requested resources"},{"line_number":3779,"context_line":"    \"\"\""},{"line_number":3780,"context_line":"    if not len(rp_tuples):"},{"line_number":3781,"context_line":"        return [], []"},{"line_number":3782,"context_line":""},{"line_number":3783,"context_line":"    # Get all the root resource provider IDs. We should include the first"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_6d511562","line":3780,"range":{"start_line":3780,"start_character":11,"end_line":3780,"end_character":25},"updated":"2019-02-28 20:47:51.000000000","message":"__bool__ this","commit_id":"5165f2a779ab5817b2aedcecc6f8c7d0b0bb95cc"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"cb2065d7867deb573dcc2f4f6a2fc49d81488c14","unresolved":false,"context_lines":[{"line_number":3336,"context_line":"@db_api.placement_context_manager.reader"},{"line_number":3337,"context_line":"def _get_trees_matching_all(ctx, resources, required_traits, forbidden_traits,"},{"line_number":3338,"context_line":"                            sharing, member_of, tree_root_id):"},{"line_number":3339,"context_line":"    \"\"\"Returns a RPCanadidates object which contains list of two-tuples"},{"line_number":3340,"context_line":"    (provider internal ID, root provider internal ID) for providers that"},{"line_number":3341,"context_line":"    satisfy the request for resources."},{"line_number":3342,"context_line":""},{"line_number":3343,"context_line":"    If traits are also required, this function only returns results where the"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_ff3b59cd","line":3340,"range":{"start_line":3339,"start_character":38,"end_line":3340,"end_character":57},"updated":"2019-03-01 12:59:02.000000000","message":"representing the \n\nDon\u0027t try to describe the shape of RPCandidates here; it\u0027ll either be too mealy or inaccurate. The reader can go look at that guy\u0027s do string for details.","commit_id":"8e71522790012bf1fef0f75ad1884efad147d712"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"f0d1433f77d4ad7429aa5153c02e0054395152a6","unresolved":false,"context_lines":[{"line_number":3336,"context_line":"@db_api.placement_context_manager.reader"},{"line_number":3337,"context_line":"def _get_trees_matching_all(ctx, resources, required_traits, forbidden_traits,"},{"line_number":3338,"context_line":"                            sharing, member_of, tree_root_id):"},{"line_number":3339,"context_line":"    \"\"\"Returns a RPCanadidates object which contains list of two-tuples"},{"line_number":3340,"context_line":"    (provider internal ID, root provider internal ID) for providers that"},{"line_number":3341,"context_line":"    satisfy the request for resources."},{"line_number":3342,"context_line":""},{"line_number":3343,"context_line":"    If traits are also required, this function only returns results where the"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_ff5fd93d","line":3340,"range":{"start_line":3339,"start_character":38,"end_line":3340,"end_character":57},"in_reply_to":"9fdfeff1_ff3b59cd","updated":"2019-03-01 13:52:52.000000000","message":"agree","commit_id":"8e71522790012bf1fef0f75ad1884efad147d712"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"cb2065d7867deb573dcc2f4f6a2fc49d81488c14","unresolved":false,"context_lines":[{"line_number":3696,"context_line":"    :param forbidden_traits: A map, keyed by trait string name, of trait"},{"line_number":3697,"context_line":"                             internal IDs that a resource provider must"},{"line_number":3698,"context_line":"                             not have."},{"line_number":3699,"context_line":"    :param rp_candidates: RPCanadidates object which contains a list of tuples"},{"line_number":3700,"context_line":"                          of (provider ID, anchor root provider ID,"},{"line_number":3701,"context_line":"                          resource class ID)s for providers that matched the"},{"line_number":3702,"context_line":"                          requested resources"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_3f532118","line":3699,"range":{"start_line":3699,"start_character":47,"end_line":3699,"end_character":61},"updated":"2019-03-01 12:59:02.000000000","message":"Ditto above","commit_id":"8e71522790012bf1fef0f75ad1884efad147d712"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"cb2065d7867deb573dcc2f4f6a2fc49d81488c14","unresolved":false,"context_lines":[{"line_number":3696,"context_line":"    :param forbidden_traits: A map, keyed by trait string name, of trait"},{"line_number":3697,"context_line":"                             internal IDs that a resource provider must"},{"line_number":3698,"context_line":"                             not have."},{"line_number":3699,"context_line":"    :param rp_candidates: RPCanadidates object which contains a list of tuples"},{"line_number":3700,"context_line":"                          of (provider ID, anchor root provider ID,"},{"line_number":3701,"context_line":"                          resource class ID)s for providers that matched the"},{"line_number":3702,"context_line":"                          requested resources"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_9f500d0c","line":3699,"range":{"start_line":3699,"start_character":26,"end_line":3699,"end_character":39},"updated":"2019-03-01 12:59:02.000000000","message":"RPCandidates","commit_id":"8e71522790012bf1fef0f75ad1884efad147d712"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"18da74892233b23f62e51948d0e6274cb2d876eb","unresolved":false,"context_lines":[{"line_number":3694,"context_line":"    :param forbidden_traits: A map, keyed by trait string name, of trait"},{"line_number":3695,"context_line":"                             internal IDs that a resource provider must"},{"line_number":3696,"context_line":"                             not have."},{"line_number":3697,"context_line":"    :param rp_candidates: RPCanadidates object representing the providers"},{"line_number":3698,"context_line":"                          that satisfy the request for resources."},{"line_number":3699,"context_line":"    \"\"\""},{"line_number":3700,"context_line":"    if not rp_candidates:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_2c38ca39","line":3697,"range":{"start_line":3697,"start_character":26,"end_line":3697,"end_character":39},"updated":"2019-03-05 00:57:32.000000000","message":"RPCandidates","commit_id":"cf7dc9d6ace0cdbb2700fff3479dd36fbf181df1"}],"placement/objects/util.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"cb2065d7867deb573dcc2f4f6a2fc49d81488c14","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"9fdfeff1_d4251cc0","updated":"2019-03-01 12:59:02.000000000","message":"Why don\u0027t we call the module rp_candidate. We\u0027re trying to establish a pattern of small, single-purpose modules; \"util\" would be doomed to become a holdall for miscellaneous stuff.","commit_id":"8e71522790012bf1fef0f75ad1884efad147d712"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"f0d1433f77d4ad7429aa5153c02e0054395152a6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"9fdfeff1_1a374be5","in_reply_to":"9fdfeff1_d4251cc0","updated":"2019-03-01 13:52:52.000000000","message":"agree.\n\nAnother option is to include this class in the allocation_candidate module (once it exists) assuming the description, below, which limits the use to just that is accurate.","commit_id":"8e71522790012bf1fef0f75ad1884efad147d712"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"cb2065d7867deb573dcc2f4f6a2fc49d81488c14","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        \"\"\"Add given resource providers to the candidate list."},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        :param rps: tuple of (resource provider ID, anchor root provider ID)"},{"line_number":57,"context_line":"        :param rc_id: resource class ID with which the resource provider is"},{"line_number":58,"context_line":"                      available"},{"line_number":59,"context_line":"        \"\"\""},{"line_number":60,"context_line":"        self.rp_candidates |\u003d set("},{"line_number":61,"context_line":"            RPCandidate(id\u003drp[0], root_id\u003drp[1], rc_id\u003drc_id) for rp in rps)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_1472c4e3","line":58,"range":{"start_line":57,"start_character":22,"end_line":58,"end_character":31},"updated":"2019-03-01 12:59:02.000000000","message":"This is awkward, though I can\u0027t think of a way to phrase it that\u0027s not. Perhaps:\n\nThe ID of a resource class in which the provider has sufficient inventory.","commit_id":"8e71522790012bf1fef0f75ad1884efad147d712"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"f0d1433f77d4ad7429aa5153c02e0054395152a6","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        \"\"\"Add given resource providers to the candidate list."},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        :param rps: tuple of (resource provider ID, anchor root provider ID)"},{"line_number":57,"context_line":"        :param rc_id: resource class ID with which the resource provider is"},{"line_number":58,"context_line":"                      available"},{"line_number":59,"context_line":"        \"\"\""},{"line_number":60,"context_line":"        self.rp_candidates |\u003d set("},{"line_number":61,"context_line":"            RPCandidate(id\u003drp[0], root_id\u003drp[1], rc_id\u003drc_id) for rp in rps)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_dac0e34c","line":58,"range":{"start_line":57,"start_character":22,"end_line":58,"end_character":31},"in_reply_to":"9fdfeff1_1472c4e3","updated":"2019-03-01 13:52:52.000000000","message":"What\u0027s being added is a list of resource providers providing a particular (single) class of inventory. So maybe:\n\nrc_id: ID of the class of resource provided by these resource providers\n\n?","commit_id":"8e71522790012bf1fef0f75ad1884efad147d712"}],"placement/tests/unit/objects/test_rp_candidates.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"df8dee94fb0235ac297ab41fefcf07d1d4fa6610","unresolved":false,"context_lines":[{"line_number":21,"context_line":"        self.rp_candidates \u003d rp_candidates.RPCandidateList()"},{"line_number":22,"context_line":"        self.rps_rc1 \u003d set(["},{"line_number":23,"context_line":"                (\u0027rp1\u0027, \u0027root1\u0027), (\u0027rp2\u0027, \u0027root1\u0027), (\u0027rp3\u0027, \u0027root1\u0027),"},{"line_number":24,"context_line":"                (\u0027rp1\u0027, \u0027root\u0027), (\u0027rp4\u0027, \u0027root\u0027)])"},{"line_number":25,"context_line":"        self.rp_candidates.add_rps(self.rps_rc1, \u0027rc_1\u0027)"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    def test_property(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_ecbe42ad","line":24,"range":{"start_line":24,"start_character":17,"end_line":24,"end_character":30},"updated":"2019-03-03 07:01:42.000000000","message":"How does rp1 have two different roots? If it\u0027s a sharing provider and they\u0027re its anchor providers, perhaps it would be clearer if named something share-y.","commit_id":"cf7dc9d6ace0cdbb2700fff3479dd36fbf181df1"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"f5816ab1ce0c6fa1170422bd538495a7af72c92d","unresolved":false,"context_lines":[{"line_number":21,"context_line":"        self.rp_candidates \u003d rp_candidates.RPCandidateList()"},{"line_number":22,"context_line":"        self.rps_rc1 \u003d set(["},{"line_number":23,"context_line":"                (\u0027rp1\u0027, \u0027root1\u0027), (\u0027rp2\u0027, \u0027root1\u0027), (\u0027rp3\u0027, \u0027root1\u0027),"},{"line_number":24,"context_line":"                (\u0027rp1\u0027, \u0027root\u0027), (\u0027rp4\u0027, \u0027root\u0027)])"},{"line_number":25,"context_line":"        self.rp_candidates.add_rps(self.rps_rc1, \u0027rc_1\u0027)"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    def test_property(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_fbb10d46","line":24,"range":{"start_line":24,"start_character":17,"end_line":24,"end_character":30},"in_reply_to":"9fdfeff1_ecbe42ad","updated":"2019-03-04 10:12:09.000000000","message":"That is a bit confusing, maybe tidy it up in a fup?","commit_id":"cf7dc9d6ace0cdbb2700fff3479dd36fbf181df1"}]}
