)]}'
{"nova/image/glance.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1cae4c6d8a85d6b76105e1895574523b463ea619","unresolved":false,"context_lines":[{"line_number":618,"context_line":"        # doesn\u0027t allow this hack - we have to send an upload request with"},{"line_number":619,"context_line":"        # empty data."},{"line_number":620,"context_line":"        force_activate \u003d data is None and image_meta.get(\u0027size\u0027) \u003d\u003d 0"},{"line_number":621,"context_line":""},{"line_number":622,"context_line":"        sent_service_image_meta \u003d _translate_to_glance(image_meta)"},{"line_number":623,"context_line":""},{"line_number":624,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a8bc5a2_2d51dd36","line":621,"updated":"2016-09-24 17:05:38.000000000","message":"oops","commit_id":"b8ac1966c21772e219711056978d6b22685cda73"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"769e60c595b3fbb27984d2f6efc1dbd421c0039a","unresolved":false,"context_lines":[{"line_number":645,"context_line":"        \"\"\"Gets an acceptable default image disk_format based on the schema."},{"line_number":646,"context_line":"        \"\"\""},{"line_number":647,"context_line":"        # get the image schema"},{"line_number":648,"context_line":"        image_schema \u003d self._client.schemas.get(\u0027image\u0027)"},{"line_number":649,"context_line":"        # These preferred disk formats are in order:"},{"line_number":650,"context_line":"        # 1. we want qcow2 if possible (at least for backward compat)"},{"line_number":651,"context_line":"        # 2. raw should be universally accepted"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a8bc5a2_0db8a1c7","line":648,"updated":"2016-09-24 16:17:59.000000000","message":"Blarg:\n\nhttp://logs.openstack.org/75/375875/1/check/gate-tempest-dsvm-neutron-full-ubuntu-xenial/3503a29/logs/screen-n-api.txt.gz?level\u003dTRACE#_2016-09-24_16_03_04_247","commit_id":"b8ac1966c21772e219711056978d6b22685cda73"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"63ba1b3c566efb7859ebc75d933c3fd244d860c9","unresolved":false,"context_lines":[{"line_number":650,"context_line":"        # 1. we want qcow2 if possible (at least for backward compat)"},{"line_number":651,"context_line":"        # 2. raw should be universally accepted"},{"line_number":652,"context_line":"        # 3. vhd/vmdk are preferred for xenapi/vmware, respectively"},{"line_number":653,"context_line":"        preferred_disk_formats \u003d (\u0027qcow2\u0027, \u0027raw\u0027, \u0027vhd\u0027, \u0027vmdk\u0027)"},{"line_number":654,"context_line":"        # get the disk_format schema property from the raw schema"},{"line_number":655,"context_line":"        # FIXME(mriedem): glanceclient\u0027s SchemaProperty object does not store"},{"line_number":656,"context_line":"        # the valid enums so we can\u0027t use image_schema.properties, we need to"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a8bc5a2_4d81c9c2","line":653,"updated":"2016-09-24 16:39:43.000000000","message":"BobBall suggested we move \u0027raw\u0027 to the end since that should be universally accepted by all virt drivers, which would give vhd and vmdk a chance for preferred formats for xen/hyperv/vmware.","commit_id":"b8ac1966c21772e219711056978d6b22685cda73"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"b1035a3f903c2cfcbf0faf7fe010793fe3309a18","unresolved":false,"context_lines":[{"line_number":656,"context_line":"        # the valid enums so we can\u0027t use image_schema.properties, we need to"},{"line_number":657,"context_line":"        # fix that so we\u0027re not using the internal _raw_schema attribute."},{"line_number":658,"context_line":"        disk_format_schema \u003d ("},{"line_number":659,"context_line":"            image_schema._raw_schema[\u0027properties\u0027].get(\u0027disk_format\u0027)"},{"line_number":660,"context_line":"        )"},{"line_number":661,"context_line":"        if disk_format_schema:"},{"line_number":662,"context_line":"            supported_disk_formats \u003d disk_format_schema[\u0027enum\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a8bc5a2_adf88dc4","line":659,"range":{"start_line":659,"start_character":12,"end_line":659,"end_character":36},"updated":"2016-09-24 15:41:37.000000000","message":"you can simply use image_schema.raw() rather than this priv method\n\nhttps://github.com/openstack/python-glanceclient/blob/2.5.0/glanceclient/v2/schemas.py#L114","commit_id":"b8ac1966c21772e219711056978d6b22685cda73"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1cae4c6d8a85d6b76105e1895574523b463ea619","unresolved":false,"context_lines":[{"line_number":656,"context_line":"        # the valid enums so we can\u0027t use image_schema.properties, we need to"},{"line_number":657,"context_line":"        # fix that so we\u0027re not using the internal _raw_schema attribute."},{"line_number":658,"context_line":"        disk_format_schema \u003d ("},{"line_number":659,"context_line":"            image_schema._raw_schema[\u0027properties\u0027].get(\u0027disk_format\u0027)"},{"line_number":660,"context_line":"        )"},{"line_number":661,"context_line":"        if disk_format_schema:"},{"line_number":662,"context_line":"            supported_disk_formats \u003d disk_format_schema[\u0027enum\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a8bc5a2_cd56b929","line":659,"range":{"start_line":659,"start_character":12,"end_line":659,"end_character":36},"in_reply_to":"5a8bc5a2_adf88dc4","updated":"2016-09-24 17:05:38.000000000","message":"Oh nice, I totally missed that.","commit_id":"b8ac1966c21772e219711056978d6b22685cda73"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"53ecc8309f619e564116fe1ed14db8089b7a6292","unresolved":false,"context_lines":[{"line_number":679,"context_line":"            LOG.warning(_LW(\u0027Unable to determine disk_format schema from the \u0027"},{"line_number":680,"context_line":"                            \u0027Image Service v2 API. Defaulting to \u0027"},{"line_number":681,"context_line":"                            \u0027%(preferred_disk_format)s.\u0027),"},{"line_number":682,"context_line":"                        {\u0027preferred_disk_format\u0027: preferred_disk_formats[0]})"},{"line_number":683,"context_line":""},{"line_number":684,"context_line":"    def _create_v2(self, context, sent_service_image_meta, data\u003dNone,"},{"line_number":685,"context_line":"                   force_activate\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a8bc5a2_cd5319e1","line":682,"updated":"2016-09-24 15:33:54.000000000","message":"oops need to return preferred_disk_formats[0] here","commit_id":"b8ac1966c21772e219711056978d6b22685cda73"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3e209a00524221a0cd005c6b2ef191665b552144","unresolved":false,"context_lines":[{"line_number":138,"context_line":"                                                     endpoint,"},{"line_number":139,"context_line":"                                                     version)"},{"line_number":140,"context_line":"        else:"},{"line_number":141,"context_line":"            self.client \u003d None"},{"line_number":142,"context_line":"        self.api_servers \u003d None"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def _create_static_client(self, context, endpoint, version):"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a8bc5a2_d09d7267","line":141,"updated":"2016-09-24 19:01:05.000000000","message":"So I guess client could be None from this.","commit_id":"d28c15bec738bd90acf079f0de6e665e46b089a8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3e209a00524221a0cd005c6b2ef191665b552144","unresolved":false,"context_lines":[{"line_number":169,"context_line":"        num_attempts \u003d retries + 1"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"        for attempt in range(1, num_attempts + 1):"},{"line_number":172,"context_line":"            client \u003d self.client or self._create_onetime_client(context,"},{"line_number":173,"context_line":"                                                                version)"},{"line_number":174,"context_line":"            try:"},{"line_number":175,"context_line":"                result \u003d getattr(client.images, method)(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a8bc5a2_f09a6e6d","line":172,"updated":"2016-09-24 19:01:05.000000000","message":"And here when doing a call we might have to create a onetime client...so I probably need to do the same.","commit_id":"d28c15bec738bd90acf079f0de6e665e46b089a8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3e209a00524221a0cd005c6b2ef191665b552144","unresolved":false,"context_lines":[{"line_number":648,"context_line":"        # get the image schema - note we don\u0027t cache this value since it could"},{"line_number":649,"context_line":"        # change under us."},{"line_number":650,"context_line":"        if isinstance(self._client, GlanceClientWrapper):"},{"line_number":651,"context_line":"            image_schema \u003d self._client.client.schemas.get(\u0027image\u0027)"},{"line_number":652,"context_line":"        else:"},{"line_number":653,"context_line":"            # straight up glanceclient.v2.client.Client object?"},{"line_number":654,"context_line":"            image_schema \u003d self._client.schemas.get(\u0027image\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a8bc5a2_70ae5e99","line":651,"range":{"start_line":651,"start_character":32,"end_line":651,"end_character":46},"updated":"2016-09-24 19:01:05.000000000","message":"Hmm, _client.client is None for some reason.","commit_id":"d28c15bec738bd90acf079f0de6e665e46b089a8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ce6328398cd40617715b3f51106435671801811d","unresolved":false,"context_lines":[{"line_number":671,"context_line":"        )"},{"line_number":672,"context_line":"        if disk_format_schema:"},{"line_number":673,"context_line":"            supported_disk_formats \u003d disk_format_schema[\u0027enum\u0027]"},{"line_number":674,"context_line":"            # if there is only one option, use that"},{"line_number":675,"context_line":"            if len(supported_disk_formats) \u003d\u003d 1:"},{"line_number":676,"context_line":"                disk_format \u003d supported_disk_formats[0]"},{"line_number":677,"context_line":"                LOG.debug(\u0027The Image Service v2 API only supports a single \u0027"},{"line_number":678,"context_line":"                          \u0027disk_format for images: %s\u0027, disk_format)"},{"line_number":679,"context_line":"                return disk_format"},{"line_number":680,"context_line":"            # try a priority ordered list"},{"line_number":681,"context_line":"            for preferred_format in preferred_disk_formats:"},{"line_number":682,"context_line":"                if preferred_format in supported_disk_formats:"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a8bc5a2_30c3f6ee","line":679,"range":{"start_line":674,"start_character":12,"end_line":679,"end_character":34},"updated":"2016-09-24 20:00:03.000000000","message":"We probably don\u0027t need this, the priority order will do the same, as will the last resort case below.","commit_id":"1f03abc91aa73347f8a6bd28d1f884546c81c744"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"85e11b3395486c720884be8bae7f3b9fbd3d7f7c","unresolved":false,"context_lines":[{"line_number":659,"context_line":"            fields.DiskFormat.RAW,"},{"line_number":660,"context_line":"        )"},{"line_number":661,"context_line":""},{"line_number":662,"context_line":"        # Get the image schema - note we don\u0027t cache this value since it could"},{"line_number":663,"context_line":"        # change under us. This looks a bit funky, but what it\u0027s basically"},{"line_number":664,"context_line":"        # doing is calling glanceclient.v2.Client.schemas.get(\u0027image\u0027)."},{"line_number":665,"context_line":"        image_schema \u003d self._client.call(context, 2, \u0027get\u0027, \u0027image\u0027,"},{"line_number":666,"context_line":"                                         controller\u003d\u0027schemas\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a8bc5a2_c4ae7d80","line":663,"range":{"start_line":662,"start_character":37,"end_line":663,"end_character":25},"updated":"2016-09-26 08:58:59.000000000","message":"Could we do something that resets the cache on SIG_HUP, like for other things:\nhttps://github.com/openstack/nova/blob/master/nova/compute/manager.py#L540\n\nHaving said that, better to add this fix, and follow up with caching.","commit_id":"2fe5daeb5fcd2750b0eb083fc5c8bfd3fdb992e2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a402bf9fe8177400f503175bde91978b4ca740aa","unresolved":false,"context_lines":[{"line_number":659,"context_line":"            fields.DiskFormat.RAW,"},{"line_number":660,"context_line":"        )"},{"line_number":661,"context_line":""},{"line_number":662,"context_line":"        # Get the image schema - note we don\u0027t cache this value since it could"},{"line_number":663,"context_line":"        # change under us. This looks a bit funky, but what it\u0027s basically"},{"line_number":664,"context_line":"        # doing is calling glanceclient.v2.Client.schemas.get(\u0027image\u0027)."},{"line_number":665,"context_line":"        image_schema \u003d self._client.call(context, 2, \u0027get\u0027, \u0027image\u0027,"},{"line_number":666,"context_line":"                                         controller\u003d\u0027schemas\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a8bc5a2_0e7f8e66","line":663,"range":{"start_line":662,"start_character":37,"end_line":663,"end_character":25},"in_reply_to":"5a8bc5a2_c4ae7d80","updated":"2016-09-26 13:53:09.000000000","message":"I\u0027d rather optimize in a follow up since this is something that should get into newton-rc2 and I don\u0027t really want to add that complexity here.","commit_id":"2fe5daeb5fcd2750b0eb083fc5c8bfd3fdb992e2"}],"nova/tests/unit/image/test_glance.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"85e11b3395486c720884be8bae7f3b9fbd3d7f7c","unresolved":false,"context_lines":[{"line_number":2122,"context_line":"        mock_client.call.return_value \u003d test_schema"},{"line_number":2123,"context_line":"        service \u003d glance.GlanceImageServiceV2(mock_client)"},{"line_number":2124,"context_line":"        disk_format \u003d service._get_image_create_disk_format_default("},{"line_number":2125,"context_line":"            mock.sentinel.ctx)"},{"line_number":2126,"context_line":"        self.assertEqual(expected_disk_format, disk_format)"},{"line_number":2127,"context_line":"        mock_client.call.assert_called_once_with("},{"line_number":2128,"context_line":"            mock.sentinel.ctx, 2, \u0027get\u0027, \u0027image\u0027, controller\u003d\u0027schemas\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a8bc5a2_e4e0d9fc","line":2125,"updated":"2016-09-26 08:58:59.000000000","message":"Micro Nit: I love a line space either side of the method under test, but thats just me.","commit_id":"2fe5daeb5fcd2750b0eb083fc5c8bfd3fdb992e2"}]}
