)]}'
{"etc/policy.json":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8edf5d612aba2ae847b89b81a39e0ab473d6dd54","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"    \"extension:port_binding:view\": \"rule:admin_only\","},{"line_number":19,"context_line":"    \"extension:port_binding:set\": \"rule:admin_only\","},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"    \"extension:networkgw:view\": [[\"rule:admin_or_owner\"], [\"rule:shared\"]],"},{"line_number":22,"context_line":"    \"extension:networkgw:create_shared\": [[\"rule:admin_only\"]],"},{"line_number":23,"context_line":"    \"extension:networkgw:update_shared\": [[\"rule:admin_only\"]],"}],"source_content_type":"application/json","patch_set":4,"id":"AAAAM3%2F%2FBpc%3D","line":20,"updated":"2013-02-11 08:33:02.000000000","message":"Question: should we update common files for specific plugin extensions? Is there a generic way that this can be done?","commit_id":"25743017c4163d0361a38029179fb94f46d858b3"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"    \"extension:port_binding:view\": \"rule:admin_only\","},{"line_number":19,"context_line":"    \"extension:port_binding:set\": \"rule:admin_only\","},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"    \"extension:networkgw:view\": [[\"rule:admin_or_owner\"], [\"rule:shared\"]],"},{"line_number":22,"context_line":"    \"extension:networkgw:create_shared\": [[\"rule:admin_only\"]],"},{"line_number":23,"context_line":"    \"extension:networkgw:update_shared\": [[\"rule:admin_only\"]],"}],"source_content_type":"application/json","patch_set":4,"id":"AAAAM3%2F%2FBlk%3D","line":20,"in_reply_to":"AAAAM3%2F%2FBpc%3D","updated":"2013-02-11 09:14:49.000000000","message":"We could change the policy engine to have plugins load their own set of policies.\n\nBut frankly I think they\u0027re ok here, because if the plugin is not loaded, then it\u0027s just four entries in a dict. And also we also have plugin specific extensions in ./extensions which is another common directory.","commit_id":"25743017c4163d0361a38029179fb94f46d858b3"}],"etc/quantum.conf":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8edf5d612aba2ae847b89b81a39e0ab473d6dd54","unresolved":false,"context_lines":[{"line_number":186,"context_line":""},{"line_number":187,"context_line":"# number of ports allowed per tenant, and minus means unlimited"},{"line_number":188,"context_line":"# quota_port \u003d 50"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"# number of network gateways allowed per tenant, -1 means unlimited"},{"line_number":191,"context_line":"# quota_network_gateway \u003d 5"},{"line_number":192,"context_line":""}],"source_content_type":"text/plain","patch_set":4,"id":"AAAAM3%2F%2FBpY%3D","line":189,"updated":"2013-02-11 08:33:02.000000000","message":"This should maybe be in the NVP ini file?","commit_id":"25743017c4163d0361a38029179fb94f46d858b3"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":186,"context_line":""},{"line_number":187,"context_line":"# number of ports allowed per tenant, and minus means unlimited"},{"line_number":188,"context_line":"# quota_port \u003d 50"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"# number of network gateways allowed per tenant, -1 means unlimited"},{"line_number":191,"context_line":"# quota_network_gateway \u003d 5"},{"line_number":192,"context_line":""}],"source_content_type":"text/plain","patch_set":4,"id":"AAAAM3%2F%2FBlc%3D","line":189,"in_reply_to":"AAAAM3%2F%2FBpY%3D","updated":"2013-02-11 09:14:49.000000000","message":"Honestly, I don\u0027t know.\nI put it here, but I think I can create a QUOTA section there too.","commit_id":"25743017c4163d0361a38029179fb94f46d858b3"}],"etc/quantum/plugins/nicira/nvp.ini":[{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":67,"context_line":"# UUID of the default layer 2 gateway service to use for this cluster"},{"line_number":68,"context_line":"# This is optional, but should be filled if planning to use the"},{"line_number":69,"context_line":"# network-gateway extensions."},{"line_number":70,"context_line":"# default_l2_gw_service_uuid \u003d"},{"line_number":71,"context_line":"# Name of the default interface name to be used on network-gateway."},{"line_number":72,"context_line":"# This value will be used for any device associated with a network"},{"line_number":73,"context_line":"# gateway for which an interface name was not specified"}],"source_content_type":"text/x-properties","patch_set":10,"id":"AAAAM3%2F%2B0LM%3D","line":70,"updated":"2013-02-18 19:47:15.000000000","message":"needs space between two items for readability.\n\nI would also argue that there are many use cases for l2-gw where a default l2-gw service does not really make sense (e.g., where each l2 gw is on the customer prem)","commit_id":"950612eba92e0d911acfb17387f2121b5f4f265e"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":67,"context_line":"# UUID of the default layer 2 gateway service to use for this cluster"},{"line_number":68,"context_line":"# This is optional, but should be filled if planning to use the"},{"line_number":69,"context_line":"# network-gateway extensions."},{"line_number":70,"context_line":"# default_l2_gw_service_uuid \u003d"},{"line_number":71,"context_line":"# Name of the default interface name to be used on network-gateway."},{"line_number":72,"context_line":"# This value will be used for any device associated with a network"},{"line_number":73,"context_line":"# gateway for which an interface name was not specified"}],"source_content_type":"text/x-properties","patch_set":10,"id":"AAAAM3%2F%2BztM%3D","line":70,"in_reply_to":"AAAAM3%2F%2B0LM%3D","updated":"2013-02-18 21:23:01.000000000","message":"I will add a space line.\n\nAnd I totally agree on your comment on the default service. You don\u0027t have to use it . The comment is wrong (I haven\u0027t updated it in ages)","commit_id":"950612eba92e0d911acfb17387f2121b5f4f265e"}],"quantum/common/exceptions.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8edf5d612aba2ae847b89b81a39e0ab473d6dd54","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                \"No tenant network is available for allocation.\")"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"class AlreadyAttached(Conflict):"},{"line_number":163,"context_line":"    message \u003d _(\"Unable to plug the attachment into port \""},{"line_number":164,"context_line":"                \"%(port_id)s for network %(net_id)s. The attachment is \""},{"line_number":165,"context_line":"                \"already plugged into port %(att_port_id)s\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FBpM%3D","line":162,"updated":"2013-02-11 08:33:02.000000000","message":"Attachment is V1 no?","commit_id":"25743017c4163d0361a38029179fb94f46d858b3"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":159,"context_line":"                \"No tenant network is available for allocation.\")"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"class AlreadyAttached(Conflict):"},{"line_number":163,"context_line":"    message \u003d _(\"Unable to plug the attachment into port \""},{"line_number":164,"context_line":"                \"%(port_id)s for network %(net_id)s. The attachment is \""},{"line_number":165,"context_line":"                \"already plugged into port %(att_port_id)s\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FBlU%3D","line":162,"in_reply_to":"AAAAM3%2F%2FBpM%3D","updated":"2013-02-11 09:14:49.000000000","message":"This has been here for ages!\nBut now it\u0027s probably nvp specific, so I\u0027ll move it back to the nvp exceptions.","commit_id":"25743017c4163d0361a38029179fb94f46d858b3"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":162,"context_line":"class AlreadyAttached(Conflict):"},{"line_number":163,"context_line":"    message \u003d _(\"Unable to plug the attachment into port \""},{"line_number":164,"context_line":"                \"%(port_id)s for network %(net_id)s. The attachment is \""},{"line_number":165,"context_line":"                \"already plugged into port %(att_port_id)s\")"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"class SubnetMismatchForPort(Conflict):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2B0K0%3D","line":165,"updated":"2013-02-18 19:47:15.000000000","message":"Does this kind of message still make sense as a tenant facing message now that v2 api no longer support \"attachments\"?","commit_id":"950612eba92e0d911acfb17387f2121b5f4f265e"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":162,"context_line":"class AlreadyAttached(Conflict):"},{"line_number":163,"context_line":"    message \u003d _(\"Unable to plug the attachment into port \""},{"line_number":164,"context_line":"                \"%(port_id)s for network %(net_id)s. The attachment is \""},{"line_number":165,"context_line":"                \"already plugged into port %(att_port_id)s\")"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"class SubnetMismatchForPort(Conflict):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2Bzs8%3D","line":165,"in_reply_to":"AAAAM3%2F%2B0K0%3D","updated":"2013-02-18 21:23:01.000000000","message":"I will rephrase it and change the exception name.\nI actually re-used v1 code which was left in this module, but probably we should have our own exception.\n\nGaryk pointed the same thing.","commit_id":"950612eba92e0d911acfb17387f2121b5f4f265e"}],"quantum/db/migration/alembic_migrations/versions/363468ac592c_nvp_network_gw.py":[{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":49,"context_line":"                    sa.Column(\u0027tenant_id\u0027, sa.String(length\u003d36),"},{"line_number":50,"context_line":"                              nullable\u003dTrue),"},{"line_number":51,"context_line":"                    sa.Column(\u0027default\u0027, sa.Boolean(), nullable\u003dTrue),"},{"line_number":52,"context_line":"                    sa.Column(\u0027shared\u0027, sa.Boolean(), nullable\u003dTrue),"},{"line_number":53,"context_line":"                    sa.PrimaryKeyConstraint(\u0027id\u0027))"},{"line_number":54,"context_line":"    op.create_table(\u0027networkgatewaydevices\u0027,"},{"line_number":55,"context_line":"                    sa.Column(\u0027id\u0027, sa.String(length\u003d36), nullable\u003dFalse),"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2BwSU%3D","line":52,"updated":"2013-02-19 22:42:00.000000000","message":"still needed?","commit_id":"1f3bf7e5c98dcb0639fd27324a237d73f66b1213"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":49,"context_line":"                    sa.Column(\u0027tenant_id\u0027, sa.String(length\u003d36),"},{"line_number":50,"context_line":"                              nullable\u003dTrue),"},{"line_number":51,"context_line":"                    sa.Column(\u0027default\u0027, sa.Boolean(), nullable\u003dTrue),"},{"line_number":52,"context_line":"                    sa.Column(\u0027shared\u0027, sa.Boolean(), nullable\u003dTrue),"},{"line_number":53,"context_line":"                    sa.PrimaryKeyConstraint(\u0027id\u0027))"},{"line_number":54,"context_line":"    op.create_table(\u0027networkgatewaydevices\u0027,"},{"line_number":55,"context_line":"                    sa.Column(\u0027id\u0027, sa.String(length\u003d36), nullable\u003dFalse),"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2BwHM%3D","line":52,"in_reply_to":"AAAAM3%2F%2BwSU%3D","updated":"2013-02-19 23:31:44.000000000","message":"no. But I probably need a good doctor.","commit_id":"1f3bf7e5c98dcb0639fd27324a237d73f66b1213"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":49,"context_line":"                    sa.Column(\u0027tenant_id\u0027, sa.String(length\u003d36),"},{"line_number":50,"context_line":"                              nullable\u003dTrue),"},{"line_number":51,"context_line":"                    sa.Column(\u0027default\u0027, sa.Boolean(), nullable\u003dTrue),"},{"line_number":52,"context_line":"                    sa.Column(\u0027shared\u0027, sa.Boolean(), nullable\u003dTrue),"},{"line_number":53,"context_line":"                    sa.PrimaryKeyConstraint(\u0027id\u0027))"},{"line_number":54,"context_line":"    op.create_table(\u0027networkgatewaydevices\u0027,"},{"line_number":55,"context_line":"                    sa.Column(\u0027id\u0027, sa.String(length\u003d36), nullable\u003dFalse),"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2BwHg%3D","line":52,"updated":"2013-02-20 00:25:21.000000000","message":"still here?","commit_id":"ae955a69586e98d345949560b717841075ac0017"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":49,"context_line":"                    sa.Column(\u0027tenant_id\u0027, sa.String(length\u003d36),"},{"line_number":50,"context_line":"                              nullable\u003dTrue),"},{"line_number":51,"context_line":"                    sa.Column(\u0027default\u0027, sa.Boolean(), nullable\u003dTrue),"},{"line_number":52,"context_line":"                    sa.Column(\u0027shared\u0027, sa.Boolean(), nullable\u003dTrue),"},{"line_number":53,"context_line":"                    sa.PrimaryKeyConstraint(\u0027id\u0027))"},{"line_number":54,"context_line":"    op.create_table(\u0027networkgatewaydevices\u0027,"},{"line_number":55,"context_line":"                    sa.Column(\u0027id\u0027, sa.String(length\u003d36), nullable\u003dFalse),"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2Bv8M%3D","line":52,"in_reply_to":"AAAAM3%2F%2BwHg%3D","updated":"2013-02-20 00:40:16.000000000","message":"Not pushed yet for not stressing tempest gate :)","commit_id":"ae955a69586e98d345949560b717841075ac0017"}],"quantum/extensions/networkgw.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8edf5d612aba2ae847b89b81a39e0ab473d6dd54","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Copyright 2012 Nicira Networks, Inc.  All rights reserved."},{"line_number":4,"context_line":"#"},{"line_number":5,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":6,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FBpI%3D","line":3,"updated":"2013-02-11 08:33:02.000000000","message":"2013 (VMWare?)","commit_id":"25743017c4163d0361a38029179fb94f46d858b3"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Copyright 2012 Nicira Networks, Inc.  All rights reserved."},{"line_number":4,"context_line":"#"},{"line_number":5,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":6,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FBlQ%3D","line":3,"in_reply_to":"AAAAM3%2F%2FBpI%3D","updated":"2013-02-11 09:14:49.000000000","message":"ok","commit_id":"25743017c4163d0361a38029179fb94f46d858b3"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8edf5d612aba2ae847b89b81a39e0ab473d6dd54","unresolved":false,"context_lines":[{"line_number":17,"context_line":"# @author: Salvatore Orlando, VMware"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from abc import abstractmethod"},{"line_number":20,"context_line":"import logging"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from quantum.api import extensions"},{"line_number":23,"context_line":"from quantum.api.v2 import attributes"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FBpE%3D","line":20,"updated":"2013-02-11 08:33:02.000000000","message":"please use common logging","commit_id":"25743017c4163d0361a38029179fb94f46d858b3"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":17,"context_line":"# @author: Salvatore Orlando, VMware"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from abc import abstractmethod"},{"line_number":20,"context_line":"import logging"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from quantum.api import extensions"},{"line_number":23,"context_line":"from quantum.api.v2 import attributes"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FBlM%3D","line":20,"in_reply_to":"AAAAM3%2F%2FBpE%3D","updated":"2013-02-11 09:14:49.000000000","message":"sorry, forgot about it","commit_id":"25743017c4163d0361a38029179fb94f46d858b3"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8edf5d612aba2ae847b89b81a39e0ab473d6dd54","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    COLLECTION_NAME: {"},{"line_number":41,"context_line":"        \u0027id\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":42,"context_line":"               \u0027is_visible\u0027: True},"},{"line_number":43,"context_line":"        \u0027name\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":44,"context_line":"                 \u0027is_visible\u0027: True, \u0027default\u0027: \u0027\u0027},"},{"line_number":45,"context_line":"        # NOTE(salvatore-orlando): PUT is disable to avoid complexity"},{"line_number":46,"context_line":"        # with un-sharing a gateway (when multiple tenants use it)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FBo8%3D","line":43,"updated":"2013-02-11 08:33:02.000000000","message":"\u0027validate\u0027: {\u0027type:string\u0027: None},","commit_id":"25743017c4163d0361a38029179fb94f46d858b3"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":40,"context_line":"    COLLECTION_NAME: {"},{"line_number":41,"context_line":"        \u0027id\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":42,"context_line":"               \u0027is_visible\u0027: True},"},{"line_number":43,"context_line":"        \u0027name\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":44,"context_line":"                 \u0027is_visible\u0027: True, \u0027default\u0027: \u0027\u0027},"},{"line_number":45,"context_line":"        # NOTE(salvatore-orlando): PUT is disable to avoid complexity"},{"line_number":46,"context_line":"        # with un-sharing a gateway (when multiple tenants use it)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FBlE%3D","line":43,"in_reply_to":"AAAAM3%2F%2FBo8%3D","updated":"2013-02-11 09:14:49.000000000","message":"Done","commit_id":"25743017c4163d0361a38029179fb94f46d858b3"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8edf5d612aba2ae847b89b81a39e0ab473d6dd54","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        \u0027devices\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: False,"},{"line_number":57,"context_line":"                    \u0027validate\u0027: {\u0027type:device_list\u0027: None},"},{"line_number":58,"context_line":"                    \u0027is_visible\u0027: True},"},{"line_number":59,"context_line":"        \u0027tenant_id\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: False,"},{"line_number":60,"context_line":"                      \u0027required_by_policy\u0027: True,"},{"line_number":61,"context_line":"                      \u0027is_visible\u0027: True}"},{"line_number":62,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FBo4%3D","line":59,"updated":"2013-02-11 08:33:02.000000000","message":"\u0027validate\u0027: {\u0027type:string\u0027: None}","commit_id":"25743017c4163d0361a38029179fb94f46d858b3"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":56,"context_line":"        \u0027devices\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: False,"},{"line_number":57,"context_line":"                    \u0027validate\u0027: {\u0027type:device_list\u0027: None},"},{"line_number":58,"context_line":"                    \u0027is_visible\u0027: True},"},{"line_number":59,"context_line":"        \u0027tenant_id\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: False,"},{"line_number":60,"context_line":"                      \u0027required_by_policy\u0027: True,"},{"line_number":61,"context_line":"                      \u0027is_visible\u0027: True}"},{"line_number":62,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FBlA%3D","line":59,"in_reply_to":"AAAAM3%2F%2FBo4%3D","updated":"2013-02-11 09:14:49.000000000","message":"Done","commit_id":"25743017c4163d0361a38029179fb94f46d858b3"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8edf5d612aba2ae847b89b81a39e0ab473d6dd54","unresolved":false,"context_lines":[{"line_number":101,"context_line":"nw_gw_quota_opts \u003d ["},{"line_number":102,"context_line":"    cfg.IntOpt(\u0027quota_network_gateway\u0027,"},{"line_number":103,"context_line":"               default\u003d5,"},{"line_number":104,"context_line":"               help\u003d\u0027number of network gateways allowed per tenant, \u0027"},{"line_number":105,"context_line":"                    \u0027-1 for unlimited\u0027)"},{"line_number":106,"context_line":"]"},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FBnw%3D","line":104,"updated":"2013-02-11 08:33:02.000000000","message":"_()","commit_id":"25743017c4163d0361a38029179fb94f46d858b3"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":101,"context_line":"nw_gw_quota_opts \u003d ["},{"line_number":102,"context_line":"    cfg.IntOpt(\u0027quota_network_gateway\u0027,"},{"line_number":103,"context_line":"               default\u003d5,"},{"line_number":104,"context_line":"               help\u003d\u0027number of network gateways allowed per tenant, \u0027"},{"line_number":105,"context_line":"                    \u0027-1 for unlimited\u0027)"},{"line_number":106,"context_line":"]"},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FBk8%3D","line":104,"in_reply_to":"AAAAM3%2F%2FBnw%3D","updated":"2013-02-11 09:14:49.000000000","message":"Done","commit_id":"25743017c4163d0361a38029179fb94f46d858b3"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8edf5d612aba2ae847b89b81a39e0ab473d6dd54","unresolved":false,"context_lines":[{"line_number":152,"context_line":"                          \u0027disconnect_network\u0027: \u0027PUT\u0027}"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        # register quotas for network gateways"},{"line_number":155,"context_line":"        quota.QUOTAS.register_resource_by_name(RESOURCE_NAME)"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        controller \u003d base.create_resource(COLLECTION_NAME,"},{"line_number":158,"context_line":"                                          RESOURCE_NAME,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FBng%3D","line":155,"updated":"2013-02-11 08:33:02.000000000","message":"Do yo have a test case for the quotas?","commit_id":"25743017c4163d0361a38029179fb94f46d858b3"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":152,"context_line":"                          \u0027disconnect_network\u0027: \u0027PUT\u0027}"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        # register quotas for network gateways"},{"line_number":155,"context_line":"        quota.QUOTAS.register_resource_by_name(RESOURCE_NAME)"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        controller \u003d base.create_resource(COLLECTION_NAME,"},{"line_number":158,"context_line":"                                          RESOURCE_NAME,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FBkk%3D","line":155,"in_reply_to":"AAAAM3%2F%2FBng%3D","updated":"2013-02-11 09:14:49.000000000","message":"if register_resource_by_name is covered by test_quota_per_tenant_ext, what kind of coverage can we be adding here?","commit_id":"25743017c4163d0361a38029179fb94f46d858b3"}],"quantum/plugins/nicira/nicira_nvp_plugin/QuantumPlugin.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8edf5d612aba2ae847b89b81a39e0ab473d6dd54","unresolved":false,"context_lines":[{"line_number":137,"context_line":"                                 c_opts[\u0027default_interface_name\u0027]])"},{"line_number":138,"context_line":"                    cluster.add_controller(*args)"},{"line_number":139,"context_line":"                except Exception:"},{"line_number":140,"context_line":"                    LOG.exception(\"Invalid connection parameters for \""},{"line_number":141,"context_line":"                                  \"controller %s in cluster %s\","},{"line_number":142,"context_line":"                                  ctrl_conn,"},{"line_number":143,"context_line":"                                  c_opts[\u0027name\u0027])"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FBo0%3D","line":140,"updated":"2013-02-11 08:33:02.000000000","message":"i18n","commit_id":"25743017c4163d0361a38029179fb94f46d858b3"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":137,"context_line":"                                 c_opts[\u0027default_interface_name\u0027]])"},{"line_number":138,"context_line":"                    cluster.add_controller(*args)"},{"line_number":139,"context_line":"                except Exception:"},{"line_number":140,"context_line":"                    LOG.exception(\"Invalid connection parameters for \""},{"line_number":141,"context_line":"                                  \"controller %s in cluster %s\","},{"line_number":142,"context_line":"                                  ctrl_conn,"},{"line_number":143,"context_line":"                                  c_opts[\u0027name\u0027])"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FBkg%3D","line":140,"in_reply_to":"AAAAM3%2F%2FBo0%3D","updated":"2013-02-11 09:14:49.000000000","message":"Done","commit_id":"25743017c4163d0361a38029179fb94f46d858b3"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8edf5d612aba2ae847b89b81a39e0ab473d6dd54","unresolved":false,"context_lines":[{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    def _ensure_default_network_gateway(self):"},{"line_number":273,"context_line":"        # Add the gw in the db as default, and unset any previous default"},{"line_number":274,"context_line":"        def_l2_gw_uuid \u003d self.default_cluster.default_l2_gw_service_uuid"},{"line_number":275,"context_line":"        try:"},{"line_number":276,"context_line":"            ctx \u003d q_context.get_admin_context()"},{"line_number":277,"context_line":"            nicira_db.unset_default_network_gateways(ctx.session)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FBnQ%3D","line":274,"updated":"2013-02-11 08:33:02.000000000","message":"by default this is empty. am I missing something?","commit_id":"25743017c4163d0361a38029179fb94f46d858b3"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    def _ensure_default_network_gateway(self):"},{"line_number":273,"context_line":"        # Add the gw in the db as default, and unset any previous default"},{"line_number":274,"context_line":"        def_l2_gw_uuid \u003d self.default_cluster.default_l2_gw_service_uuid"},{"line_number":275,"context_line":"        try:"},{"line_number":276,"context_line":"            ctx \u003d q_context.get_admin_context()"},{"line_number":277,"context_line":"            nicira_db.unset_default_network_gateways(ctx.session)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FBkc%3D","line":274,"in_reply_to":"AAAAM3%2F%2FBnQ%3D","updated":"2013-02-11 09:14:49.000000000","message":"You\u0027re not missing anything.\nIf it\u0027s empty we just unset the default (line 277).\nIf not, we also create/update the corresponding entry in the db.","commit_id":"25743017c4163d0361a38029179fb94f46d858b3"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8edf5d612aba2ae847b89b81a39e0ab473d6dd54","unresolved":false,"context_lines":[{"line_number":451,"context_line":"                nvplib.plug_interface(cluster, port_data[\u0027network_id\u0027],"},{"line_number":452,"context_line":"                                      lport[\u0027uuid\u0027], \"VifAttachment\","},{"line_number":453,"context_line":"                                      port_data[\u0027id\u0027])"},{"line_number":454,"context_line":"            LOG.debug(\"_nvp_create_port completed for port %s on network %s. \""},{"line_number":455,"context_line":"                      \"The new port id is %s. NVP port id is %s\","},{"line_number":456,"context_line":"                      port_data[\u0027name\u0027],"},{"line_number":457,"context_line":"                      port_data[\u0027network_id\u0027],"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FBos%3D","line":454,"updated":"2013-02-11 08:33:02.000000000","message":"i18n - need a dictionary","commit_id":"25743017c4163d0361a38029179fb94f46d858b3"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":451,"context_line":"                nvplib.plug_interface(cluster, port_data[\u0027network_id\u0027],"},{"line_number":452,"context_line":"                                      lport[\u0027uuid\u0027], \"VifAttachment\","},{"line_number":453,"context_line":"                                      port_data[\u0027id\u0027])"},{"line_number":454,"context_line":"            LOG.debug(\"_nvp_create_port completed for port %s on network %s. \""},{"line_number":455,"context_line":"                      \"The new port id is %s. NVP port id is %s\","},{"line_number":456,"context_line":"                      port_data[\u0027name\u0027],"},{"line_number":457,"context_line":"                      port_data[\u0027network_id\u0027],"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FBkY%3D","line":454,"in_reply_to":"AAAAM3%2F%2FBos%3D","updated":"2013-02-11 09:14:49.000000000","message":"Done","commit_id":"25743017c4163d0361a38029179fb94f46d858b3"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8edf5d612aba2ae847b89b81a39e0ab473d6dd54","unresolved":false,"context_lines":[{"line_number":643,"context_line":"        # However, in order to not break unit tests, we need to still create"},{"line_number":644,"context_line":"        # the DB object and return success"},{"line_number":645,"context_line":"        if self._network_is_external(context, port_data[\u0027network_id\u0027]):"},{"line_number":646,"context_line":"            LOG.error(\"NVP plugin does not support regular VIF ports on \""},{"line_number":647,"context_line":"                      \"external networks. Port %s will be down.\","},{"line_number":648,"context_line":"                      port_data[\u0027network_id\u0027])"},{"line_number":649,"context_line":"            # No need to actually update the DB state - the default is down"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FBoo%3D","line":646,"updated":"2013-02-11 08:33:02.000000000","message":"i18n","commit_id":"25743017c4163d0361a38029179fb94f46d858b3"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":643,"context_line":"        # However, in order to not break unit tests, we need to still create"},{"line_number":644,"context_line":"        # the DB object and return success"},{"line_number":645,"context_line":"        if self._network_is_external(context, port_data[\u0027network_id\u0027]):"},{"line_number":646,"context_line":"            LOG.error(\"NVP plugin does not support regular VIF ports on \""},{"line_number":647,"context_line":"                      \"external networks. Port %s will be down.\","},{"line_number":648,"context_line":"                      port_data[\u0027network_id\u0027])"},{"line_number":649,"context_line":"            # No need to actually update the DB state - the default is down"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FBkU%3D","line":646,"in_reply_to":"AAAAM3%2F%2FBoo%3D","updated":"2013-02-11 09:14:49.000000000","message":"Done","commit_id":"25743017c4163d0361a38029179fb94f46d858b3"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8edf5d612aba2ae847b89b81a39e0ab473d6dd54","unresolved":false,"context_lines":[{"line_number":671,"context_line":"                      lport[\u0027uuid\u0027])"},{"line_number":672,"context_line":"        except Exception:"},{"line_number":673,"context_line":"            # failed to create port in NVP delete port from quantum_db"},{"line_number":674,"context_line":"            LOG.exception(\"An exception occured while plugging the interface\")"},{"line_number":675,"context_line":"            super(NvpPluginV2, self).delete_port(context, port_data[\"id\"])"},{"line_number":676,"context_line":"            raise"},{"line_number":677,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FBok%3D","line":674,"updated":"2013-02-11 08:33:02.000000000","message":"ditto","commit_id":"25743017c4163d0361a38029179fb94f46d858b3"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":671,"context_line":"                      lport[\u0027uuid\u0027])"},{"line_number":672,"context_line":"        except Exception:"},{"line_number":673,"context_line":"            # failed to create port in NVP delete port from quantum_db"},{"line_number":674,"context_line":"            LOG.exception(\"An exception occured while plugging the interface\")"},{"line_number":675,"context_line":"            super(NvpPluginV2, self).delete_port(context, port_data[\"id\"])"},{"line_number":676,"context_line":"            raise"},{"line_number":677,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FBkQ%3D","line":674,"in_reply_to":"AAAAM3%2F%2FBok%3D","updated":"2013-02-11 09:14:49.000000000","message":"Done","commit_id":"25743017c4163d0361a38029179fb94f46d858b3"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"20a0bdf6d041912663c57e2705116667934eed4a","unresolved":false,"context_lines":[{"line_number":165,"context_line":"            concurrent_connections\u003dconcurrent_connections,"},{"line_number":166,"context_line":"            nvp_gen_timeout\u003dnvp_gen_timeout)"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"        # TODO(pjb): What if the cluster isn\u0027t reachable this"},{"line_number":169,"context_line":"        # instant?  It isn\u0027t good to fall back to invalid cluster"},{"line_number":170,"context_line":"        # strings."},{"line_number":171,"context_line":"        if len(clusters) \u003d\u003d 0:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2B3gs%3D","line":168,"updated":"2013-02-16 00:50:13.000000000","message":"nit: delete comment. I believe this comment was referring to calling api_client.login() here previously?","commit_id":"bc30a80d67a0e9f106cf6ebb9614f10ff15a5184"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"20a0bdf6d041912663c57e2705116667934eed4a","unresolved":false,"context_lines":[{"line_number":1396,"context_line":""},{"line_number":1397,"context_line":"    def delete_port(self, context, id, l3_port_check\u003dTrue,"},{"line_number":1398,"context_line":"                    nw_gw_port_check\u003dTrue):"},{"line_number":1399,"context_line":"        \"\"\""},{"line_number":1400,"context_line":"        Deletes a port on a specified Virtual Network,"},{"line_number":1401,"context_line":"        if the port contains a remote interface attachment,"},{"line_number":1402,"context_line":"        the remote interface is first un-plugged and then the port"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2B3gY%3D","line":1399,"updated":"2013-02-16 00:50:13.000000000","message":"did you mean to add this doc string or did this resurface?","commit_id":"bc30a80d67a0e9f106cf6ebb9614f10ff15a5184"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"20a0bdf6d041912663c57e2705116667934eed4a","unresolved":false,"context_lines":[{"line_number":1940,"context_line":"        cluster \u003d self._find_target_cluster(gw_data)"},{"line_number":1941,"context_line":"        devices \u003d gw_data[\u0027devices\u0027]"},{"line_number":1942,"context_line":"        # Populate default physical network where not specified"},{"line_number":1943,"context_line":"        for device in devices:"},{"line_number":1944,"context_line":"            if not device.get(\u0027interface_name\u0027):"},{"line_number":1945,"context_line":"                device[\u0027interface_name\u0027] \u003d cluster.default_interface_name"},{"line_number":1946,"context_line":"        nvp_res \u003d nvplib.create_l2_gw_service(cluster, tenant_id,"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2B3d4%3D","line":1943,"updated":"2013-02-16 00:50:13.000000000","message":"Could we we some error checking if not device and raise an error telling the user that they don\u0027t have this configured in nvp.ini rather then trying it against nvp with None?","commit_id":"bc30a80d67a0e9f106cf6ebb9614f10ff15a5184"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"20a0bdf6d041912663c57e2705116667934eed4a","unresolved":false,"context_lines":[{"line_number":1960,"context_line":"        \"\"\" Remove a layer-2 network gateway"},{"line_number":1961,"context_line":""},{"line_number":1962,"context_line":"        Remove the gateway service from NVP platform and corresponding data"},{"line_number":1963,"context_line":"        structures in Quantum datase"},{"line_number":1964,"context_line":"        \"\"\""},{"line_number":1965,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":1966,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2B3gM%3D","line":1963,"updated":"2013-02-16 00:50:13.000000000","message":"database.","commit_id":"bc30a80d67a0e9f106cf6ebb9614f10ff15a5184"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"20a0bdf6d041912663c57e2705116667934eed4a","unresolved":false,"context_lines":[{"line_number":1964,"context_line":"        \"\"\""},{"line_number":1965,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":1966,"context_line":"            try:"},{"line_number":1967,"context_line":"                super(NvpPluginV2, self).delete_network_gateway(context, id)"},{"line_number":1968,"context_line":"                nvplib.delete_l2_gw_service(self.default_cluster, id)"},{"line_number":1969,"context_line":"            except NvpApiClient.NvpApiException:"},{"line_number":1970,"context_line":"                # Do not cause a 500 to be returned to the user"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2B3gA%3D","line":1967,"updated":"2013-02-16 00:50:13.000000000","message":"nit: shouldn\u0027t be within try:","commit_id":"bc30a80d67a0e9f106cf6ebb9614f10ff15a5184"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":170,"context_line":"        # TODO(pjb): What if the cluster isn\u0027t reachable this"},{"line_number":171,"context_line":"        # instant?  It isn\u0027t good to fall back to invalid cluster"},{"line_number":172,"context_line":"        # strings."},{"line_number":173,"context_line":"        if len(clusters) \u003d\u003d 0:"},{"line_number":174,"context_line":"            first_cluster \u003d cluster"},{"line_number":175,"context_line":"        clusters[c_opts[\u0027name\u0027]] \u003d cluster"},{"line_number":176,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B2nE%3D","line":173,"updated":"2013-02-17 00:19:51.000000000","message":"By the way, this will always be empty.  Nothing is added to clusters in this method.\n\n\nif not clusters:","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":170,"context_line":"        # TODO(pjb): What if the cluster isn\u0027t reachable this"},{"line_number":171,"context_line":"        # instant?  It isn\u0027t good to fall back to invalid cluster"},{"line_number":172,"context_line":"        # strings."},{"line_number":173,"context_line":"        if len(clusters) \u003d\u003d 0:"},{"line_number":174,"context_line":"            first_cluster \u003d cluster"},{"line_number":175,"context_line":"        clusters[c_opts[\u0027name\u0027]] \u003d cluster"},{"line_number":176,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B1ys%3D","line":173,"in_reply_to":"AAAAM3%2F%2B2nE%3D","updated":"2013-02-17 23:32:45.000000000","message":"Will replace with not_clusters.\n\nclusters data structure is populated at line 175, the end of the iteration starting at line 128","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":282,"context_line":"        try:"},{"line_number":283,"context_line":"            ctx \u003d q_context.get_admin_context()"},{"line_number":284,"context_line":"            nicira_db.unset_default_network_gateways(ctx.session)"},{"line_number":285,"context_line":"            if def_l2_gw_uuid:"},{"line_number":286,"context_line":"                try:"},{"line_number":287,"context_line":"                    def_network_gw \u003d self._get_network_gateway(ctx,"},{"line_number":288,"context_line":"                                                               def_l2_gw_uuid)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B2m8%3D","line":285,"updated":"2013-02-17 00:19:51.000000000","message":"Consider:\n\nif def_l2_gw_uuid:\n    return\n\nThen you can dedent the next block 4 spaces.","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":282,"context_line":"        try:"},{"line_number":283,"context_line":"            ctx \u003d q_context.get_admin_context()"},{"line_number":284,"context_line":"            nicira_db.unset_default_network_gateways(ctx.session)"},{"line_number":285,"context_line":"            if def_l2_gw_uuid:"},{"line_number":286,"context_line":"                try:"},{"line_number":287,"context_line":"                    def_network_gw \u003d self._get_network_gateway(ctx,"},{"line_number":288,"context_line":"                                                               def_l2_gw_uuid)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B1yo%3D","line":285,"in_reply_to":"AAAAM3%2F%2B2m8%3D","updated":"2013-02-17 23:32:45.000000000","message":"Done","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":661,"context_line":"                                                 True)"},{"line_number":662,"context_line":"            nicira_db.add_quantum_nvp_port_mapping("},{"line_number":663,"context_line":"                context.session, port_data[\u0027id\u0027], lport[\u0027uuid\u0027])"},{"line_number":664,"context_line":"            nvplib.plug_l2_gw_service(cluster, port_data[\u0027network_id\u0027],"},{"line_number":665,"context_line":"                                      lport[\u0027uuid\u0027],"},{"line_number":666,"context_line":"                                      port_data[\u0027device_id\u0027],"},{"line_number":667,"context_line":"                                      int(port_data.get(\u0027gw:segmentation_id\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B2mk%3D","line":664,"updated":"2013-02-17 00:19:51.000000000","message":"Consider alternate code layout:\n\nnvplib.plug_l2_gw_service(\n    cluster,\n    port_data[\u0027network_id\u0027],\n    lport[\u0027uuid\u0027],\n    port_data[\u0027device_id\u0027],\n    int(port_data.get(\u0027gw:segmentation_id\u0027) or 0)\n)","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":661,"context_line":"                                                 True)"},{"line_number":662,"context_line":"            nicira_db.add_quantum_nvp_port_mapping("},{"line_number":663,"context_line":"                context.session, port_data[\u0027id\u0027], lport[\u0027uuid\u0027])"},{"line_number":664,"context_line":"            nvplib.plug_l2_gw_service(cluster, port_data[\u0027network_id\u0027],"},{"line_number":665,"context_line":"                                      lport[\u0027uuid\u0027],"},{"line_number":666,"context_line":"                                      port_data[\u0027device_id\u0027],"},{"line_number":667,"context_line":"                                      int(port_data.get(\u0027gw:segmentation_id\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B1yg%3D","line":664,"in_reply_to":"AAAAM3%2F%2B2mk%3D","updated":"2013-02-17 23:32:45.000000000","message":"Done","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":462,"context_line":"            if (not port_data[\u0027device_owner\u0027] in"},{"line_number":463,"context_line":"                (l3_db.DEVICE_OWNER_ROUTER_GW,"},{"line_number":464,"context_line":"                 l3_db.DEVICE_OWNER_ROUTER_INTF)):"},{"line_number":465,"context_line":"                nvplib.plug_interface(cluster, port_data[\u0027network_id\u0027],"},{"line_number":466,"context_line":"                                      lport[\u0027uuid\u0027], \"VifAttachment\","},{"line_number":467,"context_line":"                                      port_data[\u0027id\u0027])"},{"line_number":468,"context_line":"            LOG.debug(_(\"_nvp_create_port completed for port %(name)s \""}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2BwRI%3D","line":465,"updated":"2013-02-19 22:42:00.000000000","message":"just confirming that this is correct to pass in quantum network-id, rather than the lswitch_uuid.   maybe something else changed elsewhere in the patch?","commit_id":"1f3bf7e5c98dcb0639fd27324a237d73f66b1213"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":462,"context_line":"            if (not port_data[\u0027device_owner\u0027] in"},{"line_number":463,"context_line":"                (l3_db.DEVICE_OWNER_ROUTER_GW,"},{"line_number":464,"context_line":"                 l3_db.DEVICE_OWNER_ROUTER_INTF)):"},{"line_number":465,"context_line":"                nvplib.plug_interface(cluster, port_data[\u0027network_id\u0027],"},{"line_number":466,"context_line":"                                      lport[\u0027uuid\u0027], \"VifAttachment\","},{"line_number":467,"context_line":"                                      port_data[\u0027id\u0027])"},{"line_number":468,"context_line":"            LOG.debug(_(\"_nvp_create_port completed for port %(name)s \""}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2BwHE%3D","line":465,"in_reply_to":"AAAAM3%2F%2BwRI%3D","updated":"2013-02-19 23:31:44.000000000","message":"Thanks for noticing this. I need to verify whether the rebase operation here was executed carefully.\nThis might impact the provider networks feature.","commit_id":"1f3bf7e5c98dcb0639fd27324a237d73f66b1213"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":1952,"context_line":"            raise nvp_exc.NvpPluginException(_(\"Create_l2_gw_service did not \""},{"line_number":1953,"context_line":"                                               \"return an uuid for the newly \""},{"line_number":1954,"context_line":"                                               \"created resource:%s\") %"},{"line_number":1955,"context_line":"                                             nvp_res)"},{"line_number":1956,"context_line":"        gw_data[\u0027id\u0027] \u003d nvp_uuid"},{"line_number":1957,"context_line":"        return super(NvpPluginV2, self).create_network_gateway(context,"},{"line_number":1958,"context_line":"                                                               network_gateway)"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2Bv%2Bo%3D","line":1955,"updated":"2013-02-20 00:25:21.000000000","message":"huh... the create call would return invalid data rather than raising an exception?","commit_id":"ae955a69586e98d345949560b717841075ac0017"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":1952,"context_line":"            raise nvp_exc.NvpPluginException(_(\"Create_l2_gw_service did not \""},{"line_number":1953,"context_line":"                                               \"return an uuid for the newly \""},{"line_number":1954,"context_line":"                                               \"created resource:%s\") %"},{"line_number":1955,"context_line":"                                             nvp_res)"},{"line_number":1956,"context_line":"        gw_data[\u0027id\u0027] \u003d nvp_uuid"},{"line_number":1957,"context_line":"        return super(NvpPluginV2, self).create_network_gateway(context,"},{"line_number":1958,"context_line":"                                                               network_gateway)"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2Bv74%3D","line":1955,"in_reply_to":"AAAAM3%2F%2Bv%2Bo%3D","updated":"2013-02-20 00:40:16.000000000","message":"Line 1952 raises.\nIs there a place where we are suppressing an exception?","commit_id":"ae955a69586e98d345949560b717841075ac0017"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":1952,"context_line":"            raise nvp_exc.NvpPluginException(_(\"Create_l2_gw_service did not \""},{"line_number":1953,"context_line":"                                               \"return an uuid for the newly \""},{"line_number":1954,"context_line":"                                               \"created resource:%s\") %"},{"line_number":1955,"context_line":"                                             nvp_res)"},{"line_number":1956,"context_line":"        gw_data[\u0027id\u0027] \u003d nvp_uuid"},{"line_number":1957,"context_line":"        return super(NvpPluginV2, self).create_network_gateway(context,"},{"line_number":1958,"context_line":"                                                               network_gateway)"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2Bv3M%3D","line":1955,"in_reply_to":"AAAAM3%2F%2Bv4s%3D","updated":"2013-02-20 01:00:34.000000000","message":"Ah good point. Let me check and fix that.","commit_id":"ae955a69586e98d345949560b717841075ac0017"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":1952,"context_line":"            raise nvp_exc.NvpPluginException(_(\"Create_l2_gw_service did not \""},{"line_number":1953,"context_line":"                                               \"return an uuid for the newly \""},{"line_number":1954,"context_line":"                                               \"created resource:%s\") %"},{"line_number":1955,"context_line":"                                             nvp_res)"},{"line_number":1956,"context_line":"        gw_data[\u0027id\u0027] \u003d nvp_uuid"},{"line_number":1957,"context_line":"        return super(NvpPluginV2, self).create_network_gateway(context,"},{"line_number":1958,"context_line":"                                                               network_gateway)"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2Bv4s%3D","line":1955,"in_reply_to":"AAAAM3%2F%2Bv74%3D","updated":"2013-02-20 00:56:18.000000000","message":"sorry, I was unclear.  I would have expected the nvplib.create_l2_gw_service to either return valid data, or raise an exception.  I was surprised to see that we had to check the output here and then raise.","commit_id":"ae955a69586e98d345949560b717841075ac0017"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":1970,"context_line":"            except NvpApiClient.NvpApiException:"},{"line_number":1971,"context_line":"                # Do not cause a 500 to be returned to the user"},{"line_number":1972,"context_line":"                LOG.exception(_(\"Unable to remove gateway service from \""},{"line_number":1973,"context_line":"                                \"NVP plaform - stale gateway on NVP\"))"},{"line_number":1974,"context_line":""},{"line_number":1975,"context_line":"    def _ensure_tenant_on_net_gateway(self, context, net_gateway):"},{"line_number":1976,"context_line":"        # If there\u0027s no tenant let him believe he owns the gateway"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2BwAg%3D","line":1973,"updated":"2013-02-20 00:25:21.000000000","message":"is this the case of all NvpApiExceptions?  Is there a point in looking more closely to see if the error can safely be ignored?","commit_id":"ae955a69586e98d345949560b717841075ac0017"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":1970,"context_line":"            except NvpApiClient.NvpApiException:"},{"line_number":1971,"context_line":"                # Do not cause a 500 to be returned to the user"},{"line_number":1972,"context_line":"                LOG.exception(_(\"Unable to remove gateway service from \""},{"line_number":1973,"context_line":"                                \"NVP plaform - stale gateway on NVP\"))"},{"line_number":1974,"context_line":""},{"line_number":1975,"context_line":"    def _ensure_tenant_on_net_gateway(self, context, net_gateway):"},{"line_number":1976,"context_line":"        # If there\u0027s no tenant let him believe he owns the gateway"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2Bv4g%3D","line":1973,"in_reply_to":"AAAAM3%2F%2Bv70%3D","updated":"2013-02-20 00:56:18.000000000","message":"yes, if 404, safe to ignore.","commit_id":"ae955a69586e98d345949560b717841075ac0017"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":1970,"context_line":"            except NvpApiClient.NvpApiException:"},{"line_number":1971,"context_line":"                # Do not cause a 500 to be returned to the user"},{"line_number":1972,"context_line":"                LOG.exception(_(\"Unable to remove gateway service from \""},{"line_number":1973,"context_line":"                                \"NVP plaform - stale gateway on NVP\"))"},{"line_number":1974,"context_line":""},{"line_number":1975,"context_line":"    def _ensure_tenant_on_net_gateway(self, context, net_gateway):"},{"line_number":1976,"context_line":"        # If there\u0027s no tenant let him believe he owns the gateway"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2Bv70%3D","line":1973,"in_reply_to":"AAAAM3%2F%2BwAg%3D","updated":"2013-02-20 00:40:16.000000000","message":"I shall replace this with a 404 exception (ResourceNotFound)","commit_id":"ae955a69586e98d345949560b717841075ac0017"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":1989,"context_line":"                                                        filters,"},{"line_number":1990,"context_line":"                                                        fields)"},{"line_number":1991,"context_line":"        for net_gateway in net_gateways:"},{"line_number":1992,"context_line":"            self._ensure_tenant_on_net_gateway(context, net_gateway)"},{"line_number":1993,"context_line":"        return net_gateways"},{"line_number":1994,"context_line":""},{"line_number":1995,"context_line":"    def get_plugin_version(self):"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2BwBM%3D","line":1992,"updated":"2013-02-20 00:25:21.000000000","message":"why is this needed?  I would expect that a tenant would only see the gateways that they owned, based on the new model where there aren\u0027t \u0027shared\u0027 gateways.  Does this code imply that net_gateways is all network gateways, not just the gateways for that tenant-id?","commit_id":"ae955a69586e98d345949560b717841075ac0017"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":1989,"context_line":"                                                        filters,"},{"line_number":1990,"context_line":"                                                        fields)"},{"line_number":1991,"context_line":"        for net_gateway in net_gateways:"},{"line_number":1992,"context_line":"            self._ensure_tenant_on_net_gateway(context, net_gateway)"},{"line_number":1993,"context_line":"        return net_gateways"},{"line_number":1994,"context_line":""},{"line_number":1995,"context_line":"    def get_plugin_version(self):"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2Bv4Q%3D","line":1992,"in_reply_to":"AAAAM3%2F%2Bv7U%3D","updated":"2013-02-20 00:56:18.000000000","message":"still unclear here.  will ping you on chat.","commit_id":"ae955a69586e98d345949560b717841075ac0017"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":1989,"context_line":"                                                        filters,"},{"line_number":1990,"context_line":"                                                        fields)"},{"line_number":1991,"context_line":"        for net_gateway in net_gateways:"},{"line_number":1992,"context_line":"            self._ensure_tenant_on_net_gateway(context, net_gateway)"},{"line_number":1993,"context_line":"        return net_gateways"},{"line_number":1994,"context_line":""},{"line_number":1995,"context_line":"    def get_plugin_version(self):"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2Bv7U%3D","line":1992,"in_reply_to":"AAAAM3%2F%2BwBM%3D","updated":"2013-02-20 00:40:16.000000000","message":"This is for the default gateway case.\nthat gateway does not have a tenant identifier. Currently the API framework (namely the policy engine) expects a populated tenant_id attribute on all resources.\n\nI will add a comment for clarifying why this line is there.","commit_id":"ae955a69586e98d345949560b717841075ac0017"}],"quantum/plugins/nicira/nicira_nvp_plugin/common/config.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8edf5d612aba2ae847b89b81a39e0ab473d6dd54","unresolved":false,"context_lines":[{"line_number":60,"context_line":"               help\u003d_(\"Unique identifier of the NVP L3 Gateway service \""},{"line_number":61,"context_line":"                      \"which will be used for implementing routers and \""},{"line_number":62,"context_line":"                      \"floating IPs\")),"},{"line_number":63,"context_line":"    cfg.StrOpt(\u0027default_l2_gw_service_uuid\u0027),"},{"line_number":64,"context_line":"    cfg.StrOpt(\u0027default_interface_name\u0027, default\u003d\u0027breth0\u0027),"},{"line_number":65,"context_line":"]"},{"line_number":66,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FBoU%3D","line":63,"updated":"2013-02-11 08:33:02.000000000","message":"can you add help text?","commit_id":"25743017c4163d0361a38029179fb94f46d858b3"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":60,"context_line":"               help\u003d_(\"Unique identifier of the NVP L3 Gateway service \""},{"line_number":61,"context_line":"                      \"which will be used for implementing routers and \""},{"line_number":62,"context_line":"                      \"floating IPs\")),"},{"line_number":63,"context_line":"    cfg.StrOpt(\u0027default_l2_gw_service_uuid\u0027),"},{"line_number":64,"context_line":"    cfg.StrOpt(\u0027default_interface_name\u0027, default\u003d\u0027breth0\u0027),"},{"line_number":65,"context_line":"]"},{"line_number":66,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FBkM%3D","line":63,"in_reply_to":"AAAAM3%2F%2FBoU%3D","updated":"2013-02-11 09:14:49.000000000","message":"Blimey there use to be!\nI messed up a merge.","commit_id":"25743017c4163d0361a38029179fb94f46d858b3"}],"quantum/plugins/nicira/nicira_nvp_plugin/extensions/nvp_networkgw.py":[{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":76,"context_line":"        return msg"},{"line_number":77,"context_line":"    try:"},{"line_number":78,"context_line":"        for device in data:"},{"line_number":79,"context_line":"            try:"},{"line_number":80,"context_line":"                # Do a copy of the original object so we can easily"},{"line_number":81,"context_line":"                # pop out stuff from it"},{"line_number":82,"context_line":"                device_copy \u003d device.copy()"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B2mY%3D","line":79,"updated":"2013-02-17 00:19:51.000000000","message":"This try is redundant since the catching except always returns.","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":76,"context_line":"        return msg"},{"line_number":77,"context_line":"    try:"},{"line_number":78,"context_line":"        for device in data:"},{"line_number":79,"context_line":"            try:"},{"line_number":80,"context_line":"                # Do a copy of the original object so we can easily"},{"line_number":81,"context_line":"                # pop out stuff from it"},{"line_number":82,"context_line":"                device_copy \u003d device.copy()"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B1Ek%3D","line":79,"in_reply_to":"AAAAM3%2F%2B2mY%3D","updated":"2013-02-18 13:23:02.000000000","message":"I am actually going to use the _validate_dict facility which was recently merged.","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":77,"context_line":"    try:"},{"line_number":78,"context_line":"        for device in data:"},{"line_number":79,"context_line":"            try:"},{"line_number":80,"context_line":"                # Do a copy of the original object so we can easily"},{"line_number":81,"context_line":"                # pop out stuff from it"},{"line_number":82,"context_line":"                device_copy \u003d device.copy()"},{"line_number":83,"context_line":"                # Validate \u0027device_id\u0027 attribute"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B2mA%3D","line":80,"updated":"2013-02-17 00:19:51.000000000","message":"What are we popping?  Doesn\u0027t look like anything that would alter device is occurring.","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":77,"context_line":"    try:"},{"line_number":78,"context_line":"        for device in data:"},{"line_number":79,"context_line":"            try:"},{"line_number":80,"context_line":"                # Do a copy of the original object so we can easily"},{"line_number":81,"context_line":"                # pop out stuff from it"},{"line_number":82,"context_line":"                device_copy \u003d device.copy()"},{"line_number":83,"context_line":"                # Validate \u0027device_id\u0027 attribute"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B1yU%3D","line":80,"in_reply_to":"AAAAM3%2F%2B2mA%3D","updated":"2013-02-17 23:32:45.000000000","message":"I had pop calls in a previous version of the method. The comment is obsolete too now.","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":85,"context_line":"                err_msg \u003d attributes._validate_regex(device_id,"},{"line_number":86,"context_line":"                                                     attributes.UUID_PATTERN)"},{"line_number":87,"context_line":"                if err_msg:"},{"line_number":88,"context_line":"                    return(_(\"%s: %s\") % (_validate_device_list.__name__,"},{"line_number":89,"context_line":"                                          err_msg))"},{"line_number":90,"context_line":"            except TypeError:"},{"line_number":91,"context_line":"                LOG.exception(_(\"Exception while parsing device definition:%s\""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B2lc%3D","line":88,"updated":"2013-02-17 00:19:51.000000000","message":"No need to wrap this for translation.","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":85,"context_line":"                err_msg \u003d attributes._validate_regex(device_id,"},{"line_number":86,"context_line":"                                                     attributes.UUID_PATTERN)"},{"line_number":87,"context_line":"                if err_msg:"},{"line_number":88,"context_line":"                    return(_(\"%s: %s\") % (_validate_device_list.__name__,"},{"line_number":89,"context_line":"                                          err_msg))"},{"line_number":90,"context_line":"            except TypeError:"},{"line_number":91,"context_line":"                LOG.exception(_(\"Exception while parsing device definition:%s\""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B1yQ%3D","line":88,"in_reply_to":"AAAAM3%2F%2B2lc%3D","updated":"2013-02-17 23:32:45.000000000","message":"I agree with you, but I have been previously asked to wrap everything is returned to the user no matter what.\n\nSo, if that\u0027s not too bad too you I will leave it for now, as I would like to avoid a -1 for this in the last useful day for merging in G-3!","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":87,"context_line":"                if err_msg:"},{"line_number":88,"context_line":"                    return(_(\"%s: %s\") % (_validate_device_list.__name__,"},{"line_number":89,"context_line":"                                          err_msg))"},{"line_number":90,"context_line":"            except TypeError:"},{"line_number":91,"context_line":"                LOG.exception(_(\"Exception while parsing device definition:%s\""},{"line_number":92,"context_line":"                              % device))"},{"line_number":93,"context_line":"                msg \u003d _(\"Was expecting a dict for device definition, \""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B2mQ%3D","line":90,"updated":"2013-02-17 00:19:51.000000000","message":"Move this to same indention level as except below.","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":87,"context_line":"                if err_msg:"},{"line_number":88,"context_line":"                    return(_(\"%s: %s\") % (_validate_device_list.__name__,"},{"line_number":89,"context_line":"                                          err_msg))"},{"line_number":90,"context_line":"            except TypeError:"},{"line_number":91,"context_line":"                LOG.exception(_(\"Exception while parsing device definition:%s\""},{"line_number":92,"context_line":"                              % device))"},{"line_number":93,"context_line":"                msg \u003d _(\"Was expecting a dict for device definition, \""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B1yI%3D","line":90,"in_reply_to":"AAAAM3%2F%2B2mQ%3D","updated":"2013-02-17 23:32:45.000000000","message":"I will remove it. this are actually leftovers I have from a previous iteration of the code.","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":89,"context_line":"                                          err_msg))"},{"line_number":90,"context_line":"            except TypeError:"},{"line_number":91,"context_line":"                LOG.exception(_(\"Exception while parsing device definition:%s\""},{"line_number":92,"context_line":"                              % device))"},{"line_number":93,"context_line":"                msg \u003d _(\"Was expecting a dict for device definition, \""},{"line_number":94,"context_line":"                        \"found the following: %s\") % device"},{"line_number":95,"context_line":"                LOG.error(_(\"%(f_name)s:%(msg)s\"),"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B2lk%3D","line":92,"updated":"2013-02-17 00:19:51.000000000","message":"device should be outside translation wrapper","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":89,"context_line":"                                          err_msg))"},{"line_number":90,"context_line":"            except TypeError:"},{"line_number":91,"context_line":"                LOG.exception(_(\"Exception while parsing device definition:%s\""},{"line_number":92,"context_line":"                              % device))"},{"line_number":93,"context_line":"                msg \u003d _(\"Was expecting a dict for device definition, \""},{"line_number":94,"context_line":"                        \"found the following: %s\") % device"},{"line_number":95,"context_line":"                LOG.error(_(\"%(f_name)s:%(msg)s\"),"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B1yE%3D","line":92,"in_reply_to":"AAAAM3%2F%2B2lk%3D","updated":"2013-02-17 23:32:45.000000000","message":"Done","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":92,"context_line":"                              % device))"},{"line_number":93,"context_line":"                msg \u003d _(\"Was expecting a dict for device definition, \""},{"line_number":94,"context_line":"                        \"found the following: %s\") % device"},{"line_number":95,"context_line":"                LOG.error(_(\"%(f_name)s:%(msg)s\"),"},{"line_number":96,"context_line":"                          {\u0027f_name\u0027: _validate_device_list.__name__,"},{"line_number":97,"context_line":"                           \u0027msg\u0027: msg})"},{"line_number":98,"context_line":"                return msg"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B2mM%3D","line":95,"updated":"2013-02-17 00:19:51.000000000","message":"I\u0027m not sure this is needed.  LOG.exception will give you the location in the code and be logged at the error level.  I\u0027d suggest changing the msg in line 91 if it is not informative enough.","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":92,"context_line":"                              % device))"},{"line_number":93,"context_line":"                msg \u003d _(\"Was expecting a dict for device definition, \""},{"line_number":94,"context_line":"                        \"found the following: %s\") % device"},{"line_number":95,"context_line":"                LOG.error(_(\"%(f_name)s:%(msg)s\"),"},{"line_number":96,"context_line":"                          {\u0027f_name\u0027: _validate_device_list.__name__,"},{"line_number":97,"context_line":"                           \u0027msg\u0027: msg})"},{"line_number":98,"context_line":"                return msg"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B1yA%3D","line":95,"in_reply_to":"AAAAM3%2F%2B2mM%3D","updated":"2013-02-17 23:32:45.000000000","message":"Will remove.","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":28,"context_line":"RESOURCE_NAME \u003d \"network-gateway\""},{"line_number":29,"context_line":"COLLECTION_NAME \u003d \"%ss\" % RESOURCE_NAME"},{"line_number":30,"context_line":"EXT_ALIAS \u003d RESOURCE_NAME"},{"line_number":31,"context_line":"DEVICE_ID_ATTR \u003d \u0027id\u0027"},{"line_number":32,"context_line":"IFACE_NAME_ATTR \u003d \u0027interface_name\u0027"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"# Attribute Map for Network Gateway Resource"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2Bz4k%3D","line":31,"updated":"2013-02-18 19:47:15.000000000","message":"in hindsight i was this name more clearly indicated that it was the id of an external NVP api entity, but I think its too late to change.","commit_id":"950612eba92e0d911acfb17387f2121b5f4f265e"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":28,"context_line":"RESOURCE_NAME \u003d \"network-gateway\""},{"line_number":29,"context_line":"COLLECTION_NAME \u003d \"%ss\" % RESOURCE_NAME"},{"line_number":30,"context_line":"EXT_ALIAS \u003d RESOURCE_NAME"},{"line_number":31,"context_line":"DEVICE_ID_ATTR \u003d \u0027id\u0027"},{"line_number":32,"context_line":"IFACE_NAME_ATTR \u003d \u0027interface_name\u0027"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"# Attribute Map for Network Gateway Resource"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2BzsQ%3D","line":31,"in_reply_to":"AAAAM3%2F%2Bz4k%3D","updated":"2013-02-18 21:23:01.000000000","message":"it actually used as an attribute in a dict whose key is devices.\nSo you would hace\n\u0027network-gateway\u0027: {\u0027name\u0027: \u0027xxxx\u0027,\n                                \u0027devices\u0027: {\u0027id\u0027: \u0027ljklkfjkdlsf\u0027,\n                                                 \u0027interface_name\u0027: \u0027xyx\u0027}}","commit_id":"950612eba92e0d911acfb17387f2121b5f4f265e"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":53,"context_line":"                    \u0027is_visible\u0027: True},"},{"line_number":54,"context_line":"        \u0027devices\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: False,"},{"line_number":55,"context_line":"                    \u0027validate\u0027: {\u0027type:device_list\u0027: None},"},{"line_number":56,"context_line":"                    \u0027is_visible\u0027: True},"},{"line_number":57,"context_line":"        \u0027tenant_id\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: False,"},{"line_number":58,"context_line":"                      \u0027validate\u0027: {\u0027type:string\u0027: None},"},{"line_number":59,"context_line":"                      \u0027required_by_policy\u0027: True,"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2B0Dc%3D","line":56,"updated":"2013-02-18 19:47:15.000000000","message":"ok, i was confused by this at first... so this is a list of dictionaries that include both nvp-transport-node-id and the bridge-id?","commit_id":"950612eba92e0d911acfb17387f2121b5f4f265e"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":53,"context_line":"                    \u0027is_visible\u0027: True},"},{"line_number":54,"context_line":"        \u0027devices\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: False,"},{"line_number":55,"context_line":"                    \u0027validate\u0027: {\u0027type:device_list\u0027: None},"},{"line_number":56,"context_line":"                    \u0027is_visible\u0027: True},"},{"line_number":57,"context_line":"        \u0027tenant_id\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: False,"},{"line_number":58,"context_line":"                      \u0027validate\u0027: {\u0027type:string\u0027: None},"},{"line_number":59,"context_line":"                      \u0027required_by_policy\u0027: True,"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2BzsE%3D","line":56,"in_reply_to":"AAAAM3%2F%2B0Dc%3D","updated":"2013-02-18 21:23:01.000000000","message":"correct.","commit_id":"950612eba92e0d911acfb17387f2121b5f4f265e"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":74,"context_line":"                device,"},{"line_number":75,"context_line":"                key_specs\u003d{DEVICE_ID_ATTR:"},{"line_number":76,"context_line":"                           {\u0027type:regex\u0027: attributes.UUID_PATTERN,"},{"line_number":77,"context_line":"                            \u0027required\u0027: True}})"},{"line_number":78,"context_line":"            if err_msg:"},{"line_number":79,"context_line":"                return err_msg"},{"line_number":80,"context_line":"    except TypeError:"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2Bz4Y%3D","line":77,"updated":"2013-02-18 19:47:15.000000000","message":"can we not validate the the bridge-id, if present, is a string?","commit_id":"950612eba92e0d911acfb17387f2121b5f4f265e"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":74,"context_line":"                device,"},{"line_number":75,"context_line":"                key_specs\u003d{DEVICE_ID_ATTR:"},{"line_number":76,"context_line":"                           {\u0027type:regex\u0027: attributes.UUID_PATTERN,"},{"line_number":77,"context_line":"                            \u0027required\u0027: True}})"},{"line_number":78,"context_line":"            if err_msg:"},{"line_number":79,"context_line":"                return err_msg"},{"line_number":80,"context_line":"    except TypeError:"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2Bzr8%3D","line":77,"in_reply_to":"AAAAM3%2F%2Bz4Y%3D","updated":"2013-02-18 21:23:01.000000000","message":"yes, we can","commit_id":"950612eba92e0d911acfb17387f2121b5f4f265e"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":162,"context_line":"    def get_network_gateways(self, context, filters\u003dNone, fields\u003dNone):"},{"line_number":163,"context_line":"        pass"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    @abstractmethod"},{"line_number":166,"context_line":"    def connect_network(self, context, network_gateway_id,"},{"line_number":167,"context_line":"                        network_mapping_info):"},{"line_number":168,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2Bv%2BA%3D","line":165,"updated":"2013-02-20 00:25:21.000000000","message":"do we do input validation for these calls?","commit_id":"ae955a69586e98d345949560b717841075ac0017"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":162,"context_line":"    def get_network_gateways(self, context, filters\u003dNone, fields\u003dNone):"},{"line_number":163,"context_line":"        pass"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    @abstractmethod"},{"line_number":166,"context_line":"    def connect_network(self, context, network_gateway_id,"},{"line_number":167,"context_line":"                        network_mapping_info):"},{"line_number":168,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2Bv7I%3D","line":165,"in_reply_to":"AAAAM3%2F%2Bv%2BA%3D","updated":"2013-02-20 00:40:16.000000000","message":"Yes: NetworkGatewayMixin._validate_network_mapping_info","commit_id":"ae955a69586e98d345949560b717841075ac0017"}],"quantum/plugins/nicira/nicira_nvp_plugin/networkgw_db.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8edf5d612aba2ae847b89b81a39e0ab473d6dd54","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Copyright 2012 Nicira Networks, Inc.  All rights reserved."},{"line_number":4,"context_line":"#"},{"line_number":5,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":6,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FBoQ%3D","line":3,"updated":"2013-02-11 08:33:02.000000000","message":"2013","commit_id":"25743017c4163d0361a38029179fb94f46d858b3"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Copyright 2012 Nicira Networks, Inc.  All rights reserved."},{"line_number":4,"context_line":"#"},{"line_number":5,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":6,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FBkE%3D","line":3,"in_reply_to":"AAAAM3%2F%2FBoQ%3D","updated":"2013-02-11 09:14:49.000000000","message":"Done","commit_id":"25743017c4163d0361a38029179fb94f46d858b3"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8edf5d612aba2ae847b89b81a39e0ab473d6dd54","unresolved":false,"context_lines":[{"line_number":17,"context_line":"# @author: Salvatore Orlando, VMware"},{"line_number":18,"context_line":"#"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import logging"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"import sqlalchemy as sa"},{"line_number":23,"context_line":"from sqlalchemy import exc as sa_exc"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FBoM%3D","line":20,"updated":"2013-02-11 08:33:02.000000000","message":"common logging","commit_id":"25743017c4163d0361a38029179fb94f46d858b3"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":17,"context_line":"# @author: Salvatore Orlando, VMware"},{"line_number":18,"context_line":"#"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import logging"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"import sqlalchemy as sa"},{"line_number":23,"context_line":"from sqlalchemy import exc as sa_exc"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FBkA%3D","line":20,"in_reply_to":"AAAAM3%2F%2FBoM%3D","updated":"2013-02-11 09:14:49.000000000","message":"Done","commit_id":"25743017c4163d0361a38029179fb94f46d858b3"}],"quantum/plugins/nicira/nicira_nvp_plugin/nicira_db.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8edf5d612aba2ae847b89b81a39e0ab473d6dd54","unresolved":false,"context_lines":[{"line_number":16,"context_line":"#    under the License."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import logging"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from sqlalchemy.orm import exc"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FBoA%3D","line":19,"updated":"2013-02-11 08:33:02.000000000","message":"common logging (not related to this patch)","commit_id":"25743017c4163d0361a38029179fb94f46d858b3"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":16,"context_line":"#    under the License."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import logging"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from sqlalchemy.orm import exc"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FBj8%3D","line":19,"in_reply_to":"AAAAM3%2F%2FBoA%3D","updated":"2013-02-11 09:14:49.000000000","message":"Done","commit_id":"25743017c4163d0361a38029179fb94f46d858b3"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":82,"context_line":"    with session.begin(subtransactions\u003dTrue):"},{"line_number":83,"context_line":"        gw \u003d (session.query(nicira_networkgw_db.NetworkGateway)."},{"line_number":84,"context_line":"              filter_by(id\u003dgw_id).one())"},{"line_number":85,"context_line":"        gw[\u0027default\u0027] \u003d True"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2BwQw%3D","line":85,"updated":"2013-02-19 22:42:00.000000000","message":"not clear why this is in this file, rather than in nicira_networkgw_db, but I guess its not a big deal.","commit_id":"1f3bf7e5c98dcb0639fd27324a237d73f66b1213"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":82,"context_line":"    with session.begin(subtransactions\u003dTrue):"},{"line_number":83,"context_line":"        gw \u003d (session.query(nicira_networkgw_db.NetworkGateway)."},{"line_number":84,"context_line":"              filter_by(id\u003dgw_id).one())"},{"line_number":85,"context_line":"        gw[\u0027default\u0027] \u003d True"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2BwG4%3D","line":85,"in_reply_to":"AAAAM3%2F%2BwQw%3D","updated":"2013-02-19 23:31:44.000000000","message":"It\u0027s here because it\u0027s executed outside of the plugin context.","commit_id":"1f3bf7e5c98dcb0639fd27324a237d73f66b1213"}],"quantum/plugins/nicira/nicira_nvp_plugin/nicira_networkgw_db.py":[{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"20a0bdf6d041912663c57e2705116667934eed4a","unresolved":false,"context_lines":[{"line_number":31,"context_line":"from quantum.db import models_v2"},{"line_number":32,"context_line":"from quantum.extensions import nvp_networkgw"},{"line_number":33,"context_line":"from quantum.openstack.common import uuidutils"},{"line_number":34,"context_line":"from quantum.openstack.common import log as logging"},{"line_number":35,"context_line":"from quantum import policy"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2B3fg%3D","line":34,"updated":"2013-02-16 00:50:13.000000000","message":"nit abc (swap 33,34)","commit_id":"bc30a80d67a0e9f106cf6ebb9614f10ff15a5184"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"20a0bdf6d041912663c57e2705116667934eed4a","unresolved":false,"context_lines":[{"line_number":212,"context_line":"        tenant_id \u003d self._get_tenant_id_for_create(context, gw_data)"},{"line_number":213,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":214,"context_line":"            gw_db \u003d NetworkGateway("},{"line_number":215,"context_line":"                id\u003dgw_data.get(\u0027id\u0027) or uuidutils.generate_uuid(),"},{"line_number":216,"context_line":"                tenant_id\u003dtenant_id,"},{"line_number":217,"context_line":"                name\u003dgw_data.get(\u0027name\u0027),"},{"line_number":218,"context_line":"                shared\u003dgw_data.get(\u0027shared\u0027, False))"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAM3%2F%2B3es%3D","line":215,"updated":"2013-02-16 00:50:13.000000000","message":"probably don\u0027t need generate_uuid() since it\u0027s passed down from nvp but ok.","commit_id":"bc30a80d67a0e9f106cf6ebb9614f10ff15a5184"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":95,"context_line":"    segmentation_type \u003d sa.Column(sa.Enum("},{"line_number":96,"context_line":"        \u0027flat\u0027, \u0027vlan\u0027, name\u003d\u0027networkconnections_segmentation_type\u0027))"},{"line_number":97,"context_line":"    segmentation_id \u003d sa.Column(sa.Integer)"},{"line_number":98,"context_line":"    __table_args__ \u003d (sa.UniqueConstraint(network_gateway_id,"},{"line_number":99,"context_line":"                                          segmentation_type,"},{"line_number":100,"context_line":"                                          segmentation_id),)"},{"line_number":101,"context_line":"    # Also, storing port id comes back useful when disconnecting a network"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B2lY%3D","line":98,"updated":"2013-02-17 00:19:51.000000000","message":"instead of table args, you can add unique\u003dTrue to each of the unique columns.","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":95,"context_line":"    segmentation_type \u003d sa.Column(sa.Enum("},{"line_number":96,"context_line":"        \u0027flat\u0027, \u0027vlan\u0027, name\u003d\u0027networkconnections_segmentation_type\u0027))"},{"line_number":97,"context_line":"    segmentation_id \u003d sa.Column(sa.Integer)"},{"line_number":98,"context_line":"    __table_args__ \u003d (sa.UniqueConstraint(network_gateway_id,"},{"line_number":99,"context_line":"                                          segmentation_type,"},{"line_number":100,"context_line":"                                          segmentation_id),)"},{"line_number":101,"context_line":"    # Also, storing port id comes back useful when disconnecting a network"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B1B8%3D","line":98,"in_reply_to":"AAAAM3%2F%2B1x8%3D","updated":"2013-02-18 13:23:02.000000000","message":"Actually with your suggestion it seems three distinct unique indexes are created, while I wanted only one on three field.\nCould it be that primary_key and unique work differently in sqlalchemy?","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":95,"context_line":"    segmentation_type \u003d sa.Column(sa.Enum("},{"line_number":96,"context_line":"        \u0027flat\u0027, \u0027vlan\u0027, name\u003d\u0027networkconnections_segmentation_type\u0027))"},{"line_number":97,"context_line":"    segmentation_id \u003d sa.Column(sa.Integer)"},{"line_number":98,"context_line":"    __table_args__ \u003d (sa.UniqueConstraint(network_gateway_id,"},{"line_number":99,"context_line":"                                          segmentation_type,"},{"line_number":100,"context_line":"                                          segmentation_id),)"},{"line_number":101,"context_line":"    # Also, storing port id comes back useful when disconnecting a network"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B1x8%3D","line":98,"in_reply_to":"AAAAM3%2F%2B2lY%3D","updated":"2013-02-17 23:32:45.000000000","message":"Done","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":104,"context_line":"                        sa.ForeignKey(\u0027ports.id\u0027, ondelete\u003d\u0027CASCADE\u0027),"},{"line_number":105,"context_line":"                        primary_key\u003dTrue)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def __init__(self, network_id, segmentation_type, port_id,"},{"line_number":108,"context_line":"                 tenant_id, segmentation_id\u003dNone):"},{"line_number":109,"context_line":"        self.network_id \u003d network_id"},{"line_number":110,"context_line":"        self.port_id \u003d port_id"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B2lU%3D","line":107,"updated":"2013-02-17 00:19:51.000000000","message":"I don\u0027t see the need to override __init__().  If you segmentation_id to default to None.  You can set the default\u003dNone in the column definition.","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":104,"context_line":"                        sa.ForeignKey(\u0027ports.id\u0027, ondelete\u003d\u0027CASCADE\u0027),"},{"line_number":105,"context_line":"                        primary_key\u003dTrue)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def __init__(self, network_id, segmentation_type, port_id,"},{"line_number":108,"context_line":"                 tenant_id, segmentation_id\u003dNone):"},{"line_number":109,"context_line":"        self.network_id \u003d network_id"},{"line_number":110,"context_line":"        self.port_id \u003d port_id"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B1x4%3D","line":107,"in_reply_to":"AAAAM3%2F%2B2lU%3D","updated":"2013-02-17 23:32:45.000000000","message":"I override init because I\u0027m of Java school.\nThat\u0027s pretty much it.\nI know I can remove it, and I will do.","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":120,"context_line":"    interface_name \u003d sa.Column(sa.String(64))"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def __init__(self, id, interface_name\u003dNone):"},{"line_number":123,"context_line":"        # Do not allow auto-generated ids - they won\u0027t make sense"},{"line_number":124,"context_line":"        self.id \u003d id"},{"line_number":125,"context_line":"        self.interface_name \u003d interface_name"},{"line_number":126,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B2lM%3D","line":123,"updated":"2013-02-17 00:19:51.000000000","message":"In this case, I think you should define an id column instead of inheriting from HasId and overriding with an __init__.  Just make sure you add a comment why HasId does not work.\n\nAlso this __init__ does not allow one to create the model with network_gateway_id at creation.","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":120,"context_line":"    interface_name \u003d sa.Column(sa.String(64))"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def __init__(self, id, interface_name\u003dNone):"},{"line_number":123,"context_line":"        # Do not allow auto-generated ids - they won\u0027t make sense"},{"line_number":124,"context_line":"        self.id \u003d id"},{"line_number":125,"context_line":"        self.interface_name \u003d interface_name"},{"line_number":126,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B1x0%3D","line":123,"in_reply_to":"AAAAM3%2F%2B2lM%3D","updated":"2013-02-17 23:32:45.000000000","message":"Done","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":175,"context_line":"                               connection_attrs))"},{"line_number":176,"context_line":"        seg_type \u003d network_mapping_info.get(SEGMENTATION_TYPE)"},{"line_number":177,"context_line":"        seg_id \u003d network_mapping_info.get(SEGMENTATION_ID)"},{"line_number":178,"context_line":"        if (seg_type and seg_type.lower() \u003d\u003d \u0027flat\u0027 and seg_id):"},{"line_number":179,"context_line":"            raise exceptions.InvalidInput("},{"line_number":180,"context_line":"                error_message\u003d_(\"Cannot specify a segmentation id when \""},{"line_number":181,"context_line":"                                \"the segmentation type is flat\"))"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B2k0%3D","line":178,"updated":"2013-02-17 00:19:51.000000000","message":"Consider replacing 178-185:\n\nif not set_type and seg_id:\n    msg \u003d_(\"In order to specify a segmentation id the segmentation type must be specified as well\")\n    raise exceptions.InvalidInput(error_message\u003dmsg)\nelif seg_type.lower() \u003d\u003d \u0027flat\u0027 and seg_id:\n    msg\u003d_(\"Cannot specify a segmentation id when the segmentation type is flat\")\n    raise InvalidInput(error_message\u003dmsg)","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":175,"context_line":"                               connection_attrs))"},{"line_number":176,"context_line":"        seg_type \u003d network_mapping_info.get(SEGMENTATION_TYPE)"},{"line_number":177,"context_line":"        seg_id \u003d network_mapping_info.get(SEGMENTATION_ID)"},{"line_number":178,"context_line":"        if (seg_type and seg_type.lower() \u003d\u003d \u0027flat\u0027 and seg_id):"},{"line_number":179,"context_line":"            raise exceptions.InvalidInput("},{"line_number":180,"context_line":"                error_message\u003d_(\"Cannot specify a segmentation id when \""},{"line_number":181,"context_line":"                                \"the segmentation type is flat\"))"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B1xw%3D","line":178,"in_reply_to":"AAAAM3%2F%2B2k0%3D","updated":"2013-02-17 23:32:45.000000000","message":"Done","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":212,"context_line":"        tenant_id \u003d self._get_tenant_id_for_create(context, gw_data)"},{"line_number":213,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":214,"context_line":"            gw_db \u003d NetworkGateway("},{"line_number":215,"context_line":"                id\u003dgw_data.get(\u0027id\u0027) or uuidutils.generate_uuid(),"},{"line_number":216,"context_line":"                tenant_id\u003dtenant_id,"},{"line_number":217,"context_line":"                name\u003dgw_data.get(\u0027name\u0027),"},{"line_number":218,"context_line":"                shared\u003dgw_data.get(\u0027shared\u0027, False))"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B2ks%3D","line":215,"updated":"2013-02-17 00:19:51.000000000","message":"id \u003d gw_data.get(\u0027id\u0027, uuidutils.generate_uuid())","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":212,"context_line":"        tenant_id \u003d self._get_tenant_id_for_create(context, gw_data)"},{"line_number":213,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":214,"context_line":"            gw_db \u003d NetworkGateway("},{"line_number":215,"context_line":"                id\u003dgw_data.get(\u0027id\u0027) or uuidutils.generate_uuid(),"},{"line_number":216,"context_line":"                tenant_id\u003dtenant_id,"},{"line_number":217,"context_line":"                name\u003dgw_data.get(\u0027name\u0027),"},{"line_number":218,"context_line":"                shared\u003dgw_data.get(\u0027shared\u0027, False))"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B1Eo%3D","line":215,"in_reply_to":"AAAAM3%2F%2B2ks%3D","updated":"2013-02-18 13:23:02.000000000","message":"Done","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":217,"context_line":"                name\u003dgw_data.get(\u0027name\u0027),"},{"line_number":218,"context_line":"                shared\u003dgw_data.get(\u0027shared\u0027, False))"},{"line_number":219,"context_line":"            # Device list is guaranteed to be a valid list"},{"line_number":220,"context_line":"            for device in gw_data[\u0027devices\u0027]:"},{"line_number":221,"context_line":"                gw_db.devices.append("},{"line_number":222,"context_line":"                    NetworkGatewayDevice(**device))"},{"line_number":223,"context_line":"            context.session.add(gw_db)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B2kg%3D","line":220,"updated":"2013-02-17 00:19:51.000000000","message":"gw_db.devices.extend(NetworkGatewayDevice(**device) for device in gw_data[\u0027devices\u0027])","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":217,"context_line":"                name\u003dgw_data.get(\u0027name\u0027),"},{"line_number":218,"context_line":"                shared\u003dgw_data.get(\u0027shared\u0027, False))"},{"line_number":219,"context_line":"            # Device list is guaranteed to be a valid list"},{"line_number":220,"context_line":"            for device in gw_data[\u0027devices\u0027]:"},{"line_number":221,"context_line":"                gw_db.devices.append("},{"line_number":222,"context_line":"                    NetworkGatewayDevice(**device))"},{"line_number":223,"context_line":"            context.session.add(gw_db)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B1Eg%3D","line":220,"in_reply_to":"AAAAM3%2F%2B2kg%3D","updated":"2013-02-18 13:23:02.000000000","message":"Done","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":"class GatewayConnectionInUse(exceptions.InUse):"},{"line_number":58,"context_line":"    message \u003d _(\"The specified mapping is already in use on network \""},{"line_number":59,"context_line":"                \"gateway \u0027%(gateway_id)s\u0027.\")"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"class MultipleGatewayConnections(exceptions.QuantumException):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2B0KE%3D","line":59,"updated":"2013-02-18 19:47:15.000000000","message":"could be useful to include the mapping here.","commit_id":"950612eba92e0d911acfb17387f2121b5f4f265e"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":"class GatewayConnectionInUse(exceptions.InUse):"},{"line_number":58,"context_line":"    message \u003d _(\"The specified mapping is already in use on network \""},{"line_number":59,"context_line":"                \"gateway \u0027%(gateway_id)s\u0027.\")"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"class MultipleGatewayConnections(exceptions.QuantumException):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2Bzr0%3D","line":59,"in_reply_to":"AAAAM3%2F%2B0KE%3D","updated":"2013-02-18 21:23:01.000000000","message":"Done","commit_id":"950612eba92e0d911acfb17387f2121b5f4f265e"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":69,"context_line":"                \"network gateway \u0027%(network_gateway_id)s\u0027\")"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"class DefaultGatewayUnchangeable(exceptions.InUse):"},{"line_number":73,"context_line":"    message \u003d _(\"The Default gateway %(gateway_id)s \""},{"line_number":74,"context_line":"                \"cannot be updated or deleted\")"},{"line_number":75,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2B0J8%3D","line":72,"updated":"2013-02-18 19:47:15.000000000","message":"DefaultL2Gateway?  In general, I like using L2Gateway, (or even NVP L2-Gateway, otherwise thinks like \"default gateway\" are confusing\u003e","commit_id":"950612eba92e0d911acfb17387f2121b5f4f265e"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":69,"context_line":"                \"network gateway \u0027%(network_gateway_id)s\u0027\")"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"class DefaultGatewayUnchangeable(exceptions.InUse):"},{"line_number":73,"context_line":"    message \u003d _(\"The Default gateway %(gateway_id)s \""},{"line_number":74,"context_line":"                \"cannot be updated or deleted\")"},{"line_number":75,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2Bzrc%3D","line":72,"in_reply_to":"AAAAM3%2F%2B0J8%3D","updated":"2013-02-18 21:23:01.000000000","message":"This is raised when an attempt is made to update info on the gateway for which default\u003dTrue.\n\nBut you\u0027re right, we can do without the default","commit_id":"950612eba92e0d911acfb17387f2121b5f4f265e"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":97,"context_line":"    segmentation_id \u003d sa.Column(sa.Integer)"},{"line_number":98,"context_line":"    __table_args__ \u003d (sa.UniqueConstraint(network_gateway_id,"},{"line_number":99,"context_line":"                                          segmentation_type,"},{"line_number":100,"context_line":"                                          segmentation_id),)"},{"line_number":101,"context_line":"    # Also, storing port id comes back useful when disconnecting a network"},{"line_number":102,"context_line":"    # from a gateway"},{"line_number":103,"context_line":"    port_id \u003d sa.Column(sa.String(36),"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2B0I0%3D","line":100,"updated":"2013-02-18 19:47:15.000000000","message":"do we need segmentation_type?  it seems like either type should be vlan, in which case segmentation_id is 0-4096, or it is flat, in which case segmentation_id could be None.","commit_id":"950612eba92e0d911acfb17387f2121b5f4f265e"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":97,"context_line":"    segmentation_id \u003d sa.Column(sa.Integer)"},{"line_number":98,"context_line":"    __table_args__ \u003d (sa.UniqueConstraint(network_gateway_id,"},{"line_number":99,"context_line":"                                          segmentation_type,"},{"line_number":100,"context_line":"                                          segmentation_id),)"},{"line_number":101,"context_line":"    # Also, storing port id comes back useful when disconnecting a network"},{"line_number":102,"context_line":"    # from a gateway"},{"line_number":103,"context_line":"    port_id \u003d sa.Column(sa.String(36),"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2BzrQ%3D","line":100,"in_reply_to":"AAAAM3%2F%2B0I0%3D","updated":"2013-02-18 21:23:01.000000000","message":"I\u0027m trying to be consistent with the provider network extension, and open to future evolutions, which might allow different transport mechanism on the northbound side of the gateway.\nWhat do you reckon?","commit_id":"950612eba92e0d911acfb17387f2121b5f4f265e"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":97,"context_line":"    segmentation_id \u003d sa.Column(sa.Integer)"},{"line_number":98,"context_line":"    __table_args__ \u003d (sa.UniqueConstraint(network_gateway_id,"},{"line_number":99,"context_line":"                                          segmentation_type,"},{"line_number":100,"context_line":"                                          segmentation_id),)"},{"line_number":101,"context_line":"    # Also, storing port id comes back useful when disconnecting a network"},{"line_number":102,"context_line":"    # from a gateway"},{"line_number":103,"context_line":"    port_id \u003d sa.Column(sa.String(36),"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2Bw9w%3D","line":100,"in_reply_to":"AAAAM3%2F%2BzrQ%3D","updated":"2013-02-19 18:18:57.000000000","message":"ok, that\u0027s fine, just wanted to ask the question.","commit_id":"950612eba92e0d911acfb17387f2121b5f4f265e"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"class NetworkGatewayDevice(model_base.BASEV2):"},{"line_number":109,"context_line":"    id \u003d sa.Column(sa.String(36), primary_key\u003dTrue)"},{"line_number":110,"context_line":"    network_gateway_id \u003d sa.Column(sa.String(36),"},{"line_number":111,"context_line":"                                   sa.ForeignKey(\u0027networkgateways.id\u0027,"},{"line_number":112,"context_line":"                                                 ondelete\u003d\u0027CASCADE\u0027))"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2B0Jg%3D","line":109,"updated":"2013-02-18 19:47:15.000000000","message":"why not models_v2.HasId ?","commit_id":"950612eba92e0d911acfb17387f2121b5f4f265e"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"class NetworkGatewayDevice(model_base.BASEV2):"},{"line_number":109,"context_line":"    id \u003d sa.Column(sa.String(36), primary_key\u003dTrue)"},{"line_number":110,"context_line":"    network_gateway_id \u003d sa.Column(sa.String(36),"},{"line_number":111,"context_line":"                                   sa.ForeignKey(\u0027networkgateways.id\u0027,"},{"line_number":112,"context_line":"                                                 ondelete\u003d\u0027CASCADE\u0027))"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2BzrM%3D","line":109,"in_reply_to":"AAAAM3%2F%2B0Jg%3D","updated":"2013-02-18 21:23:01.000000000","message":"Advice from Mark.\nBasically the peculiarity of the id here is that it\u0027s not autogenerated.","commit_id":"950612eba92e0d911acfb17387f2121b5f4f265e"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"class NetworkGatewayDevice(model_base.BASEV2):"},{"line_number":109,"context_line":"    id \u003d sa.Column(sa.String(36), primary_key\u003dTrue)"},{"line_number":110,"context_line":"    network_gateway_id \u003d sa.Column(sa.String(36),"},{"line_number":111,"context_line":"                                   sa.ForeignKey(\u0027networkgateways.id\u0027,"},{"line_number":112,"context_line":"                                                 ondelete\u003d\u0027CASCADE\u0027))"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2Bw9I%3D","line":109,"in_reply_to":"AAAAM3%2F%2BzrM%3D","updated":"2013-02-19 18:18:57.000000000","message":"ah, good point.  When I was first reviewing this, I didn\u0027t realize that this was an NVP id (i don\u0027t review files in order).","commit_id":"950612eba92e0d911acfb17387f2121b5f4f265e"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":187,"context_line":"        Ensures a port will not be deleted if is being used by a network"},{"line_number":188,"context_line":"        gateway. In that case an exception will be raised."},{"line_number":189,"context_line":"        \"\"\""},{"line_number":190,"context_line":"        port_db \u003d self._get_port(context, port_id)"},{"line_number":191,"context_line":"        if port_db[\u0027device_owner\u0027] \u003d\u003d DEVICE_OWNER_NET_GW_INTF:"},{"line_number":192,"context_line":"            raise NetworkGatewayPortInUse(port_id\u003dport_id,"},{"line_number":193,"context_line":"                                          device_owner\u003dport_db[\u0027device_owner\u0027])"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2Bz%2Bg%3D","line":190,"updated":"2013-02-18 19:47:15.000000000","message":"nit: seems like maybe the caller would already have the port, in which case we could save a lookup.  doesn\u0027t matter for G-3 though.","commit_id":"950612eba92e0d911acfb17387f2121b5f4f265e"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":187,"context_line":"        Ensures a port will not be deleted if is being used by a network"},{"line_number":188,"context_line":"        gateway. In that case an exception will be raised."},{"line_number":189,"context_line":"        \"\"\""},{"line_number":190,"context_line":"        port_db \u003d self._get_port(context, port_id)"},{"line_number":191,"context_line":"        if port_db[\u0027device_owner\u0027] \u003d\u003d DEVICE_OWNER_NET_GW_INTF:"},{"line_number":192,"context_line":"            raise NetworkGatewayPortInUse(port_id\u003dport_id,"},{"line_number":193,"context_line":"                                          device_owner\u003dport_db[\u0027device_owner\u0027])"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2BzrA%3D","line":190,"in_reply_to":"AAAAM3%2F%2Bz%2Bg%3D","updated":"2013-02-18 21:23:01.000000000","message":"Done","commit_id":"950612eba92e0d911acfb17387f2121b5f4f265e"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":203,"context_line":"                id\u003dgw_data.get(\u0027id\u0027, uuidutils.generate_uuid()),"},{"line_number":204,"context_line":"                tenant_id\u003dtenant_id,"},{"line_number":205,"context_line":"                name\u003dgw_data.get(\u0027name\u0027),"},{"line_number":206,"context_line":"                shared\u003dgw_data.get(\u0027shared\u0027, False))"},{"line_number":207,"context_line":"            # Device list is guaranteed to be a valid list"},{"line_number":208,"context_line":"            gw_db.devices.extend([NetworkGatewayDevice(**device)"},{"line_number":209,"context_line":"                                  for device in gw_data[\u0027devices\u0027]])"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2Bz6E%3D","line":206,"updated":"2013-02-18 19:47:15.000000000","message":"i\u0027m not really clear on how the \u0027shared\u0027 L2 GW works.  I would have expected that a gateway operated by the service provider and used for multiple tenants would simply be manipulated using an admin user, and that we would allow an admin to connect/disconnect networks to a gateway even if they do not own the network themselves.","commit_id":"950612eba92e0d911acfb17387f2121b5f4f265e"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":203,"context_line":"                id\u003dgw_data.get(\u0027id\u0027, uuidutils.generate_uuid()),"},{"line_number":204,"context_line":"                tenant_id\u003dtenant_id,"},{"line_number":205,"context_line":"                name\u003dgw_data.get(\u0027name\u0027),"},{"line_number":206,"context_line":"                shared\u003dgw_data.get(\u0027shared\u0027, False))"},{"line_number":207,"context_line":"            # Device list is guaranteed to be a valid list"},{"line_number":208,"context_line":"            gw_db.devices.extend([NetworkGatewayDevice(**device)"},{"line_number":209,"context_line":"                                  for device in gw_data[\u0027devices\u0027]])"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2Bzqk%3D","line":206,"in_reply_to":"AAAAM3%2F%2Bz6E%3D","updated":"2013-02-18 21:23:01.000000000","message":"This was the initial implementation.\nHowever, this required us to specify a \u0027gateway node\u0027 rather than a service in the configuration file, and then create the service (as an admin user).\n\nthe policy then would have allowed the admin, not the regular users, to connect/disconnect networks.\n\nWe are not implementing:\n-  a sharing mechanisms, just like for networks\n- a concept of \u0027default\u0027 gateway, similar to the \u0027default\u0027 quota, which is also shared and can be used by all tenants.","commit_id":"950612eba92e0d911acfb17387f2121b5f4f265e"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":203,"context_line":"                id\u003dgw_data.get(\u0027id\u0027, uuidutils.generate_uuid()),"},{"line_number":204,"context_line":"                tenant_id\u003dtenant_id,"},{"line_number":205,"context_line":"                name\u003dgw_data.get(\u0027name\u0027),"},{"line_number":206,"context_line":"                shared\u003dgw_data.get(\u0027shared\u0027, False))"},{"line_number":207,"context_line":"            # Device list is guaranteed to be a valid list"},{"line_number":208,"context_line":"            gw_db.devices.extend([NetworkGatewayDevice(**device)"},{"line_number":209,"context_line":"                                  for device in gw_data[\u0027devices\u0027]])"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2Bw9A%3D","line":206,"in_reply_to":"AAAAM3%2F%2Bzqk%3D","updated":"2013-02-19 18:18:57.000000000","message":"ok, from follow-up, plans is to remove shared.","commit_id":"950612eba92e0d911acfb17387f2121b5f4f265e"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":277,"context_line":"                # passed in the port structure to the plugin"},{"line_number":278,"context_line":"                port \u003d self.create_port(context, {"},{"line_number":279,"context_line":"                    \u0027port\u0027:"},{"line_number":280,"context_line":"                    {\u0027tenant_id\u0027: tenant_id,"},{"line_number":281,"context_line":"                     \u0027network_id\u0027: network_id,"},{"line_number":282,"context_line":"                     \u0027mac_address\u0027: attributes.ATTR_NOT_SPECIFIED,"},{"line_number":283,"context_line":"                     \u0027admin_state_up\u0027: True,"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2Bz54%3D","line":280,"updated":"2013-02-18 19:47:15.000000000","message":"is this saying that the owner of the gateway and the network must always be the same tenant?","commit_id":"950612eba92e0d911acfb17387f2121b5f4f265e"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":277,"context_line":"                # passed in the port structure to the plugin"},{"line_number":278,"context_line":"                port \u003d self.create_port(context, {"},{"line_number":279,"context_line":"                    \u0027port\u0027:"},{"line_number":280,"context_line":"                    {\u0027tenant_id\u0027: tenant_id,"},{"line_number":281,"context_line":"                     \u0027network_id\u0027: network_id,"},{"line_number":282,"context_line":"                     \u0027mac_address\u0027: attributes.ATTR_NOT_SPECIFIED,"},{"line_number":283,"context_line":"                     \u0027admin_state_up\u0027: True,"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2BzpY%3D","line":280,"in_reply_to":"AAAAM3%2F%2Bz54%3D","updated":"2013-02-18 21:23:01.000000000","message":"Good point. I interpreted a gateway port as something that belongs to the way and should be removed only with the disconnect action.\n\nIf we let a tenant own it, then the tenant could disconnect the gateway just by removing the port. Which probably is not too incorrect.\n\nI will add a TODO for this in order to reason better about it and probably come to a different solution once this patch is merged. (Unless you feel this must be fixed before merging this patch)","commit_id":"950612eba92e0d911acfb17387f2121b5f4f265e"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":277,"context_line":"                # passed in the port structure to the plugin"},{"line_number":278,"context_line":"                port \u003d self.create_port(context, {"},{"line_number":279,"context_line":"                    \u0027port\u0027:"},{"line_number":280,"context_line":"                    {\u0027tenant_id\u0027: tenant_id,"},{"line_number":281,"context_line":"                     \u0027network_id\u0027: network_id,"},{"line_number":282,"context_line":"                     \u0027mac_address\u0027: attributes.ATTR_NOT_SPECIFIED,"},{"line_number":283,"context_line":"                     \u0027admin_state_up\u0027: True,"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2Bw8k%3D","line":280,"in_reply_to":"AAAAM3%2F%2BzpY%3D","updated":"2013-02-19 18:18:57.000000000","message":"well, I\u0027m just not sure if things will work if it is an admin-owned gateway being attached to a tenant network?  Or I guess it will be fine as quantum allows admin-owned ports on networks owned by a different tenant-id?","commit_id":"950612eba92e0d911acfb17387f2121b5f4f265e"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":281,"context_line":"                     \u0027network_id\u0027: network_id,"},{"line_number":282,"context_line":"                     \u0027mac_address\u0027: attributes.ATTR_NOT_SPECIFIED,"},{"line_number":283,"context_line":"                     \u0027admin_state_up\u0027: True,"},{"line_number":284,"context_line":"                     \u0027fixed_ips\u0027: attributes.ATTR_NOT_SPECIFIED,"},{"line_number":285,"context_line":"                     \u0027device_id\u0027: network_gateway_id,"},{"line_number":286,"context_line":"                     \u0027device_owner\u0027: DEVICE_OWNER_NET_GW_INTF,"},{"line_number":287,"context_line":"                     \u0027name\u0027: \u0027\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2Bz9M%3D","line":284,"updated":"2013-02-18 19:47:15.000000000","message":"i would have thought you could just pass in an empty list to get no IPs?","commit_id":"950612eba92e0d911acfb17387f2121b5f4f265e"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":281,"context_line":"                     \u0027network_id\u0027: network_id,"},{"line_number":282,"context_line":"                     \u0027mac_address\u0027: attributes.ATTR_NOT_SPECIFIED,"},{"line_number":283,"context_line":"                     \u0027admin_state_up\u0027: True,"},{"line_number":284,"context_line":"                     \u0027fixed_ips\u0027: attributes.ATTR_NOT_SPECIFIED,"},{"line_number":285,"context_line":"                     \u0027device_id\u0027: network_gateway_id,"},{"line_number":286,"context_line":"                     \u0027device_owner\u0027: DEVICE_OWNER_NET_GW_INTF,"},{"line_number":287,"context_line":"                     \u0027name\u0027: \u0027\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2BzqM%3D","line":284,"in_reply_to":"AAAAM3%2F%2Bz9M%3D","updated":"2013-02-18 21:23:01.000000000","message":"Uhm... I think I tried it, but I will give it a second try.","commit_id":"950612eba92e0d911acfb17387f2121b5f4f265e"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":281,"context_line":"                     \u0027network_id\u0027: network_id,"},{"line_number":282,"context_line":"                     \u0027mac_address\u0027: attributes.ATTR_NOT_SPECIFIED,"},{"line_number":283,"context_line":"                     \u0027admin_state_up\u0027: True,"},{"line_number":284,"context_line":"                     \u0027fixed_ips\u0027: attributes.ATTR_NOT_SPECIFIED,"},{"line_number":285,"context_line":"                     \u0027device_id\u0027: network_gateway_id,"},{"line_number":286,"context_line":"                     \u0027device_owner\u0027: DEVICE_OWNER_NET_GW_INTF,"},{"line_number":287,"context_line":"                     \u0027name\u0027: \u0027\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2Bw8g%3D","line":284,"in_reply_to":"AAAAM3%2F%2BzqM%3D","updated":"2013-02-19 18:18:57.000000000","message":"if not, we should probably file a bug to support this use case in the future.","commit_id":"950612eba92e0d911acfb17387f2121b5f4f265e"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":307,"context_line":"            network_mapping_info[\u0027port_id\u0027] \u003d port_id"},{"line_number":308,"context_line":"            network_mapping_info[\u0027tenant_id\u0027] \u003d tenant_id"},{"line_number":309,"context_line":"            gw_db.network_connections.append("},{"line_number":310,"context_line":"                NetworkConnection(**network_mapping_info))"},{"line_number":311,"context_line":"            port_id \u003d port[\u0027id\u0027]"},{"line_number":312,"context_line":"            # now deallocate the ip from the port"},{"line_number":313,"context_line":"            for fixed_ip in port.get(\u0027fixed_ips\u0027, []):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2Bz7A%3D","line":310,"updated":"2013-02-18 19:47:15.000000000","message":"is the uniqueness constraint enforced here?  if so, does self.create_port above create a port in NVP such that it would be orphaned?  Or I guess NVP itself would raise an error due to a conflict?  I\u0027m just a bit unclear on how that is handled.","commit_id":"950612eba92e0d911acfb17387f2121b5f4f265e"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":307,"context_line":"            network_mapping_info[\u0027port_id\u0027] \u003d port_id"},{"line_number":308,"context_line":"            network_mapping_info[\u0027tenant_id\u0027] \u003d tenant_id"},{"line_number":309,"context_line":"            gw_db.network_connections.append("},{"line_number":310,"context_line":"                NetworkConnection(**network_mapping_info))"},{"line_number":311,"context_line":"            port_id \u003d port[\u0027id\u0027]"},{"line_number":312,"context_line":"            # now deallocate the ip from the port"},{"line_number":313,"context_line":"            for fixed_ip in port.get(\u0027fixed_ips\u0027, []):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2Bzog%3D","line":310,"in_reply_to":"AAAAM3%2F%2Bz7A%3D","updated":"2013-02-18 21:23:01.000000000","message":"Yes. What we are observing at the moment is a conflict from NVP.\nIdeally we would leverage the DB logic and spare the hassle of going to NVP, but then we would have the problem that we need a port_id for creating the mapping info object.\n\nI think I can easily work around this issue.","commit_id":"950612eba92e0d911acfb17387f2121b5f4f265e"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":339,"context_line":"                    network_gateway_id\u003dnetwork_gateway_id)"},{"line_number":340,"context_line":"            if len(net_connections) \u003e 1:"},{"line_number":341,"context_line":"                raise MultipleGatewayConnections("},{"line_number":342,"context_line":"                    gateway_id\u003dnetwork_gateway_id)"},{"line_number":343,"context_line":"            # Remove gateway port from network"},{"line_number":344,"context_line":"            # FIXME(salvatore-orlando): Ensure state of port in NVP is"},{"line_number":345,"context_line":"            # consistent with outcome of transaction"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2Bz7g%3D","line":342,"updated":"2013-02-18 19:47:15.000000000","message":"is this possible in normal operation, or would it indicate a bug?  if a bug, i think its find to use .one() above and deal with the 500.","commit_id":"950612eba92e0d911acfb17387f2121b5f4f265e"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":339,"context_line":"                    network_gateway_id\u003dnetwork_gateway_id)"},{"line_number":340,"context_line":"            if len(net_connections) \u003e 1:"},{"line_number":341,"context_line":"                raise MultipleGatewayConnections("},{"line_number":342,"context_line":"                    gateway_id\u003dnetwork_gateway_id)"},{"line_number":343,"context_line":"            # Remove gateway port from network"},{"line_number":344,"context_line":"            # FIXME(salvatore-orlando): Ensure state of port in NVP is"},{"line_number":345,"context_line":"            # consistent with outcome of transaction"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2Bzoc%3D","line":342,"in_reply_to":"AAAAM3%2F%2Bz7g%3D","updated":"2013-02-18 21:23:01.000000000","message":"Done","commit_id":"950612eba92e0d911acfb17387f2121b5f4f265e"}],"quantum/plugins/nicira/nicira_nvp_plugin/nvp_cluster.py":[{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":111,"context_line":"                          \"%(cluster_name)s. Network gateways operations \""},{"line_number":112,"context_line":"                          \"might not work properly in this cluster\"),"},{"line_number":113,"context_line":"                        {\u0027l2_gw_service_uuid\u0027: l2_gw_service_uuid,"},{"line_number":114,"context_line":"                         \u0027cluster_name\u0027: self.name})"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        int_keys \u003d ["},{"line_number":117,"context_line":"            \u0027port\u0027, \u0027request_timeout\u0027, \u0027http_timeout\u0027, \u0027retries\u0027, \u0027redirects\u0027]"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2Bz5s%3D","line":114,"updated":"2013-02-18 19:47:15.000000000","message":"we could even validate it by connecting to nvp, right?  same with default l3-gw.  not required for G-3. \n\nto be honest, i\u0027m still unclear on the use case for a default l2-gateway, as it seems like the only time that would make sense is if the l2-gateway was being used similar to the default-l3-gateway, but that would require someone to intelligently be mapping quantum networks to physical network vlans.","commit_id":"950612eba92e0d911acfb17387f2121b5f4f265e"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":111,"context_line":"                          \"%(cluster_name)s. Network gateways operations \""},{"line_number":112,"context_line":"                          \"might not work properly in this cluster\"),"},{"line_number":113,"context_line":"                        {\u0027l2_gw_service_uuid\u0027: l2_gw_service_uuid,"},{"line_number":114,"context_line":"                         \u0027cluster_name\u0027: self.name})"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        int_keys \u003d ["},{"line_number":117,"context_line":"            \u0027port\u0027, \u0027request_timeout\u0027, \u0027http_timeout\u0027, \u0027retries\u0027, \u0027redirects\u0027]"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAM3%2F%2BzoU%3D","line":114,"in_reply_to":"AAAAM3%2F%2Bz5s%3D","updated":"2013-02-18 21:23:01.000000000","message":"Yes, the validation could be performed in that way.\n\nAaron is working on it.","commit_id":"950612eba92e0d911acfb17387f2121b5f4f265e"}],"quantum/plugins/nicira/nicira_nvp_plugin/nvplib.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8edf5d612aba2ae847b89b81a39e0ab473d6dd54","unresolved":false,"context_lines":[{"line_number":468,"context_line":"                          cluster\u003dcluster))"},{"line_number":469,"context_line":"    except NvpApiClient.NvpApiException:"},{"line_number":470,"context_line":"        # just log and re-raise - let the caller handle it"},{"line_number":471,"context_line":"        LOG.exception(\"An exception occured while communicating with \""},{"line_number":472,"context_line":"                      \"the NVP controller for cluster:%s\", cluster.name)"},{"line_number":473,"context_line":"        raise"},{"line_number":474,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FBn8%3D","line":471,"updated":"2013-02-11 08:33:02.000000000","message":"i18n","commit_id":"25743017c4163d0361a38029179fb94f46d858b3"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":468,"context_line":"                          cluster\u003dcluster))"},{"line_number":469,"context_line":"    except NvpApiClient.NvpApiException:"},{"line_number":470,"context_line":"        # just log and re-raise - let the caller handle it"},{"line_number":471,"context_line":"        LOG.exception(\"An exception occured while communicating with \""},{"line_number":472,"context_line":"                      \"the NVP controller for cluster:%s\", cluster.name)"},{"line_number":473,"context_line":"        raise"},{"line_number":474,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FBj4%3D","line":471,"in_reply_to":"AAAAM3%2F%2FBn8%3D","updated":"2013-02-11 09:14:49.000000000","message":"Done","commit_id":"25743017c4163d0361a38029179fb94f46d858b3"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":442,"context_line":""},{"line_number":443,"context_line":"def get_l2_gw_services(cluster, tenant_id\u003dNone,"},{"line_number":444,"context_line":"                       fields\u003dNone, filters\u003dNone):"},{"line_number":445,"context_line":"    actual_filters \u003d {}"},{"line_number":446,"context_line":"    if filters:"},{"line_number":447,"context_line":"        actual_filters.update(filters)"},{"line_number":448,"context_line":"    if tenant_id:"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B2kM%3D","line":445,"updated":"2013-02-17 00:19:51.000000000","message":"actual_filters \u003d dict(filters or {})","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":442,"context_line":""},{"line_number":443,"context_line":"def get_l2_gw_services(cluster, tenant_id\u003dNone,"},{"line_number":444,"context_line":"                       fields\u003dNone, filters\u003dNone):"},{"line_number":445,"context_line":"    actual_filters \u003d {}"},{"line_number":446,"context_line":"    if filters:"},{"line_number":447,"context_line":"        actual_filters.update(filters)"},{"line_number":448,"context_line":"    if tenant_id:"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B1xs%3D","line":445,"in_reply_to":"AAAAM3%2F%2B2kM%3D","updated":"2013-02-17 23:32:45.000000000","message":"sounds definetely better","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":460,"context_line":"    if not display_name:"},{"line_number":461,"context_line":"        # Nothing to update"},{"line_number":462,"context_line":"        return gwservice_obj"},{"line_number":463,"context_line":"    gwservice_obj[\"display_name\"] \u003d (display_name or"},{"line_number":464,"context_line":"                                     gwservice_obj[\"display_name\"])"},{"line_number":465,"context_line":"    try:"},{"line_number":466,"context_line":"        return json.loads(do_single_request(\"PUT\","}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B2kI%3D","line":463,"updated":"2013-02-17 00:19:51.000000000","message":"display_name must existing to reach this line.","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":460,"context_line":"    if not display_name:"},{"line_number":461,"context_line":"        # Nothing to update"},{"line_number":462,"context_line":"        return gwservice_obj"},{"line_number":463,"context_line":"    gwservice_obj[\"display_name\"] \u003d (display_name or"},{"line_number":464,"context_line":"                                     gwservice_obj[\"display_name\"])"},{"line_number":465,"context_line":"    try:"},{"line_number":466,"context_line":"        return json.loads(do_single_request(\"PUT\","}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B1xo%3D","line":463,"in_reply_to":"AAAAM3%2F%2B2kI%3D","updated":"2013-02-17 23:32:45.000000000","message":"Done","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":935,"context_line":"                                     cluster\u003dcluster)"},{"line_number":936,"context_line":"    except NvpApiClient.ResourceNotFound as e:"},{"line_number":937,"context_line":"        LOG.error(_(\"Port or Network not found, Error: %s\"), str(e))"},{"line_number":938,"context_line":"        raise exception.PortNotFound(port_id\u003dlport_id, net_id\u003dlswitch_id)"},{"line_number":939,"context_line":"    except NvpApiClient.Conflict as e:"},{"line_number":940,"context_line":"        LOG.error(_(\"Conflict while plugging attachment into port, \""},{"line_number":941,"context_line":"                    \"Error: %s\"), str(e))"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2Bv7k%3D","line":938,"updated":"2013-02-20 00:43:58.000000000","message":"this is a tenant-facing exception... is lport_id the right thing to include here?","commit_id":"ae955a69586e98d345949560b717841075ac0017"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":939,"context_line":"    except NvpApiClient.Conflict as e:"},{"line_number":940,"context_line":"        LOG.error(_(\"Conflict while plugging attachment into port, \""},{"line_number":941,"context_line":"                    \"Error: %s\"), str(e))"},{"line_number":942,"context_line":"        raise nvp_exc.NvpPortAlreadyAttached(port_id\u003dlport_id,"},{"line_number":943,"context_line":"                                             net_id\u003dlswitch_id)"},{"line_number":944,"context_line":"    except NvpApiClient.NvpApiException as e:"},{"line_number":945,"context_line":"        raise exception.QuantumException()"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2Bv7g%3D","line":942,"updated":"2013-02-20 00:43:58.000000000","message":"same question here... or are they the same?","commit_id":"ae955a69586e98d345949560b717841075ac0017"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":939,"context_line":"    except NvpApiClient.Conflict as e:"},{"line_number":940,"context_line":"        LOG.error(_(\"Conflict while plugging attachment into port, \""},{"line_number":941,"context_line":"                    \"Error: %s\"), str(e))"},{"line_number":942,"context_line":"        raise nvp_exc.NvpPortAlreadyAttached(port_id\u003dlport_id,"},{"line_number":943,"context_line":"                                             net_id\u003dlswitch_id)"},{"line_number":944,"context_line":"    except NvpApiClient.NvpApiException as e:"},{"line_number":945,"context_line":"        raise exception.QuantumException()"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2Bv3Y%3D","line":942,"in_reply_to":"AAAAM3%2F%2Bv7g%3D","updated":"2013-02-20 01:00:34.000000000","message":"Good point (here and above).\nIn general this code should be refactored (it\u0027s legacy code - as if 2011 could be called legacy!) because catching those exception should be up to the plugin.\n\nFor this patch I will hide the lport_id detail.","commit_id":"ae955a69586e98d345949560b717841075ac0017"},{"author":{"_account_id":447,"name":"dan wendlandt","email":"dan@nicira.com","username":"danwent"},"unresolved":false,"context_lines":[{"line_number":961,"context_line":"def plug_interface(cluster, lswitch_id, port, type, attachment\u003dNone):"},{"line_number":962,"context_line":"    \"\"\" Plug a VIF Attachment object in a logical port \"\"\""},{"line_number":963,"context_line":"    lport_obj \u003d {}"},{"line_number":964,"context_line":"    if attachment:"},{"line_number":965,"context_line":"        lport_obj[\"vif_uuid\"] \u003d attachment"},{"line_number":966,"context_line":""},{"line_number":967,"context_line":"    lport_obj[\"type\"] \u003d type"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2Bv60%3D","line":964,"updated":"2013-02-20 00:43:58.000000000","message":"is it valid to call this if attachment is empty?","commit_id":"ae955a69586e98d345949560b717841075ac0017"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":961,"context_line":"def plug_interface(cluster, lswitch_id, port, type, attachment\u003dNone):"},{"line_number":962,"context_line":"    \"\"\" Plug a VIF Attachment object in a logical port \"\"\""},{"line_number":963,"context_line":"    lport_obj \u003d {}"},{"line_number":964,"context_line":"    if attachment:"},{"line_number":965,"context_line":"        lport_obj[\"vif_uuid\"] \u003d attachment"},{"line_number":966,"context_line":""},{"line_number":967,"context_line":"    lport_obj[\"type\"] \u003d type"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2Bv5o%3D","line":964,"in_reply_to":"AAAAM3%2F%2Bv60%3D","updated":"2013-02-20 01:00:34.000000000","message":"That\u0027s a valid question.\nWe have been carrying this code since the Essex version of the plugin, and now probably there no more reason to have that block and attachment as an optional parameter.\n\nI don\u0027t think it\u0027s safe to do this change in this patch. I will add a TODO, which I will follow up in another patch.","commit_id":"ae955a69586e98d345949560b717841075ac0017"}],"quantum/tests/unit/nicira/etc/fake_get_gwservice.json":[{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"20a0bdf6d041912663c57e2705116667934eed4a","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":"  \"display_name\": \"%(display_name)s\","},{"line_number":3,"context_line":"  \"_href\": \"/ws.v1/gateway-service/%(uuid)s\","},{"line_number":4,"context_line":"  \"tags\": %(tags_json)s,"},{"line_number":5,"context_line":"  \"_schema\": \"/ws.v1/schema/L2GatewayServiceConfig\","},{"line_number":6,"context_line":"  \"gateways\": ["},{"line_number":7,"context_line":"    {"}],"source_content_type":"application/json","patch_set":8,"id":"AAAAM3%2F%2B3eI%3D","line":4,"updated":"2013-02-16 00:50:13.000000000","message":"Looks like this should be in quotes like the others?","commit_id":"bc30a80d67a0e9f106cf6ebb9614f10ff15a5184"}],"quantum/tests/unit/nicira/test_networkgw.py":[{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":17,"context_line":"import contextlib"},{"line_number":18,"context_line":"import unittest2 as unittest"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import logging"},{"line_number":21,"context_line":"import mock"},{"line_number":22,"context_line":"import webtest"},{"line_number":23,"context_line":"from webob import exc"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B2kA%3D","line":20,"updated":"2013-02-17 00:19:51.000000000","message":"logging is not used in this module.  You can drop this import and line 42.","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":17,"context_line":"import contextlib"},{"line_number":18,"context_line":"import unittest2 as unittest"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import logging"},{"line_number":21,"context_line":"import mock"},{"line_number":22,"context_line":"import webtest"},{"line_number":23,"context_line":"from webob import exc"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B1xc%3D","line":20,"in_reply_to":"AAAAM3%2F%2B2kA%3D","updated":"2013-02-17 23:32:45.000000000","message":"another leftover. Sorry about that.","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"}],"quantum/tests/unit/nicira/test_nicira_plugin.py":[{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":488,"context_line":"                req \u003d self.new_list_request(nvp_networkgw.COLLECTION_NAME)"},{"line_number":489,"context_line":"                res \u003d self.deserialize(\u0027json\u0027, req.get_response(self.ext_api))"},{"line_number":490,"context_line":"                # We expect the default gateway too"},{"line_number":491,"context_line":"                self.assertEquals(len(res[\u0027%ss\u0027 % self.resource]), 3)"},{"line_number":492,"context_line":"                self.assertEquals(res[\u0027%ss\u0027 % self.resource][0][\u0027default\u0027],"},{"line_number":493,"context_line":"                                  True)"},{"line_number":494,"context_line":"                self.assertEquals(res[\u0027%ss\u0027 % self.resource][1][\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B2j8%3D","line":491,"updated":"2013-02-17 00:19:51.000000000","message":"Add \nkey \u003d self.resource + \u0027s\u0027\n\nself.assertEqual(len(res[key], 3)","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":488,"context_line":"                req \u003d self.new_list_request(nvp_networkgw.COLLECTION_NAME)"},{"line_number":489,"context_line":"                res \u003d self.deserialize(\u0027json\u0027, req.get_response(self.ext_api))"},{"line_number":490,"context_line":"                # We expect the default gateway too"},{"line_number":491,"context_line":"                self.assertEquals(len(res[\u0027%ss\u0027 % self.resource]), 3)"},{"line_number":492,"context_line":"                self.assertEquals(res[\u0027%ss\u0027 % self.resource][0][\u0027default\u0027],"},{"line_number":493,"context_line":"                                  True)"},{"line_number":494,"context_line":"                self.assertEquals(res[\u0027%ss\u0027 % self.resource][1][\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B1xY%3D","line":491,"in_reply_to":"AAAAM3%2F%2B2j8%3D","updated":"2013-02-17 23:32:45.000000000","message":"Done","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":489,"context_line":"                res \u003d self.deserialize(\u0027json\u0027, req.get_response(self.ext_api))"},{"line_number":490,"context_line":"                # We expect the default gateway too"},{"line_number":491,"context_line":"                self.assertEquals(len(res[\u0027%ss\u0027 % self.resource]), 3)"},{"line_number":492,"context_line":"                self.assertEquals(res[\u0027%ss\u0027 % self.resource][0][\u0027default\u0027],"},{"line_number":493,"context_line":"                                  True)"},{"line_number":494,"context_line":"                self.assertEquals(res[\u0027%ss\u0027 % self.resource][1][\u0027name\u0027],"},{"line_number":495,"context_line":"                                  gw1[self.resource][\u0027name\u0027])"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B2j4%3D","line":492,"updated":"2013-02-17 00:19:51.000000000","message":"self.assertTrue(res[key][0][\u0027default\u0027])","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":489,"context_line":"                res \u003d self.deserialize(\u0027json\u0027, req.get_response(self.ext_api))"},{"line_number":490,"context_line":"                # We expect the default gateway too"},{"line_number":491,"context_line":"                self.assertEquals(len(res[\u0027%ss\u0027 % self.resource]), 3)"},{"line_number":492,"context_line":"                self.assertEquals(res[\u0027%ss\u0027 % self.resource][0][\u0027default\u0027],"},{"line_number":493,"context_line":"                                  True)"},{"line_number":494,"context_line":"                self.assertEquals(res[\u0027%ss\u0027 % self.resource][1][\u0027name\u0027],"},{"line_number":495,"context_line":"                                  gw1[self.resource][\u0027name\u0027])"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B1xU%3D","line":492,"in_reply_to":"AAAAM3%2F%2B2j4%3D","updated":"2013-02-17 23:32:45.000000000","message":"Done","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":491,"context_line":"                self.assertEquals(len(res[\u0027%ss\u0027 % self.resource]), 3)"},{"line_number":492,"context_line":"                self.assertEquals(res[\u0027%ss\u0027 % self.resource][0][\u0027default\u0027],"},{"line_number":493,"context_line":"                                  True)"},{"line_number":494,"context_line":"                self.assertEquals(res[\u0027%ss\u0027 % self.resource][1][\u0027name\u0027],"},{"line_number":495,"context_line":"                                  gw1[self.resource][\u0027name\u0027])"},{"line_number":496,"context_line":"                self.assertEquals(res[\u0027%ss\u0027 % self.resource][2][\u0027name\u0027],"},{"line_number":497,"context_line":"                                  gw2[self.resource][\u0027name\u0027])"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B2j0%3D","line":494,"updated":"2013-02-17 00:19:51.000000000","message":"self.assertEqual(res[key][1][\u0027name\u0027], gw1[self.resource][\u0027name\u0027])","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":491,"context_line":"                self.assertEquals(len(res[\u0027%ss\u0027 % self.resource]), 3)"},{"line_number":492,"context_line":"                self.assertEquals(res[\u0027%ss\u0027 % self.resource][0][\u0027default\u0027],"},{"line_number":493,"context_line":"                                  True)"},{"line_number":494,"context_line":"                self.assertEquals(res[\u0027%ss\u0027 % self.resource][1][\u0027name\u0027],"},{"line_number":495,"context_line":"                                  gw1[self.resource][\u0027name\u0027])"},{"line_number":496,"context_line":"                self.assertEquals(res[\u0027%ss\u0027 % self.resource][2][\u0027name\u0027],"},{"line_number":497,"context_line":"                                  gw2[self.resource][\u0027name\u0027])"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B1xQ%3D","line":494,"in_reply_to":"AAAAM3%2F%2B2j0%3D","updated":"2013-02-17 23:32:45.000000000","message":"Done","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":493,"context_line":"                                  True)"},{"line_number":494,"context_line":"                self.assertEquals(res[\u0027%ss\u0027 % self.resource][1][\u0027name\u0027],"},{"line_number":495,"context_line":"                                  gw1[self.resource][\u0027name\u0027])"},{"line_number":496,"context_line":"                self.assertEquals(res[\u0027%ss\u0027 % self.resource][2][\u0027name\u0027],"},{"line_number":497,"context_line":"                                  gw2[self.resource][\u0027name\u0027])"},{"line_number":498,"context_line":""},{"line_number":499,"context_line":"    def test_delete_network_gateway(self):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B2jw%3D","line":496,"updated":"2013-02-17 00:19:51.000000000","message":"self.assertEqual(res[key][2][\u0027name\u0027], gw2[self.resource][\u0027name\u0027])","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":493,"context_line":"                                  True)"},{"line_number":494,"context_line":"                self.assertEquals(res[\u0027%ss\u0027 % self.resource][1][\u0027name\u0027],"},{"line_number":495,"context_line":"                                  gw1[self.resource][\u0027name\u0027])"},{"line_number":496,"context_line":"                self.assertEquals(res[\u0027%ss\u0027 % self.resource][2][\u0027name\u0027],"},{"line_number":497,"context_line":"                                  gw2[self.resource][\u0027name\u0027])"},{"line_number":498,"context_line":""},{"line_number":499,"context_line":"    def test_delete_network_gateway(self):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B1xM%3D","line":496,"in_reply_to":"AAAAM3%2F%2B2jw%3D","updated":"2013-02-17 23:32:45.000000000","message":"Done","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"}],"quantum/tests/unit/nicira/test_nvplib.py":[{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":15,"context_line":"#"},{"line_number":16,"context_line":"# @author: Salvatore Orlando, VMware"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import json"},{"line_number":19,"context_line":"import logging"},{"line_number":20,"context_line":"import os"},{"line_number":21,"context_line":"import unittest2 as unittest"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B2jk%3D","line":18,"updated":"2013-02-17 00:19:51.000000000","message":"from openstack.common import jsonutils as json","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":15,"context_line":"#"},{"line_number":16,"context_line":"# @author: Salvatore Orlando, VMware"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import json"},{"line_number":19,"context_line":"import logging"},{"line_number":20,"context_line":"import os"},{"line_number":21,"context_line":"import unittest2 as unittest"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B1xI%3D","line":18,"in_reply_to":"AAAAM3%2F%2B2jk%3D","updated":"2013-02-17 23:32:45.000000000","message":"Done","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":16,"context_line":"# @author: Salvatore Orlando, VMware"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import json"},{"line_number":19,"context_line":"import logging"},{"line_number":20,"context_line":"import os"},{"line_number":21,"context_line":"import unittest2 as unittest"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B2jo%3D","line":19,"updated":"2013-02-17 00:19:51.000000000","message":"logging is not used, so it can be removed","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":16,"context_line":"# @author: Salvatore Orlando, VMware"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import json"},{"line_number":19,"context_line":"import logging"},{"line_number":20,"context_line":"import os"},{"line_number":21,"context_line":"import unittest2 as unittest"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B1xE%3D","line":19,"in_reply_to":"AAAAM3%2F%2B2jo%3D","updated":"2013-02-17 23:32:45.000000000","message":"Done","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":78,"context_line":"        self.assertEquals(response.get(\u0027type\u0027), \u0027L2GatewayServiceConfig\u0027)"},{"line_number":79,"context_line":"        self.assertEquals(response.get(\u0027display_name\u0027), display_name)"},{"line_number":80,"context_line":"        gateways \u003d response.get(\u0027gateways\u0027, [])"},{"line_number":81,"context_line":"        self.assertEquals(len(gateways), 1)"},{"line_number":82,"context_line":"        self.assertEquals(gateways[0][\u0027type\u0027], \u0027L2Gateway\u0027)"},{"line_number":83,"context_line":"        self.assertEquals(gateways[0][\u0027device_id\u0027], \u0027xxx\u0027)"},{"line_number":84,"context_line":"        self.assertEquals(gateways[0][\u0027transport_node_uuid\u0027], node_uuid)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B2jg%3D","line":81,"updated":"2013-02-17 00:19:51.000000000","message":"self.assertEqual()","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"unresolved":false,"context_lines":[{"line_number":78,"context_line":"        self.assertEquals(response.get(\u0027type\u0027), \u0027L2GatewayServiceConfig\u0027)"},{"line_number":79,"context_line":"        self.assertEquals(response.get(\u0027display_name\u0027), display_name)"},{"line_number":80,"context_line":"        gateways \u003d response.get(\u0027gateways\u0027, [])"},{"line_number":81,"context_line":"        self.assertEquals(len(gateways), 1)"},{"line_number":82,"context_line":"        self.assertEquals(gateways[0][\u0027type\u0027], \u0027L2Gateway\u0027)"},{"line_number":83,"context_line":"        self.assertEquals(gateways[0][\u0027device_id\u0027], \u0027xxx\u0027)"},{"line_number":84,"context_line":"        self.assertEquals(gateways[0][\u0027transport_node_uuid\u0027], node_uuid)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B1xA%3D","line":81,"in_reply_to":"AAAAM3%2F%2B2jg%3D","updated":"2013-02-17 23:32:45.000000000","message":"Sorry I though I already did this replacement.","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":79,"context_line":"        self.assertEquals(response.get(\u0027display_name\u0027), display_name)"},{"line_number":80,"context_line":"        gateways \u003d response.get(\u0027gateways\u0027, [])"},{"line_number":81,"context_line":"        self.assertEquals(len(gateways), 1)"},{"line_number":82,"context_line":"        self.assertEquals(gateways[0][\u0027type\u0027], \u0027L2Gateway\u0027)"},{"line_number":83,"context_line":"        self.assertEquals(gateways[0][\u0027device_id\u0027], \u0027xxx\u0027)"},{"line_number":84,"context_line":"        self.assertEquals(gateways[0][\u0027transport_node_uuid\u0027], node_uuid)"},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B2jc%3D","line":82,"updated":"2013-02-17 00:19:51.000000000","message":"self.assertEqual()","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":80,"context_line":"        gateways \u003d response.get(\u0027gateways\u0027, [])"},{"line_number":81,"context_line":"        self.assertEquals(len(gateways), 1)"},{"line_number":82,"context_line":"        self.assertEquals(gateways[0][\u0027type\u0027], \u0027L2Gateway\u0027)"},{"line_number":83,"context_line":"        self.assertEquals(gateways[0][\u0027device_id\u0027], \u0027xxx\u0027)"},{"line_number":84,"context_line":"        self.assertEquals(gateways[0][\u0027transport_node_uuid\u0027], node_uuid)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def test_update_l2_gw_service(self):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B2jY%3D","line":83,"updated":"2013-02-17 00:19:51.000000000","message":"self.assertEqual()","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":81,"context_line":"        self.assertEquals(len(gateways), 1)"},{"line_number":82,"context_line":"        self.assertEquals(gateways[0][\u0027type\u0027], \u0027L2Gateway\u0027)"},{"line_number":83,"context_line":"        self.assertEquals(gateways[0][\u0027device_id\u0027], \u0027xxx\u0027)"},{"line_number":84,"context_line":"        self.assertEquals(gateways[0][\u0027transport_node_uuid\u0027], node_uuid)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def test_update_l2_gw_service(self):"},{"line_number":87,"context_line":"        display_name \u003d \u0027fake-gateway\u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B2jU%3D","line":84,"updated":"2013-02-17 00:19:51.000000000","message":"self.assertEqual()","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":91,"context_line":"        gw_id \u003d res1[\u0027uuid\u0027]"},{"line_number":92,"context_line":"        res2 \u003d nvplib.update_l2_gw_service(self.fake_cluster, gw_id,"},{"line_number":93,"context_line":"                                           new_display_name)"},{"line_number":94,"context_line":"        self.assertEquals(res2[\u0027display_name\u0027], new_display_name)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def test_get_l2_gw_service(self):"},{"line_number":97,"context_line":"        display_name \u003d \u0027fake-gateway\u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B2jQ%3D","line":94,"updated":"2013-02-17 00:19:51.000000000","message":"self.assertEqual()","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":98,"context_line":"        node_uuid \u003d _uuid()"},{"line_number":99,"context_line":"        gw_id \u003d self._create_gw_service(node_uuid, display_name)[\u0027uuid\u0027]"},{"line_number":100,"context_line":"        response \u003d nvplib.get_l2_gw_service(self.fake_cluster, gw_id)"},{"line_number":101,"context_line":"        self.assertEquals(response.get(\u0027type\u0027), \u0027L2GatewayServiceConfig\u0027)"},{"line_number":102,"context_line":"        self.assertEquals(response.get(\u0027display_name\u0027), display_name)"},{"line_number":103,"context_line":"        self.assertEquals(response.get(\u0027uuid\u0027), gw_id)"},{"line_number":104,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B2jM%3D","line":101,"updated":"2013-02-17 00:19:51.000000000","message":"self.assertEqual()","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":99,"context_line":"        gw_id \u003d self._create_gw_service(node_uuid, display_name)[\u0027uuid\u0027]"},{"line_number":100,"context_line":"        response \u003d nvplib.get_l2_gw_service(self.fake_cluster, gw_id)"},{"line_number":101,"context_line":"        self.assertEquals(response.get(\u0027type\u0027), \u0027L2GatewayServiceConfig\u0027)"},{"line_number":102,"context_line":"        self.assertEquals(response.get(\u0027display_name\u0027), display_name)"},{"line_number":103,"context_line":"        self.assertEquals(response.get(\u0027uuid\u0027), gw_id)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def test_list_l2_gw_service(self):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B2jI%3D","line":102,"updated":"2013-02-17 00:19:51.000000000","message":"self.assertEqual()","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":100,"context_line":"        response \u003d nvplib.get_l2_gw_service(self.fake_cluster, gw_id)"},{"line_number":101,"context_line":"        self.assertEquals(response.get(\u0027type\u0027), \u0027L2GatewayServiceConfig\u0027)"},{"line_number":102,"context_line":"        self.assertEquals(response.get(\u0027display_name\u0027), display_name)"},{"line_number":103,"context_line":"        self.assertEquals(response.get(\u0027uuid\u0027), gw_id)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def test_list_l2_gw_service(self):"},{"line_number":106,"context_line":"        gw_ids \u003d []"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B2jE%3D","line":103,"updated":"2013-02-17 00:19:51.000000000","message":"self.assertEqual()","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":107,"context_line":"        for name in (\u0027fake-1\u0027, \u0027fake-2\u0027):"},{"line_number":108,"context_line":"            gw_ids.append(self._create_gw_service(_uuid(), name)[\u0027uuid\u0027])"},{"line_number":109,"context_line":"        results \u003d nvplib.get_l2_gw_services(self.fake_cluster)"},{"line_number":110,"context_line":"        self.assertEqual(len(results), 2)"},{"line_number":111,"context_line":"        self.assertItemsEqual(gw_ids, [r[\u0027uuid\u0027] for r in results])"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def test_delete_l2_gw_service(self):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B2jA%3D","line":110,"updated":"2013-02-17 00:19:51.000000000","message":"self.assertEqual()","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":116,"context_line":"        gw_id \u003d self._create_gw_service(node_uuid, display_name)[\u0027uuid\u0027]"},{"line_number":117,"context_line":"        nvplib.delete_l2_gw_service(self.fake_cluster, gw_id)"},{"line_number":118,"context_line":"        results \u003d nvplib.get_l2_gw_services(self.fake_cluster)"},{"line_number":119,"context_line":"        self.assertEqual(len(results), 0)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def test_plug_l2_gw_port_attachment(self):"},{"line_number":122,"context_line":"        tenant_id \u003d \u0027pippo\u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B2i8%3D","line":119,"updated":"2013-02-17 00:19:51.000000000","message":"self.assertFalse(results)","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"unresolved":false,"context_lines":[{"line_number":143,"context_line":"            nvplib.do_single_request(\"GET\", uri,"},{"line_number":144,"context_line":"                                     cluster\u003dself.fake_cluster))"},{"line_number":145,"context_line":"        self.assertIn(\u0027LogicalPortAttachment\u0027, resp_obj)"},{"line_number":146,"context_line":"        self.assertEquals(resp_obj[\u0027LogicalPortAttachment\u0027][\u0027type\u0027],"},{"line_number":147,"context_line":"                          \u0027L2GatewayAttachment\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2B2i4%3D","line":146,"updated":"2013-02-17 00:19:51.000000000","message":"self.assertEqual()","commit_id":"8f7f336fa241cd7cdc091ce2bc9cd00cf86c0bc5"}]}
