)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"0e38e8d3668249e458fc26a734d6aa470ac508f7","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The `claim/unclaim_for_instance` interface added to the virt driver. The"},{"line_number":10,"context_line":"instance object and placement allocation records as the parameters. The"},{"line_number":11,"context_line":"virt driver should base on the placement allocation records to allocate the"},{"line_number":12,"context_line":"corresponding devices. And using the instance object to reference the consumer."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Related-bug: 1836204"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7faddb67_1c8d5bd2","line":11,"range":{"start_line":11,"start_character":19,"end_line":11,"end_character":24},"updated":"2019-07-16 10:07:33.000000000","message":"base what?","commit_id":"2d76fa2bbbaf8ae08457156f18e991ebb1e0689c"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"e95824ec11555f161b31f1262054bebdd568aa1d","unresolved":false,"context_lines":[{"line_number":28,"context_line":"invoked. If the virt driver can\u0027t get enough resource, the"},{"line_number":29,"context_line":"`exception.ComputeResourcesUnavailable` should be raised."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"When destory and any error raised when spawn the instanc, the"},{"line_number":32,"context_line":"`unclaim_for_instance` should be invoked."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Related-bug: 1836204"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"7faddb67_19873b64","line":31,"range":{"start_line":31,"start_character":49,"end_line":31,"end_character":56},"updated":"2019-08-08 18:02:10.000000000","message":"nit: instance","commit_id":"1d3cc3f68a0bc42c453f02eff3e40069b1747404"}],"nova/virt/device.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d0a9a731f88a287d3dc77b4859e8f29c8b204979","unresolved":false,"context_lines":[{"line_number":19,"context_line":"    def __init__(self):"},{"line_number":20,"context_line":"        self.instance_uuid \u003d None"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"    def assign(self, instance_uuid):"},{"line_number":23,"context_line":"        \"\"\"Assign the device to the instance"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"        :param instance_uuid: The UUID of instance."},{"line_number":26,"context_line":"        \"\"\""},{"line_number":27,"context_line":"        self.instance_uuid \u003d instance_uuid"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def unassign(self):"},{"line_number":30,"context_line":"        \"\"\"Unassign the device\"\"\""},{"line_number":31,"context_line":"        self.instance_uuid \u003d None"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    def is_assigned(self):"},{"line_number":34,"context_line":"        \"\"\"Check the device is assigned or not\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_bd60d7d0","line":31,"range":{"start_line":22,"start_character":0,"end_line":31,"end_character":33},"updated":"2019-07-15 10:26:18.000000000","message":"Base on how it is used in the last patch in this series today it would be more logical to create a getter / setter for this . Like Device.user or Device.instance_uuid. \n\nSee my comment in https://review.opendev.org/#/c/670787/1/nova/virt/libvirt/device.py@52","commit_id":"a1c63deb695a4ef668ca2dcc7e9717537a520a9d"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"0f7c984f2a39e97e3d434cdba702db6ab9e07803","unresolved":false,"context_lines":[{"line_number":19,"context_line":"    def __init__(self):"},{"line_number":20,"context_line":"        self.instance_uuid \u003d None"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"    def assign(self, instance_uuid):"},{"line_number":23,"context_line":"        \"\"\"Assign the device to the instance"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"        :param instance_uuid: The UUID of instance."},{"line_number":26,"context_line":"        \"\"\""},{"line_number":27,"context_line":"        self.instance_uuid \u003d instance_uuid"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def unassign(self):"},{"line_number":30,"context_line":"        \"\"\"Unassign the device\"\"\""},{"line_number":31,"context_line":"        self.instance_uuid \u003d None"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    def is_assigned(self):"},{"line_number":34,"context_line":"        \"\"\"Check the device is assigned or not\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_ce2b9792","line":31,"range":{"start_line":22,"start_character":0,"end_line":31,"end_character":33},"in_reply_to":"7faddb67_bd60d7d0","updated":"2019-07-15 14:15:50.000000000","message":"got it","commit_id":"a1c63deb695a4ef668ca2dcc7e9717537a520a9d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d0a9a731f88a287d3dc77b4859e8f29c8b204979","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        \"\"\"Check the device is assigned or not\"\"\""},{"line_number":35,"context_line":"        return bool(self.instance_uuid)"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def migrate_data(self, remote_addr, dest_device):"},{"line_number":38,"context_line":"        \"\"\"Migrate the data of device to a remote device"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        :param remote_addr: The remote address of the data migrating to."},{"line_number":41,"context_line":"        :param dest_device: The Device object for the remote device."},{"line_number":42,"context_line":"        \"\"\""},{"line_number":43,"context_line":"        pass"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def purge(self):"},{"line_number":46,"context_line":"        \"\"\" Purge the data on the device\"\"\""},{"line_number":47,"context_line":"        pass"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"class DeviceManager(object):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_3d1f075c","line":47,"range":{"start_line":37,"start_character":0,"end_line":47,"end_character":12},"updated":"2019-07-15 10:26:18.000000000","message":"Is it something we need it right away or can we add it later when we will start using it?\nI would apply YAGNI","commit_id":"a1c63deb695a4ef668ca2dcc7e9717537a520a9d"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"b557104a3caaad642ed5c964407985f9f802fcac","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        \"\"\"Check the device is assigned or not\"\"\""},{"line_number":35,"context_line":"        return bool(self.instance_uuid)"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def migrate_data(self, remote_addr, dest_device):"},{"line_number":38,"context_line":"        \"\"\"Migrate the data of device to a remote device"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        :param remote_addr: The remote address of the data migrating to."},{"line_number":41,"context_line":"        :param dest_device: The Device object for the remote device."},{"line_number":42,"context_line":"        \"\"\""},{"line_number":43,"context_line":"        pass"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def purge(self):"},{"line_number":46,"context_line":"        \"\"\" Purge the data on the device\"\"\""},{"line_number":47,"context_line":"        pass"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"class DeviceManager(object):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_888109fe","line":47,"range":{"start_line":37,"start_character":0,"end_line":47,"end_character":12},"in_reply_to":"7faddb67_3d1f075c","updated":"2019-07-16 04:05:24.000000000","message":"Yes, the VPMEM will use the purge, let us add that in the series of vpmem patch.","commit_id":"a1c63deb695a4ef668ca2dcc7e9717537a520a9d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d0a9a731f88a287d3dc77b4859e8f29c8b204979","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        pass"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"class DeviceManager(object):"},{"line_number":51,"context_line":"    \"\"\"The interface for virt driver to track the devices\"\"\" "},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def claim_for_instance(self, instance, allocations):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_7abfc560","line":50,"updated":"2019-07-15 10:26:18.000000000","message":"How does the new DeviceManager concept relates to the ResourceTracker and the PciManager concepts we already have? E.g. does PciManager will become an implementation of the DeviceManager interface?","commit_id":"a1c63deb695a4ef668ca2dcc7e9717537a520a9d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d0a9a731f88a287d3dc77b4859e8f29c8b204979","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        pass"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"class DeviceManager(object):"},{"line_number":51,"context_line":"    \"\"\"The interface for virt driver to track the devices\"\"\" "},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def claim_for_instance(self, instance, allocations):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_bdfa1740","line":50,"range":{"start_line":50,"start_character":6,"end_line":50,"end_character":19},"updated":"2019-07-15 10:26:18.000000000","message":"Is the implementation of this interface expected to be on the driver level E.g. one LibvirtDeviceManger. Or on the device type level e.g. GpuDeviceMangaer? Or on driver + device level e.g. LibvirtGpuDeviceManager ?\n\nOr in other words what is the good granularity here?","commit_id":"a1c63deb695a4ef668ca2dcc7e9717537a520a9d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d0a9a731f88a287d3dc77b4859e8f29c8b204979","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        pass"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"class DeviceManager(object):"},{"line_number":51,"context_line":"    \"\"\"The interface for virt driver to track the devices\"\"\" "},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def claim_for_instance(self, instance, allocations):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_1dca4b4d","line":50,"range":{"start_line":50,"start_character":6,"end_line":50,"end_character":19},"updated":"2019-07-15 10:26:18.000000000","message":"Is this DeviceManager intended to solve the persistency of the assigned devices across compute reboots? \nSee the TODO here https://review.opendev.org/#/c/670787/1/nova/virt/libvirt/driver.py@636","commit_id":"a1c63deb695a4ef668ca2dcc7e9717537a520a9d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d0a9a731f88a287d3dc77b4859e8f29c8b204979","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        pass"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"class DeviceManager(object):"},{"line_number":51,"context_line":"    \"\"\"The interface for virt driver to track the devices\"\"\" "},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def claim_for_instance(self, instance, allocations):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_1d96cb94","line":50,"range":{"start_line":50,"start_character":6,"end_line":50,"end_character":19},"updated":"2019-07-15 10:26:18.000000000","message":"This feels like a purely abstract class / interface. Can we enforce it with abc?","commit_id":"a1c63deb695a4ef668ca2dcc7e9717537a520a9d"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"0f7c984f2a39e97e3d434cdba702db6ab9e07803","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        pass"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"class DeviceManager(object):"},{"line_number":51,"context_line":"    \"\"\"The interface for virt driver to track the devices\"\"\" "},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def claim_for_instance(self, instance, allocations):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_e9fc4db6","line":50,"range":{"start_line":50,"start_character":6,"end_line":50,"end_character":19},"in_reply_to":"7faddb67_bdfa1740","updated":"2019-07-15 14:15:50.000000000","message":"good point, we can enforce it with abc.\n\nI thought the DeviceManager is just an abstraction for managing the device for each virt driver. It avoids to spread the assignment, cleanup code for the devices in virt driver. For each device, we implement the assignment and cleanup inside each Device object, then virt driver will call them in the right time. It is more easy for mantainance and adding new device.\n\nSo for each virt driver, will have it own implement for DeviceManager, like LibvirtDeviceManager, XenDeviceManager. Since I thought they have a different internal data structure for tracking devices. For different device, they will be a subclass of Device object, like VGPUDevice, VPMEMDevice.\n\nVirtDriver.claim/unclaim_for_instance will be called inside the ResourceTracker. The DeviceManager will be the internal implement for virt driver. Just as the discussion in the irc, the device manager is virt driver specific http://eavesdrop.openstack.org/irclogs/%23openstack-nova/%23openstack-nova.2019-07-11.log.html#t2019-07-11T12:39:18\n\nIn the future, maybe we can move the implement of PCIManager into DeviceManager.","commit_id":"a1c63deb695a4ef668ca2dcc7e9717537a520a9d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d0a9a731f88a287d3dc77b4859e8f29c8b204979","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"class DeviceManager(object):"},{"line_number":51,"context_line":"    \"\"\"The interface for virt driver to track the devices\"\"\" "},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def claim_for_instance(self, instance, allocations):"},{"line_number":54,"context_line":"        \"\"\"Claim all the requested device for instance"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_1d548b52","line":51,"range":{"start_line":51,"start_character":60,"end_line":51,"end_character":61},"updated":"2019-07-15 10:26:18.000000000","message":"nit: trailing whitespace","commit_id":"a1c63deb695a4ef668ca2dcc7e9717537a520a9d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d0a9a731f88a287d3dc77b4859e8f29c8b204979","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        \"\"\""},{"line_number":66,"context_line":"        pass"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def migrate_data(self, instance, remote_addr):"},{"line_number":69,"context_line":"        \"\"\"Migrate the data of devices for the instance to the remote"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        :param instance: nova.objects.instance.Instance object."},{"line_number":72,"context_line":"        :param remote_addr: The remote address of the data migrating to."},{"line_number":73,"context_line":"        \"\"\""},{"line_number":74,"context_line":"        pass"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def purge(self, instance):"},{"line_number":77,"context_line":"        \"\"\"Purge the data for the devices of instance"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        :param instance: nova.objects.instance.Instance object"},{"line_number":80,"context_line":"        \"\"\""},{"line_number":81,"context_line":"        pass"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def get_assigned_devices(self, instance):"},{"line_number":84,"context_line":"        \"\"\"Get the assigned devices for an instance"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_9df63b63","line":81,"range":{"start_line":68,"start_character":0,"end_line":81,"end_character":12},"updated":"2019-07-15 10:26:18.000000000","message":"I would apply YAGNI here.","commit_id":"a1c63deb695a4ef668ca2dcc7e9717537a520a9d"}],"nova/virt/driver.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"0e38e8d3668249e458fc26a734d6aa470ac508f7","unresolved":false,"context_lines":[{"line_number":1089,"context_line":"        :param allocations:"},{"line_number":1090,"context_line":"            Placement allocation records for the instance."},{"line_number":1091,"context_line":"        :raises: ComputeResourcesUnavailable if the virt driver can\u0027t find"},{"line_number":1092,"context_line":"            out any available resource."},{"line_number":1093,"context_line":"        \"\"\""},{"line_number":1094,"context_line":"        pass"},{"line_number":1095,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_dcc4a3f7","line":1092,"range":{"start_line":1092,"start_character":12,"end_line":1092,"end_character":16},"updated":"2019-07-16 10:07:33.000000000","message":"can leave out \"out\"","commit_id":"2d76fa2bbbaf8ae08457156f18e991ebb1e0689c"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"90a58e5eaa3d4138e9cc02117fb068160521df41","unresolved":false,"context_lines":[{"line_number":1089,"context_line":"        :param allocations:"},{"line_number":1090,"context_line":"            Placement allocation records for the instance."},{"line_number":1091,"context_line":"        :raises: ComputeResourcesUnavailable if the virt driver can\u0027t find"},{"line_number":1092,"context_line":"            out any available resource."},{"line_number":1093,"context_line":"        \"\"\""},{"line_number":1094,"context_line":"        pass"},{"line_number":1095,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_538144c2","line":1092,"range":{"start_line":1092,"start_character":12,"end_line":1092,"end_character":15},"updated":"2019-07-19 13:16:51.000000000","message":"strike","commit_id":"b53b4e546fab661db4a734484aad9fba0471ab4f"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"3bd352a56363e88c93e0875ce9353909c3b26bde","unresolved":false,"context_lines":[{"line_number":1091,"context_line":"        :raises: ComputeResourcesUnavailable if the virt driver can\u0027t find"},{"line_number":1092,"context_line":"            out any available resource."},{"line_number":1093,"context_line":"        \"\"\""},{"line_number":1094,"context_line":"        pass"},{"line_number":1095,"context_line":""},{"line_number":1096,"context_line":"    def unclaim_for_instance(self, instance):"},{"line_number":1097,"context_line":"        \"\"\"Unclaim the resources"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_ae013007","line":1094,"range":{"start_line":1094,"start_character":8,"end_line":1094,"end_character":12},"updated":"2019-07-19 10:23:03.000000000","message":"mmm, why not raising NotImplementedError() ?\n\nThat\u0027s what we do in general and the caller (here the compute manager) just needs to support this exception","commit_id":"b53b4e546fab661db4a734484aad9fba0471ab4f"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"90a58e5eaa3d4138e9cc02117fb068160521df41","unresolved":false,"context_lines":[{"line_number":1091,"context_line":"        :raises: ComputeResourcesUnavailable if the virt driver can\u0027t find"},{"line_number":1092,"context_line":"            out any available resource."},{"line_number":1093,"context_line":"        \"\"\""},{"line_number":1094,"context_line":"        pass"},{"line_number":1095,"context_line":""},{"line_number":1096,"context_line":"    def unclaim_for_instance(self, instance):"},{"line_number":1097,"context_line":"        \"\"\"Unclaim the resources"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_f3ecf0bb","line":1094,"range":{"start_line":1094,"start_character":8,"end_line":1094,"end_character":12},"in_reply_to":"7faddb67_ae013007","updated":"2019-07-19 13:16:51.000000000","message":"Looking through the ComputeDriver methods, some of them raise NotImplementedError() and some pass. It seems to be along the lines of \"signal that this thing is not supported\" (e.g. live migration) versus \"no action is necessary by default, do something in your driver if necessary\" (e.g. tweak metadata or network info).\n\nSo IMO `pass` is appropriate here.","commit_id":"b53b4e546fab661db4a734484aad9fba0471ab4f"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"69eef43110f1399f6bd94549ab0b45f8602c9c63","unresolved":false,"context_lines":[{"line_number":1091,"context_line":"        :raises: ComputeResourcesUnavailable if the virt driver can\u0027t find"},{"line_number":1092,"context_line":"            out any available resource."},{"line_number":1093,"context_line":"        \"\"\""},{"line_number":1094,"context_line":"        pass"},{"line_number":1095,"context_line":""},{"line_number":1096,"context_line":"    def unclaim_for_instance(self, instance):"},{"line_number":1097,"context_line":"        \"\"\"Unclaim the resources"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_84d45049","line":1094,"range":{"start_line":1094,"start_character":8,"end_line":1094,"end_character":12},"in_reply_to":"7faddb67_f3ecf0bb","updated":"2019-07-19 14:59:13.000000000","message":"yea, if we raise NotImplementedError, then we need add a empty method to each virt driver also.","commit_id":"b53b4e546fab661db4a734484aad9fba0471ab4f"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"90a58e5eaa3d4138e9cc02117fb068160521df41","unresolved":false,"context_lines":[{"line_number":1096,"context_line":"    def unclaim_for_instance(self, instance):"},{"line_number":1097,"context_line":"        \"\"\"Unclaim the resources"},{"line_number":1098,"context_line":""},{"line_number":1099,"context_line":"        This methods unclaims the instance requested resources based on the"},{"line_number":1100,"context_line":"        allocation records"},{"line_number":1101,"context_line":""},{"line_number":1102,"context_line":"        :param instance: nova.objects.instance.Instance object"},{"line_number":1103,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_d31f74b4","line":1100,"range":{"start_line":1099,"start_character":42,"end_line":1100,"end_character":26},"updated":"2019-07-19 13:16:51.000000000","message":"\u0027s resources.\n\n(We\u0027re not passing allocations here. Are they saved on the instance these days? Even if so, we should really be unclaiming based on what we\u0027re using, not based on what\u0027s in the allocation records, in case there\u0027s a discrepancy.)\n\n(BTW, for vpmem, this is where we would do the zeroing, yah?)","commit_id":"b53b4e546fab661db4a734484aad9fba0471ab4f"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"69eef43110f1399f6bd94549ab0b45f8602c9c63","unresolved":false,"context_lines":[{"line_number":1096,"context_line":"    def unclaim_for_instance(self, instance):"},{"line_number":1097,"context_line":"        \"\"\"Unclaim the resources"},{"line_number":1098,"context_line":""},{"line_number":1099,"context_line":"        This methods unclaims the instance requested resources based on the"},{"line_number":1100,"context_line":"        allocation records"},{"line_number":1101,"context_line":""},{"line_number":1102,"context_line":"        :param instance: nova.objects.instance.Instance object"},{"line_number":1103,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_044dc03c","line":1100,"range":{"start_line":1099,"start_character":42,"end_line":1100,"end_character":26},"in_reply_to":"7faddb67_d31f74b4","updated":"2019-07-19 14:59:13.000000000","message":"I just forget to remove that word, because I add allocation as the parameter in the initial version. Then I found I only need to know the consumer, then unclaim all the resources for the consumer.","commit_id":"b53b4e546fab661db4a734484aad9fba0471ab4f"}]}
