)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"2360b91eac8e1c95b17ac8c3c46e0b1fc3aea241","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently the cisco n1kv plugin handles XML responses from VSM."},{"line_number":10,"context_line":"This change will replace the httplib2 with requests library and handle"},{"line_number":11,"context_line":"JSON responses from the VSM."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Implements: blueprint cisco-n1kv-json-support"},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1ae5cdf2_cb3bdc9a","line":11,"updated":"2014-06-09 08:50:03.000000000","message":"It seems to me that the patch is actually replacing XML completely. If that\u0027s true, can you update this commit message to make that a little more clear?","commit_id":"3312c4be8abad2c33cd39fda1d9fee6901e04441"},{"author":{"_account_id":7018,"name":"Abhishek Raut","email":"rauta@vmware.com","username":"abhiraut"},"change_message_id":"235735b43b00ce3cf893c361d91fa425132a206e","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently the cisco n1kv plugin handles XML responses from VSM."},{"line_number":10,"context_line":"This change will replace the httplib2 with requests library and handle"},{"line_number":11,"context_line":"JSON responses from the VSM."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Implements: blueprint cisco-n1kv-json-support"},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1ae5cdf2_09877a62","line":11,"in_reply_to":"1ae5cdf2_cb3bdc9a","updated":"2014-06-09 18:50:47.000000000","message":"Done","commit_id":"3312c4be8abad2c33cd39fda1d9fee6901e04441"}],"neutron/plugins/cisco/n1kv/n1kv_client.py":[{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"5b30bf48a61758b5db0ff9d0916642f01d631c89","unresolved":false,"context_lines":[{"line_number":430,"context_line":"        headers[\u0027Content-Type\u0027] \u003d self._set_content_type(\u0027json\u0027)"},{"line_number":431,"context_line":"        headers[\u0027Accept\u0027] \u003d self._set_content_type(\u0027json\u0027)"},{"line_number":432,"context_line":"        if body:"},{"line_number":433,"context_line":"            body \u003d jsonutils.dumps(body, indent\u003d2)"},{"line_number":434,"context_line":"            LOG.debug(_(\"req: %s\"), body)"},{"line_number":435,"context_line":"        try:"},{"line_number":436,"context_line":"            resp \u003d requests.request(method,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1ae5cdf2_aa8173fc","line":433,"updated":"2014-06-05 17:49:20.000000000","message":"this is not necessary.. requests will serialize for you","commit_id":"6b1fe16489130385714b5ebc95d4cdd963ea4f17"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"d86f217be92d3b47bca3ec9ec0e066814709084c","unresolved":false,"context_lines":[{"line_number":430,"context_line":"        headers[\u0027Content-Type\u0027] \u003d self._set_content_type(\u0027json\u0027)"},{"line_number":431,"context_line":"        headers[\u0027Accept\u0027] \u003d self._set_content_type(\u0027json\u0027)"},{"line_number":432,"context_line":"        if body:"},{"line_number":433,"context_line":"            body \u003d jsonutils.dumps(body, indent\u003d2)"},{"line_number":434,"context_line":"            LOG.debug(_(\"req: %s\"), body)"},{"line_number":435,"context_line":"        try:"},{"line_number":436,"context_line":"            resp \u003d requests.request(method,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1ae5cdf2_9550c1d5","line":433,"in_reply_to":"1ae5cdf2_930e87e4","updated":"2014-06-10 22:42:38.000000000","message":"Ah you\u0027re right forgot about that.","commit_id":"6b1fe16489130385714b5ebc95d4cdd963ea4f17"},{"author":{"_account_id":7018,"name":"Abhishek Raut","email":"rauta@vmware.com","username":"abhiraut"},"change_message_id":"b204092731852c3b23c8b9dbdd30094ac62aa694","unresolved":false,"context_lines":[{"line_number":430,"context_line":"        headers[\u0027Content-Type\u0027] \u003d self._set_content_type(\u0027json\u0027)"},{"line_number":431,"context_line":"        headers[\u0027Accept\u0027] \u003d self._set_content_type(\u0027json\u0027)"},{"line_number":432,"context_line":"        if body:"},{"line_number":433,"context_line":"            body \u003d jsonutils.dumps(body, indent\u003d2)"},{"line_number":434,"context_line":"            LOG.debug(_(\"req: %s\"), body)"},{"line_number":435,"context_line":"        try:"},{"line_number":436,"context_line":"            resp \u003d requests.request(method,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1ae5cdf2_930e87e4","line":433,"in_reply_to":"1ae5cdf2_aa8173fc","updated":"2014-06-06 20:44:32.000000000","message":"Per requests documentation, if a dict is provided as part of body (data), it will form encode it.. while controller needs it in json format.\nTried without serializing body, the controller doesnt receive it in json format, hence I will need to explicitly serialize.","commit_id":"6b1fe16489130385714b5ebc95d4cdd963ea4f17"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"e20f28b61352e4909754e2a2c7ffc542ae83ceef","unresolved":false,"context_lines":[{"line_number":441,"context_line":"        except Exception as e:"},{"line_number":442,"context_line":"            raise c_exc.VSMConnectionFailed(reason\u003de)"},{"line_number":443,"context_line":"        LOG.debug(_(\"status_code %s\"), resp.status_code)"},{"line_number":444,"context_line":"        if resp.status_code \u003d\u003d 200:"},{"line_number":445,"context_line":"            if \u0027application/json\u0027 in resp.headers[\u0027content-type\u0027]:"},{"line_number":446,"context_line":"                try:"},{"line_number":447,"context_line":"                    return resp.json()"}],"source_content_type":"text/x-python","patch_set":1,"id":"3ae8d1ca_ea9dd05a","line":444,"updated":"2014-05-28 19:50:34.000000000","message":"Can use requests.codes.OK vs magic number.","commit_id":"6b1fe16489130385714b5ebc95d4cdd963ea4f17"},{"author":{"_account_id":7018,"name":"Abhishek Raut","email":"rauta@vmware.com","username":"abhiraut"},"change_message_id":"b204092731852c3b23c8b9dbdd30094ac62aa694","unresolved":false,"context_lines":[{"line_number":441,"context_line":"        except Exception as e:"},{"line_number":442,"context_line":"            raise c_exc.VSMConnectionFailed(reason\u003de)"},{"line_number":443,"context_line":"        LOG.debug(_(\"status_code %s\"), resp.status_code)"},{"line_number":444,"context_line":"        if resp.status_code \u003d\u003d 200:"},{"line_number":445,"context_line":"            if \u0027application/json\u0027 in resp.headers[\u0027content-type\u0027]:"},{"line_number":446,"context_line":"                try:"},{"line_number":447,"context_line":"                    return resp.json()"}],"source_content_type":"text/x-python","patch_set":1,"id":"1ae5cdf2_78a558b4","line":444,"in_reply_to":"3ae8d1ca_ea9dd05a","updated":"2014-06-06 20:44:32.000000000","message":"Done","commit_id":"6b1fe16489130385714b5ebc95d4cdd963ea4f17"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"e20f28b61352e4909754e2a2c7ffc542ae83ceef","unresolved":false,"context_lines":[{"line_number":448,"context_line":"                except ValueError:"},{"line_number":449,"context_line":"                    return {}"},{"line_number":450,"context_line":"            elif \u0027text/plain\u0027 in resp.headers[\u0027content-type\u0027]:"},{"line_number":451,"context_line":"                LOG.debug(_(\"VSM: %s\"), resp.text)"},{"line_number":452,"context_line":"        else:"},{"line_number":453,"context_line":"            raise c_exc.VSMError(reason\u003dresp.text)"},{"line_number":454,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3ae8d1ca_aabae8bd","line":451,"updated":"2014-05-28 19:50:34.000000000","message":"Remvoe i18n from debug log message (may want to do on lines 434, 443, or do as a separate bug).","commit_id":"6b1fe16489130385714b5ebc95d4cdd963ea4f17"},{"author":{"_account_id":7018,"name":"Abhishek Raut","email":"rauta@vmware.com","username":"abhiraut"},"change_message_id":"b204092731852c3b23c8b9dbdd30094ac62aa694","unresolved":false,"context_lines":[{"line_number":448,"context_line":"                except ValueError:"},{"line_number":449,"context_line":"                    return {}"},{"line_number":450,"context_line":"            elif \u0027text/plain\u0027 in resp.headers[\u0027content-type\u0027]:"},{"line_number":451,"context_line":"                LOG.debug(_(\"VSM: %s\"), resp.text)"},{"line_number":452,"context_line":"        else:"},{"line_number":453,"context_line":"            raise c_exc.VSMError(reason\u003dresp.text)"},{"line_number":454,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1ae5cdf2_b313830c","line":451,"in_reply_to":"3ae8d1ca_aabae8bd","updated":"2014-06-06 20:44:32.000000000","message":"Looks like we need to make this change in all the modules. Will open up a bug to do this.","commit_id":"6b1fe16489130385714b5ebc95d4cdd963ea4f17"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"2360b91eac8e1c95b17ac8c3c46e0b1fc3aea241","unresolved":false,"context_lines":[{"line_number":497,"context_line":"        \"\"\""},{"line_number":498,"context_line":"        username \u003d c_cred.Store.get_username(host_ip)"},{"line_number":499,"context_line":"        password \u003d c_cred.Store.get_password(host_ip)"},{"line_number":500,"context_line":"        auth \u003d base64.encodestring(\"%s:%s\" % (username, password))[:-1]"},{"line_number":501,"context_line":"        header \u003d {\"Authorization\": \"Basic %s\" % auth}"},{"line_number":502,"context_line":"        return header"},{"line_number":503,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_cb867c65","line":500,"updated":"2014-06-09 08:50:03.000000000","message":"Why is the last character chopped off now?","commit_id":"3312c4be8abad2c33cd39fda1d9fee6901e04441"},{"author":{"_account_id":7018,"name":"Abhishek Raut","email":"rauta@vmware.com","username":"abhiraut"},"change_message_id":"235735b43b00ce3cf893c361d91fa425132a206e","unresolved":false,"context_lines":[{"line_number":497,"context_line":"        \"\"\""},{"line_number":498,"context_line":"        username \u003d c_cred.Store.get_username(host_ip)"},{"line_number":499,"context_line":"        password \u003d c_cred.Store.get_password(host_ip)"},{"line_number":500,"context_line":"        auth \u003d base64.encodestring(\"%s:%s\" % (username, password))[:-1]"},{"line_number":501,"context_line":"        header \u003d {\"Authorization\": \"Basic %s\" % auth}"},{"line_number":502,"context_line":"        return header"},{"line_number":503,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_e95deeed","line":500,"in_reply_to":"1ae5cdf2_cb867c65","updated":"2014-06-09 18:50:47.000000000","message":"This is because the base64 encoding always pads the data with a newline character. This was handled well by httplib2 library, but requests library is not able to handle this. Need to chop it off else data received on the controller side is missing.","commit_id":"3312c4be8abad2c33cd39fda1d9fee6901e04441"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"6bace7ddaf3e701ca205603ea9e63d7bf0a88cf0","unresolved":false,"context_lines":[{"line_number":497,"context_line":"        \"\"\""},{"line_number":498,"context_line":"        username \u003d c_cred.Store.get_username(host_ip)"},{"line_number":499,"context_line":"        password \u003d c_cred.Store.get_password(host_ip)"},{"line_number":500,"context_line":"        auth \u003d base64.encodestring(\"%s:%s\" % (username, password))[:-1]"},{"line_number":501,"context_line":"        header \u003d {\"Authorization\": \"Basic %s\" % auth}"},{"line_number":502,"context_line":"        return header"},{"line_number":503,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_3f038474","line":500,"updated":"2014-06-09 18:58:23.000000000","message":"Since this is to remove a newline char, can you use the rstrip function instead so it\u0027s more self-explanatory?\n\n auth \u003d base64.encodestring(\"%s:%s\" %\n                            (username, password)).rstrip()","commit_id":"15302d144b94ac015fafe81dc36cd1e74b4286be"},{"author":{"_account_id":7018,"name":"Abhishek Raut","email":"rauta@vmware.com","username":"abhiraut"},"change_message_id":"50d8d0a32447a483ccccb43c8e50da8b577e8965","unresolved":false,"context_lines":[{"line_number":497,"context_line":"        \"\"\""},{"line_number":498,"context_line":"        username \u003d c_cred.Store.get_username(host_ip)"},{"line_number":499,"context_line":"        password \u003d c_cred.Store.get_password(host_ip)"},{"line_number":500,"context_line":"        auth \u003d base64.encodestring(\"%s:%s\" % (username, password))[:-1]"},{"line_number":501,"context_line":"        header \u003d {\"Authorization\": \"Basic %s\" % auth}"},{"line_number":502,"context_line":"        return header"},{"line_number":503,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_93fe546a","line":500,"in_reply_to":"1ae5cdf2_3f038474","updated":"2014-06-09 19:25:50.000000000","message":"Done","commit_id":"15302d144b94ac015fafe81dc36cd1e74b4286be"}],"neutron/plugins/cisco/n1kv/n1kv_neutron_plugin.py":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"e20f28b61352e4909754e2a2c7ffc542ae83ceef","unresolved":false,"context_lines":[{"line_number":179,"context_line":"            plugin_profiles_set \u003d set()"},{"line_number":180,"context_line":"            # Fetch policy profiles from VSM"},{"line_number":181,"context_line":"            if policy_profiles:"},{"line_number":182,"context_line":"                for profile in policy_profiles:"},{"line_number":183,"context_line":"                    profile_name \u003d (policy_profiles"},{"line_number":184,"context_line":"                                    [profile][c_const.PROPERTIES]."},{"line_number":185,"context_line":"                                    get(c_const.NAME, None))"}],"source_content_type":"text/x-python","patch_set":1,"id":"3ae8d1ca_ead5d0b9","line":182,"updated":"2014-05-28 19:50:34.000000000","message":"Can you elaborate on what the policy_profiles will look like?\nTrying to understand the logic on L183-188 (why we are indexing into policy_profiles\n\nLooking at the UT, it seems like the outer dict key will have the name, so you could use key for profile_name.\n\nIf there is a policy, is it guaranteed to have a name and ID? If so, a direct access to the [\u0027properties\u0027][\u0027id\u0027] could be done.","commit_id":"6b1fe16489130385714b5ebc95d4cdd963ea4f17"},{"author":{"_account_id":7018,"name":"Abhishek Raut","email":"rauta@vmware.com","username":"abhiraut"},"change_message_id":"b204092731852c3b23c8b9dbdd30094ac62aa694","unresolved":false,"context_lines":[{"line_number":179,"context_line":"            plugin_profiles_set \u003d set()"},{"line_number":180,"context_line":"            # Fetch policy profiles from VSM"},{"line_number":181,"context_line":"            if policy_profiles:"},{"line_number":182,"context_line":"                for profile in policy_profiles:"},{"line_number":183,"context_line":"                    profile_name \u003d (policy_profiles"},{"line_number":184,"context_line":"                                    [profile][c_const.PROPERTIES]."},{"line_number":185,"context_line":"                                    get(c_const.NAME, None))"}],"source_content_type":"text/x-python","patch_set":1,"id":"1ae5cdf2_f8688823","line":182,"in_reply_to":"3ae8d1ca_ead5d0b9","updated":"2014-06-06 20:44:32.000000000","message":"Done\nUsed the name from the key.\nPolicy cannot be published to neutron without ID and name. Removed checks. Thanks Paul!","commit_id":"6b1fe16489130385714b5ebc95d4cdd963ea4f17"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"2360b91eac8e1c95b17ac8c3c46e0b1fc3aea241","unresolved":false,"context_lines":[{"line_number":177,"context_line":"            policy_profiles \u003d n1kvclient.list_port_profiles()"},{"line_number":178,"context_line":"            vsm_profiles \u003d {}"},{"line_number":179,"context_line":"            plugin_profiles_set \u003d set()"},{"line_number":180,"context_line":"            # Fetch policy profiles from VSM"},{"line_number":181,"context_line":"            for profile_name in policy_profiles:"},{"line_number":182,"context_line":"                profile_id \u003d (policy_profiles"},{"line_number":183,"context_line":"                              [profile_name][c_const.PROPERTIES][c_const.ID])"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_0bf864e4","line":180,"updated":"2014-06-09 08:50:03.000000000","message":"How are these optimizations related to a switch from XML to JSON?","commit_id":"3312c4be8abad2c33cd39fda1d9fee6901e04441"},{"author":{"_account_id":7018,"name":"Abhishek Raut","email":"rauta@vmware.com","username":"abhiraut"},"change_message_id":"235735b43b00ce3cf893c361d91fa425132a206e","unresolved":false,"context_lines":[{"line_number":177,"context_line":"            policy_profiles \u003d n1kvclient.list_port_profiles()"},{"line_number":178,"context_line":"            vsm_profiles \u003d {}"},{"line_number":179,"context_line":"            plugin_profiles_set \u003d set()"},{"line_number":180,"context_line":"            # Fetch policy profiles from VSM"},{"line_number":181,"context_line":"            for profile_name in policy_profiles:"},{"line_number":182,"context_line":"                profile_id \u003d (policy_profiles"},{"line_number":183,"context_line":"                              [profile_name][c_const.PROPERTIES][c_const.ID])"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_846451e6","line":180,"in_reply_to":"1ae5cdf2_0bf864e4","updated":"2014-06-09 18:50:47.000000000","message":"These are checks which are not required. Received a -1 on my previous patch for this.","commit_id":"3312c4be8abad2c33cd39fda1d9fee6901e04441"}],"neutron/tests/unit/cisco/n1kv/fake_client.py":[{"author":{"_account_id":7987,"name":"Ivar Lazzaro","email":"ivarlazzaro@gmail.com","username":"Ivar"},"change_message_id":"549fe8477d57c0edb86555eccf3395943c57447a","unresolved":false,"context_lines":[{"line_number":88,"context_line":"    :param total_profiles: integer representing total number of profiles to"},{"line_number":89,"context_line":"                           return"},{"line_number":90,"context_line":"    \"\"\""},{"line_number":91,"context_line":"    profiles \u003d dict()"},{"line_number":92,"context_line":"    for num in range(1, total_profiles + 1):"},{"line_number":93,"context_line":"        name \u003d \"pp-%s\" % num"},{"line_number":94,"context_line":"        profile_id \u003d \"00000000-0000-0000-0000-00000000000%s\" % num"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_cee5c60b","line":91,"updated":"2014-06-06 21:28:11.000000000","message":"use profiles \u003d {} instead","commit_id":"3312c4be8abad2c33cd39fda1d9fee6901e04441"},{"author":{"_account_id":7018,"name":"Abhishek Raut","email":"rauta@vmware.com","username":"abhiraut"},"change_message_id":"235735b43b00ce3cf893c361d91fa425132a206e","unresolved":false,"context_lines":[{"line_number":88,"context_line":"    :param total_profiles: integer representing total number of profiles to"},{"line_number":89,"context_line":"                           return"},{"line_number":90,"context_line":"    \"\"\""},{"line_number":91,"context_line":"    profiles \u003d dict()"},{"line_number":92,"context_line":"    for num in range(1, total_profiles + 1):"},{"line_number":93,"context_line":"        name \u003d \"pp-%s\" % num"},{"line_number":94,"context_line":"        profile_id \u003d \"00000000-0000-0000-0000-00000000000%s\" % num"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_64ae65e9","line":91,"in_reply_to":"1ae5cdf2_cee5c60b","updated":"2014-06-09 18:50:47.000000000","message":"Done","commit_id":"3312c4be8abad2c33cd39fda1d9fee6901e04441"}]}
