)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"5ecd1e7871c39a3f9bda55e5acf8a5a2af7fd1b8","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Adding user_id handling to keypair index api call"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Closes-Bug: #1182965"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Administering an openstack cluster I found the need to see what keypairs a user had."},{"line_number":12,"context_line":"I found this bug that was requesting the same thing and decided to impliment it."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5a890539_e8487c8c","line":9,"updated":"2014-11-28 14:28:55.000000000","message":"Generally best to put this line below the bug description, but not a big deal at all. Also, you will want to wrap your bug description at 79 chars...","commit_id":"0da189d99e3d1eff189e913e821e94bec043235b"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"5ecd1e7871c39a3f9bda55e5acf8a5a2af7fd1b8","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Closes-Bug: #1182965"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Administering an openstack cluster I found the need to see what keypairs a user had."},{"line_number":12,"context_line":"I found this bug that was requesting the same thing and decided to impliment it."},{"line_number":13,"context_line":"This is the update to the api server to handle a query param passed to return a keypair"},{"line_number":14,"context_line":"list for a specific user-id. Only a user with admin privilages is allowed to make this call."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5a890539_084ea896","line":12,"updated":"2014-11-28 14:28:55.000000000","message":"s/impliment/implement/","commit_id":"0da189d99e3d1eff189e913e821e94bec043235b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d777d3ca12691530d09844861b704adf2b2df779","unresolved":false,"context_lines":[{"line_number":11,"context_line":"Administering an openstack cluster I found the need to see what keypairs a user had."},{"line_number":12,"context_line":"I found this bug that was requesting the same thing and decided to impliment it."},{"line_number":13,"context_line":"This is the update to the api server to handle a query param passed to return a keypair"},{"line_number":14,"context_line":"list for a specific user-id. Only a user with admin privilages is allowed to make this call."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I45846f770628e8f24a8c137dcdc46baa64c50801"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"dac4157f_e94b2158","line":14,"range":{"start_line":14,"start_character":52,"end_line":14,"end_character":62},"updated":"2015-04-20 15:32:12.000000000","message":"\"privileges\" is misspelled.\n\nAlso, can you wrap the lines in this message at 78 columns?","commit_id":"0da189d99e3d1eff189e913e821e94bec043235b"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"1700c8b33d84ee8c6d94783c27d88dfc8debc8a6","unresolved":false,"context_lines":[{"line_number":15,"context_line":"Allowing the administrators to be able to list and get details of keypairs"},{"line_number":16,"context_line":"which owned by users other than themselves, as well as creating new"},{"line_number":17,"context_line":"keypairs on behalf of their users."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"DocImpact: This adds API microversion 2.4"},{"line_number":20,"context_line":"Related to blueprint admin-query-any-keypair.rst"},{"line_number":21,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"3afb71cf_99cf127f","line":18,"updated":"2015-06-08 14:28:29.000000000","message":"Could you add APIImpact flag at here, this is help for nova api team to find your patch.","commit_id":"bfa546621d40e526b4aa3b42e91c8edc0ecda965"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"1700c8b33d84ee8c6d94783c27d88dfc8debc8a6","unresolved":false,"context_lines":[{"line_number":17,"context_line":"keypairs on behalf of their users."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"DocImpact: This adds API microversion 2.4"},{"line_number":20,"context_line":"Related to blueprint admin-query-any-keypair.rst"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Co-Authored-By: Dan Smith \u003cdansmith@redhat.com\u003e"},{"line_number":23,"context_line":"Co-Authored-By: Dan Radez \u003cdradez@redhat.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"3afb71cf_54771f3a","line":20,"updated":"2015-06-08 14:28:29.000000000","message":"We should use \"Implements blueprint\" now","commit_id":"bfa546621d40e526b4aa3b42e91c8edc0ecda965"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"d7ccdaba9b417bf8c0d9f17861731c377dd4a1e9","unresolved":false,"context_lines":[{"line_number":16,"context_line":"which owned by users other than themselves, as well as creating new"},{"line_number":17,"context_line":"keypairs on behalf of their users."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"DocImpact: This adds API microversion 2.6"},{"line_number":20,"context_line":"Implements blueprint admin-query-any-keypair"},{"line_number":21,"context_line":"APIImpact"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"ba3cc151_3be70948","line":19,"updated":"2015-07-10 11:08:38.000000000","message":"I think it is 2.7 now? Maybe drop the version from this message?","commit_id":"f429de8a2b560c427c184772a223205d1409320f"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"5fbc58d4d61c9075e4b4082c7fb48da46b46e99d","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"DocImpact: This adds API microversion 2.6"},{"line_number":20,"context_line":"Implements blueprint admin-query-any-keypair"},{"line_number":21,"context_line":"APIImpact"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Co-Authored-By: Dan Smith \u003cdansmith@redhat.com\u003e"},{"line_number":24,"context_line":"Co-Authored-By: Dan Radez \u003cdradez@redhat.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"ba3cc151_49bfb9aa","line":21,"updated":"2015-07-10 01:04:58.000000000","message":"we should add UpgradeImpact flag at here. And add some note about notice deployer update their polcy.json.","commit_id":"f429de8a2b560c427c184772a223205d1409320f"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"d7ccdaba9b417bf8c0d9f17861731c377dd4a1e9","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"DocImpact: This adds API microversion 2.6"},{"line_number":20,"context_line":"Implements blueprint admin-query-any-keypair"},{"line_number":21,"context_line":"APIImpact"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Co-Authored-By: Dan Smith \u003cdansmith@redhat.com\u003e"},{"line_number":24,"context_line":"Co-Authored-By: Dan Radez \u003cdradez@redhat.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"ba3cc151_fb79a183","line":21,"in_reply_to":"ba3cc151_49bfb9aa","updated":"2015-07-10 11:08:38.000000000","message":"+1 for a note about the policy changes.","commit_id":"f429de8a2b560c427c184772a223205d1409320f"}],"doc/v3/api_samples/keypairs/v2.7/keypairs-post-resp.json":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8bf6b50818cbbc309ab1a556fcc6a6209b6f8d98","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":"    \"keypair\": {"},{"line_number":3,"context_line":"        \"fingerprint\": \"7e:eb:ab:24:ba:d1:e1:88:ae:9a:fb:66:53:df:d3:bd\","},{"line_number":4,"context_line":"        \"name\": \"keypair-50ca852e-273f-4cdc-8949-45feba200837\","},{"line_number":5,"context_line":"        \"type\": \"ssh\","},{"line_number":6,"context_line":"        \"private_key\": \"-----BEGIN RSA PRIVATE KEY-----\\nMIIEpAIBAAKCAQEApBdzF+fTq5QbN3R+QlO5TZr6W64GcUqcho5ZxPBZZIq53P1K\\ndtpaY856ManqEwME1tN+JOw8+mmCK2RpkMHtk5BNPOMqr5Y+OQ5MqI/eX1v7GWnJ\\ntHGTbi+vRDmxBh3aa3xiUGo66c9tjUKAg/ExQfFr/vKJvTR/S3urPlj3vfFgu+yi\\n8PKoH0LGyHsviWsD1peDuu2XS+ca8qbkY3yD1o4Mv1R/OSF4P2fxjjWdp8R4EkoT\\nJMKkhRAgAuS9zxwftPv9djP4opHWrRUlRo6bh75CzrN6Hu5uh5Tn5bkifOQcy1gW\\n772vd6pBpi4OGQHPKz4djvmCLAVBzSyzDP6EKQIDAQABAoIBAQCB+tU/ZXKlIe+h\\nMNTmoz1QfOe+AY625Rwx9cakGqMk4kKyC62VkgcxshfXCToSjzyhEuyEQOFYloT2\\n7FY2xXb0gcS861Efv0pQlcQhbbz/GnQ/wC13ktPu3zTdPTm9l54xsFiMTGmYVaf4\\n0mnMmhyjmKIsVGDJEDGZUD/oZj7wJGOFha5M4FZrZlJIrEZC0rGGlcC0kGF2no6B\\nj1Mu7HjyK3pTKf4dlp+jeRikUF5Pct+qT+rcv2rZ3fl3inxtlLEwZeFPbp/njf/U\\nIGxFzZsuLmiFlsJar6M5nEckTB3p25maWWaR8/0jvJRgsPnuoUrUoGDq87DMKCdk\\nlw6by9fRAoGBANhnS9ko7Of+ntqIFR7xOG9p/oPATztgHkFxe4GbQ0leaDRTx3vE\\ndQmUCnn24xtyVECaI9a4IV+LP1npw8niWUJ4pjgdAlkF4cCTu9sN+cBO15SfdACI\\nzD1DaaHmpFCAWlpTo68VWlvWll6i2ncCkRJR1+q/C/yQz7asvl4AakElAoGBAMId\\nxqMT2Sy9xLuHsrAoMUvBOkwaMYZH+IAb4DvUDjVIiKWjmonrmopS5Lpb+ALBKqZe\\neVfD6HwWQqGwCFItToaEkZvrNfTapoNCHWWg001D49765UV5lMrArDbM1vXtFfM4\\nDRYM6+Y6o/6QH8EBgXtyBxcYthIDBM3wBJa67xG1AoGAKTm8fFlMkIG0N4N3Kpbf\\nnnH915GaRoBwIx2AXtd6QQ7oIRfYx95MQY/fUw7SgxcLr+btbulTCkWXwwRClUI2\\nqPAdElGMcfMp56r9PaTy8EzUyu55heSJrB4ckIhEw0VAcTa/1wnlVduSd+LkZYmq\\no2fOD11n5iycNXvBJF1F4LUCgYAMaRbwCi7SW3eefbiA5rDwJPRzNSGBckyC9EVL\\nzezynyaNYH5a3wNMYKxa9dJPasYtSND9OXs9o7ay26xMhLUGiKc+jrUuaGRI9Asp\\nGjUoNXT2JphN7s4CgHsCLep4YqYKnMTJah4S5CDj/5boIg6DM/EcGupZEHRYLkY8\\n1MrAGQKBgQCi9yeC39ctLUNn+Ix604gttWWChdt3ozufTZ7HybJOSRA9Gh3iD5gm\\nzlz0xqpGShKpOY2k+ftvja0poMdGeJLt84P3r2q01IgI7w0LmOj5m0W10dHysH27\\nBWpCnHdBJMxnBsMRPoM4MKkmKWD9l5PSTCTWtkIpsyuDCko6D9UwZA\u003d\u003d\\n-----END RSA PRIVATE KEY-----\\n\","},{"line_number":7,"context_line":"        \"public_key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCkF3MX59OrlBs3dH5CU7lNmvpbrgZxSpyGjlnE8Flkirnc/Up22lpjznoxqeoTAwTW034k7Dz6aYIrZGmQwe2TkE084yqvlj45Dkyoj95fW/sZacm0cZNuL69EObEGHdprfGJQajrpz22NQoCD8TFB8Wv+8om9NH9Le6s+WPe98WC77KLw8qgfQsbIey+JawPWl4O67ZdL5xrypuRjfIPWjgy/VH85IXg/Z/GONZ2nxHgSShMkwqSFECAC5L3PHB+0+/12M/iikdatFSVGjpuHvkLOs3oe7m6HlOfluSJ85BzLWBbvva93qkGmLg4ZAc8rPh2O+YIsBUHNLLMM/oQp Generated-by-Nova\\n\","}],"source_content_type":"application/json","patch_set":19,"id":"3a50d1a3_e33fdd84","line":4,"updated":"2015-07-23 14:27:19.000000000","message":"Why is the above UUID different than the one posted in https://review.openstack.org/#/c/70485/19/doc/v3/api_samples/keypairs/v2.7/keypairs-post-req.json ?","commit_id":"fe8610dec16d6dbbaf05de35dd0c92b069e3a2c8"}],"etc/nova/policy.json":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"d7ccdaba9b417bf8c0d9f17861731c377dd4a1e9","unresolved":false,"context_lines":[{"line_number":300,"context_line":"    \"os_compute_api:ips:show\": \"rule:admin_or_owner\","},{"line_number":301,"context_line":"    \"os_compute_api:os-keypairs:discoverable\": \"\","},{"line_number":302,"context_line":"    \"os_compute_api:os-keypairs\": \"\","},{"line_number":303,"context_line":"    \"os_compute_api:os-keypairs:index\": \"\","},{"line_number":304,"context_line":"    \"os_compute_api:os-keypairs:show\": \"\","},{"line_number":305,"context_line":"    \"os_compute_api:os-keypairs:create\": \"\","},{"line_number":306,"context_line":"    \"os_compute_api:os-keypairs:delete\": \"\","}],"source_content_type":"application/json","patch_set":18,"id":"ba3cc151_bbcc798b","side":"PARENT","line":303,"updated":"2015-07-10 11:08:38.000000000","message":"It feels like there is a bug fix change before this change, that should do the move to user_id. But actually, I guess thats nonsense, because previously you were only able to edit your user specific keypair, so ignore me.","commit_id":"ab5d3387bfc856ad3d44bc84065c1f19556196a7"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"d7ccdaba9b417bf8c0d9f17861731c377dd4a1e9","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":"    \"context_is_admin\":  \"role:admin\","},{"line_number":3,"context_line":"    \"admin_or_owner\":  \"is_admin:True or project_id:%(project_id)s\","},{"line_number":4,"context_line":"    \"default\": \"rule:admin_or_owner\","},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"    \"cells_scheduler_filter:TargetCellFilter\": \"is_admin:True\","}],"source_content_type":"application/json","patch_set":18,"id":"ba3cc151_5bd3ed5f","line":3,"updated":"2015-07-10 11:08:38.000000000","message":"Should we add \"admin_or_user\" here?","commit_id":"f429de8a2b560c427c184772a223205d1409320f"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"d7ccdaba9b417bf8c0d9f17861731c377dd4a1e9","unresolved":false,"context_lines":[{"line_number":299,"context_line":"    \"os_compute_api:ips:index\": \"rule:admin_or_owner\","},{"line_number":300,"context_line":"    \"os_compute_api:ips:show\": \"rule:admin_or_owner\","},{"line_number":301,"context_line":"    \"os_compute_api:os-keypairs:discoverable\": \"\","},{"line_number":302,"context_line":"    \"os_compute_api:os-keypairs\": \"\","},{"line_number":303,"context_line":"    \"os_compute_api:os-keypairs:index\": \"rule:admin_api or user_id:%(user_id)s\","},{"line_number":304,"context_line":"    \"os_compute_api:os-keypairs:show\": \"rule:admin_api or user_id:%(user_id)s\","},{"line_number":305,"context_line":"    \"os_compute_api:os-keypairs:create\": \"rule:admin_api or user_id:%(user_id)s\","}],"source_content_type":"application/json","patch_set":18,"id":"ba3cc151_7b5351e3","line":302,"updated":"2015-07-10 11:08:38.000000000","message":"why does this not change? I wonder what this means?","commit_id":"f429de8a2b560c427c184772a223205d1409320f"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"d7ccdaba9b417bf8c0d9f17861731c377dd4a1e9","unresolved":false,"context_lines":[{"line_number":303,"context_line":"    \"os_compute_api:os-keypairs:index\": \"rule:admin_api or user_id:%(user_id)s\","},{"line_number":304,"context_line":"    \"os_compute_api:os-keypairs:show\": \"rule:admin_api or user_id:%(user_id)s\","},{"line_number":305,"context_line":"    \"os_compute_api:os-keypairs:create\": \"rule:admin_api or user_id:%(user_id)s\","},{"line_number":306,"context_line":"    \"os_compute_api:os-keypairs:delete\": \"\","},{"line_number":307,"context_line":"    \"os_compute_api:limits:discoverable\": \"\","},{"line_number":308,"context_line":"    \"os_compute_api:os-lock-server:discoverable\": \"\","},{"line_number":309,"context_line":"    \"os_compute_api:os-lock-server:lock\": \"rule:admin_or_owner\","}],"source_content_type":"application/json","patch_set":18,"id":"ba3cc151_bb70f974","line":306,"updated":"2015-07-10 11:08:38.000000000","message":"Hmm, is that correct? I guess the spec doesn\u0027t talk about delete, but it seems odd to leave that out. Mostly just so an admin can clean up after adding a keypair.","commit_id":"f429de8a2b560c427c184772a223205d1409320f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8bf6b50818cbbc309ab1a556fcc6a6209b6f8d98","unresolved":false,"context_lines":[{"line_number":303,"context_line":"    \"os_compute_api:os-keypairs:index\": \"rule:admin_api or user_id:%(user_id)s\","},{"line_number":304,"context_line":"    \"os_compute_api:os-keypairs:show\": \"rule:admin_api or user_id:%(user_id)s\","},{"line_number":305,"context_line":"    \"os_compute_api:os-keypairs:create\": \"rule:admin_api or user_id:%(user_id)s\","},{"line_number":306,"context_line":"    \"os_compute_api:os-keypairs:delete\": \"rule:admin_api or user_id:%(user_id)s\","},{"line_number":307,"context_line":"    \"os_compute_api:limits:discoverable\": \"\","},{"line_number":308,"context_line":"    \"os_compute_api:os-lock-server:discoverable\": \"\","},{"line_number":309,"context_line":"    \"os_compute_api:os-lock-server:lock\": \"rule:admin_or_owner\","}],"source_content_type":"application/json","patch_set":19,"id":"3a50d1a3_63542dc9","line":306,"updated":"2015-07-23 14:27:19.000000000","message":"Why aren\u0027t these using rule:admin_or_owner?","commit_id":"fe8610dec16d6dbbaf05de35dd0c92b069e3a2c8"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"6498079ffdbcc7a9cf9672da4c40d1294ad5baf7","unresolved":false,"context_lines":[{"line_number":303,"context_line":"    \"os_compute_api:os-keypairs:index\": \"rule:admin_api or user_id:%(user_id)s\","},{"line_number":304,"context_line":"    \"os_compute_api:os-keypairs:show\": \"rule:admin_api or user_id:%(user_id)s\","},{"line_number":305,"context_line":"    \"os_compute_api:os-keypairs:create\": \"rule:admin_api or user_id:%(user_id)s\","},{"line_number":306,"context_line":"    \"os_compute_api:os-keypairs:delete\": \"rule:admin_api or user_id:%(user_id)s\","},{"line_number":307,"context_line":"    \"os_compute_api:limits:discoverable\": \"\","},{"line_number":308,"context_line":"    \"os_compute_api:os-lock-server:discoverable\": \"\","},{"line_number":309,"context_line":"    \"os_compute_api:os-lock-server:lock\": \"rule:admin_or_owner\","}],"source_content_type":"application/json","patch_set":19,"id":"3a50d1a3_daa0a2f6","line":306,"in_reply_to":"3a50d1a3_63542dc9","updated":"2015-07-29 04:16:53.000000000","message":"Not sure, but rule:admin_or_owner doesn\u0027t work at all under any circumstances.. :/","commit_id":"fe8610dec16d6dbbaf05de35dd0c92b069e3a2c8"}],"nova/api/openstack/api_version_request.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"a2f555ed72ce2910cac06bc2bbfa0ba7043cf0f2","unresolved":false,"context_lines":[{"line_number":51,"context_line":"# Note(cyeoh): This only applies for the v2.1 API once microversions"},{"line_number":52,"context_line":"# support is fully merged. It does not affect the V2 API."},{"line_number":53,"context_line":"_MIN_API_VERSION \u003d \"2.1\""},{"line_number":54,"context_line":"_MAX_API_VERSION \u003d \"2.4\""},{"line_number":55,"context_line":"DEFAULT_API_VERSION \u003d _MIN_API_VERSION"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_840aa277","line":54,"updated":"2015-05-30 15:16:57.000000000","message":"If we want to implement by separated patches, we should bump this version in the last patch. Because when this version bump, it means 2.4 enabled. We should enabled it when everything is ready.","commit_id":"bb9dcf1cf297ae3c728ab6f6a8b2ca58eb6e4e34"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"79ab9c1d57d1b4c2c5c7afb466d015719590245f","unresolved":false,"context_lines":[{"line_number":51,"context_line":"# Note(cyeoh): This only applies for the v2.1 API once microversions"},{"line_number":52,"context_line":"# support is fully merged. It does not affect the V2 API."},{"line_number":53,"context_line":"_MIN_API_VERSION \u003d \"2.1\""},{"line_number":54,"context_line":"_MAX_API_VERSION \u003d \"2.4\""},{"line_number":55,"context_line":"DEFAULT_API_VERSION \u003d _MIN_API_VERSION"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3afb71cf_77d5b641","line":54,"in_reply_to":"3afb71cf_071af86e","updated":"2015-06-05 15:45:02.000000000","message":"Ok, I\u0027ve squashed the dependent patches into this one.","commit_id":"bb9dcf1cf297ae3c728ab6f6a8b2ca58eb6e4e34"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"83f98062ebfe66147178ba0addaa12fd56472139","unresolved":false,"context_lines":[{"line_number":51,"context_line":"# Note(cyeoh): This only applies for the v2.1 API once microversions"},{"line_number":52,"context_line":"# support is fully merged. It does not affect the V2 API."},{"line_number":53,"context_line":"_MIN_API_VERSION \u003d \"2.1\""},{"line_number":54,"context_line":"_MAX_API_VERSION \u003d \"2.4\""},{"line_number":55,"context_line":"DEFAULT_API_VERSION \u003d _MIN_API_VERSION"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"5afe65bd_f4f18fce","line":54,"in_reply_to":"5afe65bd_57ccf334","updated":"2015-06-02 19:57:55.000000000","message":"On the other hand, I don\u0027t think it\u0027s right.\nThis feature is getting enabled starting with this patch.\nFollowing patches are enabling additional methods for the 2.4 version change.","commit_id":"bb9dcf1cf297ae3c728ab6f6a8b2ca58eb6e4e34"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"31b1db7ffe943830633967ce7a02dd3d4ecbc8ac","unresolved":false,"context_lines":[{"line_number":51,"context_line":"# Note(cyeoh): This only applies for the v2.1 API once microversions"},{"line_number":52,"context_line":"# support is fully merged. It does not affect the V2 API."},{"line_number":53,"context_line":"_MIN_API_VERSION \u003d \"2.1\""},{"line_number":54,"context_line":"_MAX_API_VERSION \u003d \"2.4\""},{"line_number":55,"context_line":"DEFAULT_API_VERSION \u003d _MIN_API_VERSION"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3afb71cf_071af86e","line":54,"in_reply_to":"5afe65bd_817bed8b","updated":"2015-06-04 19:08:11.000000000","message":"I think that because of the API impact, we need to only bump this once. I think that means that they all need to be in a single patch.\n\nIf we need them to be in separate patches, presumably we can only bump the version in the *last* patch, right? That way we\u0027re checking for 2.4, which can never happen (if a user requests it they\u0027ll be turned away early) and the code is just not active until we bump this limit. Right?\n\nI still think that for this change, doing it all in one patch is probably reasonable though.","commit_id":"bb9dcf1cf297ae3c728ab6f6a8b2ca58eb6e4e34"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"294ffc62d306119b7394d913b1a693ed76309b37","unresolved":false,"context_lines":[{"line_number":51,"context_line":"# Note(cyeoh): This only applies for the v2.1 API once microversions"},{"line_number":52,"context_line":"# support is fully merged. It does not affect the V2 API."},{"line_number":53,"context_line":"_MIN_API_VERSION \u003d \"2.1\""},{"line_number":54,"context_line":"_MAX_API_VERSION \u003d \"2.4\""},{"line_number":55,"context_line":"DEFAULT_API_VERSION \u003d _MIN_API_VERSION"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"5afe65bd_817bed8b","line":54,"in_reply_to":"5afe65bd_f4f18fce","updated":"2015-06-04 11:26:47.000000000","message":"The new parameter under the decorator @wsgi.Controller.api_version(\"2.4\"). So If we didn\u0027t raise max version, the user didn\u0027t have chance access the new parameter. So the new functionality isn\u0027t enabled for user.","commit_id":"bb9dcf1cf297ae3c728ab6f6a8b2ca58eb6e4e34"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"b819240c30926afed9c8dbab17370fc4e1553968","unresolved":false,"context_lines":[{"line_number":51,"context_line":"# Note(cyeoh): This only applies for the v2.1 API once microversions"},{"line_number":52,"context_line":"# support is fully merged. It does not affect the V2 API."},{"line_number":53,"context_line":"_MIN_API_VERSION \u003d \"2.1\""},{"line_number":54,"context_line":"_MAX_API_VERSION \u003d \"2.4\""},{"line_number":55,"context_line":"DEFAULT_API_VERSION \u003d _MIN_API_VERSION"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"5afe65bd_57ccf334","line":54,"in_reply_to":"7a016987_840aa277","updated":"2015-06-02 15:42:46.000000000","message":"Done","commit_id":"bb9dcf1cf297ae3c728ab6f6a8b2ca58eb6e4e34"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"5fbc58d4d61c9075e4b4082c7fb48da46b46e99d","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    * 2.4 - Exposes reserved field in os-fixed-ips."},{"line_number":46,"context_line":"    * 2.5 - Allow server search option ip6 for non-admin"},{"line_number":47,"context_line":"    * 2.6 - Consolidate the APIs for getting remote consoles"},{"line_number":48,"context_line":"    * 2.7 - Adds user_id\u003d parameter to os-keypairs plugin"},{"line_number":49,"context_line":"\"\"\""},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"# The minimum and maximum versions of the API supported"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba3cc151_69addde9","line":48,"updated":"2015-07-10 01:04:58.000000000","message":"We prefer more generic describe at here. It can like the spec title \u0027Allow admins to query and create keypairs owned by any user\u0027\n\nBut you aren\u0027t only add one user_id parameter. For enable admin create keypair for specific user, you add new properties \u0027user_id\u0027 to create request body also. So this describe is not right.","commit_id":"f429de8a2b560c427c184772a223205d1409320f"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"6f26c3241b2985ab6a9f11392a890176de9a6967","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    * 2.7 - Check flavor type before add tenant access."},{"line_number":49,"context_line":"    * 2.8 - Add new protocol for VM console (mks)"},{"line_number":50,"context_line":"    * 2.9 - Exposes lock information in server details."},{"line_number":51,"context_line":"    * 2.10 - Allow admins to query, create and delete keypairs owned by any user"},{"line_number":52,"context_line":"\"\"\""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"# The minimum and maximum versions of the API supported"}],"source_content_type":"text/x-python","patch_set":22,"id":"1a4dcd0f_272a437f","line":51,"updated":"2015-08-04 21:47:57.000000000","message":"Note the pep8 failure:\n/nova/api/openstack/api_version_request.py:51:80: E501 line too long (80 \u003e 79 characters)","commit_id":"e786b05c7ceed452012efc5beadc39243d07fbd5"}],"nova/api/openstack/compute/contrib/keypairs.py":[{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"19150e6e5f74fd22208b556c1d67b75838057598","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"\"\"\"Keypair management extension.\"\"\""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import urlparse"},{"line_number":21,"context_line":"import webob"},{"line_number":22,"context_line":"import webob.exc"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7ac7a964_67b738d9","line":20,"range":{"start_line":20,"start_character":0,"end_line":20,"end_character":15},"updated":"2014-08-15 07:21:00.000000000","message":"It should be separated from third-party imports due to that is built-in library.","commit_id":"553f7db88841f668de431271ed1b56e57199d2d0"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"b2cdaca34cefa9d55daa6ad055887597bf95fe24","unresolved":false,"context_lines":[{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        # handle optional user-id for admin only"},{"line_number":150,"context_line":"        params \u003d urlparse.parse_qs(req.environ.get(\u0027QUERY_STRING\u0027, \u0027\u0027))"},{"line_number":151,"context_line":"        user_id \u003d params.get(\u0027user_id\u0027, [context.user_id])[0]"},{"line_number":152,"context_line":"        if user_id !\u003d context.user_id and not context.is_admin:"},{"line_number":153,"context_line":"            msg \u003d _(\"Only administrators may list other user\u0027s keypairs\")"},{"line_number":154,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUX%2F%2FHfQ%3D","line":151,"updated":"2014-02-17 01:33:26.000000000","message":"Why should we specify context.user_id as a list?\nCan we specify\n\n params.get(\u0027user_id\u0027, context.user_id)[0]\n\n?","commit_id":"553f7db88841f668de431271ed1b56e57199d2d0"},{"author":{"_account_id":5792,"name":"Dan Radez","email":"dradez@redhat.com","username":"dradez"},"change_message_id":"62a9f3e9fd3c4fd7983d1f321630de8500bb7217","unresolved":false,"context_lines":[{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        # handle optional user-id for admin only"},{"line_number":150,"context_line":"        params \u003d urlparse.parse_qs(req.environ.get(\u0027QUERY_STRING\u0027, \u0027\u0027))"},{"line_number":151,"context_line":"        user_id \u003d params.get(\u0027user_id\u0027, [context.user_id])[0]"},{"line_number":152,"context_line":"        if user_id !\u003d context.user_id and not context.is_admin:"},{"line_number":153,"context_line":"            msg \u003d _(\"Only administrators may list other user\u0027s keypairs\")"},{"line_number":154,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAVX%2F%2Fr88%3D","line":151,"in_reply_to":"AAAAUX%2F%2FHfQ%3D","updated":"2014-03-01 02:26:56.000000000","message":"The content here has to match the format that urlparse.parse_qs is generating so they can be handled the same. If you look at the params variable value when the user_id is passed as a query param the data comes out of parse_qs in format:\n{u\u0027user_id\u0027: [u\u00278ec3cdfbf8c449648b626e94776c53d9\u0027]}\nget pulls the list out of the dictionary and the first item in the list it taken and stored in the user_id variable.\n\nIf you remove the brackets from the context.user_id then you would be subscripting a string instead of a list and the default action of using the context.user_id would always fail as you would pull the first letter out of the string of the authed user instead of getting their whole user_id.","commit_id":"553f7db88841f668de431271ed1b56e57199d2d0"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"5ecd1e7871c39a3f9bda55e5acf8a5a2af7fd1b8","unresolved":false,"context_lines":[{"line_number":139,"context_line":""},{"line_number":140,"context_line":"        # handle optional user-id for admin only"},{"line_number":141,"context_line":"        params \u003d urlparse.parse_qs(req.environ.get(\u0027QUERY_STRING\u0027, \u0027\u0027))"},{"line_number":142,"context_line":"        user_id \u003d params.get(\u0027user_id\u0027, [context.user_id])[0]"},{"line_number":143,"context_line":"        if user_id !\u003d context.user_id and not context.is_admin:"},{"line_number":144,"context_line":"            msg \u003d _(\"Only administrators may list other user\u0027s keypairs\")"},{"line_number":145,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_4848b087","line":142,"updated":"2014-11-28 14:28:55.000000000","message":"You don\u0027t need to use the urlparse module here. The request object is a webob.Request object, and the appropriate way to get a query string parameter is like so:\n\n user_id \u003d context.user_id\n if \u0027user_id\u0027 in req.GET.keys():\n     user_id \u003d req.GET.getall(\u0027user_id\u0027)[0]","commit_id":"0da189d99e3d1eff189e913e821e94bec043235b"}],"nova/api/openstack/compute/plugins/v3/keypairs.py":[{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"19150e6e5f74fd22208b556c1d67b75838057598","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"\"\"\"Keypair management extension.\"\"\""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import urlparse"},{"line_number":21,"context_line":"import webob"},{"line_number":22,"context_line":"import webob.exc"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7ac7a964_e7ca684e","line":20,"range":{"start_line":20,"start_character":0,"end_line":20,"end_character":15},"updated":"2014-08-15 07:21:00.000000000","message":"It should be separated from third-party imports due to that is built-in library.","commit_id":"553f7db88841f668de431271ed1b56e57199d2d0"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"b2cdaca34cefa9d55daa6ad055887597bf95fe24","unresolved":false,"context_lines":[{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        # handle optional user-id for admin only"},{"line_number":135,"context_line":"        params \u003d urlparse.parse_qs(req.environ.get(\u0027QUERY_STRING\u0027, \u0027\u0027))"},{"line_number":136,"context_line":"        user_id \u003d params.get(\u0027user_id\u0027, [context.user_id])[0]"},{"line_number":137,"context_line":"        if user_id !\u003d context.user_id and not context.is_admin:"},{"line_number":138,"context_line":"            msg \u003d _(\"Only administrators may list other user\u0027s keypairs\")"},{"line_number":139,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUX%2F%2FHfk%3D","line":136,"updated":"2014-02-17 01:33:26.000000000","message":"ditto","commit_id":"553f7db88841f668de431271ed1b56e57199d2d0"},{"author":{"_account_id":5792,"name":"Dan Radez","email":"dradez@redhat.com","username":"dradez"},"change_message_id":"62a9f3e9fd3c4fd7983d1f321630de8500bb7217","unresolved":false,"context_lines":[{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        # handle optional user-id for admin only"},{"line_number":135,"context_line":"        params \u003d urlparse.parse_qs(req.environ.get(\u0027QUERY_STRING\u0027, \u0027\u0027))"},{"line_number":136,"context_line":"        user_id \u003d params.get(\u0027user_id\u0027, [context.user_id])[0]"},{"line_number":137,"context_line":"        if user_id !\u003d context.user_id and not context.is_admin:"},{"line_number":138,"context_line":"            msg \u003d _(\"Only administrators may list other user\u0027s keypairs\")"},{"line_number":139,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAVX%2F%2Fr8U%3D","line":136,"in_reply_to":"AAAAUX%2F%2FHfk%3D","updated":"2014-03-01 02:26:56.000000000","message":"ditto :)","commit_id":"553f7db88841f668de431271ed1b56e57199d2d0"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"5ecd1e7871c39a3f9bda55e5acf8a5a2af7fd1b8","unresolved":false,"context_lines":[{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        # handle optional user-id for admin only"},{"line_number":134,"context_line":"        params \u003d urlparse.parse_qs(req.environ.get(\u0027QUERY_STRING\u0027, \u0027\u0027))"},{"line_number":135,"context_line":"        user_id \u003d params.get(\u0027user_id\u0027, [context.user_id])[0]"},{"line_number":136,"context_line":"        if user_id !\u003d context.user_id and not context.is_admin:"},{"line_number":137,"context_line":"            msg \u003d _(\"Only administrators may list other user\u0027s keypairs\")"},{"line_number":138,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_2843646d","line":135,"updated":"2014-11-28 14:28:55.000000000","message":"ditto","commit_id":"0da189d99e3d1eff189e913e821e94bec043235b"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"a2f555ed72ce2910cac06bc2bbfa0ba7043cf0f2","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        return {\u0027keypair\u0027: keypair}"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    @wsgi.Controller.api_version(\"2.4\")"},{"line_number":176,"context_line":"    @extensions.expected_errors((403,))"},{"line_number":177,"context_line":"    def index(self, req):"},{"line_number":178,"context_line":"        # handle optional user-id for admin only"},{"line_number":179,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_447a6abe","line":176,"updated":"2015-05-30 15:16:57.000000000","message":"The policy enforcement error will be catch by expected_errors internal, so we needn\u0027t explictly show 403 at here.","commit_id":"bb9dcf1cf297ae3c728ab6f6a8b2ca58eb6e4e34"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"b819240c30926afed9c8dbab17370fc4e1553968","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        return {\u0027keypair\u0027: keypair}"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    @wsgi.Controller.api_version(\"2.4\")"},{"line_number":176,"context_line":"    @extensions.expected_errors((403,))"},{"line_number":177,"context_line":"    def index(self, req):"},{"line_number":178,"context_line":"        # handle optional user-id for admin only"},{"line_number":179,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"}],"source_content_type":"text/x-python","patch_set":9,"id":"5afe65bd_7795afe2","line":176,"in_reply_to":"7a016987_447a6abe","updated":"2015-06-02 15:42:46.000000000","message":"Done","commit_id":"bb9dcf1cf297ae3c728ab6f6a8b2ca58eb6e4e34"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"1700c8b33d84ee8c6d94783c27d88dfc8debc8a6","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        You can send a public_key to add an existing ssh/x509 key."},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        Only admins can create keys on behalf of their users."},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        params: keypair object with:"},{"line_number":71,"context_line":"            name (required) - string"}],"source_content_type":"text/x-python","patch_set":12,"id":"3afb71cf_39e13e9b","line":68,"updated":"2015-06-08 14:28:29.000000000","message":"is it better we only describe the different compare to previous version? Avoid a lot of duplicate comment.","commit_id":"bfa546621d40e526b4aa3b42e91c8edc0ecda965"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"cab02565a6d39d881272434c21f8caa9c0ac7b27","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        You can send a public_key to add an existing ssh/x509 key."},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        Only admins can create keys on behalf of their users."},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        params: keypair object with:"},{"line_number":71,"context_line":"            name (required) - string"}],"source_content_type":"text/x-python","patch_set":12,"id":"3afb71cf_35a8d31f","line":68,"in_reply_to":"3afb71cf_39e13e9b","updated":"2015-06-09 21:36:03.000000000","message":"+1.  Also, since this is controllable via policy it\u0027s not correct to say only an admin can do it.  Maybe just say that a policy check restricts users from creating keys for other users.","commit_id":"bfa546621d40e526b4aa3b42e91c8edc0ecda965"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"1700c8b33d84ee8c6d94783c27d88dfc8debc8a6","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":77,"context_line":"        # handle optional user-id for admin only"},{"line_number":78,"context_line":"        user_id \u003d body[\u0027keypair\u0027].get(\u0027user_id\u0027) or context.user_id"},{"line_number":79,"context_line":"        authorize(context, action\u003d\u0027create\u0027, target\u003d{\u0027user_id\u0027: user_id})"},{"line_number":80,"context_line":"        return self._create(req, body, type\u003dTrue, user_id\u003duser_id)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    @wsgi.Controller.api_version(\"2.2\", \"2.3\")  # noqa"}],"source_content_type":"text/x-python","patch_set":12,"id":"3afb71cf_194b2289","line":79,"updated":"2015-06-08 14:28:29.000000000","message":"the target better to include project id also.\n\n{\u0027user_id\u0027: user_id, \u0027project_id\u0027: context.project_id}\n\nAlthough it is useless. But it can avoid there is error out when operator project_id:%(project_id)s in the policy rule.","commit_id":"bfa546621d40e526b4aa3b42e91c8edc0ecda965"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"cab02565a6d39d881272434c21f8caa9c0ac7b27","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":77,"context_line":"        # handle optional user-id for admin only"},{"line_number":78,"context_line":"        user_id \u003d body[\u0027keypair\u0027].get(\u0027user_id\u0027) or context.user_id"},{"line_number":79,"context_line":"        authorize(context, action\u003d\u0027create\u0027, target\u003d{\u0027user_id\u0027: user_id})"},{"line_number":80,"context_line":"        return self._create(req, body, type\u003dTrue, user_id\u003duser_id)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    @wsgi.Controller.api_version(\"2.2\", \"2.3\")  # noqa"}],"source_content_type":"text/x-python","patch_set":12,"id":"3afb71cf_980b3e24","line":79,"in_reply_to":"3afb71cf_194b2289","updated":"2015-06-09 21:36:03.000000000","message":"Agreed.  The default is to pull user_id/project_id from the context so it would be good to include both since operators will expect both to work in a policy setting.","commit_id":"bfa546621d40e526b4aa3b42e91c8edc0ecda965"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"1700c8b33d84ee8c6d94783c27d88dfc8debc8a6","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":185,"context_line":"        # handle optional user-id for admin only"},{"line_number":186,"context_line":"        user_id \u003d self._get_user_id(req)"},{"line_number":187,"context_line":"        authorize(context, action\u003d\u0027show\u0027, target\u003d{\u0027user_id\u0027: user_id})"},{"line_number":188,"context_line":"        return self._show(req, id, type\u003dTrue, user_id\u003duser_id)"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"    @wsgi.Controller.api_version(\"2.2\", \"2.3\")  # noqa"}],"source_content_type":"text/x-python","patch_set":12,"id":"3afb71cf_546ddf96","line":187,"updated":"2015-06-08 14:28:29.000000000","message":"ditto","commit_id":"bfa546621d40e526b4aa3b42e91c8edc0ecda965"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"1700c8b33d84ee8c6d94783c27d88dfc8debc8a6","unresolved":false,"context_lines":[{"line_number":224,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":225,"context_line":"        # handle optional user-id for admin only"},{"line_number":226,"context_line":"        user_id \u003d self._get_user_id(req)"},{"line_number":227,"context_line":"        authorize(context, action\u003d\u0027index\u0027, target\u003d{\u0027user_id\u0027: user_id})"},{"line_number":228,"context_line":"        return self._index(req, type\u003dTrue, user_id\u003duser_id)"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"    @wsgi.Controller.api_version(\"2.2\", \"2.3\")  # noqa"}],"source_content_type":"text/x-python","patch_set":12,"id":"3afb71cf_145f67e6","line":227,"updated":"2015-06-08 14:28:29.000000000","message":"ditto","commit_id":"bfa546621d40e526b4aa3b42e91c8edc0ecda965"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"d7ccdaba9b417bf8c0d9f17861731c377dd4a1e9","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    @wsgi.Controller.api_version(\"2.7\")"},{"line_number":55,"context_line":"    @wsgi.response(201)"},{"line_number":56,"context_line":"    @extensions.expected_errors((400, 403, 409))"},{"line_number":57,"context_line":"    @validation.schema(keypairs.create_v27)"},{"line_number":58,"context_line":"    def create(self, req, body):"},{"line_number":59,"context_line":"        \"\"\"Create or import keypair."},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"ba3cc151_264b7061","line":57,"updated":"2015-07-10 11:08:38.000000000","message":"so I have a feeling this is the only bit you need.\n\nYou could just add all the logic into a common code path, I think.\n\nThe validation will ensure you only get the extra param when its using the newer microversion.\n\nBut I am interested to see what others think about that.\n\nThat might be an easier way to fix the duplicate authorization logic.","commit_id":"f429de8a2b560c427c184772a223205d1409320f"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"d7ccdaba9b417bf8c0d9f17861731c377dd4a1e9","unresolved":false,"context_lines":[{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    def _create(self, req, body, user_id\u003dNone, **keypair_filters):"},{"line_number":116,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":117,"context_line":"        authorize(context, action\u003d\u0027create\u0027)"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        params \u003d body[\u0027keypair\u0027]"},{"line_number":120,"context_line":"        name \u003d params[\u0027name\u0027]"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba3cc151_9b72d510","line":117,"updated":"2015-07-10 11:08:38.000000000","message":"This seems like a duplicate here, should this not be only for 2.1 and 2.2?\n\nAlthough maybe better just to move all your logic into this common method.","commit_id":"f429de8a2b560c427c184772a223205d1409320f"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"d7ccdaba9b417bf8c0d9f17861731c377dd4a1e9","unresolved":false,"context_lines":[{"line_number":157,"context_line":"    def delete(self, req, id):"},{"line_number":158,"context_line":"        self._delete(req, id)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def _delete(self, req, id):"},{"line_number":161,"context_line":"        \"\"\"Delete a keypair with a given name.\"\"\""},{"line_number":162,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":163,"context_line":"        authorize(context, action\u003d\u0027delete\u0027)"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba3cc151_9be09598","line":160,"updated":"2015-07-10 11:08:38.000000000","message":"I do have a feeling we should add this user stuff for delete as well, just for consistency really.\n\nWe could turn it off in the default policy, but I feel we should do the leg work in this microversion bump to enable it.\n\nI know this wasn\u0027t mentioned in the spec, but it just looks inconsistent when you look at the code.","commit_id":"f429de8a2b560c427c184772a223205d1409320f"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"d7ccdaba9b417bf8c0d9f17861731c377dd4a1e9","unresolved":false,"context_lines":[{"line_number":167,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dexc.format_message())"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def _get_user_id(self, req):"},{"line_number":170,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":171,"context_line":"        user_id \u003d context.user_id"},{"line_number":172,"context_line":"        if \u0027user_id\u0027 in req.GET.keys():"},{"line_number":173,"context_line":"            user_id \u003d req.GET.getall(\u0027user_id\u0027)[0]"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba3cc151_06cd0cb7","line":170,"updated":"2015-07-10 11:08:38.000000000","message":"if you put the version check in here, I think you can share more code between all the different code paths more easily. although i could be wrong, it might end up very messy.","commit_id":"f429de8a2b560c427c184772a223205d1409320f"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"5fbc58d4d61c9075e4b4082c7fb48da46b46e99d","unresolved":false,"context_lines":[{"line_number":197,"context_line":"    def _show(self, req, id, user_id\u003dNone, **keypair_filters):"},{"line_number":198,"context_line":"        \"\"\"Return data for the given key name.\"\"\""},{"line_number":199,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":200,"context_line":"        authorize(context, action\u003d\u0027show\u0027)"},{"line_number":201,"context_line":"        user_id \u003d user_id or context.user_id"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba3cc151_299d9566","line":200,"updated":"2015-07-10 01:04:58.000000000","message":"we should move the line 182 at here. And then we get different user_id paramter from different API version. Otherwise for 2.7, we execute policy enforcement double time.","commit_id":"f429de8a2b560c427c184772a223205d1409320f"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"d7ccdaba9b417bf8c0d9f17861731c377dd4a1e9","unresolved":false,"context_lines":[{"line_number":197,"context_line":"    def _show(self, req, id, user_id\u003dNone, **keypair_filters):"},{"line_number":198,"context_line":"        \"\"\"Return data for the given key name.\"\"\""},{"line_number":199,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":200,"context_line":"        authorize(context, action\u003d\u0027show\u0027)"},{"line_number":201,"context_line":"        user_id \u003d user_id or context.user_id"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba3cc151_1ba2454c","line":200,"in_reply_to":"ba3cc151_299d9566","updated":"2015-07-10 11:08:38.000000000","message":"+1 same for all the other actions.","commit_id":"f429de8a2b560c427c184772a223205d1409320f"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"5fbc58d4d61c9075e4b4082c7fb48da46b46e99d","unresolved":false,"context_lines":[{"line_number":239,"context_line":"    def _index(self, req, user_id\u003dNone, **keypair_filters):"},{"line_number":240,"context_line":"        \"\"\"List of keypairs for a user.\"\"\""},{"line_number":241,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":242,"context_line":"        authorize(context, action\u003d\u0027index\u0027)"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"        user_id \u003d user_id or context.user_id"},{"line_number":245,"context_line":"        key_pairs \u003d self.api.get_key_pairs(context, user_id)"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba3cc151_899e2153","line":242,"updated":"2015-07-10 01:04:58.000000000","message":"Same concern with show","commit_id":"f429de8a2b560c427c184772a223205d1409320f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8bf6b50818cbbc309ab1a556fcc6a6209b6f8d98","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        user_id \u003d body[\u0027keypair\u0027].get(\u0027user_id\u0027) or context.user_id"},{"line_number":113,"context_line":"        authorize(context, action\u003d\u0027create\u0027,"},{"line_number":114,"context_line":"                           target\u003d{\u0027user_id\u0027: user_id,"},{"line_number":115,"context_line":"                                   \u0027project_id\u0027: context.project_id})"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        params \u003d body[\u0027keypair\u0027]"},{"line_number":118,"context_line":"        name \u003d params[\u0027name\u0027]"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a50d1a3_deb2b605","line":115,"updated":"2015-07-23 14:27:19.000000000","message":"So, the problem I have with this implementation is that to the code reader, it is not obvious that the 2.7 microversion introduces a change to the way that the POST /keypairs request is actually authorized.\n\nI would prefer to see code that is explicit about that change in behaviour. For instance, we could do the authorize() call in the microversion create() method implementations instead of the shared _create() method here.\n\nFor example, we could do something like this, which I believe is much easier for the code reader to see what changed in between 2.6 and 2.7 microversions:\n\n @wsgi.Controller.api_version(\"2.7\")\n @extensions.expected_errors((400, 403, 409))\n @validation.schema(keypairs.create_v27)\n def create(self, req, body):\n     context \u003d req.environ[\u0027nova.context\u0027]\n     # handle optional user-id for admin only\n     user_id \u003d body[\u0027keypair\u0027].get(\u0027user_id\u0027) or context.user_id\n     authorize(context, action\u003d\u0027create\u0027,\n                     target\u003d{\u0027user_id\u0027: user_id,\n                     \u0027project_id\u0027: context.project_id})\n     self._create(body, user_id\u003duser_id)\n\n @wsgi.Controller.api_version(\"2.2\", \"2.6\")  # noqa\n @extensions.expected_errors((400, 403, 409))\n @validation.schema(keypairs.create_v22)\n def create(self, req, body):\n     context \u003d req.environ[\u0027nova.context\u0027]\n     authorize(context, action\u003d\u0027create\u0027)\n     self._create(body, user_id\u003dcontext.user_id)\n\n def _create(self, body, user_id\u003dNone):\n     params \u003d body[\u0027keypair\u0027]\n     name \u003d params[\u0027name\u0027]\n     key_type \u003d params.get(\u0027type\u0027, keypair_obj.KEYPAIR_TYPE_SSH)\n \n     try:\n         \u003csame code as below...\u003e","commit_id":"fe8610dec16d6dbbaf05de35dd0c92b069e3a2c8"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"6498079ffdbcc7a9cf9672da4c40d1294ad5baf7","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        user_id \u003d body[\u0027keypair\u0027].get(\u0027user_id\u0027) or context.user_id"},{"line_number":113,"context_line":"        authorize(context, action\u003d\u0027create\u0027,"},{"line_number":114,"context_line":"                           target\u003d{\u0027user_id\u0027: user_id,"},{"line_number":115,"context_line":"                                   \u0027project_id\u0027: context.project_id})"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        params \u003d body[\u0027keypair\u0027]"},{"line_number":118,"context_line":"        name \u003d params[\u0027name\u0027]"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a50d1a3_7a6ceecf","line":115,"in_reply_to":"3a50d1a3_deb2b605","updated":"2015-07-29 04:16:53.000000000","message":"Thanks, yes.. I had exactly that in the previous versions, but people where complaining about the auth part and i\u0027ve decided t merge, not noticing that I\u0027m breaking the previous behaviour.","commit_id":"fe8610dec16d6dbbaf05de35dd0c92b069e3a2c8"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8bf6b50818cbbc309ab1a556fcc6a6209b6f8d98","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        user_id \u003d context.user_id"},{"line_number":174,"context_line":"        if \u0027user_id\u0027 in req.GET.keys():"},{"line_number":175,"context_line":"            user_id \u003d req.GET.getall(\u0027user_id\u0027)[0]"},{"line_number":176,"context_line":"        return user_id"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    @wsgi.Controller.api_version(\"2.2\", \"2.7\")"},{"line_number":179,"context_line":"    @extensions.expected_errors(404)"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a50d1a3_3e663a51","line":176,"updated":"2015-07-23 14:27:19.000000000","message":"And here, the problem is you allow microversions \u003c 2.7 to specify user_id in the query params and change the behaviour of microversions 2.1 through 2.6 with the user having no indication that the behaviour has changed. :(\n\nThe above needs to have a separate 2.7 microversion delete() method that allows user_id query param, and leave the 2.1 through 2.6 microversion delete() method having the same behaviour as before.","commit_id":"fe8610dec16d6dbbaf05de35dd0c92b069e3a2c8"}],"nova/api/openstack/compute/schemas/v3/keypairs.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"d7ccdaba9b417bf8c0d9f17861731c377dd4a1e9","unresolved":false,"context_lines":[{"line_number":65,"context_line":"                    \u0027enum\u0027: [\u0027ssh\u0027, \u0027x509\u0027]"},{"line_number":66,"context_line":"                },"},{"line_number":67,"context_line":"                \u0027public_key\u0027: {\u0027type\u0027: \u0027string\u0027},"},{"line_number":68,"context_line":"                \u0027user_id\u0027: {\u0027type\u0027: \u0027string\u0027},"},{"line_number":69,"context_line":"            },"},{"line_number":70,"context_line":"            \u0027required\u0027: [\u0027name\u0027],"},{"line_number":71,"context_line":"            \u0027additionalProperties\u0027: False,"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba3cc151_9b017509","line":68,"updated":"2015-07-10 11:08:38.000000000","message":"Hmm, I do wonder if we should reduce the cut and past duplication here, but lets just follow the pattern for now.","commit_id":"f429de8a2b560c427c184772a223205d1409320f"}],"nova/api/openstack/rest_api_version_history.rst":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"1700c8b33d84ee8c6d94783c27d88dfc8debc8a6","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"- **2.4**"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"  Added user_id\u003d parameter to os-keypairs plugin"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"  Administrators will be able to list and get details a keypairs which owned by"},{"line_number":55,"context_line":"  users other than themselves and to create new keypairs on behalf of their"}],"source_content_type":"text/x-rst","patch_set":12,"id":"3afb71cf_d4b42ff3","line":52,"updated":"2015-06-08 14:28:29.000000000","message":"for create, this isn\u0027t \"user_id\u003d\" parameter. It should new property in the request body.","commit_id":"bfa546621d40e526b4aa3b42e91c8edc0ecda965"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"5fbc58d4d61c9075e4b4082c7fb48da46b46e99d","unresolved":false,"context_lines":[{"line_number":95,"context_line":"---"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"  Added user_id parameter to os-keypairs plugin, as well as a new property"},{"line_number":98,"context_line":"  in the request body, fo rthe create operation."},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"  Administrators will be able to list and get details a keypairs which owned by"},{"line_number":101,"context_line":"  users other than themselves and to create new keypairs on behalf of their"}],"source_content_type":"text/x-rst","patch_set":18,"id":"ba3cc151_c9e989b9","line":98,"updated":"2015-07-10 01:04:58.000000000","message":"s/fo rthe/ or the/","commit_id":"f429de8a2b560c427c184772a223205d1409320f"}],"nova/tests/api/openstack/compute/plugins/v3/test_keypairs.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"5ecd1e7871c39a3f9bda55e5acf8a5a2af7fd1b8","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Copyright 2011 Eldar Nugaev"},{"line_number":4,"context_line":"# All Rights Reserved."},{"line_number":5,"context_line":"#"},{"line_number":6,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_c87ca0b8","line":3,"updated":"2014-11-28 14:28:55.000000000","message":"Is this a copy/paste thing or is this copyright correct?","commit_id":"0da189d99e3d1eff189e913e821e94bec043235b"}],"nova/tests/functional/v3/test_keypairs.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8bf6b50818cbbc309ab1a556fcc6a6209b6f8d98","unresolved":false,"context_lines":[{"line_number":211,"context_line":"        response \u003d self._do_delete(\u0027os-keypairs/%s?user_id\u003dfake\u0027 % key_name,"},{"line_number":212,"context_line":"                                   api_version\u003dself.request_api_version)"},{"line_number":213,"context_line":"        self.assertEqual(self.expected_delete_status_code,"},{"line_number":214,"context_line":"                         response.status_code)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"class KeyPairsV27SampleJsonTestNotAdmin(KeyPairsV27SampleJsonTest):"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a50d1a3_3e695af9","line":214,"updated":"2015-07-23 14:27:19.000000000","message":"If you added a unit test that tried to request DELETE /keypairs?user_id\u003dXXX, you would see that you\u0027ve accidentally changed the behaviour of the previous microversions...","commit_id":"fe8610dec16d6dbbaf05de35dd0c92b069e3a2c8"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"cb4421b1b61687a2b6306cf2e7bf5b06fa588697","unresolved":false,"context_lines":[{"line_number":187,"context_line":"        }"},{"line_number":188,"context_line":"        self._check_keypairs_post(**subs)"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"    def test_keypairs_post(self):"},{"line_number":191,"context_line":"        return self._check_keypairs_post("},{"line_number":192,"context_line":"            keypair_type\u003dkeypair_obj.KEYPAIR_TYPE_SSH,"},{"line_number":193,"context_line":"            user_id\u003d\"admin\")"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a50d1a3_e77937c9","line":190,"updated":"2015-07-29 12:06:40.000000000","message":"We can remove this, just keep test_keypair_create_for_user is enough. The api sample file is used to api document, to show some example what the api looks like, we needn\u0027t test all the case at here.","commit_id":"99fedad9806806a3b840aaa9bee7ad67918801ac"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"be2b21b678f7ff6263c3cc1b0d2eb570fdf1568f","unresolved":false,"context_lines":[{"line_number":187,"context_line":"        }"},{"line_number":188,"context_line":"        self._check_keypairs_post(**subs)"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"    def test_keypairs_post(self):"},{"line_number":191,"context_line":"        return self._check_keypairs_post("},{"line_number":192,"context_line":"            keypair_type\u003dkeypair_obj.KEYPAIR_TYPE_SSH,"},{"line_number":193,"context_line":"            user_id\u003d\"admin\")"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a50d1a3_88896371","line":190,"in_reply_to":"3a50d1a3_e77937c9","updated":"2015-07-29 12:39:54.000000000","message":"This method has to be overridden here, the template in 2.9 requires a user_id to be passed an previously it was not a requirement, so self._read_template(name) fails.","commit_id":"99fedad9806806a3b840aaa9bee7ad67918801ac"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"cb4421b1b61687a2b6306cf2e7bf5b06fa588697","unresolved":false,"context_lines":[{"line_number":214,"context_line":"                         response.status_code)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"class KeyPairsV29SampleJsonTestNotAdmin(KeyPairsV29SampleJsonTest):"},{"line_number":218,"context_line":"    ADMIN_API \u003d False"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"    def test_keypairs_post(self):"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a50d1a3_c7f51b51","line":217,"updated":"2015-07-29 12:06:40.000000000","message":"I guess functional test will failed. \n\nBecause this share same api sample file with KeyPairsV29SampleJsonTest.\n\nI think we needn\u0027t this. Just keep KeyPairsV29SampleJsonTest","commit_id":"99fedad9806806a3b840aaa9bee7ad67918801ac"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"be2b21b678f7ff6263c3cc1b0d2eb570fdf1568f","unresolved":false,"context_lines":[{"line_number":214,"context_line":"                         response.status_code)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"class KeyPairsV29SampleJsonTestNotAdmin(KeyPairsV29SampleJsonTest):"},{"line_number":218,"context_line":"    ADMIN_API \u003d False"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"    def test_keypairs_post(self):"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a50d1a3_c848cb2f","line":217,"in_reply_to":"3a50d1a3_c7f51b51","updated":"2015-07-29 12:39:54.000000000","message":"I think we have already discussed this. This class validates that a non-admin user cannot post on operate on behalf of other users.. It\u0027s not possible to test this in the \nKeyPairsV29SampleJsonTest class.","commit_id":"99fedad9806806a3b840aaa9bee7ad67918801ac"}],"nova/tests/unit/api/openstack/compute/contrib/test_keypairs.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"a2f555ed72ce2910cac06bc2bbfa0ba7043cf0f2","unresolved":false,"context_lines":[{"line_number":410,"context_line":"                                      use_admin_context\u003dTrue)"},{"line_number":411,"context_line":"        with mock.patch.object(self.controller.api, \u0027get_key_pairs\u0027) as mock_g:"},{"line_number":412,"context_line":"            self.controller.index(req)"},{"line_number":413,"context_line":"            userid \u003d mock_g.call_args_list[0][0][1]"},{"line_number":414,"context_line":"            self.assertEqual(\u0027foo\u0027, userid)"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    def test_keypair_list_other_user_not_admin(self):"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a016987_a44fde90","line":413,"updated":"2015-05-30 15:16:57.000000000","message":"nit, we can use assert_called_once_with directly, then it\u0027s more easy? but it\u0027s fine","commit_id":"bb9dcf1cf297ae3c728ab6f6a8b2ca58eb6e4e34"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"b819240c30926afed9c8dbab17370fc4e1553968","unresolved":false,"context_lines":[{"line_number":410,"context_line":"                                      use_admin_context\u003dTrue)"},{"line_number":411,"context_line":"        with mock.patch.object(self.controller.api, \u0027get_key_pairs\u0027) as mock_g:"},{"line_number":412,"context_line":"            self.controller.index(req)"},{"line_number":413,"context_line":"            userid \u003d mock_g.call_args_list[0][0][1]"},{"line_number":414,"context_line":"            self.assertEqual(\u0027foo\u0027, userid)"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    def test_keypair_list_other_user_not_admin(self):"}],"source_content_type":"text/x-python","patch_set":9,"id":"5afe65bd_57c193e3","line":413,"in_reply_to":"7a016987_a44fde90","updated":"2015-06-02 15:42:46.000000000","message":"Thanks, but I doubt it\u0027s easier.","commit_id":"bb9dcf1cf297ae3c728ab6f6a8b2ca58eb6e4e34"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"9dea3d5399ad95e3b9d33d568a7ceff2d9d6a5fa","unresolved":false,"context_lines":[{"line_number":411,"context_line":"        with mock.patch.object(self.controller.api, \u0027get_key_pairs\u0027) as mock_g:"},{"line_number":412,"context_line":"            self.controller.index(req)"},{"line_number":413,"context_line":"            userid \u003d mock_g.call_args_list[0][0][1]"},{"line_number":414,"context_line":"            self.assertEqual(\u0027foo\u0027, userid)"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    def test_keypair_list_other_user_not_admin(self):"},{"line_number":417,"context_line":"        req \u003d fakes.HTTPRequest.blank(self.base_url +"}],"source_content_type":"text/x-python","patch_set":10,"id":"5afe65bd_f7e2be9e","line":414,"updated":"2015-06-02 15:58:40.000000000","message":"Why wouldn\u0027t assert_called_once_with() not be easier?  Using it should transform these last two lines to:\n\n    mock_g.assert_called_once_with(req.environ[\u0027nova.context\u0027], \u0027foo\u0027)","commit_id":"7cec586c835fc571ebacffca0c78aba71825b4af"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"28acfd8d09b5d8179f5f3456712ee022c4d9eec5","unresolved":false,"context_lines":[{"line_number":411,"context_line":"        with mock.patch.object(self.controller.api, \u0027get_key_pairs\u0027) as mock_g:"},{"line_number":412,"context_line":"            self.controller.index(req)"},{"line_number":413,"context_line":"            userid \u003d mock_g.call_args_list[0][0][1]"},{"line_number":414,"context_line":"            self.assertEqual(\u0027foo\u0027, userid)"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    def test_keypair_list_other_user_not_admin(self):"},{"line_number":417,"context_line":"        req \u003d fakes.HTTPRequest.blank(self.base_url +"}],"source_content_type":"text/x-python","patch_set":10,"id":"5afe65bd_1678aa8e","line":414,"in_reply_to":"5afe65bd_34b04743","updated":"2015-06-02 23:15:59.000000000","message":"A feature of the mock library that I underutilize but just remembered may be helpful for you here, too:  mock.ANY.  That would turn the assert into:\n\n    mock_g.assert_called_once_with(mock.ANY, \u0027foo\u0027)\n\nThat may be a little clearer.","commit_id":"7cec586c835fc571ebacffca0c78aba71825b4af"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"2a2bcbb1d0f58082d43c1ab4d8db5be9191d708f","unresolved":false,"context_lines":[{"line_number":411,"context_line":"        with mock.patch.object(self.controller.api, \u0027get_key_pairs\u0027) as mock_g:"},{"line_number":412,"context_line":"            self.controller.index(req)"},{"line_number":413,"context_line":"            userid \u003d mock_g.call_args_list[0][0][1]"},{"line_number":414,"context_line":"            self.assertEqual(\u0027foo\u0027, userid)"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    def test_keypair_list_other_user_not_admin(self):"},{"line_number":417,"context_line":"        req \u003d fakes.HTTPRequest.blank(self.base_url +"}],"source_content_type":"text/x-python","patch_set":10,"id":"5afe65bd_34b04743","line":414,"in_reply_to":"5afe65bd_f7e2be9e","updated":"2015-06-02 19:54:56.000000000","message":"Well, because it doesn\u0027t make it easier to understand what are we testing here, with the current code it\u0027s very clear.\nI\u0027m not going to argue about, if people will continue to oppose this, I\u0027ll change.","commit_id":"7cec586c835fc571ebacffca0c78aba71825b4af"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"1700c8b33d84ee8c6d94783c27d88dfc8debc8a6","unresolved":false,"context_lines":[{"line_number":402,"context_line":""},{"line_number":403,"context_line":"class KeypairsTestV24(KeypairsTestV22):"},{"line_number":404,"context_line":"    wsgi_api_version \u003d \u00272.4\u0027"},{"line_number":405,"context_line":"    policy_path \u003d \u0027os_compute_api:os-keypairs\u0027"},{"line_number":406,"context_line":""},{"line_number":407,"context_line":"    def test_keypair_list_other_user(self):"},{"line_number":408,"context_line":"        req \u003d fakes.HTTPRequest.blank(self.base_url +"}],"source_content_type":"text/x-python","patch_set":12,"id":"3afb71cf_54dcbf11","line":405,"updated":"2015-06-08 14:28:29.000000000","message":"this already assign in the super class. So we needn\u0027t this line.","commit_id":"bfa546621d40e526b4aa3b42e91c8edc0ecda965"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"1700c8b33d84ee8c6d94783c27d88dfc8debc8a6","unresolved":false,"context_lines":[{"line_number":476,"context_line":"                                      version\u003dself.wsgi_api_version)"},{"line_number":477,"context_line":"        body \u003d {\u0027keypair\u0027: {\u0027name\u0027: \u0027create_test\u0027,"},{"line_number":478,"context_line":"                            \u0027user_id\u0027: \u00278861f37f-034e-4ca8-8abe-6d13c074574a\u0027}}"},{"line_number":479,"context_line":"        self.assertRaises(exception.Forbidden,"},{"line_number":480,"context_line":"                          self.controller.create,"},{"line_number":481,"context_line":"                          req, body\u003dbody)"},{"line_number":482,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3afb71cf_544f1fbd","line":479,"updated":"2015-06-08 14:28:29.000000000","message":"we should catch PolcyNotAuthorized. Forbidden is too generic.","commit_id":"bfa546621d40e526b4aa3b42e91c8edc0ecda965"}]}
