)]}'
{"novaclient/shell.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"c5e9541b2d900c7c41cf62c9b5a527023ca34602","unresolved":false,"context_lines":[{"line_number":194,"context_line":"        action \u003d self._get_action(parser)"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"        # Only emit the deprecation warning once per option"},{"line_number":197,"context_line":"        if option_string and (option_string not in self.emitted):"},{"line_number":198,"context_line":"            if self.use:"},{"line_number":199,"context_line":"                print(_(\u0027WARNING: Option \"%(option)s\" is deprecated; \u0027"},{"line_number":200,"context_line":"                        \u0027%(use)s\u0027) % {"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ffa3b31_4ae279d7","line":197,"updated":"2017-04-17 13:53:02.000000000","message":"I see why you need this, but I would like to see some updates to the test suite for the class.","commit_id":"263b1a85925cb4eac9ce21b77c8aa99c4c338a57"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"c5e9541b2d900c7c41cf62c9b5a527023ca34602","unresolved":false,"context_lines":[{"line_number":211,"context_line":"                        \u0027%(use)s\u0027) % {\u0027use\u0027: self.use},"},{"line_number":212,"context_line":"                      file\u003dsys.stderr)"},{"line_number":213,"context_line":"            else:"},{"line_number":214,"context_line":"                print(_(\u0027WARNING: Option is deprecated\u0027),"},{"line_number":215,"context_line":"                      file\u003dsys.stderr)"},{"line_number":216,"context_line":"            self.emitted.add(option_string)"},{"line_number":217,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7ffa3b31_8af08192","line":214,"updated":"2017-04-17 13:53:02.000000000","message":"I would suggest using \"Argument\" to \"Option\", and I would also suggest using the metavar to identify which argument it is.  To me, \"option\" indicates one of the \"--xxx\" or \"-x\" indicators, while \"argument\" indicates a positional argument.","commit_id":"263b1a85925cb4eac9ce21b77c8aa99c4c338a57"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"0df5d323805530c0cd00c039b84748614384572e","unresolved":false,"context_lines":[{"line_number":208,"context_line":"        elif not option_string:"},{"line_number":209,"context_line":"            if self.use:"},{"line_number":210,"context_line":"                print(_(\u0027WARNING: Argument is deprecated; \u0027"},{"line_number":211,"context_line":"                        \u0027%(use)s\u0027) % {\u0027use\u0027: self.use},"},{"line_number":212,"context_line":"                      file\u003dsys.stderr)"},{"line_number":213,"context_line":"            else:"},{"line_number":214,"context_line":"                print(_(\u0027WARNING: Argument is deprecated\u0027),"}],"source_content_type":"text/x-python","patch_set":4,"id":"5ff73747_ae7c081f","line":211,"updated":"2017-04-27 15:36:30.000000000","message":"I\u0027d still like to see the argument\u0027s metavar used in this message, to make it clear *which* argument has been deprecated.","commit_id":"9e22295f67d520ce172e1eae6b428863e9456e13"}],"novaclient/tests/unit/v2/test_volumes.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"0df5d323805530c0cd00c039b84748614384572e","unresolved":false,"context_lines":[{"line_number":24,"context_line":"        super(VolumesTest, self).setUp()"},{"line_number":25,"context_line":"        self.cs \u003d fakes.FakeClient(api_versions.APIVersion(\"2.0\"))"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    def test_create_server_volume_device_NotNone(self):"},{"line_number":28,"context_line":"        v \u003d self.cs.volumes.create_server_volume("},{"line_number":29,"context_line":"            server_id\u003d1234,"},{"line_number":30,"context_line":"            volume_id\u003d\u002715e59938-07d5-11e1-90e3-e3dffe0c5983\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"5ff73747_eeb450d3","line":27,"range":{"start_line":27,"start_character":41,"end_line":27,"end_character":48},"updated":"2017-04-27 15:36:30.000000000","message":"Let\u0027s avoid CamelCase, please.","commit_id":"9e22295f67d520ce172e1eae6b428863e9456e13"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"0df5d323805530c0cd00c039b84748614384572e","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        )"},{"line_number":33,"context_line":"        self.assert_request_id(v, fakes.FAKE_REQUEST_ID_LIST)"},{"line_number":34,"context_line":"        self.cs.assert_called(\u0027POST\u0027, \u0027/servers/1234/os-volume_attachments\u0027)"},{"line_number":35,"context_line":"        self.assertIsInstance(v, volumes.Volume)"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def test_create_server_volume_device_None(self):"},{"line_number":38,"context_line":"        v \u003d self.cs.volumes.create_server_volume("}],"source_content_type":"text/x-python","patch_set":4,"id":"5ff73747_6eee00b5","line":35,"updated":"2017-04-27 15:36:30.000000000","message":"I don\u0027t see any assertions to validate that the warning is being emitted…","commit_id":"9e22295f67d520ce172e1eae6b428863e9456e13"}],"novaclient/v2/shell.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"684def93ca71b39b7f8105c2ba0f24efe07a0e08","unresolved":false,"context_lines":[{"line_number":2091,"context_line":"    \u0027device\u0027, metavar\u003d\u0027\u003cdevice\u003e\u0027, default\u003dNone, nargs\u003d\u0027?\u0027,"},{"line_number":2092,"context_line":"    help\u003d_(\u0027Name of the device e.g. /dev/vdb. \u0027"},{"line_number":2093,"context_line":"           \u0027Use \"auto\" for autoassign (if supported). \u0027"},{"line_number":2094,"context_line":"           \u0027Libvirt driver will use default device name.\u0027))"},{"line_number":2095,"context_line":"def do_volume_attach(cs, args):"},{"line_number":2096,"context_line":"    \"\"\"Attach a volume to a server.\"\"\""},{"line_number":2097,"context_line":"    if args.device \u003d\u003d \u0027auto\u0027:"}],"source_content_type":"text/x-python","patch_set":1,"id":"bff0334d_4e16a2aa","side":"PARENT","line":2094,"updated":"2017-04-10 16:04:21.000000000","message":"This argument has never been deprecated.  Even if we move to simply ignoring it, we need to go through a formal deprecation period here.  Look for the use of shell.DeprecatedAction within this file; in particular, the --tenant option of do_flavor_access_list() is probably a reasonable model for what we want to do here.","commit_id":"9ca9ae6c1098e9c096aa7a400a8bfb153ef4d630"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"617d6f4bff2034906a94e64c1fe8a89e93855d09","unresolved":false,"context_lines":[{"line_number":2102,"context_line":"        args.device \u003d None"},{"line_number":2103,"context_line":"    volume \u003d cs.volumes.create_server_volume(_find_server(cs, args.server).id,"},{"line_number":2104,"context_line":"                                             args.volume,"},{"line_number":2105,"context_line":"                                             args.device)"},{"line_number":2106,"context_line":"    _print_volume(volume)"},{"line_number":2107,"context_line":""},{"line_number":2108,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7ffa3b31_6cfde36c","line":2105,"range":{"start_line":2105,"start_character":45,"end_line":2105,"end_character":56},"updated":"2017-04-20 14:12:34.000000000","message":"Ah, I missed that this was still here.  You should drop this argument entirely.","commit_id":"263b1a85925cb4eac9ce21b77c8aa99c4c338a57"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c3d1f640aa73ec657149527d19680bdc683aa9d5","unresolved":false,"context_lines":[{"line_number":2095,"context_line":"    action\u003dshell.DeprecatedAction,"},{"line_number":2096,"context_line":"    real_action\u003d\u0027nothing\u0027,"},{"line_number":2097,"context_line":"    use\u003d_(\u0027Option \\\u0027device\\\u0027 is not supported, and will be \u0027"},{"line_number":2098,"context_line":"          \u0027removed in version Pike\u0027))"},{"line_number":2099,"context_line":"def do_volume_attach(cs, args):"},{"line_number":2100,"context_line":"    \"\"\"Attach a volume to a server.\"\"\""},{"line_number":2101,"context_line":"    if args.device \u003d\u003d \u0027auto\u0027:"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f044301_257ff015","line":2098,"range":{"start_line":2098,"start_character":30,"end_line":2098,"end_character":34},"updated":"2017-05-11 15:55:55.000000000","message":"This isn\u0027t valid now since we\u0027re in Pike. This would have to be Queens at least.","commit_id":"318e75c4034dd5e17279e538f9b5384567604bdb"}],"novaclient/v2/volumes.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"684def93ca71b39b7f8105c2ba0f24efe07a0e08","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        \"\"\""},{"line_number":49,"context_line":"        body \u003d {\u0027volumeAttachment\u0027: {\u0027volumeId\u0027: volume_id}}"},{"line_number":50,"context_line":"        if device is not None:"},{"line_number":51,"context_line":"            body[\u0027volumeAttachment\u0027][\u0027device\u0027] \u003d device"},{"line_number":52,"context_line":"        return self._create(\"/servers/%s/os-volume_attachments\" % server_id,"},{"line_number":53,"context_line":"                            body, \"volumeAttachment\")"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"bff0334d_6e4a86ac","side":"PARENT","line":51,"updated":"2017-04-10 16:04:21.000000000","message":"I think maybe we should consider doing a formal deprecation here, as well.  See, for instance, the cell_name parameter of MigrationManager.list() in novaclient/v2/migrations.py.","commit_id":"9ca9ae6c1098e9c096aa7a400a8bfb153ef4d630"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"c5e9541b2d900c7c41cf62c9b5a527023ca34602","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        \"\"\""},{"line_number":49,"context_line":"        body \u003d {\u0027volumeAttachment\u0027: {\u0027volumeId\u0027: volume_id}}"},{"line_number":50,"context_line":"        if device is not None:"},{"line_number":51,"context_line":"            body[\u0027volumeAttachment\u0027][\u0027device\u0027] \u003d device"},{"line_number":52,"context_line":"        return self._create(\"/servers/%s/os-volume_attachments\" % server_id,"},{"line_number":53,"context_line":"                            body, \"volumeAttachment\")"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7ffa3b31_eacb8550","side":"PARENT","line":51,"updated":"2017-04-17 13:53:02.000000000","message":"I would like a deprecation warning emitted here, so that we can drop the \u0027device\u0027 argument at some point in the future.","commit_id":"9ca9ae6c1098e9c096aa7a400a8bfb153ef4d630"},{"author":{"_account_id":16305,"name":"NidhiMittalHada","email":"nidhimittal19@gmail.com","username":"nidhimittalhada"},"change_message_id":"de3fbf25d8a7e2d416d1980942f85378caf3bf58","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        \"\"\""},{"line_number":49,"context_line":"        body \u003d {\u0027volumeAttachment\u0027: {\u0027volumeId\u0027: volume_id}}"},{"line_number":50,"context_line":"        if device is not None:"},{"line_number":51,"context_line":"            body[\u0027volumeAttachment\u0027][\u0027device\u0027] \u003d device"},{"line_number":52,"context_line":"        return self._create(\"/servers/%s/os-volume_attachments\" % server_id,"},{"line_number":53,"context_line":"                            body, \"volumeAttachment\")"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7ffa3b31_314cbd40","side":"PARENT","line":51,"in_reply_to":"7ffa3b31_0c265f16","updated":"2017-04-21 06:36:37.000000000","message":"if device is not None:\n    self.client.logger.warning(\"mmmmmmm\")\n\nyou mean this.\n\nKevin, when we know that device argument is not reaching here to this code, and this warning will not be printed, wanted to understand whats our purpose of adding unreachable code?","commit_id":"9ca9ae6c1098e9c096aa7a400a8bfb153ef4d630"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"e8125098f9f677d4fffb081e3f81199b33f47f95","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        \"\"\""},{"line_number":49,"context_line":"        body \u003d {\u0027volumeAttachment\u0027: {\u0027volumeId\u0027: volume_id}}"},{"line_number":50,"context_line":"        if device is not None:"},{"line_number":51,"context_line":"            body[\u0027volumeAttachment\u0027][\u0027device\u0027] \u003d device"},{"line_number":52,"context_line":"        return self._create(\"/servers/%s/os-volume_attachments\" % server_id,"},{"line_number":53,"context_line":"                            body, \"volumeAttachment\")"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7ffa3b31_92ab8173","side":"PARENT","line":51,"in_reply_to":"7ffa3b31_314cbd40","updated":"2017-04-21 16:17:35.000000000","message":"What makes you think this is unreachable?  We have no idea how other users are using the library.  They may be passing the device, and we need to warn them that that argument will be going away in the future.","commit_id":"9ca9ae6c1098e9c096aa7a400a8bfb153ef4d630"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"617d6f4bff2034906a94e64c1fe8a89e93855d09","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        \"\"\""},{"line_number":49,"context_line":"        body \u003d {\u0027volumeAttachment\u0027: {\u0027volumeId\u0027: volume_id}}"},{"line_number":50,"context_line":"        if device is not None:"},{"line_number":51,"context_line":"            body[\u0027volumeAttachment\u0027][\u0027device\u0027] \u003d device"},{"line_number":52,"context_line":"        return self._create(\"/servers/%s/os-volume_attachments\" % server_id,"},{"line_number":53,"context_line":"                            body, \"volumeAttachment\")"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7ffa3b31_0c265f16","side":"PARENT","line":51,"in_reply_to":"7ffa3b31_31baa4c0","updated":"2017-04-20 14:12:34.000000000","message":"As I point out in shell.py, the argument shouldn\u0027t even be passed from the shell anymore.  What I would like to see is line 51 replaced with the self.client.logger.warning(), and there won\u0027t be any sort of double-warning since we won\u0027t even be passing the argument anymore.","commit_id":"9ca9ae6c1098e9c096aa7a400a8bfb153ef4d630"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"66d15f08c58bd6c531b8dc3d25157845850f92c7","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        \"\"\""},{"line_number":49,"context_line":"        body \u003d {\u0027volumeAttachment\u0027: {\u0027volumeId\u0027: volume_id}}"},{"line_number":50,"context_line":"        if device is not None:"},{"line_number":51,"context_line":"            body[\u0027volumeAttachment\u0027][\u0027device\u0027] \u003d device"},{"line_number":52,"context_line":"        return self._create(\"/servers/%s/os-volume_attachments\" % server_id,"},{"line_number":53,"context_line":"                            body, \"volumeAttachment\")"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7ffa3b31_b4078a18","side":"PARENT","line":51,"in_reply_to":"7ffa3b31_92ab8173","updated":"2017-04-21 16:32:19.000000000","message":"Please check [1]. It looks like most projects(heat[2], ec2[3], manila[4], rally[5], etc) who call this method transmit device argument. The core OpenStack projects is usually taken as an example for new projects. It means that redundant usage of device argument will be shared for a long time... \nKevin is right, we need to put the right warning message to be able to remove device argument after some time.\n\n[1] http://codesearch.openstack.org/?q\u003dcreate_server_volume\u0026i\u003dnope\u0026files\u003d\u0026repos\u003d\n[2] HEAT - http://git.openstack.org/cgit/openstack/heat/tree/heat/engine/clients/os/nova.py#n666\n[3] EC2-API - http://git.openstack.org/cgit/openstack/ec2-api/tree/ec2api/api/volume.py#n67\n[4] MANILA - http://git.openstack.org/cgit/openstack/manila/tree/manila/compute/nova.py#n263\n[5] Rally - http://git.openstack.org/cgit/openstack/rally/tree/rally/plugins/openstack/scenarios/nova/utils.py#n665","commit_id":"9ca9ae6c1098e9c096aa7a400a8bfb153ef4d630"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"09dd5e459c289d6724d5e267e37dd7bedebdc6d5","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        \"\"\""},{"line_number":49,"context_line":"        body \u003d {\u0027volumeAttachment\u0027: {\u0027volumeId\u0027: volume_id}}"},{"line_number":50,"context_line":"        if device is not None:"},{"line_number":51,"context_line":"            body[\u0027volumeAttachment\u0027][\u0027device\u0027] \u003d device"},{"line_number":52,"context_line":"        return self._create(\"/servers/%s/os-volume_attachments\" % server_id,"},{"line_number":53,"context_line":"                            body, \"volumeAttachment\")"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7ffa3b31_e19267f6","side":"PARENT","line":51,"in_reply_to":"7ffa3b31_d384f360","updated":"2017-04-18 14:31:39.000000000","message":"I\u0027m thinking of something like novaclient/v2/migrations.py:44.  I\u0027m OK with a double warning (the example at line 44 doubles the warning generated by the DeprecatedAction at novaclient/v2/shell.py:4722).","commit_id":"9ca9ae6c1098e9c096aa7a400a8bfb153ef4d630"},{"author":{"_account_id":16305,"name":"NidhiMittalHada","email":"nidhimittal19@gmail.com","username":"nidhimittalhada"},"change_message_id":"14a7974bc23975bad3e4cd0ae268a4ac25c6e2a9","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        \"\"\""},{"line_number":49,"context_line":"        body \u003d {\u0027volumeAttachment\u0027: {\u0027volumeId\u0027: volume_id}}"},{"line_number":50,"context_line":"        if device is not None:"},{"line_number":51,"context_line":"            body[\u0027volumeAttachment\u0027][\u0027device\u0027] \u003d device"},{"line_number":52,"context_line":"        return self._create(\"/servers/%s/os-volume_attachments\" % server_id,"},{"line_number":53,"context_line":"                            body, \"volumeAttachment\")"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7ffa3b31_31baa4c0","side":"PARENT","line":51,"in_reply_to":"7ffa3b31_e19267f6","updated":"2017-04-20 07:18:24.000000000","message":"Hi Kevin,\nThanks for your reply.\nIn my Earlier patches i applied same warning but there is a problem.\n\nAs confirmed, as we do real_action \u003d Nothing - device argument comes as NOne in volumes.py.\n\nHence this doesn\u0027t suit us\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\nif cell_name:\n  self.client.logger.warning(_(\"Argument...\"))\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\nmay be then i will then put it like this.\n\nif device is None:\n    self.client.logger.warning(_(\"Argument ....\")\n\nHope its okay?","commit_id":"9ca9ae6c1098e9c096aa7a400a8bfb153ef4d630"},{"author":{"_account_id":16305,"name":"NidhiMittalHada","email":"nidhimittal19@gmail.com","username":"nidhimittalhada"},"change_message_id":"771de185d73c41538fd5bb9dca4b4edcd9143efa","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        \"\"\""},{"line_number":49,"context_line":"        body \u003d {\u0027volumeAttachment\u0027: {\u0027volumeId\u0027: volume_id}}"},{"line_number":50,"context_line":"        if device is not None:"},{"line_number":51,"context_line":"            body[\u0027volumeAttachment\u0027][\u0027device\u0027] \u003d device"},{"line_number":52,"context_line":"        return self._create(\"/servers/%s/os-volume_attachments\" % server_id,"},{"line_number":53,"context_line":"                            body, \"volumeAttachment\")"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7ffa3b31_d384f360","side":"PARENT","line":51,"in_reply_to":"7ffa3b31_eacb8550","updated":"2017-04-18 05:39:20.000000000","message":"DO you mean this way ?\n\nDeprecation warning is emitted through shell.py itself.\nOr do you mean this way ?\n\nIf device is not None:\n   print deprecation warning.\n   body[\u0027volumeAttachment\u0027][\u0027device\u0027] \u003d device\n\n\n\u003e\u003e As we obtain device as None here, \nThis deprecation warning wont be printed.\n \n\nOr this way \n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\nif device is None:\n   print deprecation warning\nelse:\n     body[\u0027volumeAttachment\u0027][\u0027device\u0027] \u003d device\n\n\u003e\u003e But is this required when we already are printing deprecation warning from shell.py??","commit_id":"9ca9ae6c1098e9c096aa7a400a8bfb153ef4d630"}]}
