)]}'
{"nova/objects/instance.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"5057b463659fdf76f95a60210f5e734180e30bed","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        \u0027cell_name\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        \u0027metadata\u0027: fields.DictOfStringsField(),"},{"line_number":146,"context_line":"        \u0027system_metadata\u0027: fields.DictOfNullableStringsField(),"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        \u0027info_cache\u0027: fields.ObjectField("},{"line_number":149,"context_line":"            instance_info_cache.InstanceInfoCache, nullable\u003dTrue),"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAATH%2F%2FrrE%3D","line":146,"updated":"2013-10-11 09:24:52.000000000","message":"Why the choice of nullable for system_metadata and not metadata? Not obvious","commit_id":"9d6fb1a0cd362d0f4660bddc81c6294e393f4550"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"7850179ea4853bac0f0e460f173223a1b9f97945","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        \u0027cell_name\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        \u0027metadata\u0027: fields.DictOfStringsField(),"},{"line_number":146,"context_line":"        \u0027system_metadata\u0027: fields.DictOfNullableStringsField(),"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        \u0027info_cache\u0027: fields.ObjectField("},{"line_number":149,"context_line":"            instance_info_cache.InstanceInfoCache, nullable\u003dTrue),"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAATH%2F%2FqWA%3D","line":146,"in_reply_to":"AAAATH%2F%2FqcQ%3D","updated":"2013-10-11 16:12:54.000000000","message":"OK","commit_id":"9d6fb1a0cd362d0f4660bddc81c6294e393f4550"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"9073bbc016d42da98617a79c04adc571f4b877be","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        \u0027cell_name\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        \u0027metadata\u0027: fields.DictOfStringsField(),"},{"line_number":146,"context_line":"        \u0027system_metadata\u0027: fields.DictOfNullableStringsField(),"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        \u0027info_cache\u0027: fields.ObjectField("},{"line_number":149,"context_line":"            instance_info_cache.InstanceInfoCache, nullable\u003dTrue),"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAATH%2F%2FqcQ%3D","line":146,"in_reply_to":"AAAATH%2F%2FrrE%3D","updated":"2013-10-11 15:11:42.000000000","message":"Because we currently have places in the code that store None values into system_metadata.  Metadata is all set by the user and can\u0027t have None values.\n\nThe metadata non-none-ness was filtered out by the API layer before, but this makes sure even tests don\u0027t slip a None in there.","commit_id":"9d6fb1a0cd362d0f4660bddc81c6294e393f4550"}],"nova/tests/compute/test_compute.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"5057b463659fdf76f95a60210f5e734180e30bed","unresolved":false,"context_lines":[{"line_number":6094,"context_line":""},{"line_number":6095,"context_line":"    def test_populate_instance_for_create(self):"},{"line_number":6096,"context_line":"        base_options \u003d {\u0027image_ref\u0027: self.fake_image[\u0027id\u0027],"},{"line_number":6097,"context_line":"                        \u0027system_metadata\u0027: {\u0027fake\u0027: \u0027value\u0027}}"},{"line_number":6098,"context_line":"        instance \u003d instance_obj.Instance()"},{"line_number":6099,"context_line":"        instance.update(base_options)"},{"line_number":6100,"context_line":"        inst_type \u003d flavors.get_flavor_by_name(\"m1.tiny\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAATH%2F%2Frw0%3D","line":6097,"updated":"2013-10-11 09:24:52.000000000","message":"Fixes:\n\n  ValueError: A dict is required here\n\nfrom instance.update()","commit_id":"9d6fb1a0cd362d0f4660bddc81c6294e393f4550"}],"nova/tests/compute/test_compute_utils.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"5057b463659fdf76f95a60210f5e734180e30bed","unresolved":false,"context_lines":[{"line_number":668,"context_line":"        self.image[\u0027properties\u0027] \u003d \u0027DONTCARE\u0027"},{"line_number":669,"context_line":"        # NOTE(danms): The trip through system_metadata will stringify things"},{"line_number":670,"context_line":"        for key in self.image:"},{"line_number":671,"context_line":"            self.image[key] \u003d str(self.image[key])"},{"line_number":672,"context_line":"        self.assertThat(self.image, matchers.DictMatches(image_meta))"},{"line_number":673,"context_line":""},{"line_number":674,"context_line":"    def test_get_image_meta_no_image_system_meta(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAATH%2F%2Frs0%3D","line":671,"updated":"2013-10-11 09:24:52.000000000","message":"Right, by system_metadata from dict() to DictOfStringsField() we\u0027re now coercing these values into strings\n\nBut that\u0027s fine, because we\u0027re talking about image metadata which is always expected to be strings and we have code which assumes that e.g.\n\n        if instance_type[\u0027memory_mb\u0027] \u003c int(image.get(\u0027min_ram\u0027) or 0):\n            raise exception.InstanceTypeMemoryTooSmall()\n\n\nWhy not just change the values in self.image to strings in the constructor? They don\u0027t ever need to be ints, right?","commit_id":"9d6fb1a0cd362d0f4660bddc81c6294e393f4550"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"39ad205a6fc2b700ddeb4eb8e12ae559cd81defc","unresolved":false,"context_lines":[{"line_number":668,"context_line":"        self.image[\u0027properties\u0027] \u003d \u0027DONTCARE\u0027"},{"line_number":669,"context_line":"        # NOTE(danms): The trip through system_metadata will stringify things"},{"line_number":670,"context_line":"        for key in self.image:"},{"line_number":671,"context_line":"            self.image[key] \u003d str(self.image[key])"},{"line_number":672,"context_line":"        self.assertThat(self.image, matchers.DictMatches(image_meta))"},{"line_number":673,"context_line":""},{"line_number":674,"context_line":"    def test_get_image_meta_no_image_system_meta(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAATH%2F%2FqGk%3D","line":671,"in_reply_to":"AAAATH%2F%2FqIk%3D","updated":"2013-10-11 16:18:26.000000000","message":"But that\u0027s the test lying. If the image API returns them as integers, but we stub it out as returning only strings, we\u0027re just doing it to make our test pass, and not emulating the real environment, right? By my (quick) read of the glance image service code, the metadata comes from a json blob out of the glance response. I\u0027ll go check glance\u0027s API, but that probably means that the above definition of the image response (with integers, not just strings) is what we\u0027d actually get back and what we *should* be stubbing here.","commit_id":"9d6fb1a0cd362d0f4660bddc81c6294e393f4550"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"7850179ea4853bac0f0e460f173223a1b9f97945","unresolved":false,"context_lines":[{"line_number":668,"context_line":"        self.image[\u0027properties\u0027] \u003d \u0027DONTCARE\u0027"},{"line_number":669,"context_line":"        # NOTE(danms): The trip through system_metadata will stringify things"},{"line_number":670,"context_line":"        for key in self.image:"},{"line_number":671,"context_line":"            self.image[key] \u003d str(self.image[key])"},{"line_number":672,"context_line":"        self.assertThat(self.image, matchers.DictMatches(image_meta))"},{"line_number":673,"context_line":""},{"line_number":674,"context_line":"    def test_get_image_meta_no_image_system_meta(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAATH%2F%2FqIk%3D","line":671,"in_reply_to":"AAAATH%2F%2Fqbc%3D","updated":"2013-10-11 16:12:54.000000000","message":"I tried this earlier - change line 610 and 611 to use ints and this test works along with all the other tests","commit_id":"9d6fb1a0cd362d0f4660bddc81c6294e393f4550"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"9073bbc016d42da98617a79c04adc571f4b877be","unresolved":false,"context_lines":[{"line_number":668,"context_line":"        self.image[\u0027properties\u0027] \u003d \u0027DONTCARE\u0027"},{"line_number":669,"context_line":"        # NOTE(danms): The trip through system_metadata will stringify things"},{"line_number":670,"context_line":"        for key in self.image:"},{"line_number":671,"context_line":"            self.image[key] \u003d str(self.image[key])"},{"line_number":672,"context_line":"        self.assertThat(self.image, matchers.DictMatches(image_meta))"},{"line_number":673,"context_line":""},{"line_number":674,"context_line":"    def test_get_image_meta_no_image_system_meta(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAATH%2F%2Fqbc%3D","line":671,"in_reply_to":"AAAATH%2F%2Frs0%3D","updated":"2013-10-11 15:11:42.000000000","message":"I could. My goal with these was to change as little as possible of the existing infrastructure to make sure that I\u0027m not introducing any other issues by going to fields, which will allow us to go back and clean up the massive amount of improper typing we have like this.\n\nI could tuck all of that into this patch, or one before it, but I felt it just confuses the issue at hand.","commit_id":"9d6fb1a0cd362d0f4660bddc81c6294e393f4550"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"bd7d53d7529a70b53b57c3b4f48c7724e29a435f","unresolved":false,"context_lines":[{"line_number":668,"context_line":"        self.image[\u0027properties\u0027] \u003d \u0027DONTCARE\u0027"},{"line_number":669,"context_line":"        # NOTE(danms): The trip through system_metadata will stringify things"},{"line_number":670,"context_line":"        for key in self.image:"},{"line_number":671,"context_line":"            self.image[key] \u003d str(self.image[key])"},{"line_number":672,"context_line":"        self.assertThat(self.image, matchers.DictMatches(image_meta))"},{"line_number":673,"context_line":""},{"line_number":674,"context_line":"    def test_get_image_meta_no_image_system_meta(self):"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAATH%2F%2FqH8%3D","line":671,"updated":"2013-10-11 16:14:10.000000000","message":"I really think we should just make self.image use strings from the start\n\nHappy for it to be a follow-up patch though","commit_id":"4373acfde622f9eba118f372d6a03db3ad7ea1d3"}],"nova/tests/compute/test_resource_tracker.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"5057b463659fdf76f95a60210f5e734180e30bed","unresolved":false,"context_lines":[{"line_number":217,"context_line":"            \u0027key_name\u0027: None,"},{"line_number":218,"context_line":"            \u0027updated_at\u0027: None,"},{"line_number":219,"context_line":"            \u0027cell_name\u0027: None,"},{"line_number":220,"context_line":"            \u0027locked\u0027: False,"},{"line_number":221,"context_line":"            \u0027locked_by\u0027: None,"},{"line_number":222,"context_line":"            \u0027launch_index\u0027: None,"},{"line_number":223,"context_line":"            \u0027architecture\u0027: None,"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAATH%2F%2Frr8%3D","line":220,"updated":"2013-10-11 09:24:52.000000000","message":"I don\u0027t see which test this fixes? Care to explain?","commit_id":"9d6fb1a0cd362d0f4660bddc81c6294e393f4550"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"9073bbc016d42da98617a79c04adc571f4b877be","unresolved":false,"context_lines":[{"line_number":217,"context_line":"            \u0027key_name\u0027: None,"},{"line_number":218,"context_line":"            \u0027updated_at\u0027: None,"},{"line_number":219,"context_line":"            \u0027cell_name\u0027: None,"},{"line_number":220,"context_line":"            \u0027locked\u0027: False,"},{"line_number":221,"context_line":"            \u0027locked_by\u0027: None,"},{"line_number":222,"context_line":"            \u0027launch_index\u0027: None,"},{"line_number":223,"context_line":"            \u0027architecture\u0027: None,"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAATH%2F%2Fqas%3D","line":220,"in_reply_to":"AAAATH%2F%2Frr8%3D","updated":"2013-10-11 15:11:42.000000000","message":"All of the resource_tracker tests that use this low-level object to reconstitute an Instance object. However, this is leftover from before the bool-defaults-to-false-on-none change, so I can remove this now.","commit_id":"9d6fb1a0cd362d0f4660bddc81c6294e393f4550"}],"nova/tests/fake_instance.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"5057b463659fdf76f95a60210f5e734180e30bed","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        if field in db_instance:"},{"line_number":60,"context_line":"            continue"},{"line_number":61,"context_line":"        try:"},{"line_number":62,"context_line":"            db_instance[field] \u003d typefn(None)"},{"line_number":63,"context_line":"        except TypeError:"},{"line_number":64,"context_line":"            db_instance[field] \u003d typefn()"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAATH%2F%2FrvQ%3D","line":62,"updated":"2013-10-11 09:24:52.000000000","message":"Would get\n\n  ValueError: Field `None\u0027 cannot be None\n\ni.e. fields.DictOfStringsField()(None) will throw a ValueError whereas previously dict(None) would have thrown a TypeError and we\u0027d fall back to just dict()\n\nEasiest thing is to just be explicit","commit_id":"9d6fb1a0cd362d0f4660bddc81c6294e393f4550"}]}
