)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"331b5a515f628a6f66ae63f8726af308dcbf5e92","unresolved":false,"context_lines":[{"line_number":10,"context_line":"\"mac-spoofing-only\"]."},{"line_number":11,"context_line":"This extension should work with port-sec."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"DocImpact"},{"line_number":14,"context_line":"APIImpact"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Partially Implements: blueprint vm-without-l3-address"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"7a740942_c8adda32","line":13,"updated":"2015-12-04 01:16:26.000000000","message":"Please follow guidelines as detailed here:\n\nhttp://lists.openstack.org/pipermail/openstack-dev/2015-November/080294.html\n\n\"you will need to add a description whenever you add a DocImpact flag in your commit message.\"","commit_id":"f47ca4f8d37d7105c1e346637256b163ed2f9d54"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"1df29564078da06bb93327a1978a2f0e8c13c96e","unresolved":false,"context_lines":[{"line_number":10,"context_line":"\"mac-spoofing-only\"]."},{"line_number":11,"context_line":"This extension should work with port-sec."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"DocImpact"},{"line_number":14,"context_line":"APIImpact"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Partially Implements: blueprint vm-without-l3-address"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"7a740942_4799d06d","line":13,"in_reply_to":"7a740942_c8adda32","updated":"2015-12-04 05:36:13.000000000","message":"Done","commit_id":"f47ca4f8d37d7105c1e346637256b163ed2f9d54"},{"author":{"_account_id":7244,"name":"Victor Howard","email":"victor.r.howard@gmail.com","username":"vichoward"},"change_message_id":"b3a344662841f62432df7508f44bb321c1ab3ba0","unresolved":false,"context_lines":[{"line_number":15,"context_line":"\u0027mac-spoofing-only\u0027 indicates that port_security works just in L2."},{"line_number":16,"context_line":"when port_security_enabled is False, limit_portsec_domain must be set to \u0027\u0027."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"This patch add the API for this attribute."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"DocImpact: Add a description for limit_portsec_domain"},{"line_number":21,"context_line":"APIImpact"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"fa69d971_893119a5","line":18,"range":{"start_line":18,"start_character":11,"end_line":18,"end_character":14},"updated":"2015-12-30 15:23:00.000000000","message":"will add?","commit_id":"a96f7e5261e69a2b05af8586a1f7fa15d5c2ec0f"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"36d50f54fff3b8ab410fd6409d3d8ab6b998d6e0","unresolved":false,"context_lines":[{"line_number":15,"context_line":"\u0027mac-spoofing-only\u0027 indicates that port_security works just in L2."},{"line_number":16,"context_line":"when port_security_enabled is False, limit_portsec_domain must be set to \u0027\u0027."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"This patch add the API for this attribute."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"DocImpact: Add a description for limit_portsec_domain"},{"line_number":21,"context_line":"APIImpact"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"fa69d971_00a2a1ae","line":18,"range":{"start_line":18,"start_character":11,"end_line":18,"end_character":14},"in_reply_to":"fa69d971_893119a5","updated":"2016-01-04 06:43:51.000000000","message":"Done","commit_id":"a96f7e5261e69a2b05af8586a1f7fa15d5c2ec0f"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"dfc2412e99e2ba5508e07a861e56dffecd13b5d6","unresolved":false,"context_lines":[{"line_number":13,"context_line":"from API."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"When the plugin not support this attr, the attr would be filled with"},{"line_number":16,"context_line":"\u0027not-support\u0027 automatically. If user set it from API, there will be"},{"line_number":17,"context_line":"exception raised."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"When the plugin support the attr:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"da6ed579_817313b4","line":16,"range":{"start_line":16,"start_character":14,"end_line":16,"end_character":27},"updated":"2016-01-18 14:33:59.000000000","message":"I see two issues with the defined convention:\n\n1) what\u0027s the value of \u0027not-support\u0027, what will be done with \u0027not-support\u0027 if the plugin is updated to support the new attribute in the future?\n\nUsing \u0027all\u0027 matches what you do when portsecurity is off.\n\nI agree, an exception seems reasonable when the field tries to be set in a plugin not supporting it.\n\n2) it\u0027s confusing, you define \"limit_portsec_domain\" as a subtraction to the filters of default portsec:\n\n\na) none -\u003e you do nothing (so port sec works in full L2+L3)\nb) all -\u003e you subtract all (port sec filters nothing)\nc) mac-spoofing-only -\u003e if this was subtractive as a \u0026 b it would mean: \"port sec works only in L3\", but instead it works in \"L2\" you changed the logic.\n\n\n\n\nPlease, include a devref document (doc/source/devref/) in this commit, explaining how port security fields would be handled exactly from now on, and I\u0027d advise to change the semantics:\n\nInstead of limit_portsec_domain I\u0027d advise:\n\nlimited_portsec:\n\n* \"none\" \u003d\u003e no filtering \u003d\u003d port_sec \u003d False\n* \"full\" or \"all\" \u003d\u003e L2 + L3 filtering, all features on (only acceptable when portsec\u003dTrue)\n* \"mac-spoofing-only\" \u003d\u003e L2 macs address filter (only acceptable when portsec \u003d True, and the feature is supported by plugin).","commit_id":"20ccffa3f08927a998700a8664cbee1e618afac7"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"b2c91afa52f01b0bd2b1f07cfe7ba75d35af5f3b","unresolved":false,"context_lines":[{"line_number":13,"context_line":"from API."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"When the plugin not support this attr, the attr would be filled with"},{"line_number":16,"context_line":"\u0027not-support\u0027 automatically. If user set it from API, there will be"},{"line_number":17,"context_line":"exception raised."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"When the plugin support the attr:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"ba63e191_c4e70111","line":16,"range":{"start_line":16,"start_character":14,"end_line":16,"end_character":27},"in_reply_to":"da6ed579_817313b4","updated":"2016-01-19 03:20:03.000000000","message":"Thanks Ajo for your detailed comments. I will add devref to clarify it.\n\n1) \u0027not-support\u0027 is the values stored in limit-portsec columns of portsecuritybinding/networksecuritybind db tables. \n\nmy current db update code for limit-portsec in 1864b5442c82_limit_portsec.py will assume the plugin support the attr, and fill it with \u0027all\u0027/\u0027none\u0027 if portsec is true/false.\n\nI want \u0027not-support\u0027 will only be showed in port/network dict to indicate that user could not set that attr from API.\nWhen the plugin updated support limited-portsec, dict will show the real value read from the db. I will update this logic.\n\n\n2) yes, my previous definition is wrong is semantics. will follow your advice on limited_portsec. limit_portsec_domain should not be a subtraction any more.","commit_id":"20ccffa3f08927a998700a8664cbee1e618afac7"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"2ae70e098b7a4e04ac0828990840f7e2cdb5a17a","unresolved":false,"context_lines":[{"line_number":12,"context_line":"could set [\u0027full\u0027, \u0027mac-spoofing-only\u0027] from API."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"When the plugin not support this new attr, it will be fill by \u0027not-support\u0027"},{"line_number":15,"context_line":"automatically. And if user set it from API, there will be exception raised."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"When the plugin support the attr:"},{"line_number":18,"context_line":"    - limit-portsec works only when port_security_enabled is True."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":25,"id":"5a5ae5dd_f66de904","line":15,"updated":"2016-02-04 04:52:43.000000000","message":"why don\u0027t you introduce another extension, so that it can be queried in a usual way?","commit_id":"50615b3e7d52bf2f0dd41fb89abc223ea04dcb23"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"241f1df440e78ddf66ca54d18350ea7a6c6e125b","unresolved":false,"context_lines":[{"line_number":12,"context_line":"could set [\u0027full\u0027, \u0027mac-spoofing-only\u0027] from API."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"When the plugin not support this new attr, it will be fill by \u0027not-support\u0027"},{"line_number":15,"context_line":"automatically. And if user set it from API, there will be exception raised."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"When the plugin support the attr:"},{"line_number":18,"context_line":"    - limit-portsec works only when port_security_enabled is True."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":25,"id":"dae33548_f05bee2c","line":15,"in_reply_to":"5a5ae5dd_f66de904","updated":"2016-02-15 03:35:07.000000000","message":"I tried, but it\u0027s difficult to deal with the dependency between the port-sec and limited-portsec.\nfor example, if they share the same db table, which extension will be responsible to create the new row, portsec or the limited-portsec, and furthermore, the extended order would be important for them, we need add some conflict verification code into both of them.","commit_id":"50615b3e7d52bf2f0dd41fb89abc223ea04dcb23"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"35edb05b38dbec7e8a098bcd85f716999fa6a996","unresolved":false,"context_lines":[{"line_number":12,"context_line":"could set [\u0027full\u0027, \u0027mac-spoofing-only\u0027] from API."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"When the plugin not support this new attr, it will be fill by \u0027not-support\u0027"},{"line_number":15,"context_line":"automatically. And if user set it from API, there will be exception raised."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"When the plugin support the attr:"},{"line_number":18,"context_line":"    - limit-portsec works only when port_security_enabled is True."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":25,"id":"5aef4532_c90409c2","line":15,"in_reply_to":"dae33548_e33b189b","updated":"2016-03-08 08:38:46.000000000","message":"i haven\u0027t investigated if framework changes are necessary.\nbut if necessary, yes.","commit_id":"50615b3e7d52bf2f0dd41fb89abc223ea04dcb23"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"85f53439d5f6ab12bf54f2fc677b6d02f69497dd","unresolved":false,"context_lines":[{"line_number":12,"context_line":"could set [\u0027full\u0027, \u0027mac-spoofing-only\u0027] from API."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"When the plugin not support this new attr, it will be fill by \u0027not-support\u0027"},{"line_number":15,"context_line":"automatically. And if user set it from API, there will be exception raised."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"When the plugin support the attr:"},{"line_number":18,"context_line":"    - limit-portsec works only when port_security_enabled is True."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":25,"id":"dae33548_f84e2795","line":15,"in_reply_to":"dae33548_f05bee2c","updated":"2016-02-15 05:37:53.000000000","message":"what\u0027s wrong with having a single extension driver, which provides both extensions?","commit_id":"50615b3e7d52bf2f0dd41fb89abc223ea04dcb23"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"f5ad277087aed8732b65e0ae827601fd6fc16854","unresolved":false,"context_lines":[{"line_number":12,"context_line":"could set [\u0027full\u0027, \u0027mac-spoofing-only\u0027] from API."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"When the plugin not support this new attr, it will be fill by \u0027not-support\u0027"},{"line_number":15,"context_line":"automatically. And if user set it from API, there will be exception raised."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"When the plugin support the attr:"},{"line_number":18,"context_line":"    - limit-portsec works only when port_security_enabled is True."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":25,"id":"dae33548_e33b189b","line":15,"in_reply_to":"dae33548_f84e2795","updated":"2016-02-15 06:05:01.000000000","message":"If we implement it with an individual extension, when the ml2 extension driver loader try to load the two extensions according to the config file, it will load twice the same driver.\nAnd also when actual extending process, this driver will called twice, for limited-portsec and portsec separately.\nDo you mean update the framework?","commit_id":"50615b3e7d52bf2f0dd41fb89abc223ea04dcb23"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"b91f561b8994d55439131637f058bc088572d4c4","unresolved":false,"context_lines":[{"line_number":18,"context_line":"    - limit-portsec works only when port_security_enabled is True."},{"line_number":19,"context_line":"        Value \u0027full\u0027 indicates that port_security works both in L2 and"},{"line_number":20,"context_line":"        L3, which means none limitation as before;"},{"line_number":21,"context_line":"        Value \u0027mac-spoofing-only\u0027 indicates that limit port_security"},{"line_number":22,"context_line":"        works only in L2 domain."},{"line_number":23,"context_line":"    - When port_security_enabled is False, limit_portsec_domain will be"},{"line_number":24,"context_line":"      auto set to \u0027none\u0027 automatically in background."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":25,"id":"5a5ae5dd_ad866fb7","line":21,"updated":"2016-02-03 10:18:55.000000000","message":"I wonder if we should actually just call this \u0027l2-only\u0027 since that\u0027s what we want it to indicate. That way if we have other L2 only protection mechanisms in the future (e.g. MAC-based ACLs, frame type filters, etc) this value will still make sense.","commit_id":"50615b3e7d52bf2f0dd41fb89abc223ea04dcb23"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"2ae70e098b7a4e04ac0828990840f7e2cdb5a17a","unresolved":false,"context_lines":[{"line_number":18,"context_line":"    - limit-portsec works only when port_security_enabled is True."},{"line_number":19,"context_line":"        Value \u0027full\u0027 indicates that port_security works both in L2 and"},{"line_number":20,"context_line":"        L3, which means none limitation as before;"},{"line_number":21,"context_line":"        Value \u0027mac-spoofing-only\u0027 indicates that limit port_security"},{"line_number":22,"context_line":"        works only in L2 domain."},{"line_number":23,"context_line":"    - When port_security_enabled is False, limit_portsec_domain will be"},{"line_number":24,"context_line":"      auto set to \u0027none\u0027 automatically in background."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":25,"id":"5a5ae5dd_02b880e4","line":21,"in_reply_to":"5a5ae5dd_ad866fb7","updated":"2016-02-04 04:52:43.000000000","message":"+1","commit_id":"50615b3e7d52bf2f0dd41fb89abc223ea04dcb23"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"241f1df440e78ddf66ca54d18350ea7a6c6e125b","unresolved":false,"context_lines":[{"line_number":18,"context_line":"    - limit-portsec works only when port_security_enabled is True."},{"line_number":19,"context_line":"        Value \u0027full\u0027 indicates that port_security works both in L2 and"},{"line_number":20,"context_line":"        L3, which means none limitation as before;"},{"line_number":21,"context_line":"        Value \u0027mac-spoofing-only\u0027 indicates that limit port_security"},{"line_number":22,"context_line":"        works only in L2 domain."},{"line_number":23,"context_line":"    - When port_security_enabled is False, limit_portsec_domain will be"},{"line_number":24,"context_line":"      auto set to \u0027none\u0027 automatically in background."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":25,"id":"dae33548_904b8259","line":21,"in_reply_to":"5a5ae5dd_ad866fb7","updated":"2016-02-15 03:35:07.000000000","message":"Done","commit_id":"50615b3e7d52bf2f0dd41fb89abc223ea04dcb23"}],"doc/source/devref/limited_portsec.rst":[{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"16c9903c5f4efd3f0fee6016c6a5b59eaacdaf5c","unresolved":false,"context_lines":[{"line_number":37,"context_line":"True/False. It just works as a fine-grained portsecurity and only subdivide the"},{"line_number":38,"context_line":"portsecurity when portsecurity is True."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"limited-portsec is implemented inside of portsecurity extension. Like"},{"line_number":41,"context_line":"portsecurity, it also exists in network and port, and the value of port\u0027s"},{"line_number":42,"context_line":"limit_portsec_domain inherits by default from the network which include the"},{"line_number":43,"context_line":"port."}],"source_content_type":"text/x-rst","patch_set":18,"id":"9a68dd71_7c9033ed","line":40,"range":{"start_line":40,"start_character":0,"end_line":40,"end_character":63},"updated":"2016-01-20 16:22:15.000000000","message":"In case of ML2 plugin, limited-portsec is implemented inside of portsecurity extension driver.","commit_id":"923702b544f887469cace563f2b92d491e7a65a4"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"29340420220228a18eb1296f4fe45a4cc32333b1","unresolved":false,"context_lines":[{"line_number":37,"context_line":"True/False. It just works as a fine-grained portsecurity and only subdivide the"},{"line_number":38,"context_line":"portsecurity when portsecurity is True."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"limited-portsec is implemented inside of portsecurity extension. Like"},{"line_number":41,"context_line":"portsecurity, it also exists in network and port, and the value of port\u0027s"},{"line_number":42,"context_line":"limit_portsec_domain inherits by default from the network which include the"},{"line_number":43,"context_line":"port."}],"source_content_type":"text/x-rst","patch_set":18,"id":"9a68dd71_76d59541","line":40,"range":{"start_line":40,"start_character":0,"end_line":40,"end_character":63},"in_reply_to":"9a68dd71_7c9033ed","updated":"2016-01-21 02:51:20.000000000","message":"right, thanks for pointing it out. will update it.","commit_id":"923702b544f887469cace563f2b92d491e7a65a4"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"b91f561b8994d55439131637f058bc088572d4c4","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"limited portsecurity is introduced as a supplement to the current portsecurity"},{"line_number":28,"context_line":"extension. The current portsecurity works not only for L2 but also for L3 which"},{"line_number":29,"context_line":"based on IP address. Value True and False make it work like everyting or"},{"line_number":30,"context_line":"nothing.  limited-portsec subdivide the portsecurity, and make user could set"},{"line_number":31,"context_line":"it only work in L2 when port don\u0027t has a ip address. Based on the new attribute"},{"line_number":32,"context_line":"in port, agent or agentless controller could remove the IP related rules while"}],"source_content_type":"text/x-rst","patch_set":25,"id":"5a5ae5dd_0dbc636b","line":29,"updated":"2016-02-03 10:18:55.000000000","message":"everything","commit_id":"50615b3e7d52bf2f0dd41fb89abc223ea04dcb23"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"241f1df440e78ddf66ca54d18350ea7a6c6e125b","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"limited portsecurity is introduced as a supplement to the current portsecurity"},{"line_number":28,"context_line":"extension. The current portsecurity works not only for L2 but also for L3 which"},{"line_number":29,"context_line":"based on IP address. Value True and False make it work like everyting or"},{"line_number":30,"context_line":"nothing.  limited-portsec subdivide the portsecurity, and make user could set"},{"line_number":31,"context_line":"it only work in L2 when port don\u0027t has a ip address. Based on the new attribute"},{"line_number":32,"context_line":"in port, agent or agentless controller could remove the IP related rules while"}],"source_content_type":"text/x-rst","patch_set":25,"id":"dae33548_f072ceac","line":29,"in_reply_to":"5a5ae5dd_0dbc636b","updated":"2016-02-15 03:35:07.000000000","message":"Done","commit_id":"50615b3e7d52bf2f0dd41fb89abc223ea04dcb23"}],"neutron/db/migration/alembic_migrations/versions/mitaka/expand/1864b5442c82_limit_portsec.py":[{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"c7a4d4e888cd9a905c6459ebc16656e7499f24ec","unresolved":false,"context_lines":[{"line_number":32,"context_line":"def upgrade():"},{"line_number":33,"context_line":"    op.add_column(\u0027networksecuritybindings\u0027, sa.Column(\u0027limit_portsec_domain\u0027,"},{"line_number":34,"context_line":"                          sa.String(20), nullable\u003dFalse, server_default\u003d\u0027ALL\u0027))"},{"line_number":35,"context_line":"    op.add_column(\u0027portsecuritybindings\u0027, sa.Column(\u0027limit_portsec_domain\u0027,"},{"line_number":36,"context_line":"                          sa.String(20), nullable\u003dFalse, server_default\u003d\u0027ALL\u0027))"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a740942_94e62fae","line":35,"updated":"2015-12-09 10:57:27.000000000","message":"This also makes me think this should be included in the port security extension.","commit_id":"56342982b22dcb4e3de510e950b5a77ae60759f0"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"b91f561b8994d55439131637f058bc088572d4c4","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    op.add_column(\u0027networksecuritybindings\u0027, sa.Column(\u0027limit_portsec_domain\u0027,"},{"line_number":37,"context_line":"        enum, nullable\u003dTrue, server_default\u003d\u0027full\u0027))"},{"line_number":38,"context_line":"    op.add_column(\u0027portsecuritybindings\u0027, sa.Column(\u0027limit_portsec_domain\u0027,"},{"line_number":39,"context_line":"        enum, nullable\u003dTrue, server_default\u003d\u0027full\u0027))"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    # update limit_portsec_domain of the existing rows to \u0027none\u0027 when"},{"line_number":42,"context_line":"    # port_security_enabled is False, treat it as plugin supports limit-portsec"}],"source_content_type":"text/x-python","patch_set":25,"id":"5a5ae5dd_4d933bfb","line":39,"updated":"2016-02-03 10:18:55.000000000","message":"These probably shouldn\u0027t be nullable.","commit_id":"50615b3e7d52bf2f0dd41fb89abc223ea04dcb23"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"241f1df440e78ddf66ca54d18350ea7a6c6e125b","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    op.add_column(\u0027networksecuritybindings\u0027, sa.Column(\u0027limit_portsec_domain\u0027,"},{"line_number":37,"context_line":"        enum, nullable\u003dTrue, server_default\u003d\u0027full\u0027))"},{"line_number":38,"context_line":"    op.add_column(\u0027portsecuritybindings\u0027, sa.Column(\u0027limit_portsec_domain\u0027,"},{"line_number":39,"context_line":"        enum, nullable\u003dTrue, server_default\u003d\u0027full\u0027))"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    # update limit_portsec_domain of the existing rows to \u0027none\u0027 when"},{"line_number":42,"context_line":"    # port_security_enabled is False, treat it as plugin supports limit-portsec"}],"source_content_type":"text/x-python","patch_set":25,"id":"dae33548_5068daba","line":39,"in_reply_to":"5a5ae5dd_4d933bfb","updated":"2016-02-15 03:35:07.000000000","message":"Done","commit_id":"50615b3e7d52bf2f0dd41fb89abc223ea04dcb23"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"b91f561b8994d55439131637f058bc088572d4c4","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        enum, nullable\u003dTrue, server_default\u003d\u0027full\u0027))"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    # update limit_portsec_domain of the existing rows to \u0027none\u0027 when"},{"line_number":42,"context_line":"    # port_security_enabled is False, treat it as plugin supports limit-portsec"},{"line_number":43,"context_line":"    op.execute(\u0027UPDATE networksecuritybindings SET limit_portsec_domain\u003d\u0027"},{"line_number":44,"context_line":"               \u0027\\\u0027none\\\u0027 WHERE port_security_enabled is False;\u0027)"},{"line_number":45,"context_line":"    op.execute(\u0027UPDATE portsecuritybindings SET limit_portsec_domain\u003d\\\u0027none\\\u0027\u0027"}],"source_content_type":"text/x-python","patch_set":25,"id":"5a5ae5dd_6d9077ed","line":42,"updated":"2016-02-03 10:18:55.000000000","message":"These update statements should be converted into sqlalchemy statements so we don\u0027t have to worry about this query being incompatible with a different database backend.","commit_id":"50615b3e7d52bf2f0dd41fb89abc223ea04dcb23"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"241f1df440e78ddf66ca54d18350ea7a6c6e125b","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        enum, nullable\u003dTrue, server_default\u003d\u0027full\u0027))"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    # update limit_portsec_domain of the existing rows to \u0027none\u0027 when"},{"line_number":42,"context_line":"    # port_security_enabled is False, treat it as plugin supports limit-portsec"},{"line_number":43,"context_line":"    op.execute(\u0027UPDATE networksecuritybindings SET limit_portsec_domain\u003d\u0027"},{"line_number":44,"context_line":"               \u0027\\\u0027none\\\u0027 WHERE port_security_enabled is False;\u0027)"},{"line_number":45,"context_line":"    op.execute(\u0027UPDATE portsecuritybindings SET limit_portsec_domain\u003d\\\u0027none\\\u0027\u0027"}],"source_content_type":"text/x-python","patch_set":25,"id":"dae33548_56545253","line":42,"in_reply_to":"5a5ae5dd_6d9077ed","updated":"2016-02-15 03:35:07.000000000","message":"for update, I searched the migration python file, but just see this kind of writing.","commit_id":"50615b3e7d52bf2f0dd41fb89abc223ea04dcb23"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"44425012b31e58dc0ffa335297bb5310ff311640","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        enum, nullable\u003dTrue, server_default\u003d\u0027full\u0027))"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    # update limit_portsec_domain of the existing rows to \u0027none\u0027 when"},{"line_number":42,"context_line":"    # port_security_enabled is False, treat it as plugin supports limit-portsec"},{"line_number":43,"context_line":"    op.execute(\u0027UPDATE networksecuritybindings SET limit_portsec_domain\u003d\u0027"},{"line_number":44,"context_line":"               \u0027\\\u0027none\\\u0027 WHERE port_security_enabled is False;\u0027)"},{"line_number":45,"context_line":"    op.execute(\u0027UPDATE portsecuritybindings SET limit_portsec_domain\u003d\\\u0027none\\\u0027\u0027"}],"source_content_type":"text/x-python","patch_set":25,"id":"dae33548_980c3b44","line":42,"in_reply_to":"dae33548_56545253","updated":"2016-02-15 05:42:38.000000000","message":"you can look at mitaka/contract/8a6d8bdae39_migrate_neutron_resources_table.py\nas an example.","commit_id":"50615b3e7d52bf2f0dd41fb89abc223ea04dcb23"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"f5ad277087aed8732b65e0ae827601fd6fc16854","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        enum, nullable\u003dTrue, server_default\u003d\u0027full\u0027))"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    # update limit_portsec_domain of the existing rows to \u0027none\u0027 when"},{"line_number":42,"context_line":"    # port_security_enabled is False, treat it as plugin supports limit-portsec"},{"line_number":43,"context_line":"    op.execute(\u0027UPDATE networksecuritybindings SET limit_portsec_domain\u003d\u0027"},{"line_number":44,"context_line":"               \u0027\\\u0027none\\\u0027 WHERE port_security_enabled is False;\u0027)"},{"line_number":45,"context_line":"    op.execute(\u0027UPDATE portsecuritybindings SET limit_portsec_domain\u003d\\\u0027none\\\u0027\u0027"}],"source_content_type":"text/x-python","patch_set":25,"id":"dae33548_a352b0db","line":42,"in_reply_to":"dae33548_980c3b44","updated":"2016-02-15 06:05:01.000000000","message":"thanks, I will have a try.","commit_id":"50615b3e7d52bf2f0dd41fb89abc223ea04dcb23"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"da79a100c30c54ef9224fd0ff8cb2dc203ee50e6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":29,"id":"1af94dfe_42e7af3f","updated":"2016-03-18 14:42:26.000000000","message":"This must now go in the newton versions directory.","commit_id":"3e34eff8d8fa053538db2fbcde2e4dd556555936"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"260f8d850dd525ecd29ca2f963a826828b2fbbe9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":29,"id":"1a122d0e_b37c22b6","in_reply_to":"1af94dfe_42e7af3f","updated":"2016-04-20 09:15:59.000000000","message":"Done","commit_id":"3e34eff8d8fa053538db2fbcde2e4dd556555936"}],"neutron/db/portsecurity_db_common.py":[{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"f019f963fe3d24215830ff4182b753a4db4f7910","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    #limit_portsec_domain only work when port_security_enabled is True"},{"line_number":35,"context_line":"    limit_portsec_domain \u003d sa.Column(sa.String(20), nullable\u003dFalse,"},{"line_number":36,"context_line":"                                     default\u003d\"ALL\")"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    # Add a relationship to the Port model in order to be to able to"},{"line_number":39,"context_line":"    # instruct SQLAlchemy to eagerly load port security binding"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_a8727447","line":36,"updated":"2015-11-26 09:17:30.000000000","message":"Note, http://docs.openstack.org/developer/neutron/devref/db_layer.html#difference-between-default-and-server-default-parameters-for-columns add server_default\u003d\"ALL\" for sync with models.","commit_id":"4f086cf8477fd77e029b2639a215a8c34decdc63"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"a6c2e2f92c5fa9f73d082c09ab9d136377a6d842","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    #limit_portsec_domain only work when port_security_enabled is True"},{"line_number":35,"context_line":"    limit_portsec_domain \u003d sa.Column(sa.String(20), nullable\u003dFalse,"},{"line_number":36,"context_line":"                                     default\u003d\"ALL\")"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    # Add a relationship to the Port model in order to be to able to"},{"line_number":39,"context_line":"    # instruct SQLAlchemy to eagerly load port security binding"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_3231a55a","line":36,"in_reply_to":"9a8ffd7b_a8727447","updated":"2015-11-30 02:23:06.000000000","message":"Done","commit_id":"4f086cf8477fd77e029b2639a215a8c34decdc63"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"c7a4d4e888cd9a905c6459ebc16656e7499f24ec","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from neutron.db import model_base"},{"line_number":21,"context_line":"from neutron.db import models_v2"},{"line_number":22,"context_line":"from neutron.extensions import limited_portsec as limp"},{"line_number":23,"context_line":"from neutron.extensions import portsecurity as psec"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"LOG \u003d logging.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a740942_f49a1313","line":22,"updated":"2015-12-09 10:57:27.000000000","message":"limp-\u003elpsec?","commit_id":"56342982b22dcb4e3de510e950b5a77ae60759f0"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"3a91ed46f8b4c3cdd5f9f3c8d7427ebc1c42529a","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    port_security_enabled \u003d sa.Column(sa.Boolean(), nullable\u003dFalse)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    # limit_portsec_domain only work when port_security_enabled is True"},{"line_number":32,"context_line":"    limit_portsec_domain \u003d sa.Column(sa.String(20), nullable\u003dTrue,"},{"line_number":33,"context_line":"                                     server_default\u003d\"all\")"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    # Add a relationship to the Port model in order to be to able to"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa69d971_4c8f72cc","line":32,"updated":"2016-01-04 09:29:30.000000000","message":"why is the length here 20? why not use enum?","commit_id":"a3e1c18946cbbf37921b1e3333dd7adea6a82def"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"d1987c2f47583c4eb51178696d04bfc9ce2d52be","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    port_security_enabled \u003d sa.Column(sa.Boolean(), nullable\u003dFalse)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    # limit_portsec_domain only work when port_security_enabled is True"},{"line_number":32,"context_line":"    limit_portsec_domain \u003d sa.Column(sa.String(20), nullable\u003dTrue,"},{"line_number":33,"context_line":"                                     server_default\u003d\"all\")"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    # Add a relationship to the Port model in order to be to able to"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa69d971_3726d415","line":32,"in_reply_to":"fa69d971_4c8f72cc","updated":"2016-01-05 10:06:54.000000000","message":"will update it to enum","commit_id":"a3e1c18946cbbf37921b1e3333dd7adea6a82def"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"3a91ed46f8b4c3cdd5f9f3c8d7427ebc1c42529a","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    # limit_portsec_domain only work when port_security_enabled is True"},{"line_number":50,"context_line":"    limit_portsec_domain \u003d sa.Column(sa.String(20), nullable\u003dTrue,"},{"line_number":51,"context_line":"                                     server_default\u003d\"all\")"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    # Add a relationship to the Port model in order to be able to instruct"},{"line_number":54,"context_line":"    # SQLAlchemy to eagerly load default port security setting for ports"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa69d971_0cc09adf","line":51,"updated":"2016-01-04 09:29:30.000000000","message":"ditto","commit_id":"a3e1c18946cbbf37921b1e3333dd7adea6a82def"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"d1987c2f47583c4eb51178696d04bfc9ce2d52be","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    # limit_portsec_domain only work when port_security_enabled is True"},{"line_number":50,"context_line":"    limit_portsec_domain \u003d sa.Column(sa.String(20), nullable\u003dTrue,"},{"line_number":51,"context_line":"                                     server_default\u003d\"all\")"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    # Add a relationship to the Port model in order to be able to instruct"},{"line_number":54,"context_line":"    # SQLAlchemy to eagerly load default port security setting for ports"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa69d971_d71e58ba","line":51,"in_reply_to":"fa69d971_0cc09adf","updated":"2016-01-05 10:06:54.000000000","message":"Done","commit_id":"a3e1c18946cbbf37921b1e3333dd7adea6a82def"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"fa8621bc159dfe7a0a54fbb3a2c7c2ffd0bc1ef7","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def enable_limited_portsec(self):"},{"line_number":67,"context_line":"        # plugin which want to support the limit_portsec_domain will call this"},{"line_number":68,"context_line":"        self.support_limited_portsec \u003d True"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def _process_network_port_security_create("},{"line_number":71,"context_line":"        self, context, network_req, network_res):"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa69d971_51b5232f","line":68,"range":{"start_line":68,"start_character":13,"end_line":68,"end_character":36},"updated":"2016-01-07 14:22:18.000000000","message":"Ok, this seems like a reasonable mechanism to honour backwards compatibility and opt-in to port security implementing plugins.","commit_id":"198e7acbe10c030096eba89168e3ddcc031b6297"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"3265e16a19ab623ade3c68fe804753e65591780e","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def enable_limited_portsec(self):"},{"line_number":67,"context_line":"        # plugin which want to support the limit_portsec_domain will call this"},{"line_number":68,"context_line":"        self.support_limited_portsec \u003d True"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def _process_network_port_security_create("},{"line_number":71,"context_line":"        self, context, network_req, network_res):"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa69d971_6e756796","line":68,"range":{"start_line":68,"start_character":13,"end_line":68,"end_character":36},"in_reply_to":"fa69d971_51b5232f","updated":"2016-01-09 09:53:48.000000000","message":"thanks","commit_id":"198e7acbe10c030096eba89168e3ddcc031b6297"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"fa8621bc159dfe7a0a54fbb3a2c7c2ffd0bc1ef7","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        if (attrs.is_attr_set(data.get(psec.PORTSECURITY))"},{"line_number":167,"context_line":"                and attrs.is_attr_set(data.get(psec.LIMIT_PORTSECURITY))):"},{"line_number":168,"context_line":"            if ((data[psec.PORTSECURITY] is False"},{"line_number":169,"context_line":"                    and (data[psec.LIMIT_PORTSECURITY] \u003d\u003d \u0027all\u0027 or"},{"line_number":170,"context_line":"                    data[psec.LIMIT_PORTSECURITY] \u003d\u003d \u0027mac-spoofing-only\u0027))):"},{"line_number":171,"context_line":"                raise psec.LimitedPortSecurityConflict"},{"line_number":172,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"fa69d971_f1869715","line":169,"range":{"start_line":169,"start_character":59,"end_line":169,"end_character":62},"updated":"2016-01-07 14:22:18.000000000","message":"Can we move those to constants in the psec module?","commit_id":"198e7acbe10c030096eba89168e3ddcc031b6297"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"3265e16a19ab623ade3c68fe804753e65591780e","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        if (attrs.is_attr_set(data.get(psec.PORTSECURITY))"},{"line_number":167,"context_line":"                and attrs.is_attr_set(data.get(psec.LIMIT_PORTSECURITY))):"},{"line_number":168,"context_line":"            if ((data[psec.PORTSECURITY] is False"},{"line_number":169,"context_line":"                    and (data[psec.LIMIT_PORTSECURITY] \u003d\u003d \u0027all\u0027 or"},{"line_number":170,"context_line":"                    data[psec.LIMIT_PORTSECURITY] \u003d\u003d \u0027mac-spoofing-only\u0027))):"},{"line_number":171,"context_line":"                raise psec.LimitedPortSecurityConflict"},{"line_number":172,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"fa69d971_8e7a1b87","line":169,"range":{"start_line":169,"start_character":59,"end_line":169,"end_character":62},"in_reply_to":"fa69d971_f1869715","updated":"2016-01-09 09:53:48.000000000","message":"Done","commit_id":"198e7acbe10c030096eba89168e3ddcc031b6297"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"fa8621bc159dfe7a0a54fbb3a2c7c2ffd0bc1ef7","unresolved":false,"context_lines":[{"line_number":167,"context_line":"                and attrs.is_attr_set(data.get(psec.LIMIT_PORTSECURITY))):"},{"line_number":168,"context_line":"            if ((data[psec.PORTSECURITY] is False"},{"line_number":169,"context_line":"                    and (data[psec.LIMIT_PORTSECURITY] \u003d\u003d \u0027all\u0027 or"},{"line_number":170,"context_line":"                    data[psec.LIMIT_PORTSECURITY] \u003d\u003d \u0027mac-spoofing-only\u0027))):"},{"line_number":171,"context_line":"                raise psec.LimitedPortSecurityConflict"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    def _process_network_port_security_update("}],"source_content_type":"text/x-python","patch_set":13,"id":"fa69d971_717b872a","line":170,"range":{"start_line":170,"start_character":58,"end_line":170,"end_character":66},"updated":"2016-01-07 14:22:18.000000000","message":"This one too.","commit_id":"198e7acbe10c030096eba89168e3ddcc031b6297"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"3265e16a19ab623ade3c68fe804753e65591780e","unresolved":false,"context_lines":[{"line_number":167,"context_line":"                and attrs.is_attr_set(data.get(psec.LIMIT_PORTSECURITY))):"},{"line_number":168,"context_line":"            if ((data[psec.PORTSECURITY] is False"},{"line_number":169,"context_line":"                    and (data[psec.LIMIT_PORTSECURITY] \u003d\u003d \u0027all\u0027 or"},{"line_number":170,"context_line":"                    data[psec.LIMIT_PORTSECURITY] \u003d\u003d \u0027mac-spoofing-only\u0027))):"},{"line_number":171,"context_line":"                raise psec.LimitedPortSecurityConflict"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    def _process_network_port_security_update("}],"source_content_type":"text/x-python","patch_set":13,"id":"fa69d971_ee6957bf","line":170,"range":{"start_line":170,"start_character":58,"end_line":170,"end_character":66},"in_reply_to":"fa69d971_717b872a","updated":"2016-01-09 09:53:48.000000000","message":"Done","commit_id":"198e7acbe10c030096eba89168e3ddcc031b6297"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"fa8621bc159dfe7a0a54fbb3a2c7c2ffd0bc1ef7","unresolved":false,"context_lines":[{"line_number":169,"context_line":"                    and (data[psec.LIMIT_PORTSECURITY] \u003d\u003d \u0027all\u0027 or"},{"line_number":170,"context_line":"                    data[psec.LIMIT_PORTSECURITY] \u003d\u003d \u0027mac-spoofing-only\u0027))):"},{"line_number":171,"context_line":"                raise psec.LimitedPortSecurityConflict"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    def _process_network_port_security_update("},{"line_number":174,"context_line":"        self, context, network_req, network_res):"},{"line_number":175,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"fa69d971_b4e56ddd","line":172,"updated":"2016-01-07 14:22:18.000000000","message":"The semantics of both rows seem a bit confusing to me.\n\nFor example, without reading at any documentation, I\u0027d expect \n\nPORT_SECURITY\u003dTrue + LIMIT_PORT_SECURITY\u003d\u0027\u0027  to be the classic\n\nPORT_SECURITY\u003dTrue + LIMIT_PORT_SECURITY\u003d\u0027mac-spoofing-only\u0027 to be the new setting.\n\nBecause the field name is \"LIMIT\" port security, I\u0027d think different if the field was \"LIMITED_PORT_SECURITY\" .\n\nIs there any reason to not use the schema I\u0027m suggesting here? seems more straight forward to understand to me, but I\u0027d like opinions.\n\n\nIn this case the conflict PORT_SECURITY\u003dFalse + any other setting in LIMIT_PORT_SECURITY than \u0027\u0027 would be a conflict/error.","commit_id":"198e7acbe10c030096eba89168e3ddcc031b6297"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"3265e16a19ab623ade3c68fe804753e65591780e","unresolved":false,"context_lines":[{"line_number":169,"context_line":"                    and (data[psec.LIMIT_PORTSECURITY] \u003d\u003d \u0027all\u0027 or"},{"line_number":170,"context_line":"                    data[psec.LIMIT_PORTSECURITY] \u003d\u003d \u0027mac-spoofing-only\u0027))):"},{"line_number":171,"context_line":"                raise psec.LimitedPortSecurityConflict"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    def _process_network_port_security_update("},{"line_number":174,"context_line":"        self, context, network_req, network_res):"},{"line_number":175,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"fa69d971_e9cf117d","line":172,"in_reply_to":"fa69d971_b4e56ddd","updated":"2016-01-09 09:53:48.000000000","message":"thanks Ajo.\n\nyour advice looks good, and actually my current meaning is LIMITED_PORT_SECURITY instead of LIMIT_PORT_SECURITY, but as you point out, it really bring contradiction between the meaning of \u0027all\u0027 and \u0027mac-only\u0027. your advice is great.\n\nI will follow this advice[\u0027\u0027, \u0027mac-only\u0027], but I still want to add auto set \u0027all\u0027 from background when port-sec is False.\nAnd \u0027all\u0027 will not be accepted from API setting, just showed from port attr dict. Then it will be distinguished that the same \u0027\u0027 when portsec be set true or false. Would that be OK?","commit_id":"198e7acbe10c030096eba89168e3ddcc031b6297"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"fa8621bc159dfe7a0a54fbb3a2c7c2ffd0bc1ef7","unresolved":false,"context_lines":[{"line_number":173,"context_line":"    def _process_network_port_security_update("},{"line_number":174,"context_line":"        self, context, network_req, network_res):"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"        if self.support_limited_portsec:"},{"line_number":177,"context_line":"            port_security_enabled \u003d None"},{"line_number":178,"context_line":"            limit_portsec_domain \u003d None"},{"line_number":179,"context_line":"            if psec.PORTSECURITY in network_req:"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa69d971_47548120","line":176,"range":{"start_line":176,"start_character":0,"end_line":176,"end_character":8},"updated":"2016-01-07 14:22:18.000000000","message":"Suggestion: you could extract the port_security_enabled and limit_portsec_domain to an auxiliary function, in favour or readability.","commit_id":"198e7acbe10c030096eba89168e3ddcc031b6297"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"3265e16a19ab623ade3c68fe804753e65591780e","unresolved":false,"context_lines":[{"line_number":173,"context_line":"    def _process_network_port_security_update("},{"line_number":174,"context_line":"        self, context, network_req, network_res):"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"        if self.support_limited_portsec:"},{"line_number":177,"context_line":"            port_security_enabled \u003d None"},{"line_number":178,"context_line":"            limit_portsec_domain \u003d None"},{"line_number":179,"context_line":"            if psec.PORTSECURITY in network_req:"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa69d971_69a241b0","line":176,"range":{"start_line":176,"start_character":0,"end_line":176,"end_character":8},"in_reply_to":"fa69d971_47548120","updated":"2016-01-09 09:53:48.000000000","message":"make sense. will try to simplify it.","commit_id":"198e7acbe10c030096eba89168e3ddcc031b6297"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"fa8621bc159dfe7a0a54fbb3a2c7c2ffd0bc1ef7","unresolved":false,"context_lines":[{"line_number":180,"context_line":"                port_security_enabled \u003d network_req[psec.PORTSECURITY]"},{"line_number":181,"context_line":"                # limit_portsec_domain will auto follow the port-sec value"},{"line_number":182,"context_line":"                if psec.LIMIT_PORTSECURITY not in network_req:"},{"line_number":183,"context_line":"                    limit_portsec_domain \u003d (\u0027all\u0027 if port_security_enabled"},{"line_number":184,"context_line":"                                            else \u0027\u0027)"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"            if psec.LIMIT_PORTSECURITY in network_req:"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa69d971_3433bdf8","line":183,"range":{"start_line":183,"start_character":45,"end_line":183,"end_character":48},"updated":"2016-01-07 14:22:18.000000000","message":"ditto.","commit_id":"198e7acbe10c030096eba89168e3ddcc031b6297"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"3265e16a19ab623ade3c68fe804753e65591780e","unresolved":false,"context_lines":[{"line_number":180,"context_line":"                port_security_enabled \u003d network_req[psec.PORTSECURITY]"},{"line_number":181,"context_line":"                # limit_portsec_domain will auto follow the port-sec value"},{"line_number":182,"context_line":"                if psec.LIMIT_PORTSECURITY not in network_req:"},{"line_number":183,"context_line":"                    limit_portsec_domain \u003d (\u0027all\u0027 if port_security_enabled"},{"line_number":184,"context_line":"                                            else \u0027\u0027)"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"            if psec.LIMIT_PORTSECURITY in network_req:"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa69d971_89a775bc","line":183,"range":{"start_line":183,"start_character":45,"end_line":183,"end_character":48},"in_reply_to":"fa69d971_3433bdf8","updated":"2016-01-09 09:53:48.000000000","message":"Done","commit_id":"198e7acbe10c030096eba89168e3ddcc031b6297"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"fa8621bc159dfe7a0a54fbb3a2c7c2ffd0bc1ef7","unresolved":false,"context_lines":[{"line_number":197,"context_line":"            binding \u003d query.filter("},{"line_number":198,"context_line":"                NetworkSecurityBinding.network_id \u003d\u003d network_id).one()"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"            if self.support_limited_portsec:"},{"line_number":201,"context_line":"                if port_security_enabled is not None:"},{"line_number":202,"context_line":"                    binding.port_security_enabled \u003d port_security_enabled"},{"line_number":203,"context_line":"                    network_res[psec.PORTSECURITY] \u003d port_security_enabled"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa69d971_0a51b00e","line":200,"range":{"start_line":200,"start_character":0,"end_line":200,"end_character":12},"updated":"2016-01-07 14:22:18.000000000","message":"again this block could be extracted to an auxiliary function that updates binding, and network_res based on port_security_enabled and limit_portsec_domain.","commit_id":"198e7acbe10c030096eba89168e3ddcc031b6297"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"3265e16a19ab623ade3c68fe804753e65591780e","unresolved":false,"context_lines":[{"line_number":197,"context_line":"            binding \u003d query.filter("},{"line_number":198,"context_line":"                NetworkSecurityBinding.network_id \u003d\u003d network_id).one()"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"            if self.support_limited_portsec:"},{"line_number":201,"context_line":"                if port_security_enabled is not None:"},{"line_number":202,"context_line":"                    binding.port_security_enabled \u003d port_security_enabled"},{"line_number":203,"context_line":"                    network_res[psec.PORTSECURITY] \u003d port_security_enabled"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa69d971_29a8c98b","line":200,"range":{"start_line":200,"start_character":0,"end_line":200,"end_character":12},"in_reply_to":"fa69d971_0a51b00e","updated":"2016-01-09 09:53:48.000000000","message":"Done","commit_id":"198e7acbe10c030096eba89168e3ddcc031b6297"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"0da862e923d880847e0a6e232ff96e9b368e1bf9","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    limit_portsec_domain \u003d sa.Column(enum_limited_portsec, nullable\u003dTrue,"},{"line_number":57,"context_line":"                                     server_default\u003dpsec.LIMIT_DOMAIN_FULL)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    # Add a relationship to the Port model in order to be able to instruct"},{"line_number":60,"context_line":"    # SQLAlchemy to eagerly load default port security setting for ports"},{"line_number":61,"context_line":"    # on this network"},{"line_number":62,"context_line":"    network \u003d orm.relationship("}],"source_content_type":"text/x-python","patch_set":24,"id":"7a5de9d1_8e960d93","line":59,"updated":"2016-01-27 20:10:29.000000000","message":"Nit: This should be Network model. I know that this comment was pre-existing.","commit_id":"a48f0d23af796fd383cf7861cdb6f598b7848890"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"0da862e923d880847e0a6e232ff96e9b368e1bf9","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        # plugin which want to support the limit_portsec_domain will call this"},{"line_number":74,"context_line":"        self.support_limited_portsec \u003d True"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def sp_limited_portsec(self):"},{"line_number":77,"context_line":"        return self.support_limited_portsec"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def _get_limit_portsec_from_req_included(self, req):"}],"source_content_type":"text/x-python","patch_set":24,"id":"7a5de9d1_0ebc5d6b","line":76,"range":{"start_line":76,"start_character":8,"end_line":76,"end_character":26},"updated":"2016-01-27 20:10:29.000000000","message":"Nit: would get_limited_portsec() be a better name?","commit_id":"a48f0d23af796fd383cf7861cdb6f598b7848890"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"ab5cd9e03915b292a6ed38a96c40462ee4ca6931","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        # plugin which want to support the limit_portsec_domain will call this"},{"line_number":74,"context_line":"        self.support_limited_portsec \u003d True"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def sp_limited_portsec(self):"},{"line_number":77,"context_line":"        return self.support_limited_portsec"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def _get_limit_portsec_from_req_included(self, req):"}],"source_content_type":"text/x-python","patch_set":24,"id":"7a5de9d1_d46b8fb7","line":76,"range":{"start_line":76,"start_character":8,"end_line":76,"end_character":26},"in_reply_to":"7a5de9d1_0ebc5d6b","updated":"2016-02-03 02:38:02.000000000","message":"Done","commit_id":"a48f0d23af796fd383cf7861cdb6f598b7848890"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"b91f561b8994d55439131637f058bc088572d4c4","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    support_limited_portsec \u003d False"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def enable_limited_portsec(self):"},{"line_number":73,"context_line":"        # plugin which want to support the limit_portsec_domain will call this"},{"line_number":74,"context_line":"        self.support_limited_portsec \u003d True"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def get_limited_portsec(self):"}],"source_content_type":"text/x-python","patch_set":25,"id":"5a5ae5dd_6df9574d","line":73,"updated":"2016-02-03 10:18:55.000000000","message":"I think if a plugin wants to support this it can just define support_limited_portsec \u003d True on its class. No need to call a function","commit_id":"50615b3e7d52bf2f0dd41fb89abc223ea04dcb23"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"241f1df440e78ddf66ca54d18350ea7a6c6e125b","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    support_limited_portsec \u003d False"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def enable_limited_portsec(self):"},{"line_number":73,"context_line":"        # plugin which want to support the limit_portsec_domain will call this"},{"line_number":74,"context_line":"        self.support_limited_portsec \u003d True"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def get_limited_portsec(self):"}],"source_content_type":"text/x-python","patch_set":25,"id":"dae33548_964edabf","line":73,"in_reply_to":"5a5ae5dd_6df9574d","updated":"2016-02-15 03:35:07.000000000","message":"Done","commit_id":"50615b3e7d52bf2f0dd41fb89abc223ea04dcb23"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"b91f561b8994d55439131637f058bc088572d4c4","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        # plugin which want to support the limit_portsec_domain will call this"},{"line_number":74,"context_line":"        self.support_limited_portsec \u003d True"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def get_limited_portsec(self):"},{"line_number":77,"context_line":"        return self.support_limited_portsec"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def _get_limit_portsec_from_req_included(self, req):"}],"source_content_type":"text/x-python","patch_set":25,"id":"5a5ae5dd_0d9543e3","line":76,"updated":"2016-02-03 10:18:55.000000000","message":"is this function used?","commit_id":"50615b3e7d52bf2f0dd41fb89abc223ea04dcb23"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"2ae70e098b7a4e04ac0828990840f7e2cdb5a17a","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        # plugin which want to support the limit_portsec_domain will call this"},{"line_number":74,"context_line":"        self.support_limited_portsec \u003d True"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def get_limited_portsec(self):"},{"line_number":77,"context_line":"        return self.support_limited_portsec"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def _get_limit_portsec_from_req_included(self, req):"}],"source_content_type":"text/x-python","patch_set":25,"id":"5a5ae5dd_963035ea","line":76,"in_reply_to":"5a5ae5dd_0d9543e3","updated":"2016-02-04 04:52:43.000000000","message":"it\u0027s used by tests.\n\nthese setter/getter don\u0027t seem to provide any values though.\nit\u0027s simpler to use support_limited_portsec directly.","commit_id":"50615b3e7d52bf2f0dd41fb89abc223ea04dcb23"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"241f1df440e78ddf66ca54d18350ea7a6c6e125b","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        # plugin which want to support the limit_portsec_domain will call this"},{"line_number":74,"context_line":"        self.support_limited_portsec \u003d True"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def get_limited_portsec(self):"},{"line_number":77,"context_line":"        return self.support_limited_portsec"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def _get_limit_portsec_from_req_included(self, req):"}],"source_content_type":"text/x-python","patch_set":25,"id":"dae33548_16d12ace","line":76,"in_reply_to":"5a5ae5dd_963035ea","updated":"2016-02-15 03:35:07.000000000","message":"Done","commit_id":"50615b3e7d52bf2f0dd41fb89abc223ea04dcb23"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"b91f561b8994d55439131637f058bc088572d4c4","unresolved":false,"context_lines":[{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    def check_conflict(self, data):"},{"line_number":136,"context_line":"        # check the conflict when both port_security_enabled and"},{"line_number":137,"context_line":"        # limit_portsec_domain been set"},{"line_number":138,"context_line":"        if (attrs.is_attr_set(data.get(psec.PORTSECURITY))"},{"line_number":139,"context_line":"                and attrs.is_attr_set(data.get(psec.LIMIT_PORTSECURITY))):"},{"line_number":140,"context_line":"            if ((data[psec.PORTSECURITY] is False"}],"source_content_type":"text/x-python","patch_set":25,"id":"5a5ae5dd_2d9a7f15","line":137,"updated":"2016-02-03 10:18:55.000000000","message":"We\u0027re actually looking for one specific violation here. This can just be:\n\nif (data.get(psec.PORTSECURITY) \u003d\u003d False and\n        attr.is_attr_set(data.get(psec.LIMIT_PORTSECURITY)) and\n        data.get(psec.LIMIT_PORTSECURITY) !\u003d psec.LIMIT_DOMAIN_NONE):\n    raise ...","commit_id":"50615b3e7d52bf2f0dd41fb89abc223ea04dcb23"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"241f1df440e78ddf66ca54d18350ea7a6c6e125b","unresolved":false,"context_lines":[{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    def check_conflict(self, data):"},{"line_number":136,"context_line":"        # check the conflict when both port_security_enabled and"},{"line_number":137,"context_line":"        # limit_portsec_domain been set"},{"line_number":138,"context_line":"        if (attrs.is_attr_set(data.get(psec.PORTSECURITY))"},{"line_number":139,"context_line":"                and attrs.is_attr_set(data.get(psec.LIMIT_PORTSECURITY))):"},{"line_number":140,"context_line":"            if ((data[psec.PORTSECURITY] is False"}],"source_content_type":"text/x-python","patch_set":25,"id":"dae33548_6a6886bb","line":137,"in_reply_to":"5a5ae5dd_2d9a7f15","updated":"2016-02-15 03:35:07.000000000","message":"it is also called by neutron/plugins/ml2/extensions/port_security.py\n\nin that case, only when both portsec and limited-portsec in the arg from API request, the verification will be called.","commit_id":"50615b3e7d52bf2f0dd41fb89abc223ea04dcb23"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"b91f561b8994d55439131637f058bc088572d4c4","unresolved":false,"context_lines":[{"line_number":141,"context_line":"                and (data[psec.LIMIT_PORTSECURITY] \u003d\u003d psec.LIMIT_DOMAIN_FULL"},{"line_number":142,"context_line":"                or data[psec.LIMIT_PORTSECURITY] \u003d\u003d"},{"line_number":143,"context_line":"                psec.LIMIT_DOMAIN_L2ONLY))):"},{"line_number":144,"context_line":"                raise psec.LimitedPortSecurityConflict"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def _set_binding_and_res(self, binding, res, port_security_enabled,"},{"line_number":147,"context_line":"                             limit_portsec_domain):"}],"source_content_type":"text/x-python","patch_set":25,"id":"5a5ae5dd_cd9e4b07","line":144,"updated":"2016-02-03 10:18:55.000000000","message":"need to construct the exception","commit_id":"50615b3e7d52bf2f0dd41fb89abc223ea04dcb23"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"241f1df440e78ddf66ca54d18350ea7a6c6e125b","unresolved":false,"context_lines":[{"line_number":141,"context_line":"                and (data[psec.LIMIT_PORTSECURITY] \u003d\u003d psec.LIMIT_DOMAIN_FULL"},{"line_number":142,"context_line":"                or data[psec.LIMIT_PORTSECURITY] \u003d\u003d"},{"line_number":143,"context_line":"                psec.LIMIT_DOMAIN_L2ONLY))):"},{"line_number":144,"context_line":"                raise psec.LimitedPortSecurityConflict"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def _set_binding_and_res(self, binding, res, port_security_enabled,"},{"line_number":147,"context_line":"                             limit_portsec_domain):"}],"source_content_type":"text/x-python","patch_set":25,"id":"dae33548_52ca94a2","line":144,"in_reply_to":"5a5ae5dd_cd9e4b07","updated":"2016-02-15 03:35:07.000000000","message":"Done","commit_id":"50615b3e7d52bf2f0dd41fb89abc223ea04dcb23"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"b91f561b8994d55439131637f058bc088572d4c4","unresolved":false,"context_lines":[{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def _set_binding_and_res(self, binding, res, port_security_enabled,"},{"line_number":147,"context_line":"                             limit_portsec_domain):"},{"line_number":148,"context_line":"        if self.support_limited_portsec:"},{"line_number":149,"context_line":"            if port_security_enabled is not None:"},{"line_number":150,"context_line":"                binding.port_security_enabled \u003d port_security_enabled"},{"line_number":151,"context_line":"                res[psec.PORTSECURITY] \u003d port_security_enabled"}],"source_content_type":"text/x-python","patch_set":25,"id":"5a5ae5dd_eda3074e","line":148,"updated":"2016-02-03 10:18:55.000000000","message":"The only difference between the two cases should be the value of res[psec.LIMIT_PORTSECURITY]. The rest of the logic should be shared.","commit_id":"50615b3e7d52bf2f0dd41fb89abc223ea04dcb23"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"241f1df440e78ddf66ca54d18350ea7a6c6e125b","unresolved":false,"context_lines":[{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def _set_binding_and_res(self, binding, res, port_security_enabled,"},{"line_number":147,"context_line":"                             limit_portsec_domain):"},{"line_number":148,"context_line":"        if self.support_limited_portsec:"},{"line_number":149,"context_line":"            if port_security_enabled is not None:"},{"line_number":150,"context_line":"                binding.port_security_enabled \u003d port_security_enabled"},{"line_number":151,"context_line":"                res[psec.PORTSECURITY] \u003d port_security_enabled"}],"source_content_type":"text/x-python","patch_set":25,"id":"dae33548_35737ab3","line":148,"in_reply_to":"5a5ae5dd_eda3074e","updated":"2016-02-15 03:35:07.000000000","message":"Done","commit_id":"50615b3e7d52bf2f0dd41fb89abc223ea04dcb23"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"b91f561b8994d55439131637f058bc088572d4c4","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        port_security_enabled \u003d None"},{"line_number":165,"context_line":"        limit_portsec_domain \u003d None"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"        if self.support_limited_portsec:"},{"line_number":168,"context_line":"            if psec.PORTSECURITY in req:"},{"line_number":169,"context_line":"                port_security_enabled \u003d req[psec.PORTSECURITY]"},{"line_number":170,"context_line":"                if psec.LIMIT_PORTSECURITY not in req:"}],"source_content_type":"text/x-python","patch_set":25,"id":"5a5ae5dd_8d8933cd","line":167,"updated":"2016-02-03 10:18:55.000000000","message":"similar here, reduce the code duplication, the only difference should be the limit_portsec_domain assignment logic.","commit_id":"50615b3e7d52bf2f0dd41fb89abc223ea04dcb23"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"241f1df440e78ddf66ca54d18350ea7a6c6e125b","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        port_security_enabled \u003d None"},{"line_number":165,"context_line":"        limit_portsec_domain \u003d None"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"        if self.support_limited_portsec:"},{"line_number":168,"context_line":"            if psec.PORTSECURITY in req:"},{"line_number":169,"context_line":"                port_security_enabled \u003d req[psec.PORTSECURITY]"},{"line_number":170,"context_line":"                if psec.LIMIT_PORTSECURITY not in req:"}],"source_content_type":"text/x-python","patch_set":25,"id":"dae33548_556efec9","line":167,"in_reply_to":"5a5ae5dd_8d8933cd","updated":"2016-02-15 03:35:07.000000000","message":"Done","commit_id":"50615b3e7d52bf2f0dd41fb89abc223ea04dcb23"}],"neutron/extensions/limited_portsec.py":[{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"c7a4d4e888cd9a905c6459ebc16656e7499f24ec","unresolved":false,"context_lines":[{"line_number":28,"context_line":"                       \u0027enforce_policy\u0027: True,"},{"line_number":29,"context_line":"                       \u0027default\u0027: \u0027ALL\u0027,"},{"line_number":30,"context_line":"                       \u0027validate\u0027: {\u0027type:values\u0027:"},{"line_number":31,"context_line":"                                    [\u0027ALL\u0027, \u0027mac-spoofing-only\u0027]},"},{"line_number":32,"context_line":"                       \u0027is_visible\u0027: True},"},{"line_number":33,"context_line":"    },"},{"line_number":34,"context_line":"    \u0027ports\u0027: {"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a740942_d4bef763","line":31,"updated":"2015-12-09 10:57:27.000000000","message":"Cam we create constants for that too? ALL/ mac-spoofing-only, ?\n\ncould they be all low-case ?","commit_id":"56342982b22dcb4e3de510e950b5a77ae60759f0"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"88e2ca4842b6b290297049c2b2fd0a24c4dede1c","unresolved":false,"context_lines":[{"line_number":28,"context_line":"                       \u0027enforce_policy\u0027: True,"},{"line_number":29,"context_line":"                       \u0027default\u0027: \u0027ALL\u0027,"},{"line_number":30,"context_line":"                       \u0027validate\u0027: {\u0027type:values\u0027:"},{"line_number":31,"context_line":"                                    [\u0027ALL\u0027, \u0027mac-spoofing-only\u0027]},"},{"line_number":32,"context_line":"                       \u0027is_visible\u0027: True},"},{"line_number":33,"context_line":"    },"},{"line_number":34,"context_line":"    \u0027ports\u0027: {"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a7b0d38_73aeab99","line":31,"in_reply_to":"7a740942_d4bef763","updated":"2015-12-28 09:51:02.000000000","message":"will update it in the new patch.","commit_id":"56342982b22dcb4e3de510e950b5a77ae60759f0"}],"neutron/extensions/portsecurity.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"3a91ed46f8b4c3cdd5f9f3c8d7427ebc1c42529a","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"class LimitedPortSecurityConflict(nexception.InvalidInput):"},{"line_number":36,"context_line":"    message \u003d _(\"Limit portsecurity only work when port_security_enabled\""},{"line_number":37,"context_line":"                \" set to be True\")"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"PORTSECURITY \u003d \u0027port_security_enabled\u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa69d971_ccb9227b","line":36,"updated":"2016-01-04 09:29:30.000000000","message":"please use a space at the end of a sentence\n\nwork \u003d\u003e works","commit_id":"a3e1c18946cbbf37921b1e3333dd7adea6a82def"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"d1987c2f47583c4eb51178696d04bfc9ce2d52be","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"class LimitedPortSecurityConflict(nexception.InvalidInput):"},{"line_number":36,"context_line":"    message \u003d _(\"Limit portsecurity only work when port_security_enabled\""},{"line_number":37,"context_line":"                \" set to be True\")"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"PORTSECURITY \u003d \u0027port_security_enabled\u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa69d971_37f8147b","line":36,"in_reply_to":"fa69d971_ccb9227b","updated":"2016-01-05 10:06:54.000000000","message":"the next line has begined with a space.","commit_id":"a3e1c18946cbbf37921b1e3333dd7adea6a82def"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"e63c58a0dc7e026f1a5f2776ad51b587dd2a75d2","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    message \u003d _(\"Port does not have port security binding.\")"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"class LimitedPortSecurityConflict(nexception.InvalidInput):"},{"line_number":36,"context_line":"    message \u003d _(\"Can\u0027t set limit portsecurity to \u0027\u0027 when \""},{"line_number":37,"context_line":"                \"port_security_enabled is True; Also can\u0027t set it to \u0027all\u0027 or \""},{"line_number":38,"context_line":"                \"\u0027mac-spoofing-only\u0027 when port_security_enabled is False\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa69d971_57255606","line":35,"updated":"2016-01-06 08:51:54.000000000","message":"I think having such exception is not user friendly API. I think the suggested behavior can be supported with 2 options: \"mac-spoofing-only\" and \"all\". If port security is disabled, the domain settings is not taken into account at all. But it seems to me that what you really want is to have (key, val) pairs to enable certain security domain. Am I right?","commit_id":"b86c6cfb0997d891791f4590cf8cf8345d833902"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"c0943de253661bd1154b5f0e8cc6fb8e4d462fed","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    message \u003d _(\"Port does not have port security binding.\")"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"class LimitedPortSecurityConflict(nexception.InvalidInput):"},{"line_number":36,"context_line":"    message \u003d _(\"Can\u0027t set limit portsecurity to \u0027\u0027 when \""},{"line_number":37,"context_line":"                \"port_security_enabled is True; Also can\u0027t set it to \u0027all\u0027 or \""},{"line_number":38,"context_line":"                \"\u0027mac-spoofing-only\u0027 when port_security_enabled is False\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa69d971_e92d5cfe","line":35,"in_reply_to":"fa69d971_53f6995d","updated":"2016-01-07 07:27:42.000000000","message":"If I understood your suggestion correctly, I think this would be better than the current approach. From the user perspective, I think it is expected that security domain setting will be effective only when security is turned on.","commit_id":"b86c6cfb0997d891791f4590cf8cf8345d833902"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"7bf5d5936aabaa06d8493e82b57fa5e697097cf2","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    message \u003d _(\"Port does not have port security binding.\")"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"class LimitedPortSecurityConflict(nexception.InvalidInput):"},{"line_number":36,"context_line":"    message \u003d _(\"Can\u0027t set limit portsecurity to \u0027\u0027 when \""},{"line_number":37,"context_line":"                \"port_security_enabled is True; Also can\u0027t set it to \u0027all\u0027 or \""},{"line_number":38,"context_line":"                \"\u0027mac-spoofing-only\u0027 when port_security_enabled is False\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa69d971_53f6995d","line":35,"in_reply_to":"fa69d971_57255606","updated":"2016-01-07 06:33:04.000000000","message":"Thanks Irena for your comments. yes, u r right.\n\nI agree that just leave two option \u0027mac-spoofing-only\u0027 and \u0027all\u0027 is better. But I concerned:\nmaybe it will leave some conflict value in db tables or extended dict, like when port-sec is False, but limit-domain is \u0027all\u0027. I can add some logic to prevent it.\nThen setting limit-domain will depend on the current portsec, but portsec do not depend on the limited-domain.","commit_id":"b86c6cfb0997d891791f4590cf8cf8345d833902"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"e00d2d054434b9f025c3afb2facd77614990543b","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    message \u003d _(\"Port does not have port security binding.\")"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"class LimitedPortSecurityConflict(nexception.InvalidInput):"},{"line_number":36,"context_line":"    message \u003d _(\"Can\u0027t set limit portsecurity to \u0027\u0027 when \""},{"line_number":37,"context_line":"                \"port_security_enabled is True; Also can\u0027t set it to \u0027all\u0027 or \""},{"line_number":38,"context_line":"                \"\u0027mac-spoofing-only\u0027 when port_security_enabled is False\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa69d971_e74ca39f","line":35,"in_reply_to":"fa69d971_e92d5cfe","updated":"2016-01-07 08:34:25.000000000","message":"yes，I will update the patch to reflect your advice.","commit_id":"b86c6cfb0997d891791f4590cf8cf8345d833902"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"fa8621bc159dfe7a0a54fbb3a2c7c2ffd0bc1ef7","unresolved":false,"context_lines":[{"line_number":49,"context_line":"                       \u0027enforce_policy\u0027: True,"},{"line_number":50,"context_line":"                       \u0027default\u0027: attributes.ATTR_NOT_SPECIFIED,"},{"line_number":51,"context_line":"                       \u0027validate\u0027: {\u0027type:values\u0027:"},{"line_number":52,"context_line":"                                    [\u0027all\u0027, \u0027mac-spoofing-only\u0027]},"},{"line_number":53,"context_line":"                       \u0027is_visible\u0027: True},"},{"line_number":54,"context_line":"    },"},{"line_number":55,"context_line":"    \u0027ports\u0027: {"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa69d971_aaa3c4ff","line":52,"range":{"start_line":52,"start_character":38,"end_line":52,"end_character":41},"updated":"2016-01-07 14:22:18.000000000","message":"move to constants, please :)","commit_id":"198e7acbe10c030096eba89168e3ddcc031b6297"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"3265e16a19ab623ade3c68fe804753e65591780e","unresolved":false,"context_lines":[{"line_number":49,"context_line":"                       \u0027enforce_policy\u0027: True,"},{"line_number":50,"context_line":"                       \u0027default\u0027: attributes.ATTR_NOT_SPECIFIED,"},{"line_number":51,"context_line":"                       \u0027validate\u0027: {\u0027type:values\u0027:"},{"line_number":52,"context_line":"                                    [\u0027all\u0027, \u0027mac-spoofing-only\u0027]},"},{"line_number":53,"context_line":"                       \u0027is_visible\u0027: True},"},{"line_number":54,"context_line":"    },"},{"line_number":55,"context_line":"    \u0027ports\u0027: {"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa69d971_ee42b73d","line":52,"range":{"start_line":52,"start_character":38,"end_line":52,"end_character":41},"in_reply_to":"fa69d971_aaa3c4ff","updated":"2016-01-09 09:53:48.000000000","message":"yeah, I will update this in the next patch.","commit_id":"198e7acbe10c030096eba89168e3ddcc031b6297"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"fa8621bc159dfe7a0a54fbb3a2c7c2ffd0bc1ef7","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                       \u0027default\u0027: attributes.ATTR_NOT_SPECIFIED,"},{"line_number":63,"context_line":"                       \u0027enforce_policy\u0027: True,"},{"line_number":64,"context_line":"                       \u0027validate\u0027: {\u0027type:values\u0027:"},{"line_number":65,"context_line":"                                    [\u0027all\u0027, \u0027mac-spoofing-only\u0027]},"},{"line_number":66,"context_line":"                       \u0027is_visible\u0027: True},"},{"line_number":67,"context_line":"    }"},{"line_number":68,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa69d971_4ab5682f","line":65,"range":{"start_line":65,"start_character":49,"end_line":65,"end_character":57},"updated":"2016-01-07 14:22:18.000000000","message":"ditto.","commit_id":"198e7acbe10c030096eba89168e3ddcc031b6297"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"3265e16a19ab623ade3c68fe804753e65591780e","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                       \u0027default\u0027: attributes.ATTR_NOT_SPECIFIED,"},{"line_number":63,"context_line":"                       \u0027enforce_policy\u0027: True,"},{"line_number":64,"context_line":"                       \u0027validate\u0027: {\u0027type:values\u0027:"},{"line_number":65,"context_line":"                                    [\u0027all\u0027, \u0027mac-spoofing-only\u0027]},"},{"line_number":66,"context_line":"                       \u0027is_visible\u0027: True},"},{"line_number":67,"context_line":"    }"},{"line_number":68,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa69d971_0e406b33","line":65,"range":{"start_line":65,"start_character":49,"end_line":65,"end_character":57},"in_reply_to":"fa69d971_4ab5682f","updated":"2016-01-09 09:53:48.000000000","message":"Done","commit_id":"198e7acbe10c030096eba89168e3ddcc031b6297"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"05d9a7333165ec307f5c7f5bbbadeb4b0bfe9b1e","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"class LimitedPortSecurityConflict(nexception.InvalidInput):"},{"line_number":36,"context_line":"    message \u003d _(\"Can NOT set limit portsecurity when port_security_enabled is \""},{"line_number":37,"context_line":"                \"False.\")"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"9a68dd71_4b2a90dc","line":36,"updated":"2016-01-25 06:59:36.000000000","message":"not","commit_id":"6a44a84a68d48232f21da2b183fd192969362585"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"07e3a49affdc7f10d9ac6a4e0fba0dfb1a707225","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"class LimitedPortSecurityConflict(nexception.InvalidInput):"},{"line_number":36,"context_line":"    message \u003d _(\"Can NOT set limit portsecurity when port_security_enabled is \""},{"line_number":37,"context_line":"                \"False.\")"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"9a68dd71_3e3e78c1","line":36,"in_reply_to":"9a68dd71_4b2a90dc","updated":"2016-01-25 07:24:12.000000000","message":"Done","commit_id":"6a44a84a68d48232f21da2b183fd192969362585"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"05d9a7333165ec307f5c7f5bbbadeb4b0bfe9b1e","unresolved":false,"context_lines":[{"line_number":55,"context_line":"                       \u0027is_visible\u0027: True},"},{"line_number":56,"context_line":"        LIMIT_PORTSECURITY: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":57,"context_line":"                       \u0027enforce_policy\u0027: True,"},{"line_number":58,"context_line":"                       \u0027default\u0027: attributes.ATTR_NOT_SPECIFIED,"},{"line_number":59,"context_line":"                       \u0027validate\u0027: {\u0027type:values\u0027:"},{"line_number":60,"context_line":"                                    [LIMIT_DOMAIN_FULL, LIMIT_DOMAIN_L2ONLY]},"},{"line_number":61,"context_line":"                       \u0027is_visible\u0027: True},"}],"source_content_type":"text/x-python","patch_set":22,"id":"9a68dd71_cb7c40ee","line":58,"updated":"2016-01-25 06:59:36.000000000","message":"Should not it be \u0027full\u0027?","commit_id":"6a44a84a68d48232f21da2b183fd192969362585"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"07e3a49affdc7f10d9ac6a4e0fba0dfb1a707225","unresolved":false,"context_lines":[{"line_number":55,"context_line":"                       \u0027is_visible\u0027: True},"},{"line_number":56,"context_line":"        LIMIT_PORTSECURITY: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":57,"context_line":"                       \u0027enforce_policy\u0027: True,"},{"line_number":58,"context_line":"                       \u0027default\u0027: attributes.ATTR_NOT_SPECIFIED,"},{"line_number":59,"context_line":"                       \u0027validate\u0027: {\u0027type:values\u0027:"},{"line_number":60,"context_line":"                                    [LIMIT_DOMAIN_FULL, LIMIT_DOMAIN_L2ONLY]},"},{"line_number":61,"context_line":"                       \u0027is_visible\u0027: True},"}],"source_content_type":"text/x-python","patch_set":22,"id":"9a68dd71_fe8f8072","line":58,"in_reply_to":"9a68dd71_cb7c40ee","updated":"2016-01-25 07:24:12.000000000","message":"it will be dynamically determined by the limited-portsec value in request, the port-sec value in the current port.\n\nif set it to fixed \u0027full\u0027, the logic in extension will be hard to verify whether it\u0027s from the user request or not.","commit_id":"6a44a84a68d48232f21da2b183fd192969362585"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"91832841e0bc0ba1810cbeadc9ea8f0767c2858b","unresolved":false,"context_lines":[{"line_number":55,"context_line":"                       \u0027is_visible\u0027: True},"},{"line_number":56,"context_line":"        LIMIT_PORTSECURITY: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":57,"context_line":"                       \u0027enforce_policy\u0027: True,"},{"line_number":58,"context_line":"                       \u0027default\u0027: attributes.ATTR_NOT_SPECIFIED,"},{"line_number":59,"context_line":"                       \u0027validate\u0027: {\u0027type:values\u0027:"},{"line_number":60,"context_line":"                                    [LIMIT_DOMAIN_FULL, LIMIT_DOMAIN_L2ONLY]},"},{"line_number":61,"context_line":"                       \u0027is_visible\u0027: True},"}],"source_content_type":"text/x-python","patch_set":22,"id":"9a68dd71_fe754031","line":58,"in_reply_to":"9a68dd71_fe8f8072","updated":"2016-01-25 07:39:51.000000000","message":"Got it, thanks","commit_id":"6a44a84a68d48232f21da2b183fd192969362585"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"05d9a7333165ec307f5c7f5bbbadeb4b0bfe9b1e","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                       \u0027enforce_policy\u0027: True,"},{"line_number":68,"context_line":"                       \u0027is_visible\u0027: True},"},{"line_number":69,"context_line":"        LIMIT_PORTSECURITY: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":70,"context_line":"                       \u0027default\u0027: attributes.ATTR_NOT_SPECIFIED,"},{"line_number":71,"context_line":"                       \u0027enforce_policy\u0027: True,"},{"line_number":72,"context_line":"                       \u0027validate\u0027: {\u0027type:values\u0027:"},{"line_number":73,"context_line":"                                    [LIMIT_DOMAIN_FULL, LIMIT_DOMAIN_L2ONLY]},"}],"source_content_type":"text/x-python","patch_set":22,"id":"9a68dd71_ab854ccf","line":70,"updated":"2016-01-25 06:59:36.000000000","message":"same here","commit_id":"6a44a84a68d48232f21da2b183fd192969362585"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"07e3a49affdc7f10d9ac6a4e0fba0dfb1a707225","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                       \u0027enforce_policy\u0027: True,"},{"line_number":68,"context_line":"                       \u0027is_visible\u0027: True},"},{"line_number":69,"context_line":"        LIMIT_PORTSECURITY: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":70,"context_line":"                       \u0027default\u0027: attributes.ATTR_NOT_SPECIFIED,"},{"line_number":71,"context_line":"                       \u0027enforce_policy\u0027: True,"},{"line_number":72,"context_line":"                       \u0027validate\u0027: {\u0027type:values\u0027:"},{"line_number":73,"context_line":"                                    [LIMIT_DOMAIN_FULL, LIMIT_DOMAIN_L2ONLY]},"}],"source_content_type":"text/x-python","patch_set":22,"id":"9a68dd71_1e8b7469","line":70,"in_reply_to":"9a68dd71_ab854ccf","updated":"2016-01-25 07:24:12.000000000","message":"it will be dynamically determined by the limited-portsec value in request, the port-sec value in the current port, and the limited-portsec value in networks which include the port.\n\nSo it will not have a fixed default value.","commit_id":"6a44a84a68d48232f21da2b183fd192969362585"}],"neutron/plugins/ml2/extensions/limit_portsec.py":[{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"c7a4d4e888cd9a905c6459ebc16656e7499f24ec","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from neutron.common import utils"},{"line_number":18,"context_line":"from neutron.db import common_db_mixin"},{"line_number":19,"context_line":"from neutron.db import portsecurity_db_common as ps_db_common"},{"line_number":20,"context_line":"from neutron.extensions import limited_portsec as limp"},{"line_number":21,"context_line":"from neutron.extensions import portsecurity as psec"},{"line_number":22,"context_line":"from neutron.i18n import _LI"},{"line_number":23,"context_line":"from neutron.plugins.ml2 import driver_api as api"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a740942_d42ef741","line":20,"updated":"2015-12-09 10:57:27.000000000","message":"nit: limp sounds strange, could we used lpsec something more descriptive?","commit_id":"56342982b22dcb4e3de510e950b5a77ae60759f0"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"1aa107ab6b05aa33ede0aa41b371a04c85df804f","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from neutron.common import utils"},{"line_number":18,"context_line":"from neutron.db import common_db_mixin"},{"line_number":19,"context_line":"from neutron.db import portsecurity_db_common as ps_db_common"},{"line_number":20,"context_line":"from neutron.extensions import limited_portsec as limp"},{"line_number":21,"context_line":"from neutron.extensions import portsecurity as psec"},{"line_number":22,"context_line":"from neutron.i18n import _LI"},{"line_number":23,"context_line":"from neutron.plugins.ml2 import driver_api as api"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a740942_091def65","line":20,"in_reply_to":"7a740942_d42ef741","updated":"2015-12-10 16:47:10.000000000","message":"Done","commit_id":"56342982b22dcb4e3de510e950b5a77ae60759f0"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"c7a4d4e888cd9a905c6459ebc16656e7499f24ec","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from oslo_log import log as logging"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class LimitPortSecExtensionDriver(api.ExtensionDriver,"},{"line_number":30,"context_line":"                                  ps_db_common.PortSecurityDbCommon,"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a740942_597a42be","line":27,"updated":"2015-12-09 10:57:27.000000000","message":"Just a cry: port security and this probably should be happening as core level extension, but we still have no framework for such thing.\n\nI hope that will be addressed during mitaka, and we could move a few extensions to be available on core.","commit_id":"56342982b22dcb4e3de510e950b5a77ae60759f0"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"1aa107ab6b05aa33ede0aa41b371a04c85df804f","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from oslo_log import log as logging"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class LimitPortSecExtensionDriver(api.ExtensionDriver,"},{"line_number":30,"context_line":"                                  ps_db_common.PortSecurityDbCommon,"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a740942_2946ab4f","line":27,"in_reply_to":"7a740942_597a42be","updated":"2015-12-10 16:47:10.000000000","message":"that\u0027s a good idea.","commit_id":"56342982b22dcb4e3de510e950b5a77ae60759f0"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"c7a4d4e888cd9a905c6459ebc16656e7499f24ec","unresolved":false,"context_lines":[{"line_number":54,"context_line":"                context, data, result)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def extend_port_dict(self, session, db_data, result):"},{"line_number":57,"context_line":"        self._extend_port_security_dict(result, db_data)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def _extend_port_security_dict(self, response_data, db_data):"},{"line_number":60,"context_line":"        if db_data.get(\u0027port_security\u0027) is None:"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a740942_b4ac8b9f","line":57,"updated":"2015-12-09 10:57:27.000000000","message":"nit: you don\u0027t seem to need the extra function, you\u0027re only calling it from here.","commit_id":"56342982b22dcb4e3de510e950b5a77ae60759f0"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"c7a4d4e888cd9a905c6459ebc16656e7499f24ec","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def _extend_port_security_dict(self, response_data, db_data):"},{"line_number":60,"context_line":"        if db_data.get(\u0027port_security\u0027) is None:"},{"line_number":61,"context_line":"            response_data[limp.LIMIT_PORTSECURITY] \u003d \"ALL\""},{"line_number":62,"context_line":"        else:"},{"line_number":63,"context_line":"            response_data[limp.LIMIT_PORTSECURITY] \u003d ("},{"line_number":64,"context_line":"                            db_data[\u0027port_security\u0027][limp.LIMIT_PORTSECURITY])"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a740942_34be5bae","line":61,"updated":"2015-12-09 10:57:27.000000000","message":"Could we use a constant for \"ALL\" from \"limp\" too?","commit_id":"56342982b22dcb4e3de510e950b5a77ae60759f0"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"1aa107ab6b05aa33ede0aa41b371a04c85df804f","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def _extend_port_security_dict(self, response_data, db_data):"},{"line_number":60,"context_line":"        if db_data.get(\u0027port_security\u0027) is None:"},{"line_number":61,"context_line":"            response_data[limp.LIMIT_PORTSECURITY] \u003d \"ALL\""},{"line_number":62,"context_line":"        else:"},{"line_number":63,"context_line":"            response_data[limp.LIMIT_PORTSECURITY] \u003d ("},{"line_number":64,"context_line":"                            db_data[\u0027port_security\u0027][limp.LIMIT_PORTSECURITY])"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a740942_e928a387","line":61,"in_reply_to":"7a740942_34be5bae","updated":"2015-12-10 16:47:10.000000000","message":"Done","commit_id":"56342982b22dcb4e3de510e950b5a77ae60759f0"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"c7a4d4e888cd9a905c6459ebc16656e7499f24ec","unresolved":false,"context_lines":[{"line_number":69,"context_line":"                raise limp.LimitedPortSecurityConflict"},{"line_number":70,"context_line":"            limit_portsec_domain \u003d port[limp.LIMIT_PORTSECURITY]"},{"line_number":71,"context_line":"        else:"},{"line_number":72,"context_line":"            limit_portsec_domain \u003d \"ALL\""},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        return limit_portsec_domain"},{"line_number":75,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7a740942_94e5cfdc","line":72,"updated":"2015-12-09 10:57:27.000000000","message":"ditto.","commit_id":"56342982b22dcb4e3de510e950b5a77ae60759f0"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"c7a4d4e888cd9a905c6459ebc16656e7499f24ec","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    # PortSecurityExtensionDriver, just to make the driver orderless, we need"},{"line_number":78,"context_line":"    # know the port-security value"},{"line_number":79,"context_line":"    def _determine_port_security(self, context, port):"},{"line_number":80,"context_line":"        if port.get(\u0027device_owner\u0027) and utils.is_port_trusted(port):"},{"line_number":81,"context_line":"            return False"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        if attrs.is_attr_set(port.get(psec.PORTSECURITY)):"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a740942_34489bb2","line":80,"updated":"2015-12-09 10:57:27.000000000","message":"This makes me think that may be this could be an optional part of the port security extension?, would that be possible?","commit_id":"56342982b22dcb4e3de510e950b5a77ae60759f0"}],"neutron/plugins/ml2/extensions/port_security.py":[{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"101df9a0e4fe3865c7139d2d5966f60c5133482e","unresolved":false,"context_lines":[{"line_number":47,"context_line":"                                [psec.PORTSECURITY][\u0027default\u0027])"},{"line_number":48,"context_line":"        else:"},{"line_number":49,"context_line":"            if data[psec.PORTSECURITY] is False:"},{"line_number":50,"context_line":"                data[psec.LIMIT_PORTSECURITY] \u003d psec.LIMIT_DOMAIN_ALL"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"        if not attrs.is_attr_set(data.get(psec.LIMIT_PORTSECURITY)):"},{"line_number":53,"context_line":"            data[psec.LIMIT_PORTSECURITY] \u003d (psec.LIMIT_DOMAIN_NONE if"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa69d971_8823da57","line":50,"range":{"start_line":50,"start_character":53,"end_line":50,"end_character":69},"updated":"2016-01-11 09:07:04.000000000","message":"Isn\u0027t this inverted, shouldn\u0027t it be \"NONE\" here?, and down  in line 53 ALL, then line 54 NONE?\n\nI\u0027m comparing to PS13\n\nMay be it\u0027s a good thing if you add a devref document, or an extended commit message where you explain the different combination of fields that we\u0027re proposing.\n\nThat was lacking on the spec, so we are now discussing it over code, and it looks fuzzy to me :-) (sorry to keep you circling around this.)","commit_id":"e441a7edfce030096c1c12e1673c448ce1670c06"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"ace1595b619cb3ff691ef4f4cfba8295690b18c9","unresolved":false,"context_lines":[{"line_number":47,"context_line":"                                [psec.PORTSECURITY][\u0027default\u0027])"},{"line_number":48,"context_line":"        else:"},{"line_number":49,"context_line":"            if data[psec.PORTSECURITY] is False:"},{"line_number":50,"context_line":"                data[psec.LIMIT_PORTSECURITY] \u003d psec.LIMIT_DOMAIN_ALL"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"        if not attrs.is_attr_set(data.get(psec.LIMIT_PORTSECURITY)):"},{"line_number":53,"context_line":"            data[psec.LIMIT_PORTSECURITY] \u003d (psec.LIMIT_DOMAIN_NONE if"}],"source_content_type":"text/x-python","patch_set":14,"id":"da6ed579_977ce621","line":50,"range":{"start_line":50,"start_character":53,"end_line":50,"end_character":69},"in_reply_to":"fa69d971_8823da57","updated":"2016-01-12 07:28:41.000000000","message":"Thanks Ajo for your patient for this patch, your comments really great helpful.\n\nI intended to set it to LIMIT_DOMAIN_ALL here. LIMIT_DOMAIN_ALL means limit all the port-sec, it is enforced set.\n\nI described some in commit msg and maybe not clear, that if the plugin support limit-portsec user could set limit-portsec to one of [\u0027none\u0027, \u0027mac-spoofing-only\u0027], which only works when port-sec is True.\n\n\u0027none\u0027 which is LIMIT_DOMAIN_NONE, indicate limit nothing here, the port-sec will work like before.\n\n\u0027mac-spoofing-only\u0027 which is LIMIT_DOMAIN_L2ONLY, indicate limit the portsec to L2 only. Like the up, setting only works when port-sec is True, but the security on L3 which based on IP address will be removed(in the future patch base on the limit-portsec).\n\n\u0027all\u0027 which is LIMIT_DOMAIN_ALL, could NOT be set from API request. It\u0027s set by extension/db automatically when port-sec is False, which means neutron will limit \u0027all\u0027 the port-sec, that equals to port-sec is False. (I add this value because I am afraid that user maybe confused the meaning of the same \u0027none\u0027 when port-sec is True or False. And maybe to make it easy to read, we can use \u0027\u0027).\n\nLast, if the plugin not supports the limit-portsec, I want to set limit-portsec to \u0027not supported\u0027 which is LIMIT_DOMAIN_NOTSUPPORT(have not added in the current patch).\n\nThen the valid value combination would be:\n\nportsec Ture/False, limit-portsec LIMIT_DOMAIN_NOTSUPPORT\nportset True, limit-portsec LIMIT_DOMAIN_NONE\nportset True, limit-portsec LIMIT_DOMAIN_L2ONLY\nportset False, limit-portsec LIMIT_DOMAIN_ALL\n\nthere will be check_confict when create/updating the related values.\n\nfor the default value senario:\nwhen input only include False portsec, limit-portsec will be set to LIMIT_DOMAIN_ALL enforcely.","commit_id":"e441a7edfce030096c1c12e1673c448ce1670c06"}],"neutron/tests/unit/extensions/test_portsecurity.py":[{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"77ac8cb70ec0d49ca0040c7d37cefa22f6594131","unresolved":false,"context_lines":[{"line_number":173,"context_line":""},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"class TestPortSecurity(PortSecurityDBTestCase):"},{"line_number":176,"context_line":"    def plugin_support_limited_portsec(self):"},{"line_number":177,"context_line":"        plugin_obj \u003d manager.NeutronManager.get_plugin()"},{"line_number":178,"context_line":"        if (getattr(plugin_obj, \u0027sp_limited_portsec\u0027, None) and"},{"line_number":179,"context_line":"            plugin_obj.sp_limited_portsec() is False):"}],"source_content_type":"text/x-python","patch_set":15,"id":"da6ed579_c0028d3e","line":176,"range":{"start_line":176,"start_character":8,"end_line":176,"end_character":38},"updated":"2016-01-12 10:29:00.000000000","message":"now the limit-portsec support or not is stored in db class, it\u0027s a problem that how to make plugin to aware it.\n\nif the plugin inhert from the db class, it\u0027s easy to get the info. \nbut for the plugin which uses extensions like ML2, it could only see port-sec from its support_alias list, and it could not know if it support limit-portsec or not.","commit_id":"0128b5f3a7f6f1507747eb6e34af4b2d9ea12359"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"2ae70e098b7a4e04ac0828990840f7e2cdb5a17a","unresolved":false,"context_lines":[{"line_number":282,"context_line":"        if not self.plugin_support_limited_portsec():"},{"line_number":283,"context_line":"            # if the plugin only check the port-sec in request, there will be"},{"line_number":284,"context_line":"            # no exception psec.LimitedPortSecurityNotSupport here, so we need"},{"line_number":285,"context_line":"            # change the plugin code."},{"line_number":286,"context_line":"            self.assertEqual(res.status_int, 400)"},{"line_number":287,"context_line":"            return"},{"line_number":288,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"5a5ae5dd_027160e0","line":285,"updated":"2016-02-04 04:52:43.000000000","message":"how do we need to change plugin?","commit_id":"50615b3e7d52bf2f0dd41fb89abc223ea04dcb23"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"241f1df440e78ddf66ca54d18350ea7a6c6e125b","unresolved":false,"context_lines":[{"line_number":282,"context_line":"        if not self.plugin_support_limited_portsec():"},{"line_number":283,"context_line":"            # if the plugin only check the port-sec in request, there will be"},{"line_number":284,"context_line":"            # no exception psec.LimitedPortSecurityNotSupport here, so we need"},{"line_number":285,"context_line":"            # change the plugin code."},{"line_number":286,"context_line":"            self.assertEqual(res.status_int, 400)"},{"line_number":287,"context_line":"            return"},{"line_number":288,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"dae33548_7655161c","line":285,"in_reply_to":"5a5ae5dd_027160e0","updated":"2016-02-15 03:35:07.000000000","message":"I understand wrong here, will remove it. we can use support_limited_portsec in base class to indicate.","commit_id":"50615b3e7d52bf2f0dd41fb89abc223ea04dcb23"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"2ae70e098b7a4e04ac0828990840f7e2cdb5a17a","unresolved":false,"context_lines":[{"line_number":283,"context_line":"            # if the plugin only check the port-sec in request, there will be"},{"line_number":284,"context_line":"            # no exception psec.LimitedPortSecurityNotSupport here, so we need"},{"line_number":285,"context_line":"            # change the plugin code."},{"line_number":286,"context_line":"            self.assertEqual(res.status_int, 400)"},{"line_number":287,"context_line":"            return"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"        net \u003d self.deserialize(\u0027json\u0027, res)"}],"source_content_type":"text/x-python","patch_set":25,"id":"5a5ae5dd_827d50b3","line":286,"updated":"2016-02-04 04:52:43.000000000","message":"(expected, observed)","commit_id":"50615b3e7d52bf2f0dd41fb89abc223ea04dcb23"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"241f1df440e78ddf66ca54d18350ea7a6c6e125b","unresolved":false,"context_lines":[{"line_number":283,"context_line":"            # if the plugin only check the port-sec in request, there will be"},{"line_number":284,"context_line":"            # no exception psec.LimitedPortSecurityNotSupport here, so we need"},{"line_number":285,"context_line":"            # change the plugin code."},{"line_number":286,"context_line":"            self.assertEqual(res.status_int, 400)"},{"line_number":287,"context_line":"            return"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"        net \u003d self.deserialize(\u0027json\u0027, res)"}],"source_content_type":"text/x-python","patch_set":25,"id":"dae33548_d02b4a32","line":286,"in_reply_to":"5a5ae5dd_827d50b3","updated":"2016-02-15 03:35:07.000000000","message":"Done","commit_id":"50615b3e7d52bf2f0dd41fb89abc223ea04dcb23"}]}
