)]}'
{"nova/cmd/manage.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"d24f19ce0ab758cd6c478a7b46c61b6bfaaf1708","unresolved":false,"context_lines":[{"line_number":490,"context_line":"    def _check_network_api_class(self):"},{"line_number":491,"context_line":"        if CONF.network_api_class \u003d\u003d \"nova.network.neutronv2.api.API\":"},{"line_number":492,"context_line":"            print(_(\"Network commands are not supported with Quantum V2 \""},{"line_number":493,"context_line":"                    \"API.  Please use the quantum client.\"))"},{"line_number":494,"context_line":"            raise exception.NovaException"},{"line_number":495,"context_line":""},{"line_number":496,"context_line":"    @args(\u0027--label\u0027, metavar\u003d\u0027\u003clabel\u003e\u0027, help\u003d\u0027Label for network (ex: public)\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAW3%2F%2FiUg%3D","line":493,"updated":"2014-04-13 14:12:49.000000000","message":"s/Quantum/Neutron/g","commit_id":"4eca7d947ca645364e0caa73280f6c2762d04a0f"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"24a457cef4eb9ffa3e6d85ce2d9fd311137c1eca","unresolved":false,"context_lines":[{"line_number":491,"context_line":"        if CONF.network_api_class \u003d\u003d \"nova.network.neutronv2.api.API\":"},{"line_number":492,"context_line":"            print(_(\"Network commands are not supported with Neutron V2 \""},{"line_number":493,"context_line":"                    \"API.  Please use the neutron client.\"))"},{"line_number":494,"context_line":"            raise exception.NovaException"},{"line_number":495,"context_line":""},{"line_number":496,"context_line":"    @args(\u0027--label\u0027, metavar\u003d\u0027\u003clabel\u003e\u0027, help\u003d\u0027Label for network (ex: public)\u0027)"},{"line_number":497,"context_line":"    @args(\u0027--fixed_range_v4\u0027, dest\u003d\u0027cidr\u0027, metavar\u003d\u0027\u003cx.x.x.x/yy\u003e\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAW3%2F%2FWqQ%3D","line":494,"updated":"2014-04-15 07:55:18.000000000","message":"When this exception happens, the console message is like the following:\n\n $ nova-manage network list\n Network commands are not supported with Neutron V2 API.  Please use the neutron client.\n Command failed, please check log for more info\n 2014-04-15 16:48:26.337 CRITICAL nova [-] NovaException: An unknown exception occurred.\n \n 2014-04-15 16:48:26.337 TRACE nova Traceback (most recent call last):\n 2014-04-15 16:48:26.337 TRACE nova   File \"/usr/local/bin/nova-manage\", line 10, in \u003cmodule\u003e\n 2014-04-15 16:48:26.337 TRACE nova     sys.exit(main())\n 2014-04-15 16:48:26.337 TRACE nova   File \"/opt/stack/nova/nova/cmd/manage.py\", line 1387, in main\n 2014-04-15 16:48:26.337 TRACE nova     ret \u003d fn(*fn_args, **fn_kwargs)\n 2014-04-15 16:48:26.337 TRACE nova   File \"/opt/stack/nova/nova/cmd/manage.py\", line 541, in list\n 2014-04-15 16:48:26.337 TRACE nova     self._check_network_api_class()\n 2014-04-15 16:48:26.337 TRACE nova   File \"/opt/stack/nova/nova/cmd/manage.py\", line 495, in _check_network_api_class\n 2014-04-15 16:48:26.337 TRACE nova     raise exception.NovaException\n 2014-04-15 16:48:26.337 TRACE nova NovaException: An unknown exception occurred.\n 2014-04-15 16:48:26.337 TRACE nova\n $\n\nThis message is a little overkill and important message(Network commands are not supported with Neutron V2 API.  Please use the neutron client.) becomes unclear due to many lines.\n\nSo how about replacing \"raise exception.NovaException\" with exit(1) like _db_error()?","commit_id":"35393edab82f359cde3aa070ed13ca6d3a0bbac7"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6b602fa16518908822aaac8d587cc36d5aa973c7","unresolved":false,"context_lines":[{"line_number":491,"context_line":"        if CONF.network_api_class \u003d\u003d \"nova.network.neutronv2.api.API\":"},{"line_number":492,"context_line":"            print(_(\"Network commands are not supported with Neutron V2 \""},{"line_number":493,"context_line":"                    \"API.  Please use the neutron client.\"))"},{"line_number":494,"context_line":"            raise exception.NovaException"},{"line_number":495,"context_line":""},{"line_number":496,"context_line":"    @args(\u0027--label\u0027, metavar\u003d\u0027\u003clabel\u003e\u0027, help\u003d\u0027Label for network (ex: public)\u0027)"},{"line_number":497,"context_line":"    @args(\u0027--fixed_range_v4\u0027, dest\u003d\u0027cidr\u0027, metavar\u003d\u0027\u003cx.x.x.x/yy\u003e\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAW3%2F%2FSz0%3D","line":494,"in_reply_to":"AAAAW3%2F%2FTkE%3D","updated":"2014-04-15 14:25:53.000000000","message":"Yeah, but dumping exceptions to the console in a non-debug scenario is ugly. +1 for a nice error message, if it\u0027s easily doable.","commit_id":"35393edab82f359cde3aa070ed13ca6d3a0bbac7"},{"author":{"_account_id":1004,"name":"Mohammed Naser","email":"mnaser@vexxhost.com","username":"mnaser"},"change_message_id":"a07f41dd3b203abaf47a6aa819c3d30388307d40","unresolved":false,"context_lines":[{"line_number":491,"context_line":"        if CONF.network_api_class \u003d\u003d \"nova.network.neutronv2.api.API\":"},{"line_number":492,"context_line":"            print(_(\"Network commands are not supported with Neutron V2 \""},{"line_number":493,"context_line":"                    \"API.  Please use the neutron client.\"))"},{"line_number":494,"context_line":"            raise exception.NovaException"},{"line_number":495,"context_line":""},{"line_number":496,"context_line":"    @args(\u0027--label\u0027, metavar\u003d\u0027\u003clabel\u003e\u0027, help\u003d\u0027Label for network (ex: public)\u0027)"},{"line_number":497,"context_line":"    @args(\u0027--fixed_range_v4\u0027, dest\u003d\u0027cidr\u0027, metavar\u003d\u0027\u003cx.x.x.x/yy\u003e\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAW3%2F%2FTkE%3D","line":494,"in_reply_to":"AAAAW3%2F%2FWqQ%3D","updated":"2014-04-15 13:18:28.000000000","message":"I didn\u0027t see any functions that followed that pattern, as well as there are a few other points that raised Exceptions to quit:\n\nhttps://github.com/openstack/nova/blob/master/nova/cmd/manage.py#L391\nhttps://github.com/openstack/nova/blob/master/nova/cmd/manage.py#L568\n\netc.","commit_id":"35393edab82f359cde3aa070ed13ca6d3a0bbac7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"80859a525620393d0ea84664d6a873e3edbbb97f","unresolved":false,"context_lines":[{"line_number":490,"context_line":""},{"line_number":491,"context_line":"    def _using_valid_network_api_class(self):"},{"line_number":492,"context_line":"        if utils.is_neutron():"},{"line_number":493,"context_line":"            print(_(\"Network commands are not supported with Neutron V2 \""},{"line_number":494,"context_line":"                    \"API.  Please use the neutron client.\"))"},{"line_number":495,"context_line":"            return False"},{"line_number":496,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2FRoc%3D","line":493,"updated":"2014-04-15 16:11:20.000000000","message":"Do we need to say \"V2\"?  If there is a Neutron V3 API at some point will we have to update this for clarity?  Can\u0027t we just say it\u0027s not supported with Neutron?","commit_id":"e8d1087d9227e5a9ca15facea39945773a16d51e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"80859a525620393d0ea84664d6a873e3edbbb97f","unresolved":false,"context_lines":[{"line_number":491,"context_line":"    def _using_valid_network_api_class(self):"},{"line_number":492,"context_line":"        if utils.is_neutron():"},{"line_number":493,"context_line":"            print(_(\"Network commands are not supported with Neutron V2 \""},{"line_number":494,"context_line":"                    \"API.  Please use the neutron client.\"))"},{"line_number":495,"context_line":"            return False"},{"line_number":496,"context_line":"        return True"},{"line_number":497,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAW3%2F%2FRoQ%3D","line":494,"updated":"2014-04-15 16:11:20.000000000","message":"I\u0027d change \"Please use the neutron client.\" to \"Use python-neutronclient instead.\"  Just a suggestion.","commit_id":"e8d1087d9227e5a9ca15facea39945773a16d51e"}],"nova/tests/test_nova_manage.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ee11dfd9ccebde6f11b128256ab4ff2901dabd3f","unresolved":false,"context_lines":[{"line_number":292,"context_line":""},{"line_number":293,"context_line":"    def tearDown(self):"},{"line_number":294,"context_line":"        super(NeutronV2NetworkCommandsTestCase, self).tearDown()"},{"line_number":295,"context_line":"        utils.reset_is_neutron()"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    def test_create(self):"},{"line_number":298,"context_line":"        self.assertTrue(self.commands.create() \u003d\u003d 1)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAW3%2F%2FQmw%3D","line":295,"updated":"2014-04-15 18:03:24.000000000","message":"Is this really necessary if it happens in setup each time?","commit_id":"4201ee61428e19f710618f18d6b5286c67972e02"},{"author":{"_account_id":1004,"name":"Mohammed Naser","email":"mnaser@vexxhost.com","username":"mnaser"},"change_message_id":"5980a581145db144c9386bdaed23dc7ccdc4e568","unresolved":false,"context_lines":[{"line_number":292,"context_line":""},{"line_number":293,"context_line":"    def tearDown(self):"},{"line_number":294,"context_line":"        super(NeutronV2NetworkCommandsTestCase, self).tearDown()"},{"line_number":295,"context_line":"        utils.reset_is_neutron()"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    def test_create(self):"},{"line_number":298,"context_line":"        self.assertTrue(self.commands.create() \u003d\u003d 1)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAW3%2F%2FQlM%3D","line":295,"in_reply_to":"AAAAW3%2F%2FQmw%3D","updated":"2014-04-15 18:09:07.000000000","message":"The reason I put this here is that if for some reason the other tests decide to run *after* the last one has completed, they would all fail because utils.is_neutron will always be returning True (the result of is_neutron is cached as a global, which resulted in failures earlier).\n\nhttps://github.com/openstack/nova/blob/master/nova/utils.py#L1049","commit_id":"4201ee61428e19f710618f18d6b5286c67972e02"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ee11dfd9ccebde6f11b128256ab4ff2901dabd3f","unresolved":false,"context_lines":[{"line_number":295,"context_line":"        utils.reset_is_neutron()"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    def test_create(self):"},{"line_number":298,"context_line":"        self.assertTrue(self.commands.create() \u003d\u003d 1)"},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"    def test_list(self):"},{"line_number":301,"context_line":"        self.assertTrue(self.commands.list() \u003d\u003d 1)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAW3%2F%2FQm8%3D","line":298,"updated":"2014-04-15 18:03:24.000000000","message":"Use assertEqual, not assertTrue for better output.","commit_id":"4201ee61428e19f710618f18d6b5286c67972e02"},{"author":{"_account_id":1004,"name":"Mohammed Naser","email":"mnaser@vexxhost.com","username":"mnaser"},"change_message_id":"5980a581145db144c9386bdaed23dc7ccdc4e568","unresolved":false,"context_lines":[{"line_number":295,"context_line":"        utils.reset_is_neutron()"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    def test_create(self):"},{"line_number":298,"context_line":"        self.assertTrue(self.commands.create() \u003d\u003d 1)"},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"    def test_list(self):"},{"line_number":301,"context_line":"        self.assertTrue(self.commands.list() \u003d\u003d 1)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAW3%2F%2FQkk%3D","line":298,"in_reply_to":"AAAAW3%2F%2FQm8%3D","updated":"2014-04-15 18:09:07.000000000","message":"Done","commit_id":"4201ee61428e19f710618f18d6b5286c67972e02"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"83ea2fcfd877956dad6a703f84b112a9bb070b5b","unresolved":false,"context_lines":[{"line_number":292,"context_line":""},{"line_number":293,"context_line":"    def tearDown(self):"},{"line_number":294,"context_line":"        super(NeutronV2NetworkCommandsTestCase, self).tearDown()"},{"line_number":295,"context_line":"        utils.reset_is_neutron()"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    def test_create(self):"},{"line_number":298,"context_line":"        self.assertEqual(self.commands.create(), 1)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAW3%2F%2FQfU%3D","line":295,"updated":"2014-04-15 18:18:51.000000000","message":"Pretty sure we don\u0027t need this, see other tests that are calling this.","commit_id":"e2263f5d4640ea159dc34e5c091e09db44527d42"}]}
