)]}'
{"neutronclient/neutron/v2_0/address_scope.py":[{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"0bfc2fb2be52b8ae2e248ef073e7dc417ec6ccc3","unresolved":false,"context_lines":[{"line_number":44,"context_line":"            action\u003d\u0027store_true\u0027,"},{"line_number":45,"context_line":"            help\u003d_(\u0027Set the address scope as shared.\u0027))"},{"line_number":46,"context_line":"        parser.add_argument("},{"line_number":47,"context_line":"            \u0027--name\u0027,"},{"line_number":48,"context_line":"            metavar\u003d\u0027NAME\u0027,"},{"line_number":49,"context_line":"            help\u003d_(\u0027Specify the name of the address scope.\u0027))"},{"line_number":50,"context_line":"        parser.add_argument("}],"source_content_type":"text/x-python","patch_set":1,"id":"9aed3d3a_c834ecfc","line":47,"updated":"2016-02-26 22:17:50.000000000","message":"This makes the name parameter optional ( even though it is mentioned as a Metavar with Name)\nIf I produce the same bug with IP_Version, wont I get the same results(as in the bug would be reproduced for IP_Version)?","commit_id":"75b2005f171f248c68ec5dd4141d8462d7b1a525"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"49f3b9e21387182c9b91e9442da3c07e686ff7b6","unresolved":false,"context_lines":[{"line_number":44,"context_line":"            action\u003d\u0027store_true\u0027,"},{"line_number":45,"context_line":"            help\u003d_(\u0027Set the address scope as shared.\u0027))"},{"line_number":46,"context_line":"        parser.add_argument("},{"line_number":47,"context_line":"            \u0027--name\u0027,"},{"line_number":48,"context_line":"            metavar\u003d\u0027NAME\u0027,"},{"line_number":49,"context_line":"            help\u003d_(\u0027Specify the name of the address scope.\u0027))"},{"line_number":50,"context_line":"        parser.add_argument("}],"source_content_type":"text/x-python","patch_set":1,"id":"7af24918_45b74a39","line":47,"in_reply_to":"7af24918_0aa1d194","updated":"2016-03-02 00:53:24.000000000","message":"i that problem will still remain even if name is optional. if somebody puts in a str for ip_version it will show the error message in unicode. A clean solution would be converting whatever value given to str before printing error message.","commit_id":"75b2005f171f248c68ec5dd4141d8462d7b1a525"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"877ba91869f2483d82d79712059ec2824cf29d18","unresolved":false,"context_lines":[{"line_number":44,"context_line":"            action\u003d\u0027store_true\u0027,"},{"line_number":45,"context_line":"            help\u003d_(\u0027Set the address scope as shared.\u0027))"},{"line_number":46,"context_line":"        parser.add_argument("},{"line_number":47,"context_line":"            \u0027--name\u0027,"},{"line_number":48,"context_line":"            metavar\u003d\u0027NAME\u0027,"},{"line_number":49,"context_line":"            help\u003d_(\u0027Specify the name of the address scope.\u0027))"},{"line_number":50,"context_line":"        parser.add_argument("}],"source_content_type":"text/x-python","patch_set":1,"id":"7af24918_7704bd14","line":47,"in_reply_to":"7af24918_45b74a39","updated":"2016-03-02 01:12:49.000000000","message":"I just re-read the bug and it is much clearer to me now.\nThe CLI expects positional arguments in the order of  \"Name\" and \"IP_VERSION\" and you cleverly swapped them :)\n\nI do agree that the message is not exactly clear here.\nBut instead of changing --name to an optional parameter, you can simply make a function which checks if the value passed in the IP_VERSION is an Int , having the value 4 or 6.\nThat function will be invoked by type.\n\nSo basically, I would suggest the following code:\n\n\n parser.add_argument(\n            \u0027name\u0027,\n            metavar\u003d\u0027NAME\u0027,\n            help\u003d_(\u0027Specify the name of the address scope.\u0027))\n parser.add_argument(\n            \u0027ip_version\u0027,\n            metavar\u003d\u0027IP_VERSION\u0027,\n            type\u003dverify_ip_ver,\n            help\u003d_(\u0027Specify the address family of the address scope.\u0027))\n\nAnd in Line#29:\n\n def verify_ip_ver(str):\n     if int(str) is not in [4,6]:\n         raise CommandError(\"Whatever message seems correct\")\n\nThis is just a sample, you can change it in any way you like, but I would prefer you avoid changing the --name parameter.","commit_id":"75b2005f171f248c68ec5dd4141d8462d7b1a525"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"c32f39f6cb0a4b647e95706d3561cc9c48206d53","unresolved":false,"context_lines":[{"line_number":44,"context_line":"            action\u003d\u0027store_true\u0027,"},{"line_number":45,"context_line":"            help\u003d_(\u0027Set the address scope as shared.\u0027))"},{"line_number":46,"context_line":"        parser.add_argument("},{"line_number":47,"context_line":"            \u0027--name\u0027,"},{"line_number":48,"context_line":"            metavar\u003d\u0027NAME\u0027,"},{"line_number":49,"context_line":"            help\u003d_(\u0027Specify the name of the address scope.\u0027))"},{"line_number":50,"context_line":"        parser.add_argument("}],"source_content_type":"text/x-python","patch_set":1,"id":"7af24918_0aa1d194","line":47,"in_reply_to":"7af24918_7f2bf982","updated":"2016-03-02 00:36:59.000000000","message":"I think I was not clear.\nEarlier, name was a positional argument. So User had to pass the name parameter.\nNow name is an optional argument. So if user does not pass the Name attribute, the command would still work.\nThis is not a problem because it does not impact backward compatibility in terms of usage( user can still pass Name and the CLI would work) ,and this also gives the user the option to skip name as well ( as IP_Version is a Positional and therefore necessary argument).\n\nSo , as such I do not have an issue if others are fine with it, but such changes may need a docimpact (?) as you are changing a positional argument to an optional one","commit_id":"75b2005f171f248c68ec5dd4141d8462d7b1a525"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"a30f3ec4f73779e6d553a25690e2c31da0a76d6a","unresolved":false,"context_lines":[{"line_number":44,"context_line":"            action\u003d\u0027store_true\u0027,"},{"line_number":45,"context_line":"            help\u003d_(\u0027Set the address scope as shared.\u0027))"},{"line_number":46,"context_line":"        parser.add_argument("},{"line_number":47,"context_line":"            \u0027--name\u0027,"},{"line_number":48,"context_line":"            metavar\u003d\u0027NAME\u0027,"},{"line_number":49,"context_line":"            help\u003d_(\u0027Specify the name of the address scope.\u0027))"},{"line_number":50,"context_line":"        parser.add_argument("}],"source_content_type":"text/x-python","patch_set":1,"id":"7af24918_7f2bf982","line":47,"in_reply_to":"9aed3d3a_c834ecfc","updated":"2016-03-02 00:04:00.000000000","message":"yea I tried again it seems like name is not the problem. when you try giving ip version a str value then it shows in unicode character. name is fine because its always str. I don\u0027t think it is even a bug. if it is then wherever we\u0027ve set choices for int we will see the same issue if somebody tried giving string.","commit_id":"75b2005f171f248c68ec5dd4141d8462d7b1a525"}]}
