)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e0635166e142af2d1de43b01b4d768edcb2c2aae","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Modification to improve neutron-client error message output"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In case a user provides incorrect input,the NOVA CLIs provide"},{"line_number":10,"context_line":"information regarding usage of the NOVA help CLI.This is useful"},{"line_number":11,"context_line":"for new users.Similar information has been updated in the neutron"},{"line_number":12,"context_line":"CLIs as well."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"ba15a1d1_930e9d39","line":9,"range":{"start_line":9,"start_character":44,"end_line":9,"end_character":52},"updated":"2015-09-17 12:45:10.000000000","message":"Neutron CLI?","commit_id":"ff5c89febcac4d72d45e15f25fcef3567afff62c"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"7b4bc2ad7dbd3c0f3977cb47e1cca4291d580eaf","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Modification to improve neutron-client error message output"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In case a user provides incorrect input,the NOVA CLIs provide"},{"line_number":10,"context_line":"information regarding usage of the NOVA help CLI.This is useful"},{"line_number":11,"context_line":"for new users.Similar information has been updated in the neutron"},{"line_number":12,"context_line":"CLIs as well."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"ba15a1d1_40bfa260","line":9,"in_reply_to":"ba15a1d1_930e9d39","updated":"2015-09-18 08:28:51.000000000","message":"NOVA CLIs. :)\nWhat my Commit message states is that like NOVA CLIs, Neutron CLIs should also provide HELP message to user if the user enters a CLI with incorrect/incomplete arguments","commit_id":"ff5c89febcac4d72d45e15f25fcef3567afff62c"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e0635166e142af2d1de43b01b4d768edcb2c2aae","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Modification to improve neutron-client error message output"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In case a user provides incorrect input,the NOVA CLIs provide"},{"line_number":10,"context_line":"information regarding usage of the NOVA help CLI.This is useful"},{"line_number":11,"context_line":"for new users.Similar information has been updated in the neutron"},{"line_number":12,"context_line":"CLIs as well."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"ba15a1d1_b30ba129","line":10,"range":{"start_line":10,"start_character":34,"end_line":10,"end_character":40},"updated":"2015-09-17 12:45:10.000000000","message":"neutron","commit_id":"ff5c89febcac4d72d45e15f25fcef3567afff62c"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e0635166e142af2d1de43b01b4d768edcb2c2aae","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In case a user provides incorrect input,the NOVA CLIs provide"},{"line_number":10,"context_line":"information regarding usage of the NOVA help CLI.This is useful"},{"line_number":11,"context_line":"for new users.Similar information has been updated in the neutron"},{"line_number":12,"context_line":"CLIs as well."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I1be2ba5a2c937b58900221a9ec7625c461ac17d9"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"ba15a1d1_36069f1d","line":11,"updated":"2015-09-17 12:45:10.000000000","message":"Insert a space after a period.","commit_id":"ff5c89febcac4d72d45e15f25fcef3567afff62c"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"7b4bc2ad7dbd3c0f3977cb47e1cca4291d580eaf","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In case a user provides incorrect input,the NOVA CLIs provide"},{"line_number":10,"context_line":"information regarding usage of the NOVA help CLI.This is useful"},{"line_number":11,"context_line":"for new users.Similar information has been updated in the neutron"},{"line_number":12,"context_line":"CLIs as well."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I1be2ba5a2c937b58900221a9ec7625c461ac17d9"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"ba15a1d1_c0b3b296","line":11,"in_reply_to":"ba15a1d1_36069f1d","updated":"2015-09-18 08:28:51.000000000","message":"Ok, will do.\n\nFor the above comments, please let me know if you have any concerns","commit_id":"ff5c89febcac4d72d45e15f25fcef3567afff62c"},{"author":{"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},"change_message_id":"b2ec7546f6d05ae7183f9e33ae89c8f11d8a4e2a","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Modification to improve neutron-client error message output"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In case a user provides incorrect input,the NOVA CLIs provide"},{"line_number":10,"context_line":"information regarding usage of the NOVA help CLI.This is useful"},{"line_number":11,"context_line":"for new users.Similar information has been updated in the neutron"},{"line_number":12,"context_line":"CLIs as well."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"9a1a9d01_d3c8de76","line":9,"updated":"2015-10-05 13:44:59.000000000","message":"If you need to change the patch set, please add spaces after the punctuation throughout this commit message.","commit_id":"36a962ac38c72d73a2c46b9f23586497ca954444"},{"author":{"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},"change_message_id":"91c22378a9fc5349e90eb6f7a412090dc8756824","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Modification to improve neutron-client err msg o/p"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In case a user provides incorrect input,the NOVA CLIs provide"},{"line_number":10,"context_line":"information regarding usage of the NOVA help CLI.This is useful"},{"line_number":11,"context_line":"for new users.Similar information has been updated in the neutron"},{"line_number":12,"context_line":"CLIs as well."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"7a2fa921_3659a235","line":9,"updated":"2015-10-09 13:27:03.000000000","message":"nit...please add spaces after the punctuation throughout this commit message.","commit_id":"28a9cf82de3517595950bf2a6b0fa139474df24d"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"202841546988730bdfda0b278f6cfab44c2a1644","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Modification to improve neutron-client err msg o/p"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In case a user provides incorrect input,the NOVA CLIs provide"},{"line_number":10,"context_line":"information regarding usage of the NOVA help CLI.This is useful"},{"line_number":11,"context_line":"for new users.Similar information has been updated in the neutron"},{"line_number":12,"context_line":"CLIs as well."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"7a2fa921_4ba3fb9e","line":9,"in_reply_to":"7a2fa921_3659a235","updated":"2015-10-13 01:29:48.000000000","message":"Done","commit_id":"28a9cf82de3517595950bf2a6b0fa139474df24d"},{"author":{"_account_id":16707,"name":"Mohankumar","email":"nmohankumar1011@gmail.com","username":"mohankumar_n"},"change_message_id":"83af215c6033476c141af7d6407b2f183f11998f","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Modification to improve neutron-client err msg o/p"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In case a user provides incorrect input,the NOVA CLIs provide"},{"line_number":10,"context_line":"information regarding usage of the NOVA help CLI.This is useful"},{"line_number":11,"context_line":"for new users.Similar information has been updated in the neutron"},{"line_number":12,"context_line":"CLIs as well."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"7a2fa921_b7acc98c","line":9,"in_reply_to":"7a2fa921_3659a235","updated":"2015-10-09 15:00:52.000000000","message":"Richard: +1","commit_id":"28a9cf82de3517595950bf2a6b0fa139474df24d"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"b3e67e1d000939bc53157850a2b8460954d13159","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Reedip Banerjee \u003creedip.banerjee@nectechnologies.in\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-10-13 12:47:35 +0530"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Modification to improve neutron-client err msg o/p"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In case a user provides incorrect input,the NOVA CLIs provide"},{"line_number":10,"context_line":"information regarding usage of the NOVA help CLI. This is useful"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"fa80f949_a8ee3220","line":7,"updated":"2015-11-04 15:27:11.000000000","message":"- what does \u0027o/p\u0027 mean? I think it is not an usual abbrev.\n- Modification to improve -\u003e Improve","commit_id":"245fe9a2fb8f85ff15ee00668516a3917ec51922"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"22775672ca7b0acba76e1053676a13a451da8c74","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Reedip Banerjee \u003creedip.banerjee@nectechnologies.in\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-10-13 12:47:35 +0530"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Modification to improve neutron-client err msg o/p"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In case a user provides incorrect input,the NOVA CLIs provide"},{"line_number":10,"context_line":"information regarding usage of the NOVA help CLI. This is useful"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"fa80f949_4ca9908f","line":7,"in_reply_to":"fa80f949_a8ee3220","updated":"2015-11-06 05:31:45.000000000","message":"Done","commit_id":"245fe9a2fb8f85ff15ee00668516a3917ec51922"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"b3e67e1d000939bc53157850a2b8460954d13159","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Modification to improve neutron-client err msg o/p"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In case a user provides incorrect input,the NOVA CLIs provide"},{"line_number":10,"context_line":"information regarding usage of the NOVA help CLI. This is useful"},{"line_number":11,"context_line":"for new users. Similar information has been updated in the neutron"},{"line_number":12,"context_line":"CLIs as well."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"fa80f949_08de5e6d","line":9,"updated":"2015-11-04 15:27:11.000000000","message":"A space after a comma.","commit_id":"245fe9a2fb8f85ff15ee00668516a3917ec51922"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"22775672ca7b0acba76e1053676a13a451da8c74","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Modification to improve neutron-client err msg o/p"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In case a user provides incorrect input,the NOVA CLIs provide"},{"line_number":10,"context_line":"information regarding usage of the NOVA help CLI. This is useful"},{"line_number":11,"context_line":"for new users. Similar information has been updated in the neutron"},{"line_number":12,"context_line":"CLIs as well."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"fa80f949_0c986877","line":9,"in_reply_to":"fa80f949_08de5e6d","updated":"2015-11-06 05:31:45.000000000","message":"Done","commit_id":"245fe9a2fb8f85ff15ee00668516a3917ec51922"}],"neutronclient/shell.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e0635166e142af2d1de43b01b4d768edcb2c2aae","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        known_args, _values_specs \u003d cmd_parser.parse_known_args(_argv)"},{"line_number":102,"context_line":"    except SystemExit as exception:"},{"line_number":103,"context_line":"        print ("},{"line_number":104,"context_line":"            \"Try \u0027neutron help \" + str(cmd_parser.prog.split(\u0027 \u0027)[1]) +"},{"line_number":105,"context_line":"            \"\u0027 for more information.\")"},{"line_number":106,"context_line":"        # Sample:Try \u0027neutron help firewall-delete\u0027 for more information."},{"line_number":107,"context_line":"        raise exception"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_d6a2c3fb","line":104,"updated":"2015-09-17 12:45:10.000000000","message":"[1] does not always cotains a subcommand name.\n\n  $ neutron --insesure test --foo\n  Invalid command u\u0027 --insesure\u0027\n\nIn this case, it should be:\n\n  Invalid command \u0027test\u0027","commit_id":"ff5c89febcac4d72d45e15f25fcef3567afff62c"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"2c499bcad914c03dda3cbb5f2604a95269b0dd60","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        known_args, _values_specs \u003d cmd_parser.parse_known_args(_argv)"},{"line_number":102,"context_line":"    except SystemExit as exception:"},{"line_number":103,"context_line":"        print ("},{"line_number":104,"context_line":"            \"Try \u0027neutron help \" + str(cmd_parser.prog.split(\u0027 \u0027)[1]) +"},{"line_number":105,"context_line":"            \"\u0027 for more information.\")"},{"line_number":106,"context_line":"        # Sample:Try \u0027neutron help firewall-delete\u0027 for more information."},{"line_number":107,"context_line":"        raise exception"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a1a9d01_c63ab5cd","line":104,"in_reply_to":"9a1a9d01_157c5571","updated":"2015-09-25 01:30:07.000000000","message":"Hi Akihiro, I agree with you, but I guess you did a typo in the earlier comment[1].\nPlease verify :)\nI checked with the -insecure option as well, and I have reported my output in my earlier comment.","commit_id":"ff5c89febcac4d72d45e15f25fcef3567afff62c"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"f4a2fc4ce39b9079188c3f2960879e1f0ada9228","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        known_args, _values_specs \u003d cmd_parser.parse_known_args(_argv)"},{"line_number":102,"context_line":"    except SystemExit as exception:"},{"line_number":103,"context_line":"        print ("},{"line_number":104,"context_line":"            \"Try \u0027neutron help \" + str(cmd_parser.prog.split(\u0027 \u0027)[1]) +"},{"line_number":105,"context_line":"            \"\u0027 for more information.\")"},{"line_number":106,"context_line":"        # Sample:Try \u0027neutron help firewall-delete\u0027 for more information."},{"line_number":107,"context_line":"        raise exception"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a1a9d01_157c5571","line":104,"in_reply_to":"ba15a1d1_00431514","updated":"2015-09-24 23:36:29.000000000","message":"--insecure is an option of neutornclient. It is a global option. You can find it by \"neutron help\".\n\n  neutron --insecure net-list \n\nis a valid command-line.\nIt means we allow insecure SSL connection.\nI chose this when I tested because it is an existing option.","commit_id":"ff5c89febcac4d72d45e15f25fcef3567afff62c"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"c1c28a1abdbbb03df52b08c6642ffb0e8213b34f","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        known_args, _values_specs \u003d cmd_parser.parse_known_args(_argv)"},{"line_number":102,"context_line":"    except SystemExit as exception:"},{"line_number":103,"context_line":"        print ("},{"line_number":104,"context_line":"            \"Try \u0027neutron help \" + str(cmd_parser.prog.split(\u0027 \u0027)[1]) +"},{"line_number":105,"context_line":"            \"\u0027 for more information.\")"},{"line_number":106,"context_line":"        # Sample:Try \u0027neutron help firewall-delete\u0027 for more information."},{"line_number":107,"context_line":"        raise exception"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_00431514","line":104,"in_reply_to":"ba15a1d1_d6a2c3fb","updated":"2015-09-24 05:22:07.000000000","message":"Dear Akihiro ,\n--insesure is not an option in the neutron client.\nI guess the above error (\"Invalid command \u0027--insesure\u0027) is correct\n\nOutput observed from default (i.e. normal ) behaviour\n\nreedip@reedip-VirtualBox:/$ neutron --insecure firewall-rule-create\nusage: neutron firewall-rule-create [-h]\n                                    [-f {html,json,shell,table,value,yaml}]\n                                    [-c COLUMN] [--max-width \u003cinteger\u003e]\n                                    [--prefix PREFIX]\n                                    [--request-format {json,xml}]\n                                    [--tenant-id TENANT_ID] [--name NAME]\n                                    [--description DESCRIPTION] [--shared]\n                                    [--source-ip-address SOURCE_IP_ADDRESS]\n                                    [--destination-ip-address DESTINATION_IP_ADDRESS]\n                                    [--source-port SOURCE_PORT]\n                                    [--destination-port DESTINATION_PORT]\n                                    [--enabled {True,False}] --protocol\n                                    {tcp,udp,icmp,any} --action\n                                    {allow,deny,reject}\nneutron firewall-rule-create: error: argument --protocol is required\nreedip@reedip-VirtualBox:/$ neutron --insesure firewall-rule-create\nInvalid command u\u0027 --insesure\u0027\nreedip@reedip-VirtualBox:/$","commit_id":"ff5c89febcac4d72d45e15f25fcef3567afff62c"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"7b4bc2ad7dbd3c0f3977cb47e1cca4291d580eaf","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        known_args, _values_specs \u003d cmd_parser.parse_known_args(_argv)"},{"line_number":102,"context_line":"    except SystemExit as exception:"},{"line_number":103,"context_line":"        print ("},{"line_number":104,"context_line":"            \"Try \u0027neutron help \" + str(cmd_parser.prog.split(\u0027 \u0027)[1]) +"},{"line_number":105,"context_line":"            \"\u0027 for more information.\")"},{"line_number":106,"context_line":"        # Sample:Try \u0027neutron help firewall-delete\u0027 for more information."},{"line_number":107,"context_line":"        raise exception"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_403482fa","line":104,"in_reply_to":"ba15a1d1_d6a2c3fb","updated":"2015-09-18 08:28:51.000000000","message":"Ok.\nI was not able to find the name of the exact command, because of which I was facing problems.\nLet me find out some more ways to fix this.","commit_id":"ff5c89febcac4d72d45e15f25fcef3567afff62c"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e0635166e142af2d1de43b01b4d768edcb2c2aae","unresolved":false,"context_lines":[{"line_number":102,"context_line":"    except SystemExit as exception:"},{"line_number":103,"context_line":"        print ("},{"line_number":104,"context_line":"            \"Try \u0027neutron help \" + str(cmd_parser.prog.split(\u0027 \u0027)[1]) +"},{"line_number":105,"context_line":"            \"\u0027 for more information.\")"},{"line_number":106,"context_line":"        # Sample:Try \u0027neutron help firewall-delete\u0027 for more information."},{"line_number":107,"context_line":"        raise exception"},{"line_number":108,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_d33895f0","line":105,"updated":"2015-09-17 12:45:10.000000000","message":"Use _() for i18n.","commit_id":"ff5c89febcac4d72d45e15f25fcef3567afff62c"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"2c499bcad914c03dda3cbb5f2604a95269b0dd60","unresolved":false,"context_lines":[{"line_number":102,"context_line":"    except SystemExit as exception:"},{"line_number":103,"context_line":"        print ("},{"line_number":104,"context_line":"            \"Try \u0027neutron help \" + str(cmd_parser.prog.split(\u0027 \u0027)[1]) +"},{"line_number":105,"context_line":"            \"\u0027 for more information.\")"},{"line_number":106,"context_line":"        # Sample:Try \u0027neutron help firewall-delete\u0027 for more information."},{"line_number":107,"context_line":"        raise exception"},{"line_number":108,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9a1a9d01_8634bdde","line":105,"in_reply_to":"9a1a9d01_75eef123","updated":"2015-09-25 01:30:07.000000000","message":"Ok, will take care of this","commit_id":"ff5c89febcac4d72d45e15f25fcef3567afff62c"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"f4a2fc4ce39b9079188c3f2960879e1f0ada9228","unresolved":false,"context_lines":[{"line_number":102,"context_line":"    except SystemExit as exception:"},{"line_number":103,"context_line":"        print ("},{"line_number":104,"context_line":"            \"Try \u0027neutron help \" + str(cmd_parser.prog.split(\u0027 \u0027)[1]) +"},{"line_number":105,"context_line":"            \"\u0027 for more information.\")"},{"line_number":106,"context_line":"        # Sample:Try \u0027neutron help firewall-delete\u0027 for more information."},{"line_number":107,"context_line":"        raise exception"},{"line_number":108,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9a1a9d01_75eef123","line":105,"in_reply_to":"ba15a1d1_80805a8c","updated":"2015-09-24 23:36:29.000000000","message":"print(_(\"Try \u0027neutron help %s\u0027 for more information) % str(cmd_parsed....)","commit_id":"ff5c89febcac4d72d45e15f25fcef3567afff62c"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"7b4bc2ad7dbd3c0f3977cb47e1cca4291d580eaf","unresolved":false,"context_lines":[{"line_number":102,"context_line":"    except SystemExit as exception:"},{"line_number":103,"context_line":"        print ("},{"line_number":104,"context_line":"            \"Try \u0027neutron help \" + str(cmd_parser.prog.split(\u0027 \u0027)[1]) +"},{"line_number":105,"context_line":"            \"\u0027 for more information.\")"},{"line_number":106,"context_line":"        # Sample:Try \u0027neutron help firewall-delete\u0027 for more information."},{"line_number":107,"context_line":"        raise exception"},{"line_number":108,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_80805a8c","line":105,"in_reply_to":"ba15a1d1_d33895f0","updated":"2015-09-18 08:28:51.000000000","message":"Not sure, can you give an example?\nI am not aware of i18n","commit_id":"ff5c89febcac4d72d45e15f25fcef3567afff62c"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e0635166e142af2d1de43b01b4d768edcb2c2aae","unresolved":false,"context_lines":[{"line_number":104,"context_line":"            \"Try \u0027neutron help \" + str(cmd_parser.prog.split(\u0027 \u0027)[1]) +"},{"line_number":105,"context_line":"            \"\u0027 for more information.\")"},{"line_number":106,"context_line":"        # Sample:Try \u0027neutron help firewall-delete\u0027 for more information."},{"line_number":107,"context_line":"        raise exception"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    if(isinstance(cmd, subnet.CreateSubnet) and not known_args.cidr):"},{"line_number":110,"context_line":"        cidr \u003d get_first_valid_cidr(_values_specs)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_561b1373","line":107,"updated":"2015-09-17 12:45:10.000000000","message":"Just use \"raise\" to reraise a same exception.","commit_id":"ff5c89febcac4d72d45e15f25fcef3567afff62c"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"c1c28a1abdbbb03df52b08c6642ffb0e8213b34f","unresolved":false,"context_lines":[{"line_number":104,"context_line":"            \"Try \u0027neutron help \" + str(cmd_parser.prog.split(\u0027 \u0027)[1]) +"},{"line_number":105,"context_line":"            \"\u0027 for more information.\")"},{"line_number":106,"context_line":"        # Sample:Try \u0027neutron help firewall-delete\u0027 for more information."},{"line_number":107,"context_line":"        raise exception"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    if(isinstance(cmd, subnet.CreateSubnet) and not known_args.cidr):"},{"line_number":110,"context_line":"        cidr \u003d get_first_valid_cidr(_values_specs)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_c0499d32","line":107,"in_reply_to":"ba15a1d1_561b1373","updated":"2015-09-24 05:22:07.000000000","message":"Done","commit_id":"ff5c89febcac4d72d45e15f25fcef3567afff62c"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"7b4bc2ad7dbd3c0f3977cb47e1cca4291d580eaf","unresolved":false,"context_lines":[{"line_number":104,"context_line":"            \"Try \u0027neutron help \" + str(cmd_parser.prog.split(\u0027 \u0027)[1]) +"},{"line_number":105,"context_line":"            \"\u0027 for more information.\")"},{"line_number":106,"context_line":"        # Sample:Try \u0027neutron help firewall-delete\u0027 for more information."},{"line_number":107,"context_line":"        raise exception"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    if(isinstance(cmd, subnet.CreateSubnet) and not known_args.cidr):"},{"line_number":110,"context_line":"        cidr \u003d get_first_valid_cidr(_values_specs)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_e07596ca","line":107,"in_reply_to":"ba15a1d1_561b1373","updated":"2015-09-18 08:28:51.000000000","message":"Just wanted to be thorough.\nBut will do :)","commit_id":"ff5c89febcac4d72d45e15f25fcef3567afff62c"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"a60d3ce64335eda37efca2370468c843974b61cc","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        known_args, _values_specs \u003d cmd_parser.parse_known_args(_argv)"},{"line_number":102,"context_line":"    except SystemExit as exception:"},{"line_number":103,"context_line":"        print ("},{"line_number":104,"context_line":"            \"Try \u0027neutron help \" + str(cmd_parser.prog.split(\u0027 \u0027)[1]) +"},{"line_number":105,"context_line":"            \"\u0027 for more information.\")"},{"line_number":106,"context_line":"        # Sample:Try \u0027neutron help firewall-delete\u0027 for more information."},{"line_number":107,"context_line":"        raise "}],"source_content_type":"text/x-python","patch_set":2,"id":"9a1a9d01_886ccc9d","line":104,"updated":"2015-09-24 23:53:41.000000000","message":"When run_command is called, cmd_parser.prog contains global arguments (which are defined in the main parser), so your solution does not work if users specify global arguments (like --os-endpoint, --os-tenant-name and so on).\nIn my first thougtht you need to handle an exception in run_subcommand.","commit_id":"d4de1c9f0c28f7006994e2496e0f05084d68bbb2"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"e9008bbafb17e515c45f6f8dcffbe4494f14180d","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        known_args, _values_specs \u003d cmd_parser.parse_known_args(_argv)"},{"line_number":102,"context_line":"    except SystemExit as exception:"},{"line_number":103,"context_line":"        print ("},{"line_number":104,"context_line":"            \"Try \u0027neutron help \" + str(cmd_parser.prog.split(\u0027 \u0027)[1]) +"},{"line_number":105,"context_line":"            \"\u0027 for more information.\")"},{"line_number":106,"context_line":"        # Sample:Try \u0027neutron help firewall-delete\u0027 for more information."},{"line_number":107,"context_line":"        raise "}],"source_content_type":"text/x-python","patch_set":2,"id":"9a1a9d01_06574d03","line":104,"in_reply_to":"9a1a9d01_886ccc9d","updated":"2015-09-25 01:29:43.000000000","message":"Ok, let me try to handle it at the run_subcommand level.\nI think it would be easier as well because I will have direct access to cmd_name than to change the cmd_parser.","commit_id":"d4de1c9f0c28f7006994e2496e0f05084d68bbb2"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"50930937fbc5475c9dcb27cd8d82056696da09a1","unresolved":false,"context_lines":[{"line_number":104,"context_line":"            \"Try \u0027neutron help \" + str(cmd_parser.prog.split(\u0027 \u0027)[1]) +"},{"line_number":105,"context_line":"            \"\u0027 for more information.\")"},{"line_number":106,"context_line":"        # Sample:Try \u0027neutron help firewall-delete\u0027 for more information."},{"line_number":107,"context_line":"        raise "},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    if(isinstance(cmd, subnet.CreateSubnet) and not known_args.cidr):"},{"line_number":110,"context_line":"        cidr \u003d get_first_valid_cidr(_values_specs)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba15a1d1_801ac5c4","line":107,"updated":"2015-09-24 05:38:06.000000000","message":"trailing space.\nDo u have a case for it?\nHow can I test it?","commit_id":"d4de1c9f0c28f7006994e2496e0f05084d68bbb2"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"9052ffcf808bdd2e0b8d2c77429c6b6a55a47a34","unresolved":false,"context_lines":[{"line_number":104,"context_line":"            \"Try \u0027neutron help \" + str(cmd_parser.prog.split(\u0027 \u0027)[1]) +"},{"line_number":105,"context_line":"            \"\u0027 for more information.\")"},{"line_number":106,"context_line":"        # Sample:Try \u0027neutron help firewall-delete\u0027 for more information."},{"line_number":107,"context_line":"        raise "},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    if(isinstance(cmd, subnet.CreateSubnet) and not known_args.cidr):"},{"line_number":110,"context_line":"        cidr \u003d get_first_valid_cidr(_values_specs)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba15a1d1_b6706f73","line":107,"in_reply_to":"ba15a1d1_801ac5c4","updated":"2015-09-24 06:39:17.000000000","message":"I ran tox before committing.\nNot sure how this was left.\n\n\u003eDo u have a case for it? How can I test it?\nDo you need a test case ?\nYou can simply run \"neutron firewall-delete\" without any additional parameters","commit_id":"d4de1c9f0c28f7006994e2496e0f05084d68bbb2"},{"author":{"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},"change_message_id":"91c22378a9fc5349e90eb6f7a412090dc8756824","unresolved":false,"context_lines":[{"line_number":819,"context_line":"            cmd_parser \u003d cmd.get_parser(full_name)"},{"line_number":820,"context_line":"            return run_command(cmd, cmd_parser, sub_argv)"},{"line_number":821,"context_line":"        except SystemExit:"},{"line_number":822,"context_line":"            print(_(\"Try \u0027neutron help %s\u0027 for more information.\")"},{"line_number":823,"context_line":"                  % str(cmd_name))"},{"line_number":824,"context_line":"            # Sample:Try \u0027neutron help firewall-delete\u0027 for more information."},{"line_number":825,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a2fa921_f611ea52","line":822,"updated":"2015-10-09 13:27:03.000000000","message":"Since this is an error condition, I think the message should be sent to stderr (file\u003dsys.stderr).","commit_id":"28a9cf82de3517595950bf2a6b0fa139474df24d"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"202841546988730bdfda0b278f6cfab44c2a1644","unresolved":false,"context_lines":[{"line_number":819,"context_line":"            cmd_parser \u003d cmd.get_parser(full_name)"},{"line_number":820,"context_line":"            return run_command(cmd, cmd_parser, sub_argv)"},{"line_number":821,"context_line":"        except SystemExit:"},{"line_number":822,"context_line":"            print(_(\"Try \u0027neutron help %s\u0027 for more information.\")"},{"line_number":823,"context_line":"                  % str(cmd_name))"},{"line_number":824,"context_line":"            # Sample:Try \u0027neutron help firewall-delete\u0027 for more information."},{"line_number":825,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a2fa921_4b7c5b20","line":822,"in_reply_to":"7a2fa921_f611ea52","updated":"2015-10-13 01:29:48.000000000","message":"Done","commit_id":"28a9cf82de3517595950bf2a6b0fa139474df24d"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"075ed907d13819af48c24153b14f7c38b151415a","unresolved":false,"context_lines":[{"line_number":819,"context_line":"            cmd_parser \u003d cmd.get_parser(full_name)"},{"line_number":820,"context_line":"            return run_command(cmd, cmd_parser, sub_argv)"},{"line_number":821,"context_line":"        except SystemExit:"},{"line_number":822,"context_line":"            print(_(\"Try \u0027neutron help %s\u0027 for more information.\")"},{"line_number":823,"context_line":"                  % str(cmd_name), file\u003dsys.stderr)"},{"line_number":824,"context_line":"            # Sample:Try \u0027neutron help firewall-delete\u0027 for more information."},{"line_number":825,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a2fa921_ef9e8c62","line":822,"updated":"2015-10-13 06:27:47.000000000","message":"It is trivial, but in order to keep code convention consistent, the format of string should be like this:\n\nprint(_(\"Try \u0027neutron help %s\u0027 for more information.\") %\n        str(cmd_name), file\u003dsys.stderr)","commit_id":"5d85f6e8b52892cc4d7c2b4a0d13e8b1b3135cda"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"0952f8d2cec4807a285a17db1db08d0388ab08f2","unresolved":false,"context_lines":[{"line_number":819,"context_line":"            cmd_parser \u003d cmd.get_parser(full_name)"},{"line_number":820,"context_line":"            return run_command(cmd, cmd_parser, sub_argv)"},{"line_number":821,"context_line":"        except SystemExit:"},{"line_number":822,"context_line":"            print(_(\"Try \u0027neutron help %s\u0027 for more information.\")"},{"line_number":823,"context_line":"                  % str(cmd_name), file\u003dsys.stderr)"},{"line_number":824,"context_line":"            # Sample:Try \u0027neutron help firewall-delete\u0027 for more information."},{"line_number":825,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a2fa921_c5092fdf","line":822,"in_reply_to":"7a2fa921_ef9e8c62","updated":"2015-10-13 07:17:29.000000000","message":"So basically % can be on the first line.\nWill do it","commit_id":"5d85f6e8b52892cc4d7c2b4a0d13e8b1b3135cda"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"b3e67e1d000939bc53157850a2b8460954d13159","unresolved":false,"context_lines":[{"line_number":820,"context_line":"            return run_command(cmd, cmd_parser, sub_argv)"},{"line_number":821,"context_line":"        except SystemExit:"},{"line_number":822,"context_line":"            print(_(\"Try \u0027neutron help %s\u0027 for more information.\") %"},{"line_number":823,"context_line":"                  str(cmd_name), file\u003dsys.stderr)"},{"line_number":824,"context_line":"            # Sample:Try \u0027neutron help firewall-delete\u0027 for more information."},{"line_number":825,"context_line":"            raise"},{"line_number":826,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa80f949_0d8af0bf","line":823,"updated":"2015-11-04 15:27:11.000000000","message":"Why do you need str() here? I think %s converts an object to a string/unicode representation, so I think \u0027cmd_name\u0027 is enough.","commit_id":"245fe9a2fb8f85ff15ee00668516a3917ec51922"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"22775672ca7b0acba76e1053676a13a451da8c74","unresolved":false,"context_lines":[{"line_number":820,"context_line":"            return run_command(cmd, cmd_parser, sub_argv)"},{"line_number":821,"context_line":"        except SystemExit:"},{"line_number":822,"context_line":"            print(_(\"Try \u0027neutron help %s\u0027 for more information.\") %"},{"line_number":823,"context_line":"                  str(cmd_name), file\u003dsys.stderr)"},{"line_number":824,"context_line":"            # Sample:Try \u0027neutron help firewall-delete\u0027 for more information."},{"line_number":825,"context_line":"            raise"},{"line_number":826,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa80f949_4c80b0f7","line":823,"in_reply_to":"fa80f949_0d8af0bf","updated":"2015-11-06 05:31:45.000000000","message":"Just wanted to play safe.\nBut yes you are right","commit_id":"245fe9a2fb8f85ff15ee00668516a3917ec51922"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"ebc0357a1795f24844c29ed013c1b295ebcf698a","unresolved":false,"context_lines":[{"line_number":821,"context_line":"        except SystemExit:"},{"line_number":822,"context_line":"            print(_(\"Try \u0027neutron help %s\u0027 for more information.\") %"},{"line_number":823,"context_line":"                  str(cmd_name), file\u003dsys.stderr)"},{"line_number":824,"context_line":"            # Sample:Try \u0027neutron help firewall-delete\u0027 for more information."},{"line_number":825,"context_line":"            raise"},{"line_number":826,"context_line":"        except Exception as e:"},{"line_number":827,"context_line":"            if self.options.verbose_level \u003e\u003d self.DEBUG_LEVEL:"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa80f949_ab4ba2af","line":824,"updated":"2015-11-04 05:40:35.000000000","message":"#sample is not required as people running client won\u0027t see the code always.","commit_id":"245fe9a2fb8f85ff15ee00668516a3917ec51922"},{"author":{"_account_id":16707,"name":"Mohankumar","email":"nmohankumar1011@gmail.com","username":"mohankumar_n"},"change_message_id":"02eca4528197db9780a0e91830aff66f9eff40aa","unresolved":false,"context_lines":[{"line_number":821,"context_line":"        except SystemExit:"},{"line_number":822,"context_line":"            print(_(\"Try \u0027neutron help %s\u0027 for more information.\") %"},{"line_number":823,"context_line":"                  str(cmd_name), file\u003dsys.stderr)"},{"line_number":824,"context_line":"            # Sample:Try \u0027neutron help firewall-delete\u0027 for more information."},{"line_number":825,"context_line":"            raise"},{"line_number":826,"context_line":"        except Exception as e:"},{"line_number":827,"context_line":"            if self.options.verbose_level \u003e\u003d self.DEBUG_LEVEL:"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa80f949_b7521512","line":824,"in_reply_to":"fa80f949_ab4ba2af","updated":"2015-11-04 14:30:05.000000000","message":"Manjeet : +1 ,IMO we can add help strings only if more necessary :)","commit_id":"245fe9a2fb8f85ff15ee00668516a3917ec51922"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"2ccd89aff7e61797de71f6fc811ab796e3b3d987","unresolved":false,"context_lines":[{"line_number":821,"context_line":"        except SystemExit:"},{"line_number":822,"context_line":"            print(_(\"Try \u0027neutron help %s\u0027 for more information.\") %"},{"line_number":823,"context_line":"                  str(cmd_name), file\u003dsys.stderr)"},{"line_number":824,"context_line":"            # Sample:Try \u0027neutron help firewall-delete\u0027 for more information."},{"line_number":825,"context_line":"            raise"},{"line_number":826,"context_line":"        except Exception as e:"},{"line_number":827,"context_line":"            if self.options.verbose_level \u003e\u003d self.DEBUG_LEVEL:"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa80f949_4b4a3685","line":824,"in_reply_to":"fa80f949_ab4ba2af","updated":"2015-11-04 05:42:07.000000000","message":"Thanks Manjeet.\nIts more for the readers of the code ( i.e. the future developers, reviewers etc.)","commit_id":"245fe9a2fb8f85ff15ee00668516a3917ec51922"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"b3e67e1d000939bc53157850a2b8460954d13159","unresolved":false,"context_lines":[{"line_number":821,"context_line":"        except SystemExit:"},{"line_number":822,"context_line":"            print(_(\"Try \u0027neutron help %s\u0027 for more information.\") %"},{"line_number":823,"context_line":"                  str(cmd_name), file\u003dsys.stderr)"},{"line_number":824,"context_line":"            # Sample:Try \u0027neutron help firewall-delete\u0027 for more information."},{"line_number":825,"context_line":"            raise"},{"line_number":826,"context_line":"        except Exception as e:"},{"line_number":827,"context_line":"            if self.options.verbose_level \u003e\u003d self.DEBUG_LEVEL:"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa80f949_cd814891","line":824,"in_reply_to":"fa80f949_b7521512","updated":"2015-11-04 15:27:11.000000000","message":"+1 for Manjeet and Mohankumar. I don\u0027t see any value to have an example here. If you would like to have a comment, it should describe more about its purpose or similar things. If we have an example here, we need to change two places when we change a message.","commit_id":"245fe9a2fb8f85ff15ee00668516a3917ec51922"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"22775672ca7b0acba76e1053676a13a451da8c74","unresolved":false,"context_lines":[{"line_number":821,"context_line":"        except SystemExit:"},{"line_number":822,"context_line":"            print(_(\"Try \u0027neutron help %s\u0027 for more information.\") %"},{"line_number":823,"context_line":"                  str(cmd_name), file\u003dsys.stderr)"},{"line_number":824,"context_line":"            # Sample:Try \u0027neutron help firewall-delete\u0027 for more information."},{"line_number":825,"context_line":"            raise"},{"line_number":826,"context_line":"        except Exception as e:"},{"line_number":827,"context_line":"            if self.options.verbose_level \u003e\u003d self.DEBUG_LEVEL:"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa80f949_2c7c4c1e","line":824,"in_reply_to":"fa80f949_cd814891","updated":"2015-11-06 05:31:45.000000000","message":"As per the popular consensus.... Done :)","commit_id":"245fe9a2fb8f85ff15ee00668516a3917ec51922"}],"neutronclient/tests/unit/test_cli20.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e0635166e142af2d1de43b01b4d768edcb2c2aae","unresolved":false,"context_lines":[{"line_number":274,"context_line":"                    \u0027X-Auth-Token\u0027, TOKEN)).AndReturn((MyResp(200), resstr))"},{"line_number":275,"context_line":"        args.extend([\u0027--request-format\u0027, self.format])"},{"line_number":276,"context_line":"        self.mox.ReplayAll()"},{"line_number":277,"context_line":"        cmd_parser \u003d cmd.get_parser(\u0027create \u0027 + resource)"},{"line_number":278,"context_line":"        if expected_exception:"},{"line_number":279,"context_line":"            self.assertRaises(expected_exception,"},{"line_number":280,"context_line":"                              shell.run_command, cmd, cmd_parser, args)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_16d27b5c","line":277,"updated":"2015-09-17 12:45:10.000000000","message":"unrelated change.","commit_id":"ff5c89febcac4d72d45e15f25fcef3567afff62c"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"7b4bc2ad7dbd3c0f3977cb47e1cca4291d580eaf","unresolved":false,"context_lines":[{"line_number":274,"context_line":"                    \u0027X-Auth-Token\u0027, TOKEN)).AndReturn((MyResp(200), resstr))"},{"line_number":275,"context_line":"        args.extend([\u0027--request-format\u0027, self.format])"},{"line_number":276,"context_line":"        self.mox.ReplayAll()"},{"line_number":277,"context_line":"        cmd_parser \u003d cmd.get_parser(\u0027create \u0027 + resource)"},{"line_number":278,"context_line":"        if expected_exception:"},{"line_number":279,"context_line":"            self.assertRaises(expected_exception,"},{"line_number":280,"context_line":"                              shell.run_command, cmd, cmd_parser, args)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_bb3d8fc5","line":277,"in_reply_to":"ba15a1d1_16d27b5c","updated":"2015-09-18 08:28:51.000000000","message":"Actually it was.\nThe cmd_parser works with ´cliff´, where the commandManager has been defined.\nCommandManager class has a function which removes _ to space.\nBefore my bug fix, create_ and update_ would work as the CommandManager would change _ to space and the same attributes would go to cmd.run()\n\nDue to my split function being implemented in the main code, the UT had to be changed to remove _\nI may be reverting this change in UT file as I am modifying the main code.\n\nWill provide you with the updated code soon.","commit_id":"ff5c89febcac4d72d45e15f25fcef3567afff62c"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e0635166e142af2d1de43b01b4d768edcb2c2aae","unresolved":false,"context_lines":[{"line_number":488,"context_line":"                \u0027X-Auth-Token\u0027, TOKEN)).AndReturn((MyResp(204), None))"},{"line_number":489,"context_line":"        args.extend([\u0027--request-format\u0027, self.format])"},{"line_number":490,"context_line":"        self.mox.ReplayAll()"},{"line_number":491,"context_line":"        cmd_parser \u003d cmd.get_parser(\"update \" + cmd_resource)"},{"line_number":492,"context_line":"        shell.run_command(cmd, cmd_parser, args)"},{"line_number":493,"context_line":"        self.mox.VerifyAll()"},{"line_number":494,"context_line":"        self.mox.UnsetStubs()"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_36d77f4c","line":491,"updated":"2015-09-17 12:45:10.000000000","message":"unrelated change.","commit_id":"ff5c89febcac4d72d45e15f25fcef3567afff62c"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"7b4bc2ad7dbd3c0f3977cb47e1cca4291d580eaf","unresolved":false,"context_lines":[{"line_number":488,"context_line":"                \u0027X-Auth-Token\u0027, TOKEN)).AndReturn((MyResp(204), None))"},{"line_number":489,"context_line":"        args.extend([\u0027--request-format\u0027, self.format])"},{"line_number":490,"context_line":"        self.mox.ReplayAll()"},{"line_number":491,"context_line":"        cmd_parser \u003d cmd.get_parser(\"update \" + cmd_resource)"},{"line_number":492,"context_line":"        shell.run_command(cmd, cmd_parser, args)"},{"line_number":493,"context_line":"        self.mox.VerifyAll()"},{"line_number":494,"context_line":"        self.mox.UnsetStubs()"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_db3883d5","line":491,"in_reply_to":"ba15a1d1_36d77f4c","updated":"2015-09-18 08:28:51.000000000","message":"Same as above","commit_id":"ff5c89febcac4d72d45e15f25fcef3567afff62c"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"50930937fbc5475c9dcb27cd8d82056696da09a1","unresolved":false,"context_lines":[{"line_number":274,"context_line":"                    \u0027X-Auth-Token\u0027, TOKEN)).AndReturn((MyResp(200), resstr))"},{"line_number":275,"context_line":"        args.extend([\u0027--request-format\u0027, self.format])"},{"line_number":276,"context_line":"        self.mox.ReplayAll()"},{"line_number":277,"context_line":"        cmd_parser \u003d cmd.get_parser(\u0027create \u0027 + resource)"},{"line_number":278,"context_line":"        if expected_exception:"},{"line_number":279,"context_line":"            self.assertRaises(expected_exception,"},{"line_number":280,"context_line":"                              shell.run_command, cmd, cmd_parser, args)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba15a1d1_2013b9b9","line":277,"updated":"2015-09-24 05:38:06.000000000","message":"If u prove it needs to be changed (but I don\u0027t think), you should do it in another patch","commit_id":"d4de1c9f0c28f7006994e2496e0f05084d68bbb2"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"e9008bbafb17e515c45f6f8dcffbe4494f14180d","unresolved":false,"context_lines":[{"line_number":274,"context_line":"                    \u0027X-Auth-Token\u0027, TOKEN)).AndReturn((MyResp(200), resstr))"},{"line_number":275,"context_line":"        args.extend([\u0027--request-format\u0027, self.format])"},{"line_number":276,"context_line":"        self.mox.ReplayAll()"},{"line_number":277,"context_line":"        cmd_parser \u003d cmd.get_parser(\u0027create \u0027 + resource)"},{"line_number":278,"context_line":"        if expected_exception:"},{"line_number":279,"context_line":"            self.assertRaises(expected_exception,"},{"line_number":280,"context_line":"                              shell.run_command, cmd, cmd_parser, args)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a1a9d01_c641553b","line":277,"in_reply_to":"9a1a9d01_4826b4bb","updated":"2015-09-25 01:29:43.000000000","message":"Ok, I will check for it.","commit_id":"d4de1c9f0c28f7006994e2496e0f05084d68bbb2"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"9052ffcf808bdd2e0b8d2c77429c6b6a55a47a34","unresolved":false,"context_lines":[{"line_number":274,"context_line":"                    \u0027X-Auth-Token\u0027, TOKEN)).AndReturn((MyResp(200), resstr))"},{"line_number":275,"context_line":"        args.extend([\u0027--request-format\u0027, self.format])"},{"line_number":276,"context_line":"        self.mox.ReplayAll()"},{"line_number":277,"context_line":"        cmd_parser \u003d cmd.get_parser(\u0027create \u0027 + resource)"},{"line_number":278,"context_line":"        if expected_exception:"},{"line_number":279,"context_line":"            self.assertRaises(expected_exception,"},{"line_number":280,"context_line":"                              shell.run_command, cmd, cmd_parser, args)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba15a1d1_964c4b43","line":277,"in_reply_to":"ba15a1d1_2013b9b9","updated":"2015-09-24 06:39:17.000000000","message":"Dear gongysh,\nPlease refer to my  changes in shell.py\nAs I am trying to find the 2nd value after split with \u0027 \u0027, the unit test with create_ and update_ were failing.\nRemoving them allowed successful execution of the UT.\nAlso, cliff.py converts _ to spaces in the CommandManager, so the \"create_resource\" given in the earlier Unit test could be converted to \"create resource\" automatically by CommandManager class.\n\nThe inputs given bu the user however would always be in the form of  \"create resource\"\n\nTherefore I removed the _","commit_id":"d4de1c9f0c28f7006994e2496e0f05084d68bbb2"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"a60d3ce64335eda37efca2370468c843974b61cc","unresolved":false,"context_lines":[{"line_number":274,"context_line":"                    \u0027X-Auth-Token\u0027, TOKEN)).AndReturn((MyResp(200), resstr))"},{"line_number":275,"context_line":"        args.extend([\u0027--request-format\u0027, self.format])"},{"line_number":276,"context_line":"        self.mox.ReplayAll()"},{"line_number":277,"context_line":"        cmd_parser \u003d cmd.get_parser(\u0027create \u0027 + resource)"},{"line_number":278,"context_line":"        if expected_exception:"},{"line_number":279,"context_line":"            self.assertRaises(expected_exception,"},{"line_number":280,"context_line":"                              shell.run_command, cmd, cmd_parser, args)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a1a9d01_4826b4bb","line":277,"in_reply_to":"ba15a1d1_964c4b43","updated":"2015-09-24 23:53:41.000000000","message":"I am not still convinced. Replacing underscore with a space is very tricky workaround. Have you check what value is actually passed when you use neutron command? In a normal run, something like \u0027neutron net-create\u0027 is passed to a subparser. I think this is the reason of the different behavior.\nAt least I vote -1 for the current solution.","commit_id":"d4de1c9f0c28f7006994e2496e0f05084d68bbb2"}],"neutronclient/tests/unit/test_shell.py":[{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"516f04f457b2e87db0dcdfca00e502e0dae3e025","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                fixtures.EnvironmentVariable("},{"line_number":67,"context_line":"                    var, self.FAKE_ENV[var]))"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def shell(self, argstr, check\u003dFalse, return_val\u003d0):"},{"line_number":70,"context_line":"        orig \u003d (sys.stdout, sys.stderr)"},{"line_number":71,"context_line":"        clean_env \u003d {}"},{"line_number":72,"context_line":"        _old_env, os.environ \u003d os.environ, clean_env.copy()"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a1a9d01_b713295c","line":69,"updated":"2015-09-25 05:12:06.000000000","message":"I have added this return_val so that if there are any shell related test cases where an error/exception/incorrect value is returned, then this can be used.\nAs it has a default value of 0, it is not impacting previously written test cases, and allows the inclusion of other test cases in shell.py where outcome may be  !\u003d0","commit_id":"e67beccd5f7f824b408e4243a5f63af506a527ab"},{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"0ff5f2c501bf91720e6aa3b6d29e23b69a764ccb","unresolved":false,"context_lines":[{"line_number":516,"context_line":"            \u0027--os-username test --os-password test --os-project-id test \u0027"},{"line_number":517,"context_line":"            \u0027--os-auth-strategy keystone --os-auth-url %s firewall-rule-create\u0027"},{"line_number":518,"context_line":"            % DEFAULT_AUTH_URL)"},{"line_number":519,"context_line":"        stdout, stderr \u003d self.shell(cmd, check\u003dTrue, return_val\u003d2)"},{"line_number":520,"context_line":"        for string in stderr.split():"},{"line_number":521,"context_line":"            if \u0027neutron help\u0027 in string:"},{"line_number":522,"context_line":"                self.assertIn("}],"source_content_type":"text/x-python","patch_set":5,"id":"9a1a9d01_8a09d72e","line":519,"updated":"2015-10-05 07:12:44.000000000","message":"IMHO, hard coded values are difficult to understand. As a developer, I am unable to understand what does \u00272\u0027 stands for in \u0027return_val\u003d2\u0027.\n\nCan you please use constants instead?","commit_id":"e67beccd5f7f824b408e4243a5f63af506a527ab"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"075ed907d13819af48c24153b14f7c38b151415a","unresolved":false,"context_lines":[{"line_number":516,"context_line":"        self.useFixture(fixtures.FakeLogger(level\u003dlogging.DEBUG))"},{"line_number":517,"context_line":"        cmd \u003d ("},{"line_number":518,"context_line":"            \u0027--os-username test --os-password test --os-project-id test \u0027"},{"line_number":519,"context_line":"            \u0027--os-auth-strategy keystone --os-auth-url %s firewall-rule-create\u0027"},{"line_number":520,"context_line":"            % DEFAULT_AUTH_URL)"},{"line_number":521,"context_line":"        stdout, stderr \u003d self.shell(cmd, check\u003dTrue, return_val\u003d2)"},{"line_number":522,"context_line":"        for string in stderr.split():"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a2fa921_4fff8034","line":519,"updated":"2015-10-13 06:27:47.000000000","message":"The same as last comment, the % operator should be the same line as the string.","commit_id":"5d85f6e8b52892cc4d7c2b4a0d13e8b1b3135cda"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"5876107a06dcf91f3de5a4aecf3a477571fa0913","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                fixtures.EnvironmentVariable("},{"line_number":67,"context_line":"                    var, self.FAKE_ENV[var]))"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def shell(self, argstr, check\u003dFalse, return_val\u003d0):"},{"line_number":70,"context_line":"        # return_val is the expected return value after executing"},{"line_number":71,"context_line":"        # the command in NeutronShell"},{"line_number":72,"context_line":"        orig \u003d (sys.stdout, sys.stderr)"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa80f949_db6494e6","line":69,"updated":"2015-11-04 21:38:40.000000000","message":"return_val is used to pass the expected value of the exit code.\n\"expected_code\" or \"expected_value\" looks better.","commit_id":"245fe9a2fb8f85ff15ee00668516a3917ec51922"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"51b3c12af11dfc80d27653d734440fc996dcf388","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                fixtures.EnvironmentVariable("},{"line_number":67,"context_line":"                    var, self.FAKE_ENV[var]))"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def shell(self, argstr, check\u003dFalse, return_val\u003d0):"},{"line_number":70,"context_line":"        # return_val is the expected return value after executing"},{"line_number":71,"context_line":"        # the command in NeutronShell"},{"line_number":72,"context_line":"        orig \u003d (sys.stdout, sys.stderr)"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa80f949_4cfc3072","line":69,"in_reply_to":"fa80f949_cc74a037","updated":"2015-11-06 05:32:33.000000000","message":"Sorry, expected_val","commit_id":"245fe9a2fb8f85ff15ee00668516a3917ec51922"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"39c46d1dc3dc63868acc29ec93d31ccbdd5a3720","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                fixtures.EnvironmentVariable("},{"line_number":67,"context_line":"                    var, self.FAKE_ENV[var]))"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def shell(self, argstr, check\u003dFalse, return_val\u003d0):"},{"line_number":70,"context_line":"        # return_val is the expected return value after executing"},{"line_number":71,"context_line":"        # the command in NeutronShell"},{"line_number":72,"context_line":"        orig \u003d (sys.stdout, sys.stderr)"}],"source_content_type":"text/x-python","patch_set":10,"id":"da85f559_d2f58783","line":69,"in_reply_to":"fa80f949_db6494e6","updated":"2015-11-09 04:01:15.000000000","message":"Done","commit_id":"245fe9a2fb8f85ff15ee00668516a3917ec51922"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"22775672ca7b0acba76e1053676a13a451da8c74","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                fixtures.EnvironmentVariable("},{"line_number":67,"context_line":"                    var, self.FAKE_ENV[var]))"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def shell(self, argstr, check\u003dFalse, return_val\u003d0):"},{"line_number":70,"context_line":"        # return_val is the expected return value after executing"},{"line_number":71,"context_line":"        # the command in NeutronShell"},{"line_number":72,"context_line":"        orig \u003d (sys.stdout, sys.stderr)"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa80f949_cc74a037","line":69,"in_reply_to":"fa80f949_db6494e6","updated":"2015-11-06 05:31:45.000000000","message":"Using expected_code","commit_id":"245fe9a2fb8f85ff15ee00668516a3917ec51922"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"b3e67e1d000939bc53157850a2b8460954d13159","unresolved":false,"context_lines":[{"line_number":517,"context_line":"        cmd \u003d ("},{"line_number":518,"context_line":"            \u0027--os-username test --os-password test --os-project-id test \u0027"},{"line_number":519,"context_line":"            \u0027--os-auth-strategy keystone --os-auth-url \u0027"},{"line_number":520,"context_line":"            \u0027%s firewall-rule-create\u0027 %"},{"line_number":521,"context_line":"            DEFAULT_AUTH_URL)"},{"line_number":522,"context_line":"        stdout, stderr \u003d self.shell(cmd, check\u003dTrue, return_val\u003d2)"},{"line_number":523,"context_line":"        for string in stderr.split():"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa80f949_a8871260","line":520,"updated":"2015-11-04 15:27:11.000000000","message":"It is better to use a sub-command related to neutron core resources like network.","commit_id":"245fe9a2fb8f85ff15ee00668516a3917ec51922"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"22775672ca7b0acba76e1053676a13a451da8c74","unresolved":false,"context_lines":[{"line_number":517,"context_line":"        cmd \u003d ("},{"line_number":518,"context_line":"            \u0027--os-username test --os-password test --os-project-id test \u0027"},{"line_number":519,"context_line":"            \u0027--os-auth-strategy keystone --os-auth-url \u0027"},{"line_number":520,"context_line":"            \u0027%s firewall-rule-create\u0027 %"},{"line_number":521,"context_line":"            DEFAULT_AUTH_URL)"},{"line_number":522,"context_line":"        stdout, stderr \u003d self.shell(cmd, check\u003dTrue, return_val\u003d2)"},{"line_number":523,"context_line":"        for string in stderr.split():"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa80f949_ecbf24a8","line":520,"in_reply_to":"fa80f949_a8871260","updated":"2015-11-06 05:31:45.000000000","message":"The error message generated returns value \u003e 0.\nThat is why it was easier to use the shell() function, and that was the reason why I preferred not using the sub_command() function, as I needed to directly access the stderr and pass the requisite expected value.\n\nI would prefer using the shell() function .","commit_id":"245fe9a2fb8f85ff15ee00668516a3917ec51922"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"39c46d1dc3dc63868acc29ec93d31ccbdd5a3720","unresolved":false,"context_lines":[{"line_number":517,"context_line":"        cmd \u003d ("},{"line_number":518,"context_line":"            \u0027--os-username test --os-password test --os-project-id test \u0027"},{"line_number":519,"context_line":"            \u0027--os-auth-strategy keystone --os-auth-url \u0027"},{"line_number":520,"context_line":"            \u0027%s firewall-rule-create\u0027 %"},{"line_number":521,"context_line":"            DEFAULT_AUTH_URL)"},{"line_number":522,"context_line":"        stdout, stderr \u003d self.shell(cmd, check\u003dTrue, return_val\u003d2)"},{"line_number":523,"context_line":"        for string in stderr.split():"}],"source_content_type":"text/x-python","patch_set":10,"id":"da85f559_409c7869","line":520,"in_reply_to":"fa80f949_ce4c90ca","updated":"2015-11-09 04:01:15.000000000","message":"Oh, now i understand.\nSure, I will create a test case with Neturon Core API\u0027s related CLI :)\nUpdate:Please check Patch#12 . I am using port-create","commit_id":"245fe9a2fb8f85ff15ee00668516a3917ec51922"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"2592bbaf210e8a3dd1ef6aa78dde211236f81e94","unresolved":false,"context_lines":[{"line_number":517,"context_line":"        cmd \u003d ("},{"line_number":518,"context_line":"            \u0027--os-username test --os-password test --os-project-id test \u0027"},{"line_number":519,"context_line":"            \u0027--os-auth-strategy keystone --os-auth-url \u0027"},{"line_number":520,"context_line":"            \u0027%s firewall-rule-create\u0027 %"},{"line_number":521,"context_line":"            DEFAULT_AUTH_URL)"},{"line_number":522,"context_line":"        stdout, stderr \u003d self.shell(cmd, check\u003dTrue, return_val\u003d2)"},{"line_number":523,"context_line":"        for string in stderr.split():"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa80f949_ce4c90ca","line":520,"in_reply_to":"fa80f949_ecbf24a8","updated":"2015-11-06 11:13:26.000000000","message":"perhaps we are not in the same page.\n\nI am just wondering why you use \u0027firewall-rule-create\u0027 here.\nIt is an extension of neutron and if there is no special reason I think it is better to use \u0027net-create\u0027 or similar one which are defined in Neutron Core API.","commit_id":"245fe9a2fb8f85ff15ee00668516a3917ec51922"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"b3e67e1d000939bc53157850a2b8460954d13159","unresolved":false,"context_lines":[{"line_number":525,"context_line":"                self.assertIn("},{"line_number":526,"context_line":"                    \"Try \u0027neutron help firewall-rule-create\u0027 \""},{"line_number":527,"context_line":"                    \"for more information\","},{"line_number":528,"context_line":"                    string)"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa80f949_08b09e42","line":528,"updated":"2015-11-04 15:27:11.000000000","message":"This test case is not enough. If \u0027neutron help\u0027 is not contained in stderr, this test would succeed.","commit_id":"245fe9a2fb8f85ff15ee00668516a3917ec51922"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"22775672ca7b0acba76e1053676a13a451da8c74","unresolved":false,"context_lines":[{"line_number":525,"context_line":"                self.assertIn("},{"line_number":526,"context_line":"                    \"Try \u0027neutron help firewall-rule-create\u0027 \""},{"line_number":527,"context_line":"                    \"for more information\","},{"line_number":528,"context_line":"                    string)"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa80f949_ecd644f0","line":528,"in_reply_to":"fa80f949_08b09e42","updated":"2015-11-06 05:31:45.000000000","message":"The purpose of this code is that if a user passes a wrong value /argument/attribute in the CLI, and the CLI generates a SystemExit exception , then the ´neutron help´ information is generated.\nAs per the current code, SystemExit has been used at locations where some wrong value has been specified by the user in the CLI.\nThe following test case caters to that use-case.","commit_id":"245fe9a2fb8f85ff15ee00668516a3917ec51922"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"39c46d1dc3dc63868acc29ec93d31ccbdd5a3720","unresolved":false,"context_lines":[{"line_number":525,"context_line":"                self.assertIn("},{"line_number":526,"context_line":"                    \"Try \u0027neutron help firewall-rule-create\u0027 \""},{"line_number":527,"context_line":"                    \"for more information\","},{"line_number":528,"context_line":"                    string)"}],"source_content_type":"text/x-python","patch_set":10,"id":"da85f559_80a02092","line":528,"in_reply_to":"fa80f949_8a23cda6","updated":"2015-11-09 04:01:15.000000000","message":"Ok, I understood that.\nThe pain point you are highlighting is the IF condition.\nI will rewrite it so that if \u0027neutron help\u0027 is not there in the stderr, then we get a negative result.\nUpdate: I have changed the logic a bit.\nIf the string exists , then a flag will be made true, and I can check for the flag at the end of the test case.\nHope it supports my cause.","commit_id":"245fe9a2fb8f85ff15ee00668516a3917ec51922"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"2592bbaf210e8a3dd1ef6aa78dde211236f81e94","unresolved":false,"context_lines":[{"line_number":525,"context_line":"                self.assertIn("},{"line_number":526,"context_line":"                    \"Try \u0027neutron help firewall-rule-create\u0027 \""},{"line_number":527,"context_line":"                    \"for more information\","},{"line_number":528,"context_line":"                    string)"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa80f949_2a3d01c4","line":528,"in_reply_to":"fa80f949_ecd644f0","updated":"2015-11-06 11:13:26.000000000","message":"I am discussing about the strategy of writing a test, not what actually happens.\n\nThe most important point I would like to say is that a test code should not depend on a context. Thus, \"check if something happens\" is not a good test code. A test code should check if an expected result is got or not, i.e. a test should be deterministic.\n\nIn this case, shell() at L.522 is expected to return a specific message, so the test should fail if the expected message is not contained in stderr.\n\nIn the current version, if self.shell() at L.522 just return \u0027\u0027 for stderr, the test will succeed. I don\u0027t think it is an expected behavior.","commit_id":"245fe9a2fb8f85ff15ee00668516a3917ec51922"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"2592bbaf210e8a3dd1ef6aa78dde211236f81e94","unresolved":false,"context_lines":[{"line_number":525,"context_line":"                self.assertIn("},{"line_number":526,"context_line":"                    \"Try \u0027neutron help firewall-rule-create\u0027 \""},{"line_number":527,"context_line":"                    \"for more information\","},{"line_number":528,"context_line":"                    string)"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa80f949_8a23cda6","line":528,"in_reply_to":"fa80f949_ecd644f0","updated":"2015-11-06 11:13:26.000000000","message":"I am discussing about the strategy of writing a test, not what actually happens.\n\nThe most important point I would like to say is that a test code should not depend on a context. Thus, \"check if something happens\" is not a good test code. A test code should check if an expected result is got or not, i.e. a test should be deterministic.\n\nIn this case, shell() at L.522 is expected to return a specific message, so the test should fail if the expected message is not contained in stderr.\n\nIn the current version, if self.shell() at L.522 just return \u0027\u0027 for stderr, the test will succeed. I don\u0027t think it is an expected behavior.","commit_id":"245fe9a2fb8f85ff15ee00668516a3917ec51922"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"e071b0729e9093f1f3f07d84e50c669239b1a638","unresolved":false,"context_lines":[{"line_number":524,"context_line":"        search_str \u003d \"Try \u0027neutron help port-create\u0027 for more information\""},{"line_number":525,"context_line":"        for string in stderr.split(\u0027\\n\u0027):"},{"line_number":526,"context_line":"            if search_str in string:"},{"line_number":527,"context_line":"                assert_flag \u003d True"},{"line_number":528,"context_line":"        self.assertTrue(assert_flag)"}],"source_content_type":"text/x-python","patch_set":14,"id":"da85f559_44de9e6e","line":527,"updated":"2015-11-09 13:41:04.000000000","message":"assert_flag is unnecessary. Consider:\n\n  self.assertTrue(any(search_str in s for s in stderr.split(\u0027\\n\u0027))","commit_id":"e36ae81789a950ee5dbe0a8a8e7e0bdf0c3ae5a4"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"b59eed9a60cf587e844b3637bd08e7a5246ff349","unresolved":false,"context_lines":[{"line_number":524,"context_line":"        search_str \u003d \"Try \u0027neutron help port-create\u0027 for more information\""},{"line_number":525,"context_line":"        for string in stderr.split(\u0027\\n\u0027):"},{"line_number":526,"context_line":"            if search_str in string:"},{"line_number":527,"context_line":"                assert_flag \u003d True"},{"line_number":528,"context_line":"        self.assertTrue(assert_flag)"}],"source_content_type":"text/x-python","patch_set":14,"id":"da85f559_f7e08ace","line":527,"in_reply_to":"da85f559_44de9e6e","updated":"2015-11-10 01:42:03.000000000","message":"Ok, will do so :)","commit_id":"e36ae81789a950ee5dbe0a8a8e7e0bdf0c3ae5a4"}]}
