)]}'
{"tuskar_ui/api.py":[{"author":{"_account_id":8648,"name":"Radomir Dopieralski","email":"openstack@dopieralski.pl","username":"thesheep"},"change_message_id":"8304297d201f9a82879870ae77e8e025bc95f225","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        return getattr(self._flavor, name)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    @property"},{"line_number":102,"context_line":"    @memoized.memoized"},{"line_number":103,"context_line":"    def extras_dict(self):"},{"line_number":104,"context_line":"        \"\"\"Return extra parameters of node profile"},{"line_number":105,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAU3%2F%2Fpl8%3D","line":102,"updated":"2014-02-25 13:32:01.000000000","message":"Use a @cached_property from tuskar_ui.cached_property here.","commit_id":"558308412ac6162452b04218050c7f27bfd635d0"},{"author":{"_account_id":8648,"name":"Radomir Dopieralski","email":"openstack@dopieralski.pl","username":"thesheep"},"change_message_id":"8304297d201f9a82879870ae77e8e025bc95f225","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        return self.extras_dict.get(\u0027baremetal:deploy_ramdisk_id\u0027, \u0027\u0027)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"def node_profile_create(request, name, memory, vcpus, disk, cpu_arch,"},{"line_number":125,"context_line":"                        kernel_image_id, ramdisk_image_id):"},{"line_number":126,"context_line":"    extras_dict \u003d {\u0027cpu_arch\u0027: cpu_arch,"},{"line_number":127,"context_line":"                   \u0027baremetal:deploy_kernel_id\u0027: kernel_image_id,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAU3%2F%2Fpls%3D","line":124,"updated":"2014-02-25 13:32:01.000000000","message":"Put that on NodeProfile as a @classmethod","commit_id":"558308412ac6162452b04218050c7f27bfd635d0"},{"author":{"_account_id":8648,"name":"Radomir Dopieralski","email":"openstack@dopieralski.pl","username":"thesheep"},"change_message_id":"f0504938c5952ee677a8a2ae42a2eef1d1d5b378","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        return self.extras_dict.get(\u0027baremetal:deploy_ramdisk_id\u0027, \u0027\u0027)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"def node_profile_create(request, name, memory, vcpus, disk, cpu_arch,"},{"line_number":125,"context_line":"                        kernel_image_id, ramdisk_image_id):"},{"line_number":126,"context_line":"    extras_dict \u003d {\u0027cpu_arch\u0027: cpu_arch,"},{"line_number":127,"context_line":"                   \u0027baremetal:deploy_kernel_id\u0027: kernel_image_id,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAU3%2F%2FpDY%3D","line":124,"in_reply_to":"AAAAU3%2F%2FpPU%3D","updated":"2014-02-25 14:17:14.000000000","message":"Yup, that\u0027s how we have it in all the rest of tuskar_ui.api classes.","commit_id":"558308412ac6162452b04218050c7f27bfd635d0"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e2503994958e589bee1202817019323749de5ad2","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        return self.extras_dict.get(\u0027baremetal:deploy_ramdisk_id\u0027, \u0027\u0027)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"def node_profile_create(request, name, memory, vcpus, disk, cpu_arch,"},{"line_number":125,"context_line":"                        kernel_image_id, ramdisk_image_id):"},{"line_number":126,"context_line":"    extras_dict \u003d {\u0027cpu_arch\u0027: cpu_arch,"},{"line_number":127,"context_line":"                   \u0027baremetal:deploy_kernel_id\u0027: kernel_image_id,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAU3%2F%2FpPU%3D","line":124,"in_reply_to":"AAAAU3%2F%2Fpls%3D","updated":"2014-02-25 14:00:11.000000000","message":"Than I also have to put get, list and delete as @classmethod\u0027s. Which is probably ok, but completly inconsistent with how flavors are currently managed. Is it ok?","commit_id":"558308412ac6162452b04218050c7f27bfd635d0"}],"tuskar_ui/infrastructure/node_profiles/tables.py":[{"author":{"_account_id":8648,"name":"Radomir Dopieralski","email":"openstack@dopieralski.pl","username":"thesheep"},"change_message_id":"1143e4677ee6ef7b8af9ce89688164e5d63a15f6","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    except AttributeError:"},{"line_number":43,"context_line":"        flavor.cached_extra_specs \u003d flavor.get_keys()"},{"line_number":44,"context_line":"        extra_specs \u003d flavor.cached_extra_specs"},{"line_number":45,"context_line":"    return extra_specs.get(key, \u0027\u0027)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"def get_arch(flavor):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAU3%2F%2F2lI%3D","line":45,"updated":"2014-02-24 13:58:41.000000000","message":"Instead of doing your own caching, why not use memoized?","commit_id":"473813fd8346c669370d50af580a2819a7db9058"},{"author":{"_account_id":8648,"name":"Radomir Dopieralski","email":"openstack@dopieralski.pl","username":"thesheep"},"change_message_id":"4a7a9d32ae3c239e2ee3ad229671f1773c1633ce","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"@memoized.memoized"},{"line_number":40,"context_line":"def memoized_extras(flavor):"},{"line_number":41,"context_line":"    return flavor.get_keys()"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"def extras_getter(key):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAU3%2F%2F2Ic%3D","line":41,"updated":"2014-02-24 14:35:15.000000000","message":"At this point it\u0027s hard not to ask why you don\u0027t just put @memoized on the flavor\u0027s get_keys method.","commit_id":"9af86b429e6f99a0bc0efe2e00b9c50cf99999b9"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"3c0b885dce80fceffac5cb2cfcf5e1ab23603153","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"@memoized.memoized"},{"line_number":40,"context_line":"def memoized_extras(flavor):"},{"line_number":41,"context_line":"    return flavor.get_keys()"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"def extras_getter(key):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAU3%2F%2F17A%3D","line":41,"in_reply_to":"AAAAU3%2F%2F1%2FM%3D","updated":"2014-02-24 14:49:12.000000000","message":"While this makes sense, I do think situation with extras needs more thorough discussion. I\u0027d better suggest wrap Flavor for Tuskar and expose all extras as attributes (and transparently call set_keys on update). Again, this deserves a separate patch, as to me","commit_id":"9af86b429e6f99a0bc0efe2e00b9c50cf99999b9"},{"author":{"_account_id":8648,"name":"Radomir Dopieralski","email":"openstack@dopieralski.pl","username":"thesheep"},"change_message_id":"701fc3ee358150d37c66d632d2b20a815d0830ef","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"@memoized.memoized"},{"line_number":40,"context_line":"def memoized_extras(flavor):"},{"line_number":41,"context_line":"    return flavor.get_keys()"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"def extras_getter(key):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAU3%2F%2F1vg%3D","line":41,"in_reply_to":"AAAAU3%2F%2F17A%3D","updated":"2014-02-24 15:04:12.000000000","message":"I agree completely.","commit_id":"9af86b429e6f99a0bc0efe2e00b9c50cf99999b9"},{"author":{"_account_id":8648,"name":"Radomir Dopieralski","email":"openstack@dopieralski.pl","username":"thesheep"},"change_message_id":"5044c19f31506f795d1ccf778e4700da54403500","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"@memoized.memoized"},{"line_number":40,"context_line":"def memoized_extras(flavor):"},{"line_number":41,"context_line":"    return flavor.get_keys()"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"def extras_getter(key):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAU3%2F%2F1%2FM%3D","line":41,"in_reply_to":"AAAAU3%2F%2F2GM%3D","updated":"2014-02-24 14:45:23.000000000","message":"You are right, I didn\u0027t notice you are calling novaclient directly here, I assumed it\u0027s in tuskar_ui.api. Maybe we should wrap it there?","commit_id":"9af86b429e6f99a0bc0efe2e00b9c50cf99999b9"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"2acbe2f7c0f07687f88565be56e2930d0e2142ca","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"@memoized.memoized"},{"line_number":40,"context_line":"def memoized_extras(flavor):"},{"line_number":41,"context_line":"    return flavor.get_keys()"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"def extras_getter(key):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAU3%2F%2F2GM%3D","line":41,"in_reply_to":"AAAAU3%2F%2F2Ic%3D","updated":"2014-02-24 14:38:50.000000000","message":"Do you suggest patching novaclient for this? Maybe but it\u0027s beyond the scope of this patch.","commit_id":"9af86b429e6f99a0bc0efe2e00b9c50cf99999b9"}],"tuskar_ui/infrastructure/node_profiles/tests.py":[{"author":{"_account_id":8648,"name":"Radomir Dopieralski","email":"openstack@dopieralski.pl","username":"thesheep"},"change_message_id":"8304297d201f9a82879870ae77e8e025bc95f225","unresolved":false,"context_lines":[{"line_number":53,"context_line":"            patch(\u0027openstack_dashboard.api.nova.flavor_list\u0027,"},{"line_number":54,"context_line":"                  return_value\u003dTEST_DATA.novaclient_flavors.list()),"},{"line_number":55,"context_line":"    ) as mocks:"},{"line_number":56,"context_line":"            yield mocks[0], data"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"class NodeProfilesTest(test.BaseAdminViewTests):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAU3%2F%2Fpk4%3D","line":56,"updated":"2014-02-25 13:32:01.000000000","message":"if you don\u0027t use it, why do you return it?","commit_id":"558308412ac6162452b04218050c7f27bfd635d0"},{"author":{"_account_id":8648,"name":"Radomir Dopieralski","email":"openstack@dopieralski.pl","username":"thesheep"},"change_message_id":"f0504938c5952ee677a8a2ae42a2eef1d1d5b378","unresolved":false,"context_lines":[{"line_number":53,"context_line":"            patch(\u0027openstack_dashboard.api.nova.flavor_list\u0027,"},{"line_number":54,"context_line":"                  return_value\u003dTEST_DATA.novaclient_flavors.list()),"},{"line_number":55,"context_line":"    ) as mocks:"},{"line_number":56,"context_line":"            yield mocks[0], data"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"class NodeProfilesTest(test.BaseAdminViewTests):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAU3%2F%2FpDE%3D","line":56,"in_reply_to":"AAAAU3%2F%2FpP0%3D","updated":"2014-02-25 14:17:14.000000000","message":"Ah, ok, sorry, I missed it.","commit_id":"558308412ac6162452b04218050c7f27bfd635d0"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e2503994958e589bee1202817019323749de5ad2","unresolved":false,"context_lines":[{"line_number":53,"context_line":"            patch(\u0027openstack_dashboard.api.nova.flavor_list\u0027,"},{"line_number":54,"context_line":"                  return_value\u003dTEST_DATA.novaclient_flavors.list()),"},{"line_number":55,"context_line":"    ) as mocks:"},{"line_number":56,"context_line":"            yield mocks[0], data"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"class NodeProfilesTest(test.BaseAdminViewTests):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAU3%2F%2FpP0%3D","line":56,"in_reply_to":"AAAAU3%2F%2Fpk4%3D","updated":"2014-02-25 14:00:11.000000000","message":"mocks[0]? See test_create_post_ok","commit_id":"558308412ac6162452b04218050c7f27bfd635d0"},{"author":{"_account_id":8648,"name":"Radomir Dopieralski","email":"openstack@dopieralski.pl","username":"thesheep"},"change_message_id":"f0504938c5952ee677a8a2ae42a2eef1d1d5b378","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def test_create_post_name_exists(self):"},{"line_number":92,"context_line":"        flavor \u003d TEST_DATA.novaclient_flavors.first()"},{"line_number":93,"context_line":"        with _prepare_create() as (_, data):"},{"line_number":94,"context_line":"            data[\u0027name\u0027] \u003d flavor.name"},{"line_number":95,"context_line":"            res \u003d self.client.post(CREATE_URL, data)"},{"line_number":96,"context_line":"            self.assertFormErrors(res)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAU3%2F%2FpCo%3D","line":93,"updated":"2014-02-25 14:17:14.000000000","message":"maybe use _create_mock and avoid potentially shadowing gettext","commit_id":"558308412ac6162452b04218050c7f27bfd635d0"}],"tuskar_ui/infrastructure/node_profiles/views.py":[{"author":{"_account_id":8399,"name":"Jay Dobies","email":"jason.dobies@redhat.com","username":"jdob"},"change_message_id":"e14a10f79d8f457bf18e7e51acd1e1b1437545df","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        except Exception:"},{"line_number":36,"context_line":"            exceptions.handle(self.request,"},{"line_number":37,"context_line":"                              _(\u0027Unable to retrieve node profile list.\u0027))"},{"line_number":38,"context_line":"        node_profiles.sort(key\u003dlambda np: (np.vcpus, np.ram, np.disk))"},{"line_number":39,"context_line":"        return node_profiles"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAU3%2F%2Fk98%3D","line":38,"updated":"2014-02-25 20:46:51.000000000","message":"My understanding of the handle() method is that it will not raise an exception, in which case node_profiles will be uninitialized here and will raise an error when trying to sort it.\n\nThe common pattern seems to be in the except block to default it to the empty version of whatever type you\u0027re expecting ([] in this case).","commit_id":"0eaf102fd43bc894c1781ca45f2b01d4b627d82d"}],"tuskar_ui/infrastructure/node_profiles/workflows.py":[{"author":{"_account_id":8399,"name":"Jay Dobies","email":"jason.dobies@redhat.com","username":"jdob"},"change_message_id":"e14a10f79d8f457bf18e7e51acd1e1b1437545df","unresolved":false,"context_lines":[{"line_number":45,"context_line":"            )[0]"},{"line_number":46,"context_line":"        except Exception:"},{"line_number":47,"context_line":"            exceptions.handle(self.request,"},{"line_number":48,"context_line":"                              _(\u0027Unable to retrieve images list.\u0027))"},{"line_number":49,"context_line":"        self.fields[\u0027kernel_image_id\u0027].choices \u003d [(img.id, img.name)"},{"line_number":50,"context_line":"                                                  for img in kernel_images]"},{"line_number":51,"context_line":"        self.fields[\u0027ramdisk_image_id\u0027].choices \u003d [(img.id, img.name)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAU3%2F%2Fk9U%3D","line":48,"updated":"2014-02-25 20:46:51.000000000","message":"Same as my other comment, I\u0027m pretty sure this will continue on past the except block, in which case your subsequent calls to iterate over kernel_images and ramdisk_images will fail.","commit_id":"0eaf102fd43bc894c1781ca45f2b01d4b627d82d"},{"author":{"_account_id":8399,"name":"Jay Dobies","email":"jason.dobies@redhat.com","username":"jdob"},"change_message_id":"e14a10f79d8f457bf18e7e51acd1e1b1437545df","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            )"},{"line_number":101,"context_line":"        except Exception:"},{"line_number":102,"context_line":"            exceptions.handle(request, _(\"Unable to create node profile\"))"},{"line_number":103,"context_line":"            return False"},{"line_number":104,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAU3%2F%2Fk88%3D","line":103,"updated":"2014-02-25 20:46:51.000000000","message":"This further makes me think my other points are correct. If handle() raised an exception, this return wouldn\u0027t be necessary.","commit_id":"0eaf102fd43bc894c1781ca45f2b01d4b627d82d"}]}
