)]}'
{"nova/virt/hardware.py":[{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"1fb4d3dc92afc0fcbd41381ba9fb1e985d6ca2cb","unresolved":false,"context_lines":[{"line_number":2079,"context_line":"    \"\"\"Return pmems related to input request."},{"line_number":2080,"context_line":""},{"line_number":2081,"context_line":"    :param flavor: a flavor object to read extra specs from"},{"line_number":2082,"context_line":"    :returns: a objects.InstanceVirtualPMEMList instance"},{"line_number":2083,"context_line":"    \"\"\""},{"line_number":2084,"context_line":"    pmems_info \u003d flavor.get(\u0027extra_specs\u0027, {}).get(\u0027hw:pmem\u0027)"},{"line_number":2085,"context_line":"    if not pmems_info:"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_e49ccbc0","line":2082,"range":{"start_line":2082,"start_character":14,"end_line":2082,"end_character":15},"updated":"2019-08-12 11:09:45.000000000","message":"s/an/a","commit_id":"8136f5f85cdc33c8911a022bc4e66ab5e198793f"}],"nova/virt/libvirt/device.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"6e1d9aa74f101908ad620c4547a983ab52f8290e","unresolved":false,"context_lines":[{"line_number":149,"context_line":"                    pmem.instance_uuid \u003d None"},{"line_number":150,"context_line":"                    pmem.flavor_id \u003d None"},{"line_number":151,"context_line":"                if cleanup:"},{"line_number":152,"context_line":"                    self._cleanup_pmem(pmem)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    def get_claimed_pmems(self, instance, flavor):"},{"line_number":155,"context_line":"        pmem_labels \u003d hardware.get_pmems(flavor)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_ef5eca74","line":152,"range":{"start_line":152,"start_character":20,"end_line":152,"end_character":44},"updated":"2019-07-29 03:01:09.000000000","message":"we should separate the cleanup out of unclaim. If there is anything wrong in the cleanup, we shouldn\u0027t unclaim those resource. I suggested we call the DeviceManager.purge_for_instance() first, then call the DeviceManager.unclaim_for_instance. Then you needn\u0027t take care of the rollback of unclaim","commit_id":"27fa0fe963d8eddb9fcc927b4e51a7539c310022"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"64121d16a8a4241b15fc08bfc86f37ed5ffab512","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        \"\"\""},{"line_number":84,"context_line":"        self._claim_pmems(instance, allocations, flavor)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def purge_for_instance(self, instance, flavor\u003dNone):"},{"line_number":87,"context_line":"        \"\"\"Cleanup the devices for the instance."},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        :param instance: nova.objects.instance.Instance object."}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_95002036","line":86,"range":{"start_line":86,"start_character":8,"end_line":86,"end_character":26},"updated":"2019-08-05 04:36:06.000000000","message":"I didn\u0027t see you calling this at anywhere.","commit_id":"295a2d4b346a960321cbf82f36ec99834b552f58"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"1fb4d3dc92afc0fcbd41381ba9fb1e985d6ca2cb","unresolved":false,"context_lines":[{"line_number":349,"context_line":"                    mdev.flavor_id \u003d\u003d flavor_id):"},{"line_number":350,"context_line":"                mdev.instance_uuid \u003d None"},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"    def _claim_pmems(self, instance_uuid, flavor_id, allocations):"},{"line_number":353,"context_line":"        pmems_allocations \u003d {}"},{"line_number":354,"context_line":"        for rp in allocations:"},{"line_number":355,"context_line":"            resources \u003d allocations[rp][\u0027resources\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_c493cfff","line":352,"updated":"2019-08-12 11:09:45.000000000","message":"Can we add some test for claim/unclaim pmems?","commit_id":"8136f5f85cdc33c8911a022bc4e66ab5e198793f"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"1fb4d3dc92afc0fcbd41381ba9fb1e985d6ca2cb","unresolved":false,"context_lines":[{"line_number":357,"context_line":"                if resource_class.startswith(\u0027CUSTOM_PMEM_NAMESPACE_\u0027):"},{"line_number":358,"context_line":"                    label \u003d resource_class.split(\u0027CUSTOM_PMEM_NAMESPACE_\u0027)[1]"},{"line_number":359,"context_line":"                    pmems_allocations[label] \u003d resources[resource_class]"},{"line_number":360,"context_line":"        for label in pmems_allocations:"},{"line_number":361,"context_line":"            for i in range(pmems_allocations[label]):"},{"line_number":362,"context_line":"                for pmem in self._pmem_list:"},{"line_number":363,"context_line":"                    if pmem.instance_uuid is None and pmem.label \u003d\u003d label:"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_24de63da","line":360,"updated":"2019-08-12 11:09:45.000000000","message":"This can add a LOG.debug() to record the pmems_allocations label.\n\nThe `for label in pmems_allocations:` can be removed, and mova-up the Line 361 under the line-359(pmems_allocations[label] \u003d resources[resource_class]), here too many *for* loop.","commit_id":"8136f5f85cdc33c8911a022bc4e66ab5e198793f"}]}
