)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"c0b37f55236dcf6f0bacf9003e139465ad41724e","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Moving memory balloon device config handle to a new class in guest.py."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"The idea is to move all code in _get_guest_config to"},{"line_number":12,"context_line":"nova.virt.libvirt.guest.GuestConfig class as separate private methods"},{"line_number":13,"context_line":"in series of patches. Once the refactor is done, one can call"},{"line_number":14,"context_line":"GuestConfig.get() to get a complete guest configuration."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Note that the tests for memory balloon still there using"},{"line_number":17,"context_line":"_get_guest_config, they will be moved once all code is moved and guest"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa6399be_91e26702","line":14,"range":{"start_line":11,"start_character":0,"end_line":14,"end_character":56},"updated":"2016-10-11 16:42:22.000000000","message":"Nit: it\u0027s a pity Gerrit doesn\u0027t have the idea of cover letters :(","commit_id":"91722f68f95ac6594327b7a8b2b30aebd32c9ae4"}],"nova/virt/libvirt/guest.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"c0b37f55236dcf6f0bacf9003e139465ad41724e","unresolved":false,"context_lines":[{"line_number":836,"context_line":"            disk_remaining\u003dinfo[11])"},{"line_number":837,"context_line":""},{"line_number":838,"context_line":""},{"line_number":839,"context_line":"class GuestConfig(object):"},{"line_number":840,"context_line":"    def __init__(self, guest):"},{"line_number":841,"context_line":"        self.virt_type \u003d CONF.libvirt.virt_type"},{"line_number":842,"context_line":"        self.guest \u003d guest"},{"line_number":843,"context_line":""},{"line_number":844,"context_line":"    def get(self):"},{"line_number":845,"context_line":"        \"\"\"Set all libvirt guest configurations as required and return the"},{"line_number":846,"context_line":"        guest config object."},{"line_number":847,"context_line":"        :return: Libvirt guest configuration object"},{"line_number":848,"context_line":"        \"\"\""},{"line_number":849,"context_line":"        self._add_balloon()"},{"line_number":850,"context_line":"        return self.guest"},{"line_number":851,"context_line":""},{"line_number":852,"context_line":"    def _add_balloon(self):"},{"line_number":853,"context_line":"        \"\"\"Add Memory balloon device in basis of support."}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_0c91dcf0","line":850,"range":{"start_line":839,"start_character":0,"end_line":850,"end_character":25},"updated":"2016-10-11 16:42:22.000000000","message":"I don\u0027t like this. You\u0027re using the class for what is essentially a functions job (taking an object and setting some attribute on it)","commit_id":"91722f68f95ac6594327b7a8b2b30aebd32c9ae4"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"c0b37f55236dcf6f0bacf9003e139465ad41724e","unresolved":false,"context_lines":[{"line_number":849,"context_line":"        self._add_balloon()"},{"line_number":850,"context_line":"        return self.guest"},{"line_number":851,"context_line":""},{"line_number":852,"context_line":"    def _add_balloon(self):"},{"line_number":853,"context_line":"        \"\"\"Add Memory balloon device in basis of support."},{"line_number":854,"context_line":"        Only \u0027qemu\u0027, \u0027kvm\u0027 and \u0027xen\u0027 hypervisors supported."},{"line_number":855,"context_line":"        \"\"\""},{"line_number":856,"context_line":""},{"line_number":857,"context_line":"        if (self.virt_type in (\u0027xen\u0027, \u0027qemu\u0027, \u0027kvm\u0027) and"},{"line_number":858,"context_line":"                CONF.libvirt.mem_stats_period_seconds \u003e 0):"},{"line_number":859,"context_line":"            balloon \u003d vconfig.LibvirtConfigMemoryBalloon()"},{"line_number":860,"context_line":"            if self.virt_type in (\u0027qemu\u0027, \u0027kvm\u0027):"},{"line_number":861,"context_line":"                balloon.model \u003d \u0027virtio\u0027"},{"line_number":862,"context_line":"            else:"},{"line_number":863,"context_line":"                balloon.model \u003d \u0027xen\u0027"},{"line_number":864,"context_line":"            balloon.period \u003d CONF.libvirt.mem_stats_period_seconds"},{"line_number":865,"context_line":"            self.guest.add_device(balloon)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_0ce39ca4","line":865,"range":{"start_line":852,"start_character":0,"end_line":865,"end_character":42},"updated":"2016-10-11 16:42:22.000000000","message":"Why are we not adding this as a method on \u0027LibvirtConfigGuest\u0027?","commit_id":"91722f68f95ac6594327b7a8b2b30aebd32c9ae4"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"ae9b5f73919780267911c11362aa5b07deb35cf8","unresolved":false,"context_lines":[{"line_number":849,"context_line":"        self._add_balloon()"},{"line_number":850,"context_line":"        return self.guest"},{"line_number":851,"context_line":""},{"line_number":852,"context_line":"    def _add_balloon(self):"},{"line_number":853,"context_line":"        \"\"\"Add Memory balloon device in basis of support."},{"line_number":854,"context_line":"        Only \u0027qemu\u0027, \u0027kvm\u0027 and \u0027xen\u0027 hypervisors supported."},{"line_number":855,"context_line":"        \"\"\""},{"line_number":856,"context_line":""},{"line_number":857,"context_line":"        if (self.virt_type in (\u0027xen\u0027, \u0027qemu\u0027, \u0027kvm\u0027) and"},{"line_number":858,"context_line":"                CONF.libvirt.mem_stats_period_seconds \u003e 0):"},{"line_number":859,"context_line":"            balloon \u003d vconfig.LibvirtConfigMemoryBalloon()"},{"line_number":860,"context_line":"            if self.virt_type in (\u0027qemu\u0027, \u0027kvm\u0027):"},{"line_number":861,"context_line":"                balloon.model \u003d \u0027virtio\u0027"},{"line_number":862,"context_line":"            else:"},{"line_number":863,"context_line":"                balloon.model \u003d \u0027xen\u0027"},{"line_number":864,"context_line":"            balloon.period \u003d CONF.libvirt.mem_stats_period_seconds"},{"line_number":865,"context_line":"            self.guest.add_device(balloon)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_c7f5fd83","line":865,"range":{"start_line":852,"start_character":0,"end_line":865,"end_character":42},"in_reply_to":"fa6399be_0ce39ca4","updated":"2016-10-11 16:48:38.000000000","message":"The classes in config.py are supposed to be purely about serialization \u0026 deserlialization. They should not have any semantic logic in them.\n\nI agree that this GuestConfig stuff should not be here.\n\nThe \u0027get_guest_config*\u0027 code from driver.py should be moved into the designer.py file.\n\nThe reason we have not done this previously is that several of the methods relied on accessing fields in the LibvirtDriver object. Most of that stuff has been isolated into the Host object now.  So we should be able to move all the guest XML building methods into designer.py now, and only need to provide a reference to the Host/Guest classes.\n\nFinally, if we\u0027re going to move this code, we should move the whole lot in one patch series. Only moving the balloon config code and nothing else is just awful.","commit_id":"91722f68f95ac6594327b7a8b2b30aebd32c9ae4"}]}
