)]}'
{"nova/api/openstack/placement/objects/resource_provider.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"35c17c3148df5fe50809ea96feef1bac2f802614","unresolved":false,"context_lines":[{"line_number":1394,"context_line":"    # )"},{"line_number":1395,"context_line":"    # GROUP BY rp.id"},{"line_number":1396,"context_line":""},{"line_number":1397,"context_line":"    resources \u003d match_spec.group_resources(0)"},{"line_number":1398,"context_line":"    sharing_providers \u003d match_spec.group_sharing_providers(0)"},{"line_number":1399,"context_line":""},{"line_number":1400,"context_line":"    rpt \u003d sa.alias(_RP_TBL, name\u003d\"rp\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_36031b45","line":1397,"range":{"start_line":1397,"start_character":43,"end_line":1397,"end_character":44},"updated":"2018-05-04 14:08:36.000000000","message":"Is this means: get me the resources for the un-numbered group? I suggest to make it more readable by saying something like:\n\n  match_spec.group_resources(MatchSpec.UNNUMBERED)\n\nBtw in other parts of the code empty string, or None is used as the key to get the unnumbered group. I suggest not to try to introduce a third key for that group.","commit_id":"2f1f56d6b43c1f0fae3a938a31b943b463d2f6dd"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"35c17c3148df5fe50809ea96feef1bac2f802614","unresolved":false,"context_lines":[{"line_number":2886,"context_line":"        provider must have associated with it."},{"line_number":2887,"context_line":"    \"\"\""},{"line_number":2888,"context_line":"    if not traits:"},{"line_number":2889,"context_line":"        return []"},{"line_number":2890,"context_line":""},{"line_number":2891,"context_line":"    rptt \u003d sa.alias(_RP_TRAIT_TBL, name\u003d\"rpt\")"},{"line_number":2892,"context_line":"    sel \u003d sa.select([rptt.c.resource_provider_id])"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_b162d515","line":2889,"updated":"2018-05-04 14:08:36.000000000","message":"Why we need this change? It seems unrelated to me.","commit_id":"2f1f56d6b43c1f0fae3a938a31b943b463d2f6dd"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fac8543907e4bd93f9376d589db4448a66cebccd","unresolved":false,"context_lines":[{"line_number":2886,"context_line":"        provider must have associated with it."},{"line_number":2887,"context_line":"    \"\"\""},{"line_number":2888,"context_line":"    if not traits:"},{"line_number":2889,"context_line":"        return []"},{"line_number":2890,"context_line":""},{"line_number":2891,"context_line":"    rptt \u003d sa.alias(_RP_TRAIT_TBL, name\u003d\"rpt\")"},{"line_number":2892,"context_line":"    sel \u003d sa.select([rptt.c.resource_provider_id])"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_22675050","line":2889,"in_reply_to":"5f7c97a3_b162d515","updated":"2018-05-04 16:35:48.000000000","message":"Because it made the code easier to read. No need to have try/catches inside list comprehensions and dict comprehensions.","commit_id":"2f1f56d6b43c1f0fae3a938a31b943b463d2f6dd"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"35c17c3148df5fe50809ea96feef1bac2f802614","unresolved":false,"context_lines":[{"line_number":2905,"context_line":"        provider must have associated with it"},{"line_number":2906,"context_line":"    \"\"\""},{"line_number":2907,"context_line":"    if not required_traits:"},{"line_number":2908,"context_line":"        return []"},{"line_number":2909,"context_line":""},{"line_number":2910,"context_line":"    rptt \u003d sa.alias(_RP_TRAIT_TBL, name\u003d\"rpt\")"},{"line_number":2911,"context_line":"    sel \u003d sa.select([rptt.c.resource_provider_id])"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_b14bb585","line":2908,"updated":"2018-05-04 14:08:36.000000000","message":"ditto","commit_id":"2f1f56d6b43c1f0fae3a938a31b943b463d2f6dd"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"35c17c3148df5fe50809ea96feef1bac2f802614","unresolved":false,"context_lines":[{"line_number":3342,"context_line":"            used\u003dused,"},{"line_number":3343,"context_line":"        )"},{"line_number":3344,"context_line":"        summary.resources.append(rpsr)"},{"line_number":3345,"context_line":"        summary.traits \u003d [Trait(context, id\u003dtid, name\u003dtname)"},{"line_number":3346,"context_line":"                          for (tid, tname) in traits]"},{"line_number":3347,"context_line":"    return summaries"},{"line_number":3348,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_d95bf72b","line":3345,"range":{"start_line":3345,"start_character":41,"end_line":3345,"end_character":47},"updated":"2018-05-04 14:08:36.000000000","message":"I guess we don\u0027t use that id later on as that would mean the original code was broken. Still it make sense to provide the id if we have it.","commit_id":"2f1f56d6b43c1f0fae3a938a31b943b463d2f6dd"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e241bf0bb042ef4fdded63e327fe2057bcf1de78","unresolved":false,"context_lines":[{"line_number":3722,"context_line":"    return {r[0]: r[1] for r in ctx.session.execute(sel)}"},{"line_number":3723,"context_line":""},{"line_number":3724,"context_line":""},{"line_number":3725,"context_line":"class MatchSpec(object):"},{"line_number":3726,"context_line":"    \"\"\"An object to keep the state of matching decisions for a request for"},{"line_number":3727,"context_line":"    allocation candidates."},{"line_number":3728,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_7daf3994","line":3725,"range":{"start_line":3725,"start_character":6,"end_line":3725,"end_character":15},"updated":"2018-05-03 22:21:23.000000000","message":"Is the idea for me to add a self._allocation_requests list whose entries are lists of AllocationRequest corresponding to each of the request_groups?","commit_id":"2f1f56d6b43c1f0fae3a938a31b943b463d2f6dd"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"35c17c3148df5fe50809ea96feef1bac2f802614","unresolved":false,"context_lines":[{"line_number":3722,"context_line":"    return {r[0]: r[1] for r in ctx.session.execute(sel)}"},{"line_number":3723,"context_line":""},{"line_number":3724,"context_line":""},{"line_number":3725,"context_line":"class MatchSpec(object):"},{"line_number":3726,"context_line":"    \"\"\"An object to keep the state of matching decisions for a request for"},{"line_number":3727,"context_line":"    allocation candidates."},{"line_number":3728,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_f9a033a8","line":3725,"range":{"start_line":3725,"start_character":6,"end_line":3725,"end_character":15},"updated":"2018-05-04 14:08:36.000000000","message":"bikesheding on the name: An object of this class referred as \u0027object describing request\u0027 so for me this is a RequestSpec or a ResourceRequestSpec","commit_id":"2f1f56d6b43c1f0fae3a938a31b943b463d2f6dd"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"300b73f81ce7883ec38a94e2c522b7e3eb6fcb2a","unresolved":false,"context_lines":[{"line_number":3722,"context_line":"    return {r[0]: r[1] for r in ctx.session.execute(sel)}"},{"line_number":3723,"context_line":""},{"line_number":3724,"context_line":""},{"line_number":3725,"context_line":"class MatchSpec(object):"},{"line_number":3726,"context_line":"    \"\"\"An object to keep the state of matching decisions for a request for"},{"line_number":3727,"context_line":"    allocation candidates."},{"line_number":3728,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_99249f0f","line":3725,"range":{"start_line":3725,"start_character":6,"end_line":3725,"end_character":15},"in_reply_to":"5f7c97a3_7daf3994","updated":"2018-05-04 13:55:34.000000000","message":"Not necessarily, no. The idea would be to use the MatchSpec to pass the anchoring information. In other words, don\u0027t store anchoring information in the AllocationRequest object, but instead simply pass that information for a group via the match spec.","commit_id":"2f1f56d6b43c1f0fae3a938a31b943b463d2f6dd"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"35c17c3148df5fe50809ea96feef1bac2f802614","unresolved":false,"context_lines":[{"line_number":3723,"context_line":""},{"line_number":3724,"context_line":""},{"line_number":3725,"context_line":"class MatchSpec(object):"},{"line_number":3726,"context_line":"    \"\"\"An object to keep the state of matching decisions for a request for"},{"line_number":3727,"context_line":"    allocation candidates."},{"line_number":3728,"context_line":"    \"\"\""},{"line_number":3729,"context_line":"    def __init__(self, ctx, request_groups):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_9991ff55","line":3726,"range":{"start_line":3726,"start_character":29,"end_line":3726,"end_character":56},"updated":"2018-05-04 14:08:36.000000000","message":"Is it keeping an intermittent state of the ongoing decision making or just describing what was the request? I don\u0027t see any mutators in this class so I think it is the later.","commit_id":"2f1f56d6b43c1f0fae3a938a31b943b463d2f6dd"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fac8543907e4bd93f9376d589db4448a66cebccd","unresolved":false,"context_lines":[{"line_number":3723,"context_line":""},{"line_number":3724,"context_line":""},{"line_number":3725,"context_line":"class MatchSpec(object):"},{"line_number":3726,"context_line":"    \"\"\"An object to keep the state of matching decisions for a request for"},{"line_number":3727,"context_line":"    allocation candidates."},{"line_number":3728,"context_line":"    \"\"\""},{"line_number":3729,"context_line":"    def __init__(self, ctx, request_groups):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_624c68c7","line":3726,"range":{"start_line":3726,"start_character":29,"end_line":3726,"end_character":56},"in_reply_to":"5f7c97a3_9991ff55","updated":"2018-05-04 16:35:48.000000000","message":"It would be keeping the list of anchor providers associated with a set of providers currently undergoing an iteration of filtering/merging.","commit_id":"2f1f56d6b43c1f0fae3a938a31b943b463d2f6dd"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"35c17c3148df5fe50809ea96feef1bac2f802614","unresolved":false,"context_lines":[{"line_number":3735,"context_line":"        _ensure_rc_cache(ctx)"},{"line_number":3736,"context_line":"        _ensure_trait_sync(ctx)"},{"line_number":3737,"context_line":"        self.request_groups \u003d request_groups"},{"line_number":3738,"context_line":"        # List, indexed by request group ID, of dicts, keyed by resource class"},{"line_number":3739,"context_line":"        # internal ID, of the amounts of that resource class being requested by"},{"line_number":3740,"context_line":"        # the group."},{"line_number":3741,"context_line":"        self._group_resources \u003d ["}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_91e1d901","line":3738,"range":{"start_line":3738,"start_character":27,"end_line":3738,"end_character":43},"updated":"2018-05-04 14:08:36.000000000","message":"is this the suffix of the group? Today a request group doesn\u0027t have an ID stored in it.","commit_id":"2f1f56d6b43c1f0fae3a938a31b943b463d2f6dd"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fac8543907e4bd93f9376d589db4448a66cebccd","unresolved":false,"context_lines":[{"line_number":3735,"context_line":"        _ensure_rc_cache(ctx)"},{"line_number":3736,"context_line":"        _ensure_trait_sync(ctx)"},{"line_number":3737,"context_line":"        self.request_groups \u003d request_groups"},{"line_number":3738,"context_line":"        # List, indexed by request group ID, of dicts, keyed by resource class"},{"line_number":3739,"context_line":"        # internal ID, of the amounts of that resource class being requested by"},{"line_number":3740,"context_line":"        # the group."},{"line_number":3741,"context_line":"        self._group_resources \u003d ["}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_02c7b414","line":3738,"range":{"start_line":3738,"start_character":27,"end_line":3738,"end_character":43},"in_reply_to":"5f7c97a3_91e1d901","updated":"2018-05-04 16:35:48.000000000","message":"The suffix isn\u0027t needed. It\u0027s just a list of request groups, nothing more.","commit_id":"2f1f56d6b43c1f0fae3a938a31b943b463d2f6dd"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c18617e169dbcfe48dc12560b163e524f56b1a6c","unresolved":false,"context_lines":[{"line_number":3798,"context_line":"                    continue"},{"line_number":3799,"context_line":"                value \u003d _get_providers_with_shared_capacity(ctx, rc_id, amount)"},{"line_number":3800,"context_line":"                self._sharing_providers[key] \u003d value"},{"line_number":3801,"context_line":""},{"line_number":3802,"context_line":"    def group_resources(self, group):"},{"line_number":3803,"context_line":"        \"\"\"Returns a dict, keyed by resource class internal ID, of the amount"},{"line_number":3804,"context_line":"        requested of that resource class by the specified request group."}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_62bc6805","line":3801,"updated":"2018-05-04 16:08:36.000000000","message":"OK, I\u0027ve read the second patch and that shows better how this class will be used.\n\nWe have a collection of RequestGroup objects held by a MatchSpec. This MatchSpec provides methods to view a given group from different perspective (e.g. group_*(self, group) methods). Then we pass around a MatchSpec object and a group index to utilize these view functions. For me these group_*(self, group) functions belong to the RequestGroup object itself. E.g. RequestGroup.resources(), RequestGroup.member_of(), etc. \n\nThere are two outliers:\n\n* trait_name_string() - it is a pure utility function. I have no problem keeping it here\n\n* group_sharing_providers() - it relies on a cache that is not specific for a single group but depends on every group in the MatchSpec. This prevents us to simply push the group_sharing_providers() function down to the RequestGroup right now. \n\nI\u0027m not sure that we need this optimization and caching without knowing if the repeated SQL query leads to a bottleneck or not.\n\nIf we need to optimize then we can still push the group_sharing_providers() down to the RequestGroup by making each RequestGroup hold a reference to the MatchSpec\u0027s cache. If that is not initalized (yet) then the RequestGroup can do its own group-local SQL query. But if a MatchSpec object already created containing the given RequestGroup object then that MatchSpec object will populate its cache and give the reference of that cache to each RequestGroup it contains.","commit_id":"2f1f56d6b43c1f0fae3a938a31b943b463d2f6dd"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"09e7388188a6e31ee332fa1ff637f302dbac25fb","unresolved":false,"context_lines":[{"line_number":3798,"context_line":"                    continue"},{"line_number":3799,"context_line":"                value \u003d _get_providers_with_shared_capacity(ctx, rc_id, amount)"},{"line_number":3800,"context_line":"                self._sharing_providers[key] \u003d value"},{"line_number":3801,"context_line":""},{"line_number":3802,"context_line":"    def group_resources(self, group):"},{"line_number":3803,"context_line":"        \"\"\"Returns a dict, keyed by resource class internal ID, of the amount"},{"line_number":3804,"context_line":"        requested of that resource class by the specified request group."}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_8d6c5537","line":3801,"in_reply_to":"5f7c97a3_42fdac38","updated":"2018-05-04 17:29:58.000000000","message":"OK, I\u0027ve reworked things in the latest revision so that we pass a single RequestGroupSearchContext object to the various search/filter functions.\n\nI\u0027ve also squashed the two commits into one.\n\nLemme know what you think.","commit_id":"2f1f56d6b43c1f0fae3a938a31b943b463d2f6dd"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fac8543907e4bd93f9376d589db4448a66cebccd","unresolved":false,"context_lines":[{"line_number":3798,"context_line":"                    continue"},{"line_number":3799,"context_line":"                value \u003d _get_providers_with_shared_capacity(ctx, rc_id, amount)"},{"line_number":3800,"context_line":"                self._sharing_providers[key] \u003d value"},{"line_number":3801,"context_line":""},{"line_number":3802,"context_line":"    def group_resources(self, group):"},{"line_number":3803,"context_line":"        \"\"\"Returns a dict, keyed by resource class internal ID, of the amount"},{"line_number":3804,"context_line":"        requested of that resource class by the specified request group."}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_42fdac38","line":3801,"in_reply_to":"5f7c97a3_62bc6805","updated":"2018-05-04 16:35:48.000000000","message":"I\u0027d originally considered changing the RequestGroup object and adding a reference to a MatchSpec object (for the caches of things).\n\nHowever, RequestGroup is shared between client and server and that\u0027s why I chose not to do that. MatchSpec is server-side only.","commit_id":"2f1f56d6b43c1f0fae3a938a31b943b463d2f6dd"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"35c17c3148df5fe50809ea96feef1bac2f802614","unresolved":false,"context_lines":[{"line_number":3845,"context_line":"        \"\"\""},{"line_number":3846,"context_line":"        return {"},{"line_number":3847,"context_line":"            rc_id: self._sharing_providers_for(rc_id, amount)"},{"line_number":3848,"context_line":"            for rc_id, amount in self.group_resources(0).items()"},{"line_number":3849,"context_line":"        }"},{"line_number":3850,"context_line":""},{"line_number":3851,"context_line":"    def trait_name_string(self, trait_ids):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_1132a9f2","line":3848,"range":{"start_line":3848,"start_character":54,"end_line":3848,"end_character":55},"updated":"2018-05-04 14:08:36.000000000","message":"either we don\u0027t need the group id to be passed as a parameter or we should pass it forward to group_resources()","commit_id":"2f1f56d6b43c1f0fae3a938a31b943b463d2f6dd"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"fac8543907e4bd93f9376d589db4448a66cebccd","unresolved":false,"context_lines":[{"line_number":3845,"context_line":"        \"\"\""},{"line_number":3846,"context_line":"        return {"},{"line_number":3847,"context_line":"            rc_id: self._sharing_providers_for(rc_id, amount)"},{"line_number":3848,"context_line":"            for rc_id, amount in self.group_resources(0).items()"},{"line_number":3849,"context_line":"        }"},{"line_number":3850,"context_line":""},{"line_number":3851,"context_line":"    def trait_name_string(self, trait_ids):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_62fa2843","line":3848,"range":{"start_line":3848,"start_character":54,"end_line":3848,"end_character":55},"in_reply_to":"5f7c97a3_1132a9f2","updated":"2018-05-04 16:35:48.000000000","message":"this is a mistake... should be s/0/group/","commit_id":"2f1f56d6b43c1f0fae3a938a31b943b463d2f6dd"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e241bf0bb042ef4fdded63e327fe2057bcf1de78","unresolved":false,"context_lines":[{"line_number":3853,"context_line":"        given a set of trait internal IDs."},{"line_number":3854,"context_line":"        \"\"\""},{"line_number":3855,"context_line":"        return \u0027,\u0027.join(self._trait_id_to_name[tid] for tid in trait_ids)"},{"line_number":3856,"context_line":""},{"line_number":3857,"context_line":""},{"line_number":3858,"context_line":"@base.VersionedObjectRegistry.register_if(False)"},{"line_number":3859,"context_line":"class AllocationCandidates(base.VersionedObject):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_5ddcbd45","line":3856,"updated":"2018-05-03 22:21:23.000000000","message":"I think I also need:\n\n def use_same_provider(self, group):\n     return self.request_groups[group].use_same_provider\n\n...unless I\u0027m going to inline that, which I guess I could.","commit_id":"2f1f56d6b43c1f0fae3a938a31b943b463d2f6dd"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"300b73f81ce7883ec38a94e2c522b7e3eb6fcb2a","unresolved":false,"context_lines":[{"line_number":3853,"context_line":"        given a set of trait internal IDs."},{"line_number":3854,"context_line":"        \"\"\""},{"line_number":3855,"context_line":"        return \u0027,\u0027.join(self._trait_id_to_name[tid] for tid in trait_ids)"},{"line_number":3856,"context_line":""},{"line_number":3857,"context_line":""},{"line_number":3858,"context_line":"@base.VersionedObjectRegistry.register_if(False)"},{"line_number":3859,"context_line":"class AllocationCandidates(base.VersionedObject):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_b982bbc7","line":3856,"in_reply_to":"5f7c97a3_5ddcbd45","updated":"2018-05-04 13:55:34.000000000","message":"ack. didn\u0027t add since that attribute doesn\u0027t exist yet, though, right?","commit_id":"2f1f56d6b43c1f0fae3a938a31b943b463d2f6dd"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"8aa528754480a2a82582a04831bb0b899161d7f2","unresolved":false,"context_lines":[{"line_number":3736,"context_line":"        _ensure_rc_cache(ctx)"},{"line_number":3737,"context_line":"        _ensure_trait_sync(ctx)"},{"line_number":3738,"context_line":"        self.request_groups \u003d request_groups"},{"line_number":3739,"context_line":"        # List, indexed by request group ID, of dicts, keyed by resource class"},{"line_number":3740,"context_line":"        # internal ID, of the amounts of that resource class being requested by"},{"line_number":3741,"context_line":"        # the group."},{"line_number":3742,"context_line":"        self._group_resources \u003d ["}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_132e2843","line":3739,"range":{"start_line":3739,"start_character":16,"end_line":3739,"end_character":43},"updated":"2018-05-04 20:04:18.000000000","message":"I don\u0027t like this wording.  It implies a greater significance to the list index than actually exists.  Do we lose meaning if we remove this part (throughout)?","commit_id":"e7a3b566edf4a803dd89c47ab4ad5d5da37a91b8"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"8aa528754480a2a82582a04831bb0b899161d7f2","unresolved":false,"context_lines":[{"line_number":3784,"context_line":"        # UUIDs that the providers matching for that request group must be"},{"line_number":3785,"context_line":"        # members of"},{"line_number":3786,"context_line":"        self._group_member_of \u003d ["},{"line_number":3787,"context_line":"            getattr(group, \"member_of\", [])"},{"line_number":3788,"context_line":"            for group in request_groups"},{"line_number":3789,"context_line":"        ]"},{"line_number":3790,"context_line":"        # Dict, keyed by a tuple of (resource class internal ID, amount"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_b33df4bc","line":3787,"range":{"start_line":3787,"start_character":12,"end_line":3787,"end_character":43},"updated":"2018-05-04 20:04:18.000000000","message":"group.member_of\n\nIt\u0027s already [] if unspecified","commit_id":"e7a3b566edf4a803dd89c47ab4ad5d5da37a91b8"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1126e44d80e3f25d095ec0f5f3e83742af0cb328","unresolved":false,"context_lines":[{"line_number":3784,"context_line":"        # UUIDs that the providers matching for that request group must be"},{"line_number":3785,"context_line":"        # members of"},{"line_number":3786,"context_line":"        self._group_member_of \u003d ["},{"line_number":3787,"context_line":"            getattr(group, \"member_of\", [])"},{"line_number":3788,"context_line":"            for group in request_groups"},{"line_number":3789,"context_line":"        ]"},{"line_number":3790,"context_line":"        # Dict, keyed by a tuple of (resource class internal ID, amount"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_cea4830b","line":3787,"range":{"start_line":3787,"start_character":12,"end_line":3787,"end_character":43},"in_reply_to":"5f7c97a3_b33df4bc","updated":"2018-05-04 20:21:52.000000000","message":"ok. nothing hurting being explicit here, though, right?","commit_id":"e7a3b566edf4a803dd89c47ab4ad5d5da37a91b8"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"0257976522a34c73a349fa659dfd57dc901a0c1e","unresolved":false,"context_lines":[{"line_number":3784,"context_line":"        # UUIDs that the providers matching for that request group must be"},{"line_number":3785,"context_line":"        # members of"},{"line_number":3786,"context_line":"        self._group_member_of \u003d ["},{"line_number":3787,"context_line":"            getattr(group, \"member_of\", [])"},{"line_number":3788,"context_line":"            for group in request_groups"},{"line_number":3789,"context_line":"        ]"},{"line_number":3790,"context_line":"        # Dict, keyed by a tuple of (resource class internal ID, amount"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_6e044f18","line":3787,"range":{"start_line":3787,"start_character":12,"end_line":3787,"end_character":43},"in_reply_to":"5f7c97a3_cea4830b","updated":"2018-05-04 21:21:34.000000000","message":"Technically no, but it\u0027s jarring compared to the ones above that don\u0027t do that.  Not a blocking issue, but worth cleaning up in the next patch set.","commit_id":"e7a3b566edf4a803dd89c47ab4ad5d5da37a91b8"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"1852dca82597be9dd297778de2bb4629ab2674d9","unresolved":false,"context_lines":[{"line_number":1394,"context_line":"    # )"},{"line_number":1395,"context_line":"    # GROUP BY rp.id"},{"line_number":1396,"context_line":"    resources \u003d group_search_ctx.resources"},{"line_number":1397,"context_line":"    sharing_providers \u003d group_search_ctx.sharing_providers"},{"line_number":1398,"context_line":""},{"line_number":1399,"context_line":"    rpt \u003d sa.alias(_RP_TBL, name\u003d\"rp\")"},{"line_number":1400,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_305c6c24","line":1397,"range":{"start_line":1397,"start_character":4,"end_line":1397,"end_character":58},"updated":"2018-05-07 06:05:57.000000000","message":"nice cleanup!","commit_id":"9679b0c92f604157760b05ba7c87bfcabff55b74"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"1852dca82597be9dd297778de2bb4629ab2674d9","unresolved":false,"context_lines":[{"line_number":3442,"context_line":"    rp_ids \u003d set(p[0] for p in rps)"},{"line_number":3443,"context_line":"    usages \u003d _get_usages_by_provider_and_rc(ctx, rp_ids, requested_rc_ids)"},{"line_number":3444,"context_line":""},{"line_number":3445,"context_line":"    # Get a dict, keyed by resource provider internal ID, of trait string names"},{"line_number":3446,"context_line":"    # that provider has associated with it"},{"line_number":3447,"context_line":"    prov_traits \u003d _provider_traits(ctx, rp_ids)"},{"line_number":3448,"context_line":""},{"line_number":3449,"context_line":"    # Get a dict, keyed by resource provider internal ID, of ProviderSummary"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_f0ab54d3","line":3446,"range":{"start_line":3445,"start_character":61,"end_line":3446,"end_character":42},"updated":"2018-05-07 06:05:57.000000000","message":"lists of tuples of (internal trait ID, string trait name) associated with that provider","commit_id":"9679b0c92f604157760b05ba7c87bfcabff55b74"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"1852dca82597be9dd297778de2bb4629ab2674d9","unresolved":false,"context_lines":[{"line_number":3505,"context_line":"    requested_rc_ids \u003d list(requested_resources)"},{"line_number":3506,"context_line":"    usages \u003d _get_usages_by_provider_and_rc(ctx, all_rp_ids, requested_rc_ids)"},{"line_number":3507,"context_line":""},{"line_number":3508,"context_line":"    # Get a dict, keyed by resource provider internal ID, of trait string names"},{"line_number":3509,"context_line":"    # that provider has associated with it"},{"line_number":3510,"context_line":"    prov_traits \u003d _provider_traits(ctx, all_rp_ids)"},{"line_number":3511,"context_line":""},{"line_number":3512,"context_line":"    # Get a dict, keyed by resource provider internal ID, of ProviderSummary"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_90b8e02a","line":3509,"range":{"start_line":3508,"start_character":61,"end_line":3509,"end_character":42},"updated":"2018-05-07 06:05:57.000000000","message":"lists of tuples of (internal trait ID, string trait name) associated with that provider","commit_id":"9679b0c92f604157760b05ba7c87bfcabff55b74"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"13456a4e2caa193f454c7fbd7d5bbc9c3d6110b2","unresolved":false,"context_lines":[{"line_number":3904,"context_line":"    # ProviderSummaryResource.  This will be used to do a final capacity"},{"line_number":3905,"context_line":"    # check/filter on each merged AllocationRequest."},{"line_number":3906,"context_line":"    psum_res_by_rp_rc \u003d {}"},{"line_number":3907,"context_line":"    for x, (rg_ctx, areqs, psums) in enumerate(candidates):"},{"line_number":3908,"context_line":"        for areq in areqs:"},{"line_number":3909,"context_line":"            anchor \u003d areq.anchor_root_provider_uuid"},{"line_number":3910,"context_line":"            areq_lists_by_anchor[anchor][x].append(areq)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_eed31e5f","line":3907,"updated":"2018-05-10 12:24:07.000000000","message":"What\u0027s an \"x\"?","commit_id":"ea77e79c8ff50e89b06f073f8933911853f48969"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"cc1d0b6eae5189495f4ad25c07d747100621bc39","unresolved":false,"context_lines":[{"line_number":3904,"context_line":"    # ProviderSummaryResource.  This will be used to do a final capacity"},{"line_number":3905,"context_line":"    # check/filter on each merged AllocationRequest."},{"line_number":3906,"context_line":"    psum_res_by_rp_rc \u003d {}"},{"line_number":3907,"context_line":"    for x, (rg_ctx, areqs, psums) in enumerate(candidates):"},{"line_number":3908,"context_line":"        for areq in areqs:"},{"line_number":3909,"context_line":"            anchor \u003d areq.anchor_root_provider_uuid"},{"line_number":3910,"context_line":"            areq_lists_by_anchor[anchor][x].append(areq)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_4416b3f3","line":3907,"in_reply_to":"5f7c97a3_eed31e5f","updated":"2018-05-10 14:05:20.000000000","message":"it\u0027s a letter that comes between \"w\" and \"y\" :P\n\nno, in all seriousness, I intend to get rid of all of this stuff and tack the anchor information directly into the RequestGroupSearchContext object in follow up patches. For now, since I got rid of the whole dict-indexed-by-\"suffix\" thing, I am indexing this dict by the list index of the request group.\n\nMostly it was just leftover code as I fixed rebase conflicts. I\u0027ll replace with a simple list instead of a dict.","commit_id":"ea77e79c8ff50e89b06f073f8933911853f48969"}],"nova/tests/functional/api/openstack/placement/db/test_allocation_candidates.py":[{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"1852dca82597be9dd297778de2bb4629ab2674d9","unresolved":false,"context_lines":[{"line_number":1757,"context_line":"        function to ensure that only the root provider IDs of matching provider"},{"line_number":1758,"context_line":"        trees are returned."},{"line_number":1759,"context_line":"        \"\"\""},{"line_number":1760,"context_line":"        # NOTE(jaypipes): _get_trees_matching_all() expects a dict of resource"},{"line_number":1761,"context_line":"        # class internal identifiers, not string names"},{"line_number":1762,"context_line":"        resources \u003d {"},{"line_number":1763,"context_line":"            fields.ResourceClass.VCPU: 2,"},{"line_number":1764,"context_line":"            fields.ResourceClass.MEMORY_MB: 256,"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_90c9c079","line":1761,"range":{"start_line":1760,"start_character":0,"end_line":1761,"end_character":54},"updated":"2018-05-07 06:05:57.000000000","message":"Do we still need this note?","commit_id":"9679b0c92f604157760b05ba7c87bfcabff55b74"}],"nova/tests/functional/api/openstack/placement/db/test_resource_provider.py":[{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"1852dca82597be9dd297778de2bb4629ab2674d9","unresolved":false,"context_lines":[{"line_number":3122,"context_line":"        # because neither has DISK_GB inventory and although they are"},{"line_number":3123,"context_line":"        # associated with an aggregate that has a storage provider with DISK_GB"},{"line_number":3124,"context_line":"        # inventory, that storage provider is not marked as sharing that"},{"line_number":3125,"context_line":"        # DISK_GB inventory with anybody.ll_"},{"line_number":3126,"context_line":"        got_rps \u003d rp_obj._get_all_with_shared(self.ctx, group_search_ctx)"},{"line_number":3127,"context_line":"        got_ids \u003d [rp.id for rp in got_rps]"},{"line_number":3128,"context_line":"        self.assertEqual([cn1.id], got_ids)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_f07a7422","line":3125,"range":{"start_line":3125,"start_character":41,"end_line":3125,"end_character":44},"updated":"2018-05-07 06:05:57.000000000","message":"Does this mean something important?","commit_id":"9679b0c92f604157760b05ba7c87bfcabff55b74"}]}
