)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":21514,"name":"Huanxuan Ao","email":"aohuanxuan@163.com","username":"aohuanxuan"},"change_message_id":"ab0d33fdf50ea0e97e4fe4f722ec308c0b1544f9","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add \"qos-policy\" option to \"port create\" \u0026 \"port set\""},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch adds \"qos-policy\" option to \"port create\" command,"},{"line_number":10,"context_line":"and \"qos-policy\", \"no-qos-policy\" options to \"port set\" command"},{"line_number":11,"context_line":"and \"qos-policy\" option to \"port unset\"."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I78072e1ff0dd30a2e23a0fb833ce6ab5cf246016"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"bff0334d_8d82f44e","line":10,"range":{"start_line":10,"start_character":18,"end_line":10,"end_character":33},"updated":"2017-04-06 00:36:48.000000000","message":"no \"no-qos-policy\" now","commit_id":"5ff2cfd042de7afc4323a3b306ff5be1882fba46"}],"doc/source/command-objects/port.rst":[{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"42727bdea3f944a3bcdafea5434fcf0f6ec91607","unresolved":false,"context_lines":[{"line_number":371,"context_line":"        [--fixed-ip subnet\u003d\u003csubnet\u003e,ip-address\u003d\u003cip-address\u003e [...]]"},{"line_number":372,"context_line":"        [--binding-profile \u003cbinding-profile-key\u003e [...]]"},{"line_number":373,"context_line":"        [--security-group \u003csecurity-group\u003e [...]]"},{"line_number":374,"context_line":"        [--allowed-address ip-address\u003d\u003cip-address\u003e[,mac-address\u003d\u003cmac-address\u003e] [...]]"},{"line_number":375,"context_line":"        \u003cport\u003e"},{"line_number":376,"context_line":""},{"line_number":377,"context_line":".. option:: --fixed-ip subnet\u003d\u003csubnet\u003e,ip-address\u003d\u003cip-address\u003e"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da36d5c6_8f5c4b7e","line":374,"updated":"2017-02-24 16:51:17.000000000","message":"We can add an unset command for qos-policy, isnt it?","commit_id":"ab073340d8881fc4b752781049f67f0d6ae1da7c"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"47a51133bdf50cc232f25b7819a8b885942ed670","unresolved":false,"context_lines":[{"line_number":371,"context_line":"        [--fixed-ip subnet\u003d\u003csubnet\u003e,ip-address\u003d\u003cip-address\u003e [...]]"},{"line_number":372,"context_line":"        [--binding-profile \u003cbinding-profile-key\u003e [...]]"},{"line_number":373,"context_line":"        [--security-group \u003csecurity-group\u003e [...]]"},{"line_number":374,"context_line":"        [--allowed-address ip-address\u003d\u003cip-address\u003e[,mac-address\u003d\u003cmac-address\u003e] [...]]"},{"line_number":375,"context_line":"        \u003cport\u003e"},{"line_number":376,"context_line":""},{"line_number":377,"context_line":".. option:: --fixed-ip subnet\u003d\u003csubnet\u003e,ip-address\u003d\u003cip-address\u003e"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da36d5c6_72a46007","line":374,"in_reply_to":"da36d5c6_8f5c4b7e","updated":"2017-02-24 16:52:38.000000000","message":"Correction : We already have the implementation, but its missing in the RST file","commit_id":"ab073340d8881fc4b752781049f67f0d6ae1da7c"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"ab22a58489f33ff9b3cacaa9a7d31877dc2a0204","unresolved":false,"context_lines":[{"line_number":371,"context_line":"        [--fixed-ip subnet\u003d\u003csubnet\u003e,ip-address\u003d\u003cip-address\u003e [...]]"},{"line_number":372,"context_line":"        [--binding-profile \u003cbinding-profile-key\u003e [...]]"},{"line_number":373,"context_line":"        [--security-group \u003csecurity-group\u003e [...]]"},{"line_number":374,"context_line":"        [--allowed-address ip-address\u003d\u003cip-address\u003e[,mac-address\u003d\u003cmac-address\u003e] [...]]"},{"line_number":375,"context_line":"        \u003cport\u003e"},{"line_number":376,"context_line":""},{"line_number":377,"context_line":".. option:: --fixed-ip subnet\u003d\u003csubnet\u003e,ip-address\u003d\u003cip-address\u003e"}],"source_content_type":"text/x-rst","patch_set":4,"id":"da36d5c6_d23fccb1","line":374,"in_reply_to":"da36d5c6_8f5c4b7e","updated":"2017-02-24 19:17:08.000000000","message":"Done","commit_id":"ab073340d8881fc4b752781049f67f0d6ae1da7c"},{"author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"change_message_id":"a1b3044a62259ee6f2913affae66da944dd1e7f2","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        [--no-binding-profile]"},{"line_number":224,"context_line":"        [--host \u003chost-id\u003e]"},{"line_number":225,"context_line":"        [--qos-policy \u003cqos-policy\u003e]"},{"line_number":226,"context_line":"        [--no-qos-policy]"},{"line_number":227,"context_line":"        [--enable | --disable]"},{"line_number":228,"context_line":"        [--name \u003cname\u003e]"},{"line_number":229,"context_line":"        [--mac-address \u003cmac-address\u003e]"}],"source_content_type":"text/x-rst","patch_set":8,"id":"dfeb2761_3960a8a5","line":226,"updated":"2017-04-01 20:16:37.000000000","message":"Since qos policy is a singleton on a port, not a list, we do not need --no-qos-policy.  We\u0027ve added those to attributes that have multiple values to facilitate replacing the list in a single command.  here the replacement can be done directly.","commit_id":"53d14d7c212c8b0a309b942a6e47845edbafdb7b"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"3a67f7f1842025d799c135cd69af336d8fcdb549","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        [--no-binding-profile]"},{"line_number":224,"context_line":"        [--host \u003chost-id\u003e]"},{"line_number":225,"context_line":"        [--qos-policy \u003cqos-policy\u003e]"},{"line_number":226,"context_line":"        [--no-qos-policy]"},{"line_number":227,"context_line":"        [--enable | --disable]"},{"line_number":228,"context_line":"        [--name \u003cname\u003e]"},{"line_number":229,"context_line":"        [--mac-address \u003cmac-address\u003e]"}],"source_content_type":"text/x-rst","patch_set":8,"id":"bff0334d_49dcf945","line":226,"in_reply_to":"dfeb2761_3960a8a5","updated":"2017-04-05 14:25:20.000000000","message":"Done. I\u0027ll remove it.","commit_id":"53d14d7c212c8b0a309b942a6e47845edbafdb7b"}],"openstackclient/network/v2/port.py":[{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"0341fa054c64df72297a48b08bc4989c569fb04b","unresolved":false,"context_lines":[{"line_number":547,"context_line":"                   \"Specify both --binding-profile and --no-binding-profile \""},{"line_number":548,"context_line":"                   \"to overwrite the current binding:profile information.\")"},{"line_number":549,"context_line":"        )"},{"line_number":550,"context_line":"        qos_policy_group \u003d parser.add_mutually_exclusive_group()"},{"line_number":551,"context_line":"        qos_policy_group.add_argument("},{"line_number":552,"context_line":"            \u0027--qos-policy\u0027,"},{"line_number":553,"context_line":"            metavar\u003d\u0027\u003cqos-policy\u003e\u0027,"},{"line_number":554,"context_line":"            help\u003d_(\"Attach QoS policy to this port (name or ID)\")"},{"line_number":555,"context_line":"        )"},{"line_number":556,"context_line":"        qos_policy_group.add_argument("},{"line_number":557,"context_line":"            \u0027--no-qos-policy\u0027,"},{"line_number":558,"context_line":"            action\u003d\u0027store_true\u0027,"},{"line_number":559,"context_line":"            help\u003d_(\"Clear existing QoS policy of this port\")"},{"line_number":560,"context_line":"        )"},{"line_number":561,"context_line":"        parser.add_argument("},{"line_number":562,"context_line":"            \u0027port\u0027,"},{"line_number":563,"context_line":"            metavar\u003d\"\u003cport\u003e\","}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5201f7_c531fc0c","line":560,"range":{"start_line":550,"start_character":8,"end_line":560,"end_character":9},"updated":"2017-01-12 05:50:11.000000000","message":"dont do this as mutually exclusive.\nBy keeping it NOT Mutually Exclusive, you allow a user to change the QoS policy by specifying both --qos-policy and --no-qos-policy\n\nExample:\n\n  openstack port create --qos-policy ABC\n\nThis will create a port with associated QoS policy ABC\n\n  openstack port set --no-qos-policy --qos-policy DEF\n\nThis will modify the QoS policy of the port from ABC to DEF\n\n  openstack port set --no-qos-policy\n\nThis will remove the QoS policy \n\n\n\nPlease refer https://blueprints.launchpad.net/openstack/?searchtext\u003dallow-overwrite-set-options for more information.","commit_id":"87e9c727e0ce3fadb2516c248547f69fe17f8fe6"},{"author":{"_account_id":20079,"name":"Ha Van Tu","email":"tuhv@vn.fujitsu.com","username":"tuhv"},"change_message_id":"87a9d533bdf8d0d5e79c2d8e9d3c2d59819ef297","unresolved":false,"context_lines":[{"line_number":547,"context_line":"                   \"Specify both --binding-profile and --no-binding-profile \""},{"line_number":548,"context_line":"                   \"to overwrite the current binding:profile information.\")"},{"line_number":549,"context_line":"        )"},{"line_number":550,"context_line":"        qos_policy_group \u003d parser.add_mutually_exclusive_group()"},{"line_number":551,"context_line":"        qos_policy_group.add_argument("},{"line_number":552,"context_line":"            \u0027--qos-policy\u0027,"},{"line_number":553,"context_line":"            metavar\u003d\u0027\u003cqos-policy\u003e\u0027,"},{"line_number":554,"context_line":"            help\u003d_(\"Attach QoS policy to this port (name or ID)\")"},{"line_number":555,"context_line":"        )"},{"line_number":556,"context_line":"        qos_policy_group.add_argument("},{"line_number":557,"context_line":"            \u0027--no-qos-policy\u0027,"},{"line_number":558,"context_line":"            action\u003d\u0027store_true\u0027,"},{"line_number":559,"context_line":"            help\u003d_(\"Clear existing QoS policy of this port\")"},{"line_number":560,"context_line":"        )"},{"line_number":561,"context_line":"        parser.add_argument("},{"line_number":562,"context_line":"            \u0027port\u0027,"},{"line_number":563,"context_line":"            metavar\u003d\"\u003cport\u003e\","}],"source_content_type":"text/x-python","patch_set":1,"id":"9a57fde8_f213c60b","line":560,"range":{"start_line":550,"start_character":8,"end_line":560,"end_character":9},"in_reply_to":"9a57fde8_925d1aef","updated":"2017-01-12 08:10:32.000000000","message":"Done","commit_id":"87e9c727e0ce3fadb2516c248547f69fe17f8fe6"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"eabba09144e32b68986876c9ab35641c69a4a320","unresolved":false,"context_lines":[{"line_number":547,"context_line":"                   \"Specify both --binding-profile and --no-binding-profile \""},{"line_number":548,"context_line":"                   \"to overwrite the current binding:profile information.\")"},{"line_number":549,"context_line":"        )"},{"line_number":550,"context_line":"        qos_policy_group \u003d parser.add_mutually_exclusive_group()"},{"line_number":551,"context_line":"        qos_policy_group.add_argument("},{"line_number":552,"context_line":"            \u0027--qos-policy\u0027,"},{"line_number":553,"context_line":"            metavar\u003d\u0027\u003cqos-policy\u003e\u0027,"},{"line_number":554,"context_line":"            help\u003d_(\"Attach QoS policy to this port (name or ID)\")"},{"line_number":555,"context_line":"        )"},{"line_number":556,"context_line":"        qos_policy_group.add_argument("},{"line_number":557,"context_line":"            \u0027--no-qos-policy\u0027,"},{"line_number":558,"context_line":"            action\u003d\u0027store_true\u0027,"},{"line_number":559,"context_line":"            help\u003d_(\"Clear existing QoS policy of this port\")"},{"line_number":560,"context_line":"        )"},{"line_number":561,"context_line":"        parser.add_argument("},{"line_number":562,"context_line":"            \u0027port\u0027,"},{"line_number":563,"context_line":"            metavar\u003d\"\u003cport\u003e\","}],"source_content_type":"text/x-python","patch_set":1,"id":"9a57fde8_925d1aef","line":560,"range":{"start_line":550,"start_character":8,"end_line":560,"end_character":9},"in_reply_to":"ba5201f7_c531fc0c","updated":"2017-01-12 08:07:50.000000000","message":"This makes no sense here because you can\u0027t append the qos policy information. You can set one qos policy, unset or change the qos policy, but you can\u0027t append.","commit_id":"87e9c727e0ce3fadb2516c248547f69fe17f8fe6"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"ae0d419ba8415a1338d54b505d8d59bcfa84c784","unresolved":false,"context_lines":[{"line_number":548,"context_line":"                   \"to overwrite the current binding:profile information.\")"},{"line_number":549,"context_line":"        )"},{"line_number":550,"context_line":"        parser.add_argument("},{"line_number":551,"context_line":"            \u0027--qos-policy\u0027,"},{"line_number":552,"context_line":"            metavar\u003d\u0027\u003cqos-policy\u003e\u0027,"},{"line_number":553,"context_line":"            help\u003d_(\"Attach QoS policy to this port (name or ID)\")"},{"line_number":554,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a57fde8_922b5a33","line":551,"updated":"2017-01-12 08:09:34.000000000","message":"I don\u0027t agree with this change here: qos-policy is a one value parameter, pointing to a qos-policy id. You can set or unset it, but nothing more.","commit_id":"047bc31b916b8b26816f579059fad7db2d03275d"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"005888fef911c4a7bcf09bb98d07c37451824aac","unresolved":false,"context_lines":[{"line_number":548,"context_line":"                   \"to overwrite the current binding:profile information.\")"},{"line_number":549,"context_line":"        )"},{"line_number":550,"context_line":"        parser.add_argument("},{"line_number":551,"context_line":"            \u0027--qos-policy\u0027,"},{"line_number":552,"context_line":"            metavar\u003d\u0027\u003cqos-policy\u003e\u0027,"},{"line_number":553,"context_line":"            help\u003d_(\"Attach QoS policy to this port (name or ID)\")"},{"line_number":554,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a57fde8_049e4456","line":551,"in_reply_to":"9a57fde8_75e260a1","updated":"2017-01-12 10:39:13.000000000","message":"Hi @Ha Van Tu.\n\nThe proposal of Reedip is to keep this code and add an extra check, in case of append function, to check is there is already a qos policy set. I agree with this proposal.","commit_id":"047bc31b916b8b26816f579059fad7db2d03275d"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"11aaa22b1b569687fcfa5de30405fb4c1891da44","unresolved":false,"context_lines":[{"line_number":548,"context_line":"                   \"to overwrite the current binding:profile information.\")"},{"line_number":549,"context_line":"        )"},{"line_number":550,"context_line":"        parser.add_argument("},{"line_number":551,"context_line":"            \u0027--qos-policy\u0027,"},{"line_number":552,"context_line":"            metavar\u003d\u0027\u003cqos-policy\u003e\u0027,"},{"line_number":553,"context_line":"            help\u003d_(\"Attach QoS policy to this port (name or ID)\")"},{"line_number":554,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a57fde8_d5b30c09","line":551,"in_reply_to":"9a57fde8_922b5a33","updated":"2017-01-12 08:45:59.000000000","message":"Hi Rodolfo, \nFor append action , we can verify if the current port already has a QoS policy associated with it.\nIf it is, then we can fail the command.\nWhat do you think?\n\nThis change will allow for overwrite of QoS policy in Ports. \nOtherwise, user has to use 2 CLIs to do overwrite action.","commit_id":"047bc31b916b8b26816f579059fad7db2d03275d"},{"author":{"_account_id":20079,"name":"Ha Van Tu","email":"tuhv@vn.fujitsu.com","username":"tuhv"},"change_message_id":"7c30ab193e5a1710f85ae9abd3c11b82623ec9e8","unresolved":false,"context_lines":[{"line_number":548,"context_line":"                   \"to overwrite the current binding:profile information.\")"},{"line_number":549,"context_line":"        )"},{"line_number":550,"context_line":"        parser.add_argument("},{"line_number":551,"context_line":"            \u0027--qos-policy\u0027,"},{"line_number":552,"context_line":"            metavar\u003d\u0027\u003cqos-policy\u003e\u0027,"},{"line_number":553,"context_line":"            help\u003d_(\"Attach QoS policy to this port (name or ID)\")"},{"line_number":554,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a57fde8_75e260a1","line":551,"in_reply_to":"9a57fde8_d5b30c09","updated":"2017-01-12 08:56:56.000000000","message":"Hi Reedip,\nActually, I understand Rodolfo as below:\n* with command A for list value (for example security groups):\n  * --A to set list values (repeat to append more security groups)\n  * --no-A to unset the list\n  * Because there is no way to update/overwrite to list, we should make --no-A and --A to do this prompt.\n\n* With command A for a single value (for example qos policy):\n  * --A to set value, repeat to update value\n  * --no-A to unset the value.\n  * Because --A means both set/overwrite value, we don\u0027t need to keep --no-A and --A working together.\n\nI am OK with Rodolfo, If you agree we can revert patch 1","commit_id":"047bc31b916b8b26816f579059fad7db2d03275d"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"4c6f2716c1d6fcc42b72659593dbb40904db9494","unresolved":false,"context_lines":[{"line_number":548,"context_line":"                   \"to overwrite the current binding:profile information.\")"},{"line_number":549,"context_line":"        )"},{"line_number":550,"context_line":"        parser.add_argument("},{"line_number":551,"context_line":"            \u0027--qos-policy\u0027,"},{"line_number":552,"context_line":"            metavar\u003d\u0027\u003cqos-policy\u003e\u0027,"},{"line_number":553,"context_line":"            help\u003d_(\"Attach QoS policy to this port (name or ID)\")"},{"line_number":554,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a57fde8_15267416","line":551,"in_reply_to":"9a57fde8_d5b30c09","updated":"2017-01-12 08:53:30.000000000","message":"I agree with this: having 4 actions\n- Create\n- Delete\n- Overwrite: just write a new value\n- Append: check if there is a QoS associated:\n    Yes: fail to write a new one\n    No: set the QoS ID value","commit_id":"047bc31b916b8b26816f579059fad7db2d03275d"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"42727bdea3f944a3bcdafea5434fcf0f6ec91607","unresolved":false,"context_lines":[{"line_number":406,"context_line":"            attrs[\u0027allowed_address_pairs\u0027] \u003d ("},{"line_number":407,"context_line":"                _convert_address_pairs(parsed_args))"},{"line_number":408,"context_line":""},{"line_number":409,"context_line":"        if parsed_args.qos_policy:"},{"line_number":410,"context_line":"            attrs[\u0027qos_policy_id\u0027] \u003d client.find_qos_policy("},{"line_number":411,"context_line":"                parsed_args.qos_policy, ignore_missing\u003dFalse).id"},{"line_number":412,"context_line":"        obj \u003d client.create_port(**attrs)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da36d5c6_8fa1ab48","line":409,"updated":"2017-02-24 16:51:17.000000000","message":"We can move this to the _get_attrs function because it is similar in both Create and Set command","commit_id":"ab073340d8881fc4b752781049f67f0d6ae1da7c"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"ab22a58489f33ff9b3cacaa9a7d31877dc2a0204","unresolved":false,"context_lines":[{"line_number":406,"context_line":"            attrs[\u0027allowed_address_pairs\u0027] \u003d ("},{"line_number":407,"context_line":"                _convert_address_pairs(parsed_args))"},{"line_number":408,"context_line":""},{"line_number":409,"context_line":"        if parsed_args.qos_policy:"},{"line_number":410,"context_line":"            attrs[\u0027qos_policy_id\u0027] \u003d client.find_qos_policy("},{"line_number":411,"context_line":"                parsed_args.qos_policy, ignore_missing\u003dFalse).id"},{"line_number":412,"context_line":"        obj \u003d client.create_port(**attrs)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da36d5c6_69562f07","line":409,"in_reply_to":"da36d5c6_8fa1ab48","updated":"2017-02-24 19:17:08.000000000","message":"Done","commit_id":"ab073340d8881fc4b752781049f67f0d6ae1da7c"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"42727bdea3f944a3bcdafea5434fcf0f6ec91607","unresolved":false,"context_lines":[{"line_number":737,"context_line":"        elif parsed_args.no_allowed_address_pair:"},{"line_number":738,"context_line":"            attrs[\u0027allowed_address_pairs\u0027] \u003d []"},{"line_number":739,"context_line":""},{"line_number":740,"context_line":"        if parsed_args.no_qos_policy:"},{"line_number":741,"context_line":"            attrs[\u0027qos_policy_id\u0027] \u003d None"},{"line_number":742,"context_line":""},{"line_number":743,"context_line":"        if parsed_args.qos_policy:"},{"line_number":744,"context_line":"            if parsed_args.no_qos_policy or not obj.qos_policy_id:"},{"line_number":745,"context_line":"                attrs[\u0027qos_policy_id\u0027] \u003d client.find_qos_policy("},{"line_number":746,"context_line":"                    parsed_args.qos_policy, ignore_missing\u003dFalse).id"},{"line_number":747,"context_line":"            else:"},{"line_number":748,"context_line":"                msg \u003d _(\"Failed to write a new one\")"},{"line_number":749,"context_line":"                raise exceptions.CommandError(msg)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da36d5c6_af7aefba","line":746,"range":{"start_line":740,"start_character":6,"end_line":746,"end_character":68},"updated":"2017-02-24 16:51:17.000000000","message":"Two points:\na) We can move this to the _get_attrs function because it is similar in both Create and Set command\n\nb) We do not support append, as per your comment earlier.\nSo we can move  Line#740  to Line#746 ( i.e. after the if loop)","commit_id":"ab073340d8881fc4b752781049f67f0d6ae1da7c"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"ab22a58489f33ff9b3cacaa9a7d31877dc2a0204","unresolved":false,"context_lines":[{"line_number":737,"context_line":"        elif parsed_args.no_allowed_address_pair:"},{"line_number":738,"context_line":"            attrs[\u0027allowed_address_pairs\u0027] \u003d []"},{"line_number":739,"context_line":""},{"line_number":740,"context_line":"        if parsed_args.no_qos_policy:"},{"line_number":741,"context_line":"            attrs[\u0027qos_policy_id\u0027] \u003d None"},{"line_number":742,"context_line":""},{"line_number":743,"context_line":"        if parsed_args.qos_policy:"},{"line_number":744,"context_line":"            if parsed_args.no_qos_policy or not obj.qos_policy_id:"},{"line_number":745,"context_line":"                attrs[\u0027qos_policy_id\u0027] \u003d client.find_qos_policy("},{"line_number":746,"context_line":"                    parsed_args.qos_policy, ignore_missing\u003dFalse).id"},{"line_number":747,"context_line":"            else:"},{"line_number":748,"context_line":"                msg \u003d _(\"Failed to write a new one\")"},{"line_number":749,"context_line":"                raise exceptions.CommandError(msg)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da36d5c6_095db314","line":746,"range":{"start_line":740,"start_character":6,"end_line":746,"end_character":68},"in_reply_to":"da36d5c6_af7aefba","updated":"2017-02-24 19:17:08.000000000","message":"a) I\u0027ll do it\nb) I need to keep this order. I case we have no_qos_policy and qos_policy, first we set None and then the Qos ID. But I can\u0027t put the no_qos_policy parsing inside the \"if parsed_args.qos_policy\" condition. We can send a set command with \"no_policy\"; it\u0027s equal to an unset command with \"qos_policy\".","commit_id":"ab073340d8881fc4b752781049f67f0d6ae1da7c"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"42727bdea3f944a3bcdafea5434fcf0f6ec91607","unresolved":false,"context_lines":[{"line_number":745,"context_line":"                attrs[\u0027qos_policy_id\u0027] \u003d client.find_qos_policy("},{"line_number":746,"context_line":"                    parsed_args.qos_policy, ignore_missing\u003dFalse).id"},{"line_number":747,"context_line":"            else:"},{"line_number":748,"context_line":"                msg \u003d _(\"Failed to write a new one\")"},{"line_number":749,"context_line":"                raise exceptions.CommandError(msg)"},{"line_number":750,"context_line":""},{"line_number":751,"context_line":"        client.update_port(obj, **attrs)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da36d5c6_b23df8c5","line":748,"range":{"start_line":748,"start_character":31,"end_line":748,"end_character":32},"updated":"2017-02-24 16:51:17.000000000","message":"I think we can correct this message as: We already have a QoS policy associated to the port.","commit_id":"ab073340d8881fc4b752781049f67f0d6ae1da7c"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"ab22a58489f33ff9b3cacaa9a7d31877dc2a0204","unresolved":false,"context_lines":[{"line_number":745,"context_line":"                attrs[\u0027qos_policy_id\u0027] \u003d client.find_qos_policy("},{"line_number":746,"context_line":"                    parsed_args.qos_policy, ignore_missing\u003dFalse).id"},{"line_number":747,"context_line":"            else:"},{"line_number":748,"context_line":"                msg \u003d _(\"Failed to write a new one\")"},{"line_number":749,"context_line":"                raise exceptions.CommandError(msg)"},{"line_number":750,"context_line":""},{"line_number":751,"context_line":"        client.update_port(obj, **attrs)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da36d5c6_b2b2584a","line":748,"range":{"start_line":748,"start_character":31,"end_line":748,"end_character":32},"in_reply_to":"da36d5c6_b23df8c5","updated":"2017-02-24 19:17:08.000000000","message":"Done","commit_id":"ab073340d8881fc4b752781049f67f0d6ae1da7c"},{"author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"change_message_id":"a1b3044a62259ee6f2913affae66da944dd1e7f2","unresolved":false,"context_lines":[{"line_number":94,"context_line":"                raise argparse.ArgumentTypeError(msg)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"def _get_attrs(client_manager, parsed_args, port\u003dNone):"},{"line_number":98,"context_line":"    attrs \u003d {}"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    # Handle deprecated options"}],"source_content_type":"text/x-python","patch_set":8,"id":"dfeb2761_d9453c19","line":97,"updated":"2017-04-01 20:16:37.000000000","message":"This port arg appears unused...and if its only used in one place, just do the work there rather than try to wedge it into a common function when it is not common work","commit_id":"53d14d7c212c8b0a309b942a6e47845edbafdb7b"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"3a67f7f1842025d799c135cd69af336d8fcdb549","unresolved":false,"context_lines":[{"line_number":94,"context_line":"                raise argparse.ArgumentTypeError(msg)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"def _get_attrs(client_manager, parsed_args, port\u003dNone):"},{"line_number":98,"context_line":"    attrs \u003d {}"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    # Handle deprecated options"}],"source_content_type":"text/x-python","patch_set":8,"id":"bff0334d_f479602f","line":97,"in_reply_to":"dfeb2761_d9453c19","updated":"2017-04-05 14:25:20.000000000","message":"Yes, I used it in a previous version but not now.\n\nI\u0027ll remove it.","commit_id":"53d14d7c212c8b0a309b942a6e47845edbafdb7b"}],"releasenotes/notes/bug-1612136-ec240349a933db12.yaml":[{"author":{"_account_id":21514,"name":"Huanxuan Ao","email":"aohuanxuan@163.com","username":"aohuanxuan"},"change_message_id":"fd947870e399a032c112aab7a4113ffab9be1b7d","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Add ``--qos-policy`` option to ``port create`` command and"},{"line_number":5,"context_line":"    ``--qos-policy``, ``--no-qos-policy`` options to ``port set`` command."},{"line_number":6,"context_line":"    [Bug `1612136 \u003chttps://bugs.launchpad.net/python-openstackclient/+bug/1612136\u003e`_]"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"da36d5c6_e6fde0b1","line":5,"updated":"2017-02-25 13:21:02.000000000","message":"You have added the option to unset command as well :)","commit_id":"b8079eced597e8a053233a5b36dd83e112c495c0"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"175ea28d447b6a1d1b8541774f5bb3d578731880","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Add ``--qos-policy`` option to ``port create`` command and"},{"line_number":5,"context_line":"    ``--qos-policy``, ``--no-qos-policy`` options to ``port set`` command."},{"line_number":6,"context_line":"    [Bug `1612136 \u003chttps://bugs.launchpad.net/python-openstackclient/+bug/1612136\u003e`_]"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"da36d5c6_f1667cb9","line":5,"in_reply_to":"da36d5c6_e6fde0b1","updated":"2017-02-25 14:34:34.000000000","message":"good catch","commit_id":"b8079eced597e8a053233a5b36dd83e112c495c0"}]}
