)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"e658c4813b9db4d4f753384f64cd937a72f0da3e","unresolved":false,"context_lines":[{"line_number":12,"context_line":"physical function (associated with the virtual function)"},{"line_number":13,"context_line":"is on."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Partially implements: ml2-ucs-manager-mechanism-driver"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: If1d5169c563a19e781a0d16d9560fc231ba4251c"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"baada198_9bb5b2d1","line":15,"updated":"2014-08-13 11:56:50.000000000","message":"Can you please either provide the list of planned change sets to provide complete solution?","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"93bb184eced89dd5b7d158651bfbbb3a3a1e74e7","unresolved":false,"context_lines":[{"line_number":12,"context_line":"physical function (associated with the virtual function)"},{"line_number":13,"context_line":"is on."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Partially implements: ml2-ucs-manager-mechanism-driver"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: If1d5169c563a19e781a0d16d9560fc231ba4251c"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"baada198_fa44d377","line":15,"in_reply_to":"baada198_9bb5b2d1","updated":"2014-08-13 23:56:12.000000000","message":"Left over from a very early commit. Changed the text since the implementation is not split between diff BPs or bugs.","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"bd4e15411119f85318134ecabeb2a87c7d3161bc","unresolved":false,"context_lines":[{"line_number":12,"context_line":"physical function (associated with the virtual function) is on."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Implements: blueprint ml2-ucs-manager-mechanism-driver"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: If1d5169c563a19e781a0d16d9560fc231ba4251c"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"1abeadc6_3a2a872c","line":15,"updated":"2014-08-27 12:34:26.000000000","message":"DocImpact for a new ML2 driver with new config options?\n\nAlso, is this driver to be used in addition to a specific set of ML2 driver(s)?","commit_id":"e0533cf083d268c69dc27cd0a02b4439c2c11d81"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"a368027a51986c0526c9d4779545a4798931ee6e","unresolved":false,"context_lines":[{"line_number":12,"context_line":"physical function (associated with the virtual function) is on."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Implements: blueprint ml2-ucs-manager-mechanism-driver"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: If1d5169c563a19e781a0d16d9560fc231ba4251c"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"1abeadc6_69b9962d","line":15,"in_reply_to":"1abeadc6_3a2a872c","updated":"2014-08-28 09:22:14.000000000","message":"This ML2 driver implements its own bind_port method. It does not need to specifically work with any other ML2 driver. But, it only binds VM-FEX ports and SR-IOV ports, all regular virtual NICs need to be handled by a diff MD.","commit_id":"e0533cf083d268c69dc27cd0a02b4439c2c11d81"}],"etc/neutron/plugins/ml2/ml2_conf_cisco.ini":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"540ec445cf4f3909e974184a07a62919cf34e1b8","unresolved":false,"context_lines":[{"line_number":46,"context_line":"[ml2_cisco_ucsm]"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"# IP Address for UCS Manager"},{"line_number":49,"context_line":"# ucsm_ip\u003d1.1.1.1"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"# Username for UCS Manager admin"},{"line_number":52,"context_line":"# ucsm_username \u003d username"}],"source_content_type":"text/x-properties","patch_set":1,"id":"AAAAUX%2F%2B9pQ%3D","line":49,"updated":"2014-02-18 00:05:28.000000000","message":"Maybe management_ip or mgmt_ip?\n\nOn all of these, since they are under ml2_cisco_ucsm, can the ucsm_ prefix be removed (or is it needed for command line)?","commit_id":"395ccb1c9de991833dd42507f5efafe0da472794"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"aa59348782f57fd19c6dc26a5abfa0101f20cfc0","unresolved":false,"context_lines":[{"line_number":46,"context_line":"[ml2_cisco_ucsm]"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"# IP Address for UCS Manager"},{"line_number":49,"context_line":"# ucsm_ip\u003d1.1.1.1"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"# Username for UCS Manager admin"},{"line_number":52,"context_line":"# ucsm_username \u003d username"}],"source_content_type":"text/x-properties","patch_set":1,"id":"AAAAU3%2F%2FbV0%3D","line":49,"in_reply_to":"AAAAUX%2F%2B9pQ%3D","updated":"2014-02-27 17:41:09.000000000","message":"This a temporary way to handle several MDs adding to this file. Will come up with a better approach after consulting with other MDs using this same .ini file. Will be handled as a separate BP/bug.","commit_id":"395ccb1c9de991833dd42507f5efafe0da472794"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"d837268fa56b1683fca3f0eee4e9c566aa55abc3","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":"# SR-IOV and VM-FEX vendors supported by this plugin"},{"line_number":108,"context_line":"# xxxx:yyyy represents vendor_id:product_id"},{"line_number":109,"context_line":"# supported_vendors \u003d [\u00272222:3333\u0027, \u00274444:5555\u0027]"}],"source_content_type":"text/x-properties","patch_set":4,"id":"baada198_9022a800","line":109,"updated":"2014-08-07 16:15:15.000000000","message":"supported_vnics? or supported_sriov_adaptors? or supported_vendor_info? to be consistent with the naming in the code\n\nthese are device identifiers.","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"bfb5e500d13dfb017a123cf95ef3271c0176310b","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":"# SR-IOV and VM-FEX vendors supported by this plugin"},{"line_number":108,"context_line":"# xxxx:yyyy represents vendor_id:product_id"},{"line_number":109,"context_line":"# supported_vendors \u003d [\u00272222:3333\u0027, \u00274444:5555\u0027]"}],"source_content_type":"text/x-properties","patch_set":4,"id":"baada198_628c4ad9","line":109,"in_reply_to":"baada198_9022a800","updated":"2014-08-08 22:01:07.000000000","message":"Done","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"change_message_id":"ab3c5b909a13b9101a0d06e51ea36a45bae8be53","unresolved":false,"context_lines":[{"line_number":96,"context_line":"[ml2_cisco_ucsm]"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"# Cisco UCS Manager IP address"},{"line_number":99,"context_line":"# ucsm_ip\u003d1.1.1.1"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"# Username to connect to UCS Manager"},{"line_number":102,"context_line":"# ucsm_username\u003duser"}],"source_content_type":"text/x-properties","patch_set":5,"id":"baada198_5b9fb7b3","line":99,"updated":"2014-08-12 18:53:16.000000000","message":"Only a single UCSM will be supported?","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"62d83dfe6bc5ee40fb0f9b0f3cd0ce74012563e2","unresolved":false,"context_lines":[{"line_number":96,"context_line":"[ml2_cisco_ucsm]"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"# Cisco UCS Manager IP address"},{"line_number":99,"context_line":"# ucsm_ip\u003d1.1.1.1"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"# Username to connect to UCS Manager"},{"line_number":102,"context_line":"# ucsm_username\u003duser"}],"source_content_type":"text/x-properties","patch_set":5,"id":"baada198_7b737e1c","line":99,"in_reply_to":"baada198_5b9fb7b3","updated":"2014-08-13 14:31:58.000000000","message":"Yes, currently supporting one UCS Manager per Openstack cloud. This seems to be the typical setup.","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":8645,"name":"Trinath Somanchi","email":"trinath.somanchi@freescale.com","username":"trinaths"},"change_message_id":"b190526619b00da12c55a449d322af08e2b77b6f","unresolved":false,"context_lines":[{"line_number":96,"context_line":"[ml2_cisco_ucsm]"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"# Cisco UCS Manager IP address"},{"line_number":99,"context_line":"# ucsm_ip\u003d1.1.1.1"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"# Username to connect to UCS Manager"},{"line_number":102,"context_line":"# ucsm_username\u003duser"}],"source_content_type":"text/x-properties","patch_set":14,"id":"1abeadc6_1a586b31","line":99,"updated":"2014-08-27 12:14:25.000000000","message":"space between key-value pairs.","commit_id":"e0533cf083d268c69dc27cd0a02b4439c2c11d81"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"a368027a51986c0526c9d4779545a4798931ee6e","unresolved":false,"context_lines":[{"line_number":96,"context_line":"[ml2_cisco_ucsm]"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"# Cisco UCS Manager IP address"},{"line_number":99,"context_line":"# ucsm_ip\u003d1.1.1.1"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"# Username to connect to UCS Manager"},{"line_number":102,"context_line":"# ucsm_username\u003duser"}],"source_content_type":"text/x-properties","patch_set":14,"id":"1abeadc6_73db451b","line":99,"in_reply_to":"1abeadc6_1a586b31","updated":"2014-08-28 09:22:14.000000000","message":"I am just following the convention being followed in the rest of the file. Adding spaces between key-value pairs can be taken up as a separate bug fix.","commit_id":"e0533cf083d268c69dc27cd0a02b4439c2c11d81"},{"author":{"_account_id":7018,"name":"Abhishek Raut","email":"rauta@vmware.com","username":"abhiraut"},"change_message_id":"8cba2969833c809fd86ef7de3d8b729b0aa9a5ba","unresolved":false,"context_lines":[{"line_number":96,"context_line":"[ml2_cisco_ucsm]"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"# Cisco UCS Manager IP address"},{"line_number":99,"context_line":"# ucsm_ip\u003d1.1.1.1"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"# Username to connect to UCS Manager"},{"line_number":102,"context_line":"# ucsm_username\u003duser"}],"source_content_type":"text/x-properties","patch_set":14,"id":"1abeadc6_6c48bfb3","line":99,"in_reply_to":"1abeadc6_1a586b31","updated":"2014-08-27 19:04:08.000000000","message":"Maybe this can be addressed with a separate bug since the rest of the ini file does not have any spaces as you suggest.","commit_id":"e0533cf083d268c69dc27cd0a02b4439c2c11d81"},{"author":{"_account_id":7987,"name":"Ivar Lazzaro","email":"ivarlazzaro@gmail.com","username":"Ivar"},"change_message_id":"dd8a70a8f9240ed5ce89c4b1d162b334dbda4da8","unresolved":false,"context_lines":[{"line_number":92,"context_line":"# ubuntu5,ubuntu6\u003d1/1"},{"line_number":93,"context_line":"# ubuntu7,ubuntu8\u003d1/2"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"\u003c\u003c\u003c\u003c\u003c\u003c\u003c HEAD"},{"line_number":96,"context_line":"# Describe external connectivity."},{"line_number":97,"context_line":"# In this section you can specify the external network configuration in order"},{"line_number":98,"context_line":"# for the plugin to be able to teach the fabric how to route the internal"}],"source_content_type":"text/x-properties","patch_set":19,"id":"fa98f980_0f06cf20","line":95,"updated":"2014-09-01 06:18:25.000000000","message":"remove this","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"e6512117504ca66d5900b10d53061a10a85d5167","unresolved":false,"context_lines":[{"line_number":92,"context_line":"# ubuntu5,ubuntu6\u003d1/1"},{"line_number":93,"context_line":"# ubuntu7,ubuntu8\u003d1/2"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"\u003c\u003c\u003c\u003c\u003c\u003c\u003c HEAD"},{"line_number":96,"context_line":"# Describe external connectivity."},{"line_number":97,"context_line":"# In this section you can specify the external network configuration in order"},{"line_number":98,"context_line":"# for the plugin to be able to teach the fabric how to route the internal"}],"source_content_type":"text/x-properties","patch_set":19,"id":"fa98f980_eb5faa70","line":95,"in_reply_to":"fa98f980_0f06cf20","updated":"2014-09-02 17:17:31.000000000","message":"Done","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":6698,"name":"Robert Pothier","email":"robpothier35@gmail.com","username":"rpothier"},"change_message_id":"14de9b2df12d7cbeba05e0c710f810ff1e3a03fa","unresolved":false,"context_lines":[{"line_number":147,"context_line":"# supported_pci_devs \u003d [\u00272222:3333\u0027, \u00274444:5555\u0027]"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"# Names of physical networks handled by UCS Manager"},{"line_number":150,"context_line":"# supported-phy_nets \u003d [\u0027physnet1\u0027, \u0027physnet2\u0027]"},{"line_number":151,"context_line":""}],"source_content_type":"text/x-properties","patch_set":21,"id":"fa98f980_e04c6744","line":150,"updated":"2014-09-15 15:37:33.000000000","message":"is this supported_phy_nets?","commit_id":"1210e194c1ef5246d95ab8743d9bc223659f9731"}],"neutron/common/constants.py":[{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"dfa8852f53f86af63b26a525416e68240a7b4d25","unresolved":false,"context_lines":[{"line_number":88,"context_line":"AGENT_TYPE_METADATA \u003d \u0027Metadata agent\u0027"},{"line_number":89,"context_line":"AGENT_TYPE_SDNVE \u003d \u0027IBM SDN-VE agent\u0027"},{"line_number":90,"context_line":"AGENT_TYPE_NIC_SWITCH \u003d \u0027NIC Switch agent\u0027"},{"line_number":91,"context_line":"AGENT_TYPE_SRIOV_NONE \u003d \u0027SR-IOV No agent\u0027"},{"line_number":92,"context_line":"L2_AGENT_TOPIC \u003d \u0027N/A\u0027"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"PAGINATION_INFINITE \u003d \u0027infinite\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"7ac7a964_10da6378","line":91,"updated":"2014-08-14 12:49:29.000000000","message":"why this constant needed?","commit_id":"7a300e17d9c420c64e0949de75a8d0a374bb4216"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"f079ee091d7d4a7651fb212d05964cad1312e294","unresolved":false,"context_lines":[{"line_number":88,"context_line":"AGENT_TYPE_METADATA \u003d \u0027Metadata agent\u0027"},{"line_number":89,"context_line":"AGENT_TYPE_SDNVE \u003d \u0027IBM SDN-VE agent\u0027"},{"line_number":90,"context_line":"AGENT_TYPE_NIC_SWITCH \u003d \u0027NIC Switch agent\u0027"},{"line_number":91,"context_line":"AGENT_TYPE_SRIOV_NONE \u003d \u0027SR-IOV No agent\u0027"},{"line_number":92,"context_line":"L2_AGENT_TOPIC \u003d \u0027N/A\u0027"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"PAGINATION_INFINITE \u003d \u0027infinite\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"1abeadc6_11426010","line":91,"in_reply_to":"7ac7a964_10da6378","updated":"2014-08-19 12:37:39.000000000","message":"This was needed when CiscoUcsmMechanismDriver was inheriting from SimpleAgentechanismDriverBase. Now, that it is inheriting from MechanismDriver, this change is not required. Removing.","commit_id":"7a300e17d9c420c64e0949de75a8d0a374bb4216"}],"neutron/db/migration/alembic_migrations/versions/20b99fd19d4f_cisco_ucs_manager_mechanism_driver.py":[{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"693eb4e9071537d8aa4222b1e5433a79b633051a","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        sa.Column(\u0027profile_id\u0027, sa.String(length\u003d64), nullable\u003dFalse),"},{"line_number":37,"context_line":"        sa.Column(\u0027vlan_id\u0027, sa.Integer(), nullable\u003dFalse),"},{"line_number":38,"context_line":"        sa.PrimaryKeyConstraint(\u0027profile_id\u0027),"},{"line_number":39,"context_line":"        mysql_engine\u003d\u0027InnoDB\u0027"},{"line_number":40,"context_line":"    )"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"1abeadc6_a300dd34","line":39,"updated":"2014-08-22 08:18:21.000000000","message":"This line is not needed anymore. InnoDB sets automatically with event listener.","commit_id":"50322a2e39e34aca8532dc3af5448378cfcb3f58"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"83cb0eefbec1dcd60a460a0846c0ed7587872c45","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        sa.Column(\u0027profile_id\u0027, sa.String(length\u003d64), nullable\u003dFalse),"},{"line_number":37,"context_line":"        sa.Column(\u0027vlan_id\u0027, sa.Integer(), nullable\u003dFalse),"},{"line_number":38,"context_line":"        sa.PrimaryKeyConstraint(\u0027profile_id\u0027),"},{"line_number":39,"context_line":"        mysql_engine\u003d\u0027InnoDB\u0027"},{"line_number":40,"context_line":"    )"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"1abeadc6_ff59788e","line":39,"in_reply_to":"1abeadc6_a300dd34","updated":"2014-08-22 16:56:28.000000000","message":"Done","commit_id":"50322a2e39e34aca8532dc3af5448378cfcb3f58"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"c5accaf73107d77d25e79f1bbf1cc9b2ef836fe9","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        \u0027ml2_ucsm_port_profiles\u0027,"},{"line_number":36,"context_line":"        sa.Column(\u0027profile_id\u0027, sa.String(length\u003d64), nullable\u003dFalse),"},{"line_number":37,"context_line":"        sa.Column(\u0027vlan_id\u0027, sa.Integer(), nullable\u003dFalse),"},{"line_number":38,"context_line":"        sa.PrimaryKeyConstraint(\u0027profile_id\u0027)"},{"line_number":39,"context_line":"    )"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_e7460f23","line":38,"updated":"2014-09-01 07:02:21.000000000","message":"No FKs to profiles table?","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"e6512117504ca66d5900b10d53061a10a85d5167","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        \u0027ml2_ucsm_port_profiles\u0027,"},{"line_number":36,"context_line":"        sa.Column(\u0027profile_id\u0027, sa.String(length\u003d64), nullable\u003dFalse),"},{"line_number":37,"context_line":"        sa.Column(\u0027vlan_id\u0027, sa.Integer(), nullable\u003dFalse),"},{"line_number":38,"context_line":"        sa.PrimaryKeyConstraint(\u0027profile_id\u0027)"},{"line_number":39,"context_line":"    )"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_6b7e5ab0","line":38,"in_reply_to":"fa98f980_e7460f23","updated":"2014-09-02 17:17:31.000000000","message":"Yes, I don\u0027t need a FK to any other tables.","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"}],"neutron/db/migration/alembic_migrations/versions/HEAD":[{"author":{"_account_id":8645,"name":"Trinath Somanchi","email":"trinath.somanchi@freescale.com","username":"trinaths"},"change_message_id":"b190526619b00da12c55a449d322af08e2b77b6f","unresolved":false,"context_lines":[{"line_number":1,"context_line":"20b99fd19d4f"},{"line_number":2,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":14,"id":"1abeadc6_ba46974d","line":2,"updated":"2014-08-27 12:14:25.000000000","message":"remove newlines and spaces","commit_id":"e0533cf083d268c69dc27cd0a02b4439c2c11d81"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"a368027a51986c0526c9d4779545a4798931ee6e","unresolved":false,"context_lines":[{"line_number":1,"context_line":"20b99fd19d4f"},{"line_number":2,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":14,"id":"1abeadc6_f3359546","line":2,"in_reply_to":"1abeadc6_ba46974d","updated":"2014-08-28 09:22:14.000000000","message":"Done","commit_id":"e0533cf083d268c69dc27cd0a02b4439c2c11d81"}],"neutron/extensions/portbindings.py":[{"author":{"_account_id":7987,"name":"Ivar Lazzaro","email":"ivarlazzaro@gmail.com","username":"Ivar"},"change_message_id":"dd8a70a8f9240ed5ce89c4b1d162b334dbda4da8","unresolved":false,"context_lines":[{"line_number":46,"context_line":"CAP_PORT_FILTER \u003d \u0027port_filter\u0027"},{"line_number":47,"context_line":"OVS_HYBRID_PLUG \u003d \u0027ovs_hybrid_plug\u0027"},{"line_number":48,"context_line":"VIF_DETAILS_VLAN \u003d \u0027vlan\u0027"},{"line_number":49,"context_line":"VIF_DETAILS_PROFILEID \u003d \u0027profileid\u0027"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"VIF_TYPE_UNBOUND \u003d \u0027unbound\u0027"},{"line_number":52,"context_line":"VIF_TYPE_BINDING_FAILED \u003d \u0027binding_failed\u0027"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_1a344fdd","line":49,"updated":"2014-09-01 06:18:25.000000000","message":"Since this is consumed by your mechanism driver alone, I would suggest to move it in ml2.drivers.cisco.ucsm.constants module","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"c5accaf73107d77d25e79f1bbf1cc9b2ef836fe9","unresolved":false,"context_lines":[{"line_number":46,"context_line":"CAP_PORT_FILTER \u003d \u0027port_filter\u0027"},{"line_number":47,"context_line":"OVS_HYBRID_PLUG \u003d \u0027ovs_hybrid_plug\u0027"},{"line_number":48,"context_line":"VIF_DETAILS_VLAN \u003d \u0027vlan\u0027"},{"line_number":49,"context_line":"VIF_DETAILS_PROFILEID \u003d \u0027profileid\u0027"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"VIF_TYPE_UNBOUND \u003d \u0027unbound\u0027"},{"line_number":52,"context_line":"VIF_TYPE_BINDING_FAILED \u003d \u0027binding_failed\u0027"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_2748172d","line":49,"in_reply_to":"fa98f980_1a344fdd","updated":"2014-09-01 07:02:21.000000000","message":"+1","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"e6512117504ca66d5900b10d53061a10a85d5167","unresolved":false,"context_lines":[{"line_number":46,"context_line":"CAP_PORT_FILTER \u003d \u0027port_filter\u0027"},{"line_number":47,"context_line":"OVS_HYBRID_PLUG \u003d \u0027ovs_hybrid_plug\u0027"},{"line_number":48,"context_line":"VIF_DETAILS_VLAN \u003d \u0027vlan\u0027"},{"line_number":49,"context_line":"VIF_DETAILS_PROFILEID \u003d \u0027profileid\u0027"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"VIF_TYPE_UNBOUND \u003d \u0027unbound\u0027"},{"line_number":52,"context_line":"VIF_TYPE_BINDING_FAILED \u003d \u0027binding_failed\u0027"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_f75bc884","line":49,"in_reply_to":"fa98f980_1a344fdd","updated":"2014-09-02 17:17:31.000000000","message":"The keys to the VIF_DETAILS attribute needs to be defined in this file even if it is currently being used only by one MD. VIF_DETAILS_PROFILEID is a key for the VIF_DETAILS attribute. This value would be consumed by the VIF driver and set by this MD.","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"e6512117504ca66d5900b10d53061a10a85d5167","unresolved":false,"context_lines":[{"line_number":46,"context_line":"CAP_PORT_FILTER \u003d \u0027port_filter\u0027"},{"line_number":47,"context_line":"OVS_HYBRID_PLUG \u003d \u0027ovs_hybrid_plug\u0027"},{"line_number":48,"context_line":"VIF_DETAILS_VLAN \u003d \u0027vlan\u0027"},{"line_number":49,"context_line":"VIF_DETAILS_PROFILEID \u003d \u0027profileid\u0027"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"VIF_TYPE_UNBOUND \u003d \u0027unbound\u0027"},{"line_number":52,"context_line":"VIF_TYPE_BINDING_FAILED \u003d \u0027binding_failed\u0027"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_b6b6f788","line":49,"in_reply_to":"fa98f980_2748172d","updated":"2014-09-02 17:17:31.000000000","message":"See comment above.","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"c121a2e800402f225296de24451567338e75f83e","unresolved":false,"context_lines":[{"line_number":46,"context_line":"CAP_PORT_FILTER \u003d \u0027port_filter\u0027"},{"line_number":47,"context_line":"OVS_HYBRID_PLUG \u003d \u0027ovs_hybrid_plug\u0027"},{"line_number":48,"context_line":"VIF_DETAILS_VLAN \u003d \u0027vlan\u0027"},{"line_number":49,"context_line":"VIF_DETAILS_PROFILEID \u003d \u0027profileid\u0027"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"VIF_TYPE_UNBOUND \u003d \u0027unbound\u0027"},{"line_number":52,"context_line":"VIF_TYPE_BINDING_FAILED \u003d \u0027binding_failed\u0027"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa98f980_ce4e2996","line":49,"updated":"2014-09-02 18:59:46.000000000","message":"Is the interpretation of this by the Nova VIF driver specific to either UCS or to SR-IOV? If so, I think the name should be something like \"ucs_profileid\" or \"sriov_profileid\".","commit_id":"aeb18ba9ccd5243a715ea25e846ca079fc5bad13"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"6b855146ddb39bd9e11c7a1a0ce0740125c4b9fc","unresolved":false,"context_lines":[{"line_number":46,"context_line":"CAP_PORT_FILTER \u003d \u0027port_filter\u0027"},{"line_number":47,"context_line":"OVS_HYBRID_PLUG \u003d \u0027ovs_hybrid_plug\u0027"},{"line_number":48,"context_line":"VIF_DETAILS_VLAN \u003d \u0027vlan\u0027"},{"line_number":49,"context_line":"VIF_DETAILS_PROFILEID \u003d \u0027profileid\u0027"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"VIF_TYPE_UNBOUND \u003d \u0027unbound\u0027"},{"line_number":52,"context_line":"VIF_TYPE_BINDING_FAILED \u003d \u0027binding_failed\u0027"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa98f980_f065721e","line":49,"in_reply_to":"fa98f980_ce4e2996","updated":"2014-09-09 15:44:03.000000000","message":"Done","commit_id":"aeb18ba9ccd5243a715ea25e846ca079fc5bad13"}],"neutron/plugins/ml2/drivers/cisco/ucsm/config.py":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"540ec445cf4f3909e974184a07a62919cf34e1b8","unresolved":false,"context_lines":[{"line_number":26,"context_line":"ml2_cisco_ucsm_opts \u003d ["},{"line_number":27,"context_line":"    cfg.StrOpt(\u0027ucsm_ip\u0027,"},{"line_number":28,"context_line":"               default\u003d\u0027\u0027,"},{"line_number":29,"context_line":"               help\u003d_(\u0027Cisco UCS Manager IP address. This is required field\u0027"},{"line_number":30,"context_line":"                      \u0027to communiate with a Cisco UCS Manager\u0027)),"},{"line_number":31,"context_line":"    cfg.StrOpt(\u0027ucsm_username\u0027,"},{"line_number":32,"context_line":"               default\u003d\u0027\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUX%2F%2B9pI%3D","line":29,"updated":"2014-02-18 00:05:28.000000000","message":"Missing space at end of this and following string continuations. Not sure we need to make it explicit that the fields are required in help text.","commit_id":"395ccb1c9de991833dd42507f5efafe0da472794"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"aa59348782f57fd19c6dc26a5abfa0101f20cfc0","unresolved":false,"context_lines":[{"line_number":26,"context_line":"ml2_cisco_ucsm_opts \u003d ["},{"line_number":27,"context_line":"    cfg.StrOpt(\u0027ucsm_ip\u0027,"},{"line_number":28,"context_line":"               default\u003d\u0027\u0027,"},{"line_number":29,"context_line":"               help\u003d_(\u0027Cisco UCS Manager IP address. This is required field\u0027"},{"line_number":30,"context_line":"                      \u0027to communiate with a Cisco UCS Manager\u0027)),"},{"line_number":31,"context_line":"    cfg.StrOpt(\u0027ucsm_username\u0027,"},{"line_number":32,"context_line":"               default\u003d\u0027\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2FbVI%3D","line":29,"in_reply_to":"AAAAUX%2F%2B9pI%3D","updated":"2014-02-27 17:41:09.000000000","message":"Done","commit_id":"395ccb1c9de991833dd42507f5efafe0da472794"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"6e59fc3a6b6a81827b6459f3bc6fc1c975a9900d","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2013 OpenStack Foundation"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2FUIs%3D","line":1,"updated":"2014-03-06 22:12:32.000000000","message":"change to 2014","commit_id":"05e9f7f85e1f5391e383199e273b12d80616bc53"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"dc0bfec684c0ca658e3175ae860d4fa473265a3e","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2013 OpenStack Foundation"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_cb82c193","line":1,"in_reply_to":"AAAAVn%2F%2FUIs%3D","updated":"2014-08-05 22:46:32.000000000","message":"Done","commit_id":"05e9f7f85e1f5391e383199e273b12d80616bc53"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"439020ed117e801a5052ea7a7f0b8c4d31127762","unresolved":false,"context_lines":[{"line_number":20,"context_line":"Following are user configurable options for UCS Manager ML2 Mechanism"},{"line_number":21,"context_line":"driver. The ucsm_username, ucsm_password, and ucsm_ip are"},{"line_number":22,"context_line":"required options. Additional configuration knobs are provided to pre-"},{"line_number":23,"context_line":"create Ucs Manager port profiles."},{"line_number":24,"context_line":"\"\"\""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"ml2_cisco_ucsm_opts \u003d ["}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_813287f1","line":23,"updated":"2014-08-06 19:04:57.000000000","message":"Ucs -\u003e UCS","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"bfb5e500d13dfb017a123cf95ef3271c0176310b","unresolved":false,"context_lines":[{"line_number":20,"context_line":"Following are user configurable options for UCS Manager ML2 Mechanism"},{"line_number":21,"context_line":"driver. The ucsm_username, ucsm_password, and ucsm_ip are"},{"line_number":22,"context_line":"required options. Additional configuration knobs are provided to pre-"},{"line_number":23,"context_line":"create Ucs Manager port profiles."},{"line_number":24,"context_line":"\"\"\""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"ml2_cisco_ucsm_opts \u003d ["}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_62a36a44","line":23,"in_reply_to":"baada198_813287f1","updated":"2014-08-08 22:01:07.000000000","message":"Done","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"439020ed117e801a5052ea7a7f0b8c4d31127762","unresolved":false,"context_lines":[{"line_number":26,"context_line":"ml2_cisco_ucsm_opts \u003d ["},{"line_number":27,"context_line":"    cfg.StrOpt(\u0027ucsm_ip\u0027,"},{"line_number":28,"context_line":"               help\u003d_(\u0027Cisco UCS Manager IP address. This is required field \u0027"},{"line_number":29,"context_line":"                      \u0027to communiate with a Cisco UCS Manager\u0027)),"},{"line_number":30,"context_line":"    cfg.StrOpt(\u0027ucsm_username\u0027,"},{"line_number":31,"context_line":"               help\u003d_(\u0027Username for UCS manager. This is required field \u0027"},{"line_number":32,"context_line":"                      \u0027to communiate with a Cisco UCS Manager\u0027)),"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_6607491f","line":29,"updated":"2014-08-06 19:04:57.000000000","message":"communiate -\u003e communicate","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"bfb5e500d13dfb017a123cf95ef3271c0176310b","unresolved":false,"context_lines":[{"line_number":26,"context_line":"ml2_cisco_ucsm_opts \u003d ["},{"line_number":27,"context_line":"    cfg.StrOpt(\u0027ucsm_ip\u0027,"},{"line_number":28,"context_line":"               help\u003d_(\u0027Cisco UCS Manager IP address. This is required field \u0027"},{"line_number":29,"context_line":"                      \u0027to communiate with a Cisco UCS Manager\u0027)),"},{"line_number":30,"context_line":"    cfg.StrOpt(\u0027ucsm_username\u0027,"},{"line_number":31,"context_line":"               help\u003d_(\u0027Username for UCS manager. This is required field \u0027"},{"line_number":32,"context_line":"                      \u0027to communiate with a Cisco UCS Manager\u0027)),"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_82a07e37","line":29,"in_reply_to":"baada198_6607491f","updated":"2014-08-08 22:01:07.000000000","message":"Done","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"d837268fa56b1683fca3f0eee4e9c566aa55abc3","unresolved":false,"context_lines":[{"line_number":28,"context_line":"               help\u003d_(\u0027Cisco UCS Manager IP address. This is required field \u0027"},{"line_number":29,"context_line":"                      \u0027to communiate with a Cisco UCS Manager\u0027)),"},{"line_number":30,"context_line":"    cfg.StrOpt(\u0027ucsm_username\u0027,"},{"line_number":31,"context_line":"               help\u003d_(\u0027Username for UCS manager. This is required field \u0027"},{"line_number":32,"context_line":"                      \u0027to communiate with a Cisco UCS Manager\u0027)),"},{"line_number":33,"context_line":"    cfg.StrOpt(\u0027ucsm_password\u0027,"},{"line_number":34,"context_line":"               secret\u003dTrue,  # do not expose value in the logs"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_70827400","line":31,"updated":"2014-08-07 16:15:15.000000000","message":"Manager to be consistent","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"bfb5e500d13dfb017a123cf95ef3271c0176310b","unresolved":false,"context_lines":[{"line_number":28,"context_line":"               help\u003d_(\u0027Cisco UCS Manager IP address. This is required field \u0027"},{"line_number":29,"context_line":"                      \u0027to communiate with a Cisco UCS Manager\u0027)),"},{"line_number":30,"context_line":"    cfg.StrOpt(\u0027ucsm_username\u0027,"},{"line_number":31,"context_line":"               help\u003d_(\u0027Username for UCS manager. This is required field \u0027"},{"line_number":32,"context_line":"                      \u0027to communiate with a Cisco UCS Manager\u0027)),"},{"line_number":33,"context_line":"    cfg.StrOpt(\u0027ucsm_password\u0027,"},{"line_number":34,"context_line":"               secret\u003dTrue,  # do not expose value in the logs"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_227412cf","line":31,"in_reply_to":"baada198_70827400","updated":"2014-08-08 22:01:07.000000000","message":"Done","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"439020ed117e801a5052ea7a7f0b8c4d31127762","unresolved":false,"context_lines":[{"line_number":29,"context_line":"                      \u0027to communiate with a Cisco UCS Manager\u0027)),"},{"line_number":30,"context_line":"    cfg.StrOpt(\u0027ucsm_username\u0027,"},{"line_number":31,"context_line":"               help\u003d_(\u0027Username for UCS manager. This is required field \u0027"},{"line_number":32,"context_line":"                      \u0027to communiate with a Cisco UCS Manager\u0027)),"},{"line_number":33,"context_line":"    cfg.StrOpt(\u0027ucsm_password\u0027,"},{"line_number":34,"context_line":"               secret\u003dTrue,  # do not expose value in the logs"},{"line_number":35,"context_line":"               help\u003d_(\u0027Password for UCS Manager. This is required field \u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_014e776e","line":32,"updated":"2014-08-06 19:04:57.000000000","message":"ditto","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"bfb5e500d13dfb017a123cf95ef3271c0176310b","unresolved":false,"context_lines":[{"line_number":29,"context_line":"                      \u0027to communiate with a Cisco UCS Manager\u0027)),"},{"line_number":30,"context_line":"    cfg.StrOpt(\u0027ucsm_username\u0027,"},{"line_number":31,"context_line":"               help\u003d_(\u0027Username for UCS manager. This is required field \u0027"},{"line_number":32,"context_line":"                      \u0027to communiate with a Cisco UCS Manager\u0027)),"},{"line_number":33,"context_line":"    cfg.StrOpt(\u0027ucsm_password\u0027,"},{"line_number":34,"context_line":"               secret\u003dTrue,  # do not expose value in the logs"},{"line_number":35,"context_line":"               help\u003d_(\u0027Password for UCS Manager. This is required field \u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_427106dd","line":32,"in_reply_to":"baada198_014e776e","updated":"2014-08-08 22:01:07.000000000","message":"Done","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"439020ed117e801a5052ea7a7f0b8c4d31127762","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    cfg.StrOpt(\u0027ucsm_password\u0027,"},{"line_number":34,"context_line":"               secret\u003dTrue,  # do not expose value in the logs"},{"line_number":35,"context_line":"               help\u003d_(\u0027Password for UCS Manager. This is required field \u0027"},{"line_number":36,"context_line":"                      \u0027to communiate with a Cisco UCS Manager\u0027)),"},{"line_number":37,"context_line":"    cfg.ListOpt(\u0027supported_vendors\u0027,"},{"line_number":38,"context_line":"                default\u003d[\u00271137:0071\u0027, \u00278086:10c9\u0027],"},{"line_number":39,"context_line":"                help\u003d_(\u0027vendor_id:product_id of devices supported by this \u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_a146ab4e","line":36,"updated":"2014-08-06 19:04:57.000000000","message":"ditto.","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"bfb5e500d13dfb017a123cf95ef3271c0176310b","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    cfg.StrOpt(\u0027ucsm_password\u0027,"},{"line_number":34,"context_line":"               secret\u003dTrue,  # do not expose value in the logs"},{"line_number":35,"context_line":"               help\u003d_(\u0027Password for UCS Manager. This is required field \u0027"},{"line_number":36,"context_line":"                      \u0027to communiate with a Cisco UCS Manager\u0027)),"},{"line_number":37,"context_line":"    cfg.ListOpt(\u0027supported_vendors\u0027,"},{"line_number":38,"context_line":"                default\u003d[\u00271137:0071\u0027, \u00278086:10c9\u0027],"},{"line_number":39,"context_line":"                help\u003d_(\u0027vendor_id:product_id of devices supported by this \u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_627a8abc","line":36,"in_reply_to":"baada198_a146ab4e","updated":"2014-08-08 22:01:07.000000000","message":"Done","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"376ff75b2643e9a2db54e7956bc7351dc5f93c9c","unresolved":false,"context_lines":[{"line_number":41,"context_line":"                       \u0027SR_IOV ports\u0027)),"},{"line_number":42,"context_line":"]"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"cfg.CONF.register_opts(ml2_cisco_ucsm_opts, \"ml2_cisco_ucsm\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_5cdb624d","line":44,"updated":"2014-08-11 17:09:38.000000000","message":"I tried to run the MD, but neutron failed to start due to missing ml2_cisco_ucsm. The problem is that this module is created but not imported in this patch.","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"62d83dfe6bc5ee40fb0f9b0f3cd0ce74012563e2","unresolved":false,"context_lines":[{"line_number":41,"context_line":"                       \u0027SR_IOV ports\u0027)),"},{"line_number":42,"context_line":"]"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"cfg.CONF.register_opts(ml2_cisco_ucsm_opts, \"ml2_cisco_ucsm\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_340d9437","line":44,"in_reply_to":"baada198_5cdb624d","updated":"2014-08-13 14:31:58.000000000","message":"Fixed. Import statement got removed while fixing pep8 errors.","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"b72183dceb22fcb679294f1ad33985c062f9c323","unresolved":false,"context_lines":[{"line_number":36,"context_line":"                      \u0027to communicate with a Cisco UCS Manager\u0027)),"},{"line_number":37,"context_line":"    cfg.ListOpt(\u0027supported_pci_devs\u0027,"},{"line_number":38,"context_line":"                default\u003d[\u00271137:0071\u0027, \u00278086:10c9\u0027],"},{"line_number":39,"context_line":"                help\u003d_(\u0027vendor_id:product_id of devices supported by this \u0027"},{"line_number":40,"context_line":"                       \u0027MD. This MD supports Cisco VM-FEX ports and Intel \u0027"},{"line_number":41,"context_line":"                       \u0027SR_IOV ports\u0027)),"},{"line_number":42,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_aaa16947","line":39,"updated":"2014-08-23 14:12:03.000000000","message":"List of comma separated...","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"930acfe39b6518681cdd2f2ace88d522d65e332c","unresolved":false,"context_lines":[{"line_number":36,"context_line":"                      \u0027to communicate with a Cisco UCS Manager\u0027)),"},{"line_number":37,"context_line":"    cfg.ListOpt(\u0027supported_pci_devs\u0027,"},{"line_number":38,"context_line":"                default\u003d[\u00271137:0071\u0027, \u00278086:10c9\u0027],"},{"line_number":39,"context_line":"                help\u003d_(\u0027vendor_id:product_id of devices supported by this \u0027"},{"line_number":40,"context_line":"                       \u0027MD. This MD supports Cisco VM-FEX ports and Intel \u0027"},{"line_number":41,"context_line":"                       \u0027SR_IOV ports\u0027)),"},{"line_number":42,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_39f2a36f","line":39,"in_reply_to":"1abeadc6_aaa16947","updated":"2014-08-27 09:03:14.000000000","message":"Done","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":7987,"name":"Ivar Lazzaro","email":"ivarlazzaro@gmail.com","username":"Ivar"},"change_message_id":"dd8a70a8f9240ed5ce89c4b1d162b334dbda4da8","unresolved":false,"context_lines":[{"line_number":35,"context_line":"               help\u003d_(\u0027Password for UCS Manager. This is required field \u0027"},{"line_number":36,"context_line":"                      \u0027to communicate with a Cisco UCS Manager\u0027)),"},{"line_number":37,"context_line":"    cfg.ListOpt(\u0027supported_pci_devs\u0027,"},{"line_number":38,"context_line":"                default\u003d[\u00271137:0071\u0027, \u00278086:10c9\u0027],"},{"line_number":39,"context_line":"                help\u003d_(\u0027List of comma separated vendor_id:product_id of \u0027"},{"line_number":40,"context_line":"                       \u0027devices supported by this MD. This MD supports \u0027"},{"line_number":41,"context_line":"                       \u0027VM-FEX and SR-IOV devices\u0027)),"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_7a52bb14","line":38,"updated":"2014-09-01 06:18:25.000000000","message":"why is this the default? I would suggest an empty list instead","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"336e3f988db4fbd32390e1f44ad6e5a575ca6c1a","unresolved":false,"context_lines":[{"line_number":35,"context_line":"               help\u003d_(\u0027Password for UCS Manager. This is required field \u0027"},{"line_number":36,"context_line":"                      \u0027to communicate with a Cisco UCS Manager\u0027)),"},{"line_number":37,"context_line":"    cfg.ListOpt(\u0027supported_pci_devs\u0027,"},{"line_number":38,"context_line":"                default\u003d[\u00271137:0071\u0027, \u00278086:10c9\u0027],"},{"line_number":39,"context_line":"                help\u003d_(\u0027List of comma separated vendor_id:product_id of \u0027"},{"line_number":40,"context_line":"                       \u0027devices supported by this MD. This MD supports \u0027"},{"line_number":41,"context_line":"                       \u0027VM-FEX and SR-IOV devices\u0027)),"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_f2cceb37","line":38,"in_reply_to":"fa98f980_67521fdf","updated":"2014-09-01 20:36:41.000000000","message":"I agree with proposed code. I think the default should contain supported values by this MD. It will allow this MD to run properly without need to update configuration file.","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"e6512117504ca66d5900b10d53061a10a85d5167","unresolved":false,"context_lines":[{"line_number":35,"context_line":"               help\u003d_(\u0027Password for UCS Manager. This is required field \u0027"},{"line_number":36,"context_line":"                      \u0027to communicate with a Cisco UCS Manager\u0027)),"},{"line_number":37,"context_line":"    cfg.ListOpt(\u0027supported_pci_devs\u0027,"},{"line_number":38,"context_line":"                default\u003d[\u00271137:0071\u0027, \u00278086:10c9\u0027],"},{"line_number":39,"context_line":"                help\u003d_(\u0027List of comma separated vendor_id:product_id of \u0027"},{"line_number":40,"context_line":"                       \u0027devices supported by this MD. This MD supports \u0027"},{"line_number":41,"context_line":"                       \u0027VM-FEX and SR-IOV devices\u0027)),"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_d111c5ad","line":38,"in_reply_to":"fa98f980_67521fdf","updated":"2014-09-02 17:17:31.000000000","message":"Please see response to comment above.","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"c5accaf73107d77d25e79f1bbf1cc9b2ef836fe9","unresolved":false,"context_lines":[{"line_number":35,"context_line":"               help\u003d_(\u0027Password for UCS Manager. This is required field \u0027"},{"line_number":36,"context_line":"                      \u0027to communicate with a Cisco UCS Manager\u0027)),"},{"line_number":37,"context_line":"    cfg.ListOpt(\u0027supported_pci_devs\u0027,"},{"line_number":38,"context_line":"                default\u003d[\u00271137:0071\u0027, \u00278086:10c9\u0027],"},{"line_number":39,"context_line":"                help\u003d_(\u0027List of comma separated vendor_id:product_id of \u0027"},{"line_number":40,"context_line":"                       \u0027devices supported by this MD. This MD supports \u0027"},{"line_number":41,"context_line":"                       \u0027VM-FEX and SR-IOV devices\u0027)),"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_67521fdf","line":38,"in_reply_to":"fa98f980_7a52bb14","updated":"2014-09-01 07:02:21.000000000","message":"+1","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"e6512117504ca66d5900b10d53061a10a85d5167","unresolved":false,"context_lines":[{"line_number":35,"context_line":"               help\u003d_(\u0027Password for UCS Manager. This is required field \u0027"},{"line_number":36,"context_line":"                      \u0027to communicate with a Cisco UCS Manager\u0027)),"},{"line_number":37,"context_line":"    cfg.ListOpt(\u0027supported_pci_devs\u0027,"},{"line_number":38,"context_line":"                default\u003d[\u00271137:0071\u0027, \u00278086:10c9\u0027],"},{"line_number":39,"context_line":"                help\u003d_(\u0027List of comma separated vendor_id:product_id of \u0027"},{"line_number":40,"context_line":"                       \u0027devices supported by this MD. This MD supports \u0027"},{"line_number":41,"context_line":"                       \u0027VM-FEX and SR-IOV devices\u0027)),"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_7112d9b5","line":38,"in_reply_to":"fa98f980_7a52bb14","updated":"2014-09-02 17:17:31.000000000","message":"Mostly done so that the user would have one less thing to configure. The UCS manager recognizes these 2 device vendors as providers of VM-FEX and SR-IOV respectively.","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":7987,"name":"Ivar Lazzaro","email":"ivarlazzaro@gmail.com","username":"Ivar"},"change_message_id":"dd8a70a8f9240ed5ce89c4b1d162b334dbda4da8","unresolved":false,"context_lines":[{"line_number":53,"context_line":"            raise ValueError(_(\"Ucs Mech Driver: Invalid supported \""},{"line_number":54,"context_line":"                               \"PCI device config: %s\"), vendor)"},{"line_number":55,"context_line":"        vendor_list.append(vendor)"},{"line_number":56,"context_line":"    return vendor_list"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_ba81834c","line":56,"updated":"2014-09-01 06:18:25.000000000","message":"Isn\u0027t vendor_config_list identical to vendor_list at this point? Why do you need an additional list?","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":7987,"name":"Ivar Lazzaro","email":"ivarlazzaro@gmail.com","username":"Ivar"},"change_message_id":"5caba515760bf1e24b87c94e3b3d9dbbac1ee2da","unresolved":false,"context_lines":[{"line_number":53,"context_line":"            raise ValueError(_(\"Ucs Mech Driver: Invalid supported \""},{"line_number":54,"context_line":"                               \"PCI device config: %s\"), vendor)"},{"line_number":55,"context_line":"        vendor_list.append(vendor)"},{"line_number":56,"context_line":"    return vendor_list"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_2ed25500","line":56,"in_reply_to":"fa98f980_91f3bd72","updated":"2014-09-02 18:39:43.000000000","message":"Not really... If any element on vendor_config_list is not well formed an exception gets raised and the plugin load fails. So if you reach this point vendor_list is ultimately the same as vendor_config_list.","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"e6512117504ca66d5900b10d53061a10a85d5167","unresolved":false,"context_lines":[{"line_number":53,"context_line":"            raise ValueError(_(\"Ucs Mech Driver: Invalid supported \""},{"line_number":54,"context_line":"                               \"PCI device config: %s\"), vendor)"},{"line_number":55,"context_line":"        vendor_list.append(vendor)"},{"line_number":56,"context_line":"    return vendor_list"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_91f3bd72","line":56,"in_reply_to":"fa98f980_ba81834c","updated":"2014-09-02 17:17:31.000000000","message":"vendor_list contains only the elements in vendor_config_list, that follow the format \"vendor_id:product_id\". The \"if\" statement weeds out the badly formed entries.","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":6698,"name":"Robert Pothier","email":"robpothier35@gmail.com","username":"rpothier"},"change_message_id":"1267a58b89586401fb5e3d21204091f0f1e5ac32","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Following are user configurable options for UCS Manager ML2 Mechanism"},{"line_number":21,"context_line":"driver. The ucsm_username, ucsm_password, and ucsm_ip are"},{"line_number":22,"context_line":"required options. Additional configuration knobs are provided to pre-"},{"line_number":23,"context_line":"create UCS Manager port profiles."},{"line_number":24,"context_line":"\"\"\""},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"fa98f980_7dd58441","line":22,"updated":"2014-09-15 15:09:45.000000000","message":"is supported_phy_nets required? if so it should be listed here","commit_id":"1210e194c1ef5246d95ab8743d9bc223659f9731"}],"neutron/plugins/ml2/drivers/cisco/ucsm/constants.py":[{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"ad6a63455729efe8c9c85ee1405fc48118f6ee58","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"VnicProfileID \u003d \"vnicProfile\""},{"line_number":17,"context_line":"FabricLanCloudID \u003d \"fabricLanCloud\""},{"line_number":18,"context_line":"FabricLanCloudDN \u003d \"Dn\""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"FabricVlanClassId \u003d \"fabricVlan\""}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_9680724a","line":17,"updated":"2014-08-11 19:29:33.000000000","message":"These constants are defined in UcsSdk.Constants, why redefine  them here?","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"62d83dfe6bc5ee40fb0f9b0f3cd0ce74012563e2","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"VnicProfileID \u003d \"vnicProfile\""},{"line_number":17,"context_line":"FabricLanCloudID \u003d \"fabricLanCloud\""},{"line_number":18,"context_line":"FabricLanCloudDN \u003d \"Dn\""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"FabricVlanClassId \u003d \"fabricVlan\""}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_a5ac3bef","line":17,"in_reply_to":"baada198_9680724a","updated":"2014-08-13 14:31:58.000000000","message":"Actually, they are spread out in diff classes in the Ucs Sdk package/module.","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"73d2a129cb860704c77c5dd732b7d961ee42cde1","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"VnicProfileID \u003d \"vnicProfile\""},{"line_number":17,"context_line":"FabricLanCloudID \u003d \"fabricLanCloud\""},{"line_number":18,"context_line":"FabricLanCloudDN \u003d \"Dn\""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"FabricVlanClassId \u003d \"fabricVlan\""}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_d6358af6","line":17,"in_reply_to":"baada198_9680724a","updated":"2014-08-11 19:56:50.000000000","message":"Just noticed comments on these constants from previous patch. These constants are referenced from ucsm_network_driver.py. Since most of its methods will be mocked out, I don\u0027t think it should be an issue just referring to the original constants.","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"62d83dfe6bc5ee40fb0f9b0f3cd0ce74012563e2","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"VnicProfileID \u003d \"vnicProfile\""},{"line_number":17,"context_line":"FabricLanCloudID \u003d \"fabricLanCloud\""},{"line_number":18,"context_line":"FabricLanCloudDN \u003d \"Dn\""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"FabricVlanClassId \u003d \"fabricVlan\""}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_65edc323","line":17,"in_reply_to":"baada198_d6358af6","updated":"2014-08-13 14:31:58.000000000","message":"Not having these constants defined locally generates pep8 errors not UT errors.","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"5219efce3537d00221b1492a101132d068c64c36","unresolved":false,"context_lines":[{"line_number":18,"context_line":"VLAN_PATH \u003d \"fabric/lan\""},{"line_number":19,"context_line":"VLAN_COMPRESSION_TYPE \u003d \"included\""},{"line_number":20,"context_line":"DESCR \u003d \"Created by Openstack UCSM Mech Driver\""},{"line_number":21,"context_line":"PORT_PROFILESETDN \u003d \"fabric/lan/profiles\""},{"line_number":22,"context_line":"HIGH_PERF \u003d \"high-perf-reqd\""}],"source_content_type":"text/x-python","patch_set":20,"id":"fa98f980_48acf135","line":21,"updated":"2014-09-02 17:49:38.000000000","message":"Nit: could use some _ to be easier to read this constant.","commit_id":"aeb18ba9ccd5243a715ea25e846ca079fc5bad13"}],"neutron/plugins/ml2/drivers/cisco/ucsm/exceptions.py":[{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"6e59fc3a6b6a81827b6459f3bc6fc1c975a9900d","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2013 OpenStack Foundation"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2FUIA%3D","line":1,"updated":"2014-03-06 22:12:32.000000000","message":"again, change to 2014 (last time i\u0027ll comment :-) )","commit_id":"05e9f7f85e1f5391e383199e273b12d80616bc53"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"dc0bfec684c0ca658e3175ae860d4fa473265a3e","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2013 OpenStack Foundation"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_60274dc8","line":1,"in_reply_to":"AAAAVn%2F%2FUIA%3D","updated":"2014-08-05 22:46:32.000000000","message":"Done","commit_id":"05e9f7f85e1f5391e383199e273b12d80616bc53"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"d837268fa56b1683fca3f0eee4e9c566aa55abc3","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"class UcsmConnectFailed(exceptions.NeutronException):"},{"line_number":22,"context_line":"    \"\"\"Failed to connect to UCS Manager.\"\"\""},{"line_number":23,"context_line":"    message \u003d _(\"Unable to connect to UCS Manager %(ucsm_ip)s. \""},{"line_number":24,"context_line":"                \"Reason: %(exc)s.\")"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_10ebf87b","line":22,"updated":"2014-08-07 16:15:15.000000000","message":"Comments are redundant, and not necessary.","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"bfb5e500d13dfb017a123cf95ef3271c0176310b","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"class UcsmConnectFailed(exceptions.NeutronException):"},{"line_number":22,"context_line":"    \"\"\"Failed to connect to UCS Manager.\"\"\""},{"line_number":23,"context_line":"    message \u003d _(\"Unable to connect to UCS Manager %(ucsm_ip)s. \""},{"line_number":24,"context_line":"                \"Reason: %(exc)s.\")"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_02438e6b","line":22,"in_reply_to":"baada198_10ebf87b","updated":"2014-08-08 22:01:07.000000000","message":"Just following what was done in a  diff ML2 driver. Removing them as per this comment.","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"d837268fa56b1683fca3f0eee4e9c566aa55abc3","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class UcsmConfigReadFailed(exceptions.NeutronException):"},{"line_number":28,"context_line":"    \"\"\"Failed to get config from UCS Manager.\"\"\""},{"line_number":29,"context_line":"    message \u003d _(\"Unable to read config from UCS Manager %(ucsm_ip)s. \""},{"line_number":30,"context_line":"                \"Reason: %(exc)s.\")"},{"line_number":31,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_d0f8a04c","line":28,"updated":"2014-08-07 16:15:15.000000000","message":"Ditto","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"bfb5e500d13dfb017a123cf95ef3271c0176310b","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class UcsmConfigReadFailed(exceptions.NeutronException):"},{"line_number":28,"context_line":"    \"\"\"Failed to get config from UCS Manager.\"\"\""},{"line_number":29,"context_line":"    message \u003d _(\"Unable to read config from UCS Manager %(ucsm_ip)s. \""},{"line_number":30,"context_line":"                \"Reason: %(exc)s.\")"},{"line_number":31,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_023aaee5","line":28,"in_reply_to":"baada198_d0f8a04c","updated":"2014-08-08 22:01:07.000000000","message":"Done","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"d837268fa56b1683fca3f0eee4e9c566aa55abc3","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class UcsmConfigFailed(exceptions.NeutronException):"},{"line_number":34,"context_line":"    \"\"\"Failed to configure UCS Manager.\"\"\""},{"line_number":35,"context_line":"    message \u003d _(\"Failed to configure %(config)s on UCS Manager %(ucsm_ip)s. \""},{"line_number":36,"context_line":"                \"Reason: %(exc)s.\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_908548b0","line":34,"updated":"2014-08-07 16:15:15.000000000","message":"Ditto","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"bfb5e500d13dfb017a123cf95ef3271c0176310b","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class UcsmConfigFailed(exceptions.NeutronException):"},{"line_number":34,"context_line":"    \"\"\"Failed to configure UCS Manager.\"\"\""},{"line_number":35,"context_line":"    message \u003d _(\"Failed to configure %(config)s on UCS Manager %(ucsm_ip)s. \""},{"line_number":36,"context_line":"                \"Reason: %(exc)s.\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_222252ba","line":34,"in_reply_to":"baada198_908548b0","updated":"2014-08-08 22:01:07.000000000","message":"Done","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"c4a9c06d73c84cd660209a8b641bb0c300b3c28d","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2013 OpenStack Foundation"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":9,"id":"1abeadc6_7ad95f82","line":1,"updated":"2014-08-20 08:16:14.000000000","message":"2014","commit_id":"a4c39c14361f14e955bb7478ea326fe733235b3f"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"1fa0e22bee4a42f52bd115e2decdbb7e2ddf6944","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2013 OpenStack Foundation"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":9,"id":"1abeadc6_a951e937","line":1,"in_reply_to":"1abeadc6_7ad95f82","updated":"2014-08-20 19:49:35.000000000","message":"Done","commit_id":"a4c39c14361f14e955bb7478ea326fe733235b3f"}],"neutron/plugins/ml2/drivers/cisco/ucsm/mech_cisco_ucsm.py":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"540ec445cf4f3909e974184a07a62919cf34e1b8","unresolved":false,"context_lines":[{"line_number":46,"context_line":"            return context.bound_segment.get(api.SEGMENTATION_ID)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def create_port_precommit(self, context):"},{"line_number":49,"context_line":"        \"\"\"Remember the information about this port"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"        It is not associated with a VM yet and so"},{"line_number":52,"context_line":"        not bound to a host."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUX%2F%2B9nI%3D","line":49,"updated":"2014-02-18 00:05:28.000000000","message":"PEP257, summary line of docstring, end with period.","commit_id":"395ccb1c9de991833dd42507f5efafe0da472794"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"540ec445cf4f3909e974184a07a62919cf34e1b8","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        # 3. If yes, associate that port profile with this port."},{"line_number":58,"context_line":"        # 4. If no, create a new port profile with this vlan_id and"},{"line_number":59,"context_line":"        # associate with this port"},{"line_number":60,"context_line":"        "},{"line_number":61,"context_line":"        vlan_id \u003d self._get_vlanid(context)"},{"line_number":62,"context_line":"        p_profile \u003d ucsm_db.get_port_profile_for_vlan(vlan_id)"},{"line_number":63,"context_line":"        port \u003d context.current"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUX%2F%2B9ns%3D","line":60,"updated":"2014-02-18 00:05:28.000000000","message":"Looks like some whitespace issues. Did you run tox -e pep8 yet?","commit_id":"395ccb1c9de991833dd42507f5efafe0da472794"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"aa59348782f57fd19c6dc26a5abfa0101f20cfc0","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        # 3. If yes, associate that port profile with this port."},{"line_number":58,"context_line":"        # 4. If no, create a new port profile with this vlan_id and"},{"line_number":59,"context_line":"        # associate with this port"},{"line_number":60,"context_line":"        "},{"line_number":61,"context_line":"        vlan_id \u003d self._get_vlanid(context)"},{"line_number":62,"context_line":"        p_profile \u003d ucsm_db.get_port_profile_for_vlan(vlan_id)"},{"line_number":63,"context_line":"        port \u003d context.current"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAVX%2F%2F4uI%3D","line":60,"in_reply_to":"AAAAUX%2F%2B9ns%3D","updated":"2014-02-27 17:41:09.000000000","message":"Done","commit_id":"395ccb1c9de991833dd42507f5efafe0da472794"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"540ec445cf4f3909e974184a07a62919cf34e1b8","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        port_name \u003d port[\u0027name\u0027]"},{"line_number":66,"context_line":"        # This change is coming via a diff BP."},{"line_number":67,"context_line":"        #vif_type \u003d port[\u0027vif_type\u0027]"},{"line_number":68,"context_line":"        # TODO Sandhya: remove when above change becomes available"},{"line_number":69,"context_line":"        vif_type \u003d \"macvtap\""},{"line_number":70,"context_line":"        if not p_profile:"},{"line_number":71,"context_line":"            # Create a new port profile"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUX%2F%2B9m4%3D","line":68,"updated":"2014-02-18 00:05:28.000000000","message":"TOX will require this to say TODO(sandhya) ...","commit_id":"395ccb1c9de991833dd42507f5efafe0da472794"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"aa59348782f57fd19c6dc26a5abfa0101f20cfc0","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        port_name \u003d port[\u0027name\u0027]"},{"line_number":66,"context_line":"        # This change is coming via a diff BP."},{"line_number":67,"context_line":"        #vif_type \u003d port[\u0027vif_type\u0027]"},{"line_number":68,"context_line":"        # TODO Sandhya: remove when above change becomes available"},{"line_number":69,"context_line":"        vif_type \u003d \"macvtap\""},{"line_number":70,"context_line":"        if not p_profile:"},{"line_number":71,"context_line":"            # Create a new port profile"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAVX%2F%2F4vQ%3D","line":68,"in_reply_to":"AAAAUX%2F%2B9m4%3D","updated":"2014-02-27 17:41:09.000000000","message":"Done","commit_id":"395ccb1c9de991833dd42507f5efafe0da472794"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"540ec445cf4f3909e974184a07a62919cf34e1b8","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                                         vif_type)"},{"line_number":77,"context_line":"           "},{"line_number":78,"context_line":"    def create_port_postcommit(self, context):"},{"line_number":79,"context_line":"        \"\"\"Create a port profile and push to UCS manager."},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        \"\"\""},{"line_number":82,"context_line":"        port \u003d context.current"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUX%2F%2B9mY%3D","line":79,"updated":"2014-02-18 00:05:28.000000000","message":"PEP257 single line docstrings, put end quotes on same line.","commit_id":"395ccb1c9de991833dd42507f5efafe0da472794"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"aa59348782f57fd19c6dc26a5abfa0101f20cfc0","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                                         vif_type)"},{"line_number":77,"context_line":"           "},{"line_number":78,"context_line":"    def create_port_postcommit(self, context):"},{"line_number":79,"context_line":"        \"\"\"Create a port profile and push to UCS manager."},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        \"\"\""},{"line_number":82,"context_line":"        port \u003d context.current"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAVX%2F%2F4wI%3D","line":79,"in_reply_to":"AAAAUX%2F%2B9mY%3D","updated":"2014-02-27 17:41:09.000000000","message":"Done","commit_id":"395ccb1c9de991833dd42507f5efafe0da472794"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"c0e7184c51cd5058a387ff16cab0d36f26e9e0b8","unresolved":false,"context_lines":[{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        if profile_name and vlan_id:"},{"line_number":82,"context_line":"            ucsm_network_driver.ucs_manager_connect()"},{"line_number":83,"context_line":"            ucsm_network_driver.create_portprofile(profile_name, vlan_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAVn%2F%2F2F0%3D","line":83,"updated":"2014-03-03 20:38:54.000000000","message":"Overal comments to this file:\n   -- bind_port() should be implemented in order to determine if the PCI device is a Cisco vNIC and if the neutron port should be bound to this MD. A base class such as that in mech_agent.py may be needed for SRIOV, which determines the binding MD by vendor_id/product_id, vnic-type and active agents, etc.\n  -- update_port_precommit()/update_port_postcommit() should be implemented rather than create_port_precommit()/create_port_postcommit(). \n  -- calling UCSM to create the port profile should only be done if the port profile hasn\u0027t been created yet. Another question is what if it fails creating the port profile in UCSM? I think this is a common issue to all MDs. There must be a ML2 guideline on how it should be handled. Or we don\u0027t need to worry about it initially.","commit_id":"b7726303d0e6b560cd32d3c619c8e6eeb7832091"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"f6f861cec3ffc30e09a1ef9497a590eab5088c76","unresolved":false,"context_lines":[{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        if profile_name and vlan_id:"},{"line_number":82,"context_line":"            ucsm_network_driver.ucs_manager_connect()"},{"line_number":83,"context_line":"            ucsm_network_driver.create_portprofile(profile_name, vlan_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAVn%2F%2FVkE%3D","line":83,"in_reply_to":"AAAAVn%2F%2F2F0%3D","updated":"2014-03-06 18:58:27.000000000","message":"-- another BP taking care of this change so that it is common for other MDs that support SR-IOV interfaces.\n-- done\n-- done","commit_id":"b7726303d0e6b560cd32d3c619c8e6eeb7832091"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"c5da8fea8ebc8fec026d833d9168dfb2a90a883d","unresolved":false,"context_lines":[{"line_number":28,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class CiscoUcsmMechanismDriver(api.MechanismDriver):"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    \"\"\"Cisco Ucs Manager ML2 Mechanism Driver.\"\"\""},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2FHgE%3D","line":31,"updated":"2014-03-09 06:07:31.000000000","message":"missing the code for vif_details update and check for supported pci_vendor_info.\ngenerally missing bind_port functionality.","commit_id":"05e9f7f85e1f5391e383199e273b12d80616bc53"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"dc0bfec684c0ca658e3175ae860d4fa473265a3e","unresolved":false,"context_lines":[{"line_number":28,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class CiscoUcsmMechanismDriver(api.MechanismDriver):"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    \"\"\"Cisco Ucs Manager ML2 Mechanism Driver.\"\"\""},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_20047518","line":31,"in_reply_to":"AAAAVn%2F%2FHgE%3D","updated":"2014-08-05 22:46:32.000000000","message":"Done","commit_id":"05e9f7f85e1f5391e383199e273b12d80616bc53"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"6e59fc3a6b6a81827b6459f3bc6fc1c975a9900d","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    def update_port_precommit(self, context):"},{"line_number":52,"context_line":"        \"\"\"Remember information about this port."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        It is not associated with a VM yet and so"},{"line_number":55,"context_line":"        not bound to a host."},{"line_number":56,"context_line":"        \"\"\""},{"line_number":57,"context_line":"        # Assign a port profile to this port. To do that:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2FT7A%3D","line":54,"updated":"2014-03-06 22:12:32.000000000","message":"if the port isn\u0027t bound then you can\u0027t use bound_segment to access the vlan_id.\nThis file needs more work so I\u0027ll hold off on other comments.","commit_id":"05e9f7f85e1f5391e383199e273b12d80616bc53"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"dc0bfec684c0ca658e3175ae860d4fa473265a3e","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    def update_port_precommit(self, context):"},{"line_number":52,"context_line":"        \"\"\"Remember information about this port."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        It is not associated with a VM yet and so"},{"line_number":55,"context_line":"        not bound to a host."},{"line_number":56,"context_line":"        \"\"\""},{"line_number":57,"context_line":"        # Assign a port profile to this port. To do that:"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_40016906","line":54,"in_reply_to":"AAAAVn%2F%2FT7A%3D","updated":"2014-08-05 22:46:32.000000000","message":"Done","commit_id":"05e9f7f85e1f5391e383199e273b12d80616bc53"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"439020ed117e801a5052ea7a7f0b8c4d31127762","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"vm_fex_vendor_id \u003d \"1137\""},{"line_number":33,"context_line":"vm_fex_product_id \u003d \"0071\""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_c6980e6c","line":32,"updated":"2014-08-06 19:04:57.000000000","message":"Treated as constants? Upper case name?","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"bfb5e500d13dfb017a123cf95ef3271c0176310b","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"vm_fex_vendor_id \u003d \"1137\""},{"line_number":33,"context_line":"vm_fex_product_id \u003d \"0071\""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_cdbba2bc","line":32,"in_reply_to":"baada198_c6980e6c","updated":"2014-08-08 22:01:07.000000000","message":"Done","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"d837268fa56b1683fca3f0eee4e9c566aa55abc3","unresolved":false,"context_lines":[{"line_number":30,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"vm_fex_vendor_id \u003d \"1137\""},{"line_number":33,"context_line":"vm_fex_product_id \u003d \"0071\""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"class CiscoUcsmMechanismDriver(agent.SimpleAgentMechanismDriverBase):"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_3031dc0a","line":33,"updated":"2014-08-07 16:15:15.000000000","message":"I think you can just define \n\nCISCO_VMFEX_VENDOR_INFO \u003d \"1137:0071\"","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"bfb5e500d13dfb017a123cf95ef3271c0176310b","unresolved":false,"context_lines":[{"line_number":30,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"vm_fex_vendor_id \u003d \"1137\""},{"line_number":33,"context_line":"vm_fex_product_id \u003d \"0071\""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"class CiscoUcsmMechanismDriver(agent.SimpleAgentMechanismDriverBase):"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_0ddd9a13","line":33,"in_reply_to":"baada198_3031dc0a","updated":"2014-08-08 22:01:07.000000000","message":"Done","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"d837268fa56b1683fca3f0eee4e9c566aa55abc3","unresolved":false,"context_lines":[{"line_number":33,"context_line":"vm_fex_product_id \u003d \"0071\""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"class CiscoUcsmMechanismDriver(agent.SimpleAgentMechanismDriverBase):"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    \"\"\"Cisco Ucs Manager ML2 Mechanism Driver.\"\"\""},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_abbbc10e","line":36,"updated":"2014-08-07 16:15:15.000000000","message":"the way that this class is written, this is wrong inheritance. I think you can just inherit from api.MechanismDriver","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"bfb5e500d13dfb017a123cf95ef3271c0176310b","unresolved":false,"context_lines":[{"line_number":33,"context_line":"vm_fex_product_id \u003d \"0071\""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"class CiscoUcsmMechanismDriver(agent.SimpleAgentMechanismDriverBase):"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    \"\"\"Cisco Ucs Manager ML2 Mechanism Driver.\"\"\""},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_8d036a10","line":36,"in_reply_to":"baada198_abbbc10e","updated":"2014-08-08 22:01:07.000000000","message":"Can be inherited from just api.MechanismDriver. I don\u0027t think anything would go wrong with either. SimpleAgentMechanismDriverBase ultimately inherits from api.MechanismDriver. Doc string for SimpleAgentMechansimDriverBase mentions that this class \"provides common code for mechanism drivers that integrate the ml2 plugin with l2 agents….\" hence picked this. I am fine changing it back to api.MechanismDriver.","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"d837268fa56b1683fca3f0eee4e9c566aa55abc3","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            vendor_product \u003d vendor.split(\u0027:\u0027)"},{"line_number":69,"context_line":"            if len(vendor_product) !\u003d 2:"},{"line_number":70,"context_line":"                LOG.error(_(\"Ucs Mech Driver: Invalid supported vendor \""},{"line_number":71,"context_line":"                            \"config: %s\"), vendor_product)"},{"line_number":72,"context_line":"                return"},{"line_number":73,"context_line":"            vendor_list.append(vendor)"},{"line_number":74,"context_line":"        return vendor_list"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_0b9e6d69","line":71,"updated":"2014-08-07 16:15:15.000000000","message":"throw exception instead? This is fatal","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"bfb5e500d13dfb017a123cf95ef3271c0176310b","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            vendor_product \u003d vendor.split(\u0027:\u0027)"},{"line_number":69,"context_line":"            if len(vendor_product) !\u003d 2:"},{"line_number":70,"context_line":"                LOG.error(_(\"Ucs Mech Driver: Invalid supported vendor \""},{"line_number":71,"context_line":"                            \"config: %s\"), vendor_product)"},{"line_number":72,"context_line":"                return"},{"line_number":73,"context_line":"            vendor_list.append(vendor)"},{"line_number":74,"context_line":"        return vendor_list"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_a8c01c2c","line":71,"in_reply_to":"baada198_0b9e6d69","updated":"2014-08-08 22:01:07.000000000","message":"Done","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"439020ed117e801a5052ea7a7f0b8c4d31127762","unresolved":false,"context_lines":[{"line_number":90,"context_line":"            return False"},{"line_number":91,"context_line":"        profile \u003d context.current.get(portbindings.PROFILE, {})"},{"line_number":92,"context_line":"        if not profile:"},{"line_number":93,"context_line":"            LOG.debug(_(\"Port binding missing profile info\"))"},{"line_number":94,"context_line":"            return False"},{"line_number":95,"context_line":"        vendor_info \u003d profile.get(\u0027pci_vendor_info\u0027)"},{"line_number":96,"context_line":"        if not vendor_info:"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_46e95eaa","line":93,"updated":"2014-08-06 19:04:57.000000000","message":"Remove i18n on all debug level log messages in file.","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"bfb5e500d13dfb017a123cf95ef3271c0176310b","unresolved":false,"context_lines":[{"line_number":90,"context_line":"            return False"},{"line_number":91,"context_line":"        profile \u003d context.current.get(portbindings.PROFILE, {})"},{"line_number":92,"context_line":"        if not profile:"},{"line_number":93,"context_line":"            LOG.debug(_(\"Port binding missing profile info\"))"},{"line_number":94,"context_line":"            return False"},{"line_number":95,"context_line":"        vendor_info \u003d profile.get(\u0027pci_vendor_info\u0027)"},{"line_number":96,"context_line":"        if not vendor_info:"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_3910c04e","line":93,"in_reply_to":"baada198_46e95eaa","updated":"2014-08-08 22:01:07.000000000","message":"Done","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"d837268fa56b1683fca3f0eee4e9c566aa55abc3","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            return False"},{"line_number":102,"context_line":"        return True"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    def _validate_vm_fex_port(self, context):"},{"line_number":105,"context_line":"        profile \u003d context.current.get(portbindings.PROFILE, {})"},{"line_number":106,"context_line":"        if not profile:"},{"line_number":107,"context_line":"            LOG.debug(_(\"Port binding missing profile info\"))"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_8b699d28","line":104,"updated":"2014-08-07 16:15:15.000000000","message":"_is_vm_fex_port()","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"bfb5e500d13dfb017a123cf95ef3271c0176310b","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            return False"},{"line_number":102,"context_line":"        return True"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    def _validate_vm_fex_port(self, context):"},{"line_number":105,"context_line":"        profile \u003d context.current.get(portbindings.PROFILE, {})"},{"line_number":106,"context_line":"        if not profile:"},{"line_number":107,"context_line":"            LOG.debug(_(\"Port binding missing profile info\"))"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_480ce093","line":104,"in_reply_to":"baada198_8b699d28","updated":"2014-08-08 22:01:07.000000000","message":"Done","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"d837268fa56b1683fca3f0eee4e9c566aa55abc3","unresolved":false,"context_lines":[{"line_number":112,"context_line":"            return False"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"        if (vm_fex_vendor_id in vendor_info and"},{"line_number":115,"context_line":"            vm_fex_product_id in vendor_info):"},{"line_number":116,"context_line":"            return True"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_cb68f58a","line":115,"updated":"2014-08-07 16:15:15.000000000","message":"the check should be something like \n   return vendor_info in CISCO_VMFEX_VENDOR_INFO","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"bfb5e500d13dfb017a123cf95ef3271c0176310b","unresolved":false,"context_lines":[{"line_number":112,"context_line":"            return False"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"        if (vm_fex_vendor_id in vendor_info and"},{"line_number":115,"context_line":"            vm_fex_product_id in vendor_info):"},{"line_number":116,"context_line":"            return True"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_8864384e","line":115,"in_reply_to":"baada198_cb68f58a","updated":"2014-08-08 22:01:07.000000000","message":"Done","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"439020ed117e801a5052ea7a7f0b8c4d31127762","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        return False"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def update_port_precommit(self, context):"},{"line_number":121,"context_line":"        \"\"\"Remember information about this port."},{"line_number":122,"context_line":"        \"\"\""},{"line_number":123,"context_line":"        # Assign a port profile to this port. To do that:"},{"line_number":124,"context_line":"        # 1. Get the vlan_id associated with the bound segment"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_865ff673","line":121,"updated":"2014-08-06 19:04:57.000000000","message":"Nit: PEP257 put trailing quotes on same line of single line docstring.","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"bfb5e500d13dfb017a123cf95ef3271c0176310b","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        return False"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def update_port_precommit(self, context):"},{"line_number":121,"context_line":"        \"\"\"Remember information about this port."},{"line_number":122,"context_line":"        \"\"\""},{"line_number":123,"context_line":"        # Assign a port profile to this port. To do that:"},{"line_number":124,"context_line":"        # 1. Get the vlan_id associated with the bound segment"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_08c74812","line":121,"in_reply_to":"baada198_865ff673","updated":"2014-08-08 22:01:07.000000000","message":"Done","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"439020ed117e801a5052ea7a7f0b8c4d31127762","unresolved":false,"context_lines":[{"line_number":120,"context_line":"    def update_port_precommit(self, context):"},{"line_number":121,"context_line":"        \"\"\"Remember information about this port."},{"line_number":122,"context_line":"        \"\"\""},{"line_number":123,"context_line":"        # Assign a port profile to this port. To do that:"},{"line_number":124,"context_line":"        # 1. Get the vlan_id associated with the bound segment"},{"line_number":125,"context_line":"        # 2. Check if a port profile already exists with this vlan_id"},{"line_number":126,"context_line":"        # 3. If yes, associate that port profile with this port."}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_c659ee8e","line":123,"updated":"2014-08-06 19:04:57.000000000","message":"Add to doc string?","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"bfb5e500d13dfb017a123cf95ef3271c0176310b","unresolved":false,"context_lines":[{"line_number":120,"context_line":"    def update_port_precommit(self, context):"},{"line_number":121,"context_line":"        \"\"\"Remember information about this port."},{"line_number":122,"context_line":"        \"\"\""},{"line_number":123,"context_line":"        # Assign a port profile to this port. To do that:"},{"line_number":124,"context_line":"        # 1. Get the vlan_id associated with the bound segment"},{"line_number":125,"context_line":"        # 2. Check if a port profile already exists with this vlan_id"},{"line_number":126,"context_line":"        # 3. If yes, associate that port profile with this port."}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_48d140cb","line":123,"in_reply_to":"baada198_c659ee8e","updated":"2014-08-08 22:01:07.000000000","message":"Done","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"d837268fa56b1683fca3f0eee4e9c566aa55abc3","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        profile_name \u003d \"OS-PP-\" + str(vlan_id)"},{"line_number":168,"context_line":"        if not vlan_id:"},{"line_number":169,"context_line":"            LOG.debug(_(\"UCS Manager Mechanism driver vlan_id invalid\"))"},{"line_number":170,"context_line":"            return"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        if profile_name and vlan_id:"},{"line_number":173,"context_line":"            self.driver.ucs_manager_connect()"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_160210ba","line":170,"updated":"2014-08-07 16:15:15.000000000","message":"if self.create_profile is true, the above check is redundant.","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"bfb5e500d13dfb017a123cf95ef3271c0176310b","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        profile_name \u003d \"OS-PP-\" + str(vlan_id)"},{"line_number":168,"context_line":"        if not vlan_id:"},{"line_number":169,"context_line":"            LOG.debug(_(\"UCS Manager Mechanism driver vlan_id invalid\"))"},{"line_number":170,"context_line":"            return"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        if profile_name and vlan_id:"},{"line_number":173,"context_line":"            self.driver.ucs_manager_connect()"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_d7130157","line":170,"in_reply_to":"baada198_160210ba","updated":"2014-08-08 22:01:07.000000000","message":"Agreed. But, since we are extracting the Vlan_id once again from the context, I had added this change. But, I don\u0027t think the result should change between update_port_precommit and postcommit.","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"d837268fa56b1683fca3f0eee4e9c566aa55abc3","unresolved":false,"context_lines":[{"line_number":169,"context_line":"            LOG.debug(_(\"UCS Manager Mechanism driver vlan_id invalid\"))"},{"line_number":170,"context_line":"            return"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        if profile_name and vlan_id:"},{"line_number":173,"context_line":"            self.driver.ucs_manager_connect()"},{"line_number":174,"context_line":"            self.driver.create_portprofile(profile_name, vlan_id)"},{"line_number":175,"context_line":"            self.driver.ucs_manager_disconnect()"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_b6a6c40b","line":172,"updated":"2014-08-07 16:15:15.000000000","message":"this check is not necessary, because it will always be true","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"bfb5e500d13dfb017a123cf95ef3271c0176310b","unresolved":false,"context_lines":[{"line_number":169,"context_line":"            LOG.debug(_(\"UCS Manager Mechanism driver vlan_id invalid\"))"},{"line_number":170,"context_line":"            return"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        if profile_name and vlan_id:"},{"line_number":173,"context_line":"            self.driver.ucs_manager_connect()"},{"line_number":174,"context_line":"            self.driver.create_portprofile(profile_name, vlan_id)"},{"line_number":175,"context_line":"            self.driver.ucs_manager_disconnect()"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_cee5593f","line":172,"in_reply_to":"baada198_b6a6c40b","updated":"2014-08-08 22:01:07.000000000","message":"Agreed.","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"d837268fa56b1683fca3f0eee4e9c566aa55abc3","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        if profile_name and vlan_id:"},{"line_number":173,"context_line":"            self.driver.ucs_manager_connect()"},{"line_number":174,"context_line":"            self.driver.create_portprofile(profile_name, vlan_id)"},{"line_number":175,"context_line":"            self.driver.ucs_manager_disconnect()"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"        LOG.debug(_(\"UCS Manager Mechanism driver done creating P-Profile\"))"},{"line_number":178,"context_line":"        # reset create_profile for the next request"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_b617a4ee","line":175,"updated":"2014-08-07 16:15:15.000000000","message":"so the norm is: perform db operations at pre commit, and hardware operations at post commit.","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"bfb5e500d13dfb017a123cf95ef3271c0176310b","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        if profile_name and vlan_id:"},{"line_number":173,"context_line":"            self.driver.ucs_manager_connect()"},{"line_number":174,"context_line":"            self.driver.create_portprofile(profile_name, vlan_id)"},{"line_number":175,"context_line":"            self.driver.ucs_manager_disconnect()"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"        LOG.debug(_(\"UCS Manager Mechanism driver done creating P-Profile\"))"},{"line_number":178,"context_line":"        # reset create_profile for the next request"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_8e8c4182","line":175,"in_reply_to":"baada198_b617a4ee","updated":"2014-08-08 22:01:07.000000000","message":"Not sure if this is just an observation or you are pointing to an issue.","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"d837268fa56b1683fca3f0eee4e9c566aa55abc3","unresolved":false,"context_lines":[{"line_number":176,"context_line":""},{"line_number":177,"context_line":"        LOG.debug(_(\"UCS Manager Mechanism driver done creating P-Profile\"))"},{"line_number":178,"context_line":"        # reset create_profile for the next request"},{"line_number":179,"context_line":"        self.create_profile \u003d False"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    def bind_port(self, context):"},{"line_number":182,"context_line":"        LOG.debug(_(\"Ucs Mech driver: Attempting to bind port %(port)s on \""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_d6ba580a","line":179,"updated":"2014-08-07 16:15:15.000000000","message":"self.create_profile \u003d False should be set at the beginning of update_port_precommit().","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"bfb5e500d13dfb017a123cf95ef3271c0176310b","unresolved":false,"context_lines":[{"line_number":176,"context_line":""},{"line_number":177,"context_line":"        LOG.debug(_(\"UCS Manager Mechanism driver done creating P-Profile\"))"},{"line_number":178,"context_line":"        # reset create_profile for the next request"},{"line_number":179,"context_line":"        self.create_profile \u003d False"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    def bind_port(self, context):"},{"line_number":182,"context_line":"        LOG.debug(_(\"Ucs Mech driver: Attempting to bind port %(port)s on \""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_24988d1a","line":179,"in_reply_to":"baada198_d6ba580a","updated":"2014-08-08 22:01:07.000000000","message":"Done.","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"d837268fa56b1683fca3f0eee4e9c566aa55abc3","unresolved":false,"context_lines":[{"line_number":179,"context_line":"        self.create_profile \u003d False"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    def bind_port(self, context):"},{"line_number":182,"context_line":"        LOG.debug(_(\"Ucs Mech driver: Attempting to bind port %(port)s on \""},{"line_number":183,"context_line":"                    \"network %(network)s\"),"},{"line_number":184,"context_line":"                  {\u0027port\u0027: context.current[\u0027id\u0027],"},{"line_number":185,"context_line":"                   \u0027network\u0027: context.network.current[\u0027id\u0027]})"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_cb72b549","line":182,"updated":"2014-08-07 16:15:15.000000000","message":"should be UCS everywhere","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"bfb5e500d13dfb017a123cf95ef3271c0176310b","unresolved":false,"context_lines":[{"line_number":179,"context_line":"        self.create_profile \u003d False"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    def bind_port(self, context):"},{"line_number":182,"context_line":"        LOG.debug(_(\"Ucs Mech driver: Attempting to bind port %(port)s on \""},{"line_number":183,"context_line":"                    \"network %(network)s\"),"},{"line_number":184,"context_line":"                  {\u0027port\u0027: context.current[\u0027id\u0027],"},{"line_number":185,"context_line":"                   \u0027network\u0027: context.network.current[\u0027id\u0027]})"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_ee9a1dc3","line":182,"in_reply_to":"baada198_cb72b549","updated":"2014-08-08 22:01:07.000000000","message":"Done","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"d837268fa56b1683fca3f0eee4e9c566aa55abc3","unresolved":false,"context_lines":[{"line_number":212,"context_line":"                          {\u0027id\u0027: segment[api.ID],"},{"line_number":213,"context_line":"                           \u0027seg\u0027: segment[api.SEGMENTATION_ID],"},{"line_number":214,"context_line":"                           \u0027physnet\u0027: segment[api.PHYSICAL_NETWORK],"},{"line_number":215,"context_line":"                           \u0027nettype\u0027: segment[api.NETWORK_TYPE]})"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    @staticmethod"},{"line_number":218,"context_line":"    def check_segment(segment):"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_0b282ded","line":215,"updated":"2014-08-07 16:15:15.000000000","message":"I don\u0027t think this should be an error: it just means one of the segments is not to be used. The error may be appropriate only if non of the segments is useful.","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"bfb5e500d13dfb017a123cf95ef3271c0176310b","unresolved":false,"context_lines":[{"line_number":212,"context_line":"                          {\u0027id\u0027: segment[api.ID],"},{"line_number":213,"context_line":"                           \u0027seg\u0027: segment[api.SEGMENTATION_ID],"},{"line_number":214,"context_line":"                           \u0027physnet\u0027: segment[api.PHYSICAL_NETWORK],"},{"line_number":215,"context_line":"                           \u0027nettype\u0027: segment[api.NETWORK_TYPE]})"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    @staticmethod"},{"line_number":218,"context_line":"    def check_segment(segment):"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_64b5257c","line":215,"in_reply_to":"baada198_0b282ded","updated":"2014-08-08 22:01:07.000000000","message":"Done. Error is logged now after port is not bound to any segment.","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"439020ed117e801a5052ea7a7f0b8c4d31127762","unresolved":false,"context_lines":[{"line_number":218,"context_line":"    def check_segment(segment):"},{"line_number":219,"context_line":"        LOG.debug(_(\"Ucs Mech driver: check_segment\"))"},{"line_number":220,"context_line":"        network_type \u003d segment[api.NETWORK_TYPE]"},{"line_number":221,"context_line":"        if network_type \u003d\u003d p_const.TYPE_VLAN:"},{"line_number":222,"context_line":"            return True"},{"line_number":223,"context_line":"        else:"},{"line_number":224,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_e67272e3","line":221,"updated":"2014-08-06 19:04:57.000000000","message":"could do \"return network_type \u003d\u003d p_const.TYPE_VLAN\"","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"bfb5e500d13dfb017a123cf95ef3271c0176310b","unresolved":false,"context_lines":[{"line_number":218,"context_line":"    def check_segment(segment):"},{"line_number":219,"context_line":"        LOG.debug(_(\"Ucs Mech driver: check_segment\"))"},{"line_number":220,"context_line":"        network_type \u003d segment[api.NETWORK_TYPE]"},{"line_number":221,"context_line":"        if network_type \u003d\u003d p_const.TYPE_VLAN:"},{"line_number":222,"context_line":"            return True"},{"line_number":223,"context_line":"        else:"},{"line_number":224,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_992aac76","line":221,"in_reply_to":"baada198_8bc6fd48","updated":"2014-08-08 22:01:07.000000000","message":"Done","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"d837268fa56b1683fca3f0eee4e9c566aa55abc3","unresolved":false,"context_lines":[{"line_number":218,"context_line":"    def check_segment(segment):"},{"line_number":219,"context_line":"        LOG.debug(_(\"Ucs Mech driver: check_segment\"))"},{"line_number":220,"context_line":"        network_type \u003d segment[api.NETWORK_TYPE]"},{"line_number":221,"context_line":"        if network_type \u003d\u003d p_const.TYPE_VLAN:"},{"line_number":222,"context_line":"            return True"},{"line_number":223,"context_line":"        else:"},{"line_number":224,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_8bc6fd48","line":221,"in_reply_to":"baada198_e67272e3","updated":"2014-08-07 16:15:15.000000000","message":"+1","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"bfb5e500d13dfb017a123cf95ef3271c0176310b","unresolved":false,"context_lines":[{"line_number":218,"context_line":"    def check_segment(segment):"},{"line_number":219,"context_line":"        LOG.debug(_(\"Ucs Mech driver: check_segment\"))"},{"line_number":220,"context_line":"        network_type \u003d segment[api.NETWORK_TYPE]"},{"line_number":221,"context_line":"        if network_type \u003d\u003d p_const.TYPE_VLAN:"},{"line_number":222,"context_line":"            return True"},{"line_number":223,"context_line":"        else:"},{"line_number":224,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_593494de","line":221,"in_reply_to":"baada198_e67272e3","updated":"2014-08-08 22:01:07.000000000","message":"Done","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"d837268fa56b1683fca3f0eee4e9c566aa55abc3","unresolved":false,"context_lines":[{"line_number":227,"context_line":"        LOG.debug(_(\"Ucs Mech driver: try_to_bind_segment_for_agent\"))"},{"line_number":228,"context_line":"        context.set_binding(segment[api.ID],"},{"line_number":229,"context_line":"                            self.vif_type,"},{"line_number":230,"context_line":"                            self.vif_details)"},{"line_number":231,"context_line":"        LOG.debug(\"Bound using segment: %s\", segment)"},{"line_number":232,"context_line":"        return True"},{"line_number":233,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_4b6a25ee","line":230,"updated":"2014-08-07 16:15:15.000000000","message":"I don\u0027t think this method is necessary anymore, and set_binding can be directly called from inside bind_port(). Also do you need to set the port status as ACTIVE? I think so.","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"bfb5e500d13dfb017a123cf95ef3271c0176310b","unresolved":false,"context_lines":[{"line_number":227,"context_line":"        LOG.debug(_(\"Ucs Mech driver: try_to_bind_segment_for_agent\"))"},{"line_number":228,"context_line":"        context.set_binding(segment[api.ID],"},{"line_number":229,"context_line":"                            self.vif_type,"},{"line_number":230,"context_line":"                            self.vif_details)"},{"line_number":231,"context_line":"        LOG.debug(\"Bound using segment: %s\", segment)"},{"line_number":232,"context_line":"        return True"},{"line_number":233,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_a471fddf","line":230,"in_reply_to":"baada198_4b6a25ee","updated":"2014-08-08 22:01:07.000000000","message":"Done","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"d837268fa56b1683fca3f0eee4e9c566aa55abc3","unresolved":false,"context_lines":[{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    def check_segment_for_agent(self, segment, agent):"},{"line_number":235,"context_line":"        LOG.debug(_(\"Ucs Mech driver: check_segment_for_agent\"))"},{"line_number":236,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_abf90151","line":236,"updated":"2014-08-07 16:15:15.000000000","message":"this method is not needed","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"bfb5e500d13dfb017a123cf95ef3271c0176310b","unresolved":false,"context_lines":[{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    def check_segment_for_agent(self, segment, agent):"},{"line_number":235,"context_line":"        LOG.debug(_(\"Ucs Mech driver: check_segment_for_agent\"))"},{"line_number":236,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_59673451","line":236,"in_reply_to":"baada198_abf90151","updated":"2014-08-08 22:01:07.000000000","message":"Done","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"change_message_id":"ab3c5b909a13b9101a0d06e51ea36a45bae8be53","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"CISCO_VMFEX_VENDOR_INFO \u003d \"1137:0071\""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"class CiscoUcsmMechanismDriver(api.MechanismDriver):"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_3b5da3ec","line":31,"updated":"2014-08-12 18:53:16.000000000","message":"Move to constants?","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"62d83dfe6bc5ee40fb0f9b0f3cd0ce74012563e2","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"CISCO_VMFEX_VENDOR_INFO \u003d \"1137:0071\""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"class CiscoUcsmMechanismDriver(api.MechanismDriver):"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_74454c43","line":31,"in_reply_to":"baada198_3b5da3ec","updated":"2014-08-13 14:31:58.000000000","message":"Moved.","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"99ba92b1139c8d9b7b10703127ce05709fe014d3","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    \"\"\"Cisco Ucs Manager ML2 Mechanism Driver.\"\"\""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def __init__(self):"},{"line_number":39,"context_line":"        self.initialize()"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def initialize(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_8b8324a8","line":38,"updated":"2014-08-08 23:37:32.000000000","message":"No need to call super()?","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"802cc62037eabd5185e41ada230f57ebbc36a6e7","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    \"\"\"Cisco Ucs Manager ML2 Mechanism Driver.\"\"\""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def __init__(self):"},{"line_number":39,"context_line":"        self.initialize()"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def initialize(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_0bf1d469","line":38,"updated":"2014-08-08 23:50:41.000000000","message":"is this required? the initialize method is called directly from the ml2 common code.","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"62d83dfe6bc5ee40fb0f9b0f3cd0ce74012563e2","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    \"\"\"Cisco Ucs Manager ML2 Mechanism Driver.\"\"\""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def __init__(self):"},{"line_number":39,"context_line":"        self.initialize()"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def initialize(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_255e6b79","line":38,"in_reply_to":"baada198_0bf1d469","updated":"2014-08-13 14:31:58.000000000","message":"Done.","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"62d83dfe6bc5ee40fb0f9b0f3cd0ce74012563e2","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    \"\"\"Cisco Ucs Manager ML2 Mechanism Driver.\"\"\""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def __init__(self):"},{"line_number":39,"context_line":"        self.initialize()"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def initialize(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_c5f04f94","line":38,"in_reply_to":"baada198_8b8324a8","updated":"2014-08-13 14:31:58.000000000","message":"This class inherits from MechanismDriver instead of SimpleAgentMechanismDriverBase. Because of this change, I do not have to call super().","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"9e1b08253f28c29ec835af40a04ecd322f6654b0","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    \"\"\"Cisco Ucs Manager ML2 Mechanism Driver.\"\"\""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def __init__(self):"},{"line_number":39,"context_line":"        self.initialize()"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def initialize(self):"},{"line_number":42,"context_line":"        LOG.debug(\"UCS Manager Mechanism driver found\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_cb5c0e1d","line":39,"updated":"2014-08-11 16:42:13.000000000","message":"initialize() is called by the ml2 manager, so no need for this call.","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"62d83dfe6bc5ee40fb0f9b0f3cd0ce74012563e2","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    \"\"\"Cisco Ucs Manager ML2 Mechanism Driver.\"\"\""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def __init__(self):"},{"line_number":39,"context_line":"        self.initialize()"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def initialize(self):"},{"line_number":42,"context_line":"        LOG.debug(\"UCS Manager Mechanism driver found\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_25c58b09","line":39,"in_reply_to":"baada198_cb5c0e1d","updated":"2014-08-13 14:31:58.000000000","message":"Done. Left over from some previous change.","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"802cc62037eabd5185e41ada230f57ebbc36a6e7","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def _get_vlanid(self, context):"},{"line_number":55,"context_line":"        segment \u003d context.bound_segment"},{"line_number":56,"context_line":"        if (segment and segment[api.NETWORK_TYPE] \u003d\u003d p_const.TYPE_VLAN):"},{"line_number":57,"context_line":"            return context.bound_segment.get(api.SEGMENTATION_ID)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def _parse_pci_vendor_config(self, vendor_config_list):"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_ab8c68d9","line":56,"updated":"2014-08-08 23:50:41.000000000","message":"() not required","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"62d83dfe6bc5ee40fb0f9b0f3cd0ce74012563e2","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def _get_vlanid(self, context):"},{"line_number":55,"context_line":"        segment \u003d context.bound_segment"},{"line_number":56,"context_line":"        if (segment and segment[api.NETWORK_TYPE] \u003d\u003d p_const.TYPE_VLAN):"},{"line_number":57,"context_line":"            return context.bound_segment.get(api.SEGMENTATION_ID)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def _parse_pci_vendor_config(self, vendor_config_list):"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_b9c9c252","line":56,"in_reply_to":"baada198_ab8c68d9","updated":"2014-08-13 14:31:58.000000000","message":"Done","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"change_message_id":"ab3c5b909a13b9101a0d06e51ea36a45bae8be53","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        if (segment and segment[api.NETWORK_TYPE] \u003d\u003d p_const.TYPE_VLAN):"},{"line_number":57,"context_line":"            return context.bound_segment.get(api.SEGMENTATION_ID)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def _parse_pci_vendor_config(self, vendor_config_list):"},{"line_number":60,"context_line":"        vendor_list \u003d []"},{"line_number":61,"context_line":"        for vendor in vendor_config_list:"},{"line_number":62,"context_line":"            vendor_product \u003d vendor.split(\u0027:\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_5b3b379b","line":59,"updated":"2014-08-12 18:53:16.000000000","message":"Need docstrings for all methods.","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"62d83dfe6bc5ee40fb0f9b0f3cd0ce74012563e2","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        if (segment and segment[api.NETWORK_TYPE] \u003d\u003d p_const.TYPE_VLAN):"},{"line_number":57,"context_line":"            return context.bound_segment.get(api.SEGMENTATION_ID)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def _parse_pci_vendor_config(self, vendor_config_list):"},{"line_number":60,"context_line":"        vendor_list \u003d []"},{"line_number":61,"context_line":"        for vendor in vendor_config_list:"},{"line_number":62,"context_line":"            vendor_product \u003d vendor.split(\u0027:\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_808a8fba","line":59,"in_reply_to":"baada198_5b3b379b","updated":"2014-08-13 14:31:58.000000000","message":"Done","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"e658c4813b9db4d4f753384f64cd937a72f0da3e","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        if vnic_type not in self.supported_vnic_types:"},{"line_number":73,"context_line":"            LOG.debug(\"Ucs Mech Driver: Unsupported vnic_type\")"},{"line_number":74,"context_line":"            return False"},{"line_number":75,"context_line":"        elif not self._check_for_supported_vendor(context):"},{"line_number":76,"context_line":"            LOG.debug(\"Ucs Mech Driver: Unsupported vendor \u0026 product type\")"},{"line_number":77,"context_line":"            return False"},{"line_number":78,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_7bb61e8e","line":75,"updated":"2014-08-13 11:56:50.000000000","message":"Actually, you do not need here elif, since False is returned from in line 74","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"93bb184eced89dd5b7d158651bfbbb3a3a1e74e7","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        if vnic_type not in self.supported_vnic_types:"},{"line_number":73,"context_line":"            LOG.debug(\"Ucs Mech Driver: Unsupported vnic_type\")"},{"line_number":74,"context_line":"            return False"},{"line_number":75,"context_line":"        elif not self._check_for_supported_vendor(context):"},{"line_number":76,"context_line":"            LOG.debug(\"Ucs Mech Driver: Unsupported vendor \u0026 product type\")"},{"line_number":77,"context_line":"            return False"},{"line_number":78,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"7ac7a964_dff017cc","line":75,"in_reply_to":"baada198_7bb61e8e","updated":"2014-08-13 23:56:12.000000000","message":"Yes, the same can be written as a separate if statement, if that is what you mean.","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"e658c4813b9db4d4f753384f64cd937a72f0da3e","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        return True"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def _is_vm_fex_port(self, context):"},{"line_number":98,"context_line":"        profile \u003d context.current.get(portbindings.PROFILE, {})"},{"line_number":99,"context_line":"        if not profile:"},{"line_number":100,"context_line":"            LOG.debug(\"Ucs Mech Driver: Port binding missing profile info\")"},{"line_number":101,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_1741720a","line":98,"updated":"2014-08-13 11:56:50.000000000","message":"lines 98-105 is exact duplication of 84-91. I do not think all the same checks are needed again, since you call this method only if _check_for_supported_vendor returned True","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"93bb184eced89dd5b7d158651bfbbb3a3a1e74e7","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        return True"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def _is_vm_fex_port(self, context):"},{"line_number":98,"context_line":"        profile \u003d context.current.get(portbindings.PROFILE, {})"},{"line_number":99,"context_line":"        if not profile:"},{"line_number":100,"context_line":"            LOG.debug(\"Ucs Mech Driver: Port binding missing profile info\")"},{"line_number":101,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":5,"id":"7ac7a964_7fb543cc","line":98,"in_reply_to":"baada198_1741720a","updated":"2014-08-13 23:56:12.000000000","message":"Agreed. I can do away with some duplicate checks in this method.","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"99ba92b1139c8d9b7b10703127ce05709fe014d3","unresolved":false,"context_lines":[{"line_number":97,"context_line":"    def _is_vm_fex_port(self, context):"},{"line_number":98,"context_line":"        profile \u003d context.current.get(portbindings.PROFILE, {})"},{"line_number":99,"context_line":"        if not profile:"},{"line_number":100,"context_line":"            LOG.debug(\"Ucs Mech Driver: Port binding missing profile info\")"},{"line_number":101,"context_line":"            return False"},{"line_number":102,"context_line":"        vendor_info \u003d profile.get(\u0027pci_vendor_info\u0027)"},{"line_number":103,"context_line":"        if not vendor_info:"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_ebebc078","line":100,"updated":"2014-08-08 23:37:32.000000000","message":"nit: the debug messsage will have the module name, so \u0027Ucs Mech Driver\u0027 is not really needed in the messages here.","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"62d83dfe6bc5ee40fb0f9b0f3cd0ce74012563e2","unresolved":false,"context_lines":[{"line_number":97,"context_line":"    def _is_vm_fex_port(self, context):"},{"line_number":98,"context_line":"        profile \u003d context.current.get(portbindings.PROFILE, {})"},{"line_number":99,"context_line":"        if not profile:"},{"line_number":100,"context_line":"            LOG.debug(\"Ucs Mech Driver: Port binding missing profile info\")"},{"line_number":101,"context_line":"            return False"},{"line_number":102,"context_line":"        vendor_info \u003d profile.get(\u0027pci_vendor_info\u0027)"},{"line_number":103,"context_line":"        if not vendor_info:"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_85e577a4","line":100,"in_reply_to":"baada198_ebebc078","updated":"2014-08-13 14:31:58.000000000","message":"Agreed.","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"9e1b08253f28c29ec835af40a04ecd322f6654b0","unresolved":false,"context_lines":[{"line_number":104,"context_line":"            LOG.debug(\"Ucs Mech Driver: Port binding missing profile info\")"},{"line_number":105,"context_line":"            return False"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        if (vendor_info in CISCO_VMFEX_VENDOR_INFO):"},{"line_number":108,"context_line":"            return True"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_cb716e0e","line":107,"updated":"2014-08-11 16:42:13.000000000","message":"remove ()","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"62d83dfe6bc5ee40fb0f9b0f3cd0ce74012563e2","unresolved":false,"context_lines":[{"line_number":104,"context_line":"            LOG.debug(\"Ucs Mech Driver: Port binding missing profile info\")"},{"line_number":105,"context_line":"            return False"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        if (vendor_info in CISCO_VMFEX_VENDOR_INFO):"},{"line_number":108,"context_line":"            return True"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_3b320a0f","line":107,"in_reply_to":"baada198_cb716e0e","updated":"2014-08-13 14:31:58.000000000","message":"Changing based on the next comment.","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"9e1b08253f28c29ec835af40a04ecd322f6654b0","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            return False"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        if (vendor_info in CISCO_VMFEX_VENDOR_INFO):"},{"line_number":108,"context_line":"            return True"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        return False"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_8b521666","line":108,"updated":"2014-08-11 16:42:13.000000000","message":"just do return vendor_info in CISCO_VMFEX_VENDOR_INFO","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"62d83dfe6bc5ee40fb0f9b0f3cd0ce74012563e2","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            return False"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        if (vendor_info in CISCO_VMFEX_VENDOR_INFO):"},{"line_number":108,"context_line":"            return True"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        return False"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_5b35fef3","line":108,"in_reply_to":"baada198_8b521666","updated":"2014-08-13 14:31:58.000000000","message":"Agreed.","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"e658c4813b9db4d4f753384f64cd937a72f0da3e","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        if (vendor_info in CISCO_VMFEX_VENDOR_INFO):"},{"line_number":108,"context_line":"            return True"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        return False"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    def update_port_precommit(self, context):"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_b7b6068b","line":109,"updated":"2014-08-13 11:56:50.000000000","message":"vendor_info \u003d\u003d CISCO_VMFEX_VENDOR_INFO","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"93bb184eced89dd5b7d158651bfbbb3a3a1e74e7","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        if (vendor_info in CISCO_VMFEX_VENDOR_INFO):"},{"line_number":108,"context_line":"            return True"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        return False"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    def update_port_precommit(self, context):"}],"source_content_type":"text/x-python","patch_set":5,"id":"7ac7a964_9f013f3c","line":109,"in_reply_to":"baada198_b7b6068b","updated":"2014-08-13 23:56:12.000000000","message":"Please look at the latest version and let me know if you are ok with that.","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"e658c4813b9db4d4f753384f64cd937a72f0da3e","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        self.create_profile \u003d False"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        if not self._check_vnic_type_and_vendor_info(context):"},{"line_number":126,"context_line":"            LOG.debug(_(\"UCS Manager does not support this vnic_type\"))"},{"line_number":127,"context_line":"            return"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        vlan_id \u003d self._get_vlanid(context)"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_576e8aff","line":126,"updated":"2014-08-13 11:56:50.000000000","message":"or vendor_info","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"e658c4813b9db4d4f753384f64cd937a72f0da3e","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        vlan_id \u003d self._get_vlanid(context)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        if not vlan_id:"},{"line_number":132,"context_line":"            LOG.debug(\"Ucs Mech Driver: update_port_precommit invalid vlan_id\")"},{"line_number":133,"context_line":"            return"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        p_profile_name \u003d \"OS-PP-\" + str(vlan_id)"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_f73ebee2","line":132,"updated":"2014-08-13 11:56:50.000000000","message":"missing vlan_id.\nWhy is this debug level?","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"e658c4813b9db4d4f753384f64cd937a72f0da3e","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        LOG.debug(\"Ucs Mech Driver: update_port_precommit: Profile: %s\","},{"line_number":137,"context_line":"                  p_profile_name)"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"        p_profile \u003d self.ucsm_db.get_port_profile_for_vlan(p_profile_name,"},{"line_number":140,"context_line":"                                                           vlan_id)"},{"line_number":141,"context_line":"        port \u003d context.current"},{"line_number":142,"context_line":"        port_id \u003d port[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_ba47cd51","line":139,"updated":"2014-08-13 11:56:50.000000000","message":"suggest to move this line to be before  line146","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"93bb184eced89dd5b7d158651bfbbb3a3a1e74e7","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        LOG.debug(\"Ucs Mech Driver: update_port_precommit: Profile: %s\","},{"line_number":137,"context_line":"                  p_profile_name)"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"        p_profile \u003d self.ucsm_db.get_port_profile_for_vlan(p_profile_name,"},{"line_number":140,"context_line":"                                                           vlan_id)"},{"line_number":141,"context_line":"        port \u003d context.current"},{"line_number":142,"context_line":"        port_id \u003d port[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"7ac7a964_8a0e5b33","line":139,"in_reply_to":"baada198_ba47cd51","updated":"2014-08-13 23:56:12.000000000","message":"Done","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"9e1b08253f28c29ec835af40a04ecd322f6654b0","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        p_profile \u003d self.ucsm_db.get_port_profile_for_vlan(p_profile_name,"},{"line_number":140,"context_line":"                                                           vlan_id)"},{"line_number":141,"context_line":"        port \u003d context.current"},{"line_number":142,"context_line":"        port_id \u003d port[\u0027id\u0027]"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        LOG.debug(\"Ucs Mech Driver: update_port_precommit: VLAN_id: %d\","},{"line_number":145,"context_line":"                  vlan_id)"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_cb7b2ebd","line":142,"updated":"2014-08-11 16:42:13.000000000","message":"port_id \u003d context.current[\u0027id\u0027]","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"62d83dfe6bc5ee40fb0f9b0f3cd0ce74012563e2","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        p_profile \u003d self.ucsm_db.get_port_profile_for_vlan(p_profile_name,"},{"line_number":140,"context_line":"                                                           vlan_id)"},{"line_number":141,"context_line":"        port \u003d context.current"},{"line_number":142,"context_line":"        port_id \u003d port[\u0027id\u0027]"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        LOG.debug(\"Ucs Mech Driver: update_port_precommit: VLAN_id: %d\","},{"line_number":145,"context_line":"                  vlan_id)"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_9b095634","line":142,"in_reply_to":"baada198_cb7b2ebd","updated":"2014-08-13 14:31:58.000000000","message":"Removing these 2 lines since port_id does not need to be passed into add_port_profile() anymore.","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"9e1b08253f28c29ec835af40a04ecd322f6654b0","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        port_id \u003d port[\u0027id\u0027]"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        LOG.debug(\"Ucs Mech Driver: update_port_precommit: VLAN_id: %d\","},{"line_number":145,"context_line":"                  vlan_id)"},{"line_number":146,"context_line":"        if not p_profile:"},{"line_number":147,"context_line":"            # Create a new port profile entry in the db"},{"line_number":148,"context_line":"            p_profile \u003d self.ucsm_db.add_port_profile(p_profile_name,"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_4b68fef3","line":145,"updated":"2014-08-11 16:42:13.000000000","message":"recommend combining both debug message and indicate if profile already exists in the message.","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"62d83dfe6bc5ee40fb0f9b0f3cd0ce74012563e2","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        port_id \u003d port[\u0027id\u0027]"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        LOG.debug(\"Ucs Mech Driver: update_port_precommit: VLAN_id: %d\","},{"line_number":145,"context_line":"                  vlan_id)"},{"line_number":146,"context_line":"        if not p_profile:"},{"line_number":147,"context_line":"            # Create a new port profile entry in the db"},{"line_number":148,"context_line":"            p_profile \u003d self.ucsm_db.add_port_profile(p_profile_name,"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_9b2236b8","line":145,"in_reply_to":"baada198_4b68fef3","updated":"2014-08-13 14:31:58.000000000","message":"Done","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"b0e39f391896571bdb9eb030c256a1fd55a1a56b","unresolved":false,"context_lines":[{"line_number":152,"context_line":"    def update_port_postcommit(self, context):"},{"line_number":153,"context_line":"        # Create a port profile and push to UCS manager."},{"line_number":154,"context_line":"        if not self._check_vnic_type_and_vendor_info(context):"},{"line_number":155,"context_line":"            LOG.debug(\"Ucs Mech Driver: update_port_postcommit aborting\")"},{"line_number":156,"context_line":"            return"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        if not self.create_profile:"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_42ca9c46","line":155,"updated":"2014-08-11 17:47:36.000000000","message":"should use similar log message as in precommit().","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"62d83dfe6bc5ee40fb0f9b0f3cd0ce74012563e2","unresolved":false,"context_lines":[{"line_number":152,"context_line":"    def update_port_postcommit(self, context):"},{"line_number":153,"context_line":"        # Create a port profile and push to UCS manager."},{"line_number":154,"context_line":"        if not self._check_vnic_type_and_vendor_info(context):"},{"line_number":155,"context_line":"            LOG.debug(\"Ucs Mech Driver: update_port_postcommit aborting\")"},{"line_number":156,"context_line":"            return"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        if not self.create_profile:"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_feade0e7","line":155,"in_reply_to":"baada198_42ca9c46","updated":"2014-08-13 14:31:58.000000000","message":"Done","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"802cc62037eabd5185e41ada230f57ebbc36a6e7","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        vlan_id \u003d self._get_vlanid(context)"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"        profile_name \u003d \"OS-PP-\" + str(vlan_id)"},{"line_number":164,"context_line":"        self.driver.ucs_manager_connect()"},{"line_number":165,"context_line":"        self.driver.create_portprofile(profile_name, vlan_id)"},{"line_number":166,"context_line":"        self.driver.ucs_manager_disconnect()"},{"line_number":167,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_ab7aa8b8","line":164,"updated":"2014-08-08 23:50:41.000000000","message":"can the connect/disconnect methods be called from the driver code instead? call connect/disconnect from create_portprofile()","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"9e1b08253f28c29ec835af40a04ecd322f6654b0","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        vlan_id \u003d self._get_vlanid(context)"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"        profile_name \u003d \"OS-PP-\" + str(vlan_id)"},{"line_number":164,"context_line":"        self.driver.ucs_manager_connect()"},{"line_number":165,"context_line":"        self.driver.create_portprofile(profile_name, vlan_id)"},{"line_number":166,"context_line":"        self.driver.ucs_manager_disconnect()"},{"line_number":167,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_0617db54","line":164,"in_reply_to":"baada198_ab7aa8b8","updated":"2014-08-11 16:42:13.000000000","message":"+1","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"802cc62037eabd5185e41ada230f57ebbc36a6e7","unresolved":false,"context_lines":[{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def bind_port(self, context):"},{"line_number":172,"context_line":"        LOG.debug(\"UCS Mech Driver: Attempting to bind port %(port)s on \""},{"line_number":173,"context_line":"        \"network %(network)s\","},{"line_number":174,"context_line":"        {\u0027port\u0027: context.current[\u0027id\u0027],"},{"line_number":175,"context_line":"        \u0027network\u0027: context.network.current[\u0027id\u0027]})"},{"line_number":176,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_ab51c832","line":173,"updated":"2014-08-08 23:50:41.000000000","message":"these three lines should be indented. surprised pep8 doesn\u0027t pick up on this.","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"62d83dfe6bc5ee40fb0f9b0f3cd0ce74012563e2","unresolved":false,"context_lines":[{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def bind_port(self, context):"},{"line_number":172,"context_line":"        LOG.debug(\"UCS Mech Driver: Attempting to bind port %(port)s on \""},{"line_number":173,"context_line":"        \"network %(network)s\","},{"line_number":174,"context_line":"        {\u0027port\u0027: context.current[\u0027id\u0027],"},{"line_number":175,"context_line":"        \u0027network\u0027: context.network.current[\u0027id\u0027]})"},{"line_number":176,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_3e891825","line":173,"in_reply_to":"baada198_ab51c832","updated":"2014-08-13 14:31:58.000000000","message":"Done","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"9e1b08253f28c29ec835af40a04ecd322f6654b0","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        LOG.debug(\"UCS Mech Driver: Attempting to bind port %(port)s on \""},{"line_number":173,"context_line":"        \"network %(network)s\","},{"line_number":174,"context_line":"        {\u0027port\u0027: context.current[\u0027id\u0027],"},{"line_number":175,"context_line":"        \u0027network\u0027: context.network.current[\u0027id\u0027]})"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"        if not self._check_vnic_type_and_vendor_info(context):"},{"line_number":178,"context_line":"            LOG.debug(\"UCS Mech Driver: Refusing to bind due to unsupported \""}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_a68e2f30","line":175,"updated":"2014-08-11 16:42:13.000000000","message":"indent","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"62d83dfe6bc5ee40fb0f9b0f3cd0ce74012563e2","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        LOG.debug(\"UCS Mech Driver: Attempting to bind port %(port)s on \""},{"line_number":173,"context_line":"        \"network %(network)s\","},{"line_number":174,"context_line":"        {\u0027port\u0027: context.current[\u0027id\u0027],"},{"line_number":175,"context_line":"        \u0027network\u0027: context.network.current[\u0027id\u0027]})"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"        if not self._check_vnic_type_and_vendor_info(context):"},{"line_number":178,"context_line":"            LOG.debug(\"UCS Mech Driver: Refusing to bind due to unsupported \""}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_5e7c0c22","line":175,"in_reply_to":"baada198_a68e2f30","updated":"2014-08-13 14:31:58.000000000","message":"Done","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"9e1b08253f28c29ec835af40a04ecd322f6654b0","unresolved":false,"context_lines":[{"line_number":183,"context_line":"            if self.check_segment(segment):"},{"line_number":184,"context_line":"                LOG.debug(\"UCS Mech Driver: Vlan_id before binding: %s\","},{"line_number":185,"context_line":"                          str(segment[api.SEGMENTATION_ID]))"},{"line_number":186,"context_line":"                vlan_id \u003d segment[api.SEGMENTATION_ID]"},{"line_number":187,"context_line":"                # Check if this is a Cisco VM-FEX port or Intel SR_IOV port"},{"line_number":188,"context_line":"                if self._is_vm_fex_port(context):"},{"line_number":189,"context_line":"                    profile_name \u003d \"OS-PP-\" + str(vlan_id)"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_66fc1772","line":186,"updated":"2014-08-11 16:42:13.000000000","message":"can you flip the above two statements? The debug message can then do str(valn_id). Alternatively vlan_id can be returned from check_segment().","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"62d83dfe6bc5ee40fb0f9b0f3cd0ce74012563e2","unresolved":false,"context_lines":[{"line_number":183,"context_line":"            if self.check_segment(segment):"},{"line_number":184,"context_line":"                LOG.debug(\"UCS Mech Driver: Vlan_id before binding: %s\","},{"line_number":185,"context_line":"                          str(segment[api.SEGMENTATION_ID]))"},{"line_number":186,"context_line":"                vlan_id \u003d segment[api.SEGMENTATION_ID]"},{"line_number":187,"context_line":"                # Check if this is a Cisco VM-FEX port or Intel SR_IOV port"},{"line_number":188,"context_line":"                if self._is_vm_fex_port(context):"},{"line_number":189,"context_line":"                    profile_name \u003d \"OS-PP-\" + str(vlan_id)"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_de701c0b","line":186,"in_reply_to":"baada198_66fc1772","updated":"2014-08-13 14:31:58.000000000","message":"Done","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"802cc62037eabd5185e41ada230f57ebbc36a6e7","unresolved":false,"context_lines":[{"line_number":187,"context_line":"                # Check if this is a Cisco VM-FEX port or Intel SR_IOV port"},{"line_number":188,"context_line":"                if self._is_vm_fex_port(context):"},{"line_number":189,"context_line":"                    profile_name \u003d \"OS-PP-\" + str(vlan_id)"},{"line_number":190,"context_line":"                    self.vif_details[portbindings.VIF_DETAILS_PROFILEID] \u003d \\"},{"line_number":191,"context_line":"                        profile_name"},{"line_number":192,"context_line":"                else:"},{"line_number":193,"context_line":"                    self.vif_details[portbindings.VIF_DETAILS_VLAN] \u003d \\"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_2b0cd843","line":190,"updated":"2014-08-08 23:50:41.000000000","message":"did you have to use \"\\\"? it\u0027s not the recommended way to wrap a line. surprised it\u0027s even required. (here and below)","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"62d83dfe6bc5ee40fb0f9b0f3cd0ce74012563e2","unresolved":false,"context_lines":[{"line_number":187,"context_line":"                # Check if this is a Cisco VM-FEX port or Intel SR_IOV port"},{"line_number":188,"context_line":"                if self._is_vm_fex_port(context):"},{"line_number":189,"context_line":"                    profile_name \u003d \"OS-PP-\" + str(vlan_id)"},{"line_number":190,"context_line":"                    self.vif_details[portbindings.VIF_DETAILS_PROFILEID] \u003d \\"},{"line_number":191,"context_line":"                        profile_name"},{"line_number":192,"context_line":"                else:"},{"line_number":193,"context_line":"                    self.vif_details[portbindings.VIF_DETAILS_VLAN] \u003d \\"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_f4f87c80","line":190,"in_reply_to":"baada198_2b0cd843","updated":"2014-08-13 14:31:58.000000000","message":"Parentheses did not work in this case. Hope this format is ok.","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"e658c4813b9db4d4f753384f64cd937a72f0da3e","unresolved":false,"context_lines":[{"line_number":199,"context_line":"                                    constants.PORT_STATUS_ACTIVE)"},{"line_number":200,"context_line":"                return"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"        LOG.error(_(\"UCS Mech Driver: Failed binding port for segment \""},{"line_number":203,"context_line":"                    \"ID %(id)s, segment %(seg)s, physnet %(physnet)s, \""},{"line_number":204,"context_line":"                    \"and network type %(nettype)s\"),"},{"line_number":205,"context_line":"                  {\u0027id\u0027: segment[api.ID],"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_0ee31ba1","line":202,"updated":"2014-08-13 11:56:50.000000000","message":"Please use _LE (http://docs.openstack.org/developer/hacking/#internationalization)","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"93bb184eced89dd5b7d158651bfbbb3a3a1e74e7","unresolved":false,"context_lines":[{"line_number":199,"context_line":"                                    constants.PORT_STATUS_ACTIVE)"},{"line_number":200,"context_line":"                return"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"        LOG.error(_(\"UCS Mech Driver: Failed binding port for segment \""},{"line_number":203,"context_line":"                    \"ID %(id)s, segment %(seg)s, physnet %(physnet)s, \""},{"line_number":204,"context_line":"                    \"and network type %(nettype)s\"),"},{"line_number":205,"context_line":"                  {\u0027id\u0027: segment[api.ID],"}],"source_content_type":"text/x-python","patch_set":5,"id":"7ac7a964_ea618fd4","line":202,"in_reply_to":"baada198_0ee31ba1","updated":"2014-08-13 23:56:12.000000000","message":"Done","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"c159c6348b9bd6220cafa5a4fe0c0513dd09f423","unresolved":false,"context_lines":[{"line_number":52,"context_line":"            return context.bound_segment.get(api.SEGMENTATION_ID)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def _check_vnic_type_and_vendor_info(self, context):"},{"line_number":55,"context_line":"        \"\"\"Returns True if:"},{"line_number":56,"context_line":"        1. the port vnic_type is direct or macvtap and"},{"line_number":57,"context_line":"        2. the vendor_id and product_id of the port is supported by"},{"line_number":58,"context_line":"        this MD"}],"source_content_type":"text/x-python","patch_set":8,"id":"7ac7a964_9ac13131","line":55,"updated":"2014-08-14 13:23:58.000000000","message":"The first line of the docstring should be a summary line (with a period). Additional docstring lines should be separated by a blank line (see PEP257). The goal is so that automated documentation tools can use the summary line in generating the documentation for the method.\n\nSame for other docstrings in this file.","commit_id":"7a300e17d9c420c64e0949de75a8d0a374bb4216"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"f079ee091d7d4a7651fb212d05964cad1312e294","unresolved":false,"context_lines":[{"line_number":52,"context_line":"            return context.bound_segment.get(api.SEGMENTATION_ID)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def _check_vnic_type_and_vendor_info(self, context):"},{"line_number":55,"context_line":"        \"\"\"Returns True if:"},{"line_number":56,"context_line":"        1. the port vnic_type is direct or macvtap and"},{"line_number":57,"context_line":"        2. the vendor_id and product_id of the port is supported by"},{"line_number":58,"context_line":"        this MD"}],"source_content_type":"text/x-python","patch_set":8,"id":"1abeadc6_d188e824","line":55,"in_reply_to":"7ac7a964_9ac13131","updated":"2014-08-19 12:37:39.000000000","message":"Thanks for pointing that out. Correcting doc strings.","commit_id":"7a300e17d9c420c64e0949de75a8d0a374bb4216"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"c159c6348b9bd6220cafa5a4fe0c0513dd09f423","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        # Check for vendor_info"},{"line_number":70,"context_line":"        if not self._check_for_supported_vendor(context):"},{"line_number":71,"context_line":"            LOG.debug(\"Unsupported vendor \u0026 product type\")"},{"line_number":72,"context_line":"            return False"},{"line_number":73,"context_line":"        else:"},{"line_number":74,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":8,"id":"7ac7a964_7a49b5cf","line":71,"updated":"2014-08-14 13:23:58.000000000","message":"If you do all the logging in _check_for_supported_vendor(), you can just do:\n\n    return self._check_for_supported_vendor(context)","commit_id":"7a300e17d9c420c64e0949de75a8d0a374bb4216"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"dfa8852f53f86af63b26a525416e68240a7b4d25","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        # Check for vendor_info"},{"line_number":70,"context_line":"        if not self._check_for_supported_vendor(context):"},{"line_number":71,"context_line":"            LOG.debug(\"Unsupported vendor \u0026 product type\")"},{"line_number":72,"context_line":"            return False"},{"line_number":73,"context_line":"        else:"},{"line_number":74,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":8,"id":"7ac7a964_b541a10d","line":71,"updated":"2014-08-14 12:49:29.000000000","message":"maybe worth to log the value as well","commit_id":"7a300e17d9c420c64e0949de75a8d0a374bb4216"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"f079ee091d7d4a7651fb212d05964cad1312e294","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        # Check for vendor_info"},{"line_number":70,"context_line":"        if not self._check_for_supported_vendor(context):"},{"line_number":71,"context_line":"            LOG.debug(\"Unsupported vendor \u0026 product type\")"},{"line_number":72,"context_line":"            return False"},{"line_number":73,"context_line":"        else:"},{"line_number":74,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":8,"id":"1abeadc6_a04dd774","line":71,"in_reply_to":"7ac7a964_7a49b5cf","updated":"2014-08-19 12:37:39.000000000","message":"Done","commit_id":"7a300e17d9c420c64e0949de75a8d0a374bb4216"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"f079ee091d7d4a7651fb212d05964cad1312e294","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        # Check for vendor_info"},{"line_number":70,"context_line":"        if not self._check_for_supported_vendor(context):"},{"line_number":71,"context_line":"            LOG.debug(\"Unsupported vendor \u0026 product type\")"},{"line_number":72,"context_line":"            return False"},{"line_number":73,"context_line":"        else:"},{"line_number":74,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":8,"id":"1abeadc6_8031bbee","line":71,"in_reply_to":"7ac7a964_b541a10d","updated":"2014-08-19 12:37:39.000000000","message":"Done","commit_id":"7a300e17d9c420c64e0949de75a8d0a374bb4216"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"c159c6348b9bd6220cafa5a4fe0c0513dd09f423","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        is of type supported by this MD."},{"line_number":79,"context_line":"        \"\"\""},{"line_number":80,"context_line":"        if not self.supported_pci_devs:"},{"line_number":81,"context_line":"            return False"},{"line_number":82,"context_line":"        profile \u003d context.current.get(portbindings.PROFILE, {})"},{"line_number":83,"context_line":"        if not profile:"},{"line_number":84,"context_line":"            LOG.debug(\"Port binding missing profile info\")"}],"source_content_type":"text/x-python","patch_set":8,"id":"7ac7a964_9a4691be","line":81,"updated":"2014-08-14 13:23:58.000000000","message":"Debug log?","commit_id":"7a300e17d9c420c64e0949de75a8d0a374bb4216"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"f079ee091d7d4a7651fb212d05964cad1312e294","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        is of type supported by this MD."},{"line_number":79,"context_line":"        \"\"\""},{"line_number":80,"context_line":"        if not self.supported_pci_devs:"},{"line_number":81,"context_line":"            return False"},{"line_number":82,"context_line":"        profile \u003d context.current.get(portbindings.PROFILE, {})"},{"line_number":83,"context_line":"        if not profile:"},{"line_number":84,"context_line":"            LOG.debug(\"Port binding missing profile info\")"}],"source_content_type":"text/x-python","patch_set":8,"id":"1abeadc6_20962795","line":81,"in_reply_to":"7ac7a964_9a4691be","updated":"2014-08-19 12:37:39.000000000","message":"This check is actually not required. So, removed it. Similar checking is done in parse_pci_vendor_config(). Just some overly cautious coding while testing with hardware!","commit_id":"7a300e17d9c420c64e0949de75a8d0a374bb4216"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"dfa8852f53f86af63b26a525416e68240a7b4d25","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        profile \u003d context.current.get(portbindings.PROFILE, {})"},{"line_number":101,"context_line":"        vendor_info \u003d profile.get(\u0027pci_vendor_info\u0027)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        return vendor_info in const.CISCO_VMFEX_VENDOR_INFO"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def update_port_precommit(self, context):"},{"line_number":106,"context_line":"        \"\"\"Remember information about this port."}],"source_content_type":"text/x-python","patch_set":8,"id":"7ac7a964_b58361cb","line":103,"updated":"2014-08-14 12:49:29.000000000","message":"still think you need check here if vendor_info \u003d\u003d const.CISCO_VMFEX_VENDOR_INFO. The constant is the string value, not the list.","commit_id":"7a300e17d9c420c64e0949de75a8d0a374bb4216"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"f079ee091d7d4a7651fb212d05964cad1312e294","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        profile \u003d context.current.get(portbindings.PROFILE, {})"},{"line_number":101,"context_line":"        vendor_info \u003d profile.get(\u0027pci_vendor_info\u0027)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        return vendor_info in const.CISCO_VMFEX_VENDOR_INFO"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def update_port_precommit(self, context):"},{"line_number":106,"context_line":"        \"\"\"Remember information about this port."}],"source_content_type":"text/x-python","patch_set":8,"id":"1abeadc6_60be5f01","line":103,"in_reply_to":"7ac7a964_b58361cb","updated":"2014-08-19 12:37:39.000000000","message":"Done","commit_id":"7a300e17d9c420c64e0949de75a8d0a374bb4216"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"dfa8852f53f86af63b26a525416e68240a7b4d25","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        vlan_id \u003d self._get_vlanid(context)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        if not vlan_id:"},{"line_number":132,"context_line":"            LOG.debug(\"update_port_precommit invalid vlan_id\")"},{"line_number":133,"context_line":"            return"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        p_profile_name \u003d \"OS-PP-\" + str(vlan_id)"}],"source_content_type":"text/x-python","patch_set":8,"id":"7ac7a964_5555ad1b","line":132,"updated":"2014-08-14 12:49:29.000000000","message":"The previous comment/question from patch 5: why this is debug level? Seems that the value must be there,  shouldn\u0027t it be warning?","commit_id":"7a300e17d9c420c64e0949de75a8d0a374bb4216"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"f079ee091d7d4a7651fb212d05964cad1312e294","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        vlan_id \u003d self._get_vlanid(context)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        if not vlan_id:"},{"line_number":132,"context_line":"            LOG.debug(\"update_port_precommit invalid vlan_id\")"},{"line_number":133,"context_line":"            return"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        p_profile_name \u003d \"OS-PP-\" + str(vlan_id)"}],"source_content_type":"text/x-python","patch_set":8,"id":"1abeadc6_c063b3af","line":132,"in_reply_to":"7ac7a964_5555ad1b","updated":"2014-08-19 12:37:39.000000000","message":"Agreed","commit_id":"7a300e17d9c420c64e0949de75a8d0a374bb4216"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"c159c6348b9bd6220cafa5a4fe0c0513dd09f423","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                   \u0027network\u0027: context.network.current[\u0027id\u0027]})"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        if not self._check_vnic_type_and_vendor_info(context):"},{"line_number":189,"context_line":"            LOG.debug(\"Refusing to bind due to unsupported vnic_type\""},{"line_number":190,"context_line":"                      \"or unsupported vendor\")"},{"line_number":191,"context_line":"            return"},{"line_number":192,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7ac7a964_3a02dd3e","line":189,"updated":"2014-08-14 13:23:58.000000000","message":"Not needed, as logged in _check_vnic_type_and_vendor_info() already.","commit_id":"7a300e17d9c420c64e0949de75a8d0a374bb4216"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"f079ee091d7d4a7651fb212d05964cad1312e294","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                   \u0027network\u0027: context.network.current[\u0027id\u0027]})"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        if not self._check_vnic_type_and_vendor_info(context):"},{"line_number":189,"context_line":"            LOG.debug(\"Refusing to bind due to unsupported vnic_type\""},{"line_number":190,"context_line":"                      \"or unsupported vendor\")"},{"line_number":191,"context_line":"            return"},{"line_number":192,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1abeadc6_20f9c7c8","line":189,"in_reply_to":"7ac7a964_3a02dd3e","updated":"2014-08-19 12:37:39.000000000","message":"Done","commit_id":"7a300e17d9c420c64e0949de75a8d0a374bb4216"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"c4a9c06d73c84cd660209a8b641bb0c300b3c28d","unresolved":false,"context_lines":[{"line_number":51,"context_line":"            return context.bound_segment.get(api.SEGMENTATION_ID)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def _check_vnic_type_and_vendor_info(self, context):"},{"line_number":54,"context_line":"        \"\"\"Checks if vnic_type and vendor device info of the port are"},{"line_number":55,"context_line":"        supported by this MD."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        Returns True if:"}],"source_content_type":"text/x-python","patch_set":9,"id":"1abeadc6_7ac07f7c","line":54,"updated":"2014-08-20 08:16:14.000000000","message":"[H405] Multi line docstrings should start with a one line summary followed by an empty line","commit_id":"a4c39c14361f14e955bb7478ea326fe733235b3f"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"1fa0e22bee4a42f52bd115e2decdbb7e2ddf6944","unresolved":false,"context_lines":[{"line_number":51,"context_line":"            return context.bound_segment.get(api.SEGMENTATION_ID)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def _check_vnic_type_and_vendor_info(self, context):"},{"line_number":54,"context_line":"        \"\"\"Checks if vnic_type and vendor device info of the port are"},{"line_number":55,"context_line":"        supported by this MD."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        Returns True if:"}],"source_content_type":"text/x-python","patch_set":9,"id":"1abeadc6_6c1b5fca","line":54,"in_reply_to":"1abeadc6_7ac07f7c","updated":"2014-08-20 19:49:35.000000000","message":"Done","commit_id":"a4c39c14361f14e955bb7478ea326fe733235b3f"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"c4a9c06d73c84cd660209a8b641bb0c300b3c28d","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        return self._check_for_supported_vendor(context)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def _check_for_supported_vendor(self, context):"},{"line_number":75,"context_line":"        \"\"\"Checks if the port belongs to a vendor supported"},{"line_number":76,"context_line":"        by this MD."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        Returns True for Cisco\u0027s VM-FEX ports and Intel\u0027s SR-IOV"}],"source_content_type":"text/x-python","patch_set":9,"id":"1abeadc6_baba1708","line":75,"updated":"2014-08-20 08:16:14.000000000","message":"Ditto","commit_id":"a4c39c14361f14e955bb7478ea326fe733235b3f"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"1fa0e22bee4a42f52bd115e2decdbb7e2ddf6944","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        return self._check_for_supported_vendor(context)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    def _check_for_supported_vendor(self, context):"},{"line_number":75,"context_line":"        \"\"\"Checks if the port belongs to a vendor supported"},{"line_number":76,"context_line":"        by this MD."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        Returns True for Cisco\u0027s VM-FEX ports and Intel\u0027s SR-IOV"}],"source_content_type":"text/x-python","patch_set":9,"id":"1abeadc6_ec5daf7a","line":75,"in_reply_to":"1abeadc6_baba1708","updated":"2014-08-20 19:49:35.000000000","message":"Done","commit_id":"a4c39c14361f14e955bb7478ea326fe733235b3f"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"c4a9c06d73c84cd660209a8b641bb0c300b3c28d","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        \"\"\"Checks if the port belongs to a vendor supported"},{"line_number":76,"context_line":"        by this MD."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        Returns True for Cisco\u0027s VM-FEX ports and Intel\u0027s SR-IOV"},{"line_number":79,"context_line":"        ports."},{"line_number":80,"context_line":"        \"\"\""},{"line_number":81,"context_line":"        profile \u003d context.current.get(portbindings.PROFILE, {})"}],"source_content_type":"text/x-python","patch_set":9,"id":"1abeadc6_5a4ca342","line":78,"updated":"2014-08-20 08:16:14.000000000","message":"I think the comment should be \u0027Returns True for supported pci devices\u0027, otherwise I do not understand why you need configurable option for supported pci devices","commit_id":"a4c39c14361f14e955bb7478ea326fe733235b3f"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"1fa0e22bee4a42f52bd115e2decdbb7e2ddf6944","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        \"\"\"Checks if the port belongs to a vendor supported"},{"line_number":76,"context_line":"        by this MD."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        Returns True for Cisco\u0027s VM-FEX ports and Intel\u0027s SR-IOV"},{"line_number":79,"context_line":"        ports."},{"line_number":80,"context_line":"        \"\"\""},{"line_number":81,"context_line":"        profile \u003d context.current.get(portbindings.PROFILE, {})"}],"source_content_type":"text/x-python","patch_set":9,"id":"1abeadc6_acf57758","line":78,"in_reply_to":"1abeadc6_5a4ca342","updated":"2014-08-20 19:49:35.000000000","message":"Agreed. Can\u0027t believe I am struggling with docstrings!!","commit_id":"a4c39c14361f14e955bb7478ea326fe733235b3f"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"c4a9c06d73c84cd660209a8b641bb0c300b3c28d","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        return vendor_info \u003d\u003d const.CISCO_VMFEX_VENDOR_INFO"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def update_port_precommit(self, context):"},{"line_number":108,"context_line":"        \"\"\"Adds information about the port\u0027s vlan and port profile"},{"line_number":109,"context_line":"        information to the DB."},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        Assign a port profile to this port. To do that:"}],"source_content_type":"text/x-python","patch_set":9,"id":"1abeadc6_4bb05743","line":108,"updated":"2014-08-20 08:16:14.000000000","message":"Ditto","commit_id":"a4c39c14361f14e955bb7478ea326fe733235b3f"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"1fa0e22bee4a42f52bd115e2decdbb7e2ddf6944","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        return vendor_info \u003d\u003d const.CISCO_VMFEX_VENDOR_INFO"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def update_port_precommit(self, context):"},{"line_number":108,"context_line":"        \"\"\"Adds information about the port\u0027s vlan and port profile"},{"line_number":109,"context_line":"        information to the DB."},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        Assign a port profile to this port. To do that:"}],"source_content_type":"text/x-python","patch_set":9,"id":"1abeadc6_ecb92f7a","line":108,"in_reply_to":"1abeadc6_4bb05743","updated":"2014-08-20 19:49:35.000000000","message":"Done","commit_id":"a4c39c14361f14e955bb7478ea326fe733235b3f"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"c4a9c06d73c84cd660209a8b641bb0c300b3c28d","unresolved":false,"context_lines":[{"line_number":141,"context_line":""},{"line_number":142,"context_line":"        p_profile \u003d self.ucsm_db.get_port_profile_entry_for_vlan("},{"line_number":143,"context_line":"            p_profile_name, vlan_id)"},{"line_number":144,"context_line":"        if not p_profile:"},{"line_number":145,"context_line":"            # Create a new port profile entry in the db"},{"line_number":146,"context_line":"            p_profile \u003d self.ucsm_db.add_port_profile(p_profile_name,"},{"line_number":147,"context_line":"                                                      vlan_id)"}],"source_content_type":"text/x-python","patch_set":9,"id":"1abeadc6_ab680b88","line":144,"updated":"2014-08-20 08:16:14.000000000","message":"Question:\nIs port profile persistent at the controller side?\nIn case it is not, there should be probably some code to sync neutron DB stored port profiles to the Manager, otherwise if Manager restarts, already created profiles won\u0027t be known to the Manager.","commit_id":"a4c39c14361f14e955bb7478ea326fe733235b3f"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"7b7dc027bdd8cc33f81b17ead09797f6bca0af4a","unresolved":false,"context_lines":[{"line_number":141,"context_line":""},{"line_number":142,"context_line":"        p_profile \u003d self.ucsm_db.get_port_profile_entry_for_vlan("},{"line_number":143,"context_line":"            p_profile_name, vlan_id)"},{"line_number":144,"context_line":"        if not p_profile:"},{"line_number":145,"context_line":"            # Create a new port profile entry in the db"},{"line_number":146,"context_line":"            p_profile \u003d self.ucsm_db.add_port_profile(p_profile_name,"},{"line_number":147,"context_line":"                                                      vlan_id)"}],"source_content_type":"text/x-python","patch_set":9,"id":"1abeadc6_ffb8f4e6","line":144,"in_reply_to":"1abeadc6_ab680b88","updated":"2014-08-20 13:34:45.000000000","message":"Yes, port profiles (and Vlan profiles and Client profiles, which are all required to complete the Port profile configuration) are persistent on the UCS Manager.","commit_id":"a4c39c14361f14e955bb7478ea326fe733235b3f"},{"author":{"_account_id":7018,"name":"Abhishek Raut","email":"rauta@vmware.com","username":"abhiraut"},"change_message_id":"6437635e70fa9463336418f3f3c3e745f9463f2d","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class CiscoUcsmMechanismDriver(api.MechanismDriver):"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    \"\"\"Cisco Ucs Manager ML2 Mechanism Driver.\"\"\""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def initialize(self):"},{"line_number":38,"context_line":"        self.vif_type \u003d portbindings.VIF_TYPE_802_QBH"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_76b0bcdd","line":35,"updated":"2014-08-27 01:05:40.000000000","message":"nit: since you will be uploading a new patch, for uniformity lets either stick to UCS or Ucs everywhere.","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"930acfe39b6518681cdd2f2ace88d522d65e332c","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class CiscoUcsmMechanismDriver(api.MechanismDriver):"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    \"\"\"Cisco Ucs Manager ML2 Mechanism Driver.\"\"\""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def initialize(self):"},{"line_number":38,"context_line":"        self.vif_type \u003d portbindings.VIF_TYPE_802_QBH"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_59a03f43","line":35,"in_reply_to":"1abeadc6_76b0bcdd","updated":"2014-08-27 09:03:14.000000000","message":"Done","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":7018,"name":"Abhishek Raut","email":"rauta@vmware.com","username":"abhiraut"},"change_message_id":"6437635e70fa9463336418f3f3c3e745f9463f2d","unresolved":false,"context_lines":[{"line_number":64,"context_line":"                                        portbindings.VNIC_NORMAL)"},{"line_number":65,"context_line":"        # Check for vnic_type"},{"line_number":66,"context_line":"        if vnic_type not in self.supported_vnic_types:"},{"line_number":67,"context_line":"            LOG.debug(\"Unsupported vnic_type\")"},{"line_number":68,"context_line":"            return False"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        # Check for vendor_info"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_6ab9a8ca","line":67,"updated":"2014-08-27 01:05:40.000000000","message":"might as well log the vnic_type supplied for debug purpose\n\nLOG.debug(\"Unsupported vnic_type: %s\", vnic_type)","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"930acfe39b6518681cdd2f2ace88d522d65e332c","unresolved":false,"context_lines":[{"line_number":64,"context_line":"                                        portbindings.VNIC_NORMAL)"},{"line_number":65,"context_line":"        # Check for vnic_type"},{"line_number":66,"context_line":"        if vnic_type not in self.supported_vnic_types:"},{"line_number":67,"context_line":"            LOG.debug(\"Unsupported vnic_type\")"},{"line_number":68,"context_line":"            return False"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        # Check for vendor_info"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_f9a58b47","line":67,"in_reply_to":"1abeadc6_6ab9a8ca","updated":"2014-08-27 09:03:14.000000000","message":"Done.","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"b72183dceb22fcb679294f1ad33985c062f9c323","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        self.create_profile \u003d False"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        if not self._check_vnic_type_and_vendor_info(context):"},{"line_number":118,"context_line":"            LOG.debug(\"update_port_precommit aborting due to unsupported\""},{"line_number":119,"context_line":"                      \"vnic_type or vendor\")"},{"line_number":120,"context_line":"            return"},{"line_number":121,"context_line":"        # If this is an Intel SR-IOV vnic, then no need to create port"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_0aa97d23","line":118,"updated":"2014-08-23 14:12:03.000000000","message":"space at end of string for continuation.","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"930acfe39b6518681cdd2f2ace88d522d65e332c","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        self.create_profile \u003d False"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        if not self._check_vnic_type_and_vendor_info(context):"},{"line_number":118,"context_line":"            LOG.debug(\"update_port_precommit aborting due to unsupported\""},{"line_number":119,"context_line":"                      \"vnic_type or vendor\")"},{"line_number":120,"context_line":"            return"},{"line_number":121,"context_line":"        # If this is an Intel SR-IOV vnic, then no need to create port"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_997737d4","line":118,"in_reply_to":"1abeadc6_0aa97d23","updated":"2014-08-27 09:03:14.000000000","message":"Done","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":7018,"name":"Abhishek Raut","email":"rauta@vmware.com","username":"abhiraut"},"change_message_id":"6437635e70fa9463336418f3f3c3e745f9463f2d","unresolved":false,"context_lines":[{"line_number":131,"context_line":"            LOG.warn(_(\"update_port_precommit invalid vlan_id\"))"},{"line_number":132,"context_line":"            return"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        p_profile_name \u003d \"OS-PP-\" + str(vlan_id)"},{"line_number":135,"context_line":"        LOG.debug(\"update_port_precommit: Profile: %s, VLAN_id: %d\","},{"line_number":136,"context_line":"                  p_profile_name, vlan_id)"},{"line_number":137,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_2a4410b6","line":134,"updated":"2014-08-27 01:05:40.000000000","message":"OS-PP is used here and elsewhere as a string. Worth adding it as a const?","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"930acfe39b6518681cdd2f2ace88d522d65e332c","unresolved":false,"context_lines":[{"line_number":131,"context_line":"            LOG.warn(_(\"update_port_precommit invalid vlan_id\"))"},{"line_number":132,"context_line":"            return"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        p_profile_name \u003d \"OS-PP-\" + str(vlan_id)"},{"line_number":135,"context_line":"        LOG.debug(\"update_port_precommit: Profile: %s, VLAN_id: %d\","},{"line_number":136,"context_line":"                  p_profile_name, vlan_id)"},{"line_number":137,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_f97cabb7","line":134,"in_reply_to":"1abeadc6_2a4410b6","updated":"2014-08-27 09:03:14.000000000","message":"Done","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"380d46c1e5cfd1a5bc52fe5c341e14a00f48c386","unresolved":false,"context_lines":[{"line_number":131,"context_line":"            LOG.warn(_(\"update_port_precommit invalid vlan_id\"))"},{"line_number":132,"context_line":"            return"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        p_profile_name \u003d \"OS-PP-\" + str(vlan_id)"},{"line_number":135,"context_line":"        LOG.debug(\"update_port_precommit: Profile: %s, VLAN_id: %d\","},{"line_number":136,"context_line":"                  p_profile_name, vlan_id)"},{"line_number":137,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_683febd6","line":134,"in_reply_to":"1abeadc6_2a4410b6","updated":"2014-08-27 04:54:56.000000000","message":"I\u0027d suggest to add a helper method","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"930acfe39b6518681cdd2f2ace88d522d65e332c","unresolved":false,"context_lines":[{"line_number":131,"context_line":"            LOG.warn(_(\"update_port_precommit invalid vlan_id\"))"},{"line_number":132,"context_line":"            return"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        p_profile_name \u003d \"OS-PP-\" + str(vlan_id)"},{"line_number":135,"context_line":"        LOG.debug(\"update_port_precommit: Profile: %s, VLAN_id: %d\","},{"line_number":136,"context_line":"                  p_profile_name, vlan_id)"},{"line_number":137,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_d981af90","line":134,"in_reply_to":"1abeadc6_683febd6","updated":"2014-08-27 09:03:14.000000000","message":"Added a helper method.","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"380d46c1e5cfd1a5bc52fe5c341e14a00f48c386","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        for segment in context.network.network_segments:"},{"line_number":189,"context_line":"            if self.check_segment(segment):"},{"line_number":190,"context_line":"                vlan_id \u003d segment[api.SEGMENTATION_ID]"},{"line_number":191,"context_line":"                LOG.debug(\"Vlan_id before binding: %s\", str(vlan_id))"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"                # Check if this is a Cisco VM-FEX port or Intel SR_IOV port"},{"line_number":194,"context_line":"                if self._is_vm_fex_port(context):"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_134ea86f","line":191,"updated":"2014-08-27 04:54:56.000000000","message":"log message looks like vlan_id is going to change :)","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"930acfe39b6518681cdd2f2ace88d522d65e332c","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        for segment in context.network.network_segments:"},{"line_number":189,"context_line":"            if self.check_segment(segment):"},{"line_number":190,"context_line":"                vlan_id \u003d segment[api.SEGMENTATION_ID]"},{"line_number":191,"context_line":"                LOG.debug(\"Vlan_id before binding: %s\", str(vlan_id))"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"                # Check if this is a Cisco VM-FEX port or Intel SR_IOV port"},{"line_number":194,"context_line":"                if self._is_vm_fex_port(context):"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_393543f7","line":191,"in_reply_to":"1abeadc6_134ea86f","updated":"2014-08-27 09:03:14.000000000","message":":). Fixed it.","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"bd4e15411119f85318134ecabeb2a87c7d3161bc","unresolved":false,"context_lines":[{"line_number":30,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class CiscoUcsmMechanismDriver(api.MechanismDriver):"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    \"\"\"Cisco UCS Manager ML2 Mechanism Driver.\"\"\""},{"line_number":36,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"1abeadc6_9a771b02","line":33,"updated":"2014-08-27 12:34:26.000000000","message":"The spec calls for methods for port create/delete/update. Any reason port create/delete are not here?","commit_id":"e0533cf083d268c69dc27cd0a02b4439c2c11d81"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"a368027a51986c0526c9d4779545a4798931ee6e","unresolved":false,"context_lines":[{"line_number":30,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class CiscoUcsmMechanismDriver(api.MechanismDriver):"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    \"\"\"Cisco UCS Manager ML2 Mechanism Driver.\"\"\""},{"line_number":36,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"1abeadc6_d31b397e","line":33,"in_reply_to":"1abeadc6_9a771b02","updated":"2014-08-28 09:22:14.000000000","message":"We want to create port profiles on the UCS Manager only after the port has been bound by this mech driver. (See bind_port() implementation below.) Hence waiting for update_port to actually create Port Profiles on UCS Manager and update the DB.\n\nPort profiles are generic config entities that can be reused on a diff port. Hence, not deleting the port profiles on the UCS Manager in the delete_port method. The DB also maintains a mapping between port profile and vlan_id. That mapping does not change because the current port got deleted. Hence keeping the entry for future re-use.","commit_id":"e0533cf083d268c69dc27cd0a02b4439c2c11d81"},{"author":{"_account_id":8645,"name":"Trinath Somanchi","email":"trinath.somanchi@freescale.com","username":"trinaths"},"change_message_id":"b190526619b00da12c55a449d322af08e2b77b6f","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        vlan_id \u003d self._get_vlanid(context)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        if not vlan_id:"},{"line_number":131,"context_line":"            LOG.warn(_(\"update_port_precommit invalid vlan_id\"))"},{"line_number":132,"context_line":"            return"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        p_profile_name \u003d \"OS-PP-\" + str(vlan_id)"}],"source_content_type":"text/x-python","patch_set":14,"id":"1abeadc6_da9b53c7","line":131,"updated":"2014-08-27 12:14:25.000000000","message":"_LW() ?","commit_id":"e0533cf083d268c69dc27cd0a02b4439c2c11d81"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"a368027a51986c0526c9d4779545a4798931ee6e","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        vlan_id \u003d self._get_vlanid(context)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        if not vlan_id:"},{"line_number":131,"context_line":"            LOG.warn(_(\"update_port_precommit invalid vlan_id\"))"},{"line_number":132,"context_line":"            return"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        p_profile_name \u003d \"OS-PP-\" + str(vlan_id)"}],"source_content_type":"text/x-python","patch_set":14,"id":"1abeadc6_6900b102","line":131,"in_reply_to":"1abeadc6_da9b53c7","updated":"2014-08-28 09:22:14.000000000","message":"Done","commit_id":"e0533cf083d268c69dc27cd0a02b4439c2c11d81"},{"author":{"_account_id":7987,"name":"Ivar Lazzaro","email":"ivarlazzaro@gmail.com","username":"Ivar"},"change_message_id":"dd8a70a8f9240ed5ce89c4b1d162b334dbda4da8","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"\"\"\""},{"line_number":17,"context_line":"ML2 Mechanism Driver for Cisco UCS Manager platform."},{"line_number":18,"context_line":"\"\"\""},{"line_number":19,"context_line":"from neutron.common import constants"},{"line_number":20,"context_line":"from neutron.extensions import portbindings"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_9af3df09","line":17,"updated":"2014-09-01 06:18:25.000000000","message":"nit: should be in class docstring","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"e6512117504ca66d5900b10d53061a10a85d5167","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"\"\"\""},{"line_number":17,"context_line":"ML2 Mechanism Driver for Cisco UCS Manager platform."},{"line_number":18,"context_line":"\"\"\""},{"line_number":19,"context_line":"from neutron.common import constants"},{"line_number":20,"context_line":"from neutron.extensions import portbindings"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_57ac9435","line":17,"in_reply_to":"fa98f980_9af3df09","updated":"2014-09-02 17:17:31.000000000","message":"Also present in Class doctoring. Removing this one.","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":7987,"name":"Ivar Lazzaro","email":"ivarlazzaro@gmail.com","username":"Ivar"},"change_message_id":"dd8a70a8f9240ed5ce89c4b1d162b334dbda4da8","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        self.vif_type \u003d portbindings.VIF_TYPE_802_QBH"},{"line_number":40,"context_line":"        self.vif_details \u003d {portbindings.CAP_PORT_FILTER: False}"},{"line_number":41,"context_line":"        self.driver \u003d ucsm_network_driver.CiscoUcsmDriver()"},{"line_number":42,"context_line":"        self.supported_vnic_types \u003d [portbindings.VNIC_DIRECT,"},{"line_number":43,"context_line":"                                     portbindings.VNIC_MACVTAP]"},{"line_number":44,"context_line":"        self.supported_pci_devs \u003d config.parse_pci_vendor_config()"},{"line_number":45,"context_line":"        self.create_profile \u003d False"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_9a267f67","line":42,"updated":"2014-09-01 06:18:25.000000000","message":"nit: since you are using this to check if given vnic_type is supported, you may use a set instead of a list.","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":7987,"name":"Ivar Lazzaro","email":"ivarlazzaro@gmail.com","username":"Ivar"},"change_message_id":"dd8a70a8f9240ed5ce89c4b1d162b334dbda4da8","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    def _get_vlanid(self, context):"},{"line_number":49,"context_line":"        \"\"\"Returns vlan_id associated with a bound VLAN segment.\"\"\""},{"line_number":50,"context_line":"        segment \u003d context.bound_segment"},{"line_number":51,"context_line":"        if segment and segment[api.NETWORK_TYPE] \u003d\u003d p_const.TYPE_VLAN:"},{"line_number":52,"context_line":"            return context.bound_segment.get(api.SEGMENTATION_ID)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def _check_vnic_type_and_vendor_info(self, context):"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_5a7977fb","line":51,"updated":"2014-09-01 06:18:25.000000000","message":"nit: you could use _check_segment(segment) in the second part of this check.","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"e6512117504ca66d5900b10d53061a10a85d5167","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    def _get_vlanid(self, context):"},{"line_number":49,"context_line":"        \"\"\"Returns vlan_id associated with a bound VLAN segment.\"\"\""},{"line_number":50,"context_line":"        segment \u003d context.bound_segment"},{"line_number":51,"context_line":"        if segment and segment[api.NETWORK_TYPE] \u003d\u003d p_const.TYPE_VLAN:"},{"line_number":52,"context_line":"            return context.bound_segment.get(api.SEGMENTATION_ID)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def _check_vnic_type_and_vendor_info(self, context):"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_3a69b7be","line":51,"in_reply_to":"fa98f980_5a7977fb","updated":"2014-09-02 17:17:31.000000000","message":"Done","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":7987,"name":"Ivar Lazzaro","email":"ivarlazzaro@gmail.com","username":"Ivar"},"change_message_id":"dd8a70a8f9240ed5ce89c4b1d162b334dbda4da8","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        \"\"\"Returns vlan_id associated with a bound VLAN segment.\"\"\""},{"line_number":50,"context_line":"        segment \u003d context.bound_segment"},{"line_number":51,"context_line":"        if segment and segment[api.NETWORK_TYPE] \u003d\u003d p_const.TYPE_VLAN:"},{"line_number":52,"context_line":"            return context.bound_segment.get(api.SEGMENTATION_ID)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def _check_vnic_type_and_vendor_info(self, context):"},{"line_number":55,"context_line":"        \"\"\"Checks if this vnic_type and vendor device info are supported."}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_9a411f0e","line":52,"updated":"2014-09-01 06:18:25.000000000","message":"use *segment* instead of *context.bound_segment*","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"e6512117504ca66d5900b10d53061a10a85d5167","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        \"\"\"Returns vlan_id associated with a bound VLAN segment.\"\"\""},{"line_number":50,"context_line":"        segment \u003d context.bound_segment"},{"line_number":51,"context_line":"        if segment and segment[api.NETWORK_TYPE] \u003d\u003d p_const.TYPE_VLAN:"},{"line_number":52,"context_line":"            return context.bound_segment.get(api.SEGMENTATION_ID)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def _check_vnic_type_and_vendor_info(self, context):"},{"line_number":55,"context_line":"        \"\"\"Checks if this vnic_type and vendor device info are supported."}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_3ab0d742","line":52,"in_reply_to":"fa98f980_9a411f0e","updated":"2014-09-02 17:17:31.000000000","message":"Done","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":7987,"name":"Ivar Lazzaro","email":"ivarlazzaro@gmail.com","username":"Ivar"},"change_message_id":"dd8a70a8f9240ed5ce89c4b1d162b334dbda4da8","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        associate with this port"},{"line_number":114,"context_line":"        \"\"\""},{"line_number":115,"context_line":"        # reset create_profile for the new request"},{"line_number":116,"context_line":"        self.create_profile \u003d False"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        if not self._check_vnic_type_and_vendor_info(context):"},{"line_number":119,"context_line":"            LOG.debug(\"update_port_precommit aborting due to unsupported \""}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_5a8fb723","line":116,"updated":"2014-09-01 06:18:25.000000000","message":"2 subsequent *update_port_precommit* could run before the first *update_port_postcommit* is called... Storing this at the class level would therefore cause a concurrency issue. Is it a better place to store it in the context instead?\n\nIf you are worried that the context could be modified externally (I can\u0027t guarantee you otherwise), maybe you can create a dictionary with this kind of information using the port_id as the key. (but even so, make sure to consider what would happen if two subsequent *precommit* are called on the same port).","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":7987,"name":"Ivar Lazzaro","email":"ivarlazzaro@gmail.com","username":"Ivar"},"change_message_id":"dd8a70a8f9240ed5ce89c4b1d162b334dbda4da8","unresolved":false,"context_lines":[{"line_number":132,"context_line":"            LOG.warn(_LW(\"update_port_precommit invalid vlan_id\"))"},{"line_number":133,"context_line":"            return"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        p_profile_name \u003d \"OS-PP-\" + str(vlan_id)"},{"line_number":136,"context_line":"        LOG.debug(\"update_port_precommit: Profile: %s, VLAN_id: %d\","},{"line_number":137,"context_line":"                  p_profile_name, vlan_id)"},{"line_number":138,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_3ad8331d","line":135,"updated":"2014-09-01 06:18:25.000000000","message":"Just a question: since the profile id is defined by naming convention, why do you need a database table? Is there any additional information you can retrieve from there? \n\nI\u0027m asking because your PortProfile model has only 2 colums (vlan_id and profile_id) and you seem to be able to compute both by only knowing the vlan_id (which is already stored somewhere else). Am I missing something?","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"c5accaf73107d77d25e79f1bbf1cc9b2ef836fe9","unresolved":false,"context_lines":[{"line_number":132,"context_line":"            LOG.warn(_LW(\"update_port_precommit invalid vlan_id\"))"},{"line_number":133,"context_line":"            return"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        p_profile_name \u003d \"OS-PP-\" + str(vlan_id)"},{"line_number":136,"context_line":"        LOG.debug(\"update_port_precommit: Profile: %s, VLAN_id: %d\","},{"line_number":137,"context_line":"                  p_profile_name, vlan_id)"},{"line_number":138,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_47c8bb74","line":135,"updated":"2014-09-01 07:02:21.000000000","message":"in ps#13 i\u0027ve suggested to add a helper method for making profile name","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"e6512117504ca66d5900b10d53061a10a85d5167","unresolved":false,"context_lines":[{"line_number":132,"context_line":"            LOG.warn(_LW(\"update_port_precommit invalid vlan_id\"))"},{"line_number":133,"context_line":"            return"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        p_profile_name \u003d \"OS-PP-\" + str(vlan_id)"},{"line_number":136,"context_line":"        LOG.debug(\"update_port_precommit: Profile: %s, VLAN_id: %d\","},{"line_number":137,"context_line":"                  p_profile_name, vlan_id)"},{"line_number":138,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_ce175fa2","line":135,"in_reply_to":"fa98f980_3ad8331d","updated":"2014-09-02 17:17:31.000000000","message":"The database table is used to figure out which vlan_ids have port profiles already configured. Yes, of course I can derive the port profile name from vlan_id, but this DB is being used to keep track of the port profiles already created by this MD and so does not have to recreate. \n\nIn update_port_precommit, we check if a port profile on the UCS Manager already exists by checking if a corresponding entry exists on the DB. If yes, we don\u0027t try to create it in the UCS Manager.","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"e6512117504ca66d5900b10d53061a10a85d5167","unresolved":false,"context_lines":[{"line_number":132,"context_line":"            LOG.warn(_LW(\"update_port_precommit invalid vlan_id\"))"},{"line_number":133,"context_line":"            return"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        p_profile_name \u003d \"OS-PP-\" + str(vlan_id)"},{"line_number":136,"context_line":"        LOG.debug(\"update_port_precommit: Profile: %s, VLAN_id: %d\","},{"line_number":137,"context_line":"                  p_profile_name, vlan_id)"},{"line_number":138,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_5af4bb86","line":135,"in_reply_to":"fa98f980_47c8bb74","updated":"2014-09-02 17:17:31.000000000","message":"Done","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"e6512117504ca66d5900b10d53061a10a85d5167","unresolved":false,"context_lines":[{"line_number":132,"context_line":"            LOG.warn(_LW(\"update_port_precommit invalid vlan_id\"))"},{"line_number":133,"context_line":"            return"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        p_profile_name \u003d \"OS-PP-\" + str(vlan_id)"},{"line_number":136,"context_line":"        LOG.debug(\"update_port_precommit: Profile: %s, VLAN_id: %d\","},{"line_number":137,"context_line":"                  p_profile_name, vlan_id)"},{"line_number":138,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_59cec284","line":135,"in_reply_to":"fa98f980_47c8bb74","updated":"2014-09-02 17:17:31.000000000","message":"Done. Please see comment earlier about the need for DB table.","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":7987,"name":"Ivar Lazzaro","email":"ivarlazzaro@gmail.com","username":"Ivar"},"change_message_id":"7b069f14496edafcbc8ef9dbe9d2dc148fabd9a6","unresolved":false,"context_lines":[{"line_number":132,"context_line":"            LOG.warn(_LW(\"update_port_precommit invalid vlan_id\"))"},{"line_number":133,"context_line":"            return"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        p_profile_name \u003d \"OS-PP-\" + str(vlan_id)"},{"line_number":136,"context_line":"        LOG.debug(\"update_port_precommit: Profile: %s, VLAN_id: %d\","},{"line_number":137,"context_line":"                  p_profile_name, vlan_id)"},{"line_number":138,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_b6c41e41","line":135,"in_reply_to":"fa98f980_47c8bb74","updated":"2014-09-01 17:26:04.000000000","message":"That would be nice too, my point is that you don\u0027t need a database table when you are able to compute all its column values by naming convention.","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":7987,"name":"Ivar Lazzaro","email":"ivarlazzaro@gmail.com","username":"Ivar"},"change_message_id":"dd8a70a8f9240ed5ce89c4b1d162b334dbda4da8","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        exist."},{"line_number":152,"context_line":"        \"\"\""},{"line_number":153,"context_line":"        # Create a port profile and push to UCS manager."},{"line_number":154,"context_line":"        if not self._check_vnic_type_and_vendor_info(context):"},{"line_number":155,"context_line":"            return"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        # If this is an Intel SR-IOV vnic, then no need to create port"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_faf4eb88","line":154,"updated":"2014-09-01 06:18:25.000000000","message":"Why doing this checks again? isn\u0027t the *create_profile* flag enough to guarantee whether this is True or False?","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":7987,"name":"Ivar Lazzaro","email":"ivarlazzaro@gmail.com","username":"Ivar"},"change_message_id":"5caba515760bf1e24b87c94e3b3d9dbbac1ee2da","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        exist."},{"line_number":152,"context_line":"        \"\"\""},{"line_number":153,"context_line":"        # Create a port profile and push to UCS manager."},{"line_number":154,"context_line":"        if not self._check_vnic_type_and_vendor_info(context):"},{"line_number":155,"context_line":"            return"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        # If this is an Intel SR-IOV vnic, then no need to create port"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_8e4a61aa","line":154,"in_reply_to":"fa98f980_776c869d","updated":"2014-09-02 18:39:43.000000000","message":"See my comment on L116 about this scenario. Fixing that would allow you to remove these checks.\n\nAlso, be aware that a \"precommit(unsupported_port)\" could run in parallel of a \"postcommit(supported_port)\"! And this could change your value in L164 under the hoods.\n\nAddressing my comment on L116 should solve this problem as well.","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"e6512117504ca66d5900b10d53061a10a85d5167","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        exist."},{"line_number":152,"context_line":"        \"\"\""},{"line_number":153,"context_line":"        # Create a port profile and push to UCS manager."},{"line_number":154,"context_line":"        if not self._check_vnic_type_and_vendor_info(context):"},{"line_number":155,"context_line":"            return"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        # If this is an Intel SR-IOV vnic, then no need to create port"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_776c869d","line":154,"in_reply_to":"fa98f980_faf4eb88","updated":"2014-09-02 17:17:31.000000000","message":"These checks were put in to do the right thing for the following scenario:\n\nprecommit(unsupported_port)\nprecommit(supported_port)\n\npostcommit(unsupported_port) \u003c---- we don\u0027t want to write to UCS Manager at this point.\npostcommit(supported_port)","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":7987,"name":"Ivar Lazzaro","email":"ivarlazzaro@gmail.com","username":"Ivar"},"change_message_id":"dd8a70a8f9240ed5ce89c4b1d162b334dbda4da8","unresolved":false,"context_lines":[{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        # If this is an Intel SR-IOV vnic, then no need to create port"},{"line_number":158,"context_line":"        # profile on the UCS manager."},{"line_number":159,"context_line":"        if not self._is_vm_fex_port(context):"},{"line_number":160,"context_line":"            LOG.debug(\"update_port_postcommit has nothing to do for this \""},{"line_number":161,"context_line":"                      \"sr-iov port\")"},{"line_number":162,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_1af28f9a","line":159,"updated":"2014-09-01 06:18:25.000000000","message":"see comment above","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"e6512117504ca66d5900b10d53061a10a85d5167","unresolved":false,"context_lines":[{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        # If this is an Intel SR-IOV vnic, then no need to create port"},{"line_number":158,"context_line":"        # profile on the UCS manager."},{"line_number":159,"context_line":"        if not self._is_vm_fex_port(context):"},{"line_number":160,"context_line":"            LOG.debug(\"update_port_postcommit has nothing to do for this \""},{"line_number":161,"context_line":"                      \"sr-iov port\")"},{"line_number":162,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_c9790e95","line":159,"in_reply_to":"fa98f980_1af28f9a","updated":"2014-09-02 17:17:31.000000000","message":"See response above.","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":7987,"name":"Ivar Lazzaro","email":"ivarlazzaro@gmail.com","username":"Ivar"},"change_message_id":"dd8a70a8f9240ed5ce89c4b1d162b334dbda4da8","unresolved":false,"context_lines":[{"line_number":209,"context_line":"        LOG.error(_LE(\"UCS Mech Driver: Failed binding port for segment \""},{"line_number":210,"context_line":"                  \"ID %(id)s, segment %(seg)s, physnet %(physnet)s, \""},{"line_number":211,"context_line":"                  \"and network type %(nettype)s\"),"},{"line_number":212,"context_line":"                  {\u0027id\u0027: segment[api.ID],"},{"line_number":213,"context_line":"                   \u0027seg\u0027: segment[api.SEGMENTATION_ID],"},{"line_number":214,"context_line":"                   \u0027physnet\u0027: segment[api.PHYSICAL_NETWORK],"},{"line_number":215,"context_line":"                   \u0027nettype\u0027: segment[api.NETWORK_TYPE]})"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_ba1423f6","line":212,"updated":"2014-09-01 06:18:25.000000000","message":"Segment is not assigned at this indentation level.","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"e6512117504ca66d5900b10d53061a10a85d5167","unresolved":false,"context_lines":[{"line_number":209,"context_line":"        LOG.error(_LE(\"UCS Mech Driver: Failed binding port for segment \""},{"line_number":210,"context_line":"                  \"ID %(id)s, segment %(seg)s, physnet %(physnet)s, \""},{"line_number":211,"context_line":"                  \"and network type %(nettype)s\"),"},{"line_number":212,"context_line":"                  {\u0027id\u0027: segment[api.ID],"},{"line_number":213,"context_line":"                   \u0027seg\u0027: segment[api.SEGMENTATION_ID],"},{"line_number":214,"context_line":"                   \u0027physnet\u0027: segment[api.PHYSICAL_NETWORK],"},{"line_number":215,"context_line":"                   \u0027nettype\u0027: segment[api.NETWORK_TYPE]})"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_09d0764f","line":212,"in_reply_to":"fa98f980_ba1423f6","updated":"2014-09-02 17:17:31.000000000","message":"Done","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"c121a2e800402f225296de24451567338e75f83e","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        self.supported_vnic_types \u003d [portbindings.VNIC_DIRECT,"},{"line_number":40,"context_line":"                                     portbindings.VNIC_MACVTAP]"},{"line_number":41,"context_line":"        self.supported_pci_devs \u003d config.parse_pci_vendor_config()"},{"line_number":42,"context_line":"        self.create_profile \u003d False"},{"line_number":43,"context_line":"        self.ucsm_db \u003d ucsm_model.UcsmDbModel()"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def _get_vlanid(self, context):"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa98f980_09d66bc5","line":42,"updated":"2014-09-02 18:59:46.000000000","message":"As Ivar pointed out, using self.create_profile is problematic, because of concurrent requests.","commit_id":"aeb18ba9ccd5243a715ea25e846ca079fc5bad13"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"6b855146ddb39bd9e11c7a1a0ce0740125c4b9fc","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        self.supported_vnic_types \u003d [portbindings.VNIC_DIRECT,"},{"line_number":40,"context_line":"                                     portbindings.VNIC_MACVTAP]"},{"line_number":41,"context_line":"        self.supported_pci_devs \u003d config.parse_pci_vendor_config()"},{"line_number":42,"context_line":"        self.create_profile \u003d False"},{"line_number":43,"context_line":"        self.ucsm_db \u003d ucsm_model.UcsmDbModel()"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def _get_vlanid(self, context):"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa98f980_08ca37a1","line":42,"in_reply_to":"fa98f980_09d66bc5","updated":"2014-09-09 15:44:03.000000000","message":"Done","commit_id":"aeb18ba9ccd5243a715ea25e846ca079fc5bad13"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"c121a2e800402f225296de24451567338e75f83e","unresolved":false,"context_lines":[{"line_number":189,"context_line":""},{"line_number":190,"context_line":"        for segment in context.network.network_segments:"},{"line_number":191,"context_line":"            if self.check_segment(segment):"},{"line_number":192,"context_line":"                vlan_id \u003d segment[api.SEGMENTATION_ID]"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"                if not vlan_id:"},{"line_number":195,"context_line":"                    LOG.warn(_LW(\"update_port_postcommit invalid \""}],"source_content_type":"text/x-python","patch_set":20,"id":"fa98f980_2926cfce","line":192,"updated":"2014-09-02 18:59:46.000000000","message":"You need to also check that the segment\u0027s physical_network is [one of] the one[s] handled by UCS (you\u0027d probably get this from config). Otherwise this driver cannot peacefully coexist with other mechanism drivers that can bind VLAN segments.","commit_id":"aeb18ba9ccd5243a715ea25e846ca079fc5bad13"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"6b855146ddb39bd9e11c7a1a0ce0740125c4b9fc","unresolved":false,"context_lines":[{"line_number":189,"context_line":""},{"line_number":190,"context_line":"        for segment in context.network.network_segments:"},{"line_number":191,"context_line":"            if self.check_segment(segment):"},{"line_number":192,"context_line":"                vlan_id \u003d segment[api.SEGMENTATION_ID]"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"                if not vlan_id:"},{"line_number":195,"context_line":"                    LOG.warn(_LW(\"update_port_postcommit invalid \""}],"source_content_type":"text/x-python","patch_set":20,"id":"fa98f980_2b07801a","line":192,"in_reply_to":"fa98f980_2926cfce","updated":"2014-09-09 15:44:03.000000000","message":"Added this as part of check_segment().","commit_id":"aeb18ba9ccd5243a715ea25e846ca079fc5bad13"},{"author":{"_account_id":6698,"name":"Robert Pothier","email":"robpothier35@gmail.com","username":"rpothier"},"change_message_id":"3d2f023f2137c61bc8b87057e396303892e427e1","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        vlan_id \u003d self._get_vlanid(context)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        if not vlan_id:"},{"line_number":126,"context_line":"            LOG.warn(_LW(\"update_port_precommit invalid vlan_id %d\"), vlan_id)"},{"line_number":127,"context_line":"            return"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        p_profile_name \u003d self.make_profile_name(vlan_id)"}],"source_content_type":"text/x-python","patch_set":21,"id":"da9df570_4fd05c1f","line":126,"updated":"2014-09-25 17:26:00.000000000","message":"can you print the vlan_id in this case? or just print the message.","commit_id":"1210e194c1ef5246d95ab8743d9bc223659f9731"}],"neutron/plugins/ml2/drivers/cisco/ucsm/ucsm_model.py":[{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"09f292f616bc32670ed4a4c79c9b7937a758ea40","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from neutron.db import api as db_api"},{"line_number":19,"context_line":"from neutron.db import model_base"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"class PortProfile(model_base.BASEV2):"},{"line_number":22,"context_line":"    \"\"\"Port profiles created on the UCS Manager.\"\"\""},{"line_number":23,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUX%2F%2B%2B3Q%3D","line":20,"updated":"2014-02-17 20:41:48.000000000","message":"I would suggest to split into 2 modules: db and models","commit_id":"395ccb1c9de991833dd42507f5efafe0da472794"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"b0cb9ee44832b1738c8d3f2f6752ecda8be4cddf","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from neutron.db import api as db_api"},{"line_number":19,"context_line":"from neutron.db import model_base"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"class PortProfile(model_base.BASEV2):"},{"line_number":22,"context_line":"    \"\"\"Port profiles created on the UCS Manager.\"\"\""},{"line_number":23,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUX%2F%2B%2Bu4%3D","line":20,"in_reply_to":"AAAAUX%2F%2B%2B3Q%3D","updated":"2014-02-17 21:33:20.000000000","message":"I think the approach is mixed across the neutron code base, so it\u0027s ok to have models and methods within one module.","commit_id":"395ccb1c9de991833dd42507f5efafe0da472794"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"cc3621ebff7ad2d525432bca4f27777c392a39e9","unresolved":false,"context_lines":[{"line_number":29,"context_line":"class PortMapping(model_base.BASEV2):"},{"line_number":30,"context_line":"    \"\"\"Port to port profile mapping table.\"\"\""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    __tablename__ \u003d \u0027ml2_ucsm_port_mapping\u0027"},{"line_number":33,"context_line":"    "},{"line_number":34,"context_line":"    port_id \u003d sa.Column(sa.String(64), nullable\u003dFalse)"},{"line_number":35,"context_line":"    profile_id \u003d sa.Column(sa.String(64), nullable\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAVX%2F%2F4FM%3D","line":32,"updated":"2014-02-27 16:52:02.000000000","message":"This table doesn\u0027t seem to be needed. The contents of this table should be part of the vif_details in the port binding table.","commit_id":"395ccb1c9de991833dd42507f5efafe0da472794"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"540ec445cf4f3909e974184a07a62919cf34e1b8","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    \"\"\"Port to port profile mapping table.\"\"\""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    __tablename__ \u003d \u0027ml2_ucsm_port_mapping\u0027"},{"line_number":33,"context_line":"    "},{"line_number":34,"context_line":"    port_id \u003d sa.Column(sa.String(64), nullable\u003dFalse)"},{"line_number":35,"context_line":"    profile_id \u003d sa.Column(sa.String(64), nullable\u003dTrue)"},{"line_number":36,"context_line":"    # Remember if this port is configured as direct or macvtap"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUX%2F%2B9mU%3D","line":33,"updated":"2014-02-18 00:05:28.000000000","message":"More whitespace.","commit_id":"395ccb1c9de991833dd42507f5efafe0da472794"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"aa59348782f57fd19c6dc26a5abfa0101f20cfc0","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    \"\"\"Port to port profile mapping table.\"\"\""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    __tablename__ \u003d \u0027ml2_ucsm_port_mapping\u0027"},{"line_number":33,"context_line":"    "},{"line_number":34,"context_line":"    port_id \u003d sa.Column(sa.String(64), nullable\u003dFalse)"},{"line_number":35,"context_line":"    profile_id \u003d sa.Column(sa.String(64), nullable\u003dTrue)"},{"line_number":36,"context_line":"    # Remember if this port is configured as direct or macvtap"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2FZdM%3D","line":33,"in_reply_to":"AAAAUX%2F%2B9mU%3D","updated":"2014-02-27 17:41:09.000000000","message":"Done","commit_id":"395ccb1c9de991833dd42507f5efafe0da472794"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"b0cb9ee44832b1738c8d3f2f6752ecda8be4cddf","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    __tablename__ \u003d \u0027ml2_ucsm_port_mapping\u0027"},{"line_number":33,"context_line":"    "},{"line_number":34,"context_line":"    port_id \u003d sa.Column(sa.String(64), nullable\u003dFalse)"},{"line_number":35,"context_line":"    profile_id \u003d sa.Column(sa.String(64), nullable\u003dTrue)"},{"line_number":36,"context_line":"    # Remember if this port is configured as direct or macvtap"},{"line_number":37,"context_line":"    vif_type \u003d sa.Column(sa.String(64), nullable\u003dFalse)"},{"line_number":38,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUX%2F%2B%2BvU%3D","line":35,"updated":"2014-02-17 21:33:20.000000000","message":"FK to PortProfile.profile_id?","commit_id":"395ccb1c9de991833dd42507f5efafe0da472794"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"aa59348782f57fd19c6dc26a5abfa0101f20cfc0","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    __tablename__ \u003d \u0027ml2_ucsm_port_mapping\u0027"},{"line_number":33,"context_line":"    "},{"line_number":34,"context_line":"    port_id \u003d sa.Column(sa.String(64), nullable\u003dFalse)"},{"line_number":35,"context_line":"    profile_id \u003d sa.Column(sa.String(64), nullable\u003dTrue)"},{"line_number":36,"context_line":"    # Remember if this port is configured as direct or macvtap"},{"line_number":37,"context_line":"    vif_type \u003d sa.Column(sa.String(64), nullable\u003dFalse)"},{"line_number":38,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2FZY8%3D","line":35,"in_reply_to":"AAAAUX%2F%2B%2BvU%3D","updated":"2014-02-27 17:41:09.000000000","message":"I am not sure I understand your comment. PortProfile just manages the definition of a profile. A profile currently contains only a vlan_id. Many ports could be mapped to a single profile_id. So, this is where I am keeping track of that association.","commit_id":"395ccb1c9de991833dd42507f5efafe0da472794"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"09f292f616bc32670ed4a4c79c9b7937a758ea40","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    port_id \u003d sa.Column(sa.String(64), nullable\u003dFalse)"},{"line_number":35,"context_line":"    profile_id \u003d sa.Column(sa.String(64), nullable\u003dTrue)"},{"line_number":36,"context_line":"    # Remember if this port is configured as direct or macvtap"},{"line_number":37,"context_line":"    vif_type \u003d sa.Column(sa.String(64), nullable\u003dFalse)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"class UcsmDbModel(object):"},{"line_number":40,"context_line":"    def __init__(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUX%2F%2B%2B3k%3D","line":37,"updated":"2014-02-17 20:41:48.000000000","message":"I think it should be vnic_type, but this is stored in ml2_port_binding table","commit_id":"395ccb1c9de991833dd42507f5efafe0da472794"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"aa59348782f57fd19c6dc26a5abfa0101f20cfc0","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    port_id \u003d sa.Column(sa.String(64), nullable\u003dFalse)"},{"line_number":35,"context_line":"    profile_id \u003d sa.Column(sa.String(64), nullable\u003dTrue)"},{"line_number":36,"context_line":"    # Remember if this port is configured as direct or macvtap"},{"line_number":37,"context_line":"    vif_type \u003d sa.Column(sa.String(64), nullable\u003dFalse)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"class UcsmDbModel(object):"},{"line_number":40,"context_line":"    def __init__(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2FZWw%3D","line":37,"in_reply_to":"AAAAUX%2F%2B%2B3k%3D","updated":"2014-02-27 17:41:09.000000000","message":"Done","commit_id":"395ccb1c9de991833dd42507f5efafe0da472794"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"c0e7184c51cd5058a387ff16cab0d36f26e9e0b8","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    __tablename__ \u003d \u0027ml2_ucsm_port_mapping\u0027"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    port_id \u003d sa.Column(sa.String(64), nullable\u003dFalse)"},{"line_number":35,"context_line":"    profile_id \u003d sa.Column(sa.String(64), nullable\u003dTrue)"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"class UcsmDbModel(object):"},{"line_number":38,"context_line":"    def __init__(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAVn%2F%2F2E4%3D","line":35,"updated":"2014-03-03 20:38:54.000000000","message":"I believe that we don\u0027t need this table since the information here is already included in binding:vif_details that is part of the ml2 port binding table.","commit_id":"b7726303d0e6b560cd32d3c619c8e6eeb7832091"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"f6f861cec3ffc30e09a1ef9497a590eab5088c76","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    __tablename__ \u003d \u0027ml2_ucsm_port_mapping\u0027"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    port_id \u003d sa.Column(sa.String(64), nullable\u003dFalse)"},{"line_number":35,"context_line":"    profile_id \u003d sa.Column(sa.String(64), nullable\u003dTrue)"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"class UcsmDbModel(object):"},{"line_number":38,"context_line":"    def __init__(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAVn%2F%2FVkc%3D","line":35,"in_reply_to":"AAAAVn%2F%2F2E4%3D","updated":"2014-03-06 18:58:27.000000000","message":"Took this approach to keep it simple initially. Will look for a way to not duplicate info in a subsequent patch.","commit_id":"b7726303d0e6b560cd32d3c619c8e6eeb7832091"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"439020ed117e801a5052ea7a7f0b8c4d31127762","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"class PortProfile(model_base.BASEV2):"},{"line_number":23,"context_line":"    \"\"\"Port profiles created on the UCS Manager.\"\"\""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    __tablename__ \u003d \u0027ml2_ucsm_port_profiles\u0027"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_4626becc","line":23,"updated":"2014-08-06 19:04:57.000000000","message":"Nit: PEP257 add blank line before class docstring.","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"bfb5e500d13dfb017a123cf95ef3271c0176310b","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"class PortProfile(model_base.BASEV2):"},{"line_number":23,"context_line":"    \"\"\"Port profiles created on the UCS Manager.\"\"\""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    __tablename__ \u003d \u0027ml2_ucsm_port_profiles\u0027"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_6443656b","line":23,"in_reply_to":"baada198_4626becc","updated":"2014-08-08 22:01:07.000000000","message":"Done","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"change_message_id":"ab3c5b909a13b9101a0d06e51ea36a45bae8be53","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    def __init__(self):"},{"line_number":34,"context_line":"        self.session \u003d db_api.get_session()"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def get_port_profile_for_vlan(self, profile_name, vlan_id):"},{"line_number":37,"context_line":"        return self.session.query(PortProfile).filter_by("},{"line_number":38,"context_line":"            profile_id\u003dprofile_name,"},{"line_number":39,"context_line":"            vlan_id\u003dvlan_id).first()"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_3b49238e","line":36,"updated":"2014-08-12 18:53:16.000000000","message":"Docstrings please.","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"e658c4813b9db4d4f753384f64cd937a72f0da3e","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    def __init__(self):"},{"line_number":34,"context_line":"        self.session \u003d db_api.get_session()"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def get_port_profile_for_vlan(self, profile_name, vlan_id):"},{"line_number":37,"context_line":"        return self.session.query(PortProfile).filter_by("},{"line_number":38,"context_line":"            profile_id\u003dprofile_name,"},{"line_number":39,"context_line":"            vlan_id\u003dvlan_id).first()"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_7b145441","line":36,"updated":"2014-08-13 11:56:50.000000000","message":"this method return the entry not port profile.","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"d4032b0d4c3f2d7be6ad9ad786ca23b096f2abe4","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    def __init__(self):"},{"line_number":34,"context_line":"        self.session \u003d db_api.get_session()"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def get_port_profile_for_vlan(self, profile_name, vlan_id):"},{"line_number":37,"context_line":"        return self.session.query(PortProfile).filter_by("},{"line_number":38,"context_line":"            profile_id\u003dprofile_name,"},{"line_number":39,"context_line":"            vlan_id\u003dvlan_id).first()"}],"source_content_type":"text/x-python","patch_set":5,"id":"1abeadc6_faaf58e1","line":36,"in_reply_to":"baada198_3b49238e","updated":"2014-08-19 12:38:01.000000000","message":"Done","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"93bb184eced89dd5b7d158651bfbbb3a3a1e74e7","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    def __init__(self):"},{"line_number":34,"context_line":"        self.session \u003d db_api.get_session()"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def get_port_profile_for_vlan(self, profile_name, vlan_id):"},{"line_number":37,"context_line":"        return self.session.query(PortProfile).filter_by("},{"line_number":38,"context_line":"            profile_id\u003dprofile_name,"},{"line_number":39,"context_line":"            vlan_id\u003dvlan_id).first()"}],"source_content_type":"text/x-python","patch_set":5,"id":"7ac7a964_a53988da","line":36,"in_reply_to":"baada198_7b145441","updated":"2014-08-13 23:56:12.000000000","message":"I don\u0027t think that is a problem. Just need to do entry.profile_id to get the port profile.","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"e658c4813b9db4d4f753384f64cd937a72f0da3e","unresolved":false,"context_lines":[{"line_number":38,"context_line":"            profile_id\u003dprofile_name,"},{"line_number":39,"context_line":"            vlan_id\u003dvlan_id).first()"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def get_vlan_for_port_profile(self, profile_name):"},{"line_number":42,"context_line":"        return self.session.query(PortProfile).filter_by("},{"line_number":43,"context_line":"            profile_id\u003dprofile_name).first()"},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_db1ac06a","line":41,"updated":"2014-08-13 11:56:50.000000000","message":"ditto","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"93bb184eced89dd5b7d158651bfbbb3a3a1e74e7","unresolved":false,"context_lines":[{"line_number":38,"context_line":"            profile_id\u003dprofile_name,"},{"line_number":39,"context_line":"            vlan_id\u003dvlan_id).first()"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def get_vlan_for_port_profile(self, profile_name):"},{"line_number":42,"context_line":"        return self.session.query(PortProfile).filter_by("},{"line_number":43,"context_line":"            profile_id\u003dprofile_name).first()"},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7ac7a964_65577003","line":41,"in_reply_to":"baada198_db1ac06a","updated":"2014-08-13 23:56:12.000000000","message":"Don\u0027t think this is an issue.","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"e658c4813b9db4d4f753384f64cd937a72f0da3e","unresolved":false,"context_lines":[{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def get_vlan_for_port_profile(self, profile_name):"},{"line_number":42,"context_line":"        return self.session.query(PortProfile).filter_by("},{"line_number":43,"context_line":"            profile_id\u003dprofile_name).first()"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def add_port_profile(self, profile_name, vlan_id, port_id):"},{"line_number":46,"context_line":"        pProfile \u003d PortProfile(profile_id\u003dprofile_name,"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_6e6e5700","line":43,"updated":"2014-08-13 11:56:50.000000000","message":"what is there is more than one?","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"93bb184eced89dd5b7d158651bfbbb3a3a1e74e7","unresolved":false,"context_lines":[{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def get_vlan_for_port_profile(self, profile_name):"},{"line_number":42,"context_line":"        return self.session.query(PortProfile).filter_by("},{"line_number":43,"context_line":"            profile_id\u003dprofile_name).first()"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def add_port_profile(self, profile_name, vlan_id, port_id):"},{"line_number":46,"context_line":"        pProfile \u003d PortProfile(profile_id\u003dprofile_name,"}],"source_content_type":"text/x-python","patch_set":5,"id":"7ac7a964_e561c0d4","line":43,"in_reply_to":"baada198_6e6e5700","updated":"2014-08-13 23:56:12.000000000","message":"As far as I know, there can be multiple only in multi-segment networks which is not supported in Juno.","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"e658c4813b9db4d4f753384f64cd937a72f0da3e","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        return self.session.query(PortProfile).filter_by("},{"line_number":43,"context_line":"            profile_id\u003dprofile_name).first()"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def add_port_profile(self, profile_name, vlan_id, port_id):"},{"line_number":46,"context_line":"        pProfile \u003d PortProfile(profile_id\u003dprofile_name,"},{"line_number":47,"context_line":"                               vlan_id\u003dvlan_id)"},{"line_number":48,"context_line":"        self.session.add(pProfile)"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_8e8d6bd7","line":45,"updated":"2014-08-13 11:56:50.000000000","message":"Why do you need port_id?","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"93bb184eced89dd5b7d158651bfbbb3a3a1e74e7","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        return self.session.query(PortProfile).filter_by("},{"line_number":43,"context_line":"            profile_id\u003dprofile_name).first()"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def add_port_profile(self, profile_name, vlan_id, port_id):"},{"line_number":46,"context_line":"        pProfile \u003d PortProfile(profile_id\u003dprofile_name,"},{"line_number":47,"context_line":"                               vlan_id\u003dvlan_id)"},{"line_number":48,"context_line":"        self.session.add(pProfile)"}],"source_content_type":"text/x-python","patch_set":5,"id":"7ac7a964_eab8af2c","line":45,"in_reply_to":"baada198_8e8d6bd7","updated":"2014-08-13 23:56:12.000000000","message":"Already changed that in the next patch set 6.","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"dfa8852f53f86af63b26a525416e68240a7b4d25","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    def get_port_profile_for_vlan(self, profile_name, vlan_id):"},{"line_number":37,"context_line":"        return self.session.query(PortProfile).filter_by("},{"line_number":38,"context_line":"            profile_id\u003dprofile_name,"},{"line_number":39,"context_line":"            vlan_id\u003dvlan_id).first()"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def get_vlan_for_port_profile(self, profile_name):"},{"line_number":42,"context_line":"        return self.session.query(PortProfile).filter_by("}],"source_content_type":"text/x-python","patch_set":8,"id":"7ac7a964_f04a4726","line":39,"updated":"2014-08-14 12:49:29.000000000","message":"maybe better to use .one()?\nAnd still think that method name is confusing","commit_id":"7a300e17d9c420c64e0949de75a8d0a374bb4216"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"f079ee091d7d4a7651fb212d05964cad1312e294","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    def get_port_profile_for_vlan(self, profile_name, vlan_id):"},{"line_number":37,"context_line":"        return self.session.query(PortProfile).filter_by("},{"line_number":38,"context_line":"            profile_id\u003dprofile_name,"},{"line_number":39,"context_line":"            vlan_id\u003dvlan_id).first()"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def get_vlan_for_port_profile(self, profile_name):"},{"line_number":42,"context_line":"        return self.session.query(PortProfile).filter_by("}],"source_content_type":"text/x-python","patch_set":8,"id":"1abeadc6_40d883ef","line":39,"in_reply_to":"7ac7a964_f04a4726","updated":"2014-08-19 12:37:39.000000000","message":"Done","commit_id":"7a300e17d9c420c64e0949de75a8d0a374bb4216"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"f079ee091d7d4a7651fb212d05964cad1312e294","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    def get_port_profile_for_vlan(self, profile_name, vlan_id):"},{"line_number":37,"context_line":"        return self.session.query(PortProfile).filter_by("},{"line_number":38,"context_line":"            profile_id\u003dprofile_name,"},{"line_number":39,"context_line":"            vlan_id\u003dvlan_id).first()"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def get_vlan_for_port_profile(self, profile_name):"},{"line_number":42,"context_line":"        return self.session.query(PortProfile).filter_by("}],"source_content_type":"text/x-python","patch_set":8,"id":"1abeadc6_56c4c93f","line":39,"in_reply_to":"7ac7a964_f04a4726","updated":"2014-08-19 12:37:39.000000000","message":"I want this method to return None when there is no port profile associated with the passed in Vlan id. first() helps with returning the correct return value in that case. \n\nDo you prefer get_port_profile_entry_for_vlan() instead?","commit_id":"7a300e17d9c420c64e0949de75a8d0a374bb4216"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"c159c6348b9bd6220cafa5a4fe0c0513dd09f423","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    def get_port_profile_for_vlan(self, profile_name, vlan_id):"},{"line_number":37,"context_line":"        return self.session.query(PortProfile).filter_by("},{"line_number":38,"context_line":"            profile_id\u003dprofile_name,"},{"line_number":39,"context_line":"            vlan_id\u003dvlan_id).first()"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def get_vlan_for_port_profile(self, profile_name):"},{"line_number":42,"context_line":"        return self.session.query(PortProfile).filter_by("}],"source_content_type":"text/x-python","patch_set":8,"id":"7ac7a964_7d628fd9","line":39,"in_reply_to":"7ac7a964_f04a4726","updated":"2014-08-14 13:23:58.000000000","message":"Irena, .one() will through an exception, if there is not exactly one, whereas first() will return None, if no matches and first, if there are \u003e\u003d1. As long as the intent is to return None, if no match, .first() would be the one to use.","commit_id":"7a300e17d9c420c64e0949de75a8d0a374bb4216"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"dfa8852f53f86af63b26a525416e68240a7b4d25","unresolved":false,"context_lines":[{"line_number":38,"context_line":"            profile_id\u003dprofile_name,"},{"line_number":39,"context_line":"            vlan_id\u003dvlan_id).first()"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def get_vlan_for_port_profile(self, profile_name):"},{"line_number":42,"context_line":"        return self.session.query(PortProfile).filter_by("},{"line_number":43,"context_line":"            profile_id\u003dprofile_name).first()"},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7ac7a964_9063d3b0","line":41,"updated":"2014-08-14 12:49:29.000000000","message":"same as previous","commit_id":"7a300e17d9c420c64e0949de75a8d0a374bb4216"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"f079ee091d7d4a7651fb212d05964cad1312e294","unresolved":false,"context_lines":[{"line_number":38,"context_line":"            profile_id\u003dprofile_name,"},{"line_number":39,"context_line":"            vlan_id\u003dvlan_id).first()"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def get_vlan_for_port_profile(self, profile_name):"},{"line_number":42,"context_line":"        return self.session.query(PortProfile).filter_by("},{"line_number":43,"context_line":"            profile_id\u003dprofile_name).first()"},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1abeadc6_b6e27dd3","line":41,"in_reply_to":"7ac7a964_9063d3b0","updated":"2014-08-19 12:37:39.000000000","message":"Please refer to response from previous comment.","commit_id":"7a300e17d9c420c64e0949de75a8d0a374bb4216"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"b72183dceb22fcb679294f1ad33985c062f9c323","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        \"\"\"Returns Vlan id associated with the port profile.\"\"\""},{"line_number":44,"context_line":"        entry \u003d self.session.query(PortProfile).filter_by("},{"line_number":45,"context_line":"            profile_id\u003dprofile_name).first()"},{"line_number":46,"context_line":"        return entry.vlan_id if entry else None"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def get_port_profile_for_vlan(self, vlan_id):"},{"line_number":49,"context_line":"        \"\"\"Returns port profile associated with the vlan_id.\"\"\""}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_ea09a131","line":46,"updated":"2014-08-23 14:12:03.000000000","message":"Doesn\u0027t first() return None, if no matches? Here and L52","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"930acfe39b6518681cdd2f2ace88d522d65e332c","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        \"\"\"Returns Vlan id associated with the port profile.\"\"\""},{"line_number":44,"context_line":"        entry \u003d self.session.query(PortProfile).filter_by("},{"line_number":45,"context_line":"            profile_id\u003dprofile_name).first()"},{"line_number":46,"context_line":"        return entry.vlan_id if entry else None"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def get_port_profile_for_vlan(self, vlan_id):"},{"line_number":49,"context_line":"        \"\"\"Returns port profile associated with the vlan_id.\"\"\""}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_7480a246","line":46,"in_reply_to":"1abeadc6_937f2a66","updated":"2014-08-27 09:03:14.000000000","message":"See comment above.","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"930acfe39b6518681cdd2f2ace88d522d65e332c","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        \"\"\"Returns Vlan id associated with the port profile.\"\"\""},{"line_number":44,"context_line":"        entry \u003d self.session.query(PortProfile).filter_by("},{"line_number":45,"context_line":"            profile_id\u003dprofile_name).first()"},{"line_number":46,"context_line":"        return entry.vlan_id if entry else None"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def get_port_profile_for_vlan(self, vlan_id):"},{"line_number":49,"context_line":"        \"\"\"Returns port profile associated with the vlan_id.\"\"\""}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_1483ee56","line":46,"in_reply_to":"1abeadc6_ea09a131","updated":"2014-08-27 09:03:14.000000000","message":"I did this mostly to take care of the comments about the function name. According to the comment, self.session.query(PortProfile).filter_by(\tprofile_id\u003dprofile_name).first() returns a row in the DB and not the vlan_id itself, so the function name wasn\u0027t correct. Hence, modified the return value to extract the vlan_id from the DB row.(to match the function name)\n\nIf you just want me to do : return   self.session.query(PortProfile).filter_by(\tprofile_id\u003dprofile_name).first(), which is how it was earlier, please suggest a more appropriate name. I tried, I couldn\u0027t.\n\nPlease reply to this comment if still want me to go ahead and make the change.","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":7018,"name":"Abhishek Raut","email":"rauta@vmware.com","username":"abhiraut"},"change_message_id":"6437635e70fa9463336418f3f3c3e745f9463f2d","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        \"\"\"Returns Vlan id associated with the port profile.\"\"\""},{"line_number":44,"context_line":"        entry \u003d self.session.query(PortProfile).filter_by("},{"line_number":45,"context_line":"            profile_id\u003dprofile_name).first()"},{"line_number":46,"context_line":"        return entry.vlan_id if entry else None"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def get_port_profile_for_vlan(self, vlan_id):"},{"line_number":49,"context_line":"        \"\"\"Returns port profile associated with the vlan_id.\"\"\""}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_937f2a66","line":46,"in_reply_to":"1abeadc6_ea09a131","updated":"2014-08-27 01:05:40.000000000","message":"first() does return None.","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":7987,"name":"Ivar Lazzaro","email":"ivarlazzaro@gmail.com","username":"Ivar"},"change_message_id":"dd8a70a8f9240ed5ce89c4b1d162b334dbda4da8","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from neutron.db import model_base"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"class PortProfile(model_base.BASEV2):"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    \"\"\"Port profiles created on the UCS Manager.\"\"\""},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_fa694b26","line":22,"updated":"2014-09-01 06:18:25.000000000","message":"See comment on the mechanism driver, I think you may not need this table at all","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":7987,"name":"Ivar Lazzaro","email":"ivarlazzaro@gmail.com","username":"Ivar"},"change_message_id":"5caba515760bf1e24b87c94e3b3d9dbbac1ee2da","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from neutron.db import model_base"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"class PortProfile(model_base.BASEV2):"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    \"\"\"Port profiles created on the UCS Manager.\"\"\""},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_aebd656a","line":22,"in_reply_to":"fa98f980_e9b412f4","updated":"2014-09-02 18:39:43.000000000","message":"Can you point me where is this used besides writing entries?","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"e6512117504ca66d5900b10d53061a10a85d5167","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from neutron.db import model_base"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"class PortProfile(model_base.BASEV2):"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    \"\"\"Port profiles created on the UCS Manager.\"\"\""},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_e9b412f4","line":22,"in_reply_to":"fa98f980_fa694b26","updated":"2014-09-02 17:17:31.000000000","message":"We need to keep track of Port profiles that are created on UCS Manager. It is not meant for keeping track of the port profile name associated with a vlan.","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":7987,"name":"Ivar Lazzaro","email":"ivarlazzaro@gmail.com","username":"Ivar"},"change_message_id":"dd8a70a8f9240ed5ce89c4b1d162b334dbda4da8","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    vlan_id \u003d sa.Column(sa.Integer(), nullable\u003dFalse)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class UcsmDbModel(object):"},{"line_number":33,"context_line":"    def __init__(self):"},{"line_number":34,"context_line":"        self.session \u003d db_api.get_session()"},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_ba5fc371","line":32,"updated":"2014-09-01 06:18:25.000000000","message":"In case you need to keep this, no delete method is needed?","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"e6512117504ca66d5900b10d53061a10a85d5167","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    vlan_id \u003d sa.Column(sa.Integer(), nullable\u003dFalse)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class UcsmDbModel(object):"},{"line_number":33,"context_line":"    def __init__(self):"},{"line_number":34,"context_line":"        self.session \u003d db_api.get_session()"},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_099f9653","line":32,"in_reply_to":"fa98f980_ba5fc371","updated":"2014-09-02 17:17:31.000000000","message":"Port profile is a generic entity that can be applied to more than one ports as long as they are on the same vlan_id. Since they can be re-used, we don\u0027t delete them in the UCS manager. And so we don\u0027t delete them from the DB too.","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"c121a2e800402f225296de24451567338e75f83e","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    __tablename__ \u003d \u0027ml2_ucsm_port_profiles\u0027"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    profile_id \u003d sa.Column(sa.String(64), nullable\u003dFalse, primary_key\u003dTrue)"},{"line_number":29,"context_line":"    vlan_id \u003d sa.Column(sa.Integer(), nullable\u003dFalse)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class UcsmDbModel(object):"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa98f980_2996cf4c","line":29,"updated":"2014-09-02 18:59:46.000000000","message":"I\u0027m a bit concerned that a vlan_id is being used here without an associated physical_network name to scope it. If the intent is for UCS to only support one physical_network per neutron deployment, that may be OK (for now).","commit_id":"aeb18ba9ccd5243a715ea25e846ca079fc5bad13"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"6b855146ddb39bd9e11c7a1a0ce0740125c4b9fc","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    __tablename__ \u003d \u0027ml2_ucsm_port_profiles\u0027"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    profile_id \u003d sa.Column(sa.String(64), nullable\u003dFalse, primary_key\u003dTrue)"},{"line_number":29,"context_line":"    vlan_id \u003d sa.Column(sa.Integer(), nullable\u003dFalse)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class UcsmDbModel(object):"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa98f980_6b9d0859","line":29,"in_reply_to":"fa98f980_2996cf4c","updated":"2014-09-09 15:44:03.000000000","message":"Added changes in mech driver to take into account the physical networks that are supported by the MD. But, there is not need for me to store that in the DB at this point because UCS Manager uses the same port profile per vlan_id irrespective of which physical network that port is on.","commit_id":"aeb18ba9ccd5243a715ea25e846ca079fc5bad13"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"71aa2922c1048d73672ee8c89f2f79a0cc0e4f19","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    __tablename__ \u003d \u0027ml2_ucsm_port_profiles\u0027"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    profile_id \u003d sa.Column(sa.String(64), nullable\u003dFalse, primary_key\u003dTrue)"},{"line_number":29,"context_line":"    vlan_id \u003d sa.Column(sa.Integer(), nullable\u003dFalse)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class UcsmDbModel(object):"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa98f980_14b11f8f","line":29,"in_reply_to":"fa98f980_2996cf4c","updated":"2014-09-03 14:45:53.000000000","message":"Correct, only one physical network for now.","commit_id":"aeb18ba9ccd5243a715ea25e846ca079fc5bad13"},{"author":{"_account_id":1689,"name":"Robert Kukura","email":"rk@theep.net","username":"rkukura"},"change_message_id":"c121a2e800402f225296de24451567338e75f83e","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class UcsmDbModel(object):"},{"line_number":33,"context_line":"    def __init__(self):"},{"line_number":34,"context_line":"        self.session \u003d db_api.get_session()"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def get_port_profile_entry_for_vlan(self, profile_name, vlan_id):"},{"line_number":37,"context_line":"        \"\"\"Returns DB entry containing the port profile and vlan.\"\"\""}],"source_content_type":"text/x-python","patch_set":20,"id":"fa98f980_099e6b56","line":34,"updated":"2014-09-02 18:59:46.000000000","message":"Don\u0027t different concurrent threads in the neutron server have different DB sessions? Its probably a much better idea to use the sessions from the the ML2 context objects.","commit_id":"aeb18ba9ccd5243a715ea25e846ca079fc5bad13"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"71aa2922c1048d73672ee8c89f2f79a0cc0e4f19","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class UcsmDbModel(object):"},{"line_number":33,"context_line":"    def __init__(self):"},{"line_number":34,"context_line":"        self.session \u003d db_api.get_session()"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def get_port_profile_entry_for_vlan(self, profile_name, vlan_id):"},{"line_number":37,"context_line":"        \"\"\"Returns DB entry containing the port profile and vlan.\"\"\""}],"source_content_type":"text/x-python","patch_set":20,"id":"fa98f980_14783fc3","line":34,"in_reply_to":"fa98f980_099e6b56","updated":"2014-09-03 14:45:53.000000000","message":"Correct, self.session should be removed from this class, which means the class is not needed. The methods below should use context.session instead of self.session.","commit_id":"aeb18ba9ccd5243a715ea25e846ca079fc5bad13"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"6b855146ddb39bd9e11c7a1a0ce0740125c4b9fc","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class UcsmDbModel(object):"},{"line_number":33,"context_line":"    def __init__(self):"},{"line_number":34,"context_line":"        self.session \u003d db_api.get_session()"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def get_port_profile_entry_for_vlan(self, profile_name, vlan_id):"},{"line_number":37,"context_line":"        \"\"\"Returns DB entry containing the port profile and vlan.\"\"\""}],"source_content_type":"text/x-python","patch_set":20,"id":"fa98f980_63fc28b9","line":34,"in_reply_to":"fa98f980_14783fc3","updated":"2014-09-09 15:44:03.000000000","message":"Done","commit_id":"aeb18ba9ccd5243a715ea25e846ca079fc5bad13"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"71aa2922c1048d73672ee8c89f2f79a0cc0e4f19","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    def __init__(self):"},{"line_number":34,"context_line":"        self.session \u003d db_api.get_session()"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def get_port_profile_entry_for_vlan(self, profile_name, vlan_id):"},{"line_number":37,"context_line":"        \"\"\"Returns DB entry containing the port profile and vlan.\"\"\""},{"line_number":38,"context_line":"        return self.session.query(PortProfile).filter_by("},{"line_number":39,"context_line":"            profile_id\u003dprofile_name,"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa98f980_5459e758","line":36,"updated":"2014-09-03 14:45:53.000000000","message":"Rename this to is_port_profile_created(context, vlan_id)","commit_id":"aeb18ba9ccd5243a715ea25e846ca079fc5bad13"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"6b855146ddb39bd9e11c7a1a0ce0740125c4b9fc","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    def __init__(self):"},{"line_number":34,"context_line":"        self.session \u003d db_api.get_session()"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def get_port_profile_entry_for_vlan(self, profile_name, vlan_id):"},{"line_number":37,"context_line":"        \"\"\"Returns DB entry containing the port profile and vlan.\"\"\""},{"line_number":38,"context_line":"        return self.session.query(PortProfile).filter_by("},{"line_number":39,"context_line":"            profile_id\u003dprofile_name,"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa98f980_83f74cd2","line":36,"in_reply_to":"fa98f980_5459e758","updated":"2014-09-09 15:44:03.000000000","message":"Done","commit_id":"aeb18ba9ccd5243a715ea25e846ca079fc5bad13"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"71aa2922c1048d73672ee8c89f2f79a0cc0e4f19","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        self.session \u003d db_api.get_session()"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def get_port_profile_entry_for_vlan(self, profile_name, vlan_id):"},{"line_number":37,"context_line":"        \"\"\"Returns DB entry containing the port profile and vlan.\"\"\""},{"line_number":38,"context_line":"        return self.session.query(PortProfile).filter_by("},{"line_number":39,"context_line":"            profile_id\u003dprofile_name,"},{"line_number":40,"context_line":"            vlan_id\u003dvlan_id).first()"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa98f980_8f4ed86d","line":37,"updated":"2014-09-03 14:45:53.000000000","message":"\"\"\"Return True if a port profile has been created for the vlan_id.\"\"\"","commit_id":"aeb18ba9ccd5243a715ea25e846ca079fc5bad13"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"6b855146ddb39bd9e11c7a1a0ce0740125c4b9fc","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        self.session \u003d db_api.get_session()"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def get_port_profile_entry_for_vlan(self, profile_name, vlan_id):"},{"line_number":37,"context_line":"        \"\"\"Returns DB entry containing the port profile and vlan.\"\"\""},{"line_number":38,"context_line":"        return self.session.query(PortProfile).filter_by("},{"line_number":39,"context_line":"            profile_id\u003dprofile_name,"},{"line_number":40,"context_line":"            vlan_id\u003dvlan_id).first()"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa98f980_a30290b1","line":37,"in_reply_to":"fa98f980_8f4ed86d","updated":"2014-09-09 15:44:03.000000000","message":"Done","commit_id":"aeb18ba9ccd5243a715ea25e846ca079fc5bad13"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"71aa2922c1048d73672ee8c89f2f79a0cc0e4f19","unresolved":false,"context_lines":[{"line_number":39,"context_line":"            profile_id\u003dprofile_name,"},{"line_number":40,"context_line":"            vlan_id\u003dvlan_id).first()"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def get_vlan_for_port_profile(self, profile_name):"},{"line_number":43,"context_line":"        \"\"\"Returns Vlan id associated with the port profile.\"\"\""},{"line_number":44,"context_line":"        entry \u003d self.session.query(PortProfile).filter_by("},{"line_number":45,"context_line":"            profile_id\u003dprofile_name).first()"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa98f980_d43cf7e4","line":42,"updated":"2014-09-03 14:45:53.000000000","message":"Not needed.","commit_id":"aeb18ba9ccd5243a715ea25e846ca079fc5bad13"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"6b855146ddb39bd9e11c7a1a0ce0740125c4b9fc","unresolved":false,"context_lines":[{"line_number":39,"context_line":"            profile_id\u003dprofile_name,"},{"line_number":40,"context_line":"            vlan_id\u003dvlan_id).first()"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def get_vlan_for_port_profile(self, profile_name):"},{"line_number":43,"context_line":"        \"\"\"Returns Vlan id associated with the port profile.\"\"\""},{"line_number":44,"context_line":"        entry \u003d self.session.query(PortProfile).filter_by("},{"line_number":45,"context_line":"            profile_id\u003dprofile_name).first()"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa98f980_63ea68dc","line":42,"in_reply_to":"fa98f980_d43cf7e4","updated":"2014-09-09 15:44:03.000000000","message":"Removed.","commit_id":"aeb18ba9ccd5243a715ea25e846ca079fc5bad13"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"71aa2922c1048d73672ee8c89f2f79a0cc0e4f19","unresolved":false,"context_lines":[{"line_number":45,"context_line":"            profile_id\u003dprofile_name).first()"},{"line_number":46,"context_line":"        return entry.vlan_id if entry else None"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def get_port_profile_for_vlan(self, vlan_id):"},{"line_number":49,"context_line":"        \"\"\"Returns port profile associated with the vlan_id.\"\"\""},{"line_number":50,"context_line":"        entry \u003d self.session.query(PortProfile).filter_by("},{"line_number":51,"context_line":"            vlan_id\u003dvlan_id).first()"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa98f980_742b4b94","line":48,"updated":"2014-09-03 14:45:53.000000000","message":"Not needed.","commit_id":"aeb18ba9ccd5243a715ea25e846ca079fc5bad13"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"6b855146ddb39bd9e11c7a1a0ce0740125c4b9fc","unresolved":false,"context_lines":[{"line_number":45,"context_line":"            profile_id\u003dprofile_name).first()"},{"line_number":46,"context_line":"        return entry.vlan_id if entry else None"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def get_port_profile_for_vlan(self, vlan_id):"},{"line_number":49,"context_line":"        \"\"\"Returns port profile associated with the vlan_id.\"\"\""},{"line_number":50,"context_line":"        entry \u003d self.session.query(PortProfile).filter_by("},{"line_number":51,"context_line":"            vlan_id\u003dvlan_id).first()"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa98f980_47bd42d7","line":48,"in_reply_to":"fa98f980_742b4b94","updated":"2014-09-09 15:44:03.000000000","message":"Was initially being used in unit test code and now using it in the mechanism driver code to take care of review comments. So not removing it.","commit_id":"aeb18ba9ccd5243a715ea25e846ca079fc5bad13"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"71aa2922c1048d73672ee8c89f2f79a0cc0e4f19","unresolved":false,"context_lines":[{"line_number":51,"context_line":"            vlan_id\u003dvlan_id).first()"},{"line_number":52,"context_line":"        return entry.profile_id if entry else None"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def add_port_profile(self, profile_name, vlan_id):"},{"line_number":55,"context_line":"        \"\"\"Adds a port profile and its vlan_id to the table.\"\"\""},{"line_number":56,"context_line":"        pProfile \u003d PortProfile(profile_id\u003dprofile_name,"},{"line_number":57,"context_line":"                               vlan_id\u003dvlan_id)"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa98f980_efce84b3","line":54,"updated":"2014-09-03 14:45:53.000000000","message":"add_port_profile(context. vlan_id)","commit_id":"aeb18ba9ccd5243a715ea25e846ca079fc5bad13"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"6b855146ddb39bd9e11c7a1a0ce0740125c4b9fc","unresolved":false,"context_lines":[{"line_number":51,"context_line":"            vlan_id\u003dvlan_id).first()"},{"line_number":52,"context_line":"        return entry.profile_id if entry else None"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def add_port_profile(self, profile_name, vlan_id):"},{"line_number":55,"context_line":"        \"\"\"Adds a port profile and its vlan_id to the table.\"\"\""},{"line_number":56,"context_line":"        pProfile \u003d PortProfile(profile_id\u003dprofile_name,"},{"line_number":57,"context_line":"                               vlan_id\u003dvlan_id)"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa98f980_e71d5610","line":54,"in_reply_to":"fa98f980_efce84b3","updated":"2014-09-09 15:44:03.000000000","message":"I am assuming you meant the parameters should be session and vlan_id. I do not want this portion of the MD to make any assumptions about the port profile name. So, I do want to pass it as an input parameter. If for some reason, the port profile name needs to be formed a different way, only the helper method in the MD would have to change.","commit_id":"aeb18ba9ccd5243a715ea25e846ca079fc5bad13"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"71aa2922c1048d73672ee8c89f2f79a0cc0e4f19","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def add_port_profile(self, profile_name, vlan_id):"},{"line_number":55,"context_line":"        \"\"\"Adds a port profile and its vlan_id to the table.\"\"\""},{"line_number":56,"context_line":"        pProfile \u003d PortProfile(profile_id\u003dprofile_name,"},{"line_number":57,"context_line":"                               vlan_id\u003dvlan_id)"},{"line_number":58,"context_line":"        self.session.add(pProfile)"},{"line_number":59,"context_line":"        self.session.flush()"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa98f980_cf58e034","line":56,"updated":"2014-09-03 14:45:53.000000000","message":"Don\u0027t use camel case.","commit_id":"aeb18ba9ccd5243a715ea25e846ca079fc5bad13"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"6b855146ddb39bd9e11c7a1a0ce0740125c4b9fc","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def add_port_profile(self, profile_name, vlan_id):"},{"line_number":55,"context_line":"        \"\"\"Adds a port profile and its vlan_id to the table.\"\"\""},{"line_number":56,"context_line":"        pProfile \u003d PortProfile(profile_id\u003dprofile_name,"},{"line_number":57,"context_line":"                               vlan_id\u003dvlan_id)"},{"line_number":58,"context_line":"        self.session.add(pProfile)"},{"line_number":59,"context_line":"        self.session.flush()"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa98f980_a75a6eef","line":56,"in_reply_to":"fa98f980_cf58e034","updated":"2014-09-09 15:44:03.000000000","message":"Done","commit_id":"aeb18ba9ccd5243a715ea25e846ca079fc5bad13"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"8e92ea9e89534b8b74f525dc19c2fa279e0a9445","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def is_port_profile_created(session, vlan_id):"},{"line_number":33,"context_line":"    \"\"\"Returns True if port profile has been created on UCS Manager.\"\"\""},{"line_number":34,"context_line":"    entry \u003d session.query(PortProfile).filter_by("},{"line_number":35,"context_line":"        vlan_id\u003dvlan_id).first()"},{"line_number":36,"context_line":"    return True if (entry and entry.created_on_ucs) else False"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"fa98f980_bb03f7b6","line":34,"updated":"2014-09-10 11:28:08.000000000","message":"I think you can query for specific field:\n    entry \u003d session.query(PortProfile.created_on_ucs).filter_by(...).first()\n    return entry is not None\n\n(or just return entry and caller can treat None as false).","commit_id":"1210e194c1ef5246d95ab8743d9bc223659f9731"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"8e92ea9e89534b8b74f525dc19c2fa279e0a9445","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"def get_port_profile_for_vlan(session, vlan_id):"},{"line_number":40,"context_line":"    \"\"\"Returns Vlan id associated with the port profile.\"\"\""},{"line_number":41,"context_line":"    entry \u003d session.query(PortProfile).filter_by("},{"line_number":42,"context_line":"        vlan_id\u003dvlan_id).first()"},{"line_number":43,"context_line":"    return entry.profile_id if entry else None"},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"fa98f980_3b42a710","line":41,"updated":"2014-09-10 11:28:08.000000000","message":"I think you can query for the specific field and then first() will return the value or None.\n    entry \u003d session.query(PortProfile.profile_id).filter_by(...).first()","commit_id":"1210e194c1ef5246d95ab8743d9bc223659f9731"}],"neutron/plugins/ml2/drivers/cisco/ucsm/ucsm_network_driver.py":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"540ec445cf4f3909e974184a07a62919cf34e1b8","unresolved":false,"context_lines":[{"line_number":27,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class CiscoUcsmDriver(object):"},{"line_number":30,"context_line":"    \"\"\"UCS Manager Driver Main Class.\"\"\""},{"line_number":31,"context_line":"    def __init__(self):"},{"line_number":32,"context_line":"        ucsm_ip \u003d cfg.CONF.ml2_ucsm.ucsm_ip"},{"line_number":33,"context_line":"        username \u003d cfg.CONF.ml2_ucsm.ucsm_username"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUX%2F%2B9mA%3D","line":30,"updated":"2014-02-18 00:05:28.000000000","message":"Class docstring, blank line before and after.","commit_id":"395ccb1c9de991833dd42507f5efafe0da472794"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"aa59348782f57fd19c6dc26a5abfa0101f20cfc0","unresolved":false,"context_lines":[{"line_number":27,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class CiscoUcsmDriver(object):"},{"line_number":30,"context_line":"    \"\"\"UCS Manager Driver Main Class.\"\"\""},{"line_number":31,"context_line":"    def __init__(self):"},{"line_number":32,"context_line":"        ucsm_ip \u003d cfg.CONF.ml2_ucsm.ucsm_ip"},{"line_number":33,"context_line":"        username \u003d cfg.CONF.ml2_ucsm.ucsm_username"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2FZTY%3D","line":30,"in_reply_to":"AAAAUX%2F%2B9mA%3D","updated":"2014-02-27 17:41:09.000000000","message":"Done","commit_id":"395ccb1c9de991833dd42507f5efafe0da472794"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"540ec445cf4f3909e974184a07a62919cf34e1b8","unresolved":false,"context_lines":[{"line_number":29,"context_line":"class CiscoUcsmDriver(object):"},{"line_number":30,"context_line":"    \"\"\"UCS Manager Driver Main Class.\"\"\""},{"line_number":31,"context_line":"    def __init__(self):"},{"line_number":32,"context_line":"        ucsm_ip \u003d cfg.CONF.ml2_ucsm.ucsm_ip"},{"line_number":33,"context_line":"        username \u003d cfg.CONF.ml2_ucsm.ucsm_username"},{"line_number":34,"context_line":"        password \u003d cfg.CONF.ml2_ucsm.ucsm_password"},{"line_number":35,"context_line":"        self.handles \u003d {}"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUX%2F%2B9ls%3D","line":32,"updated":"2014-02-18 00:05:28.000000000","message":"These three lines are not stored as instance variables. Intended? Unused?","commit_id":"395ccb1c9de991833dd42507f5efafe0da472794"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"aa59348782f57fd19c6dc26a5abfa0101f20cfc0","unresolved":false,"context_lines":[{"line_number":29,"context_line":"class CiscoUcsmDriver(object):"},{"line_number":30,"context_line":"    \"\"\"UCS Manager Driver Main Class.\"\"\""},{"line_number":31,"context_line":"    def __init__(self):"},{"line_number":32,"context_line":"        ucsm_ip \u003d cfg.CONF.ml2_ucsm.ucsm_ip"},{"line_number":33,"context_line":"        username \u003d cfg.CONF.ml2_ucsm.ucsm_username"},{"line_number":34,"context_line":"        password \u003d cfg.CONF.ml2_ucsm.ucsm_password"},{"line_number":35,"context_line":"        self.handles \u003d {}"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2FZLc%3D","line":32,"in_reply_to":"AAAAUX%2F%2B9ls%3D","updated":"2014-02-27 17:41:09.000000000","message":"Done","commit_id":"395ccb1c9de991833dd42507f5efafe0da472794"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"540ec445cf4f3909e974184a07a62919cf34e1b8","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            # Raise a Neutron exception. Include a description of"},{"line_number":69,"context_line":"            # the original  exception."},{"line_number":70,"context_line":"            raise cexc.UcsmConnectFailed(ucsm_ip\u003ducsm_ip, exc\u003de)"},{"line_number":71,"context_line":"            handle.Logout()"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        return self.handles[ucsm_ip]"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUX%2F%2B9lQ%3D","line":71,"updated":"2014-02-18 00:05:28.000000000","message":"Not reached?\n\nAlso probably want to use excutils save_and_reraise_exception for the raise.","commit_id":"395ccb1c9de991833dd42507f5efafe0da472794"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"aa59348782f57fd19c6dc26a5abfa0101f20cfc0","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            # Raise a Neutron exception. Include a description of"},{"line_number":69,"context_line":"            # the original  exception."},{"line_number":70,"context_line":"            raise cexc.UcsmConnectFailed(ucsm_ip\u003ducsm_ip, exc\u003de)"},{"line_number":71,"context_line":"            handle.Logout()"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        return self.handles[ucsm_ip]"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAVX%2F%2F6mM%3D","line":71,"in_reply_to":"AAAAUX%2F%2B9lQ%3D","updated":"2014-02-27 17:41:09.000000000","message":"Done","commit_id":"395ccb1c9de991833dd42507f5efafe0da472794"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"540ec445cf4f3909e974184a07a62919cf34e1b8","unresolved":false,"context_lines":[{"line_number":90,"context_line":"            handle.Logout()"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def create_portprofile(self, profile_name, vlan_id):"},{"line_number":93,"context_line":"        \"\"\" Create a port profile on the UCS manager "},{"line_number":94,"context_line":"            using current data.\"\"\""},{"line_number":95,"context_line":"        handle \u003d self.handles[ucsm_ip]"},{"line_number":96,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUX%2F%2B9lA%3D","line":93,"updated":"2014-02-18 00:05:28.000000000","message":"PEP257 and whitespace issues in this file.","commit_id":"395ccb1c9de991833dd42507f5efafe0da472794"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"aa59348782f57fd19c6dc26a5abfa0101f20cfc0","unresolved":false,"context_lines":[{"line_number":90,"context_line":"            handle.Logout()"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def create_portprofile(self, profile_name, vlan_id):"},{"line_number":93,"context_line":"        \"\"\" Create a port profile on the UCS manager "},{"line_number":94,"context_line":"            using current data.\"\"\""},{"line_number":95,"context_line":"        handle \u003d self.handles[ucsm_ip]"},{"line_number":96,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAVX%2F%2F47U%3D","line":93,"in_reply_to":"AAAAUX%2F%2B9lA%3D","updated":"2014-02-27 17:41:09.000000000","message":"Done","commit_id":"395ccb1c9de991833dd42507f5efafe0da472794"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"c0e7184c51cd5058a387ff16cab0d36f26e9e0b8","unresolved":false,"context_lines":[{"line_number":90,"context_line":"            # the original  exception."},{"line_number":91,"context_line":"            raise cexc.UcsmConfigReadFailed(ucsm_ip\u003dself.ucsm_ip, exc\u003de)"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def create_portprofile(self, profile_name, vlan_id):"},{"line_number":94,"context_line":"        handle \u003d self.handles[self.ucsm_ip]"},{"line_number":95,"context_line":"        try:"},{"line_number":96,"context_line":"            portProfile \u003d handle.GetManagedObject(None,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAVn%2F%2F2Ew%3D","line":93,"updated":"2014-03-03 20:38:54.000000000","message":"profile_name, vlan_id are not referenced in the code.","commit_id":"b7726303d0e6b560cd32d3c619c8e6eeb7832091"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"f6f861cec3ffc30e09a1ef9497a590eab5088c76","unresolved":false,"context_lines":[{"line_number":90,"context_line":"            # the original  exception."},{"line_number":91,"context_line":"            raise cexc.UcsmConfigReadFailed(ucsm_ip\u003dself.ucsm_ip, exc\u003de)"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def create_portprofile(self, profile_name, vlan_id):"},{"line_number":94,"context_line":"        handle \u003d self.handles[self.ucsm_ip]"},{"line_number":95,"context_line":"        try:"},{"line_number":96,"context_line":"            portProfile \u003d handle.GetManagedObject(None,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAVn%2F%2FVlw%3D","line":93,"in_reply_to":"AAAAVn%2F%2F2Ew%3D","updated":"2014-03-06 18:58:27.000000000","message":"Using profile_name and vlan_id to create the port profile name and vlan profile name.","commit_id":"b7726303d0e6b560cd32d3c619c8e6eeb7832091"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"c0e7184c51cd5058a387ff16cab0d36f26e9e0b8","unresolved":false,"context_lines":[{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def ucs_manager_disconnect(self):"},{"line_number":118,"context_line":"        handle \u003d self.handles[self.ucsm_ip]"},{"line_number":119,"context_line":"        handle.Logout()"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAVn%2F%2F2Ag%3D","line":119,"updated":"2014-03-03 20:38:54.000000000","message":"initial connect with UCSM, and reconnect with UCSM should be considered in order to sync up what\u0027s in the DB and what\u0027s in UCSM. \n\nIt\u0027s important especially during tests in which, for example, devstack gets restared, or simply the neutron server gets restarted.","commit_id":"b7726303d0e6b560cd32d3c619c8e6eeb7832091"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"f6f861cec3ffc30e09a1ef9497a590eab5088c76","unresolved":false,"context_lines":[{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def ucs_manager_disconnect(self):"},{"line_number":118,"context_line":"        handle \u003d self.handles[self.ucsm_ip]"},{"line_number":119,"context_line":"        handle.Logout()"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAVn%2F%2FVlA%3D","line":119,"in_reply_to":"AAAAVn%2F%2F2Ag%3D","updated":"2014-03-06 18:58:27.000000000","message":"Taking care of this in a subsequent patch.","commit_id":"b7726303d0e6b560cd32d3c619c8e6eeb7832091"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"6e59fc3a6b6a81827b6459f3bc6fc1c975a9900d","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    def __init__(self):"},{"line_number":33,"context_line":"        self.ucsmsdk \u003d None"},{"line_number":34,"context_line":"        self.ucsm_ip \u003d cfg.CONF.ml2_ucsm.ucsm_ip"},{"line_number":35,"context_line":"        self.username \u003d cfg.CONF.ml2_ucsm.ucsm_username"},{"line_number":36,"context_line":"        self.password \u003d cfg.CONF.ml2_ucsm.ucsm_password"},{"line_number":37,"context_line":"        self.handles \u003d {}"},{"line_number":38,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2FUFY%3D","line":35,"updated":"2014-03-06 22:12:32.000000000","message":"username and password are only accessed once. do you need to save these under self?","commit_id":"05e9f7f85e1f5391e383199e273b12d80616bc53"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"6e59fc3a6b6a81827b6459f3bc6fc1c975a9900d","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        self.password \u003d cfg.CONF.ml2_ucsm.ucsm_password"},{"line_number":37,"context_line":"        self.handles \u003d {}"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def _validate_config(self):"},{"line_number":40,"context_line":"        if cfg.CONF.ml2_ucsm.get(\u0027ucsm_ip\u0027) \u003d\u003d \u0027\u0027:"},{"line_number":41,"context_line":"            msg \u003d _(\u0027UCS Manager IP address is not provided\u0027)"},{"line_number":42,"context_line":"            LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2FUDc%3D","line":39,"updated":"2014-03-06 22:12:32.000000000","message":"do you want to create an exception here if one of these values is missing or just catch the Login exception?\nif you use the .Login exception code below you wouldn\u0027t know it may have been because of a missing username. If the design was to use .Login exception is catch an empty username then add that to the exception string.","commit_id":"05e9f7f85e1f5391e383199e273b12d80616bc53"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"6e59fc3a6b6a81827b6459f3bc6fc1c975a9900d","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        self.handles \u003d {}"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def _validate_config(self):"},{"line_number":40,"context_line":"        if cfg.CONF.ml2_ucsm.get(\u0027ucsm_ip\u0027) \u003d\u003d \u0027\u0027:"},{"line_number":41,"context_line":"            msg \u003d _(\u0027UCS Manager IP address is not provided\u0027)"},{"line_number":42,"context_line":"            LOG.error(msg)"},{"line_number":43,"context_line":"        if cfg.CONF.ml2_ucsm.get(\u0027ucsm_username\u0027) \u003d\u003d \u0027\u0027:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2FUFE%3D","line":40,"updated":"2014-03-06 22:12:32.000000000","message":"access self.ucsm_ip here","commit_id":"05e9f7f85e1f5391e383199e273b12d80616bc53"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"6e59fc3a6b6a81827b6459f3bc6fc1c975a9900d","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        if cfg.CONF.ml2_ucsm.get(\u0027ucsm_ip\u0027) \u003d\u003d \u0027\u0027:"},{"line_number":41,"context_line":"            msg \u003d _(\u0027UCS Manager IP address is not provided\u0027)"},{"line_number":42,"context_line":"            LOG.error(msg)"},{"line_number":43,"context_line":"        if cfg.CONF.ml2_ucsm.get(\u0027ucsm_username\u0027) \u003d\u003d \u0027\u0027:"},{"line_number":44,"context_line":"            msg \u003d _(\u0027UCS Manager username is not provided\u0027)"},{"line_number":45,"context_line":"            LOG.error(msg)"},{"line_number":46,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2FUE0%3D","line":43,"updated":"2014-03-06 22:12:32.000000000","message":"if you do remove self.username then this stays like this, otherwise change to self.username","commit_id":"05e9f7f85e1f5391e383199e273b12d80616bc53"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"6e59fc3a6b6a81827b6459f3bc6fc1c975a9900d","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            self.handles[self.ucsm_ip] \u003d handle"},{"line_number":69,"context_line":"        except Exception as e:"},{"line_number":70,"context_line":"            # Raise a Neutron exception. Include a description of"},{"line_number":71,"context_line":"            # the original  exception."},{"line_number":72,"context_line":"            raise cexc.UcsmConnectFailed(ucsm_ip\u003dself.ucsm_ip, exc\u003de)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        return self.handles[self.ucsm_ip]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2FUDA%3D","line":71,"updated":"2014-03-06 22:12:32.000000000","message":"remove extra space.","commit_id":"05e9f7f85e1f5391e383199e273b12d80616bc53"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"6e59fc3a6b6a81827b6459f3bc6fc1c975a9900d","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        \"\"\"Get all port profiles from a specific UCS Manager.\"\"\""},{"line_number":78,"context_line":"        handle \u003d self.handles[self.ucsm_ip]"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        # Get mo VnicProfile"},{"line_number":81,"context_line":"        try:"},{"line_number":82,"context_line":"            portProfile \u003d handle.GetManagedObject(None, VnicProfile.ClassId())"},{"line_number":83,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2FUCo%3D","line":80,"updated":"2014-03-06 22:12:32.000000000","message":"spell out Managed Object","commit_id":"05e9f7f85e1f5391e383199e273b12d80616bc53"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"6e59fc3a6b6a81827b6459f3bc6fc1c975a9900d","unresolved":false,"context_lines":[{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        except Exception as e:"},{"line_number":114,"context_line":"            # Raise a Neutron exception. Include a description of"},{"line_number":115,"context_line":"            # the original  exception."},{"line_number":116,"context_line":"            raise cexc.UcsmConfigFailed(config\u003dvlan_name,"},{"line_number":117,"context_line":"                                        ucsm_ip\u003dself.ucsm_ip, exc\u003de)"},{"line_number":118,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2FUBs%3D","line":115,"updated":"2014-03-06 22:12:32.000000000","message":"another extra space to be removed. You might want to consider removing the comment all together. The code is pretty self-explanatory IMHO. (Here and for all the other exception processing.)","commit_id":"05e9f7f85e1f5391e383199e273b12d80616bc53"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"6e59fc3a6b6a81827b6459f3bc6fc1c975a9900d","unresolved":false,"context_lines":[{"line_number":117,"context_line":"                                        ucsm_ip\u003dself.ucsm_ip, exc\u003de)"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    def _create_ci_profile(self, handle, port_profileDN, vlan_id):"},{"line_number":120,"context_line":"        ci_profile_name \u003d \"OS-\" + \"CI\" + str(vlan_id)"},{"line_number":121,"context_line":"        ci_profileDN \u003d port_profileDN + \"/\" + ci_profile_name"},{"line_number":122,"context_line":"        descr \u003d \"Created by OS UCSM Mech Driver\""},{"line_number":123,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2FUBU%3D","line":120,"updated":"2014-03-06 22:12:32.000000000","message":"is there a reason why this isn\u0027t written as \"OS-CI\" +\n\nI do see you use \"OS-\" in other places. Consider replacing w/ a constant.","commit_id":"05e9f7f85e1f5391e383199e273b12d80616bc53"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"6e59fc3a6b6a81827b6459f3bc6fc1c975a9900d","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        vlan_profile_path \u003d port_profileDN + \"/\" + vlan_name"},{"line_number":153,"context_line":"        descr \u003d \"Created by OS UCSM Mech Driver\""},{"line_number":154,"context_line":"        # Max ports that can have this profiles applied to them"},{"line_number":155,"context_line":"        max_ports \u003d 64"},{"line_number":156,"context_line":"        # Create vlan profile first"},{"line_number":157,"context_line":"        self._create_vlanprofile(handle, vlan_id)"},{"line_number":158,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2FT%2F4%3D","line":155,"updated":"2014-03-06 22:12:32.000000000","message":"should this be a config variable? if not then why not just hard code 64 below. (or maybe constant)","commit_id":"05e9f7f85e1f5391e383199e273b12d80616bc53"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"439020ed117e801a5052ea7a7f0b8c4d31127762","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        self.username \u003d cfg.CONF.ml2_cisco_ucsm.ucsm_username"},{"line_number":38,"context_line":"        self.password \u003d cfg.CONF.ml2_cisco_ucsm.ucsm_password"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        LOG.debug(_(\"UCS Manager Network driver Ip: %s\"), self.ucsm_ip)"},{"line_number":41,"context_line":"        self.handles \u003d {}"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def _validate_config(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_c611ee5d","line":40,"updated":"2014-08-06 19:04:57.000000000","message":"More debug level logs with i18n that can be removed. Check this and other files.","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"bfb5e500d13dfb017a123cf95ef3271c0176310b","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        self.username \u003d cfg.CONF.ml2_cisco_ucsm.ucsm_username"},{"line_number":38,"context_line":"        self.password \u003d cfg.CONF.ml2_cisco_ucsm.ucsm_password"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        LOG.debug(_(\"UCS Manager Network driver Ip: %s\"), self.ucsm_ip)"},{"line_number":41,"context_line":"        self.handles \u003d {}"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def _validate_config(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_17501909","line":40,"in_reply_to":"baada198_c611ee5d","updated":"2014-08-08 22:01:07.000000000","message":"Done","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"439020ed117e801a5052ea7a7f0b8c4d31127762","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        self.handles \u003d {}"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def _validate_config(self):"},{"line_number":44,"context_line":"        if cfg.CONF.ml2_cisco_ucsm.get(\u0027ucsm_ip\u0027) \u003d\u003d \u0027\u0027:"},{"line_number":45,"context_line":"            msg \u003d _(\u0027UCS Manager IP address is not provided\u0027)"},{"line_number":46,"context_line":"            LOG.error(msg)"},{"line_number":47,"context_line":"        if cfg.CONF.ml2_cisco_ucsm.get(\u0027ucsm_username\u0027) \u003d\u003d \u0027\u0027:"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_492b317c","line":44,"updated":"2014-08-06 19:04:57.000000000","message":"Is there a need to verify that it is a valid IP?","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"bfb5e500d13dfb017a123cf95ef3271c0176310b","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        self.handles \u003d {}"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def _validate_config(self):"},{"line_number":44,"context_line":"        if cfg.CONF.ml2_cisco_ucsm.get(\u0027ucsm_ip\u0027) \u003d\u003d \u0027\u0027:"},{"line_number":45,"context_line":"            msg \u003d _(\u0027UCS Manager IP address is not provided\u0027)"},{"line_number":46,"context_line":"            LOG.error(msg)"},{"line_number":47,"context_line":"        if cfg.CONF.ml2_cisco_ucsm.get(\u0027ucsm_username\u0027) \u003d\u003d \u0027\u0027:"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_37c43d93","line":44,"in_reply_to":"baada198_492b317c","updated":"2014-08-08 22:01:07.000000000","message":"If this is an invalid IP, we will not be able to connect to UCS manager. Failing at that point seems sufficient.","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":10662,"name":"Gopi Krishna S","email":"saripurigopi@gmail.com","username":"saripurigopi"},"change_message_id":"18d618a4d7ea43735a2f9fc83a996a5d1067755c","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        self.handles \u003d {}"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def _validate_config(self):"},{"line_number":44,"context_line":"        if cfg.CONF.ml2_cisco_ucsm.get(\u0027ucsm_ip\u0027) \u003d\u003d \u0027\u0027:"},{"line_number":45,"context_line":"            msg \u003d _(\u0027UCS Manager IP address is not provided\u0027)"},{"line_number":46,"context_line":"            LOG.error(msg)"},{"line_number":47,"context_line":"        if cfg.CONF.ml2_cisco_ucsm.get(\u0027ucsm_username\u0027) \u003d\u003d \u0027\u0027:"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_d57fc4ba","line":44,"in_reply_to":"baada198_492b317c","updated":"2014-08-07 04:55:46.000000000","message":"This can be UCSM hostname/FQDN also, as long as the hostname/ip is reachable from neutron host, it is fine use it.\nI\u0027m not sure if using hostname in config files is not supported.","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"bfb5e500d13dfb017a123cf95ef3271c0176310b","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        self.handles \u003d {}"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def _validate_config(self):"},{"line_number":44,"context_line":"        if cfg.CONF.ml2_cisco_ucsm.get(\u0027ucsm_ip\u0027) \u003d\u003d \u0027\u0027:"},{"line_number":45,"context_line":"            msg \u003d _(\u0027UCS Manager IP address is not provided\u0027)"},{"line_number":46,"context_line":"            LOG.error(msg)"},{"line_number":47,"context_line":"        if cfg.CONF.ml2_cisco_ucsm.get(\u0027ucsm_username\u0027) \u003d\u003d \u0027\u0027:"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_fd555bf9","line":44,"in_reply_to":"baada198_d57fc4ba","updated":"2014-08-08 22:01:07.000000000","message":"Currently not supporting hostname in the config file.","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":10662,"name":"Gopi Krishna S","email":"saripurigopi@gmail.com","username":"saripurigopi"},"change_message_id":"18d618a4d7ea43735a2f9fc83a996a5d1067755c","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        vlan_path \u003d \"fabric/lan\""},{"line_number":101,"context_line":"        vlan_name \u003d \"OS-\" + str(vlan_id)"},{"line_number":102,"context_line":"        LOG.debug(_(\"Inside vlan_profile with %s\"), vlan_name)"},{"line_number":103,"context_line":"        vlan_profileDN \u003d vlan_path + \"/net-\" + vlan_name"},{"line_number":104,"context_line":"        try:"},{"line_number":105,"context_line":"            handle.StartTransaction()"},{"line_number":106,"context_line":"            vp1 \u003d handle.GetManagedObject(None,"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_38fb9716","line":103,"updated":"2014-08-07 04:55:46.000000000","message":"In general UCS SDK provides utility to form DN, you can use MakeRn() on specific MO to get the RN and pass the array of RNs to UcsUtils.MakeDn()\n\n\nEx:\nfabric_vlan \u003d ManagedObject(NamingId.FABRIC_VLAN)\nfabric_vlan.setattr(FabricVlan.NAME, \u0027test\u0027)\n vlan_profile_dn \u003d UcsUtils.MakeDn([ManagedObject(NamingId.FABRIC_EP).MakeRn(), ManagedObject(NamingId.FABRIC_LAN_CLOUD).MakeRn(), fabric_vlan.MakeRn()])\n\nThis translated to DN str: \"fabric/lan/net-test\"","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"bfb5e500d13dfb017a123cf95ef3271c0176310b","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        vlan_path \u003d \"fabric/lan\""},{"line_number":101,"context_line":"        vlan_name \u003d \"OS-\" + str(vlan_id)"},{"line_number":102,"context_line":"        LOG.debug(_(\"Inside vlan_profile with %s\"), vlan_name)"},{"line_number":103,"context_line":"        vlan_profileDN \u003d vlan_path + \"/net-\" + vlan_name"},{"line_number":104,"context_line":"        try:"},{"line_number":105,"context_line":"            handle.StartTransaction()"},{"line_number":106,"context_line":"            vp1 \u003d handle.GetManagedObject(None,"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_5d6567ae","line":103,"in_reply_to":"baada198_38fb9716","updated":"2014-08-08 22:01:07.000000000","message":"Thanks for pointing this out but this seems like an overkill for forming a path string. Also, figuring out which managed object\u0027s Dn would provide which part of the path string is something that is not known to an user of the SDK.","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":10662,"name":"Gopi Krishna S","email":"saripurigopi@gmail.com","username":"saripurigopi"},"change_message_id":"18d618a4d7ea43735a2f9fc83a996a5d1067755c","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            handle.StartTransaction()"},{"line_number":106,"context_line":"            vp1 \u003d handle.GetManagedObject(None,"},{"line_number":107,"context_line":"                                          const.FabricLanCloudId,"},{"line_number":108,"context_line":"                                          {const.FabricLanCloudDN:"},{"line_number":109,"context_line":"                                           vlan_path})"},{"line_number":110,"context_line":"            if not vp1:"},{"line_number":111,"context_line":"                LOG.debug(_(\"Ucs driver quitting: vlanProfile1 %s missing\"),"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_7878af7e","line":108,"updated":"2014-08-07 04:55:46.000000000","message":"The constants can be directly used from the UcsSdk, this way you can avoid redefining them. Applies to consts in this file. \n\nEx:\n\nself.ucsmsdk.FabricLanCloud.DN in place of const.FabricLanCloudDN","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"bfb5e500d13dfb017a123cf95ef3271c0176310b","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            handle.StartTransaction()"},{"line_number":106,"context_line":"            vp1 \u003d handle.GetManagedObject(None,"},{"line_number":107,"context_line":"                                          const.FabricLanCloudId,"},{"line_number":108,"context_line":"                                          {const.FabricLanCloudDN:"},{"line_number":109,"context_line":"                                           vlan_path})"},{"line_number":110,"context_line":"            if not vp1:"},{"line_number":111,"context_line":"                LOG.debug(_(\"Ucs driver quitting: vlanProfile1 %s missing\"),"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_e88ce683","line":108,"in_reply_to":"baada198_7878af7e","updated":"2014-08-08 22:01:07.000000000","message":"Exactly the reason why I was having pep8 errors. UcsSdk has to be dynamically imported at runtime (since unit test environments may not have Ucs Sdk) installed.","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":10662,"name":"Gopi Krishna S","email":"saripurigopi@gmail.com","username":"saripurigopi"},"change_message_id":"18d618a4d7ea43735a2f9fc83a996a5d1067755c","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        LOG.debug(_(\"Inside create_client_profile with %s\"), cl_profile_name)"},{"line_number":147,"context_line":"        port_profileDN \u003d port_profilesetDN + \"/\" + profile_name"},{"line_number":148,"context_line":"        cl_profileDN \u003d port_profilesetDN + \"/vnic-\" + profile_name + \\"},{"line_number":149,"context_line":"            \"/cl-\" + cl_profile_name"},{"line_number":150,"context_line":"        descr \u003d \"Created by OS UCSM Mech Driver\""},{"line_number":151,"context_line":"        try:"},{"line_number":152,"context_line":"            handle.StartTransaction()"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_78efcf1d","line":149,"updated":"2014-08-07 04:55:46.000000000","message":"ditto, can use UcsUtils.MakeDN()","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"bfb5e500d13dfb017a123cf95ef3271c0176310b","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        LOG.debug(_(\"Inside create_client_profile with %s\"), cl_profile_name)"},{"line_number":147,"context_line":"        port_profileDN \u003d port_profilesetDN + \"/\" + profile_name"},{"line_number":148,"context_line":"        cl_profileDN \u003d port_profilesetDN + \"/vnic-\" + profile_name + \\"},{"line_number":149,"context_line":"            \"/cl-\" + cl_profile_name"},{"line_number":150,"context_line":"        descr \u003d \"Created by OS UCSM Mech Driver\""},{"line_number":151,"context_line":"        try:"},{"line_number":152,"context_line":"            handle.StartTransaction()"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_48e5d23c","line":149,"in_reply_to":"baada198_78efcf1d","updated":"2014-08-08 22:01:07.000000000","message":"See reply above.","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"439020ed117e801a5052ea7a7f0b8c4d31127762","unresolved":false,"context_lines":[{"line_number":161,"context_line":"                          port_profileDN)"},{"line_number":162,"context_line":"                return"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"            cl_profile \u003d handle.AddManagedObject(p_profile,"},{"line_number":165,"context_line":"                                                 const.VmVnicProfClClassId,"},{"line_number":166,"context_line":"                                                 {const.VmVnicProfClOrgPath:"},{"line_number":167,"context_line":"                                                  \".*\","}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_a995ad33","line":164,"updated":"2014-08-06 19:04:57.000000000","message":"For readability, would it be better to do:\n\n    cl_profile \u003d handle.AddManagedObject(\n        p_profile, const.VmVnicProfClClassId,\n        {const.VmVnicProfClOrgPath: \".*\",\n         const.VmVnicProfileClDn: cl_profileDN,\n         ...","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"bfb5e500d13dfb017a123cf95ef3271c0176310b","unresolved":false,"context_lines":[{"line_number":161,"context_line":"                          port_profileDN)"},{"line_number":162,"context_line":"                return"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"            cl_profile \u003d handle.AddManagedObject(p_profile,"},{"line_number":165,"context_line":"                                                 const.VmVnicProfClClassId,"},{"line_number":166,"context_line":"                                                 {const.VmVnicProfClOrgPath:"},{"line_number":167,"context_line":"                                                  \".*\","}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_28b5fe18","line":164,"in_reply_to":"baada198_a995ad33","updated":"2014-08-08 22:01:07.000000000","message":"Agreed.","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":10662,"name":"Gopi Krishna S","email":"saripurigopi@gmail.com","username":"saripurigopi"},"change_message_id":"18d618a4d7ea43735a2f9fc83a996a5d1067755c","unresolved":false,"context_lines":[{"line_number":170,"context_line":"                                                 const.VmVnicProfClName:"},{"line_number":171,"context_line":"                                                 cl_profile_name,"},{"line_number":172,"context_line":"                                                 const.VmVnicProfClPolOwnr:"},{"line_number":173,"context_line":"                                                 \"local\","},{"line_number":174,"context_line":"                                                 const.VmVnicProfClSwName:"},{"line_number":175,"context_line":"                                                 \".*\","},{"line_number":176,"context_line":"                                                 const.VmVnicProfClDcName:"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_98402308","line":173,"updated":"2014-08-07 04:55:46.000000000","message":"can use \n\nself.ucsmsdk.VmVnicProfCl.CONST_POLICY_OWNER_LOCAL instead of value \"local\" and \n\nself.ucsmsdk.VmVnicProfCl.CONST_INT_ID_NONE instead of value \"none\". \n\nself.ucsmsdk.VmVnicProfCl.NAME instead of const.VmVnicProfClName. \n\nsimilarly in other places.","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"bfb5e500d13dfb017a123cf95ef3271c0176310b","unresolved":false,"context_lines":[{"line_number":170,"context_line":"                                                 const.VmVnicProfClName:"},{"line_number":171,"context_line":"                                                 cl_profile_name,"},{"line_number":172,"context_line":"                                                 const.VmVnicProfClPolOwnr:"},{"line_number":173,"context_line":"                                                 \"local\","},{"line_number":174,"context_line":"                                                 const.VmVnicProfClSwName:"},{"line_number":175,"context_line":"                                                 \".*\","},{"line_number":176,"context_line":"                                                 const.VmVnicProfClDcName:"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_08511ad9","line":173,"in_reply_to":"baada198_98402308","updated":"2014-08-08 22:01:07.000000000","message":"I think this is the same comment as earlier. See my response for the 1st comment in this category. This is how I started off with but this won\u0027t work for the unit test environment. If you need further clarification, please feel free to reach out to me via email.","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"439020ed117e801a5052ea7a7f0b8c4d31127762","unresolved":false,"context_lines":[{"line_number":199,"context_line":"        descr \u003d \"Created by OS UCSM Mech Driver\""},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"        vlan_name \u003d \"OS-\" + str(vlan_id)"},{"line_number":202,"context_line":"        vlan_associate_path \u003d port_profilesetDN + \"/vnic-\" + profile_name + \\"},{"line_number":203,"context_line":"            \"/if-\" + vlan_name"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_29c0bd2a","line":202,"updated":"2014-08-06 19:04:57.000000000","message":"backslash -\u003e parens","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"bfb5e500d13dfb017a123cf95ef3271c0176310b","unresolved":false,"context_lines":[{"line_number":199,"context_line":"        descr \u003d \"Created by OS UCSM Mech Driver\""},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"        vlan_name \u003d \"OS-\" + str(vlan_id)"},{"line_number":202,"context_line":"        vlan_associate_path \u003d port_profilesetDN + \"/vnic-\" + profile_name + \\"},{"line_number":203,"context_line":"            \"/if-\" + vlan_name"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_976c299f","line":202,"in_reply_to":"baada198_29c0bd2a","updated":"2014-08-08 22:01:07.000000000","message":"Done","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"e658c4813b9db4d4f753384f64cd937a72f0da3e","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from neutron.plugins.ml2.drivers.cisco.ucsm import exceptions as cexc"},{"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 CiscoUcsmDriver(object):"},{"line_number":30,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_bb5fcc73","line":27,"updated":"2014-08-13 11:56:50.000000000","message":"Just a suggestions, maybe worth to reorder the methods and put all API methods on top.","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"change_message_id":"ab3c5b909a13b9101a0d06e51ea36a45bae8be53","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        \"\"\""},{"line_number":60,"context_line":"        return importutils.import_module(\u0027UcsSdk\u0027)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def ucs_manager_connect(self):"},{"line_number":63,"context_line":"        \"\"\"Connect to a UCS Manager.\"\"\""},{"line_number":64,"context_line":"        self._validate_config()"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_5ec40594","line":62,"updated":"2014-08-12 18:53:16.000000000","message":"I see this block called only once from the mech driver and the assumption within all the methods in this module are that the handle is still valid. There could be cases where the handle expires due to something like a reboot/flap on the receiving end of this connection. It would be a better design to open/close connections from within this module, cache the connections and check that for validity before every transaction. e.g.\n\n# Pseudocode\ndef call_ucsm(..):\n    if not self.handle.isvalid:\n         self.handle \u003d ucsm_connect...\n\n    return self.handle\n\nself.call_ucsm.startTransaction()","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"62d83dfe6bc5ee40fb0f9b0f3cd0ce74012563e2","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        \"\"\""},{"line_number":60,"context_line":"        return importutils.import_module(\u0027UcsSdk\u0027)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def ucs_manager_connect(self):"},{"line_number":63,"context_line":"        \"\"\"Connect to a UCS Manager.\"\"\""},{"line_number":64,"context_line":"        self._validate_config()"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_0eaf9b9e","line":62,"in_reply_to":"baada198_5ec40594","updated":"2014-08-13 14:31:58.000000000","message":"A new connection to UCS manager is made every time a port profile needs to be created. This connection handle is cached and used for the 3 transactions that make up the set of operations to create a port profile on the UCS Manager. And you are right, all methods in the module then assume that the handle is valid. \n\nModifying to accommodate your comment.","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"9e1b08253f28c29ec835af40a04ecd322f6654b0","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        self._validate_config()"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        if not self.ucsmsdk:"},{"line_number":67,"context_line":"            self.ucsmsdk \u003d self._import_ucsmsdk()"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        if not self.ucsmsdk:"},{"line_number":70,"context_line":"            LOG.debug(\"UCS Manager Network driver UCSSDK NOT found\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_611ec15f","line":67,"updated":"2014-08-11 16:42:13.000000000","message":"Wonder if the above check should be done during MD initialize(). Also if import fails, I think that it should raise SystemExit().","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"e658c4813b9db4d4f753384f64cd937a72f0da3e","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        self._validate_config()"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        if not self.ucsmsdk:"},{"line_number":67,"context_line":"            self.ucsmsdk \u003d self._import_ucsmsdk()"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        if not self.ucsmsdk:"},{"line_number":70,"context_line":"            LOG.debug(\"UCS Manager Network driver UCSSDK NOT found\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_3bde5c3d","line":67,"in_reply_to":"baada198_611ec15f","updated":"2014-08-13 11:56:50.000000000","message":"+1","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"62d83dfe6bc5ee40fb0f9b0f3cd0ce74012563e2","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        self._validate_config()"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        if not self.ucsmsdk:"},{"line_number":67,"context_line":"            self.ucsmsdk \u003d self._import_ucsmsdk()"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        if not self.ucsmsdk:"},{"line_number":70,"context_line":"            LOG.debug(\"UCS Manager Network driver UCSSDK NOT found\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_d9ebd6a2","line":67,"in_reply_to":"baada198_611ec15f","updated":"2014-08-13 14:31:58.000000000","message":"We should be able to support vanilla sr-iov config (without port-profile configuration on UCS Manager) for Intel cards. So, cannot do SystemExit() at this point.","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"9e1b08253f28c29ec835af40a04ecd322f6654b0","unresolved":false,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        handle \u003d self.ucsmsdk.UcsHandle()"},{"line_number":74,"context_line":"        try:"},{"line_number":75,"context_line":"            handle.Login(self.ucsm_ip, self.username, self.password)"},{"line_number":76,"context_line":"            self.handles[self.ucsm_ip] \u003d handle"},{"line_number":77,"context_line":"        except Exception as e:"},{"line_number":78,"context_line":"            # Raise a Neutron exception. Include a description of"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_e1857153","line":75,"updated":"2014-08-11 16:42:13.000000000","message":"Does UcsSdk require login every time a transaction is performed? In other words, does a require a connect() and disconnect() for every transaction?","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"62d83dfe6bc5ee40fb0f9b0f3cd0ce74012563e2","unresolved":false,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        handle \u003d self.ucsmsdk.UcsHandle()"},{"line_number":74,"context_line":"        try:"},{"line_number":75,"context_line":"            handle.Login(self.ucsm_ip, self.username, self.password)"},{"line_number":76,"context_line":"            self.handles[self.ucsm_ip] \u003d handle"},{"line_number":77,"context_line":"        except Exception as e:"},{"line_number":78,"context_line":"            # Raise a Neutron exception. Include a description of"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_5906e674","line":75,"in_reply_to":"baada198_e1857153","updated":"2014-08-13 14:31:58.000000000","message":"Not required. This driver is connecting to UCS manager right before it needs to perform the set of transactions required to create 1 port profile. After that it disconnects. Connecting and disconnecting for each transaction may be an overkill and at the same time keeping a connection handle cached for too long could leave it stale. So, using this median approach.","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"change_message_id":"ab3c5b909a13b9101a0d06e51ea36a45bae8be53","unresolved":false,"context_lines":[{"line_number":96,"context_line":"            raise cexc.UcsmConfigReadFailed(ucsm_ip\u003dself.ucsm_ip, exc\u003de)"},{"line_number":97,"context_line":"        return portProfile"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def _create_vlanprofile(self, handle, vlan_id):"},{"line_number":100,"context_line":"        vlan_path \u003d \"fabric/lan\""},{"line_number":101,"context_line":"        vlan_name \u003d \"OS-\" + str(vlan_id)"},{"line_number":102,"context_line":"        LOG.debug(_(\"Inside vlan_profile with %s\"), vlan_name)"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_7e40e906","line":99,"updated":"2014-08-12 18:53:16.000000000","message":"Docstring","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"d4032b0d4c3f2d7be6ad9ad786ca23b096f2abe4","unresolved":false,"context_lines":[{"line_number":96,"context_line":"            raise cexc.UcsmConfigReadFailed(ucsm_ip\u003dself.ucsm_ip, exc\u003de)"},{"line_number":97,"context_line":"        return portProfile"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def _create_vlanprofile(self, handle, vlan_id):"},{"line_number":100,"context_line":"        vlan_path \u003d \"fabric/lan\""},{"line_number":101,"context_line":"        vlan_name \u003d \"OS-\" + str(vlan_id)"},{"line_number":102,"context_line":"        LOG.debug(_(\"Inside vlan_profile with %s\"), vlan_name)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1abeadc6_18141c43","line":99,"in_reply_to":"baada198_7e40e906","updated":"2014-08-19 12:38:01.000000000","message":"Done","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"change_message_id":"ab3c5b909a13b9101a0d06e51ea36a45bae8be53","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        return portProfile"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def _create_vlanprofile(self, handle, vlan_id):"},{"line_number":100,"context_line":"        vlan_path \u003d \"fabric/lan\""},{"line_number":101,"context_line":"        vlan_name \u003d \"OS-\" + str(vlan_id)"},{"line_number":102,"context_line":"        LOG.debug(_(\"Inside vlan_profile with %s\"), vlan_name)"},{"line_number":103,"context_line":"        vlan_profileDN \u003d vlan_path + \"/net-\" + vlan_name"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_9e6bfd86","line":100,"updated":"2014-08-12 18:53:16.000000000","message":"define these constants at the beginning of this file or move to constants.","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"d4032b0d4c3f2d7be6ad9ad786ca23b096f2abe4","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        return portProfile"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def _create_vlanprofile(self, handle, vlan_id):"},{"line_number":100,"context_line":"        vlan_path \u003d \"fabric/lan\""},{"line_number":101,"context_line":"        vlan_name \u003d \"OS-\" + str(vlan_id)"},{"line_number":102,"context_line":"        LOG.debug(_(\"Inside vlan_profile with %s\"), vlan_name)"},{"line_number":103,"context_line":"        vlan_profileDN \u003d vlan_path + \"/net-\" + vlan_name"}],"source_content_type":"text/x-python","patch_set":5,"id":"1abeadc6_b82a487c","line":100,"in_reply_to":"baada198_9e6bfd86","updated":"2014-08-19 12:38:01.000000000","message":"Done","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"change_message_id":"ab3c5b909a13b9101a0d06e51ea36a45bae8be53","unresolved":false,"context_lines":[{"line_number":131,"context_line":"                          \"vlanProfile2 %s missing\", vlan_profileDN)"},{"line_number":132,"context_line":"                return"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"            handle.CompleteTransaction()"},{"line_number":135,"context_line":"            LOG.debug(\"UCS Manager Network driver created vlan_profile with \""},{"line_number":136,"context_line":"                      \"%s\", vlan_profileDN)"},{"line_number":137,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_7e25495a","line":134,"updated":"2014-08-12 18:53:16.000000000","message":"If this transaction fails in the middle then will the handle be left in some weird mid transaction state? It would be better to move this to a finally block like:\n\ntry:\n  .....\nexcept:\n  ......\nfinally:\n     handle.CompleteTransaction()","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"62d83dfe6bc5ee40fb0f9b0f3cd0ce74012563e2","unresolved":false,"context_lines":[{"line_number":131,"context_line":"                          \"vlanProfile2 %s missing\", vlan_profileDN)"},{"line_number":132,"context_line":"                return"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"            handle.CompleteTransaction()"},{"line_number":135,"context_line":"            LOG.debug(\"UCS Manager Network driver created vlan_profile with \""},{"line_number":136,"context_line":"                      \"%s\", vlan_profileDN)"},{"line_number":137,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_699ad161","line":134,"in_reply_to":"baada198_7e25495a","updated":"2014-08-13 14:31:58.000000000","message":"Agreed.","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"change_message_id":"ab3c5b909a13b9101a0d06e51ea36a45bae8be53","unresolved":false,"context_lines":[{"line_number":142,"context_line":"                                        ucsm_ip\u003dself.ucsm_ip, exc\u003de)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def _create_client_profile(self, handle, port_profilesetDN, profile_name,"},{"line_number":145,"context_line":"                               vlan_id):"},{"line_number":146,"context_line":"        cl_profile_name \u003d \"OS-CL-\" + str(vlan_id)"},{"line_number":147,"context_line":"        port_profileDN \u003d port_profilesetDN + \"/\" + profile_name"},{"line_number":148,"context_line":"        cl_profileDN \u003d (port_profilesetDN + \"/vnic-\" + profile_name +"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_de4e5539","line":145,"updated":"2014-08-12 18:53:16.000000000","message":"Docstring","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"93bb184eced89dd5b7d158651bfbbb3a3a1e74e7","unresolved":false,"context_lines":[{"line_number":142,"context_line":"                                        ucsm_ip\u003dself.ucsm_ip, exc\u003de)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def _create_client_profile(self, handle, port_profilesetDN, profile_name,"},{"line_number":145,"context_line":"                               vlan_id):"},{"line_number":146,"context_line":"        cl_profile_name \u003d \"OS-CL-\" + str(vlan_id)"},{"line_number":147,"context_line":"        port_profileDN \u003d port_profilesetDN + \"/\" + profile_name"},{"line_number":148,"context_line":"        cl_profileDN \u003d (port_profilesetDN + \"/vnic-\" + profile_name +"}],"source_content_type":"text/x-python","patch_set":5,"id":"7ac7a964_4587d461","line":145,"in_reply_to":"baada198_de4e5539","updated":"2014-08-13 23:56:12.000000000","message":"Done","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"change_message_id":"ab3c5b909a13b9101a0d06e51ea36a45bae8be53","unresolved":false,"context_lines":[{"line_number":173,"context_line":"                LOG.debug(\"UCS Manager Network driver Client profile %s \""},{"line_number":174,"context_line":"                          \"not created\", cl_profileDN)"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"            handle.CompleteTransaction()"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"        except Exception as e:"},{"line_number":179,"context_line":"            # Raise a Neutron exception. Include a description of"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_7edc6946","line":176,"updated":"2014-08-12 18:53:16.000000000","message":"Same here, move to a finally block.","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"93bb184eced89dd5b7d158651bfbbb3a3a1e74e7","unresolved":false,"context_lines":[{"line_number":173,"context_line":"                LOG.debug(\"UCS Manager Network driver Client profile %s \""},{"line_number":174,"context_line":"                          \"not created\", cl_profileDN)"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"            handle.CompleteTransaction()"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"        except Exception as e:"},{"line_number":179,"context_line":"            # Raise a Neutron exception. Include a description of"}],"source_content_type":"text/x-python","patch_set":5,"id":"7ac7a964_8581ec4c","line":176,"in_reply_to":"baada198_7edc6946","updated":"2014-08-13 23:56:12.000000000","message":"Done","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"change_message_id":"ab3c5b909a13b9101a0d06e51ea36a45bae8be53","unresolved":false,"context_lines":[{"line_number":181,"context_line":"            raise cexc.UcsmConfigFailed(config\u003dcl_profile_name,"},{"line_number":182,"context_line":"                                        ucsm_ip\u003dself.ucsm_ip, exc\u003de)"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"    def _create_port_profile(self, profile_path, profile_name, vlan_id):"},{"line_number":185,"context_line":"        handle \u003d self.handles[self.ucsm_ip]"},{"line_number":186,"context_line":"        port_profilesetDN \u003d \"fabric/lan/profiles\""},{"line_number":187,"context_line":"        port_profileDN \u003d port_profilesetDN + \"/\" + profile_name"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_7eb38909","line":184,"updated":"2014-08-12 18:53:16.000000000","message":"docstring","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"93bb184eced89dd5b7d158651bfbbb3a3a1e74e7","unresolved":false,"context_lines":[{"line_number":181,"context_line":"            raise cexc.UcsmConfigFailed(config\u003dcl_profile_name,"},{"line_number":182,"context_line":"                                        ucsm_ip\u003dself.ucsm_ip, exc\u003de)"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"    def _create_port_profile(self, profile_path, profile_name, vlan_id):"},{"line_number":185,"context_line":"        handle \u003d self.handles[self.ucsm_ip]"},{"line_number":186,"context_line":"        port_profilesetDN \u003d \"fabric/lan/profiles\""},{"line_number":187,"context_line":"        port_profileDN \u003d port_profilesetDN + \"/\" + profile_name"}],"source_content_type":"text/x-python","patch_set":5,"id":"7ac7a964_a595088a","line":184,"in_reply_to":"baada198_7eb38909","updated":"2014-08-13 23:56:12.000000000","message":"Done","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"change_message_id":"ab3c5b909a13b9101a0d06e51ea36a45bae8be53","unresolved":false,"context_lines":[{"line_number":243,"context_line":"            raise cexc.UcsmConfigFailed(config\u003dprofile_name,"},{"line_number":244,"context_line":"                                        ucsm_ip\u003dself.ucsm_ip, exc\u003de)"},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"    def create_portprofile(self, profile_name, vlan_id):"},{"line_number":247,"context_line":"        handle \u003d self.handles[self.ucsm_ip]"},{"line_number":248,"context_line":"        port_profilesetDN \u003d \"fabric/lan/profiles\""},{"line_number":249,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_3eb591cf","line":246,"updated":"2014-08-12 18:53:16.000000000","message":"docstring.","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"93bb184eced89dd5b7d158651bfbbb3a3a1e74e7","unresolved":false,"context_lines":[{"line_number":243,"context_line":"            raise cexc.UcsmConfigFailed(config\u003dprofile_name,"},{"line_number":244,"context_line":"                                        ucsm_ip\u003dself.ucsm_ip, exc\u003de)"},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"    def create_portprofile(self, profile_name, vlan_id):"},{"line_number":247,"context_line":"        handle \u003d self.handles[self.ucsm_ip]"},{"line_number":248,"context_line":"        port_profilesetDN \u003d \"fabric/lan/profiles\""},{"line_number":249,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7ac7a964_c592049f","line":246,"in_reply_to":"baada198_3eb591cf","updated":"2014-08-13 23:56:12.000000000","message":"Done","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"change_message_id":"ab3c5b909a13b9101a0d06e51ea36a45bae8be53","unresolved":false,"context_lines":[{"line_number":255,"context_line":""},{"line_number":256,"context_line":"        return True"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"    def ucs_manager_disconnect(self):"},{"line_number":259,"context_line":"        handle \u003d self.handles[self.ucsm_ip]"},{"line_number":260,"context_line":"        handle.Logout()"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_5eaa456e","line":258,"updated":"2014-08-12 18:53:16.000000000","message":"docstring.","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"93bb184eced89dd5b7d158651bfbbb3a3a1e74e7","unresolved":false,"context_lines":[{"line_number":255,"context_line":""},{"line_number":256,"context_line":"        return True"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"    def ucs_manager_disconnect(self):"},{"line_number":259,"context_line":"        handle \u003d self.handles[self.ucsm_ip]"},{"line_number":260,"context_line":"        handle.Logout()"}],"source_content_type":"text/x-python","patch_set":5,"id":"7ac7a964_85f80ce7","line":258,"in_reply_to":"baada198_5eaa456e","updated":"2014-08-13 23:56:12.000000000","message":"Done","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"c159c6348b9bd6220cafa5a4fe0c0513dd09f423","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        return portProfile"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def _create_vlanprofile(self, handle, vlan_id):"},{"line_number":100,"context_line":"        \"\"\"Create VLAN profile for the VLAN assosiated with the port"},{"line_number":101,"context_line":"        profile. This needs to be created before a port profile is"},{"line_number":102,"context_line":"        created."},{"line_number":103,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"7ac7a964_1d47db20","line":100,"updated":"2014-08-14 13:23:58.000000000","message":"Same comment about PEP257 for docstrings in this file.","commit_id":"7a300e17d9c420c64e0949de75a8d0a374bb4216"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"f079ee091d7d4a7651fb212d05964cad1312e294","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        return portProfile"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def _create_vlanprofile(self, handle, vlan_id):"},{"line_number":100,"context_line":"        \"\"\"Create VLAN profile for the VLAN assosiated with the port"},{"line_number":101,"context_line":"        profile. This needs to be created before a port profile is"},{"line_number":102,"context_line":"        created."},{"line_number":103,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"1abeadc6_5863f4db","line":100,"in_reply_to":"7ac7a964_1d47db20","updated":"2014-08-19 12:37:39.000000000","message":"I think I took care of all of them.","commit_id":"7a300e17d9c420c64e0949de75a8d0a374bb4216"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"c4a9c06d73c84cd660209a8b641bb0c300b3c28d","unresolved":false,"context_lines":[{"line_number":276,"context_line":"        self.ucs_manager_connect()"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        # Create vlan profile first"},{"line_number":279,"context_line":"        self._create_vlanprofile(handle, vlan_id)"},{"line_number":280,"context_line":"        self._create_port_profile(handle, profile_name, vlan_id)"},{"line_number":281,"context_line":"        self._create_client_profile(handle, profile_name, vlan_id)"},{"line_number":282,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"1abeadc6_2b879b10","line":279,"updated":"2014-08-20 08:16:14.000000000","message":"What if one of these tasks fails? Won\u0027t it require rollback? It may result in partial configuration.","commit_id":"a4c39c14361f14e955bb7478ea326fe733235b3f"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"7b7dc027bdd8cc33f81b17ead09797f6bca0af4a","unresolved":false,"context_lines":[{"line_number":276,"context_line":"        self.ucs_manager_connect()"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        # Create vlan profile first"},{"line_number":279,"context_line":"        self._create_vlanprofile(handle, vlan_id)"},{"line_number":280,"context_line":"        self._create_port_profile(handle, profile_name, vlan_id)"},{"line_number":281,"context_line":"        self._create_client_profile(handle, profile_name, vlan_id)"},{"line_number":282,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"1abeadc6_3fd7ccc0","line":279,"in_reply_to":"1abeadc6_2b879b10","updated":"2014-08-20 13:34:45.000000000","message":"Yes, when one of these tasks fails, configuration would be partial. But, when another vm-fex port is created on the same segment, it will try to re-create all of the missing config and re-use what has already been configured. \n\nThis configuration on UCS Manager is generic, i.e. it hasn\u0027t been associated with a specific vNIC yet. The association with the specific vNIC happens only after the VM is booted with this profile in the domain xml file and a vNIC is associated with the VM.\n\nI hope this answers your question.","commit_id":"a4c39c14361f14e955bb7478ea326fe733235b3f"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"2d4b61e0b0abef4c65376c5ffe7691f285fe34b5","unresolved":false,"context_lines":[{"line_number":276,"context_line":"        self.ucs_manager_connect()"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        # Create vlan profile first"},{"line_number":279,"context_line":"        self._create_vlanprofile(handle, vlan_id)"},{"line_number":280,"context_line":"        self._create_port_profile(handle, profile_name, vlan_id)"},{"line_number":281,"context_line":"        self._create_client_profile(handle, profile_name, vlan_id)"},{"line_number":282,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"1abeadc6_1bb4d6cf","line":279,"in_reply_to":"1abeadc6_3fd7ccc0","updated":"2014-08-20 18:25:22.000000000","message":"Just a suggestion, I think it can be useful if you can provide some unit test that verifies that correct sequence of messages is invoked.","commit_id":"a4c39c14361f14e955bb7478ea326fe733235b3f"},{"author":{"_account_id":6785,"name":"Rudrajit Tapadar","email":"rudrajit.tapadar@gmail.com","username":"rtapadar"},"change_message_id":"5ef2056f1be9a89915a32eb2df36eddf1de4c100","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        self.handles \u003d {}"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def _validate_config(self):"},{"line_number":44,"context_line":"        if cfg.CONF.ml2_cisco_ucsm.get(\u0027ucsm_ip\u0027) \u003d\u003d \u0027\u0027:"},{"line_number":45,"context_line":"            msg \u003d _(\u0027UCS Manager IP address is not provided\u0027)"},{"line_number":46,"context_line":"            LOG.error(msg)"},{"line_number":47,"context_line":"        if cfg.CONF.ml2_cisco_ucsm.get(\u0027ucsm_username\u0027) \u003d\u003d \u0027\u0027:"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_fe16ba47","line":44,"updated":"2014-08-24 06:16:42.000000000","message":"How about \"if not cfg....\" for readability.","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"930acfe39b6518681cdd2f2ace88d522d65e332c","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        self.handles \u003d {}"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def _validate_config(self):"},{"line_number":44,"context_line":"        if cfg.CONF.ml2_cisco_ucsm.get(\u0027ucsm_ip\u0027) \u003d\u003d \u0027\u0027:"},{"line_number":45,"context_line":"            msg \u003d _(\u0027UCS Manager IP address is not provided\u0027)"},{"line_number":46,"context_line":"            LOG.error(msg)"},{"line_number":47,"context_line":"        if cfg.CONF.ml2_cisco_ucsm.get(\u0027ucsm_username\u0027) \u003d\u003d \u0027\u0027:"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_01ed6d25","line":44,"in_reply_to":"1abeadc6_fe16ba47","updated":"2014-08-27 09:03:14.000000000","message":"I don\u0027t think it is affecting readability that much. Fixing it anyways.","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"b72183dceb22fcb679294f1ad33985c062f9c323","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    def _validate_config(self):"},{"line_number":44,"context_line":"        if cfg.CONF.ml2_cisco_ucsm.get(\u0027ucsm_ip\u0027) \u003d\u003d \u0027\u0027:"},{"line_number":45,"context_line":"            msg \u003d _(\u0027UCS Manager IP address is not provided\u0027)"},{"line_number":46,"context_line":"            LOG.error(msg)"},{"line_number":47,"context_line":"        if cfg.CONF.ml2_cisco_ucsm.get(\u0027ucsm_username\u0027) \u003d\u003d \u0027\u0027:"},{"line_number":48,"context_line":"            msg \u003d _(\u0027UCS Manager username is not provided\u0027)"},{"line_number":49,"context_line":"            LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_f53262f0","line":46,"updated":"2014-08-23 14:12:03.000000000","message":"If validation fails do you want to return false, raise exception, or just log?","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"930acfe39b6518681cdd2f2ace88d522d65e332c","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    def _validate_config(self):"},{"line_number":44,"context_line":"        if cfg.CONF.ml2_cisco_ucsm.get(\u0027ucsm_ip\u0027) \u003d\u003d \u0027\u0027:"},{"line_number":45,"context_line":"            msg \u003d _(\u0027UCS Manager IP address is not provided\u0027)"},{"line_number":46,"context_line":"            LOG.error(msg)"},{"line_number":47,"context_line":"        if cfg.CONF.ml2_cisco_ucsm.get(\u0027ucsm_username\u0027) \u003d\u003d \u0027\u0027:"},{"line_number":48,"context_line":"            msg \u003d _(\u0027UCS Manager username is not provided\u0027)"},{"line_number":49,"context_line":"            LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_d4bed6fe","line":46,"in_reply_to":"1abeadc6_f53262f0","updated":"2014-08-27 09:03:14.000000000","message":"If validation fails, ucs_manager_connect() would raise an exception anyways.","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6785,"name":"Rudrajit Tapadar","email":"rudrajit.tapadar@gmail.com","username":"rtapadar"},"change_message_id":"5ef2056f1be9a89915a32eb2df36eddf1de4c100","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        if cfg.CONF.ml2_cisco_ucsm.get(\u0027ucsm_ip\u0027) \u003d\u003d \u0027\u0027:"},{"line_number":45,"context_line":"            msg \u003d _(\u0027UCS Manager IP address is not provided\u0027)"},{"line_number":46,"context_line":"            LOG.error(msg)"},{"line_number":47,"context_line":"        if cfg.CONF.ml2_cisco_ucsm.get(\u0027ucsm_username\u0027) \u003d\u003d \u0027\u0027:"},{"line_number":48,"context_line":"            msg \u003d _(\u0027UCS Manager username is not provided\u0027)"},{"line_number":49,"context_line":"            LOG.error(msg)"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_3e2cb298","line":47,"updated":"2014-08-24 06:16:42.000000000","message":"ditto","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"930acfe39b6518681cdd2f2ace88d522d65e332c","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        if cfg.CONF.ml2_cisco_ucsm.get(\u0027ucsm_ip\u0027) \u003d\u003d \u0027\u0027:"},{"line_number":45,"context_line":"            msg \u003d _(\u0027UCS Manager IP address is not provided\u0027)"},{"line_number":46,"context_line":"            LOG.error(msg)"},{"line_number":47,"context_line":"        if cfg.CONF.ml2_cisco_ucsm.get(\u0027ucsm_username\u0027) \u003d\u003d \u0027\u0027:"},{"line_number":48,"context_line":"            msg \u003d _(\u0027UCS Manager username is not provided\u0027)"},{"line_number":49,"context_line":"            LOG.error(msg)"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_81d89d80","line":47,"in_reply_to":"1abeadc6_3e2cb298","updated":"2014-08-27 09:03:14.000000000","message":"See above comment.","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"b72183dceb22fcb679294f1ad33985c062f9c323","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        self._validate_config()"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        if not self.ucsmsdk:"},{"line_number":67,"context_line":"            self.ucsmsdk \u003d self._import_ucsmsdk()"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        if not self.ucsmsdk:"},{"line_number":70,"context_line":"            LOG.debug(\"UCS Manager Network driver UCSSDK NOT found\")"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_d53e46b7","line":67,"updated":"2014-08-23 14:12:03.000000000","message":"Why not do the import here? Is the function used elsewhere?","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"930acfe39b6518681cdd2f2ace88d522d65e332c","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        self._validate_config()"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        if not self.ucsmsdk:"},{"line_number":67,"context_line":"            self.ucsmsdk \u003d self._import_ucsmsdk()"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        if not self.ucsmsdk:"},{"line_number":70,"context_line":"            LOG.debug(\"UCS Manager Network driver UCSSDK NOT found\")"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_f46752b5","line":67,"in_reply_to":"1abeadc6_d53e46b7","updated":"2014-08-27 09:03:14.000000000","message":"Easier to mock _import_ucsmsdk() in unit test if it is a separate function.","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"b72183dceb22fcb679294f1ad33985c062f9c323","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            self.ucsmsdk \u003d self._import_ucsmsdk()"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        if not self.ucsmsdk:"},{"line_number":70,"context_line":"            LOG.debug(\"UCS Manager Network driver UCSSDK NOT found\")"},{"line_number":71,"context_line":"            return None"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        handle \u003d self.ucsmsdk.UcsHandle()"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_15451e42","line":70,"updated":"2014-08-23 14:12:03.000000000","message":"Only a debug level log?","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"930acfe39b6518681cdd2f2ace88d522d65e332c","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            self.ucsmsdk \u003d self._import_ucsmsdk()"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        if not self.ucsmsdk:"},{"line_number":70,"context_line":"            LOG.debug(\"UCS Manager Network driver UCSSDK NOT found\")"},{"line_number":71,"context_line":"            return None"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        handle \u003d self.ucsmsdk.UcsHandle()"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_21426910","line":70,"in_reply_to":"1abeadc6_15451e42","updated":"2014-08-27 09:03:14.000000000","message":"Added error logs at the top level function. I do not want these debug msgs that expose some internals of the network driver to be converted to error logs. Hope this modification is acceptable.","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"b72183dceb22fcb679294f1ad33985c062f9c323","unresolved":false,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        handle \u003d self.ucsmsdk.UcsHandle()"},{"line_number":74,"context_line":"        try:"},{"line_number":75,"context_line":"            handle.Login(self.ucsm_ip, self.username, self.password)"},{"line_number":76,"context_line":"            self.handles[self.ucsm_ip] \u003d handle"},{"line_number":77,"context_line":"        except Exception as e:"},{"line_number":78,"context_line":"            # Raise a Neutron exception. Include a description of"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_15b35e4d","line":75,"updated":"2014-08-23 14:12:03.000000000","message":"Do these handle methods return generic errors (here and L90) or specific ones? It would be good to have the specific exceptions caught (L77, L93), rather than a generic exception.","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"930acfe39b6518681cdd2f2ace88d522d65e332c","unresolved":false,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        handle \u003d self.ucsmsdk.UcsHandle()"},{"line_number":74,"context_line":"        try:"},{"line_number":75,"context_line":"            handle.Login(self.ucsm_ip, self.username, self.password)"},{"line_number":76,"context_line":"            self.handles[self.ucsm_ip] \u003d handle"},{"line_number":77,"context_line":"        except Exception as e:"},{"line_number":78,"context_line":"            # Raise a Neutron exception. Include a description of"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_7486e214","line":75,"in_reply_to":"1abeadc6_15b35e4d","updated":"2014-08-27 09:03:14.000000000","message":"The error msgs from the UCS Manager sdk, are not very generic at this point. Also, only generic exceptions are raised.","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"b72183dceb22fcb679294f1ad33985c062f9c323","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        \"\"\"Creates VLAN profile to be assosiated with the Port Profile.\"\"\""},{"line_number":101,"context_line":"        vlan_name \u003d \"OS-\" + str(vlan_id)"},{"line_number":102,"context_line":"        vlan_profileDN \u003d const.vlan_path + \"/net-\" + vlan_name"},{"line_number":103,"context_line":"        LOG.debug(_(\"Inside vlan_profile with %s\"), vlan_name)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        # Check if the connection handle is still valid."},{"line_number":106,"context_line":"        # If not, reconnect."}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_957e8e68","line":103,"updated":"2014-08-23 14:12:03.000000000","message":"remove i18n","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"930acfe39b6518681cdd2f2ace88d522d65e332c","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        \"\"\"Creates VLAN profile to be assosiated with the Port Profile.\"\"\""},{"line_number":101,"context_line":"        vlan_name \u003d \"OS-\" + str(vlan_id)"},{"line_number":102,"context_line":"        vlan_profileDN \u003d const.vlan_path + \"/net-\" + vlan_name"},{"line_number":103,"context_line":"        LOG.debug(_(\"Inside vlan_profile with %s\"), vlan_name)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        # Check if the connection handle is still valid."},{"line_number":106,"context_line":"        # If not, reconnect."}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_749d0259","line":103,"in_reply_to":"1abeadc6_957e8e68","updated":"2014-08-27 09:03:14.000000000","message":"Done","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"b72183dceb22fcb679294f1ad33985c062f9c323","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                                          {const.FabricLanCloudDN:"},{"line_number":114,"context_line":"                                           const.vlan_path})"},{"line_number":115,"context_line":"            if not vp1:"},{"line_number":116,"context_line":"                LOG.debug(\"UCS Manager Network driver quitting. \""},{"line_number":117,"context_line":"                          \"vlanProfile1 %s missing\", const.vlan_path)"},{"line_number":118,"context_line":"                return"},{"line_number":119,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_b598eac0","line":116,"updated":"2014-08-23 14:12:03.000000000","message":"debug level log?","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"930acfe39b6518681cdd2f2ace88d522d65e332c","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                                          {const.FabricLanCloudDN:"},{"line_number":114,"context_line":"                                           const.vlan_path})"},{"line_number":115,"context_line":"            if not vp1:"},{"line_number":116,"context_line":"                LOG.debug(\"UCS Manager Network driver quitting. \""},{"line_number":117,"context_line":"                          \"vlanProfile1 %s missing\", const.vlan_path)"},{"line_number":118,"context_line":"                return"},{"line_number":119,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_083bd29c","line":116,"in_reply_to":"1abeadc6_b598eac0","updated":"2014-08-27 09:03:14.000000000","message":"I would like to leave these as debug level comments because they are exposing an internal value (like vlanProfile1 here) that I don\u0027t want exposed as part of a error msg. \n\nAdding error msgs at the top level function.","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"86918390f12dc40819f485e2054dc5733c2e613f","unresolved":false,"context_lines":[{"line_number":119,"context_line":""},{"line_number":120,"context_line":"            #Create a vlan profile with the given vlan_id"},{"line_number":121,"context_line":"            vp2 \u003d handle.AddManagedObject(vp1,"},{"line_number":122,"context_line":"                                          const.FabricVlanClassId,"},{"line_number":123,"context_line":"                                          {const.FabricVlanCompType:"},{"line_number":124,"context_line":"                                           \"included\","},{"line_number":125,"context_line":"                                           const.FabricVlanDN:"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_eb2a557d","line":122,"updated":"2014-08-25 19:41:01.000000000","message":"I maybe wrong, but I still think that you don\u0027t have to redefine the constants that are used in the UcsSdk. You can just refer to self.ucsmsdk.NamingId.FABRIC_VLAN in this particular case. This is true for all the UcsSdk constants being used in this module.","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"81e3ddea8cfce87525ba331e12f453478d022489","unresolved":false,"context_lines":[{"line_number":119,"context_line":""},{"line_number":120,"context_line":"            #Create a vlan profile with the given vlan_id"},{"line_number":121,"context_line":"            vp2 \u003d handle.AddManagedObject(vp1,"},{"line_number":122,"context_line":"                                          const.FabricVlanClassId,"},{"line_number":123,"context_line":"                                          {const.FabricVlanCompType:"},{"line_number":124,"context_line":"                                           \"included\","},{"line_number":125,"context_line":"                                           const.FabricVlanDN:"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_faec8f2b","line":122,"in_reply_to":"1abeadc6_e8e9361b","updated":"2014-08-27 12:18:26.000000000","message":"I do think that it needs to be changed. If you are worried about readability, for each constant you used, you can do the following in this class:\n    @property\n    def FABRIC_VLAN(self):\n        return self.ucsmsdk.NamingId.FABRIC_VLAN\n\nyou can then just use self.FABRIC_VLAN.","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"930acfe39b6518681cdd2f2ace88d522d65e332c","unresolved":false,"context_lines":[{"line_number":119,"context_line":""},{"line_number":120,"context_line":"            #Create a vlan profile with the given vlan_id"},{"line_number":121,"context_line":"            vp2 \u003d handle.AddManagedObject(vp1,"},{"line_number":122,"context_line":"                                          const.FabricVlanClassId,"},{"line_number":123,"context_line":"                                          {const.FabricVlanCompType:"},{"line_number":124,"context_line":"                                           \"included\","},{"line_number":125,"context_line":"                                           const.FabricVlanDN:"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_e8e9361b","line":122,"in_reply_to":"1abeadc6_eb2a557d","updated":"2014-08-27 09:03:14.000000000","message":"Agreed. I had stayed away from this format because each parameter was extremely long and it was becoming hard for me to debug any issues I found in this portion of the code. Any other method I tried, caused pep8 errors. I think it might also -ively affect readability of this code.\n\nNow that the code if more baked, I could go back to using this method. Please reply to this comment if you still want this changed.","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"b72183dceb22fcb679294f1ad33985c062f9c323","unresolved":false,"context_lines":[{"line_number":132,"context_line":"                                           const.FabricVlanName: vlan_name,"},{"line_number":133,"context_line":"                                           const.FabricVlanDefNet: \"no\"})"},{"line_number":134,"context_line":"            if not vp2:"},{"line_number":135,"context_line":"                LOG.debug(\"UCS Manager Network driver quitting. \""},{"line_number":136,"context_line":"                          \"vlanProfile2 %s missing\", vlan_profileDN)"},{"line_number":137,"context_line":"                return"},{"line_number":138,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_f58ee277","line":135,"updated":"2014-08-23 14:12:03.000000000","message":"ditto","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"930acfe39b6518681cdd2f2ace88d522d65e332c","unresolved":false,"context_lines":[{"line_number":132,"context_line":"                                           const.FabricVlanName: vlan_name,"},{"line_number":133,"context_line":"                                           const.FabricVlanDefNet: \"no\"})"},{"line_number":134,"context_line":"            if not vp2:"},{"line_number":135,"context_line":"                LOG.debug(\"UCS Manager Network driver quitting. \""},{"line_number":136,"context_line":"                          \"vlanProfile2 %s missing\", vlan_profileDN)"},{"line_number":137,"context_line":"                return"},{"line_number":138,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_1e422810","line":135,"in_reply_to":"1abeadc6_f58ee277","updated":"2014-08-27 09:03:14.000000000","message":"See reply above.","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"b72183dceb22fcb679294f1ad33985c062f9c323","unresolved":false,"context_lines":[{"line_number":139,"context_line":"            LOG.debug(\"UCS Manager Network driver created vlan_profile with \""},{"line_number":140,"context_line":"                      \"%s\", vlan_profileDN)"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"        except Exception as e:"},{"line_number":143,"context_line":"            # Raise a Neutron exception. Include a description of"},{"line_number":144,"context_line":"            # the original  exception."},{"line_number":145,"context_line":"            raise cexc.UcsmConfigFailed(config\u003dvlan_name,"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_35ecda29","line":142,"updated":"2014-08-23 14:12:03.000000000","message":"handle specific exceptions if at all possible. check all in changeset.","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"930acfe39b6518681cdd2f2ace88d522d65e332c","unresolved":false,"context_lines":[{"line_number":139,"context_line":"            LOG.debug(\"UCS Manager Network driver created vlan_profile with \""},{"line_number":140,"context_line":"                      \"%s\", vlan_profileDN)"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"        except Exception as e:"},{"line_number":143,"context_line":"            # Raise a Neutron exception. Include a description of"},{"line_number":144,"context_line":"            # the original  exception."},{"line_number":145,"context_line":"            raise cexc.UcsmConfigFailed(config\u003dvlan_name,"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_f4a83279","line":142,"in_reply_to":"1abeadc6_35ecda29","updated":"2014-08-27 09:03:14.000000000","message":"No specific exceptions raised by UCS Manager sdk until current release.","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"b72183dceb22fcb679294f1ad33985c062f9c323","unresolved":false,"context_lines":[{"line_number":164,"context_line":"                                                {const.VnicIntProfileDn:"},{"line_number":165,"context_line":"                                                 port_profileDN})"},{"line_number":166,"context_line":"            if not p_profile:"},{"line_number":167,"context_line":"                LOG.debug(\"UCS Manager Network driver quitting. \""},{"line_number":168,"context_line":"                          \"port_profile %s missing\", port_profileDN)"},{"line_number":169,"context_line":"                return"},{"line_number":170,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_75f2d206","line":167,"updated":"2014-08-23 14:12:03.000000000","message":"level?","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"930acfe39b6518681cdd2f2ace88d522d65e332c","unresolved":false,"context_lines":[{"line_number":164,"context_line":"                                                {const.VnicIntProfileDn:"},{"line_number":165,"context_line":"                                                 port_profileDN})"},{"line_number":166,"context_line":"            if not p_profile:"},{"line_number":167,"context_line":"                LOG.debug(\"UCS Manager Network driver quitting. \""},{"line_number":168,"context_line":"                          \"port_profile %s missing\", port_profileDN)"},{"line_number":169,"context_line":"                return"},{"line_number":170,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_5e4bc02a","line":167,"in_reply_to":"1abeadc6_75f2d206","updated":"2014-08-27 09:03:14.000000000","message":"See reply above.","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"b72183dceb22fcb679294f1ad33985c062f9c323","unresolved":false,"context_lines":[{"line_number":221,"context_line":"                                                  const.port_profilesetDN})"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"            if not portProfile:"},{"line_number":224,"context_line":"                LOG.debug(\"UCS Manager Network driver quitting. \""},{"line_number":225,"context_line":"                          \"portProfilesetDN %s missing\","},{"line_number":226,"context_line":"                          const.port_profilesetDN)"},{"line_number":227,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_f5e50238","line":224,"updated":"2014-08-23 14:12:03.000000000","message":"level? Here and others where we are \u0027quitting\u0027","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"930acfe39b6518681cdd2f2ace88d522d65e332c","unresolved":false,"context_lines":[{"line_number":221,"context_line":"                                                  const.port_profilesetDN})"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"            if not portProfile:"},{"line_number":224,"context_line":"                LOG.debug(\"UCS Manager Network driver quitting. \""},{"line_number":225,"context_line":"                          \"portProfilesetDN %s missing\","},{"line_number":226,"context_line":"                          const.port_profilesetDN)"},{"line_number":227,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_9e5558c8","line":224,"in_reply_to":"1abeadc6_f5e50238","updated":"2014-08-27 09:03:14.000000000","message":"See reply above.","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"29ccbefdce24fd7f8f993b0022674ab8272fc3de","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            self.ucsmsdk \u003d self._import_ucsmsdk()"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        if not self.ucsmsdk:"},{"line_number":70,"context_line":"            LOG.debug(\"UCS Manager Network driver UCSSDK NOT found\")"},{"line_number":71,"context_line":"            return None"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        handle \u003d self.ucsmsdk.UcsHandle()"}],"source_content_type":"text/x-python","patch_set":14,"id":"1abeadc6_2cdec26d","line":70,"updated":"2014-08-27 20:51:05.000000000","message":"Nit: So you\u0027re displaying a debug level message here, and an error level message higher up, with the reasoning that you don\u0027t want to expose some internals in error messages?\n\nWhat\u0027s the concern with exposing vlan #s in the log? Is this something that admins should not see? I guess I\u0027m wondering if the information being protected, is worth double the logging.","commit_id":"e0533cf083d268c69dc27cd0a02b4439c2c11d81"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"a368027a51986c0526c9d4779545a4798931ee6e","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            self.ucsmsdk \u003d self._import_ucsmsdk()"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        if not self.ucsmsdk:"},{"line_number":70,"context_line":"            LOG.debug(\"UCS Manager Network driver UCSSDK NOT found\")"},{"line_number":71,"context_line":"            return None"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        handle \u003d self.ucsmsdk.UcsHandle()"}],"source_content_type":"text/x-python","patch_set":14,"id":"1abeadc6_0c01066a","line":70,"in_reply_to":"1abeadc6_2cdec26d","updated":"2014-08-28 09:22:14.000000000","message":"Displaying vlan_id is not an issue. I was more concerned about vlan_profileDN, port_profileDN which are locally generated paths that refer to paths in UCS Manager . If such fields are OK to be displayed in an error log, I am fine converting these to error logs instead of debug logs. I am not sure if these values are protected, so erring on the side of caution.","commit_id":"e0533cf083d268c69dc27cd0a02b4439c2c11d81"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"84a4e801b3a2791a24b3e4fa85eb99b484496414","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        handle \u003d self.ucsmsdk.UcsHandle()"},{"line_number":75,"context_line":"        try:"},{"line_number":76,"context_line":"            handle.Login(self.ucsm_ip, self.username, self.password)"},{"line_number":77,"context_line":"            self.handles[self.ucsm_ip] \u003d handle"},{"line_number":78,"context_line":"        except Exception as e:"},{"line_number":79,"context_line":"            # Raise a Neutron exception. Include a description of"},{"line_number":80,"context_line":"            # the original  exception."}],"source_content_type":"text/x-python","patch_set":15,"id":"1abeadc6_6855f04e","line":77,"updated":"2014-08-28 11:47:53.000000000","message":"Not sure why this dict is needed given how this driver is operated: connect, transaction, disconnect in a single thread. It\u0027s not going to be useful even later when multiple ucsms are supported.","commit_id":"f9a1faeb7b0aebad2d55a5a9a14503db970afdd4"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"d9adba83d2b74daf23574bc9e9ca8978a8934591","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        handle \u003d self.ucsmsdk.UcsHandle()"},{"line_number":75,"context_line":"        try:"},{"line_number":76,"context_line":"            handle.Login(self.ucsm_ip, self.username, self.password)"},{"line_number":77,"context_line":"            self.handles[self.ucsm_ip] \u003d handle"},{"line_number":78,"context_line":"        except Exception as e:"},{"line_number":79,"context_line":"            # Raise a Neutron exception. Include a description of"},{"line_number":80,"context_line":"            # the original  exception."}],"source_content_type":"text/x-python","patch_set":15,"id":"1abeadc6_8d14194e","line":77,"in_reply_to":"1abeadc6_6855f04e","updated":"2014-08-29 08:14:59.000000000","message":"I had it originally in place to support connections to multiple UCS managers. But the rest of the code is written for a single UCS Manager cloud. I let it remain since there would be just 1 entry in this dict.","commit_id":"f9a1faeb7b0aebad2d55a5a9a14503db970afdd4"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"84a4e801b3a2791a24b3e4fa85eb99b484496414","unresolved":false,"context_lines":[{"line_number":80,"context_line":"            # the original  exception."},{"line_number":81,"context_line":"            raise cexc.UcsmConnectFailed(ucsm_ip\u003dself.ucsm_ip, exc\u003de)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        return self.handles[self.ucsm_ip]"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def get_all_portprofiles(self):"},{"line_number":86,"context_line":"        \"\"\"Gets all port profiles from a specific UCS Manager.\"\"\""}],"source_content_type":"text/x-python","patch_set":15,"id":"1abeadc6_a31acb6c","line":83,"updated":"2014-08-28 11:47:53.000000000","message":"a handle is returned here. So it should be used in the caller. Otherwise, it can just return True. \n\nAgain, given how the driver is operated, the handle should be passed between the methods.","commit_id":"f9a1faeb7b0aebad2d55a5a9a14503db970afdd4"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"d9adba83d2b74daf23574bc9e9ca8978a8934591","unresolved":false,"context_lines":[{"line_number":80,"context_line":"            # the original  exception."},{"line_number":81,"context_line":"            raise cexc.UcsmConnectFailed(ucsm_ip\u003dself.ucsm_ip, exc\u003de)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        return self.handles[self.ucsm_ip]"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def get_all_portprofiles(self):"},{"line_number":86,"context_line":"        \"\"\"Gets all port profiles from a specific UCS Manager.\"\"\""}],"source_content_type":"text/x-python","patch_set":15,"id":"1abeadc6_30c8ba21","line":83,"in_reply_to":"1abeadc6_a31acb6c","updated":"2014-08-29 08:14:59.000000000","message":"Please check latest patch set if you are ok with the changes.","commit_id":"f9a1faeb7b0aebad2d55a5a9a14503db970afdd4"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"84a4e801b3a2791a24b3e4fa85eb99b484496414","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        # If not, reconnect."},{"line_number":109,"context_line":"        handle \u003d self.handles[self.ucsm_ip]"},{"line_number":110,"context_line":"        if not handle:"},{"line_number":111,"context_line":"            handle \u003d self.ucs_manager_connect()"},{"line_number":112,"context_line":"        try:"},{"line_number":113,"context_line":"            handle.StartTransaction()"},{"line_number":114,"context_line":"            vp1 \u003d handle.GetManagedObject(None,"}],"source_content_type":"text/x-python","patch_set":15,"id":"1abeadc6_4838343d","line":111,"updated":"2014-08-28 11:47:53.000000000","message":"Not sure why this is needed based on the call flow.  I seems that every operation is following \u0027connect transaction disconnect\u0027 model. If the above \u0027if\u0027 is met, a connect is made, but no corresponding disconnect would occur.\n\nFrom what I see, if \u0027connect\u0027 fails, it wouldn\u0027t make it here.","commit_id":"f9a1faeb7b0aebad2d55a5a9a14503db970afdd4"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"d9adba83d2b74daf23574bc9e9ca8978a8934591","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        # If not, reconnect."},{"line_number":109,"context_line":"        handle \u003d self.handles[self.ucsm_ip]"},{"line_number":110,"context_line":"        if not handle:"},{"line_number":111,"context_line":"            handle \u003d self.ucs_manager_connect()"},{"line_number":112,"context_line":"        try:"},{"line_number":113,"context_line":"            handle.StartTransaction()"},{"line_number":114,"context_line":"            vp1 \u003d handle.GetManagedObject(None,"}],"source_content_type":"text/x-python","patch_set":15,"id":"1abeadc6_70095283","line":111,"in_reply_to":"1abeadc6_4838343d","updated":"2014-08-29 08:14:59.000000000","message":"This was done based on an earlier review comment I received. What the comment suggested was that, after a successful connect, if the handle becomes invalid/stale for some reason, then we should try to reconnect.\n\nhandle is a cached connection handle and there is not way to detect if it is valid or not until it is used to actually perform an operation.\n\nRemoving this check in the latest patch set.","commit_id":"f9a1faeb7b0aebad2d55a5a9a14503db970afdd4"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"84a4e801b3a2791a24b3e4fa85eb99b484496414","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        # If not, reconnect."},{"line_number":161,"context_line":"        handle \u003d self.handles[self.ucsm_ip]"},{"line_number":162,"context_line":"        if not handle:"},{"line_number":163,"context_line":"            handle \u003d self.ucs_manager_connect()"},{"line_number":164,"context_line":"        try:"},{"line_number":165,"context_line":"            handle.StartTransaction()"},{"line_number":166,"context_line":"            p_profile \u003d handle.GetManagedObject("}],"source_content_type":"text/x-python","patch_set":15,"id":"1abeadc6_883dec2d","line":163,"updated":"2014-08-28 11:47:53.000000000","message":"ditto","commit_id":"f9a1faeb7b0aebad2d55a5a9a14503db970afdd4"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"d9adba83d2b74daf23574bc9e9ca8978a8934591","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        # If not, reconnect."},{"line_number":161,"context_line":"        handle \u003d self.handles[self.ucsm_ip]"},{"line_number":162,"context_line":"        if not handle:"},{"line_number":163,"context_line":"            handle \u003d self.ucs_manager_connect()"},{"line_number":164,"context_line":"        try:"},{"line_number":165,"context_line":"            handle.StartTransaction()"},{"line_number":166,"context_line":"            p_profile \u003d handle.GetManagedObject("}],"source_content_type":"text/x-python","patch_set":15,"id":"1abeadc6_d0094632","line":163,"in_reply_to":"1abeadc6_883dec2d","updated":"2014-08-29 08:14:59.000000000","message":"See response above.","commit_id":"f9a1faeb7b0aebad2d55a5a9a14503db970afdd4"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"84a4e801b3a2791a24b3e4fa85eb99b484496414","unresolved":false,"context_lines":[{"line_number":215,"context_line":"        # Check if the connection handle is still valid."},{"line_number":216,"context_line":"        # If not, reconnect."},{"line_number":217,"context_line":"        if not handle:"},{"line_number":218,"context_line":"            handle \u003d self.ucs_manager_connect()"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"        try:"},{"line_number":221,"context_line":"            handle.StartTransaction()"}],"source_content_type":"text/x-python","patch_set":15,"id":"1abeadc6_a84628be","line":218,"updated":"2014-08-28 11:47:53.000000000","message":"ditto","commit_id":"f9a1faeb7b0aebad2d55a5a9a14503db970afdd4"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"d9adba83d2b74daf23574bc9e9ca8978a8934591","unresolved":false,"context_lines":[{"line_number":215,"context_line":"        # Check if the connection handle is still valid."},{"line_number":216,"context_line":"        # If not, reconnect."},{"line_number":217,"context_line":"        if not handle:"},{"line_number":218,"context_line":"            handle \u003d self.ucs_manager_connect()"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"        try:"},{"line_number":221,"context_line":"            handle.StartTransaction()"}],"source_content_type":"text/x-python","patch_set":15,"id":"1abeadc6_19957e32","line":218,"in_reply_to":"1abeadc6_a84628be","updated":"2014-08-29 08:14:59.000000000","message":"Done","commit_id":"f9a1faeb7b0aebad2d55a5a9a14503db970afdd4"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"84a4e801b3a2791a24b3e4fa85eb99b484496414","unresolved":false,"context_lines":[{"line_number":303,"context_line":"            return True"},{"line_number":304,"context_line":"        finally:"},{"line_number":305,"context_line":"            # Disconnect from UCS Manager"},{"line_number":306,"context_line":"            self.driver.ucs_manager_disconnect()"},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"    def ucs_manager_disconnect(self):"},{"line_number":309,"context_line":"        \"\"\"Disconnects from the UCS Manager."}],"source_content_type":"text/x-python","patch_set":15,"id":"1abeadc6_6821704c","line":306,"updated":"2014-08-28 11:47:53.000000000","message":"driver is not a member. Should just be self.ucs_manager_disconnect()?\n\nalso if connect fails, disconnect is not needed, right?","commit_id":"f9a1faeb7b0aebad2d55a5a9a14503db970afdd4"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"d9adba83d2b74daf23574bc9e9ca8978a8934591","unresolved":false,"context_lines":[{"line_number":303,"context_line":"            return True"},{"line_number":304,"context_line":"        finally:"},{"line_number":305,"context_line":"            # Disconnect from UCS Manager"},{"line_number":306,"context_line":"            self.driver.ucs_manager_disconnect()"},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"    def ucs_manager_disconnect(self):"},{"line_number":309,"context_line":"        \"\"\"Disconnects from the UCS Manager."}],"source_content_type":"text/x-python","patch_set":15,"id":"1abeadc6_6a6b23b9","line":306,"in_reply_to":"1abeadc6_6821704c","updated":"2014-08-29 08:14:59.000000000","message":"Done. But, calling disconnect on a handle that is no longer valid should be fine.","commit_id":"f9a1faeb7b0aebad2d55a5a9a14503db970afdd4"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"96179201a4fa48330c4068e467f3c50bcf1c1a31","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        try:"},{"line_number":107,"context_line":"            handle.StartTransaction()"},{"line_number":108,"context_line":"            vp1 \u003d handle.GetManagedObject(None,"},{"line_number":109,"context_line":"                                          self.ucsmsdk.FabricVlan.ClassId(),"},{"line_number":110,"context_line":"                                          {self.ucsmsdk.FabricLanCloud.DN:"},{"line_number":111,"context_line":"                                           const.VLAN_PATH})"},{"line_number":112,"context_line":"            if not vp1:"}],"source_content_type":"text/x-python","patch_set":17,"id":"1abeadc6_6ea04ef4","line":109,"updated":"2014-08-29 19:50:23.000000000","message":"this is wrong, it should be self.ucsmsdk.FabricLanCloud.ClassId(),","commit_id":"8b1105e25ff88acd645c85540f4101b3a04ccd76"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"519307ca400c211e18bda3067b3a141eb0d145ab","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        try:"},{"line_number":107,"context_line":"            handle.StartTransaction()"},{"line_number":108,"context_line":"            vp1 \u003d handle.GetManagedObject(None,"},{"line_number":109,"context_line":"                                          self.ucsmsdk.FabricVlan.ClassId(),"},{"line_number":110,"context_line":"                                          {self.ucsmsdk.FabricLanCloud.DN:"},{"line_number":111,"context_line":"                                           const.VLAN_PATH})"},{"line_number":112,"context_line":"            if not vp1:"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_12036110","line":109,"in_reply_to":"1abeadc6_6ea04ef4","updated":"2014-08-31 17:03:24.000000000","message":"Done","commit_id":"8b1105e25ff88acd645c85540f4101b3a04ccd76"},{"author":{"_account_id":7987,"name":"Ivar Lazzaro","email":"ivarlazzaro@gmail.com","username":"Ivar"},"change_message_id":"dd8a70a8f9240ed5ce89c4b1d162b334dbda4da8","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"\"\"\""},{"line_number":17,"context_line":"Implements a UCS Manager API client"},{"line_number":18,"context_line":"\"\"\""},{"line_number":19,"context_line":"from oslo.config import cfg"},{"line_number":20,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_1a4e0fc2","line":17,"updated":"2014-09-01 06:18:25.000000000","message":"nit: move in the Class docstring","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"e6512117504ca66d5900b10d53061a10a85d5167","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"\"\"\""},{"line_number":17,"context_line":"Implements a UCS Manager API client"},{"line_number":18,"context_line":"\"\"\""},{"line_number":19,"context_line":"from oslo.config import cfg"},{"line_number":20,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_fa3c8fe4","line":17,"in_reply_to":"fa98f980_1a4e0fc2","updated":"2014-09-02 17:17:31.000000000","message":"Done. Already have Class doctoring so removing this.","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":7987,"name":"Ivar Lazzaro","email":"ivarlazzaro@gmail.com","username":"Ivar"},"change_message_id":"dd8a70a8f9240ed5ce89c4b1d162b334dbda4da8","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        the import can be mocked, allowing unit testing without requiring"},{"line_number":58,"context_line":"        the installation of UcsSdk."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        \"\"\""},{"line_number":61,"context_line":"        return importutils.import_module(\u0027UcsSdk\u0027)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def ucs_manager_connect(self):"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_1a936ffb","line":60,"updated":"2014-09-01 06:18:25.000000000","message":"I have nothing against this approach, so you can safely ignore this comment, but you could also import this normally as an \"external\" module and then mock the module itself in the unit tests.","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"e6512117504ca66d5900b10d53061a10a85d5167","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        the import can be mocked, allowing unit testing without requiring"},{"line_number":58,"context_line":"        the installation of UcsSdk."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        \"\"\""},{"line_number":61,"context_line":"        return importutils.import_module(\u0027UcsSdk\u0027)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def ucs_manager_connect(self):"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_293ffa26","line":60,"in_reply_to":"fa98f980_1a936ffb","updated":"2014-09-02 17:17:31.000000000","message":"Wouldn\u0027t jenkins have a problem with this since it would not know how/what to import?","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":7987,"name":"Ivar Lazzaro","email":"ivarlazzaro@gmail.com","username":"Ivar"},"change_message_id":"5caba515760bf1e24b87c94e3b3d9dbbac1ee2da","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        the import can be mocked, allowing unit testing without requiring"},{"line_number":58,"context_line":"        the installation of UcsSdk."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        \"\"\""},{"line_number":61,"context_line":"        return importutils.import_module(\u0027UcsSdk\u0027)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def ucs_manager_connect(self):"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_6e30dd01","line":60,"in_reply_to":"fa98f980_293ffa26","updated":"2014-09-02 18:39:43.000000000","message":"No because it can be mocked before it ever gets imported. See [0] as a reference (the module is apicapi)\n\n[0] https://github.com/openstack/neutron/blob/master/neutron/tests/unit/ml2/drivers/cisco/apic/test_cisco_apic_mechanism_driver.py","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":7987,"name":"Ivar Lazzaro","email":"ivarlazzaro@gmail.com","username":"Ivar"},"change_message_id":"dd8a70a8f9240ed5ce89c4b1d162b334dbda4da8","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        if not self.ucsmsdk:"},{"line_number":68,"context_line":"            self.ucsmsdk \u003d self._import_ucsmsdk()"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        if not self.ucsmsdk:"},{"line_number":71,"context_line":"            LOG.debug(\"UCS Manager Network driver UCSSDK NOT found\")"},{"line_number":72,"context_line":"            return None"},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_7ac1dbe3","line":70,"updated":"2014-09-01 06:18:25.000000000","message":"isn\u0027t the *import_module* rising an exception if the module is not found?","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"e6512117504ca66d5900b10d53061a10a85d5167","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        if not self.ucsmsdk:"},{"line_number":68,"context_line":"            self.ucsmsdk \u003d self._import_ucsmsdk()"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        if not self.ucsmsdk:"},{"line_number":71,"context_line":"            LOG.debug(\"UCS Manager Network driver UCSSDK NOT found\")"},{"line_number":72,"context_line":"            return None"},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_7d56d9d3","line":70,"in_reply_to":"fa98f980_7ac1dbe3","updated":"2014-09-02 17:17:31.000000000","message":"Done","commit_id":"f0a865fd286364914f30d4d439f06d6127bacade"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"cb974432dc58b26ab035b1903d47526217004a77","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    def _get_all_portprofiles(self, handle):"},{"line_number":79,"context_line":"        \"\"\"Gets all port profiles from a specific UCS Manager.\"\"\""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        # Get mo VnicProfile"},{"line_number":82,"context_line":"        try:"},{"line_number":83,"context_line":"            portProfile \u003d handle.GetManagedObject("},{"line_number":84,"context_line":"                None,"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa98f980_cde8c1e4","line":81,"updated":"2014-09-03 18:47:07.000000000","message":"may be you spell out what mo stands for here, managed object? Unless that is a common abbreviation that I should have known...","commit_id":"aeb18ba9ccd5243a715ea25e846ca079fc5bad13"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"6b855146ddb39bd9e11c7a1a0ce0740125c4b9fc","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    def _get_all_portprofiles(self, handle):"},{"line_number":79,"context_line":"        \"\"\"Gets all port profiles from a specific UCS Manager.\"\"\""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        # Get mo VnicProfile"},{"line_number":82,"context_line":"        try:"},{"line_number":83,"context_line":"            portProfile \u003d handle.GetManagedObject("},{"line_number":84,"context_line":"                None,"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa98f980_6944094a","line":81,"in_reply_to":"fa98f980_cde8c1e4","updated":"2014-09-09 15:44:03.000000000","message":"Yes, it is managed object. Expanding it.","commit_id":"aeb18ba9ccd5243a715ea25e846ca079fc5bad13"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"8e92ea9e89534b8b74f525dc19c2fa279e0a9445","unresolved":false,"context_lines":[{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def _validate_config(self):"},{"line_number":42,"context_line":"        if not cfg.CONF.ml2_cisco_ucsm.get(\u0027ucsm_ip\u0027):"},{"line_number":43,"context_line":"            msg \u003d _(\u0027UCS Manager IP address is not provided\u0027)"},{"line_number":44,"context_line":"            LOG.error(msg)"},{"line_number":45,"context_line":"        if not cfg.CONF.ml2_cisco_ucsm.get(\u0027ucsm_username\u0027):"},{"line_number":46,"context_line":"            msg \u003d _(\u0027UCS Manager username is not provided\u0027)"}],"source_content_type":"text/x-python","patch_set":21,"id":"fa98f980_db151be6","line":43,"updated":"2014-09-10 11:28:08.000000000","message":"Can use _LE() hint here and on L 46.","commit_id":"1210e194c1ef5246d95ab8743d9bc223659f9731"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"8e92ea9e89534b8b74f525dc19c2fa279e0a9445","unresolved":false,"context_lines":[{"line_number":73,"context_line":"            # the original  exception."},{"line_number":74,"context_line":"            raise cexc.UcsmConnectFailed(ucsm_ip\u003dself.ucsm_ip, exc\u003de)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        return self.handles[self.ucsm_ip]"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    def _get_all_portprofiles(self, handle):"},{"line_number":79,"context_line":"        \"\"\"Gets all port profiles from a specific UCS Manager.\"\"\""}],"source_content_type":"text/x-python","patch_set":21,"id":"fa98f980_5b868b14","line":76,"updated":"2014-09-10 11:28:08.000000000","message":"Could be inside try block.","commit_id":"1210e194c1ef5246d95ab8743d9bc223659f9731"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"8e92ea9e89534b8b74f525dc19c2fa279e0a9445","unresolved":false,"context_lines":[{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        # Get Managed Object VnicProfile"},{"line_number":82,"context_line":"        try:"},{"line_number":83,"context_line":"            portProfile \u003d handle.GetManagedObject("},{"line_number":84,"context_line":"                None,"},{"line_number":85,"context_line":"                self.ucsmsdk.VnicProfile.ClassId())"},{"line_number":86,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"fa98f980_1b8c0335","line":83,"updated":"2014-09-10 11:28:08.000000000","message":"nit: Method says it is getting ALL profiles, though the temp variable here implies only one.\n\nAlso, could just return here, and not have temp variable, unless you feel it leads to readability.","commit_id":"1210e194c1ef5246d95ab8743d9bc223659f9731"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"8e92ea9e89534b8b74f525dc19c2fa279e0a9445","unresolved":false,"context_lines":[{"line_number":269,"context_line":"                          \u0027to UCS Manager.\u0027))"},{"line_number":270,"context_line":"            return False"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"        try:"},{"line_number":273,"context_line":"            # Create Vlan Profile"},{"line_number":274,"context_line":"            if not self._create_vlanprofile(handle, vlan_id):"},{"line_number":275,"context_line":"                LOG.error(_LE(\u0027UCS Manager Network driver failed to create \u0027"}],"source_content_type":"text/x-python","patch_set":21,"id":"fa98f980_5b712bdf","line":272,"updated":"2014-09-10 11:28:08.000000000","message":"This really seems awkward. It looks like we are mixing T/R return types and exceptions for handling failures. Also there is double logging, one debug in the create method and then an error message here. Would it make sense to use exceptions in the create routines for failures?  If so, then the exception handler in this try block can display the corresponding error message with a single log message (rather than having individual and similar messages.","commit_id":"1210e194c1ef5246d95ab8743d9bc223659f9731"}],"neutron/tests/unit/ml2/drivers/cisco/ucsm/test_cisco_ucsm_mech.py":[{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"c5da8fea8ebc8fec026d833d9168dfb2a90a883d","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    \"\"\"Port context for testing purposes only.\"\"\""},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    def __init__(self, name, port_id, vnic_type, network_context):"},{"line_number":65,"context_line":"        self._port \u003d {"},{"line_number":66,"context_line":"            \u0027status\u0027: PORT_STATE,"},{"line_number":67,"context_line":"            \u0027id\u0027: port_id,"},{"line_number":68,"context_line":"            \u0027name\u0027: name,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2FHiY%3D","line":65,"updated":"2014-03-09 06:07:31.000000000","message":"I think you will also need the profile in the Port context in order to check for pci_vendor_info.","commit_id":"05e9f7f85e1f5391e383199e273b12d80616bc53"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"6e59fc3a6b6a81827b6459f3bc6fc1c975a9900d","unresolved":false,"context_lines":[{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        def new_ucsm_init(mech_instance):"},{"line_number":102,"context_line":"            mech_instance.driver \u003d importutils.import_object(UCSM_DRIVER)"},{"line_number":103,"context_line":"      "},{"line_number":104,"context_line":"            mech_instance.driver.ucsm_ip \u003d UCSM_IP_ADDRESS"},{"line_number":105,"context_line":"            mech_instance.driver.username \u003d UCSM_USERNAME"},{"line_number":106,"context_line":"            mech_instance.driver.password \u003d UCSM_PASSWORD"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2FT%2Fc%3D","line":103,"updated":"2014-03-06 22:12:32.000000000","message":"spaces on line. pep8 should have caught this. \nrun \"tox -epep8\"","commit_id":"05e9f7f85e1f5391e383199e273b12d80616bc53"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"6e59fc3a6b6a81827b6459f3bc6fc1c975a9900d","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        port_id \u003d PORT_ID"},{"line_number":121,"context_line":"        vnic_type \u003d VNIC_DIRECT"},{"line_number":122,"context_line":"        network_context \u003d FakeNetworkContext(vlan_id)"},{"line_number":123,"context_line":"        port_context \u003d FakePortContext(name, port_id, vnic_type, "},{"line_number":124,"context_line":"                                       network_context)"},{"line_number":125,"context_line":"        "},{"line_number":126,"context_line":"        return port_context"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2FT%2FI%3D","line":123,"updated":"2014-03-06 22:12:32.000000000","message":"space at end of line","commit_id":"05e9f7f85e1f5391e383199e273b12d80616bc53"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"6e59fc3a6b6a81827b6459f3bc6fc1c975a9900d","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        network_context \u003d FakeNetworkContext(vlan_id)"},{"line_number":123,"context_line":"        port_context \u003d FakePortContext(name, port_id, vnic_type, "},{"line_number":124,"context_line":"                                       network_context)"},{"line_number":125,"context_line":"        "},{"line_number":126,"context_line":"        return port_context"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    def test_create_port(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2FT%2FE%3D","line":125,"updated":"2014-03-06 22:12:32.000000000","message":"spaces","commit_id":"05e9f7f85e1f5391e383199e273b12d80616bc53"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"6e59fc3a6b6a81827b6459f3bc6fc1c975a9900d","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        "},{"line_number":126,"context_line":"        return port_context"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    def test_create_port(self):"},{"line_number":129,"context_line":"        port_context \u003d self._create_port_context()"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        self._ucsm_mech_driver.create_port_precommit(port_context)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2FT%2Bc%3D","line":128,"updated":"2014-03-06 22:12:32.000000000","message":"OK. Now that I\u0027m at the bottom I can tell this file isn\u0027t ready yet.","commit_id":"05e9f7f85e1f5391e383199e273b12d80616bc53"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"439020ed117e801a5052ea7a7f0b8c4d31127762","unresolved":false,"context_lines":[{"line_number":211,"context_line":"    def test_parse_pci_vendor_config(self):"},{"line_number":212,"context_line":"        vendor1 \u003d \u00271111\u0027"},{"line_number":213,"context_line":"        vendor2 \u003d \u00278086:10c9\u0027"},{"line_number":214,"context_line":"        assert vendor1 not in self.mech_driver.supported_vendor_info"},{"line_number":215,"context_line":"        assert vendor2 in self.mech_driver.supported_vendor_info"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    def test_check_vnic_type_and_vendor_info1(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_a9376dfd","line":214,"updated":"2014-08-06 19:04:57.000000000","message":"use unittest asserts... self.assertNotIn(), self.assertIn()","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"bfb5e500d13dfb017a123cf95ef3271c0176310b","unresolved":false,"context_lines":[{"line_number":211,"context_line":"    def test_parse_pci_vendor_config(self):"},{"line_number":212,"context_line":"        vendor1 \u003d \u00271111\u0027"},{"line_number":213,"context_line":"        vendor2 \u003d \u00278086:10c9\u0027"},{"line_number":214,"context_line":"        assert vendor1 not in self.mech_driver.supported_vendor_info"},{"line_number":215,"context_line":"        assert vendor2 in self.mech_driver.supported_vendor_info"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"    def test_check_vnic_type_and_vendor_info1(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_7a921c59","line":214,"in_reply_to":"baada198_a9376dfd","updated":"2014-08-08 22:01:07.000000000","message":"Done","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"439020ed117e801a5052ea7a7f0b8c4d31127762","unresolved":false,"context_lines":[{"line_number":218,"context_line":"        port_context \u003d self._create_port_context1()"},{"line_number":219,"context_line":"        supported \u003d self.mech_driver._check_vnic_type_and_vendor_info("},{"line_number":220,"context_line":"            port_context)"},{"line_number":221,"context_line":"        self.assertTrue(supported, msg\u003dNone)"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"    def test_check_vnic_type_and_vendor_info2(self):"},{"line_number":224,"context_line":"        port_context \u003d self._create_port_context2()"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_94255caf","line":221,"updated":"2014-08-06 19:04:57.000000000","message":"Can omit the msg arg. Same for several below.","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"bfb5e500d13dfb017a123cf95ef3271c0176310b","unresolved":false,"context_lines":[{"line_number":218,"context_line":"        port_context \u003d self._create_port_context1()"},{"line_number":219,"context_line":"        supported \u003d self.mech_driver._check_vnic_type_and_vendor_info("},{"line_number":220,"context_line":"            port_context)"},{"line_number":221,"context_line":"        self.assertTrue(supported, msg\u003dNone)"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"    def test_check_vnic_type_and_vendor_info2(self):"},{"line_number":224,"context_line":"        port_context \u003d self._create_port_context2()"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_ba983477","line":221,"in_reply_to":"baada198_94255caf","updated":"2014-08-08 22:01:07.000000000","message":"Done","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"439020ed117e801a5052ea7a7f0b8c4d31127762","unresolved":false,"context_lines":[{"line_number":224,"context_line":"        port_context \u003d self._create_port_context2()"},{"line_number":225,"context_line":"        supported \u003d self.mech_driver._check_vnic_type_and_vendor_info("},{"line_number":226,"context_line":"            port_context)"},{"line_number":227,"context_line":"        self.assertEqual(supported, False)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    def test_check_vnic_type_and_vendor_info3(self):"},{"line_number":230,"context_line":"        port_context \u003d self._create_port_context3()"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_f435b8dc","line":227,"updated":"2014-08-06 19:04:57.000000000","message":"self.assertFalse(supported), same for several below.","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"bfb5e500d13dfb017a123cf95ef3271c0176310b","unresolved":false,"context_lines":[{"line_number":224,"context_line":"        port_context \u003d self._create_port_context2()"},{"line_number":225,"context_line":"        supported \u003d self.mech_driver._check_vnic_type_and_vendor_info("},{"line_number":226,"context_line":"            port_context)"},{"line_number":227,"context_line":"        self.assertEqual(supported, False)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    def test_check_vnic_type_and_vendor_info3(self):"},{"line_number":230,"context_line":"        port_context \u003d self._create_port_context3()"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_d5e859a9","line":227,"in_reply_to":"baada198_f435b8dc","updated":"2014-08-08 22:01:07.000000000","message":"Done","commit_id":"dd1caf7004d8b492c44debe1f817f0dcef28af74"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"e658c4813b9db4d4f753384f64cd937a72f0da3e","unresolved":false,"context_lines":[{"line_number":128,"context_line":""},{"line_number":129,"context_line":"class TestCiscoUcsmMechDriver(base.BaseTestCase,"},{"line_number":130,"context_line":"                              mocked.ConfigMixin):"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    \"\"\"Unit tests for Cisco ML2 UCS Manager MD.\"\"\""},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_5ba4f04b","line":131,"updated":"2014-08-13 11:56:50.000000000","message":"missing tests for pre-commit and post-commit methods","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"dfa8852f53f86af63b26a525416e68240a7b4d25","unresolved":false,"context_lines":[{"line_number":128,"context_line":""},{"line_number":129,"context_line":"class TestCiscoUcsmMechDriver(base.BaseTestCase,"},{"line_number":130,"context_line":"                              mocked.ConfigMixin):"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    \"\"\"Unit tests for Cisco ML2 UCS Manager MD.\"\"\""},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"7ac7a964_f07b2727","line":131,"updated":"2014-08-14 12:49:29.000000000","message":"still missing tests for pre and post commit methods","commit_id":"7a300e17d9c420c64e0949de75a8d0a374bb4216"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"f079ee091d7d4a7651fb212d05964cad1312e294","unresolved":false,"context_lines":[{"line_number":128,"context_line":""},{"line_number":129,"context_line":"class TestCiscoUcsmMechDriver(base.BaseTestCase,"},{"line_number":130,"context_line":"                              mocked.ConfigMixin):"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    \"\"\"Unit tests for Cisco ML2 UCS Manager MD.\"\"\""},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1abeadc6_989cacc2","line":131,"in_reply_to":"7ac7a964_f07b2727","updated":"2014-08-19 12:37:39.000000000","message":"Done","commit_id":"7a300e17d9c420c64e0949de75a8d0a374bb4216"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"4e78b692647b4e7a42390e4e03c5d942fed18aee","unresolved":false,"context_lines":[{"line_number":258,"context_line":""},{"line_number":259,"context_line":"        self.mech_driver.update_port_precommit(port_context)"},{"line_number":260,"context_line":"        p_profile \u003d self.db.get_port_profile_for_vlan(VLAN_ID_1)"},{"line_number":261,"context_line":"        self.assertEqual(p_profile, profile_name)"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"    def test_update_port_postcommit(self):"},{"line_number":264,"context_line":"        name \u003d PORT_NAME"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_9440ab35","line":261,"updated":"2014-08-21 01:06:37.000000000","message":"nit: should have expected first, actual second.","commit_id":"788083891e2a4a00dfbbb2b72b1dbc6c707327f0"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"38c3b53860325262bd0fd808e1c69df6009964ad","unresolved":false,"context_lines":[{"line_number":258,"context_line":""},{"line_number":259,"context_line":"        self.mech_driver.update_port_precommit(port_context)"},{"line_number":260,"context_line":"        p_profile \u003d self.db.get_port_profile_for_vlan(VLAN_ID_1)"},{"line_number":261,"context_line":"        self.assertEqual(p_profile, profile_name)"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"    def test_update_port_postcommit(self):"},{"line_number":264,"context_line":"        name \u003d PORT_NAME"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_8bfda6b3","line":261,"in_reply_to":"1abeadc6_9440ab35","updated":"2014-08-22 16:56:54.000000000","message":"Done","commit_id":"788083891e2a4a00dfbbb2b72b1dbc6c707327f0"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"4e78b692647b4e7a42390e4e03c5d942fed18aee","unresolved":false,"context_lines":[{"line_number":270,"context_line":"        port_context \u003d FakePortContext(name, port_id, vnic_type,"},{"line_number":271,"context_line":"                                       profile, network_context)"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"        self.mech_driver.update_port_postcommit(port_context)"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"    def test_bind_port(self):"},{"line_number":276,"context_line":"        name \u003d PORT_NAME"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_547293ad","line":273,"updated":"2014-08-21 01:06:37.000000000","message":"What\u0027s being tested/asserted for this test case?","commit_id":"788083891e2a4a00dfbbb2b72b1dbc6c707327f0"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"38c3b53860325262bd0fd808e1c69df6009964ad","unresolved":false,"context_lines":[{"line_number":270,"context_line":"        port_context \u003d FakePortContext(name, port_id, vnic_type,"},{"line_number":271,"context_line":"                                       profile, network_context)"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"        self.mech_driver.update_port_postcommit(port_context)"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"    def test_bind_port(self):"},{"line_number":276,"context_line":"        name \u003d PORT_NAME"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_0b299636","line":273,"in_reply_to":"1abeadc6_547293ad","updated":"2014-08-22 16:56:54.000000000","message":"Done","commit_id":"788083891e2a4a00dfbbb2b72b1dbc6c707327f0"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"b72183dceb22fcb679294f1ad33985c062f9c323","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        network_context \u003d FakeNetworkContext(segment)"},{"line_number":167,"context_line":"        return network_context"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def _create_port_context1(self):"},{"line_number":170,"context_line":"        \"\"\"Creates port context with valid VM-FEX vendor info.\"\"\""},{"line_number":171,"context_line":"        name \u003d PORT_NAME"},{"line_number":172,"context_line":"        port_id \u003d PORT_ID"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_f56a627f","line":169,"updated":"2014-08-23 14:12:03.000000000","message":"May want to have method name indicate what it does, rather than, 1,2,3...","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"930acfe39b6518681cdd2f2ace88d522d65e332c","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        network_context \u003d FakeNetworkContext(segment)"},{"line_number":167,"context_line":"        return network_context"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def _create_port_context1(self):"},{"line_number":170,"context_line":"        \"\"\"Creates port context with valid VM-FEX vendor info.\"\"\""},{"line_number":171,"context_line":"        name \u003d PORT_NAME"},{"line_number":172,"context_line":"        port_id \u003d PORT_ID"}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_7e84fcb0","line":169,"in_reply_to":"1abeadc6_f56a627f","updated":"2014-08-27 09:03:14.000000000","message":"Done","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"b72183dceb22fcb679294f1ad33985c062f9c323","unresolved":false,"context_lines":[{"line_number":224,"context_line":"            port_context)"},{"line_number":225,"context_line":"        self.assertTrue(supported)"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"    def test_check_vnic_type_and_vendor_info2(self):"},{"line_number":228,"context_line":"        \"\"\"Verifies unsupported pci vendor is rejected.\"\"\""},{"line_number":229,"context_line":"        port_context \u003d self._create_port_context2()"},{"line_number":230,"context_line":"        supported \u003d self.mech_driver._check_vnic_type_and_vendor_info("}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_750e52e6","line":227,"updated":"2014-08-23 14:12:03.000000000","message":"Ditto on naming. May also want to indicate \"failure\" in the name, so we know it is a negative test. For example:\n\n    test_unsupported_pci_vendor_check_fails()\n\nSame on others in this file. Remember that besides verifying functionality and coverage, the UTs provide a form of documentation.","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"930acfe39b6518681cdd2f2ace88d522d65e332c","unresolved":false,"context_lines":[{"line_number":224,"context_line":"            port_context)"},{"line_number":225,"context_line":"        self.assertTrue(supported)"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"    def test_check_vnic_type_and_vendor_info2(self):"},{"line_number":228,"context_line":"        \"\"\"Verifies unsupported pci vendor is rejected.\"\"\""},{"line_number":229,"context_line":"        port_context \u003d self._create_port_context2()"},{"line_number":230,"context_line":"        supported \u003d self.mech_driver._check_vnic_type_and_vendor_info("}],"source_content_type":"text/x-python","patch_set":13,"id":"1abeadc6_21a6e910","line":227,"in_reply_to":"1abeadc6_750e52e6","updated":"2014-08-27 09:03:14.000000000","message":"Done","commit_id":"df6e20643c37c5873d40b802a7c64f9a1602b53c"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"29ccbefdce24fd7f8f993b0022674ab8272fc3de","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        network_context \u003d FakeNetworkContext(segment)"},{"line_number":167,"context_line":"        return network_context"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def _create_port_context1(self):"},{"line_number":170,"context_line":"        \"\"\"Creates port context with valid VM-FEX vendor info.\"\"\""},{"line_number":171,"context_line":"        name \u003d PORT_NAME"},{"line_number":172,"context_line":"        port_id \u003d PORT_ID"}],"source_content_type":"text/x-python","patch_set":14,"id":"1abeadc6_8c2ef68a","line":169,"updated":"2014-08-27 20:51:05.000000000","message":"Don\u0027t see renaming , as suggested in version 13 for these test methods.","commit_id":"e0533cf083d268c69dc27cd0a02b4439c2c11d81"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"a368027a51986c0526c9d4779545a4798931ee6e","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        network_context \u003d FakeNetworkContext(segment)"},{"line_number":167,"context_line":"        return network_context"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def _create_port_context1(self):"},{"line_number":170,"context_line":"        \"\"\"Creates port context with valid VM-FEX vendor info.\"\"\""},{"line_number":171,"context_line":"        name \u003d PORT_NAME"},{"line_number":172,"context_line":"        port_id \u003d PORT_ID"}],"source_content_type":"text/x-python","patch_set":14,"id":"1abeadc6_cc7f0edf","line":169,"in_reply_to":"1abeadc6_8c2ef68a","updated":"2014-08-28 09:22:14.000000000","message":"Oops. I had made the changes, but forgot to do the git add again before commit.Apologies..next update will have these fixed.","commit_id":"e0533cf083d268c69dc27cd0a02b4439c2c11d81"}],"setup.cfg":[{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"802cc62037eabd5185e41ada230f57ebbc36a6e7","unresolved":false,"context_lines":[{"line_number":171,"context_line":"    brocade \u003d neutron.plugins.ml2.drivers.brocade.mechanism_brocade:BrocadeMechanism"},{"line_number":172,"context_line":"    fslsdn \u003d neutron.plugins.ml2.drivers.mechanism_fslsdn:FslsdnMechanismDriver"},{"line_number":173,"context_line":"    sriovnicswitch \u003d neutron.plugins.ml2.drivers.mech_sriov.mech_driver:SriovNicSwitchMechanismDriver"},{"line_number":174,"context_line":"    cisco_ucsm \u003d neutron.plugins.ml2.drivers.cisco.ucsm.mech_cisco_ucsm:CiscoUcsmMechanismDriver"},{"line_number":175,"context_line":"neutron.openstack.common.cache.backends \u003d"},{"line_number":176,"context_line":"    memory \u003d neutron.openstack.common.cache._backends.memory:MemoryBackend"},{"line_number":177,"context_line":"# These are for backwards compat with Icehouse notification_driver configuration values"}],"source_content_type":"text/x-ttcn-cfg","patch_set":5,"id":"baada198_46566106","line":174,"updated":"2014-08-08 23:50:41.000000000","message":"can you move this up to the other cisco_ definitions.","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"},{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"989ac82b518ae73551e39a9e422cb21483a872d1","unresolved":false,"context_lines":[{"line_number":171,"context_line":"    brocade \u003d neutron.plugins.ml2.drivers.brocade.mechanism_brocade:BrocadeMechanism"},{"line_number":172,"context_line":"    fslsdn \u003d neutron.plugins.ml2.drivers.mechanism_fslsdn:FslsdnMechanismDriver"},{"line_number":173,"context_line":"    sriovnicswitch \u003d neutron.plugins.ml2.drivers.mech_sriov.mech_driver:SriovNicSwitchMechanismDriver"},{"line_number":174,"context_line":"    cisco_ucsm \u003d neutron.plugins.ml2.drivers.cisco.ucsm.mech_cisco_ucsm:CiscoUcsmMechanismDriver"},{"line_number":175,"context_line":"neutron.openstack.common.cache.backends \u003d"},{"line_number":176,"context_line":"    memory \u003d neutron.openstack.common.cache._backends.memory:MemoryBackend"},{"line_number":177,"context_line":"# These are for backwards compat with Icehouse notification_driver configuration values"}],"source_content_type":"text/x-ttcn-cfg","patch_set":5,"id":"baada198_4f0a63d2","line":174,"in_reply_to":"baada198_46566106","updated":"2014-08-13 15:39:29.000000000","message":"Done","commit_id":"649207b4815e25fdc5a1c8d7b3f51d092e04fada"}]}
