)]}'
{"novaclient/shell.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"26e0583ab6fd1bcbe6bdb0aa9582ab48243a5e68","unresolved":false,"context_lines":[{"line_number":196,"context_line":"        # Only emit the deprecation warning once per option"},{"line_number":197,"context_line":"        if option_string not in self.emitted:"},{"line_number":198,"context_line":"            if self.use:"},{"line_number":199,"context_line":"                # Check to see if it\u0027s a deprecated option or argument by"},{"line_number":200,"context_line":"                # checking to see if option_string is set."},{"line_number":201,"context_line":"                if option_string is None:"},{"line_number":202,"context_line":"                    msg \u003d _(\u0027WARNING: Argument \"%(name)s\" is deprecated; \u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f201791_c7f497f3","line":199,"updated":"2017-06-27 23:19:54.000000000","message":"crap need to remove all of this","commit_id":"a4e1d3cba98fc2b4f2890773c466e9a3b3468816"}],"novaclient/v2/shell.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"15a3536246110e376db602768d0373c066c4b2a4","unresolved":false,"context_lines":[{"line_number":3423,"context_line":"# TODO(mriedem): Eventually just hard-code the binary to \"nova-compute\"."},{"line_number":3424,"context_line":"@utils.arg(\u0027binary\u0027, metavar\u003d\u0027\u003cbinary\u003e\u0027, action\u003dshell.DeprecatedAction,"},{"line_number":3425,"context_line":"           help\u003d_(\u0027Service binary. Note that nova-compute is the only binary \u0027"},{"line_number":3426,"context_line":"                  \u0027that should be enabled.\u0027))"},{"line_number":3427,"context_line":"def do_service_enable(cs, args):"},{"line_number":3428,"context_line":"    \"\"\"Enable the service.\"\"\""},{"line_number":3429,"context_line":"    result \u003d cs.services.enable(args.host, args.binary)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f201791_eebe9eb2","line":3426,"updated":"2017-06-25 14:32:13.000000000","message":"Why don\u0027t we go ahead and set \"nargs\u003d\u0027?\u0027\" and \"default\u003d\u0027nova-compute\u0027\" now?  Also, I suggest using \"use\u003d\" for the note, and maybe make the note say something like, \u0027Note: The only meaningful binary is \"nova-compute\".\u0027","commit_id":"91775f6759480c80210d29ed3cc73c8ddc2387ba"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ddd9757cdb0d12acb6de6a8644dc1a93c93187e1","unresolved":false,"context_lines":[{"line_number":3423,"context_line":"# TODO(mriedem): Eventually just hard-code the binary to \"nova-compute\"."},{"line_number":3424,"context_line":"@utils.arg(\u0027binary\u0027, metavar\u003d\u0027\u003cbinary\u003e\u0027, action\u003dshell.DeprecatedAction,"},{"line_number":3425,"context_line":"           help\u003d_(\u0027Service binary. Note that nova-compute is the only binary \u0027"},{"line_number":3426,"context_line":"                  \u0027that should be enabled.\u0027))"},{"line_number":3427,"context_line":"def do_service_enable(cs, args):"},{"line_number":3428,"context_line":"    \"\"\"Enable the service.\"\"\""},{"line_number":3429,"context_line":"    result \u003d cs.services.enable(args.host, args.binary)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f201791_2745d943","line":3426,"in_reply_to":"5f201791_eebe9eb2","updated":"2017-06-26 01:01:51.000000000","message":"Yeah I can do that.","commit_id":"91775f6759480c80210d29ed3cc73c8ddc2387ba"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"83dfd86edca1803b9dab27f043d584bb7816c351","unresolved":false,"context_lines":[{"line_number":3423,"context_line":"# TODO(mriedem): Eventually just hard-code the binary to \"nova-compute\"."},{"line_number":3424,"context_line":"@utils.arg(\u0027binary\u0027, metavar\u003d\u0027\u003cbinary\u003e\u0027, help\u003d_(\u0027Service binary.\u0027),"},{"line_number":3425,"context_line":"           action\u003dshell.DeprecatedAction, nargs\u003d\u0027?\u0027, default\u003d\u0027nova-compute\u0027,"},{"line_number":3426,"context_line":"           use\u003d\u0027Note: The only meaningful binary is \"nova-compute\".\u0027)"},{"line_number":3427,"context_line":"def do_service_enable(cs, args):"},{"line_number":3428,"context_line":"    \"\"\"Enable the service.\"\"\""},{"line_number":3429,"context_line":"    result \u003d cs.services.enable(args.host, args.binary)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f201791_673d112a","line":3426,"range":{"start_line":3426,"start_character":11,"end_line":3426,"end_character":66},"updated":"2017-06-26 01:49:56.000000000","message":"Something doesn\u0027t come out correctly with this:\n\nWARNING: Option \"None\" is deprecated; Note: The only meaningful binary is \"nova-compute\".\\n","commit_id":"f881cae1db459db211af6e41a36981a8530e0a89"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"85c63cff2b50b4617071dabed158e8990e6ddda4","unresolved":false,"context_lines":[{"line_number":3423,"context_line":"# TODO(mriedem): Eventually just hard-code the binary to \"nova-compute\"."},{"line_number":3424,"context_line":"@utils.arg(\u0027binary\u0027, metavar\u003d\u0027\u003cbinary\u003e\u0027, help\u003d_(\u0027Service binary.\u0027),"},{"line_number":3425,"context_line":"           action\u003dshell.DeprecatedAction, nargs\u003d\u0027?\u0027, default\u003d\u0027nova-compute\u0027,"},{"line_number":3426,"context_line":"           use\u003d\u0027Note: The only meaningful binary is \"nova-compute\".\u0027)"},{"line_number":3427,"context_line":"def do_service_enable(cs, args):"},{"line_number":3428,"context_line":"    \"\"\"Enable the service.\"\"\""},{"line_number":3429,"context_line":"    result \u003d cs.services.enable(args.host, args.binary)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f201791_a7ec498f","line":3426,"range":{"start_line":3426,"start_character":11,"end_line":3426,"end_character":66},"in_reply_to":"5f201791_673d112a","updated":"2017-06-26 01:58:52.000000000","message":"I think this doesn\u0027t work because binary isn\u0027t an option, like --binary, it\u0027s an argument.","commit_id":"f881cae1db459db211af6e41a36981a8530e0a89"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"425c2fb35d8132e80eb891336473c5dddbea66c6","unresolved":false,"context_lines":[{"line_number":3423,"context_line":"# TODO(mriedem): Eventually just hard-code the binary to \"nova-compute\"."},{"line_number":3424,"context_line":"@utils.arg(\u0027binary\u0027, metavar\u003d\u0027\u003cbinary\u003e\u0027, help\u003d_(\u0027Service binary.\u0027),"},{"line_number":3425,"context_line":"           action\u003dshell.DeprecatedAction, nargs\u003d\u0027?\u0027, default\u003d\u0027nova-compute\u0027,"},{"line_number":3426,"context_line":"           use\u003d\u0027Note: The only meaningful binary is \"nova-compute\".\u0027)"},{"line_number":3427,"context_line":"def do_service_enable(cs, args):"},{"line_number":3428,"context_line":"    \"\"\"Enable the service.\"\"\""},{"line_number":3429,"context_line":"    result \u003d cs.services.enable(args.host, args.binary)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f201791_ccc63369","line":3426,"range":{"start_line":3426,"start_character":11,"end_line":3426,"end_character":66},"in_reply_to":"5f201791_a7ec498f","updated":"2017-06-26 15:22:12.000000000","message":"Yeah, you\u0027re right; I didn\u0027t think of that limitation.  The obvious fix would be to change up DeprecatedAction.__call__() so that if option_string is None, it uses self.meta (think that\u0027s the correct variable), and probably substitute \"Argument\" for \"Option\" in the warning message.","commit_id":"f881cae1db459db211af6e41a36981a8530e0a89"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ec8110428c378b81c1e1e4ffee1dd965117c76e3","unresolved":false,"context_lines":[{"line_number":3423,"context_line":"# TODO(mriedem): Eventually just hard-code the binary to \"nova-compute\"."},{"line_number":3424,"context_line":"@utils.arg(\u0027binary\u0027, metavar\u003d\u0027\u003cbinary\u003e\u0027, help\u003d_(\u0027Service binary.\u0027),"},{"line_number":3425,"context_line":"           action\u003dshell.DeprecatedAction, nargs\u003d\u0027?\u0027, default\u003d\u0027nova-compute\u0027,"},{"line_number":3426,"context_line":"           use\u003d\u0027Note: The only meaningful binary is \"nova-compute\".\u0027)"},{"line_number":3427,"context_line":"def do_service_enable(cs, args):"},{"line_number":3428,"context_line":"    \"\"\"Enable the service.\"\"\""},{"line_number":3429,"context_line":"    result \u003d cs.services.enable(args.host, args.binary)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f201791_9cf609d7","line":3426,"range":{"start_line":3426,"start_character":11,"end_line":3426,"end_character":66},"in_reply_to":"5f201791_ccc63369","updated":"2017-06-27 13:23:48.000000000","message":"OK I got that working. Now my next problem is that the deprecation warning shows up even if you don\u0027t specify the argument. I wrote this into a test:\n\n    def test_services_disable_default_binary(self):\n        \"\"\"Tests that the default binary is nova-compute if not specified.\"\"\"\n        out, err \u003d self.run_command(\u0027service-disable host1\u0027)\n        self.assertNotIn(\u0027WARNING: Argument \"binary\" is deprecated\u0027, err)\n        body \u003d {\u0027host\u0027: \u0027host1\u0027, \u0027binary\u0027: \u0027nova-compute\u0027}\n        self.assert_called(\u0027PUT\u0027, \u0027/os-services/disable\u0027, body)\n\nAnd that fails with:\n\nnovaclient.tests.unit.v2.test_shell.ShellTest.test_services_disable_default_binary\n----------------------------------------------------------------------------------\n\nCaptured traceback:\n~~~~~~~~~~~~~~~~~~~\n    Traceback (most recent call last):\n      File \"novaclient/tests/unit/v2/test_shell.py\", line 2223, in test_services_disable_default_binary\n        self.assertNotIn(\u0027WARNING: Argument \"binary\" is deprecated\u0027, err)\n      File \"/home/user/git/python-novaclient/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py\", line 455, in assertNotIn\n        self.assertThat(haystack, matcher, message)\n      File \"/home/user/git/python-novaclient/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py\", line 498, in assertThat\n        raise mismatch_error\n    testtools.matchers._impl.MismatchError: u\u0027WARNING: Argument \"binary\" is deprecated; The only meaningful binary is \"nova-compute\".\\n\u0027 matches Contains(\u0027WARNING: Argument \"binary\" is deprecated\u0027)\n\n\nIs that how we inteded the deprecated action to work? That even though the user doesn\u0027t specify it, they get a warning about it? Because if so that\u0027s kind of annoying. Or would that be because we are setting a default?","commit_id":"f881cae1db459db211af6e41a36981a8530e0a89"}]}
