)]}'
{"nova/compute/api.py":[{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"917cd6f28ad0203da0d6d9d9181519fcff185c68","unresolved":false,"context_lines":[{"line_number":784,"context_line":"                block_device.properties_root_device_name("},{"line_number":785,"context_line":"                    boot_meta.get(\u0027properties\u0027, {})))"},{"line_number":786,"context_line":""},{"line_number":787,"context_line":"        numa_topology \u003d hardware.VirtNUMAInstanceTopology.get_constraints("},{"line_number":788,"context_line":"                instance_type, boot_meta.get(\u0027properties\u0027, {}))"},{"line_number":789,"context_line":"        if numa_topology is not None:"},{"line_number":790,"context_line":"            numa_topology \u003d objects.InstanceNUMATopology.obj_from_topology("}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_b436eab2","side":"PARENT","line":787,"updated":"2014-11-19 12:40:45.000000000","message":"mistake here","commit_id":"fdce1059b053ff72f5bce7b70b2fddf3dab63944"}],"nova/objects/instance_numa_topology.py":[{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"ae53700712a841e5c6ae8468090a599cb20ed412","unresolved":false,"context_lines":[{"line_number":57,"context_line":"            # the database (or forever, if we can never guarantee that)."},{"line_number":58,"context_line":"            obj_topology \u003d cls(id\u003d0, instance_uuid\u003dinstance_uuid, cells\u003d["},{"line_number":59,"context_line":"                InstanceNUMACell(id\u003dcell[\u0027id\u0027],"},{"line_number":60,"context_line":"                                 cpuset\u003dset(cell[\u0027cpuset\u0027]),"},{"line_number":61,"context_line":"                                 memory\u003dcell[\u0027memory\u0027],"},{"line_number":62,"context_line":"                                 pagesize\u003dcell[\u0027pagesize\u0027])"},{"line_number":63,"context_line":"                for cell in primitive[\u0027cells\u0027]])"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a890539_af018db0","line":60,"updated":"2014-11-25 09:22:41.000000000","message":"Sam question as for the helper method in hardware.py (that should now probably live in the object.","commit_id":"eaa101b904c1a3497ac8bb6cde62b202934c276b"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"cd2974e59ca62a41707cb58c461b8d5b1caac0dc","unresolved":false,"context_lines":[{"line_number":57,"context_line":"            # the database (or forever, if we can never guarantee that)."},{"line_number":58,"context_line":"            obj_topology \u003d cls(id\u003d0, instance_uuid\u003dinstance_uuid, cells\u003d["},{"line_number":59,"context_line":"                InstanceNUMACell(id\u003dcell[\u0027id\u0027],"},{"line_number":60,"context_line":"                                 cpuset\u003dset(cell[\u0027cpuset\u0027]),"},{"line_number":61,"context_line":"                                 memory\u003dcell[\u0027memory\u0027],"},{"line_number":62,"context_line":"                                 pagesize\u003dcell[\u0027pagesize\u0027])"},{"line_number":63,"context_line":"                for cell in primitive[\u0027cells\u0027]])"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a890539_b46ac17e","line":60,"in_reply_to":"5a890539_af018db0","updated":"2014-11-25 13:37:47.000000000","message":"Done","commit_id":"eaa101b904c1a3497ac8bb6cde62b202934c276b"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"ae53700712a841e5c6ae8468090a599cb20ed412","unresolved":false,"context_lines":[{"line_number":61,"context_line":"                                 memory\u003dcell[\u0027memory\u0027],"},{"line_number":62,"context_line":"                                 pagesize\u003dcell[\u0027pagesize\u0027])"},{"line_number":63,"context_line":"                for cell in primitive[\u0027cells\u0027]])"},{"line_number":64,"context_line":"        return obj_topology"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    # TODO(ndipanov) Remove this method on the major version bump to 2.0"},{"line_number":67,"context_line":"    @base.remotable"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a890539_2f575dcb","line":64,"updated":"2014-11-25 09:22:41.000000000","message":"this name is confusing me now, but in the future it will probably be fine since people will forge there was a topology :)","commit_id":"eaa101b904c1a3497ac8bb6cde62b202934c276b"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"a71f4b53f64740b4fdb3ebc9ba71b1b58d0a3194","unresolved":false,"context_lines":[{"line_number":33,"context_line":"        \u0027pagesize\u0027: fields.IntegerField(nullable\u003dTrue),"},{"line_number":34,"context_line":"        }"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def _to_dict(self):"},{"line_number":37,"context_line":"        return {\u0027cpus\u0027: hardware.format_cpu_spec(self.cpuset,"},{"line_number":38,"context_line":"                                                 allow_ranges\u003dFalse),"},{"line_number":39,"context_line":"                \u0027mem\u0027: {\u0027total\u0027: self.memory},"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a890539_44045914","line":36,"updated":"2014-11-26 14:46:13.000000000","message":"Hmm I am not sure we really need this - we never want to serialize it back to the old dict - right?","commit_id":"257d123e257d17ad14d1b29f06ecc5703b312a3f"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"42c3c059434848a02691228134de75f0458d3199","unresolved":false,"context_lines":[{"line_number":33,"context_line":"        \u0027pagesize\u0027: fields.IntegerField(nullable\u003dTrue),"},{"line_number":34,"context_line":"        }"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def _to_dict(self):"},{"line_number":37,"context_line":"        return {\u0027cpus\u0027: hardware.format_cpu_spec(self.cpuset,"},{"line_number":38,"context_line":"                                                 allow_ranges\u003dFalse),"},{"line_number":39,"context_line":"                \u0027mem\u0027: {\u0027total\u0027: self.memory},"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a890539_fa6f9e25","line":36,"in_reply_to":"5a890539_44045914","updated":"2014-11-26 16:52:06.000000000","message":"we need this for unit tests - assert all is working great for old data.","commit_id":"257d123e257d17ad14d1b29f06ecc5703b312a3f"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"a71f4b53f64740b4fdb3ebc9ba71b1b58d0a3194","unresolved":false,"context_lines":[{"line_number":41,"context_line":"                \u0027pagesize\u0027: self.pagesize}"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    @classmethod"},{"line_number":44,"context_line":"    def _from_dict(cls, data_dict):"},{"line_number":45,"context_line":"        cpuset \u003d hardware.parse_cpu_spec(data_dict.get(\u0027cpus\u0027, \u0027\u0027))"},{"line_number":46,"context_line":"        memory \u003d data_dict.get(\u0027mem\u0027, {}).get(\u0027total\u0027, 0)"},{"line_number":47,"context_line":"        cell_id \u003d data_dict.get(\u0027id\u0027)"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a890539_840ac11d","line":44,"updated":"2014-11-26 14:46:13.000000000","message":"maybe call this - from legacy_dict or something like that to emphasise the fact that this is only to be used when reading an old record from the DB.","commit_id":"257d123e257d17ad14d1b29f06ecc5703b312a3f"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"42c3c059434848a02691228134de75f0458d3199","unresolved":false,"context_lines":[{"line_number":41,"context_line":"                \u0027pagesize\u0027: self.pagesize}"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    @classmethod"},{"line_number":44,"context_line":"    def _from_dict(cls, data_dict):"},{"line_number":45,"context_line":"        cpuset \u003d hardware.parse_cpu_spec(data_dict.get(\u0027cpus\u0027, \u0027\u0027))"},{"line_number":46,"context_line":"        memory \u003d data_dict.get(\u0027mem\u0027, {}).get(\u0027total\u0027, 0)"},{"line_number":47,"context_line":"        cell_id \u003d data_dict.get(\u0027id\u0027)"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a890539_fadddedd","line":44,"in_reply_to":"5a890539_840ac11d","updated":"2014-11-26 16:52:06.000000000","message":"objects/virt_cpu_topology uses this name, i guess we can keep the same convention here. then if we want to change we can address a new patch in the future. (there are already too many change in this commit)","commit_id":"257d123e257d17ad14d1b29f06ecc5703b312a3f"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"d008fa84ae5367545c1fc51a86b7831682e58825","unresolved":false,"context_lines":[{"line_number":41,"context_line":"                \u0027pagesize\u0027: self.pagesize}"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    @classmethod"},{"line_number":44,"context_line":"    def _from_dict(cls, data_dict):"},{"line_number":45,"context_line":"        cpuset \u003d hardware.parse_cpu_spec(data_dict.get(\u0027cpus\u0027, \u0027\u0027))"},{"line_number":46,"context_line":"        memory \u003d data_dict.get(\u0027mem\u0027, {}).get(\u0027total\u0027, 0)"},{"line_number":47,"context_line":"        cell_id \u003d data_dict.get(\u0027id\u0027)"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a890539_90a90493","line":44,"in_reply_to":"5a890539_fadddedd","updated":"2014-11-27 09:16:52.000000000","message":"Agreed","commit_id":"257d123e257d17ad14d1b29f06ecc5703b312a3f"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"a71f4b53f64740b4fdb3ebc9ba71b1b58d0a3194","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    @classmethod"},{"line_number":67,"context_line":"    def obj_from_primitive(cls, primitive):"},{"line_number":68,"context_line":"        if \u0027nova_object.name\u0027 in primitive:"},{"line_number":69,"context_line":"            obj_topology \u003d super(InstanceNUMATopology, cls).obj_from_primitive("},{"line_number":70,"context_line":"                primitive)"},{"line_number":71,"context_line":"        else:"},{"line_number":72,"context_line":"            # NOTE(sahid): This compatibility code needs to stay until we can"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a890539_648155c2","line":69,"updated":"2014-11-26 14:46:13.000000000","message":"why do we do this exactly? can\u0027t we just call it as before?","commit_id":"257d123e257d17ad14d1b29f06ecc5703b312a3f"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"30ea2941233554f820f77a51cced975f132b888e","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    @classmethod"},{"line_number":67,"context_line":"    def obj_from_primitive(cls, primitive):"},{"line_number":68,"context_line":"        if \u0027nova_object.name\u0027 in primitive:"},{"line_number":69,"context_line":"            obj_topology \u003d super(InstanceNUMATopology, cls).obj_from_primitive("},{"line_number":70,"context_line":"                primitive)"},{"line_number":71,"context_line":"        else:"},{"line_number":72,"context_line":"            # NOTE(sahid): This compatibility code needs to stay until we can"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a890539_dacd66b9","line":69,"in_reply_to":"5a890539_50db1c21","updated":"2014-11-27 10:30:02.000000000","message":"We want to call the method from the parent class. If we don\u0027t do that we will call cls will be equal to InstanceNUMATopology and so we will enter in a loop.\n\nDoes it make sens?","commit_id":"257d123e257d17ad14d1b29f06ecc5703b312a3f"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"42c3c059434848a02691228134de75f0458d3199","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    @classmethod"},{"line_number":67,"context_line":"    def obj_from_primitive(cls, primitive):"},{"line_number":68,"context_line":"        if \u0027nova_object.name\u0027 in primitive:"},{"line_number":69,"context_line":"            obj_topology \u003d super(InstanceNUMATopology, cls).obj_from_primitive("},{"line_number":70,"context_line":"                primitive)"},{"line_number":71,"context_line":"        else:"},{"line_number":72,"context_line":"            # NOTE(sahid): This compatibility code needs to stay until we can"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a890539_faa5de9e","line":69,"in_reply_to":"5a890539_648155c2","updated":"2014-11-26 16:52:06.000000000","message":"we have to deal with data from old/new until the end of the time so why to use condition every where in the code. we can keep all here.","commit_id":"257d123e257d17ad14d1b29f06ecc5703b312a3f"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"d008fa84ae5367545c1fc51a86b7831682e58825","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    @classmethod"},{"line_number":67,"context_line":"    def obj_from_primitive(cls, primitive):"},{"line_number":68,"context_line":"        if \u0027nova_object.name\u0027 in primitive:"},{"line_number":69,"context_line":"            obj_topology \u003d super(InstanceNUMATopology, cls).obj_from_primitive("},{"line_number":70,"context_line":"                primitive)"},{"line_number":71,"context_line":"        else:"},{"line_number":72,"context_line":"            # NOTE(sahid): This compatibility code needs to stay until we can"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a890539_50db1c21","line":69,"in_reply_to":"5a890539_faa5de9e","updated":"2014-11-27 09:16:52.000000000","message":"I meant - why do we call a classmethod through the super mechanism","commit_id":"257d123e257d17ad14d1b29f06ecc5703b312a3f"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"a71f4b53f64740b4fdb3ebc9ba71b1b58d0a3194","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        obj_topology \u003d cls.obj_from_primitive(primitive)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        if \u0027nova_object.name\u0027 not in db_obj:"},{"line_number":85,"context_line":"            obj_topology.instance_uuid \u003d instance_uuid"},{"line_number":86,"context_line":"            # No benfit to store a list of changed fields"},{"line_number":87,"context_line":"            obj_topology.obj_reset_changes()"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"5a890539_04b25148","line":85,"updated":"2014-11-26 14:46:13.000000000","message":"hmm don\u0027t we wanna do this every time? not only if it was saved in the new format?","commit_id":"257d123e257d17ad14d1b29f06ecc5703b312a3f"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"30ea2941233554f820f77a51cced975f132b888e","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        obj_topology \u003d cls.obj_from_primitive(primitive)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        if \u0027nova_object.name\u0027 not in db_obj:"},{"line_number":85,"context_line":"            obj_topology.instance_uuid \u003d instance_uuid"},{"line_number":86,"context_line":"            # No benfit to store a list of changed fields"},{"line_number":87,"context_line":"            obj_topology.obj_reset_changes()"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"5a890539_baa33aff","line":85,"in_reply_to":"5a890539_04b25148","updated":"2014-11-27 10:30:02.000000000","message":"You mean set instance_uuid? - Now we are storing InstanceNUMATopology in the database so we should retrieve it with instance_uuid already well defined.","commit_id":"257d123e257d17ad14d1b29f06ecc5703b312a3f"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"a71f4b53f64740b4fdb3ebc9ba71b1b58d0a3194","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        \"\"\"Defined so that boolean testing works the same as for lists.\"\"\""},{"line_number":131,"context_line":"        return len(self.cells)"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"    def _to_dict(self):"},{"line_number":134,"context_line":"        return {\u0027cells\u0027: [cell._to_dict() for cell in self.cells]}"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a890539_847d616f","line":133,"updated":"2014-11-26 14:46:13.000000000","message":"Also not sure we need this tbh","commit_id":"257d123e257d17ad14d1b29f06ecc5703b312a3f"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"a10ad4dbf3a2cff63a2a4ecc84cfa58a419789a6","unresolved":false,"context_lines":[{"line_number":33,"context_line":"        \u0027pagesize\u0027: fields.IntegerField(nullable\u003dTrue),"},{"line_number":34,"context_line":"        }"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def _to_dict(self):"},{"line_number":37,"context_line":"        return {\u0027cpus\u0027: hardware.format_cpu_spec(self.cpuset,"},{"line_number":38,"context_line":"                                                 allow_ranges\u003dFalse),"},{"line_number":39,"context_line":"                \u0027mem\u0027: {\u0027total\u0027: self.memory},"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_7a863218","line":36,"updated":"2014-11-27 10:36:55.000000000","message":"I think we need to at this point comment why these are needed if we don\u0027t want to rename them (I think we should but maybe next patch - it will be really confusing, even one week from the point of merging this.","commit_id":"a542fb42efde6db520eb83a8f95f825287f919c0"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"013a96f291c2e6bcc0e3fa3be3e60958bf442331","unresolved":false,"context_lines":[{"line_number":33,"context_line":"        \u0027pagesize\u0027: fields.IntegerField(nullable\u003dTrue),"},{"line_number":34,"context_line":"        }"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def _to_dict(self):"},{"line_number":37,"context_line":"        return {\u0027cpus\u0027: hardware.format_cpu_spec(self.cpuset,"},{"line_number":38,"context_line":"                                                 allow_ranges\u003dFalse),"},{"line_number":39,"context_line":"                \u0027mem\u0027: {\u0027total\u0027: self.memory},"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_3a2d8aa9","line":36,"in_reply_to":"5a890539_7a863218","updated":"2014-11-27 11:34:49.000000000","message":"Indeed, i will do.","commit_id":"a542fb42efde6db520eb83a8f95f825287f919c0"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"4c2a39f77b5a82cec62efe96f7cde489cad8db7d","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        }"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def _to_dict(self):"},{"line_number":37,"context_line":"        # NOTE(sahid): Used as legacy, could be renamed in"},{"line_number":38,"context_line":"        # _legacy_to_dict_ in the future to avoid confusing."},{"line_number":39,"context_line":"        return {\u0027cpus\u0027: hardware.format_cpu_spec(self.cpuset,"},{"line_number":40,"context_line":"                                                 allow_ranges\u003dFalse),"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_8998f61c","line":37,"updated":"2014-11-27 13:57:17.000000000","message":"s/in/to/ but only if you need to respin","commit_id":"6faddb410d8d10c3475e3996b6ee0d020158b026"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"c9b7a224c554c38756a37de560706ad84028659e","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        }"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def _to_dict(self):"},{"line_number":37,"context_line":"        # NOTE(sahid): Used as legacy, could be renamed in"},{"line_number":38,"context_line":"        # _legacy_to_dict_ in the future to avoid confusing."},{"line_number":39,"context_line":"        return {\u0027cpus\u0027: hardware.format_cpu_spec(self.cpuset,"},{"line_number":40,"context_line":"                                                 allow_ranges\u003dFalse),"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_39b3bd0b","line":37,"in_reply_to":"5a890539_8998f61c","updated":"2014-11-28 13:37:21.000000000","message":"Done","commit_id":"6faddb410d8d10c3475e3996b6ee0d020158b026"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"16fabb749fd47b3fff7988366566cd486c6fbeec","unresolved":false,"context_lines":[{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        if \u0027nova_object.name\u0027 not in db_obj:"},{"line_number":89,"context_line":"            obj_topology.instance_uuid \u003d instance_uuid"},{"line_number":90,"context_line":"            # No benfit to store a list of changed fields"},{"line_number":91,"context_line":"            obj_topology.obj_reset_changes()"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        return obj_topology"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_65f3ea9f","line":90,"updated":"2014-11-27 16:06:16.000000000","message":"s/benfit/benefit/","commit_id":"6faddb410d8d10c3475e3996b6ee0d020158b026"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"c9b7a224c554c38756a37de560706ad84028659e","unresolved":false,"context_lines":[{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        if \u0027nova_object.name\u0027 not in db_obj:"},{"line_number":89,"context_line":"            obj_topology.instance_uuid \u003d instance_uuid"},{"line_number":90,"context_line":"            # No benfit to store a list of changed fields"},{"line_number":91,"context_line":"            obj_topology.obj_reset_changes()"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        return obj_topology"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_79cc658b","line":90,"in_reply_to":"5a890539_65f3ea9f","updated":"2014-11-28 13:37:21.000000000","message":"Done","commit_id":"6faddb410d8d10c3475e3996b6ee0d020158b026"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"16fabb749fd47b3fff7988366566cd486c6fbeec","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        return cls.obj_from_db_obj(instance_uuid, db_extra[\u0027numa_topology\u0027])"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def _to_json(self):"},{"line_number":131,"context_line":"        return jsonutils.dumps(self.obj_to_primitive())"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"    def __len__(self):"},{"line_number":134,"context_line":"        \"\"\"Defined so that boolean testing works the same as for lists.\"\"\""}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_851e16ba","line":131,"updated":"2014-11-27 16:06:16.000000000","message":"Just change this to to_json(), and then you don\u0027t have to change the numa_topology_filter.py code. Since the to_json() method is called outside this module, you should make it a \"public\" method without the underscore.","commit_id":"6faddb410d8d10c3475e3996b6ee0d020158b026"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"c9b7a224c554c38756a37de560706ad84028659e","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        return cls.obj_from_db_obj(instance_uuid, db_extra[\u0027numa_topology\u0027])"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def _to_json(self):"},{"line_number":131,"context_line":"        return jsonutils.dumps(self.obj_to_primitive())"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"    def __len__(self):"},{"line_number":134,"context_line":"        \"\"\"Defined so that boolean testing works the same as for lists.\"\"\""}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_b91ecdb9","line":131,"in_reply_to":"5a890539_851e16ba","updated":"2014-11-28 13:37:21.000000000","message":"Well I\u0027m usually with you but dansmith asked me to change it here: https://review.openstack.org/#/c/135220/7/nova/objects/instance_numa_topology.py,cm\n\nafter some exchanges in IRC it told me that, there is a special relation with instance and instance_numa_topology and we don\u0027t expect to use it in an other place.\n\nAre you ok to let me continue with this in private for this change and the next (to keep cohesion) then we can address new patch to fix them if we are decided this is not good.","commit_id":"6faddb410d8d10c3475e3996b6ee0d020158b026"}],"nova/scheduler/filters/numa_topology_filter.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"65eba200d0645eba3b7532220758681013e755f0","unresolved":false,"context_lines":[{"line_number":47,"context_line":"            if not instance_topology:"},{"line_number":48,"context_line":"                return False"},{"line_number":49,"context_line":"            host_state.limits[\u0027numa_topology\u0027] \u003d limits.to_json()"},{"line_number":50,"context_line":"            instance[\u0027numa_topology\u0027] \u003d instance_topology._to_json()"},{"line_number":51,"context_line":"            return True"},{"line_number":52,"context_line":"        elif requested_topology:"},{"line_number":53,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_25ec828f","line":50,"updated":"2014-11-27 16:08:51.000000000","message":"I just realized something.. Why are we bothering to convert this to JSON at all? Just store the nova.object in instance[\u0027numa_topology\u0027] ...","commit_id":"6faddb410d8d10c3475e3996b6ee0d020158b026"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"c9b7a224c554c38756a37de560706ad84028659e","unresolved":false,"context_lines":[{"line_number":47,"context_line":"            if not instance_topology:"},{"line_number":48,"context_line":"                return False"},{"line_number":49,"context_line":"            host_state.limits[\u0027numa_topology\u0027] \u003d limits.to_json()"},{"line_number":50,"context_line":"            instance[\u0027numa_topology\u0027] \u003d instance_topology._to_json()"},{"line_number":51,"context_line":"            return True"},{"line_number":52,"context_line":"        elif requested_topology:"},{"line_number":53,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_34aae485","line":50,"in_reply_to":"5a890539_25ec828f","updated":"2014-11-28 13:37:21.000000000","message":"I\u0027m ok: host_manager.consume_from_instance will call hardware.get_host_numa_usage_from_instance(...) and this method will call instance_topology_from_instance(...).\n\ninstance_topology_from_instance is able to handle a numa_topology as an object of InstanceNUMATopology.\n\nPerhaps Nikola can confirm.","commit_id":"6faddb410d8d10c3475e3996b6ee0d020158b026"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"8671702dfb451b74bad2e83bc79e38c4efadea80","unresolved":false,"context_lines":[{"line_number":47,"context_line":"            if not instance_topology:"},{"line_number":48,"context_line":"                return False"},{"line_number":49,"context_line":"            host_state.limits[\u0027numa_topology\u0027] \u003d limits.to_json()"},{"line_number":50,"context_line":"            instance[\u0027numa_topology\u0027] \u003d instance_topology._to_json()"},{"line_number":51,"context_line":"            return True"},{"line_number":52,"context_line":"        elif requested_topology:"},{"line_number":53,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a890539_88f458d0","line":50,"in_reply_to":"5a890539_34aae485","updated":"2014-11-28 14:05:26.000000000","message":"Yes - now that we moved numa_usage_from_instances to objects - this can work like that easily.","commit_id":"6faddb410d8d10c3475e3996b6ee0d020158b026"}],"nova/tests/unit/compute/test_claims.py":[{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"ae53700712a841e5c6ae8468090a599cb20ed412","unresolved":false,"context_lines":[{"line_number":124,"context_line":"            \u0027numa_topology\u0027: hardware.VirtNUMAHostTopology("},{"line_number":125,"context_line":"                cells\u003d[hardware.VirtNUMATopologyCellUsage(1, [1, 2], 512),"},{"line_number":126,"context_line":"                       hardware.VirtNUMATopologyCellUsage(2, [3, 4], 512)]"},{"line_number":127,"context_line":"            ).to_json()"},{"line_number":128,"context_line":"        }"},{"line_number":129,"context_line":"        if values:"},{"line_number":130,"context_line":"            resources.update(values)"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a890539_4fdf493a","line":127,"updated":"2014-11-25 09:22:41.000000000","message":"?","commit_id":"eaa101b904c1a3497ac8bb6cde62b202934c276b"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"cd2974e59ca62a41707cb58c461b8d5b1caac0dc","unresolved":false,"context_lines":[{"line_number":124,"context_line":"            \u0027numa_topology\u0027: hardware.VirtNUMAHostTopology("},{"line_number":125,"context_line":"                cells\u003d[hardware.VirtNUMATopologyCellUsage(1, [1, 2], 512),"},{"line_number":126,"context_line":"                       hardware.VirtNUMATopologyCellUsage(2, [3, 4], 512)]"},{"line_number":127,"context_line":"            ).to_json()"},{"line_number":128,"context_line":"        }"},{"line_number":129,"context_line":"        if values:"},{"line_number":130,"context_line":"            resources.update(values)"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a890539_f47b69f2","line":127,"in_reply_to":"5a890539_4fdf493a","updated":"2014-11-25 13:37:47.000000000","message":"Done","commit_id":"eaa101b904c1a3497ac8bb6cde62b202934c276b"}],"nova/tests/unit/objects/test_instance_numa_topology.py":[{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"ae53700712a841e5c6ae8468090a599cb20ed412","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"fake_instance_uuid \u003d str(uuid.uuid4())"},{"line_number":23,"context_line":"fake_numa_topology \u003d {"},{"line_number":24,"context_line":"    \u0027cells\u0027: [{\"id\": 0, \"cpuset\": set([1, 2]),"},{"line_number":25,"context_line":"               \"memory\": 512, \"pagesize\": 2048},"},{"line_number":26,"context_line":"              {\"id\": 1, \"cpuset\": set([3, 4]),"},{"line_number":27,"context_line":"               \"memory\": 512, \"pagesize\": 2048}]}"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a890539_efa395af","line":24,"updated":"2014-11-25 09:22:41.000000000","message":"Nope - we need to make sure this is _exactly the same_ as with the old _from/_to _dict methods :(","commit_id":"eaa101b904c1a3497ac8bb6cde62b202934c276b"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"cd2974e59ca62a41707cb58c461b8d5b1caac0dc","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"fake_instance_uuid \u003d str(uuid.uuid4())"},{"line_number":23,"context_line":"fake_numa_topology \u003d {"},{"line_number":24,"context_line":"    \u0027cells\u0027: [{\"id\": 0, \"cpuset\": set([1, 2]),"},{"line_number":25,"context_line":"               \"memory\": 512, \"pagesize\": 2048},"},{"line_number":26,"context_line":"              {\"id\": 1, \"cpuset\": set([3, 4]),"},{"line_number":27,"context_line":"               \"memory\": 512, \"pagesize\": 2048}]}"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a890539_f41a897b","line":24,"in_reply_to":"5a890539_efa395af","updated":"2014-11-25 13:37:47.000000000","message":"Done","commit_id":"eaa101b904c1a3497ac8bb6cde62b202934c276b"}],"nova/tests/unit/scheduler/filters/test_numa_topology_filters.py":[{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"858a1dc88e22d9da2c29f7c63e0676bf4af47e5e","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        filter_properties \u003d {"},{"line_number":57,"context_line":"            \u0027request_spec\u0027: {"},{"line_number":58,"context_line":"                \u0027instance_properties\u0027: jsonutils.to_primitive("},{"line_number":59,"context_line":"                    obj_base.obj_to_primitive(instance))}}"},{"line_number":60,"context_line":"        host \u003d fakes.FakeHostState(\u0027host1\u0027, \u0027node1\u0027, {})"},{"line_number":61,"context_line":"        self.assertFalse(self.filt_cls.host_passes(host, filter_properties))"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a890539_e5ee4321","side":"PARENT","line":58,"updated":"2014-11-25 17:26:57.000000000","message":"hum... why i did that :/ I need to take a break.","commit_id":"d77f3ec5b6cf35d3b252b9de666c9b829676a8a7"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"1d8240ef954f16b0c059f939f0f1d7ca5f32526e","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        filter_properties \u003d {"},{"line_number":57,"context_line":"            \u0027request_spec\u0027: {"},{"line_number":58,"context_line":"                \u0027instance_properties\u0027: jsonutils.to_primitive("},{"line_number":59,"context_line":"                    obj_base.obj_to_primitive(instance))}}"},{"line_number":60,"context_line":"        host \u003d fakes.FakeHostState(\u0027host1\u0027, \u0027node1\u0027, {})"},{"line_number":61,"context_line":"        self.assertFalse(self.filt_cls.host_passes(host, filter_properties))"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a890539_45747767","side":"PARENT","line":58,"in_reply_to":"5a890539_e5ee4321","updated":"2014-11-25 17:30:04.000000000","message":"LOL - take it east tho - awesome work!","commit_id":"d77f3ec5b6cf35d3b252b9de666c9b829676a8a7"}],"nova/tests/unit/virt/test_hardware.py":[{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"ae53700712a841e5c6ae8468090a599cb20ed412","unresolved":false,"context_lines":[{"line_number":1281,"context_line":"        self.assertEqual(256, host_usage.cells[1].memory_usage)"},{"line_number":1282,"context_line":""},{"line_number":1283,"context_line":"    def test_dicts_json(self):"},{"line_number":1284,"context_line":"        host \u003d {\u0027numa_topology\u0027: self.hosttopo.to_json()}"},{"line_number":1285,"context_line":"        instance \u003d {\u0027numa_topology\u0027: self.instancetopo.to_json()}"},{"line_number":1286,"context_line":""},{"line_number":1287,"context_line":"        res \u003d hw.get_host_numa_usage_from_instance(host, instance)"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a890539_afb7cd38","line":1284,"updated":"2014-11-25 09:22:41.000000000","message":"So all of this now test the new case - which is with the object serialized with obj_to_primitive()\n\nWe need to inline the old to_json() method here (or keep it in the object as suggested in hardware.py - it\u0027s not going away soon) and make sure that the helper method works with it too.","commit_id":"eaa101b904c1a3497ac8bb6cde62b202934c276b"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"cd2974e59ca62a41707cb58c461b8d5b1caac0dc","unresolved":false,"context_lines":[{"line_number":1281,"context_line":"        self.assertEqual(256, host_usage.cells[1].memory_usage)"},{"line_number":1282,"context_line":""},{"line_number":1283,"context_line":"    def test_dicts_json(self):"},{"line_number":1284,"context_line":"        host \u003d {\u0027numa_topology\u0027: self.hosttopo.to_json()}"},{"line_number":1285,"context_line":"        instance \u003d {\u0027numa_topology\u0027: self.instancetopo.to_json()}"},{"line_number":1286,"context_line":""},{"line_number":1287,"context_line":"        res \u003d hw.get_host_numa_usage_from_instance(host, instance)"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a890539_03119403","line":1284,"in_reply_to":"5a890539_afb7cd38","updated":"2014-11-25 13:37:47.000000000","message":"Done","commit_id":"eaa101b904c1a3497ac8bb6cde62b202934c276b"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"a71f4b53f64740b4fdb3ebc9ba71b1b58d0a3194","unresolved":false,"context_lines":[{"line_number":1384,"context_line":"        self._check_usage(res)"},{"line_number":1385,"context_line":""},{"line_number":1386,"context_line":""},{"line_number":1387,"context_line":"class OldHelperMethodsTestCase(HelperMethodsTestCase):"},{"line_number":1388,"context_line":"    def setUp(self):"},{"line_number":1389,"context_line":"        super(OldHelperMethodsTestCase, self).setUp()"},{"line_number":1390,"context_line":"        self.instancetopo \u003d self.instancetopo._to_dict()"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a890539_1f629c3d","line":1387,"updated":"2014-11-26 14:46:13.000000000","message":"Not sure we need any of this - all we need is a new test that makes sure deserializetion works when there is a attr that is jsonified old dict format. That\u0027s the only new case we need to cover actually.","commit_id":"257d123e257d17ad14d1b29f06ecc5703b312a3f"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"a10ad4dbf3a2cff63a2a4ecc84cfa58a419789a6","unresolved":false,"context_lines":[{"line_number":1365,"context_line":"        instance_raw \u003d jsonutils.to_primitive("},{"line_number":1366,"context_line":"                base_obj.obj_to_primitive(instance))"},{"line_number":1367,"context_line":"        res \u003d hw.get_host_numa_usage_from_instance(host, instance_raw)"},{"line_number":1368,"context_line":""},{"line_number":1369,"context_line":"        self.assertIsInstance(res, six.string_types)"},{"line_number":1370,"context_line":"        self._check_usage(hw.VirtNUMAHostTopology.from_json(res))"},{"line_number":1371,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_f54ebac1","line":1368,"updated":"2014-11-27 10:36:55.000000000","message":"blargh!","commit_id":"a542fb42efde6db520eb83a8f95f825287f919c0"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"013a96f291c2e6bcc0e3fa3be3e60958bf442331","unresolved":false,"context_lines":[{"line_number":1365,"context_line":"        instance_raw \u003d jsonutils.to_primitive("},{"line_number":1366,"context_line":"                base_obj.obj_to_primitive(instance))"},{"line_number":1367,"context_line":"        res \u003d hw.get_host_numa_usage_from_instance(host, instance_raw)"},{"line_number":1368,"context_line":""},{"line_number":1369,"context_line":"        self.assertIsInstance(res, six.string_types)"},{"line_number":1370,"context_line":"        self._check_usage(hw.VirtNUMAHostTopology.from_json(res))"},{"line_number":1371,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_3a04aa17","line":1368,"in_reply_to":"5a890539_f54ebac1","updated":"2014-11-27 11:34:49.000000000","message":":)","commit_id":"a542fb42efde6db520eb83a8f95f825287f919c0"}],"nova/virt/hardware.py":[{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"931c8676067f16527f460ba12bca255a20ca2908","unresolved":false,"context_lines":[{"line_number":819,"context_line":"            return image_val"},{"line_number":820,"context_line":""},{"line_number":821,"context_line":"    @staticmethod"},{"line_number":822,"context_line":"    def _get_constraints_manual(nodes, flavor, image_meta):"},{"line_number":823,"context_line":"        cells \u003d []"},{"line_number":824,"context_line":"        totalmem \u003d 0"},{"line_number":825,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_10a0caa4","line":822,"updated":"2014-11-18 17:29:13.000000000","message":"TBH - I\u0027d move them out of the class completely in this patch too - there is no need for them to be staticmethods anymore since they are returning objects.","commit_id":"eb467c24f9cc9e64694fffdcfb18d90710261293"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"0ec54ad17f4da803a8d640026167584702ccd3fe","unresolved":false,"context_lines":[{"line_number":819,"context_line":"            return image_val"},{"line_number":820,"context_line":""},{"line_number":821,"context_line":"    @staticmethod"},{"line_number":822,"context_line":"    def _get_constraints_manual(nodes, flavor, image_meta):"},{"line_number":823,"context_line":"        cells \u003d []"},{"line_number":824,"context_line":"        totalmem \u003d 0"},{"line_number":825,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_5affb6aa","line":822,"in_reply_to":"5a890539_10a0caa4","updated":"2014-11-19 09:11:21.000000000","message":"Done","commit_id":"eb467c24f9cc9e64694fffdcfb18d90710261293"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"ae53700712a841e5c6ae8468090a599cb20ed412","unresolved":false,"context_lines":[{"line_number":608,"context_line":"        cell_id \u003d data_dict.get(\u0027id\u0027)"},{"line_number":609,"context_line":"        return cls(cell_id, cpuset, memory)"},{"line_number":610,"context_line":""},{"line_number":611,"context_line":""},{"line_number":612,"context_line":"class VirtNUMATopologyCellInstance(VirtNUMATopologyCell):"},{"line_number":613,"context_line":"    \"\"\"Class for reporting NUMA resources in an iinstance cell.\"\"\""},{"line_number":614,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"5a890539_84091833","side":"PARENT","line":611,"updated":"2014-11-25 09:22:41.000000000","message":"Don\u0027t we want to get rid of this as well now?","commit_id":"4a1d38877076eb43a06f2877c639973800be7d96"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"cd2974e59ca62a41707cb58c461b8d5b1caac0dc","unresolved":false,"context_lines":[{"line_number":608,"context_line":"        cell_id \u003d data_dict.get(\u0027id\u0027)"},{"line_number":609,"context_line":"        return cls(cell_id, cpuset, memory)"},{"line_number":610,"context_line":""},{"line_number":611,"context_line":""},{"line_number":612,"context_line":"class VirtNUMATopologyCellInstance(VirtNUMATopologyCell):"},{"line_number":613,"context_line":"    \"\"\"Class for reporting NUMA resources in an iinstance cell.\"\"\""},{"line_number":614,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"5a890539_01b995cb","side":"PARENT","line":611,"in_reply_to":"5a890539_84091833","updated":"2014-11-25 13:37:47.000000000","message":"Done","commit_id":"4a1d38877076eb43a06f2877c639973800be7d96"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"ae53700712a841e5c6ae8468090a599cb20ed412","unresolved":false,"context_lines":[{"line_number":1053,"context_line":"                    claimed_cell.cpu_usage \u003e limit_cell.cpu_limit):"},{"line_number":1054,"context_line":"                return (_(\"Requested instance NUMA topology is too large for \""},{"line_number":1055,"context_line":"                          \"the given host NUMA topology limits.\"))"},{"line_number":1056,"context_line":""},{"line_number":1057,"context_line":""},{"line_number":1058,"context_line":"# TODO(ndipanov): Remove when all code paths are using objects"},{"line_number":1059,"context_line":"def instance_topology_from_instance(instance):"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a890539_84511864","line":1056,"updated":"2014-11-25 09:22:41.000000000","message":"This is a bad rebase - we got rid of this method when we fixed instance fitting, and you re-added here.","commit_id":"eaa101b904c1a3497ac8bb6cde62b202934c276b"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"cd2974e59ca62a41707cb58c461b8d5b1caac0dc","unresolved":false,"context_lines":[{"line_number":1053,"context_line":"                    claimed_cell.cpu_usage \u003e limit_cell.cpu_limit):"},{"line_number":1054,"context_line":"                return (_(\"Requested instance NUMA topology is too large for \""},{"line_number":1055,"context_line":"                          \"the given host NUMA topology limits.\"))"},{"line_number":1056,"context_line":""},{"line_number":1057,"context_line":""},{"line_number":1058,"context_line":"# TODO(ndipanov): Remove when all code paths are using objects"},{"line_number":1059,"context_line":"def instance_topology_from_instance(instance):"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a890539_41af1d7d","line":1056,"in_reply_to":"5a890539_84511864","updated":"2014-11-25 13:37:47.000000000","message":"Done","commit_id":"eaa101b904c1a3497ac8bb6cde62b202934c276b"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"ae53700712a841e5c6ae8468090a599cb20ed412","unresolved":false,"context_lines":[{"line_number":1100,"context_line":"                        instance_numa_topology))"},{"line_number":1101,"context_line":"            else:"},{"line_number":1102,"context_line":"                # NOTE(sahid): Added in Kilo for Juno compat, should be"},{"line_number":1103,"context_line":"                # removed in the future when convenient"},{"line_number":1104,"context_line":"                dict_cells \u003d instance_numa_topology.get(\u0027cells\u0027)"},{"line_number":1105,"context_line":"                if dict_cells:"},{"line_number":1106,"context_line":"                    cells \u003d [objects.InstanceNUMACell("}],"source_content_type":"text/x-python","patch_set":10,"id":"5a890539_4446507c","line":1103,"updated":"2014-11-25 09:22:41.000000000","message":"We also probably want to remove this comment as well since we can\u0027t really ever get rid of it unless we add it as a part of migration/external tool (thus spoke dansmith :) )","commit_id":"eaa101b904c1a3497ac8bb6cde62b202934c276b"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"cd2974e59ca62a41707cb58c461b8d5b1caac0dc","unresolved":false,"context_lines":[{"line_number":1100,"context_line":"                        instance_numa_topology))"},{"line_number":1101,"context_line":"            else:"},{"line_number":1102,"context_line":"                # NOTE(sahid): Added in Kilo for Juno compat, should be"},{"line_number":1103,"context_line":"                # removed in the future when convenient"},{"line_number":1104,"context_line":"                dict_cells \u003d instance_numa_topology.get(\u0027cells\u0027)"},{"line_number":1105,"context_line":"                if dict_cells:"},{"line_number":1106,"context_line":"                    cells \u003d [objects.InstanceNUMACell("}],"source_content_type":"text/x-python","patch_set":10,"id":"5a890539_21e3f1d9","line":1103,"in_reply_to":"5a890539_4446507c","updated":"2014-11-25 13:37:47.000000000","message":"and what about magic incantations ? :D","commit_id":"eaa101b904c1a3497ac8bb6cde62b202934c276b"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"ae53700712a841e5c6ae8468090a599cb20ed412","unresolved":false,"context_lines":[{"line_number":1105,"context_line":"                if dict_cells:"},{"line_number":1106,"context_line":"                    cells \u003d [objects.InstanceNUMACell("},{"line_number":1107,"context_line":"                        id\u003dcell[\u0027id\u0027],"},{"line_number":1108,"context_line":"                        cpuset\u003dset(cell[\u0027cpuset\u0027]),"},{"line_number":1109,"context_line":"                        memory\u003dcell[\u0027memory\u0027],"},{"line_number":1110,"context_line":"                        pagesize\u003dcell.get(\u0027pagesize\u0027))"},{"line_number":1111,"context_line":"                             for cell in dict_cells]"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a890539_243a24e7","line":1108,"updated":"2014-11-25 09:22:41.000000000","message":"So if we deserialize this from the old format - this will be a string like \u00271-3\u0027 because of the cpuspec used in _to_dict() so calling set on it gives us set([\u00271\u0027, \u0027-\u0027, \u00273\u0027]) which is wrong.\n\nWe should fix this and add an explicit test for this at the very least.\n\nThis also makes me think - we should probably move this code to objects as we are essentially going to be duplicating this work here and in objects, as this really will need to stay for a long time","commit_id":"eaa101b904c1a3497ac8bb6cde62b202934c276b"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"cd2974e59ca62a41707cb58c461b8d5b1caac0dc","unresolved":false,"context_lines":[{"line_number":1105,"context_line":"                if dict_cells:"},{"line_number":1106,"context_line":"                    cells \u003d [objects.InstanceNUMACell("},{"line_number":1107,"context_line":"                        id\u003dcell[\u0027id\u0027],"},{"line_number":1108,"context_line":"                        cpuset\u003dset(cell[\u0027cpuset\u0027]),"},{"line_number":1109,"context_line":"                        memory\u003dcell[\u0027memory\u0027],"},{"line_number":1110,"context_line":"                        pagesize\u003dcell.get(\u0027pagesize\u0027))"},{"line_number":1111,"context_line":"                             for cell in dict_cells]"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a890539_34c971ac","line":1108,"in_reply_to":"5a890539_243a24e7","updated":"2014-11-25 13:37:47.000000000","message":"Done","commit_id":"eaa101b904c1a3497ac8bb6cde62b202934c276b"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"a71f4b53f64740b4fdb3ebc9ba71b1b58d0a3194","unresolved":false,"context_lines":[{"line_number":1004,"context_line":"        # NOTE (ndipanov): This may cause a lazy-load of the attribute"},{"line_number":1005,"context_line":"        instance_numa_topology \u003d instance.numa_topology"},{"line_number":1006,"context_line":""},{"line_number":1007,"context_line":"    elif (isinstance(instance, dict) and"},{"line_number":1008,"context_line":"          \u0027nova_object.name\u0027 in instance and"},{"line_number":1009,"context_line":"          instance[\u0027nova_object.name\u0027] \u003d\u003d \u0027Instance\u0027):"},{"line_number":1010,"context_line":"        instance_numa_topology \u003d (objects.Instance.obj_from_primitive("}],"source_content_type":"text/x-python","patch_set":12,"id":"5a890539_5fdb444e","line":1007,"updated":"2014-11-26 14:46:13.000000000","message":"When would we have this case? This can never happen afaict. should be covered by line 1013","commit_id":"257d123e257d17ad14d1b29f06ecc5703b312a3f"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"a71f4b53f64740b4fdb3ebc9ba71b1b58d0a3194","unresolved":false,"context_lines":[{"line_number":1024,"context_line":"            instance_numa_topology \u003d None"},{"line_number":1025,"context_line":""},{"line_number":1026,"context_line":"    if (instance_numa_topology and"},{"line_number":1027,"context_line":"        not isinstance(instance, objects.InstanceNUMATopology)):"},{"line_number":1028,"context_line":"        # NOTE (ndipanov): A horrible hack so that we can use this in the"},{"line_number":1029,"context_line":"        # scheduler, since the InstanceNUMATopology object is serialized"},{"line_number":1030,"context_line":"        # raw using the obj_base.obj_to_primitive, (which is buggy and will"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a890539_df9014ef","line":1027,"updated":"2014-11-26 14:46:13.000000000","message":"Also we don\u0027t need this here if non of the below if\u0027s fire - we just return it","commit_id":"257d123e257d17ad14d1b29f06ecc5703b312a3f"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"a71f4b53f64740b4fdb3ebc9ba71b1b58d0a3194","unresolved":false,"context_lines":[{"line_number":1035,"context_line":"        #"},{"line_number":1036,"context_line":"        # Remove when request_spec is a proper object itself!"},{"line_number":1037,"context_line":"        if isinstance(instance_numa_topology, dict):"},{"line_number":1038,"context_line":"            instance_numa_topology \u003d jsonutils.dumps(instance_numa_topology)"},{"line_number":1039,"context_line":""},{"line_number":1040,"context_line":"        if isinstance(instance_numa_topology, six.string_types):"},{"line_number":1041,"context_line":"            if \u0027uuid\u0027 in instance:"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a890539_64fcf572","line":1038,"updated":"2014-11-26 14:46:13.000000000","message":"hm I am not sure I like this bit - we should stick to constructing the object like we did previously - this seems hacky and convoluted to jsonify it here.\n\nIt should be a dict only if the case when it was serialized by the obj_to_primitive as part of the request_spec. Just build up the object in the same way we did before.","commit_id":"257d123e257d17ad14d1b29f06ecc5703b312a3f"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"a71f4b53f64740b4fdb3ebc9ba71b1b58d0a3194","unresolved":false,"context_lines":[{"line_number":1038,"context_line":"            instance_numa_topology \u003d jsonutils.dumps(instance_numa_topology)"},{"line_number":1039,"context_line":""},{"line_number":1040,"context_line":"        if isinstance(instance_numa_topology, six.string_types):"},{"line_number":1041,"context_line":"            if \u0027uuid\u0027 in instance:"},{"line_number":1042,"context_line":"                instance_numa_topology \u003d ("},{"line_number":1043,"context_line":"                    objects.InstanceNUMATopology.obj_from_db_obj("},{"line_number":1044,"context_line":"                        instance[\u0027uuid\u0027], instance_numa_topology))"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a890539_64107559","line":1041,"updated":"2014-11-26 14:46:13.000000000","message":"This whole if-else also seems unnecessary TBH - if it\u0027s a string obj_from_db_obj should handle all possible cases (the only version when it\u0027s a string is when we try to get it from a non-object instance \"usage\" in the resource tracker and also in the )?","commit_id":"257d123e257d17ad14d1b29f06ecc5703b312a3f"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"a10ad4dbf3a2cff63a2a4ecc84cfa58a419789a6","unresolved":false,"context_lines":[{"line_number":1046,"context_line":"                             for cell in dict_cells]"},{"line_number":1047,"context_line":"                    instance_numa_topology \u003d objects.InstanceNUMATopology("},{"line_number":1048,"context_line":"                        cells\u003dcells)"},{"line_number":1049,"context_line":"            except KeyError:"},{"line_number":1050,"context_line":"                instance_numa_topology \u003d ("},{"line_number":1051,"context_line":"                    objects.InstanceNUMATopology.obj_from_primitive("},{"line_number":1052,"context_line":"                        instance_numa_topology))"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_30b93016","line":1049,"updated":"2014-11-27 10:36:55.000000000","message":"Hmmmm when would this happen?","commit_id":"a542fb42efde6db520eb83a8f95f825287f919c0"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"013a96f291c2e6bcc0e3fa3be3e60958bf442331","unresolved":false,"context_lines":[{"line_number":1046,"context_line":"                             for cell in dict_cells]"},{"line_number":1047,"context_line":"                    instance_numa_topology \u003d objects.InstanceNUMATopology("},{"line_number":1048,"context_line":"                        cells\u003dcells)"},{"line_number":1049,"context_line":"            except KeyError:"},{"line_number":1050,"context_line":"                instance_numa_topology \u003d ("},{"line_number":1051,"context_line":"                    objects.InstanceNUMATopology.obj_from_primitive("},{"line_number":1052,"context_line":"                        instance_numa_topology))"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a890539_f8cb0a71","line":1049,"in_reply_to":"5a890539_30b93016","updated":"2014-11-27 11:34:49.000000000","message":"Indeed i cannot remember why... will check that.","commit_id":"a542fb42efde6db520eb83a8f95f825287f919c0"}]}
