)]}'
{"os_acc/base.py":[{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"cdf78b4680c6819884395d01053ef65e6c0c280e","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        \"\"\""},{"line_number":35,"context_line":"        self.config \u003d config"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    @abc.abstractmethod"},{"line_number":38,"context_line":"    def get_config(self, instance, inst_type, acc):"},{"line_number":39,"context_line":"        \"\"\""},{"line_number":40,"context_line":"        Generate config of specified accelerator."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"        :param instance: Instance information dict."},{"line_number":43,"context_line":"        :param inst_type: Flavor information dict."},{"line_number":44,"context_line":"        :param acc: Accelerator information"},{"line_number":45,"context_line":"        :return: Different LibvirtConfig. For example,"},{"line_number":46,"context_line":"        `nova.virt.libvirt.config.LibvirtConfigGuestHostdevPCI` object."},{"line_number":47,"context_line":"        \"\"\""},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_ee5ebe77","line":46,"range":{"start_line":37,"start_character":1,"end_line":46,"end_character":19},"updated":"2018-07-17 07:27:12.000000000","message":"That does not look right, Nova drivers are responsible of building VMs. If we take example of libvirt driver, the guest XML should not be generated by any other component.\n\nThe design is not really clear for me. Can you elaborate that in the commit message?","commit_id":"2caea172f8b4805eefb982748ed3e4d9af4f8c1c"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"b8391034347fcef8eaee6ba1cffd56d2fe40f290","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        \"\"\""},{"line_number":35,"context_line":"        self.config \u003d config"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    @abc.abstractmethod"},{"line_number":38,"context_line":"    def get_config(self, instance, inst_type, acc):"},{"line_number":39,"context_line":"        \"\"\""},{"line_number":40,"context_line":"        Generate config of specified accelerator."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"        :param instance: Instance information dict."},{"line_number":43,"context_line":"        :param inst_type: Flavor information dict."},{"line_number":44,"context_line":"        :param acc: Accelerator information"},{"line_number":45,"context_line":"        :return: Different LibvirtConfig. For example,"},{"line_number":46,"context_line":"        `nova.virt.libvirt.config.LibvirtConfigGuestHostdevPCI` object."},{"line_number":47,"context_line":"        \"\"\""},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_40c8b654","line":46,"range":{"start_line":37,"start_character":1,"end_line":46,"end_character":19},"in_reply_to":"5f7c97a3_7d86cb18","updated":"2018-07-18 14:54:05.000000000","message":"I\u0027m really septic about what you want to achieve. My thinking is Cyborg should talk with Nova using os-acc data model, but Nova and that through the drivers remains the only one who could build the VMs (for libvirt generating the domain XML).\n\nThat is why I would say it\u0027s important for you to discuss with the community. I took look at your nova patch and it\u0027s probably not how that should work.\n\nFor PCI, a first step would be to modify the pci manager (in Nova) to make that method \u0027pci_manager.get_instance_pci_devs()\u0027 to return an object os_acc.PCI, then nova to call the os_acc PCI plugin (which will probably be noop), with that os_acc.PCI the drive will be able to generate the device XML (for libvirt) - Then at some point we could remove the whole Nova pci_manager to use Cyborg.","commit_id":"2caea172f8b4805eefb982748ed3e4d9af4f8c1c"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"ed27264a3d6023bc16a5a590ab7ee1e4af89e22c","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        \"\"\""},{"line_number":35,"context_line":"        self.config \u003d config"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    @abc.abstractmethod"},{"line_number":38,"context_line":"    def get_config(self, instance, inst_type, acc):"},{"line_number":39,"context_line":"        \"\"\""},{"line_number":40,"context_line":"        Generate config of specified accelerator."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"        :param instance: Instance information dict."},{"line_number":43,"context_line":"        :param inst_type: Flavor information dict."},{"line_number":44,"context_line":"        :param acc: Accelerator information"},{"line_number":45,"context_line":"        :return: Different LibvirtConfig. For example,"},{"line_number":46,"context_line":"        `nova.virt.libvirt.config.LibvirtConfigGuestHostdevPCI` object."},{"line_number":47,"context_line":"        \"\"\""},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_b36d8a9a","line":46,"range":{"start_line":37,"start_character":1,"end_line":46,"end_character":19},"in_reply_to":"5f7c97a3_823d9bbd","updated":"2018-07-17 12:09:49.000000000","message":"Did you discuss of that with Nova community?\n\nIf I have to give my thought I would say we should not have any other components than the Nova drivers to build the guests. There is still that discussion about to move out the drivers from Nova but I think it is not yet the desire.\n\nSo I can understand what you want to do but I\u0027m a bit septic. My thinking is that os-acc will be responsible to do some extra configurations for the devices. For PCI passth I don\u0027t see any, so that will be a no-op plugin. But example for SRIOV we can have that plugin to enable the trusted mode for the virtual functions. For FPGA I guest you will want to initialize some resources...\n\nI think we should start simple, os-vif is a good example.\n\nBeside of that I might not have the whole design of what you want to achieve. I\u0027m seeing cyborg as a generic devices manager (like what we have with our pci manager) and os-acc the data models between cyborg and Nova. Is that what you want to achieve?","commit_id":"2caea172f8b4805eefb982748ed3e4d9af4f8c1c"},{"author":{"_account_id":17813,"name":"wangzhh","email":"wzh_1993@126.com","username":"wangzhh"},"change_message_id":"aca42492ac48433da4dd85b0c663ebd805517f61","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        \"\"\""},{"line_number":35,"context_line":"        self.config \u003d config"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    @abc.abstractmethod"},{"line_number":38,"context_line":"    def get_config(self, instance, inst_type, acc):"},{"line_number":39,"context_line":"        \"\"\""},{"line_number":40,"context_line":"        Generate config of specified accelerator."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"        :param instance: Instance information dict."},{"line_number":43,"context_line":"        :param inst_type: Flavor information dict."},{"line_number":44,"context_line":"        :param acc: Accelerator information"},{"line_number":45,"context_line":"        :return: Different LibvirtConfig. For example,"},{"line_number":46,"context_line":"        `nova.virt.libvirt.config.LibvirtConfigGuestHostdevPCI` object."},{"line_number":47,"context_line":"        \"\"\""},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_7d86cb18","line":46,"range":{"start_line":37,"start_character":1,"end_line":46,"end_character":19},"in_reply_to":"5f7c97a3_b36d8a9a","updated":"2018-07-18 03:41:01.000000000","message":"Not yet.\nIn fact, it is nova which builds the guests. os-acc just generate the xml or other data(for other hypervisors). Of course, discuss with nova community is necessary. \nAs u said, something else will be responsible to do some extra configurations and ops for the devices. Not only os-acc, but also cyborg. Something is different from os-vif here, for SRIOV or FPGA, we use cyborg to initialize resources and return necessary information to nova, then os-acc generates device configuration(xml...) on compute node... \nAnd you are right, It is what we want to achieve.\n\nFinally, I\u0027m sorry that we don\u0027t have enough documentation yet, which makes u confused.","commit_id":"2caea172f8b4805eefb982748ed3e4d9af4f8c1c"},{"author":{"_account_id":17813,"name":"wangzhh","email":"wzh_1993@126.com","username":"wangzhh"},"change_message_id":"f572ea9b80f72b43f86e6cb8c54e7b7b21f15459","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        \"\"\""},{"line_number":35,"context_line":"        self.config \u003d config"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    @abc.abstractmethod"},{"line_number":38,"context_line":"    def get_config(self, instance, inst_type, acc):"},{"line_number":39,"context_line":"        \"\"\""},{"line_number":40,"context_line":"        Generate config of specified accelerator."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"        :param instance: Instance information dict."},{"line_number":43,"context_line":"        :param inst_type: Flavor information dict."},{"line_number":44,"context_line":"        :param acc: Accelerator information"},{"line_number":45,"context_line":"        :return: Different LibvirtConfig. For example,"},{"line_number":46,"context_line":"        `nova.virt.libvirt.config.LibvirtConfigGuestHostdevPCI` object."},{"line_number":47,"context_line":"        \"\"\""},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_823d9bbd","line":46,"range":{"start_line":37,"start_character":1,"end_line":46,"end_character":19},"in_reply_to":"5f7c97a3_ee5ebe77","updated":"2018-07-17 10:31:33.000000000","message":"Hi sahid,\nI know what you mean. And I hesitated between the two options for a long time before.\n1. Let nova generate guest XML as the original way.\n2. Let os-acc handle all the operations and data object including the guest XML.\nI finally chose the second one. \n1. We can let nova stop paying attention to how to generate xml or other data. `os-acc` can help to handle all of them.\n2. In this way, we don\u0027t have to modify too much code of nova, which will enable us to integrate with nova faster.\n3. Now, It is just a case of pci_device. More and more kinds of accelerators may making it difficult for nova to deal with. `os-acc` and cyborg should handle accelerators. Nova can benefit from them.\n\nIn fact, the new way may cause potential issues. If you found, please show me an example. It\u0027s my pleasure to discuss with u about them.","commit_id":"2caea172f8b4805eefb982748ed3e4d9af4f8c1c"}],"os_acc/pci.py":[{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"cdf78b4680c6819884395d01053ef65e6c0c280e","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"class PciAccelerator(base.PluginBase):"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"    def get_config(self, instance, inst_type, acc):"},{"line_number":22,"context_line":"        pcie_addr \u003d acc[\"pcie_address\"]"},{"line_number":23,"context_line":"        domain, bus, slot, func \u003d self._get_pci_address_fields(pcie_addr)"},{"line_number":24,"context_line":"        conf \u003d LibvirtConfigGuestHostdevPCI()"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_6eae2e30","line":21,"updated":"2018-07-17 07:27:12.000000000","message":"As indicated in your plugin base, this does not look right. The aim of this project would be to give to Nova the right data to build the devices so we will avoid to be driver specific.","commit_id":"2caea172f8b4805eefb982748ed3e4d9af4f8c1c"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"cdf78b4680c6819884395d01053ef65e6c0c280e","unresolved":false,"context_lines":[{"line_number":28,"context_line":"        conf.function \u003d func"},{"line_number":29,"context_line":"        return conf"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def attach(self, guest, host, instance, inst_type, acc):"},{"line_number":32,"context_line":"        conf \u003d self.get_config(instance, inst_type, acc)"},{"line_number":33,"context_line":"        state \u003d guest.get_power_state(host)"},{"line_number":34,"context_line":"        live \u003d state in (power_state.RUNNING, power_state.PAUSED)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_713db3ba","line":31,"updated":"2018-07-17 07:27:12.000000000","message":"Basically what you want here it\u0027s something like:\n\n  def attach(self, device, instance_info):\n    # do something\n    \n\u0027device\u0027 will be an object to represent a device, example:\n\n  class PCI(DeviceBase):\n    \u0027address\u0027: fields.PCIAdressField()\n\nSo basically in Nova the pci manager will build that object and returns it via pcimanager.get_instance_pci_dev(). The driver will then call the correct plugin occ.attach(device, instance) and generate the guest config.","commit_id":"2caea172f8b4805eefb982748ed3e4d9af4f8c1c"},{"author":{"_account_id":17813,"name":"wangzhh","email":"wzh_1993@126.com","username":"wangzhh"},"change_message_id":"f572ea9b80f72b43f86e6cb8c54e7b7b21f15459","unresolved":false,"context_lines":[{"line_number":28,"context_line":"        conf.function \u003d func"},{"line_number":29,"context_line":"        return conf"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def attach(self, guest, host, instance, inst_type, acc):"},{"line_number":32,"context_line":"        conf \u003d self.get_config(instance, inst_type, acc)"},{"line_number":33,"context_line":"        state \u003d guest.get_power_state(host)"},{"line_number":34,"context_line":"        live \u003d state in (power_state.RUNNING, power_state.PAUSED)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_dda8568c","line":31,"in_reply_to":"5f7c97a3_3d15ca3e","updated":"2018-07-17 10:31:33.000000000","message":"If we imply as os-vif. os-acc should maintain it.","commit_id":"2caea172f8b4805eefb982748ed3e4d9af4f8c1c"},{"author":{"_account_id":17813,"name":"wangzhh","email":"wzh_1993@126.com","username":"wangzhh"},"change_message_id":"f572ea9b80f72b43f86e6cb8c54e7b7b21f15459","unresolved":false,"context_lines":[{"line_number":28,"context_line":"        conf.function \u003d func"},{"line_number":29,"context_line":"        return conf"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def attach(self, guest, host, instance, inst_type, acc):"},{"line_number":32,"context_line":"        conf \u003d self.get_config(instance, inst_type, acc)"},{"line_number":33,"context_line":"        state \u003d guest.get_power_state(host)"},{"line_number":34,"context_line":"        live \u003d state in (power_state.RUNNING, power_state.PAUSED)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_bd979aea","line":31,"in_reply_to":"5f7c97a3_713db3ba","updated":"2018-07-17 10:31:33.000000000","message":"*Use object is an good idea. \n*As I mentioned in the previous comments. More and more kinds of accelerators will let nova maintain xxxmanager. Eliminating these differences is what cyborg and os-acc want to do.","commit_id":"2caea172f8b4805eefb982748ed3e4d9af4f8c1c"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"089d9aaad47e24d6f891bcd0d09bea06295e544a","unresolved":false,"context_lines":[{"line_number":28,"context_line":"        conf.function \u003d func"},{"line_number":29,"context_line":"        return conf"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def attach(self, guest, host, instance, inst_type, acc):"},{"line_number":32,"context_line":"        conf \u003d self.get_config(instance, inst_type, acc)"},{"line_number":33,"context_line":"        state \u003d guest.get_power_state(host)"},{"line_number":34,"context_line":"        live \u003d state in (power_state.RUNNING, power_state.PAUSED)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_3d15ca3e","line":31,"in_reply_to":"5f7c97a3_713db3ba","updated":"2018-07-17 09:53:38.000000000","message":"Which maintain the PCI object? nova or os-acc?","commit_id":"2caea172f8b4805eefb982748ed3e4d9af4f8c1c"},{"author":{"_account_id":27458,"name":"Li Liu","email":"liliueecg@gmail.com","username":"liliu"},"change_message_id":"948e2c37e54acb909e0adf9682e7fae75ba574ab","unresolved":false,"context_lines":[{"line_number":28,"context_line":"        conf.function \u003d func"},{"line_number":29,"context_line":"        return conf"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def attach(self, guest, host, instance, inst_type, acc):"},{"line_number":32,"context_line":"        conf \u003d self.get_config(instance, inst_type, acc)"},{"line_number":33,"context_line":"        state \u003d guest.get_power_state(host)"},{"line_number":34,"context_line":"        live \u003d state in (power_state.RUNNING, power_state.PAUSED)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_27eb7012","line":31,"in_reply_to":"5f7c97a3_93596f5c","updated":"2018-07-17 14:32:37.000000000","message":"I think in Cyborg\u0027s context, this is closer to os-brick\u0027s model, with more flexibilities. PCI device is only one of the basic examples.","commit_id":"2caea172f8b4805eefb982748ed3e4d9af4f8c1c"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"ed27264a3d6023bc16a5a590ab7ee1e4af89e22c","unresolved":false,"context_lines":[{"line_number":28,"context_line":"        conf.function \u003d func"},{"line_number":29,"context_line":"        return conf"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def attach(self, guest, host, instance, inst_type, acc):"},{"line_number":32,"context_line":"        conf \u003d self.get_config(instance, inst_type, acc)"},{"line_number":33,"context_line":"        state \u003d guest.get_power_state(host)"},{"line_number":34,"context_line":"        live \u003d state in (power_state.RUNNING, power_state.PAUSED)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_93596f5c","line":31,"in_reply_to":"5f7c97a3_dda8568c","updated":"2018-07-17 12:09:49.000000000","message":"Yes the objects will be maintained by os-acc. I think we should look at what is done for os-vif, yes :)","commit_id":"2caea172f8b4805eefb982748ed3e4d9af4f8c1c"}]}
