)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"3e296e3ff5f1c8aa6d958bcab7959f1b8ea1f389","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add QoS bandwidth limit for instance ingress traffic"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch introduce new parameter \"direction\" for QoS bandwidth"},{"line_number":10,"context_line":"limit rule. It allows to create bandwidth limit rules for"},{"line_number":11,"context_line":"ingress or egress traffic."},{"line_number":12,"context_line":"For backward compatibility default value is egress."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"DocImpact: Ingress bandwidth limit available for QoS"},{"line_number":15,"context_line":"APIImpact: New type of parameter for QoS rule in neutron API"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":30,"id":"dada55a8_6a78efc4","line":12,"range":{"start_line":9,"start_character":0,"end_line":12,"end_character":51},"updated":"2016-07-26 16:02:56.000000000","message":"\"This patch introduces the new parameter \"direction\" to the QoS bandwidth limit rule. It will allow the creation of bandwidth limit rules for either ingress or egress traffic.\nFor backwards compatibility the default direction will be egress.\"","commit_id":"556c27588007983251f8c7ed165f9191eeb59475"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"6b73c13de2299d692f4f51d826b3303721b970c7","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add QoS bandwidth limit for instance ingress traffic"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch introduce new parameter \"direction\" for QoS bandwidth"},{"line_number":10,"context_line":"limit rule. It allows to create bandwidth limit rules for"},{"line_number":11,"context_line":"ingress or egress traffic."},{"line_number":12,"context_line":"For backward compatibility default value is egress."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"DocImpact: Ingress bandwidth limit available for QoS"},{"line_number":15,"context_line":"APIImpact: New type of parameter for QoS rule in neutron API"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":30,"id":"dada55a8_4c0edd8c","line":12,"range":{"start_line":9,"start_character":0,"end_line":12,"end_character":51},"in_reply_to":"dada55a8_6a78efc4","updated":"2016-07-26 20:01:39.000000000","message":"Done","commit_id":"556c27588007983251f8c7ed165f9191eeb59475"}],"etc/policy.json":[{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"ee937bca952c901bf1331ff48c33dfeb67133041","unresolved":false,"context_lines":[{"line_number":197,"context_line":"    \"create_policy\": \"rule:admin_only\","},{"line_number":198,"context_line":"    \"update_policy\": \"rule:admin_only\","},{"line_number":199,"context_line":"    \"delete_policy\": \"rule:admin_only\","},{"line_number":200,"context_line":"    \"get_policy_bandwidth_limit_rule\": \"rule:regular_user\","},{"line_number":201,"context_line":"    \"create_policy_bandwidth_limit_rule\": \"rule:admin_only\","},{"line_number":202,"context_line":"    \"delete_policy_bandwidth_limit_rule\": \"rule:admin_only\","},{"line_number":203,"context_line":"    \"update_policy_bandwidth_limit_rule\": \"rule:admin_only\","}],"source_content_type":"application/json","patch_set":14,"id":"dab17558_b666eeea","line":200,"updated":"2016-05-16 04:47:27.000000000","message":"what does this rule will return?? \u0027egress\u0027?","commit_id":"313b28bec589d12fb9258e079218f0ddd40bb280"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"41dd3e64b3e9104acc3a6a9fdef7c9a137529883","unresolved":false,"context_lines":[{"line_number":197,"context_line":"    \"create_policy\": \"rule:admin_only\","},{"line_number":198,"context_line":"    \"update_policy\": \"rule:admin_only\","},{"line_number":199,"context_line":"    \"delete_policy\": \"rule:admin_only\","},{"line_number":200,"context_line":"    \"get_policy_bandwidth_limit_rule\": \"rule:regular_user\","},{"line_number":201,"context_line":"    \"create_policy_bandwidth_limit_rule\": \"rule:admin_only\","},{"line_number":202,"context_line":"    \"delete_policy_bandwidth_limit_rule\": \"rule:admin_only\","},{"line_number":203,"context_line":"    \"update_policy_bandwidth_limit_rule\": \"rule:admin_only\","}],"source_content_type":"application/json","patch_set":14,"id":"dab17558_ea4086a7","line":200,"in_reply_to":"dab17558_b666eeea","updated":"2016-05-16 06:14:53.000000000","message":"it will return current egress bw limit rule - there is no change here for now. But we want to rename it to egress_bandwidth_limit_rule later. Please see https://bugs.launchpad.net/neutron/+bug/1580149","commit_id":"313b28bec589d12fb9258e079218f0ddd40bb280"},{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"ee937bca952c901bf1331ff48c33dfeb67133041","unresolved":false,"context_lines":[{"line_number":201,"context_line":"    \"create_policy_bandwidth_limit_rule\": \"rule:admin_only\","},{"line_number":202,"context_line":"    \"delete_policy_bandwidth_limit_rule\": \"rule:admin_only\","},{"line_number":203,"context_line":"    \"update_policy_bandwidth_limit_rule\": \"rule:admin_only\","},{"line_number":204,"context_line":"    \"get_policy_ingress_bandwidth_limit_rule\": \"rule:regular_user\","},{"line_number":205,"context_line":"    \"create_policy_ingress_bandwidth_limit_rule\": \"rule:admin_only\","},{"line_number":206,"context_line":"    \"delete_policy_ingress_bandwidth_limit_rule\": \"rule:admin_only\","},{"line_number":207,"context_line":"    \"update_policy_ingress_bandwidth_limit_rule\": \"rule:admin_only\","}],"source_content_type":"application/json","patch_set":14,"id":"dab17558_16b7fa3a","line":204,"updated":"2016-05-16 04:47:27.000000000","message":"I don\u0027t know why we have opted this way.. I was thinking of adding a type in the existing CLI call direction which can either take \u0027egress\u0027 or \u0027ingress\u0027 explicitly... By default, it will be set to \u0027egress\u0027 for ensuring backward compatibitly.","commit_id":"313b28bec589d12fb9258e079218f0ddd40bb280"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"41dd3e64b3e9104acc3a6a9fdef7c9a137529883","unresolved":false,"context_lines":[{"line_number":201,"context_line":"    \"create_policy_bandwidth_limit_rule\": \"rule:admin_only\","},{"line_number":202,"context_line":"    \"delete_policy_bandwidth_limit_rule\": \"rule:admin_only\","},{"line_number":203,"context_line":"    \"update_policy_bandwidth_limit_rule\": \"rule:admin_only\","},{"line_number":204,"context_line":"    \"get_policy_ingress_bandwidth_limit_rule\": \"rule:regular_user\","},{"line_number":205,"context_line":"    \"create_policy_ingress_bandwidth_limit_rule\": \"rule:admin_only\","},{"line_number":206,"context_line":"    \"delete_policy_ingress_bandwidth_limit_rule\": \"rule:admin_only\","},{"line_number":207,"context_line":"    \"update_policy_ingress_bandwidth_limit_rule\": \"rule:admin_only\","}],"source_content_type":"application/json","patch_set":14,"id":"dab17558_ca6b021d","line":204,"in_reply_to":"dab17558_16b7fa3a","updated":"2016-05-16 06:14:53.000000000","message":"We discused it on summit with Ihar, Miguel and others and we decided to add new rule type because it is easier to manage it for example in mechanism drivers.\nI know that it\u0027s not perfect solution and I wanted to do it with \"direction\" attribute in existing rule (see first 5 or 6 patch sets) but we decided to do it this way :)","commit_id":"313b28bec589d12fb9258e079218f0ddd40bb280"},{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"f0ccac3d9b5cf4452ab494d5438123ba948ff317","unresolved":false,"context_lines":[{"line_number":201,"context_line":"    \"create_policy_bandwidth_limit_rule\": \"rule:admin_only\","},{"line_number":202,"context_line":"    \"delete_policy_bandwidth_limit_rule\": \"rule:admin_only\","},{"line_number":203,"context_line":"    \"update_policy_bandwidth_limit_rule\": \"rule:admin_only\","},{"line_number":204,"context_line":"    \"get_policy_ingress_bandwidth_limit_rule\": \"rule:regular_user\","},{"line_number":205,"context_line":"    \"create_policy_ingress_bandwidth_limit_rule\": \"rule:admin_only\","},{"line_number":206,"context_line":"    \"delete_policy_ingress_bandwidth_limit_rule\": \"rule:admin_only\","},{"line_number":207,"context_line":"    \"update_policy_ingress_bandwidth_limit_rule\": \"rule:admin_only\","}],"source_content_type":"application/json","patch_set":14,"id":"dab17558_5fbb1bc4","line":204,"in_reply_to":"dab17558_ca6b021d","updated":"2016-05-17 03:35:36.000000000","message":"Ok!","commit_id":"313b28bec589d12fb9258e079218f0ddd40bb280"}],"neutron/agent/common/ovs_lib.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"d922be2afdecb6436c8b8ad7d9608d8382327b45","unresolved":false,"context_lines":[{"line_number":598,"context_line":"                                       max_burst_in_bits):"},{"line_number":599,"context_line":"        external_ids \u003d {\u0027id\u0027: port_name}"},{"line_number":600,"context_line":"        queue_other_config \u003d {"},{"line_number":601,"context_line":"            \u0027min-rate\u0027: max_bw_in_bits,"},{"line_number":602,"context_line":"            \u0027max-rate\u0027: max_bw_in_bits,"},{"line_number":603,"context_line":"            \u0027burst\u0027: max_burst_in_bits"},{"line_number":604,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":14,"id":"dab17558_3f31dca2","line":601,"range":{"start_line":601,"start_character":12,"end_line":601,"end_character":39},"updated":"2016-05-17 15:35:39.000000000","message":"\"min-rate\" is used to assure a minimum bandwidth on this queue. This feature will be implemented in a future using it\u0027s own rule.\n\nPlease, remove this parameter because is going to be set by other QoS rule.","commit_id":"313b28bec589d12fb9258e079218f0ddd40bb280"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"ec70b0b8ab41f68a2e1283c3600e315bf926ad0f","unresolved":false,"context_lines":[{"line_number":598,"context_line":"                                       max_burst_in_bits):"},{"line_number":599,"context_line":"        external_ids \u003d {\u0027id\u0027: port_name}"},{"line_number":600,"context_line":"        queue_other_config \u003d {"},{"line_number":601,"context_line":"            \u0027min-rate\u0027: max_bw_in_bits,"},{"line_number":602,"context_line":"            \u0027max-rate\u0027: max_bw_in_bits,"},{"line_number":603,"context_line":"            \u0027burst\u0027: max_burst_in_bits"},{"line_number":604,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":14,"id":"bab6814e_a85ffa70","line":601,"range":{"start_line":601,"start_character":12,"end_line":601,"end_character":39},"in_reply_to":"dab17558_3f31dca2","updated":"2016-05-18 21:52:40.000000000","message":"Done. Thx","commit_id":"313b28bec589d12fb9258e079218f0ddd40bb280"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"d922be2afdecb6436c8b8ad7d9608d8382327b45","unresolved":false,"context_lines":[{"line_number":616,"context_line":"            check_error\u003dTrue)"},{"line_number":617,"context_line":"        queues \u003d {}"},{"line_number":618,"context_line":"        queues[0] \u003d queue[0][\u0027_uuid\u0027]"},{"line_number":619,"context_line":"        qos_other_config \u003d {\u0027max-rate\u0027: max_bw_in_bits}"},{"line_number":620,"context_line":"        self.ovsdb.db_create(\u0027QoS\u0027, external_ids\u003dexternal_ids,"},{"line_number":621,"context_line":"                             other_config\u003dqos_other_config,"},{"line_number":622,"context_line":"                             type\u003d\u0027linux-htb\u0027,"}],"source_content_type":"text/x-python","patch_set":14,"id":"dab17558_4a5973fc","line":619,"range":{"start_line":619,"start_character":0,"end_line":619,"end_character":55},"updated":"2016-05-17 15:35:39.000000000","message":"This config shouldn\u0027t be set in the QoS profile. In a future, new rules will be added. Egress rules won\u0027t share the same value for \"max-rate\".\nIf a new queue, for egress traffic, is added, this \"max-rate\" value will also apply and this behavior is not desirable.","commit_id":"313b28bec589d12fb9258e079218f0ddd40bb280"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"ec70b0b8ab41f68a2e1283c3600e315bf926ad0f","unresolved":false,"context_lines":[{"line_number":616,"context_line":"            check_error\u003dTrue)"},{"line_number":617,"context_line":"        queues \u003d {}"},{"line_number":618,"context_line":"        queues[0] \u003d queue[0][\u0027_uuid\u0027]"},{"line_number":619,"context_line":"        qos_other_config \u003d {\u0027max-rate\u0027: max_bw_in_bits}"},{"line_number":620,"context_line":"        self.ovsdb.db_create(\u0027QoS\u0027, external_ids\u003dexternal_ids,"},{"line_number":621,"context_line":"                             other_config\u003dqos_other_config,"},{"line_number":622,"context_line":"                             type\u003d\u0027linux-htb\u0027,"}],"source_content_type":"text/x-python","patch_set":14,"id":"bab6814e_def5d483","line":619,"range":{"start_line":619,"start_character":0,"end_line":619,"end_character":55},"in_reply_to":"dab17558_4a5973fc","updated":"2016-05-18 21:52:40.000000000","message":"Done","commit_id":"313b28bec589d12fb9258e079218f0ddd40bb280"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"d922be2afdecb6436c8b8ad7d9608d8382327b45","unresolved":false,"context_lines":[{"line_number":631,"context_line":""},{"line_number":632,"context_line":"        self._create_ingress_bw_limit_queue(port_name, max_bw_in_bits,"},{"line_number":633,"context_line":"                                            max_burst_in_bits)"},{"line_number":634,"context_line":"        self._create_ingress_bw_limit_profile(port_name, max_bw_in_bits)"},{"line_number":635,"context_line":""},{"line_number":636,"context_line":"        qos \u003d self.ovsdb.db_find(\u0027QoS\u0027,"},{"line_number":637,"context_line":"                                 (\u0027external_ids\u0027, \u0027\u003d\u0027, {\u0027id\u0027: port_name}),"}],"source_content_type":"text/x-python","patch_set":14,"id":"dab17558_5feb0013","line":634,"range":{"start_line":634,"start_character":8,"end_line":634,"end_character":72},"updated":"2016-05-17 15:35:39.000000000","message":"This function returns the UUID of the new table register, to avoid executing \"db_find\" in L636","commit_id":"313b28bec589d12fb9258e079218f0ddd40bb280"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"2fd608bbf483c62cee00bbb47ab28085eac5d1b4","unresolved":false,"context_lines":[{"line_number":631,"context_line":""},{"line_number":632,"context_line":"        self._create_ingress_bw_limit_queue(port_name, max_bw_in_bits,"},{"line_number":633,"context_line":"                                            max_burst_in_bits)"},{"line_number":634,"context_line":"        self._create_ingress_bw_limit_profile(port_name, max_bw_in_bits)"},{"line_number":635,"context_line":""},{"line_number":636,"context_line":"        qos \u003d self.ovsdb.db_find(\u0027QoS\u0027,"},{"line_number":637,"context_line":"                                 (\u0027external_ids\u0027, \u0027\u003d\u0027, {\u0027id\u0027: port_name}),"}],"source_content_type":"text/x-python","patch_set":14,"id":"bab6814e_e82d05a9","line":634,"range":{"start_line":634,"start_character":8,"end_line":634,"end_character":72},"in_reply_to":"bab6814e_27f8fa48","updated":"2016-05-20 21:30:15.000000000","message":"What is interesting is fact that it not works properly only with \"native\" interface. With \"vsctl\" all is workikng fine and self.ovsdb.db_create() returns proper ID.\nIMHO it looks that there is some bug in ovs.db.idl.Transaction.insert() method which returns some randomly generated uuid instead of uuid from created record in ovs db.","commit_id":"313b28bec589d12fb9258e079218f0ddd40bb280"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"731fe8dad91bdc4642ccb3c848e7e222a81d8bbd","unresolved":false,"context_lines":[{"line_number":631,"context_line":""},{"line_number":632,"context_line":"        self._create_ingress_bw_limit_queue(port_name, max_bw_in_bits,"},{"line_number":633,"context_line":"                                            max_burst_in_bits)"},{"line_number":634,"context_line":"        self._create_ingress_bw_limit_profile(port_name, max_bw_in_bits)"},{"line_number":635,"context_line":""},{"line_number":636,"context_line":"        qos \u003d self.ovsdb.db_find(\u0027QoS\u0027,"},{"line_number":637,"context_line":"                                 (\u0027external_ids\u0027, \u0027\u003d\u0027, {\u0027id\u0027: port_name}),"}],"source_content_type":"text/x-python","patch_set":14,"id":"bab6814e_9d2e9df8","line":634,"range":{"start_line":634,"start_character":8,"end_line":634,"end_character":72},"in_reply_to":"bab6814e_3baeb285","updated":"2016-05-19 09:33:30.000000000","message":"Where exactly is returning this error? Can you send us the link to this?\nAlso, instead of querying the DB for the Queue register, you can pass it to the function as a parameter.","commit_id":"313b28bec589d12fb9258e079218f0ddd40bb280"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"414646bcd3fc6c73c1b6f3190cd9228aa8e55a1c","unresolved":false,"context_lines":[{"line_number":631,"context_line":""},{"line_number":632,"context_line":"        self._create_ingress_bw_limit_queue(port_name, max_bw_in_bits,"},{"line_number":633,"context_line":"                                            max_burst_in_bits)"},{"line_number":634,"context_line":"        self._create_ingress_bw_limit_profile(port_name, max_bw_in_bits)"},{"line_number":635,"context_line":""},{"line_number":636,"context_line":"        qos \u003d self.ovsdb.db_find(\u0027QoS\u0027,"},{"line_number":637,"context_line":"                                 (\u0027external_ids\u0027, \u0027\u003d\u0027, {\u0027id\u0027: port_name}),"}],"source_content_type":"text/x-python","patch_set":14,"id":"bab6814e_27f8fa48","line":634,"range":{"start_line":634,"start_character":8,"end_line":634,"end_character":72},"in_reply_to":"bab6814e_4cb45ed0","updated":"2016-05-20 10:28:19.000000000","message":"Let me take a look at this. Now I\u0027m implementing the egress min bw and I will use almost the same functions.","commit_id":"313b28bec589d12fb9258e079218f0ddd40bb280"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"65e59126a0178020a16ca24e6e6e88dc3afe3ae5","unresolved":false,"context_lines":[{"line_number":631,"context_line":""},{"line_number":632,"context_line":"        self._create_ingress_bw_limit_queue(port_name, max_bw_in_bits,"},{"line_number":633,"context_line":"                                            max_burst_in_bits)"},{"line_number":634,"context_line":"        self._create_ingress_bw_limit_profile(port_name, max_bw_in_bits)"},{"line_number":635,"context_line":""},{"line_number":636,"context_line":"        qos \u003d self.ovsdb.db_find(\u0027QoS\u0027,"},{"line_number":637,"context_line":"                                 (\u0027external_ids\u0027, \u0027\u003d\u0027, {\u0027id\u0027: port_name}),"}],"source_content_type":"text/x-python","patch_set":14,"id":"bab6814e_4cb45ed0","line":634,"range":{"start_line":634,"start_character":8,"end_line":634,"end_character":72},"in_reply_to":"bab6814e_9d2e9df8","updated":"2016-05-19 22:09:54.000000000","message":"I made some modification there and I spend all evening on debugging it. IMO problem is that self.ovsdb.db_create() don\u0027t return proper uuid for newly created record. I have no idea why it is like that.\nI doesn\u0027t upload this \"broken\" file to this review but You can check it on https://www.dropbox.com/s/dmmktqv0yf33apg/ovs_lib.py?dl\u003d0 if You want.\nWe can also talk on IRC (my nick: slaweq) if You want some more explanations from me about what I\u0027ve done.","commit_id":"313b28bec589d12fb9258e079218f0ddd40bb280"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"ec70b0b8ab41f68a2e1283c3600e315bf926ad0f","unresolved":false,"context_lines":[{"line_number":631,"context_line":""},{"line_number":632,"context_line":"        self._create_ingress_bw_limit_queue(port_name, max_bw_in_bits,"},{"line_number":633,"context_line":"                                            max_burst_in_bits)"},{"line_number":634,"context_line":"        self._create_ingress_bw_limit_profile(port_name, max_bw_in_bits)"},{"line_number":635,"context_line":""},{"line_number":636,"context_line":"        qos \u003d self.ovsdb.db_find(\u0027QoS\u0027,"},{"line_number":637,"context_line":"                                 (\u0027external_ids\u0027, \u0027\u003d\u0027, {\u0027id\u0027: port_name}),"}],"source_content_type":"text/x-python","patch_set":14,"id":"bab6814e_3baeb285","line":634,"range":{"start_line":634,"start_character":8,"end_line":634,"end_character":72},"in_reply_to":"dab17558_5feb0013","updated":"2016-05-18 21:52:40.000000000","message":"I tried to do that but in functional test neutron.tests.functional.agent.test_ovs_lib.OVSBridgeTestCase.test_ingress_bw_limit(native) I had errors like:\n\n\"    RuntimeError: OVSDB Error: {\"details\":\"Table QoS column queues row 8615ca8f-9988-4b27-a670-209d0c7c0f73 references nonexistent row d148ab89-7335-468e-b60c-2a1b115cc6bc in table Queue.\",\"error\":\"referential integrity violation\"}\n\"\n\nall the time. I\u0027m not expert in ovs and I don\u0027t know exactly why it happens like that. Maybe You can help me with this?","commit_id":"313b28bec589d12fb9258e079218f0ddd40bb280"}],"neutron/db/migration/__init__.py":[{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"fda7f4b7424171d0fe486778d4a51a956a9ef2ca","unresolved":false,"context_lines":[{"line_number":175,"context_line":"                constraint_name\u003dfk[\u0027constrained_columns\u0027][0],"},{"line_number":176,"context_line":"                table_name\u003dtable,"},{"line_number":177,"context_line":"                type_\u003d\u0027unique\u0027"},{"line_number":178,"context_line":"            )"},{"line_number":179,"context_line":"        except Exception as e:"},{"line_number":180,"context_line":"            # NOTE(slaweq): if it is error 1092 means that can\u0027t drop"},{"line_number":181,"context_line":"            # constraint which not exists then we can pass it, othwerwise"}],"source_content_type":"text/x-python","patch_set":21,"id":"1aa78d24_b1546b21","line":178,"updated":"2016-07-05 07:13:23.000000000","message":"Try this:\nif op.get_context().dialect.name \u003d\u003d \u0027postgresql\u0027:\n      # PostgreSQL path:\n      op.drop_constraint(fk[\u0027constrained_columns\u0027][0], table, \u0027unique\u0027)\n\nI once reviewed the similar situation and this helped. Please, check this.","commit_id":"7eca2e78c5099d3053af2778b90dc059326cb081"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"1a4b87fd8180fedaad2b49c9f2b379b262044cb5","unresolved":false,"context_lines":[{"line_number":175,"context_line":"                constraint_name\u003dfk[\u0027constrained_columns\u0027][0],"},{"line_number":176,"context_line":"                table_name\u003dtable,"},{"line_number":177,"context_line":"                type_\u003d\u0027unique\u0027"},{"line_number":178,"context_line":"            )"},{"line_number":179,"context_line":"        except Exception as e:"},{"line_number":180,"context_line":"            # NOTE(slaweq): if it is error 1092 means that can\u0027t drop"},{"line_number":181,"context_line":"            # constraint which not exists then we can pass it, othwerwise"}],"source_content_type":"text/x-python","patch_set":21,"id":"1aa78d24_9b531b6b","line":178,"in_reply_to":"1aa78d24_b1546b21","updated":"2016-07-05 22:22:52.000000000","message":"thx, it looks that it works fine together with solution from https://review.openstack.org/#/c/283802/7/neutron_lbaas/db/migration/alembic_migrations/versions/mitaka/expand/6aee0434f911_independent_pools.py :)","commit_id":"7eca2e78c5099d3053af2778b90dc059326cb081"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"fda7f4b7424171d0fe486778d4a51a956a9ef2ca","unresolved":false,"context_lines":[{"line_number":181,"context_line":"            # constraint which not exists then we can pass it, othwerwise"},{"line_number":182,"context_line":"            # reraise exception:"},{"line_number":183,"context_line":"            if e.errno !\u003d \u002710901\u0027:"},{"line_number":184,"context_line":"                raise"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"def create_foreign_keys(table, foreign_keys):"}],"source_content_type":"text/x-python","patch_set":21,"id":"1aa78d24_15d9ea83","line":184,"range":{"start_line":184,"start_character":16,"end_line":184,"end_character":21},"updated":"2016-07-05 07:13:23.000000000","message":"For such cases should be used excutils.save_and_reraise_exception()\n\nBut actually I prefer that we just check if constraint is present before dropping.","commit_id":"7eca2e78c5099d3053af2778b90dc059326cb081"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"1a4b87fd8180fedaad2b49c9f2b379b262044cb5","unresolved":false,"context_lines":[{"line_number":181,"context_line":"            # constraint which not exists then we can pass it, othwerwise"},{"line_number":182,"context_line":"            # reraise exception:"},{"line_number":183,"context_line":"            if e.errno !\u003d \u002710901\u0027:"},{"line_number":184,"context_line":"                raise"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"def create_foreign_keys(table, foreign_keys):"}],"source_content_type":"text/x-python","patch_set":21,"id":"1aa78d24_1bce0b2e","line":184,"range":{"start_line":184,"start_character":16,"end_line":184,"end_character":21},"in_reply_to":"1aa78d24_15d9ea83","updated":"2016-07-05 22:22:52.000000000","message":"I changed it to check if unique constraint exists before removing it. I hope it\u0027s better now","commit_id":"7eca2e78c5099d3053af2778b90dc059326cb081"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"08ad83651276e989f536075350b255108ba29bb6","unresolved":false,"context_lines":[{"line_number":189,"context_line":"            table_name\u003dtable,"},{"line_number":190,"context_line":"            type_\u003d\u0027foreignkey\u0027"},{"line_number":191,"context_line":"        )"},{"line_number":192,"context_line":"        if remove_unique_constraint:"},{"line_number":193,"context_line":"            remove_unique_constraints(table, fk)"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"def create_foreign_keys(table, foreign_keys):"}],"source_content_type":"text/x-python","patch_set":22,"id":"1aa78d24_a51a1b7b","line":193,"range":{"start_line":192,"start_character":8,"end_line":193,"end_character":48},"updated":"2016-07-06 11:58:23.000000000","message":"I don\u0027t like that we have this inside remove_foreign_keys function. Lets move this in remove_fks_from_table directly.","commit_id":"c041e6a2f9b35dad550730def5daee46024ef624"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"c6238651fd2ae3a0a62949501e29e5beb310b2bb","unresolved":false,"context_lines":[{"line_number":189,"context_line":"            table_name\u003dtable,"},{"line_number":190,"context_line":"            type_\u003d\u0027foreignkey\u0027"},{"line_number":191,"context_line":"        )"},{"line_number":192,"context_line":"        if remove_unique_constraint:"},{"line_number":193,"context_line":"            remove_unique_constraints(table, fk)"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"def create_foreign_keys(table, foreign_keys):"}],"source_content_type":"text/x-python","patch_set":22,"id":"1aa78d24_20ec1429","line":193,"range":{"start_line":192,"start_character":8,"end_line":193,"end_character":48},"in_reply_to":"1aa78d24_53e01dcd","updated":"2016-07-07 13:13:05.000000000","message":"I pushed it as separate patch: https://review.openstack.org/338986","commit_id":"c041e6a2f9b35dad550730def5daee46024ef624"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"fae37771f7eca2c22e6d350a3a94c3c1cf3897e1","unresolved":false,"context_lines":[{"line_number":189,"context_line":"            table_name\u003dtable,"},{"line_number":190,"context_line":"            type_\u003d\u0027foreignkey\u0027"},{"line_number":191,"context_line":"        )"},{"line_number":192,"context_line":"        if remove_unique_constraint:"},{"line_number":193,"context_line":"            remove_unique_constraints(table, fk)"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"def create_foreign_keys(table, foreign_keys):"}],"source_content_type":"text/x-python","patch_set":22,"id":"1aa78d24_53e01dcd","line":193,"range":{"start_line":192,"start_character":8,"end_line":193,"end_character":48},"in_reply_to":"1aa78d24_85e6cce5","updated":"2016-07-07 12:28:43.000000000","message":"ok, I will move it to separate patch asap","commit_id":"c041e6a2f9b35dad550730def5daee46024ef624"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"d4dea9f5d1e81eadf27de64f60f4fb28b73e178e","unresolved":false,"context_lines":[{"line_number":189,"context_line":"            table_name\u003dtable,"},{"line_number":190,"context_line":"            type_\u003d\u0027foreignkey\u0027"},{"line_number":191,"context_line":"        )"},{"line_number":192,"context_line":"        if remove_unique_constraint:"},{"line_number":193,"context_line":"            remove_unique_constraints(table, fk)"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"def create_foreign_keys(table, foreign_keys):"}],"source_content_type":"text/x-python","patch_set":22,"id":"1aa78d24_d35391e0","line":193,"range":{"start_line":192,"start_character":8,"end_line":193,"end_character":48},"in_reply_to":"1aa78d24_a51a1b7b","updated":"2016-07-06 20:08:58.000000000","message":"I changed it littlebit and also changed this function that it can remove different type of constraints. I hope this is better for You now","commit_id":"c041e6a2f9b35dad550730def5daee46024ef624"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"74c1d491fbcacba8fb2cd20c2ffe96385eb65e22","unresolved":false,"context_lines":[{"line_number":189,"context_line":"            table_name\u003dtable,"},{"line_number":190,"context_line":"            type_\u003d\u0027foreignkey\u0027"},{"line_number":191,"context_line":"        )"},{"line_number":192,"context_line":"        if remove_unique_constraint:"},{"line_number":193,"context_line":"            remove_unique_constraints(table, fk)"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"def create_foreign_keys(table, foreign_keys):"}],"source_content_type":"text/x-python","patch_set":22,"id":"1aa78d24_85e6cce5","line":193,"range":{"start_line":192,"start_character":8,"end_line":193,"end_character":48},"in_reply_to":"1aa78d24_d35391e0","updated":"2016-07-07 07:35:56.000000000","message":"Yes, thanks! \n\nI have a suggestion: can you put changes of this file out of current change request as a separate one and rebased on it? We will be able to merge it quicker.","commit_id":"c041e6a2f9b35dad550730def5daee46024ef624"}],"neutron/db/migration/alembic_migrations/versions/newton/contract/acf3ef2b815a_qos_add_direction_to_bw_limit_rule_table.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"8da25f689aad7ad0af8d1655aa83653f1baabe05","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    with migration.remove_fks_from_table(bw_limit_table_name,"},{"line_number":48,"context_line":"                                         remove_unique_constraint\u003dTrue):"},{"line_number":49,"context_line":"        op.add_column(bw_limit_table_name,"},{"line_number":50,"context_line":"                      sa.Column(\"direction\", direction_enum,"},{"line_number":51,"context_line":"                                default\u003dconstants.EGRESS_DIRECTION,"},{"line_number":52,"context_line":"                                nullable\u003dFalse))"}],"source_content_type":"text/x-python","patch_set":20,"id":"3aaa91ec_f9a4e04b","line":49,"updated":"2016-06-29 14:52:02.000000000","message":"the column can be added in expand","commit_id":"41a3d54dee2a53835c88ba42e41da47d7a5a3e3e"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"a9fac84e7eedf5db0844cd8c1d72880e4a37a6e7","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    with migration.remove_fks_from_table(bw_limit_table_name,"},{"line_number":48,"context_line":"                                         remove_unique_constraint\u003dTrue):"},{"line_number":49,"context_line":"        op.add_column(bw_limit_table_name,"},{"line_number":50,"context_line":"                      sa.Column(\"direction\", direction_enum,"},{"line_number":51,"context_line":"                                default\u003dconstants.EGRESS_DIRECTION,"},{"line_number":52,"context_line":"                                nullable\u003dFalse))"}],"source_content_type":"text/x-python","patch_set":20,"id":"1aa78d24_5413bd5c","line":49,"in_reply_to":"3aaa91ec_f2efb2ae","updated":"2016-07-02 07:23:17.000000000","message":"but is it possible to make such dependencies? I don\u0027t know about such possibility and that\u0027s why I moved it to contract.\nAlso I was talking about that with Ann Taraday on IRC and she advice me to move it here.","commit_id":"41a3d54dee2a53835c88ba42e41da47d7a5a3e3e"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"224e78e1ad612c423ebb7ed1cf7862b3a43b58a9","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    with migration.remove_fks_from_table(bw_limit_table_name,"},{"line_number":48,"context_line":"                                         remove_unique_constraint\u003dTrue):"},{"line_number":49,"context_line":"        op.add_column(bw_limit_table_name,"},{"line_number":50,"context_line":"                      sa.Column(\"direction\", direction_enum,"},{"line_number":51,"context_line":"                                default\u003dconstants.EGRESS_DIRECTION,"},{"line_number":52,"context_line":"                                nullable\u003dFalse))"}],"source_content_type":"text/x-python","patch_set":20,"id":"3aaa91ec_f2efb2ae","line":49,"in_reply_to":"3aaa91ec_f9a4e04b","updated":"2016-06-30 08:20:58.000000000","message":"yeah, but you will have made contract migration depends on this migration.","commit_id":"41a3d54dee2a53835c88ba42e41da47d7a5a3e3e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"8da25f689aad7ad0af8d1655aa83653f1baabe05","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                \"ondelete\": \u0027CASCADE\u0027"},{"line_number":64,"context_line":"            }"},{"line_number":65,"context_line":"        }"},{"line_number":66,"context_line":"        migration.create_foreign_keys(bw_limit_table_name, [fk])"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"def contract_creation_exceptions():"}],"source_content_type":"text/x-python","patch_set":20,"id":"3aaa91ec_793d90dc","line":66,"updated":"2016-06-29 14:52:02.000000000","message":"it seems like the context manager you use restores foreign keys itself.","commit_id":"41a3d54dee2a53835c88ba42e41da47d7a5a3e3e"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"224e78e1ad612c423ebb7ed1cf7862b3a43b58a9","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        op.create_unique_constraint(\u0027unique_rule0direction0policy\u0027,"},{"line_number":55,"context_line":"                                    bw_limit_table_name,"},{"line_number":56,"context_line":"                                    [\u0027qos_policy_id\u0027, \u0027direction\u0027])"},{"line_number":57,"context_line":"        fk \u003d {"},{"line_number":58,"context_line":"            \u0027name\u0027: \u0027ibfk_1\u0027,"},{"line_number":59,"context_line":"            \u0027referred_table\u0027: policies_table_name,"},{"line_number":60,"context_line":"            \u0027constrained_columns\u0027: [\"qos_policy_id\"],"},{"line_number":61,"context_line":"            \u0027referred_columns\u0027: [\"id\"],"},{"line_number":62,"context_line":"            \"options\": {"},{"line_number":63,"context_line":"                \"ondelete\": \u0027CASCADE\u0027"},{"line_number":64,"context_line":"            }"},{"line_number":65,"context_line":"        }"},{"line_number":66,"context_line":"        migration.create_foreign_keys(bw_limit_table_name, [fk])"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"def contract_creation_exceptions():"}],"source_content_type":"text/x-python","patch_set":20,"id":"3aaa91ec_32893a27","line":66,"range":{"start_line":57,"start_character":8,"end_line":66,"end_character":64},"updated":"2016-06-30 08:20:58.000000000","message":"this is not needed at all, please see my comment on 18th patch set. Ihar is correct.","commit_id":"41a3d54dee2a53835c88ba42e41da47d7a5a3e3e"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"ae31caeab510c49820d8bf8bb0bb91b358182c76","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        op.create_unique_constraint(\u0027unique_rule0direction0policy\u0027,"},{"line_number":55,"context_line":"                                    bw_limit_table_name,"},{"line_number":56,"context_line":"                                    [\u0027qos_policy_id\u0027, \u0027direction\u0027])"},{"line_number":57,"context_line":"        fk \u003d {"},{"line_number":58,"context_line":"            \u0027name\u0027: \u0027ibfk_1\u0027,"},{"line_number":59,"context_line":"            \u0027referred_table\u0027: policies_table_name,"},{"line_number":60,"context_line":"            \u0027constrained_columns\u0027: [\"qos_policy_id\"],"},{"line_number":61,"context_line":"            \u0027referred_columns\u0027: [\"id\"],"},{"line_number":62,"context_line":"            \"options\": {"},{"line_number":63,"context_line":"                \"ondelete\": \u0027CASCADE\u0027"},{"line_number":64,"context_line":"            }"},{"line_number":65,"context_line":"        }"},{"line_number":66,"context_line":"        migration.create_foreign_keys(bw_limit_table_name, [fk])"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"def contract_creation_exceptions():"}],"source_content_type":"text/x-python","patch_set":20,"id":"1aa78d24_ec04677f","line":66,"range":{"start_line":57,"start_character":8,"end_line":66,"end_character":64},"in_reply_to":"1aa78d24_741a3970","updated":"2016-07-04 20:43:32.000000000","message":"Ok. it looks that I don\u0027t need to recreate this fk here so I will remove it.\nBut still I have problem that if I remove fk from table it not removes unique_constraint also. For mysql it works with my changes to migration.remove_fks_from_table() but for pgsql it not works and I don\u0027t know why :/ Do You have any idea?","commit_id":"41a3d54dee2a53835c88ba42e41da47d7a5a3e3e"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"a9fac84e7eedf5db0844cd8c1d72880e4a37a6e7","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        op.create_unique_constraint(\u0027unique_rule0direction0policy\u0027,"},{"line_number":55,"context_line":"                                    bw_limit_table_name,"},{"line_number":56,"context_line":"                                    [\u0027qos_policy_id\u0027, \u0027direction\u0027])"},{"line_number":57,"context_line":"        fk \u003d {"},{"line_number":58,"context_line":"            \u0027name\u0027: \u0027ibfk_1\u0027,"},{"line_number":59,"context_line":"            \u0027referred_table\u0027: policies_table_name,"},{"line_number":60,"context_line":"            \u0027constrained_columns\u0027: [\"qos_policy_id\"],"},{"line_number":61,"context_line":"            \u0027referred_columns\u0027: [\"id\"],"},{"line_number":62,"context_line":"            \"options\": {"},{"line_number":63,"context_line":"                \"ondelete\": \u0027CASCADE\u0027"},{"line_number":64,"context_line":"            }"},{"line_number":65,"context_line":"        }"},{"line_number":66,"context_line":"        migration.create_foreign_keys(bw_limit_table_name, [fk])"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"def contract_creation_exceptions():"}],"source_content_type":"text/x-python","patch_set":20,"id":"1aa78d24_741a3970","line":66,"range":{"start_line":57,"start_character":8,"end_line":66,"end_character":64},"in_reply_to":"3aaa91ec_32893a27","updated":"2016-07-02 07:23:17.000000000","message":"TODO: ok, I will check it once again","commit_id":"41a3d54dee2a53835c88ba42e41da47d7a5a3e3e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"8da25f689aad7ad0af8d1655aa83653f1baabe05","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    Because new column \"direction\" being added and new unique constraint is set"},{"line_number":73,"context_line":"    for pair (policy_id, direction) this new column also need to be added in"},{"line_number":74,"context_line":"    contract branch."},{"line_number":75,"context_line":"    \"\"\""},{"line_number":76,"context_line":"    return {"},{"line_number":77,"context_line":"        sa.Column: [\"%s.direction\" % bw_limit_table_name]"}],"source_content_type":"text/x-python","patch_set":20,"id":"3aaa91ec_3c05b610","line":74,"updated":"2016-06-29 14:52:02.000000000","message":"Not really. You can add a column in expand but enforce constraint in contract.","commit_id":"41a3d54dee2a53835c88ba42e41da47d7a5a3e3e"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"a9fac84e7eedf5db0844cd8c1d72880e4a37a6e7","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    Because new column \"direction\" being added and new unique constraint is set"},{"line_number":73,"context_line":"    for pair (policy_id, direction) this new column also need to be added in"},{"line_number":74,"context_line":"    contract branch."},{"line_number":75,"context_line":"    \"\"\""},{"line_number":76,"context_line":"    return {"},{"line_number":77,"context_line":"        sa.Column: [\"%s.direction\" % bw_limit_table_name]"}],"source_content_type":"text/x-python","patch_set":20,"id":"1aa78d24_1420159b","line":74,"in_reply_to":"3aaa91ec_3c05b610","updated":"2016-07-02 07:23:17.000000000","message":"Can You give me some example how to force such dependency between upgrade phases? I will change it then.","commit_id":"41a3d54dee2a53835c88ba42e41da47d7a5a3e3e"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"30278e450b3435654bc9accb322b4ae609c7c640","unresolved":false,"context_lines":[{"line_number":48,"context_line":"                                         remove_unique_constraints\u003dTrue):"},{"line_number":49,"context_line":"        op.add_column(bw_limit_table_name,"},{"line_number":50,"context_line":"                      sa.Column(\"direction\", direction_enum,"},{"line_number":51,"context_line":"                                default\u003dconstants.EGRESS_DIRECTION,"},{"line_number":52,"context_line":"                                nullable\u003dFalse))"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        op.create_unique_constraint(\u0027unique_rule0direction0policy\u0027,"}],"source_content_type":"text/x-python","patch_set":28,"id":"1aa78d24_355d397a","line":51,"range":{"start_line":51,"start_character":32,"end_line":51,"end_character":39},"updated":"2016-07-14 07:24:11.000000000","message":"Please, take a look at http://docs.openstack.org/developer/neutron/devref/db_layer.html#difference-between-default-and-server-default-parameters-for-columns\n\n\u0027default\u0027 is useless in migrations, use \u0027server_default\u0027 instead.","commit_id":"5cdf95deedb04d922c5cde265e18da9e143b4dff"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"606e1be6350f5d896f5534a0d60b5e04c14bf3ee","unresolved":false,"context_lines":[{"line_number":48,"context_line":"                                         remove_unique_constraints\u003dTrue):"},{"line_number":49,"context_line":"        op.add_column(bw_limit_table_name,"},{"line_number":50,"context_line":"                      sa.Column(\"direction\", direction_enum,"},{"line_number":51,"context_line":"                                default\u003dconstants.EGRESS_DIRECTION,"},{"line_number":52,"context_line":"                                nullable\u003dFalse))"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        op.create_unique_constraint(\u0027unique_rule0direction0policy\u0027,"}],"source_content_type":"text/x-python","patch_set":28,"id":"1aa78d24_44d65028","line":51,"range":{"start_line":51,"start_character":32,"end_line":51,"end_character":39},"in_reply_to":"1aa78d24_355d397a","updated":"2016-07-14 11:03:34.000000000","message":"Thx. Changed","commit_id":"5cdf95deedb04d922c5cde265e18da9e143b4dff"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"b10bec4cd0a7dcad8ec66ecd8395e4566f58252d","unresolved":false,"context_lines":[{"line_number":63,"context_line":"    for pair (policy_id, direction) this new column also need to be added in"},{"line_number":64,"context_line":"    contract branch."},{"line_number":65,"context_line":"    \"\"\""},{"line_number":66,"context_line":"    return {"},{"line_number":67,"context_line":"        sa.Column: [\"%s.direction\" % bw_limit_table_name]"},{"line_number":68,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":28,"id":"1aa78d24_63f438cf","line":66,"updated":"2016-07-14 00:48:30.000000000","message":"what does this mean exactly? :)\n\nI\u0027m a bit lost in this area :)","commit_id":"5cdf95deedb04d922c5cde265e18da9e143b4dff"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"cc1be41f89237667ff8e5a8634883803d25d4902","unresolved":false,"context_lines":[{"line_number":63,"context_line":"    for pair (policy_id, direction) this new column also need to be added in"},{"line_number":64,"context_line":"    contract branch."},{"line_number":65,"context_line":"    \"\"\""},{"line_number":66,"context_line":"    return {"},{"line_number":67,"context_line":"        sa.Column: [\"%s.direction\" % bw_limit_table_name]"},{"line_number":68,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":28,"id":"1aa78d24_f51451a0","line":66,"in_reply_to":"1aa78d24_63f438cf","updated":"2016-07-14 07:21:54.000000000","message":"I have a change that adds explanation of this to devref https://review.openstack.org/#/c/338197/ :)","commit_id":"5cdf95deedb04d922c5cde265e18da9e143b4dff"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"cb37b255d430a3d574b2928570f914448aa32e36","unresolved":false,"context_lines":[{"line_number":63,"context_line":"    for pair (policy_id, direction) this new column also need to be added in"},{"line_number":64,"context_line":"    contract branch."},{"line_number":65,"context_line":"    \"\"\""},{"line_number":66,"context_line":"    return {"},{"line_number":67,"context_line":"        sa.Column: [\"%s.direction\" % bw_limit_table_name]"},{"line_number":68,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":28,"id":"1aa78d24_daa86223","line":66,"in_reply_to":"1aa78d24_63f438cf","updated":"2016-07-14 06:52:46.000000000","message":"thanks this function there is no failed test because usually adding new table should be done in expand phase but here I need also to remove constraint and add another one and that needs to be in contract phase. It\u0027s tip from Ann Taraday.\nIhar wrote something about creating column in expand and here create only new constraint but I\u0027m not sure if there is any solution to ensure such dependency.","commit_id":"5cdf95deedb04d922c5cde265e18da9e143b4dff"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"3e296e3ff5f1c8aa6d958bcab7959f1b8ea1f389","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"def contract_creation_exceptions():"},{"line_number":60,"context_line":"    \"\"\"QoS policy id foreign key was changed to not unique in contract brach."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    Because new column \"direction\" being added and new unique constraint is set"},{"line_number":63,"context_line":"    for pair (policy_id, direction) this new column also need to be added in"}],"source_content_type":"text/x-python","patch_set":30,"id":"dada55a8_aabb070e","line":60,"range":{"start_line":60,"start_character":7,"end_line":60,"end_character":10},"updated":"2016-07-26 16:02:56.000000000","message":"s/QoS/The QoS","commit_id":"556c27588007983251f8c7ed165f9191eeb59475"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"3e296e3ff5f1c8aa6d958bcab7959f1b8ea1f389","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"def contract_creation_exceptions():"},{"line_number":60,"context_line":"    \"\"\"QoS policy id foreign key was changed to not unique in contract brach."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    Because new column \"direction\" being added and new unique constraint is set"},{"line_number":63,"context_line":"    for pair (policy_id, direction) this new column also need to be added in"}],"source_content_type":"text/x-python","patch_set":30,"id":"dada55a8_aae4a73b","line":60,"range":{"start_line":60,"start_character":45,"end_line":60,"end_character":76},"updated":"2016-07-26 16:02:56.000000000","message":"s/not unique in contract brach/not be unique in the contract branch.","commit_id":"556c27588007983251f8c7ed165f9191eeb59475"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"6b73c13de2299d692f4f51d826b3303721b970c7","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"def contract_creation_exceptions():"},{"line_number":60,"context_line":"    \"\"\"QoS policy id foreign key was changed to not unique in contract brach."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    Because new column \"direction\" being added and new unique constraint is set"},{"line_number":63,"context_line":"    for pair (policy_id, direction) this new column also need to be added in"}],"source_content_type":"text/x-python","patch_set":30,"id":"dada55a8_0cc0654f","line":60,"range":{"start_line":60,"start_character":7,"end_line":60,"end_character":10},"in_reply_to":"dada55a8_aabb070e","updated":"2016-07-26 20:01:39.000000000","message":"Done","commit_id":"556c27588007983251f8c7ed165f9191eeb59475"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"6b73c13de2299d692f4f51d826b3303721b970c7","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"def contract_creation_exceptions():"},{"line_number":60,"context_line":"    \"\"\"QoS policy id foreign key was changed to not unique in contract brach."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    Because new column \"direction\" being added and new unique constraint is set"},{"line_number":63,"context_line":"    for pair (policy_id, direction) this new column also need to be added in"}],"source_content_type":"text/x-python","patch_set":30,"id":"dada55a8_4cb6ddf9","line":60,"range":{"start_line":60,"start_character":45,"end_line":60,"end_character":76},"in_reply_to":"dada55a8_aae4a73b","updated":"2016-07-26 20:01:39.000000000","message":"Done","commit_id":"556c27588007983251f8c7ed165f9191eeb59475"},{"author":{"_account_id":18051,"name":"David Shaughnessy","email":"david.shaughnessy@intel.com","username":"davidsha"},"change_message_id":"3e296e3ff5f1c8aa6d958bcab7959f1b8ea1f389","unresolved":false,"context_lines":[{"line_number":59,"context_line":"def contract_creation_exceptions():"},{"line_number":60,"context_line":"    \"\"\"QoS policy id foreign key was changed to not unique in contract brach."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    Because new column \"direction\" being added and new unique constraint is set"},{"line_number":63,"context_line":"    for pair (policy_id, direction) this new column also need to be added in"},{"line_number":64,"context_line":"    contract branch."},{"line_number":65,"context_line":"    \"\"\""},{"line_number":66,"context_line":"    return {"},{"line_number":67,"context_line":"        sa.Column: [\"%s.direction\" % bw_limit_table_name]"}],"source_content_type":"text/x-python","patch_set":30,"id":"dada55a8_0a7053a3","line":64,"range":{"start_line":62,"start_character":4,"end_line":64,"end_character":20},"updated":"2016-07-26 16:02:56.000000000","message":"\"Because of the new column being added and it being set for the pair (policy_id, direction) this new column needs to be added to the contract branch.\"\n\nNot sure if I\u0027ve captured what you\u0027ve said so a secondary opinion might help.","commit_id":"556c27588007983251f8c7ed165f9191eeb59475"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"6b73c13de2299d692f4f51d826b3303721b970c7","unresolved":false,"context_lines":[{"line_number":59,"context_line":"def contract_creation_exceptions():"},{"line_number":60,"context_line":"    \"\"\"QoS policy id foreign key was changed to not unique in contract brach."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    Because new column \"direction\" being added and new unique constraint is set"},{"line_number":63,"context_line":"    for pair (policy_id, direction) this new column also need to be added in"},{"line_number":64,"context_line":"    contract branch."},{"line_number":65,"context_line":"    \"\"\""},{"line_number":66,"context_line":"    return {"},{"line_number":67,"context_line":"        sa.Column: [\"%s.direction\" % bw_limit_table_name]"}],"source_content_type":"text/x-python","patch_set":30,"id":"dada55a8_2cb729d9","line":64,"range":{"start_line":62,"start_character":4,"end_line":64,"end_character":20},"in_reply_to":"dada55a8_0a7053a3","updated":"2016-07-26 20:01:39.000000000","message":"I wrote it little bit different now. Please check if it is better now.","commit_id":"556c27588007983251f8c7ed165f9191eeb59475"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"87de164d8da2d3fa6519e39cacaa81043e91f1a9","unresolved":false,"context_lines":[{"line_number":24,"context_line":"# revision identifiers, used by Alembic."},{"line_number":25,"context_line":"revision \u003d \u0027acf3ef2b815a\u0027"},{"line_number":26,"context_line":"down_revision \u003d \u00275c85685d616d\u0027"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"from alembic import op"},{"line_number":29,"context_line":"import sqlalchemy as sa"},{"line_number":30,"context_line":""}],"source_content_type":"text/x-python","patch_set":43,"id":"7a8ec9b2_056c589b","line":27,"updated":"2016-09-19 22:08:40.000000000","message":"This must be repurposed for Ocata.","commit_id":"6bb1afded674eb71a35e51ad70fd54d85741bff0"}],"neutron/db/migration/alembic_migrations/versions/newton/expand/5953ac529e7c_qos_add_direction_to_bw_limit_rules_.py":[{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"adf3743c537a740541fc6ad0e133152dbf3da06d","unresolved":false,"context_lines":[{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    fk_name \u003d delete_foreign_key_constraint()"},{"line_number":42,"context_line":"    op.add_column(bw_limit_table_name,"},{"line_number":43,"context_line":"                  sa.Column(\"direction\", direction_enum, nullable\u003dFalse))"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    op.create_unique_constraint(\u0027unique_rule0direction0policy\u0027,"},{"line_number":46,"context_line":"                                bw_limit_table_name,"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a122d0e_d4c048e3","line":43,"updated":"2016-04-15 16:37:05.000000000","message":"I think we should provide the default, to be populated as \"egress\" on the tables for existing rules.","commit_id":"f7033f3a68521364a278912361087f4f2d3948e8"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"adf3743c537a740541fc6ad0e133152dbf3da06d","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    op.add_column(bw_limit_table_name,"},{"line_number":43,"context_line":"                  sa.Column(\"direction\", direction_enum, nullable\u003dFalse))"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    op.create_unique_constraint(\u0027unique_rule0direction0policy\u0027,"},{"line_number":46,"context_line":"                                bw_limit_table_name,"},{"line_number":47,"context_line":"                                [\u0027qos_policy_id\u0027, \u0027direction\u0027])"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"1a122d0e_94bb700e","line":45,"updated":"2016-04-15 16:37:05.000000000","message":"I guess the constraint is to avoid two bandwidth_limit rules in the same direction, right? neat.\n\nIn the future we could have several rules, one per traffic classifier on the same policy, but I guess it\u0027s just a fact of changing this constraint -as you\u0027re doing now- to take also traffic_classifier_id, if that ever materializes that way.","commit_id":"f7033f3a68521364a278912361087f4f2d3948e8"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"adf3743c537a740541fc6ad0e133152dbf3da06d","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                type_\u003d\u0027foreignkey\u0027"},{"line_number":68,"context_line":"            )"},{"line_number":69,"context_line":"            if op.get_context().bind.dialect.name \u003d\u003d \u0027mysql\u0027:"},{"line_number":70,"context_line":"                op.drop_constraint("},{"line_number":71,"context_line":"                    constraint_name\u003dfk[\u0027constrained_columns\u0027][0],"},{"line_number":72,"context_line":"                    table_name\u003dbw_limit_table_name,"},{"line_number":73,"context_line":"                    type_\u003d\u0027unique\u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a122d0e_546a781b","line":70,"updated":"2016-04-15 16:37:05.000000000","message":"why do we remove the unique constraint only in mysql, postgres auto-deletes them when you drop the foreignkey ?","commit_id":"f7033f3a68521364a278912361087f4f2d3948e8"}],"neutron/db/migration/alembic_migrations/versions/newton/expand/acf3ef2b815a_qos_add_direction_to_bw_limit_rule_table.py":[{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"81b3cc4415162db6f5f59bd0a2fc0067900a93aa","unresolved":false,"context_lines":[{"line_number":63,"context_line":"    )"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"def delete_foreign_key_constraint():"},{"line_number":67,"context_line":"    inspector \u003d sa.engine.reflection.Inspector.from_engine(op.get_bind())"},{"line_number":68,"context_line":"    fk_constraints \u003d inspector.get_foreign_keys(bw_limit_table_name)"},{"line_number":69,"context_line":"    for fk in fk_constraints:"},{"line_number":70,"context_line":"        if fk[\u0027referred_table\u0027] \u003d\u003d policies_table_name:"},{"line_number":71,"context_line":"            op.drop_constraint("},{"line_number":72,"context_line":"                constraint_name\u003dfk[\u0027name\u0027],"},{"line_number":73,"context_line":"                table_name\u003dbw_limit_table_name,"},{"line_number":74,"context_line":"                type_\u003d\u0027foreignkey\u0027"},{"line_number":75,"context_line":"            )"},{"line_number":76,"context_line":"            if op.get_context().bind.dialect.name \u003d\u003d \u0027mysql\u0027:"},{"line_number":77,"context_line":"                op.drop_constraint("},{"line_number":78,"context_line":"                    constraint_name\u003dfk[\u0027constrained_columns\u0027][0],"},{"line_number":79,"context_line":"                    table_name\u003dbw_limit_table_name,"},{"line_number":80,"context_line":"                    type_\u003d\u0027unique\u0027"},{"line_number":81,"context_line":"                )"},{"line_number":82,"context_line":"            return fk[\u0027name\u0027]"}],"source_content_type":"text/x-python","patch_set":18,"id":"3aaa91ec_bb6a25b1","line":82,"range":{"start_line":66,"start_character":0,"end_line":82,"end_character":29},"updated":"2016-06-24 10:49:45.000000000","message":"Please, use remove_fks_from_table https://github.com/openstack/neutron/blob/master/neutron/db/migration/__init__.py#L182 instead of this.\n\nSo, this will look like:\n\n    with migration.remove_fks_from_table(bw_limit_table_name):\n        op.add_column(...)\n        op.create_unique_constraint(...)\n\nSo, this migration will go to contract branch.\n\nTo skip checks: \n\n   def contract_creation_exceptions():\n       return {\n        sa.Column: [\u0027qos_bandwidth_limit_rules.direction\u0027]\n    }","commit_id":"ce89059d714336680a590cb4b555497ecfdce31a"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"b3197407e0197c5b837ba41830aa9b77d0119239","unresolved":false,"context_lines":[{"line_number":63,"context_line":"    )"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"def delete_foreign_key_constraint():"},{"line_number":67,"context_line":"    inspector \u003d sa.engine.reflection.Inspector.from_engine(op.get_bind())"},{"line_number":68,"context_line":"    fk_constraints \u003d inspector.get_foreign_keys(bw_limit_table_name)"},{"line_number":69,"context_line":"    for fk in fk_constraints:"},{"line_number":70,"context_line":"        if fk[\u0027referred_table\u0027] \u003d\u003d policies_table_name:"},{"line_number":71,"context_line":"            op.drop_constraint("},{"line_number":72,"context_line":"                constraint_name\u003dfk[\u0027name\u0027],"},{"line_number":73,"context_line":"                table_name\u003dbw_limit_table_name,"},{"line_number":74,"context_line":"                type_\u003d\u0027foreignkey\u0027"},{"line_number":75,"context_line":"            )"},{"line_number":76,"context_line":"            if op.get_context().bind.dialect.name \u003d\u003d \u0027mysql\u0027:"},{"line_number":77,"context_line":"                op.drop_constraint("},{"line_number":78,"context_line":"                    constraint_name\u003dfk[\u0027constrained_columns\u0027][0],"},{"line_number":79,"context_line":"                    table_name\u003dbw_limit_table_name,"},{"line_number":80,"context_line":"                    type_\u003d\u0027unique\u0027"},{"line_number":81,"context_line":"                )"},{"line_number":82,"context_line":"            return fk[\u0027name\u0027]"}],"source_content_type":"text/x-python","patch_set":18,"id":"3aaa91ec_e508712a","line":82,"range":{"start_line":66,"start_character":0,"end_line":82,"end_character":29},"in_reply_to":"3aaa91ec_bb6a25b1","updated":"2016-06-24 21:01:10.000000000","message":"Thanks. I changed it like You said. I had to add some function to drop unique constraint also because at least in mysql if foreign key is removed and it was unique before this unique constraint is not removed automatically.\n\nAlso now I have problem with PGSQL because probably such unique constraint for this foreign key is not removed properly. I don\u0027t know exactly how to do it in PGSQL and I need to dig more into it :/","commit_id":"ce89059d714336680a590cb4b555497ecfdce31a"}],"neutron/extensions/qos.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"87c4c5f4934c65d7c2dba5ea201ffbb657279442","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                                  \u0027is_visible\u0027: True, \u0027default\u0027: 0,"},{"line_number":84,"context_line":"                                  \u0027validate\u0027: {\u0027type:non_negative\u0027: None}},"},{"line_number":85,"context_line":"                              \u0027direction\u0027: {"},{"line_number":86,"context_line":"                                  \u0027allow_post\u0027: True, \u0027allow_put\u0027: False,"},{"line_number":87,"context_line":"                                  \u0027is_visible\u0027: True,"},{"line_number":88,"context_line":"                                  \u0027default\u0027: common_constants.EGRESS_DIRECTION,"},{"line_number":89,"context_line":"                                  \u0027validate\u0027: {\u0027type:values\u0027: common_constants."}],"source_content_type":"text/x-python","patch_set":29,"id":"dada55a8_181df10f","line":86,"updated":"2016-07-17 20:03:28.000000000","message":"why are we unable to update this?","commit_id":"28e9ed8d718f65c50db25e351cd7ea847a42b5d8"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"1fec669c09f0c3c931461900103ba4bfe3208914","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                                  \u0027is_visible\u0027: True, \u0027default\u0027: 0,"},{"line_number":84,"context_line":"                                  \u0027validate\u0027: {\u0027type:non_negative\u0027: None}},"},{"line_number":85,"context_line":"                              \u0027direction\u0027: {"},{"line_number":86,"context_line":"                                  \u0027allow_post\u0027: True, \u0027allow_put\u0027: False,"},{"line_number":87,"context_line":"                                  \u0027is_visible\u0027: True,"},{"line_number":88,"context_line":"                                  \u0027default\u0027: common_constants.EGRESS_DIRECTION,"},{"line_number":89,"context_line":"                                  \u0027validate\u0027: {\u0027type:values\u0027: common_constants."}],"source_content_type":"text/x-python","patch_set":29,"id":"dada55a8_2171e644","line":86,"in_reply_to":"dada55a8_181df10f","updated":"2016-07-21 06:20:51.000000000","message":"That\u0027s right, it should be updatable, good catch :)","commit_id":"28e9ed8d718f65c50db25e351cd7ea847a42b5d8"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"b3727d23f474b39894ddb59ed844cebebbf5e7a5","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                                  \u0027is_visible\u0027: True, \u0027default\u0027: 0,"},{"line_number":84,"context_line":"                                  \u0027validate\u0027: {\u0027type:non_negative\u0027: None}},"},{"line_number":85,"context_line":"                              \u0027direction\u0027: {"},{"line_number":86,"context_line":"                                  \u0027allow_post\u0027: True, \u0027allow_put\u0027: False,"},{"line_number":87,"context_line":"                                  \u0027is_visible\u0027: True,"},{"line_number":88,"context_line":"                                  \u0027default\u0027: common_constants.EGRESS_DIRECTION,"},{"line_number":89,"context_line":"                                  \u0027validate\u0027: {\u0027type:values\u0027: common_constants."}],"source_content_type":"text/x-python","patch_set":29,"id":"dada55a8_abbfeda8","line":86,"in_reply_to":"dada55a8_2171e644","updated":"2016-07-24 20:19:52.000000000","message":"right, changed","commit_id":"28e9ed8d718f65c50db25e351cd7ea847a42b5d8"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"9a65efc4b9fbcc78004a9518301a0e59ea8c470f","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                                  \u0027is_visible\u0027: True, \u0027default\u0027: 0,"},{"line_number":85,"context_line":"                                  \u0027validate\u0027: {\u0027type:range\u0027: [0,"},{"line_number":86,"context_line":"                                  common_constants.DB_INTEGER_MAX_VALUE]}},"},{"line_number":87,"context_line":"                              \u0027direction\u0027: {"},{"line_number":88,"context_line":"                                  \u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":89,"context_line":"                                  \u0027is_visible\u0027: True,"},{"line_number":90,"context_line":"                                  \u0027default\u0027: common_constants.EGRESS_DIRECTION,"}],"source_content_type":"text/x-python","patch_set":43,"id":"3a98d1f4_272d8346","line":87,"range":{"start_line":87,"start_character":31,"end_line":87,"end_character":40},"updated":"2016-09-30 09:25:18.000000000","message":"how is an api user supposed to discover the functionality?\ndoesn\u0027t this warrant another extension?","commit_id":"6bb1afded674eb71a35e51ad70fd54d85741bff0"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"9a65efc4b9fbcc78004a9518301a0e59ea8c470f","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                                  \u0027validate\u0027: {\u0027type:range\u0027: [0,"},{"line_number":86,"context_line":"                                  common_constants.DB_INTEGER_MAX_VALUE]}},"},{"line_number":87,"context_line":"                              \u0027direction\u0027: {"},{"line_number":88,"context_line":"                                  \u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":89,"context_line":"                                  \u0027is_visible\u0027: True,"},{"line_number":90,"context_line":"                                  \u0027default\u0027: common_constants.EGRESS_DIRECTION,"},{"line_number":91,"context_line":"                                  \u0027validate\u0027: {\u0027type:values\u0027: common_constants."}],"source_content_type":"text/x-python","patch_set":43,"id":"3a98d1f4_e7563bd1","line":88,"range":{"start_line":88,"start_character":55,"end_line":88,"end_character":72},"updated":"2016-09-30 09:25:18.000000000","message":"can changing the direction be a meaningful operation?","commit_id":"6bb1afded674eb71a35e51ad70fd54d85741bff0"}],"neutron/objects/qos/rule.py":[{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"adf3743c537a740541fc6ad0e133152dbf3da06d","unresolved":false,"context_lines":[{"line_number":94,"context_line":"    fields \u003d {"},{"line_number":95,"context_line":"        \u0027max_kbps\u0027: obj_fields.IntegerField(nullable\u003dTrue),"},{"line_number":96,"context_line":"        \u0027max_burst_kbps\u0027: obj_fields.IntegerField(nullable\u003dTrue),"},{"line_number":97,"context_line":"        \u0027direction\u0027: obj_fields.EnumField(valid_values\u003d[\"egress\", \"ingress\"],"},{"line_number":98,"context_line":"                                          nullable\u003dFalse)"},{"line_number":99,"context_line":"    }"},{"line_number":100,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"1a122d0e_ff81dd4e","line":97,"updated":"2016-04-15 16:37:05.000000000","message":"can we create EGRESS and INGRESS constants for later references?","commit_id":"f7033f3a68521364a278912361087f4f2d3948e8"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"adf3743c537a740541fc6ad0e133152dbf3da06d","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        \u0027max_burst_kbps\u0027: obj_fields.IntegerField(nullable\u003dTrue),"},{"line_number":97,"context_line":"        \u0027direction\u0027: obj_fields.EnumField(valid_values\u003d[\"egress\", \"ingress\"],"},{"line_number":98,"context_line":"                                          nullable\u003dFalse)"},{"line_number":99,"context_line":"    }"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    rule_type \u003d qos_consts.RULE_TYPE_BANDWIDTH_LIMIT"},{"line_number":102,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"1a122d0e_df8ce137","line":99,"updated":"2016-04-15 16:37:05.000000000","message":"You also need to add the logic on make_obj_compatible for QoSPolicy to kill rules with direction:ingress when downgrading this object. also the direction field needs to be removed when direction:egress.","commit_id":"f7033f3a68521364a278912361087f4f2d3948e8"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"85b46b6dd48f4b4f59c003c2fd07f9afed19e035","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    fields \u003d {"},{"line_number":108,"context_line":"        \u0027max_kbps\u0027: obj_fields.IntegerField(nullable\u003dTrue),"},{"line_number":109,"context_line":"        \u0027max_burst_kbit\u0027: obj_fields.IntegerField(nullable\u003dTrue),"},{"line_number":110,"context_line":"    }"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    rule_type \u003d qos_consts.RULE_TYPE_INGRESS_BANDWIDTH_LIMIT"}],"source_content_type":"text/x-python","patch_set":14,"id":"dab17558_1591b4f1","line":109,"updated":"2016-05-16 03:01:38.000000000","message":"No sure if this should be kbit or kbps.\n( otherwise impressive code )","commit_id":"313b28bec589d12fb9258e079218f0ddd40bb280"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"41dd3e64b3e9104acc3a6a9fdef7c9a137529883","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    fields \u003d {"},{"line_number":108,"context_line":"        \u0027max_kbps\u0027: obj_fields.IntegerField(nullable\u003dTrue),"},{"line_number":109,"context_line":"        \u0027max_burst_kbit\u0027: obj_fields.IntegerField(nullable\u003dTrue),"},{"line_number":110,"context_line":"    }"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    rule_type \u003d qos_consts.RULE_TYPE_INGRESS_BANDWIDTH_LIMIT"}],"source_content_type":"text/x-python","patch_set":14,"id":"dab17558_4ae392d9","line":109,"in_reply_to":"dab17558_1591b4f1","updated":"2016-05-16 06:14:53.000000000","message":"In existing rule it is kbps but according to bug: https://bugs.launchpad.net/neutron/+bug/1507761 I made new rule with proper name already.\nIf someone thinks that better would be to name it with \"kbps\" (which is not proper name) to be more consistent with current bandwidth_limit_rule, I can change it ofcourse","commit_id":"313b28bec589d12fb9258e079218f0ddd40bb280"},{"author":{"_account_id":20076,"name":"QunyingRan","email":"ran.qunying@zte.com.cn","username":"QunyingRan"},"change_message_id":"b113d8f2c5f027ccf33169d983480399dda8ac99","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    #NOTE(mangelajo): versions need to be handled from the top QosRule object"},{"line_number":53,"context_line":"    #                 because it\u0027s the only reference QosPolicy can make"},{"line_number":54,"context_line":"    #                 to them via obj_relationships version map"},{"line_number":55,"context_line":"    VERSION \u003d \u00271.2\u0027"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    fields \u003d {"},{"line_number":58,"context_line":"        \u0027id\u0027: obj_fields.UUIDField(),"}],"source_content_type":"text/x-python","patch_set":20,"id":"3aaa91ec_3fc7fd45","line":55,"range":{"start_line":55,"start_character":16,"end_line":55,"end_character":17},"updated":"2016-07-01 10:34:49.000000000","message":"I add your code in my openstack, I found  the VERSION in QosPolicy must be modified at the same time, otherwise when dettach policy from port will be wrong","commit_id":"41a3d54dee2a53835c88ba42e41da47d7a5a3e3e"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"ae31caeab510c49820d8bf8bb0bb91b358182c76","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    #NOTE(mangelajo): versions need to be handled from the top QosRule object"},{"line_number":53,"context_line":"    #                 because it\u0027s the only reference QosPolicy can make"},{"line_number":54,"context_line":"    #                 to them via obj_relationships version map"},{"line_number":55,"context_line":"    VERSION \u003d \u00271.2\u0027"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    fields \u003d {"},{"line_number":58,"context_line":"        \u0027id\u0027: obj_fields.UUIDField(),"}],"source_content_type":"text/x-python","patch_set":20,"id":"1aa78d24_ec7907fe","line":55,"range":{"start_line":55,"start_character":16,"end_line":55,"end_character":17},"in_reply_to":"1aa78d24_f42469b0","updated":"2016-07-04 20:43:32.000000000","message":"I tried to add/remove policy to port and all was working fine. Can You give me some more details what is wrong in Your case?","commit_id":"41a3d54dee2a53835c88ba42e41da47d7a5a3e3e"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"a9fac84e7eedf5db0844cd8c1d72880e4a37a6e7","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    #NOTE(mangelajo): versions need to be handled from the top QosRule object"},{"line_number":53,"context_line":"    #                 because it\u0027s the only reference QosPolicy can make"},{"line_number":54,"context_line":"    #                 to them via obj_relationships version map"},{"line_number":55,"context_line":"    VERSION \u003d \u00271.2\u0027"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    fields \u003d {"},{"line_number":58,"context_line":"        \u0027id\u0027: obj_fields.UUIDField(),"}],"source_content_type":"text/x-python","patch_set":20,"id":"1aa78d24_f42469b0","line":55,"range":{"start_line":55,"start_character":16,"end_line":55,"end_character":17},"in_reply_to":"3aaa91ec_3fc7fd45","updated":"2016-07-02 07:23:17.000000000","message":"TODO: ok, thx. I will check it","commit_id":"41a3d54dee2a53835c88ba42e41da47d7a5a3e3e"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"51e79a31eb61e4c50e2a993826791514acb309e0","unresolved":false,"context_lines":[{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    rule_type \u003d qos_consts.RULE_TYPE_BANDWIDTH_LIMIT"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    def obj_make_compatible(self, primitive, target_version):"},{"line_number":107,"context_line":"        _target_version \u003d versionutils.convert_version_to_tuple(target_version)"},{"line_number":108,"context_line":"        if _target_version \u003c (1, 2):"},{"line_number":109,"context_line":"            direction \u003d primitive.get(\u0027direction\u0027)"}],"source_content_type":"text/x-python","patch_set":36,"id":"3ac371cc_8a648b49","line":106,"updated":"2016-08-16 14:26:58.000000000","message":"Looking at the other Qos patch, and following ihar comments I realized that we also need to add obj_make_compatible part for QosPolicy, to remove the rule from the list of the primitive if the direction field is ingress, and pop it otherwise.","commit_id":"1da63ea72789b6555f2f1d4ed4624e9f578afd67"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"3270c1c1e17ce75d53d680e84e1871b3b80901bc","unresolved":false,"context_lines":[{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    rule_type \u003d qos_consts.RULE_TYPE_BANDWIDTH_LIMIT"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    def obj_make_compatible(self, primitive, target_version):"},{"line_number":107,"context_line":"        _target_version \u003d versionutils.convert_version_to_tuple(target_version)"},{"line_number":108,"context_line":"        if _target_version \u003c (1, 2):"},{"line_number":109,"context_line":"            direction \u003d primitive.get(\u0027direction\u0027)"}],"source_content_type":"text/x-python","patch_set":36,"id":"3ac371cc_5f2a3e2d","line":106,"in_reply_to":"3ac371cc_8a648b49","updated":"2016-08-16 20:54:52.000000000","message":"Done","commit_id":"1da63ea72789b6555f2f1d4ed4624e9f578afd67"}],"neutron/plugins/ml2/drivers/openvswitch/agent/extension_drivers/qos_driver.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"d922be2afdecb6436c8b8ad7d9608d8382327b45","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        current_max_kbps, current_max_burst_kbit \u003d ("},{"line_number":81,"context_line":"            self.br_int.get_ingress_bw_limit_for_port(port_name))"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        if current_max_kbps is not None or current_max_burst_kbit is not None:"},{"line_number":84,"context_line":"            self.br_int.delete_ingress_bw_limit_for_port(port_name)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        self.br_int.create_ingress_bw_limit_for_port("},{"line_number":87,"context_line":"            port_name,"}],"source_content_type":"text/x-python","patch_set":14,"id":"dab17558_4aacd39e","line":84,"range":{"start_line":83,"start_character":0,"end_line":84,"end_character":67},"updated":"2016-05-17 15:35:39.000000000","message":"In a future, new queues will be added to the QoS policy attached to the port. Deleting the QoS policy during an update will disable the other queues attached to the port \nthrough the QoS policy.","commit_id":"313b28bec589d12fb9258e079218f0ddd40bb280"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"731fe8dad91bdc4642ccb3c848e7e222a81d8bbd","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        current_max_kbps, current_max_burst_kbit \u003d ("},{"line_number":81,"context_line":"            self.br_int.get_ingress_bw_limit_for_port(port_name))"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        if current_max_kbps is not None or current_max_burst_kbit is not None:"},{"line_number":84,"context_line":"            self.br_int.delete_ingress_bw_limit_for_port(port_name)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        self.br_int.create_ingress_bw_limit_for_port("},{"line_number":87,"context_line":"            port_name,"}],"source_content_type":"text/x-python","patch_set":14,"id":"bab6814e_9d1b3d80","line":84,"range":{"start_line":83,"start_character":0,"end_line":84,"end_character":67},"in_reply_to":"bab6814e_5e7e04e5","updated":"2016-05-19 09:33:30.000000000","message":"Yes, that is the point. I\u0027m implementing the egress minimum bw limit. I created two queues:\nQOS_INGREES_QUEUE \u003d 0\nQOS_EGREES_QUEUE \u003d 1\n\nFor now, we only need both queues. I\u0027m going to upload the implementation (still very immature) just to share with you my idea.\nLink: https://review.openstack.org/#/c/318531/\n\nPlease, take a look at the functions to see how I manage the qos and queue registers.\nIn a future, will have ingress max, ingress min, egress max and egress min. Maybe DSCP should also be included.","commit_id":"313b28bec589d12fb9258e079218f0ddd40bb280"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"ec70b0b8ab41f68a2e1283c3600e315bf926ad0f","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        current_max_kbps, current_max_burst_kbit \u003d ("},{"line_number":81,"context_line":"            self.br_int.get_ingress_bw_limit_for_port(port_name))"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        if current_max_kbps is not None or current_max_burst_kbit is not None:"},{"line_number":84,"context_line":"            self.br_int.delete_ingress_bw_limit_for_port(port_name)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        self.br_int.create_ingress_bw_limit_for_port("},{"line_number":87,"context_line":"            port_name,"}],"source_content_type":"text/x-python","patch_set":14,"id":"bab6814e_5e7e04e5","line":84,"range":{"start_line":83,"start_character":0,"end_line":84,"end_character":67},"in_reply_to":"dab17558_4aacd39e","updated":"2016-05-18 21:52:40.000000000","message":"Do You think that it should remove only proper queue in such case and left QoS policy not touched?\nBut how to find proper queue for ingress_bw_limit? for now there is only one such queue but there will be more than one in future and we shouldn\u0027t delete all of them, right?\nMaybe adding some \"key\" in external_ids would be good idea? What do You think?","commit_id":"313b28bec589d12fb9258e079218f0ddd40bb280"}],"neutron/tests/tempest/api/test_qos.py":[{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"93a81057cb084d8500e8759c1a8d8b73185bd74f","unresolved":false,"context_lines":[{"line_number":340,"context_line":"            direction\u003d\"ingress\""},{"line_number":341,"context_line":"        )"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"        # Test \u0027show rule\u0027 for egress direction rule"},{"line_number":344,"context_line":"        retrieved_egress_rule \u003d self.admin_client.show_bandwidth_limit_rule("},{"line_number":345,"context_line":"            policy[\u0027id\u0027], egress_rule[\u0027id\u0027])"},{"line_number":346,"context_line":"        retrieved_egress_rule \u003d retrieved_egress_rule[\u0027bandwidth_limit_rule\u0027]"},{"line_number":347,"context_line":"        self.assertEqual(egress_rule[\u0027id\u0027], retrieved_egress_rule[\u0027id\u0027])"},{"line_number":348,"context_line":"        self.assertEqual(200, retrieved_egress_rule[\u0027max_kbps\u0027])"},{"line_number":349,"context_line":"        self.assertEqual(1337, retrieved_egress_rule[\u0027max_burst_kbps\u0027])"},{"line_number":350,"context_line":"        self.assertEqual(\"egress\", retrieved_egress_rule[\u0027direction\u0027])"},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"        # Test \u0027show rule\u0027 for ingress direction rule"},{"line_number":353,"context_line":"        retrieved_ingress_rule \u003d self.admin_client.show_bandwidth_limit_rule("}],"source_content_type":"text/x-python","patch_set":21,"id":"1aa78d24_50f40e85","line":350,"range":{"start_line":343,"start_character":8,"end_line":350,"end_character":70},"updated":"2016-07-05 13:31:27.000000000","message":"This is basically a huge code duplication with lines 352-359. Please export these lines to a shared function. Even better, use testscenarios to dictate the \u0027direction\u0027 of the rule.","commit_id":"7eca2e78c5099d3053af2778b90dc059326cb081"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"1a4b87fd8180fedaad2b49c9f2b379b262044cb5","unresolved":false,"context_lines":[{"line_number":340,"context_line":"            direction\u003d\"ingress\""},{"line_number":341,"context_line":"        )"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"        # Test \u0027show rule\u0027 for egress direction rule"},{"line_number":344,"context_line":"        retrieved_egress_rule \u003d self.admin_client.show_bandwidth_limit_rule("},{"line_number":345,"context_line":"            policy[\u0027id\u0027], egress_rule[\u0027id\u0027])"},{"line_number":346,"context_line":"        retrieved_egress_rule \u003d retrieved_egress_rule[\u0027bandwidth_limit_rule\u0027]"},{"line_number":347,"context_line":"        self.assertEqual(egress_rule[\u0027id\u0027], retrieved_egress_rule[\u0027id\u0027])"},{"line_number":348,"context_line":"        self.assertEqual(200, retrieved_egress_rule[\u0027max_kbps\u0027])"},{"line_number":349,"context_line":"        self.assertEqual(1337, retrieved_egress_rule[\u0027max_burst_kbps\u0027])"},{"line_number":350,"context_line":"        self.assertEqual(\"egress\", retrieved_egress_rule[\u0027direction\u0027])"},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"        # Test \u0027show rule\u0027 for ingress direction rule"},{"line_number":353,"context_line":"        retrieved_ingress_rule \u003d self.admin_client.show_bandwidth_limit_rule("}],"source_content_type":"text/x-python","patch_set":21,"id":"1aa78d24_fb917ff2","line":350,"range":{"start_line":343,"start_character":8,"end_line":350,"end_character":70},"in_reply_to":"1aa78d24_50f40e85","updated":"2016-07-05 22:22:52.000000000","message":"ok, thx. I will change it ASAP to use scenarios here (TODO)","commit_id":"7eca2e78c5099d3053af2778b90dc059326cb081"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"b253a648d2d1d65ca7c9985faf4421a11a6be9ff","unresolved":false,"context_lines":[{"line_number":340,"context_line":"            direction\u003d\"ingress\""},{"line_number":341,"context_line":"        )"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"        # Test \u0027show rule\u0027 for egress direction rule"},{"line_number":344,"context_line":"        retrieved_egress_rule \u003d self.admin_client.show_bandwidth_limit_rule("},{"line_number":345,"context_line":"            policy[\u0027id\u0027], egress_rule[\u0027id\u0027])"},{"line_number":346,"context_line":"        retrieved_egress_rule \u003d retrieved_egress_rule[\u0027bandwidth_limit_rule\u0027]"},{"line_number":347,"context_line":"        self.assertEqual(egress_rule[\u0027id\u0027], retrieved_egress_rule[\u0027id\u0027])"},{"line_number":348,"context_line":"        self.assertEqual(200, retrieved_egress_rule[\u0027max_kbps\u0027])"},{"line_number":349,"context_line":"        self.assertEqual(1337, retrieved_egress_rule[\u0027max_burst_kbps\u0027])"},{"line_number":350,"context_line":"        self.assertEqual(\"egress\", retrieved_egress_rule[\u0027direction\u0027])"},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"        # Test \u0027show rule\u0027 for ingress direction rule"},{"line_number":353,"context_line":"        retrieved_ingress_rule \u003d self.admin_client.show_bandwidth_limit_rule("}],"source_content_type":"text/x-python","patch_set":21,"id":"1aa78d24_0eb850c7","line":350,"range":{"start_line":343,"start_character":8,"end_line":350,"end_character":70},"in_reply_to":"1aa78d24_fb917ff2","updated":"2016-07-06 20:35:24.000000000","message":"I changed it to use scenarios","commit_id":"7eca2e78c5099d3053af2778b90dc059326cb081"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"b8a2f646a68b07c1515fa667ce945c2ea24e22d2","unresolved":false,"context_lines":[{"line_number":333,"context_line":"        super(QosBandwidthLimitRuleTestJSON, cls).resource_setup()"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"    @property"},{"line_number":336,"context_line":"    def different_direction(self):"},{"line_number":337,"context_line":"        if self.direction \u003d\u003d \"ingress\":"},{"line_number":338,"context_line":"            return \"egress\""},{"line_number":339,"context_line":"        elif self.direction \u003d\u003d \"egress\":"}],"source_content_type":"text/x-python","patch_set":30,"id":"dada55a8_69b00144","line":336,"range":{"start_line":336,"start_character":8,"end_line":336,"end_character":17},"updated":"2016-07-26 15:02:37.000000000","message":"nit: opposite","commit_id":"556c27588007983251f8c7ed165f9191eeb59475"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"6b73c13de2299d692f4f51d826b3303721b970c7","unresolved":false,"context_lines":[{"line_number":333,"context_line":"        super(QosBandwidthLimitRuleTestJSON, cls).resource_setup()"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"    @property"},{"line_number":336,"context_line":"    def different_direction(self):"},{"line_number":337,"context_line":"        if self.direction \u003d\u003d \"ingress\":"},{"line_number":338,"context_line":"            return \"egress\""},{"line_number":339,"context_line":"        elif self.direction \u003d\u003d \"egress\":"}],"source_content_type":"text/x-python","patch_set":30,"id":"dada55a8_4c009d66","line":336,"range":{"start_line":336,"start_character":8,"end_line":336,"end_character":17},"in_reply_to":"dada55a8_69b00144","updated":"2016-07-26 20:01:39.000000000","message":"Done","commit_id":"556c27588007983251f8c7ed165f9191eeb59475"}],"neutron/tests/unit/objects/test_base.py":[{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"adf3743c537a740541fc6ad0e133152dbf3da06d","unresolved":false,"context_lines":[{"line_number":222,"context_line":""},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"def get_random_direction():"},{"line_number":225,"context_line":"    return random.choice([\u0027ingress\u0027, \u0027egress\u0027])"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"def get_list_of_random_networks(num\u003d10):"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a122d0e_1f81394b","line":225,"updated":"2016-04-15 16:37:05.000000000","message":"constants :-)","commit_id":"f7033f3a68521364a278912361087f4f2d3948e8"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"adf3743c537a740541fc6ad0e133152dbf3da06d","unresolved":false,"context_lines":[{"line_number":236,"context_line":"    obj_fields.UUIDField: uuidutils.generate_uuid,"},{"line_number":237,"context_line":"    obj_fields.ObjectField: lambda: None,"},{"line_number":238,"context_line":"    obj_fields.ListOfObjectsField: lambda: [],"},{"line_number":239,"context_line":"    obj_fields.EnumField: get_random_direction,"},{"line_number":240,"context_line":"    common_types.DscpMarkField: get_random_dscp_mark,"},{"line_number":241,"context_line":"    obj_fields.IPNetworkField: tools.get_random_ip_network,"},{"line_number":242,"context_line":"    common_types.IPNetworkPrefixLenField: tools.get_random_prefixlen,"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a122d0e_1f1499f3","line":239,"updated":"2016-04-15 16:37:05.000000000","message":"Hmm, I\u0027m not sure we can generalize a generator of EnumField to always be of random directions, you can try to use (if it\u0027s already released): https://review.openstack.org/#/c/287106/\n\nvalid_values to have a generic EnumField random generator.","commit_id":"f7033f3a68521364a278912361087f4f2d3948e8"}]}
