)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"232fdfc49266f9e380e916b9729a4424b5bd0633","unresolved":false,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This spec is meant to have general aggrement"},{"line_number":15,"context_line":"on what the whitelist should be across the"},{"line_number":16,"context_line":"team before coding."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: I7d0735b4697b22f74cf7700bca65eb38161744e8"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9a629dbe_d8ecc091","line":16,"updated":"2016-11-09 08:48:17.000000000","message":"we need a blueprint at here","commit_id":"ecd14996a28b6640eb96ea7c7b980acddd8dd411"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9ffc4568aa0ac5b0aeabfdd669baa925e66c512d","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add whitelist for filter and sort query parameters for server list API"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently the filter and sort query parameters can be used for"},{"line_number":10,"context_line":"`Server List` API are not explicit defined (the filters that"},{"line_number":11,"context_line":"can be used for non-admin users are defined)."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"7a77a97e_58cdd3b5","line":9,"range":{"start_line":9,"start_character":47,"end_line":9,"end_character":50},"updated":"2016-11-17 21:15:43.000000000","message":"that can","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9ffc4568aa0ac5b0aeabfdd669baa925e66c512d","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add whitelist for filter and sort query parameters for server list API"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently the filter and sort query parameters can be used for"},{"line_number":10,"context_line":"`Server List` API are not explicit defined (the filters that"},{"line_number":11,"context_line":"can be used for non-admin users are defined)."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This spec aims to propose to add whitelists for this API to"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"7a77a97e_38c817a8","line":10,"range":{"start_line":10,"start_character":26,"end_line":10,"end_character":34},"updated":"2016-11-17 21:15:43.000000000","message":"explicitly","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9ffc4568aa0ac5b0aeabfdd669baa925e66c512d","unresolved":false,"context_lines":[{"line_number":11,"context_line":"can be used for non-admin users are defined)."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This spec aims to propose to add whitelists for this API to"},{"line_number":14,"context_line":"strict the filter and sort query parameters that can be used"},{"line_number":15,"context_line":"when calling `GET /servers` API."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"APIImpact"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"7a77a97e_d8b9e316","line":14,"range":{"start_line":14,"start_character":0,"end_line":14,"end_character":6},"updated":"2016-11-17 21:15:43.000000000","message":"restrict","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"}],"specs/ocata/approved/add-whitelist-for-server-list-filter-sort-parameters.rst":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"8a59af22a391dd47b9b90c146f650440535cf202","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        \u0027type\u0027: \u0027string\u0027, \u0027minLength\u0027: 1, \u0027maxLength\u0027: 255,"},{"line_number":169,"context_line":"        \u0027pattern\u0027: \u0027^[a-zA-Z0-9-._]*$\u0027"},{"line_number":170,"context_line":"        }"},{"line_number":171,"context_line":"}"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"Security impact"},{"line_number":174,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a77a97e_2ec146e5","line":171,"updated":"2016-11-15 08:03:19.000000000","message":"The schema looks like not right, let me try to update this.","commit_id":"22f7d82849a43a08761f0b61351bd0c3d4d7d03e"},{"author":{"_account_id":16907,"name":"Diana Clarke","email":"diana.joan.clarke@gmail.com","username":"diana-clarke"},"change_message_id":"27b96902de5cddb9dc6fb289efe457cd3c71ef42","unresolved":false,"context_lines":[{"line_number":51,"context_line":"  \u0027ip\u0027, \u0027changes-since\u0027, \u0027all_tenants\u0027, \u0027ip6\u0027, \u0027tags\u0027,"},{"line_number":52,"context_line":"  \u0027tags-any\u0027, \u0027not-tags\u0027, \u0027not-tags-any\u0027]"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"* The filters whitelist for admin users will be a superset of"},{"line_number":55,"context_line":"  the non-admin whitelist and the following parameters will be"},{"line_number":56,"context_line":"  appended to the non-admin users\u0027 whitelist:"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"  [\u0027project_id\u0027, \u0027created_at\u0027, \u0027uuid\u0027, \u0027terminated_at\u0027"}],"source_content_type":"text/x-rst","patch_set":5,"id":"7a77a97e_b3e672b2","line":55,"range":{"start_line":54,"start_character":2,"end_line":55,"end_character":25},"updated":"2016-11-16 03:20:10.000000000","message":"Perhaps I missed it, or it\u0027s part of the API plumbing that I\u0027m not yet familiar with, but how do you propose to implement different query parameter schemas for difference personas (for example: admin vs non-admin)?","commit_id":"0437c6d6066bd105fd3e417b3272bf27f9902708"},{"author":{"_account_id":16907,"name":"Diana Clarke","email":"diana.joan.clarke@gmail.com","username":"diana-clarke"},"change_message_id":"3845e74bf1c91796e5ffcbb3b451e77ccbac6b96","unresolved":false,"context_lines":[{"line_number":51,"context_line":"  \u0027ip\u0027, \u0027changes-since\u0027, \u0027all_tenants\u0027, \u0027ip6\u0027, \u0027tags\u0027,"},{"line_number":52,"context_line":"  \u0027tags-any\u0027, \u0027not-tags\u0027, \u0027not-tags-any\u0027]"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"* The filters whitelist for admin users will be a superset of"},{"line_number":55,"context_line":"  the non-admin whitelist and the following parameters will be"},{"line_number":56,"context_line":"  appended to the non-admin users\u0027 whitelist:"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"  [\u0027project_id\u0027, \u0027created_at\u0027, \u0027uuid\u0027, \u0027terminated_at\u0027"}],"source_content_type":"text/x-rst","patch_set":5,"id":"7a77a97e_aa02456d","line":55,"range":{"start_line":54,"start_character":2,"end_line":55,"end_character":25},"in_reply_to":"7a77a97e_a24e0294","updated":"2016-11-16 20:11:03.000000000","message":"Right, that\u0027s how it is now, but how is the differentiation going to be implemented at a schema level going forward? I looked, but I couldn\u0027t find a POC for this spec to answer the question for myself.\n\nOr is this an example of a case where additional validation will still have to happen after the jsonschema query parameter validation? That is, define the superset, validate using jsonschema, and then validate again (in plain old python code) based on persona?\n\nFeel free to ignore this question if you folks already grok how this is going to work for admin vs non-admin schemas. I can keep an eye out for the final implementation \u0026 have my eureka moment then ;)","commit_id":"0437c6d6066bd105fd3e417b3272bf27f9902708"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"5ac4a58bc599981c72fcfe029ec7b84c3e1e602b","unresolved":false,"context_lines":[{"line_number":51,"context_line":"  \u0027ip\u0027, \u0027changes-since\u0027, \u0027all_tenants\u0027, \u0027ip6\u0027, \u0027tags\u0027,"},{"line_number":52,"context_line":"  \u0027tags-any\u0027, \u0027not-tags\u0027, \u0027not-tags-any\u0027]"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"* The filters whitelist for admin users will be a superset of"},{"line_number":55,"context_line":"  the non-admin whitelist and the following parameters will be"},{"line_number":56,"context_line":"  appended to the non-admin users\u0027 whitelist:"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"  [\u0027project_id\u0027, \u0027created_at\u0027, \u0027uuid\u0027, \u0027terminated_at\u0027"}],"source_content_type":"text/x-rst","patch_set":5,"id":"7a77a97e_cc7f93a9","line":55,"range":{"start_line":54,"start_character":2,"end_line":55,"end_character":25},"in_reply_to":"7a77a97e_aa02456d","updated":"2016-11-17 02:26:51.000000000","message":"Hi, Clarke, I think this BP is meant to apply a whitelist for list server API, what you have in mind must be: https://review.openstack.org/#/c/388518/ and yes I think we will add codes to differ from admin and non-admin after json schema validation","commit_id":"0437c6d6066bd105fd3e417b3272bf27f9902708"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"a9daf650462cd6dee713d87c3d912093a02df92b","unresolved":false,"context_lines":[{"line_number":51,"context_line":"  \u0027ip\u0027, \u0027changes-since\u0027, \u0027all_tenants\u0027, \u0027ip6\u0027, \u0027tags\u0027,"},{"line_number":52,"context_line":"  \u0027tags-any\u0027, \u0027not-tags\u0027, \u0027not-tags-any\u0027]"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"* The filters whitelist for admin users will be a superset of"},{"line_number":55,"context_line":"  the non-admin whitelist and the following parameters will be"},{"line_number":56,"context_line":"  appended to the non-admin users\u0027 whitelist:"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"  [\u0027project_id\u0027, \u0027created_at\u0027, \u0027uuid\u0027, \u0027terminated_at\u0027"}],"source_content_type":"text/x-rst","patch_set":5,"id":"7a77a97e_a24e0294","line":55,"range":{"start_line":54,"start_character":2,"end_line":55,"end_character":25},"in_reply_to":"7a77a97e_b3e672b2","updated":"2016-11-16 13:51:26.000000000","message":"Its deep in the code right now, it filters the params based on context.is_admin.","commit_id":"0437c6d6066bd105fd3e417b3272bf27f9902708"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"599865afd9764a28acc50f4866b7ef3d61275c50","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"  [\u0027project_id\u0027, \u0027created_at\u0027, \u0027uuid\u0027, \u0027terminated_at\u0027"},{"line_number":59,"context_line":"   \u0027host\u0027, \u0027cell_name\u0027]"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"* The sort_key whitelist for non-admin users:"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"  [\u0027reservation_id\u0027, \u0027name\u0027, \u0027status\u0027]"}],"source_content_type":"text/x-rst","patch_set":5,"id":"7a77a97e_c5ff8865","line":60,"updated":"2016-11-16 14:26:09.000000000","message":"Nit, I would start a new list for the sort keys","commit_id":"0437c6d6066bd105fd3e417b3272bf27f9902708"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"a9daf650462cd6dee713d87c3d912093a02df92b","unresolved":false,"context_lines":[{"line_number":66,"context_line":"  the non-admin whitelist and the following parameters will be"},{"line_number":67,"context_line":"  appended to the non-admin users\u0027 whitelist:"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"  [\u0027project_id\u0027, \u0027created_at\u0027, \u0027uuid\u0027, \u0027terminated_at\u0027"},{"line_number":70,"context_line":"   \u0027host\u0027]"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":5,"id":"7a77a97e_c5422810","line":70,"range":{"start_line":69,"start_character":3,"end_line":70,"end_character":9},"updated":"2016-11-16 13:51:26.000000000","message":"It feels like only project_id and host belong in this list.\n\nWhy are the others not allowed for all users? because of a missing index?","commit_id":"0437c6d6066bd105fd3e417b3272bf27f9902708"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"74a697a31140b63256452907b36a53514ec4427c","unresolved":false,"context_lines":[{"line_number":66,"context_line":"  the non-admin whitelist and the following parameters will be"},{"line_number":67,"context_line":"  appended to the non-admin users\u0027 whitelist:"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"  [\u0027project_id\u0027, \u0027created_at\u0027, \u0027uuid\u0027, \u0027terminated_at\u0027"},{"line_number":70,"context_line":"   \u0027host\u0027]"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":5,"id":"7a77a97e_68468bc0","line":70,"range":{"start_line":69,"start_character":3,"end_line":70,"end_character":9},"in_reply_to":"7a77a97e_c5422810","updated":"2016-11-16 14:19:08.000000000","message":"Ah, My bad.","commit_id":"0437c6d6066bd105fd3e417b3272bf27f9902708"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"599865afd9764a28acc50f4866b7ef3d61275c50","unresolved":false,"context_lines":[{"line_number":69,"context_line":"  [\u0027project_id\u0027, \u0027created_at\u0027, \u0027uuid\u0027, \u0027terminated_at\u0027"},{"line_number":70,"context_line":"   \u0027host\u0027]"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"Alternatives"},{"line_number":74,"context_line":"------------"},{"line_number":75,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"7a77a97e_a81c2378","line":72,"updated":"2016-11-16 14:26:09.000000000","message":"So we need a DB expert to look at this:\nhttps://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/models.py#L205\n\nThe general list instances for the project is covered by:\n\n* Index(\u0027instances_project_id_deleted_idx\u0027, \u0027project_id\u0027, \u0027deleted\u0027)\n\nAdmins should be allowed to filter by project_id\n\nFor the admin we have changes-since covered by this index:\n\n* Index(\u0027instances_terminated_at_launched_at_idx\u0027, \u0027terminated_at\u0027, \u0027launched_at\u0027)\n\nMost queries are using deleted\u003dfalse, so for sort I think we can use:\n\n* Index(\u0027instances_uuid_deleted_idx\u0027, \u0027uuid\u0027, \u0027deleted\u0027),\n* Index(\u0027instances_deleted_created_at_idx\u0027, \u0027deleted\u0027, \u0027created_at\u0027)\n\nBut its unclear if we can use two indexes to help with these queries, and if that helps or not, we probably need some tests to convince of ourselves of what is correct here.\n\nFor me, what I think we want is, sort by:\n\n* uuid (I think thats the default to make pages work?)\n* created_at (makes sense, looks like we have an index for that)\n* status/name are probably wanted by horizon, those columns are so big its probably going to hurt us to add an index for those, maybe they are OK without an index?\n* project_id (for admins only, kinda makes sense)\n\nFilter by:\n\n* unsure if they all need an index, if you can reduce the list enough with an existing index?\n\nAm I just worrying too much about all this?","commit_id":"0437c6d6066bd105fd3e417b3272bf27f9902708"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"90763b550faf3cbe5b7d14dd39499869e48d1893","unresolved":false,"context_lines":[{"line_number":69,"context_line":"  [\u0027project_id\u0027, \u0027created_at\u0027, \u0027uuid\u0027, \u0027terminated_at\u0027"},{"line_number":70,"context_line":"   \u0027host\u0027]"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"Alternatives"},{"line_number":74,"context_line":"------------"},{"line_number":75,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"7a77a97e_6f859105","line":72,"in_reply_to":"7a77a97e_a81c2378","updated":"2016-11-17 02:40:23.000000000","message":"Another thing is, we should at least allow the existing explicitly allowed filters, right? they are:\nhttp://git.openstack.org/cgit/openstack/nova/tree/nova/api/openstack/compute/servers.py#n1103","commit_id":"0437c6d6066bd105fd3e417b3272bf27f9902708"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"c46e7bbabf4b1142321cfaac2eb64ed13fdca2a2","unresolved":false,"context_lines":[{"line_number":69,"context_line":"  [\u0027project_id\u0027, \u0027created_at\u0027, \u0027uuid\u0027, \u0027terminated_at\u0027"},{"line_number":70,"context_line":"   \u0027host\u0027]"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"Alternatives"},{"line_number":74,"context_line":"------------"},{"line_number":75,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"7a77a97e_6c3e7fdb","line":72,"in_reply_to":"7a77a97e_a81c2378","updated":"2016-11-17 02:28:00.000000000","message":"Hmm, Lets go with this first, and see what others think","commit_id":"0437c6d6066bd105fd3e417b3272bf27f9902708"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"be529e7bc44535c7d53ba085881d29d8d48cd712","unresolved":false,"context_lines":[{"line_number":83,"context_line":"REST API impact"},{"line_number":84,"context_line":"---------------"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"A new microversion will be added to reject incorrect queries."},{"line_number":87,"context_line":"Requests with invalid filter will be ignored them. For requests"},{"line_number":88,"context_line":"with invalid sort key, HTTP 400 will be returned."},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"The query parameter schema for the server list/detail will be::"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"7a77a97e_fdab4287","line":88,"range":{"start_line":86,"start_character":0,"end_line":88,"end_character":49},"updated":"2016-11-16 13:03:26.000000000","message":"not much clear, so \nwith current v2,1 we will go with\n- ignore invalid filter\n- 400 for invalid sort_key\n\nwith new microversion\n- 400 for invalid filter\n\n?","commit_id":"0437c6d6066bd105fd3e417b3272bf27f9902708"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9ffc4568aa0ac5b0aeabfdd669baa925e66c512d","unresolved":false,"context_lines":[{"line_number":11,"context_line":"https://blueprints.launchpad.net/nova/+spec/add-whitelist-for-server-list-filter-sort-parameters"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Currently the filter and sort query parameters can be used for"},{"line_number":14,"context_line":"`Server List` API are not explicit defined (the filters that"},{"line_number":15,"context_line":"can be used for non-admin users are defined). This spec aims"},{"line_number":16,"context_line":"to add a strict set of whitelisted filtering and sorting"},{"line_number":17,"context_line":"parameters for server list operations."},{"line_number":18,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_984a0b25","line":15,"range":{"start_line":14,"start_character":44,"end_line":15,"end_character":43},"updated":"2016-11-17 21:15:43.000000000","message":"nit: I tend to like references in the spec to statements like this:\n\nhttps://github.com/openstack/nova/blob/f8a81807e016c17e6c45d318d5c92ba0cc758b01/nova/api/openstack/compute/servers.py#L1103","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9ffc4568aa0ac5b0aeabfdd669baa925e66c512d","unresolved":false,"context_lines":[{"line_number":19,"context_line":"Problem description"},{"line_number":20,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"The sort and list query parameter\u0027s for `GET /servers` API are not"},{"line_number":23,"context_line":"limited and controlled at API layer, and those query parameters are"},{"line_number":24,"context_line":"passed into the SQL query directly (the filters that can be used for"},{"line_number":25,"context_line":"non-admin users are defined)."}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_d85003d7","line":22,"range":{"start_line":22,"start_character":24,"end_line":22,"end_character":35},"updated":"2016-11-17 21:15:43.000000000","message":"parameters","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9ffc4568aa0ac5b0aeabfdd669baa925e66c512d","unresolved":false,"context_lines":[{"line_number":25,"context_line":"non-admin users are defined)."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"The response for queries with incorrect parameters for admin users"},{"line_number":28,"context_line":"also varies, invalid sort_key returns HTTP 400 while invalid filters"},{"line_number":29,"context_line":"returns 500."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"Use Cases"},{"line_number":32,"context_line":"---------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_f8de9f0f","line":29,"range":{"start_line":28,"start_character":47,"end_line":29,"end_character":12},"updated":"2016-11-17 21:15:43.000000000","message":"yup:\n\nstack@neutron:~$ nova list --sort info_cache\nERROR (ClientException): Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.\n\u003ctype \u0027exceptions.NotImplementedError\u0027\u003e (HTTP 500) (Request-ID: req-7588d97e-05f6-4cc3-8482-07611b1211f7)","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"7e46a8df36f06313735b3cb2fbcf18c80207fb66","unresolved":false,"context_lines":[{"line_number":25,"context_line":"non-admin users are defined)."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"The response for queries with incorrect parameters for admin users"},{"line_number":28,"context_line":"also varies, invalid sort_key returns HTTP 400 while invalid filters"},{"line_number":29,"context_line":"returns 500."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"Use Cases"},{"line_number":32,"context_line":"---------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_544d8c98","line":29,"range":{"start_line":28,"start_character":47,"end_line":29,"end_character":12},"in_reply_to":"7a77a97e_f8de9f0f","updated":"2016-11-18 07:58:29.000000000","message":"one more note, for filtering on the \u0027metadata\u0027 and \u0027system_metadata\u0027 is supported currently. They accept a JSON string.","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"0b3d04febc53326c0b0c8df2e176a8a5db6ac3bc","unresolved":false,"context_lines":[{"line_number":31,"context_line":"Use Cases"},{"line_number":32,"context_line":"---------"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"This is an effort about refactor the API layer code, to ease the burden of"},{"line_number":35,"context_line":"maintaining the API code. So there isn\u0027t any use-cases for the end-user."},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"Proposed change"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_c0ead9ab","line":34,"range":{"start_line":34,"start_character":18,"end_line":34,"end_character":23},"updated":"2016-11-17 14:58:24.000000000","message":"s/about/to/","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9ffc4568aa0ac5b0aeabfdd669baa925e66c512d","unresolved":false,"context_lines":[{"line_number":32,"context_line":"---------"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"This is an effort about refactor the API layer code, to ease the burden of"},{"line_number":35,"context_line":"maintaining the API code. So there isn\u0027t any use-cases for the end-user."},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"Proposed change"},{"line_number":38,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_58015369","line":35,"range":{"start_line":35,"start_character":26,"end_line":35,"end_character":72},"updated":"2016-11-17 21:15:43.000000000","message":"Well, there is benefit for admin users to not shoot themselves in the foot by sorting/filtering on things that aren\u0027t supported.\n\nThis is also needed for restricting what can be sorted/filtered when listing instances which we need for supporting multiple cells in cells v2.","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"0b3d04febc53326c0b0c8df2e176a8a5db6ac3bc","unresolved":false,"context_lines":[{"line_number":38,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"This spec proposes to add a filter and sort query parameter whitelist"},{"line_number":41,"context_line":"for `GET /servers/` API (index and detail). This spec planning to add"},{"line_number":42,"context_line":"a strict set of whitelisted filtering and sorting parameters for server"},{"line_number":43,"context_line":"list operations"},{"line_number":44,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_a0331d61","line":41,"range":{"start_line":41,"start_character":54,"end_line":41,"end_character":69},"updated":"2016-11-17 14:58:24.000000000","message":"s/planning to add/adds/","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9ffc4568aa0ac5b0aeabfdd669baa925e66c512d","unresolved":false,"context_lines":[{"line_number":45,"context_line":"The whitelists can be different for admin users and non-admin users:"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"* The filters whitelist for non-admin users already exists:"},{"line_number":48,"context_line":"  http://git.openstack.org/cgit/openstack/nova/tree/nova/api/openstack/compute/servers.py#n1103"},{"line_number":49,"context_line":"  which is:"},{"line_number":50,"context_line":"  [\u0027reservation_id\u0027, \u0027name\u0027, \u0027status\u0027, \u0027image\u0027, \u0027flavor\u0027,"},{"line_number":51,"context_line":"  \u0027ip\u0027, \u0027changes-since\u0027, \u0027all_tenants\u0027, \u0027ip6\u0027, \u0027tags\u0027,"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_7b3c49c8","line":48,"updated":"2016-11-17 21:15:43.000000000","message":"You should use a link based on a hash, like:\n\nhttps://github.com/openstack/nova/blob/f8a81807e016c17e6c45d318d5c92ba0cc758b01/nova/api/openstack/compute/servers.py#L1103\n\nBecause otherwise this line is going to change and lose value.","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"a5648ee7f1688a7a817863c5a6c7fcf0c0e55893","unresolved":false,"context_lines":[{"line_number":49,"context_line":"  which is:"},{"line_number":50,"context_line":"  [\u0027reservation_id\u0027, \u0027name\u0027, \u0027status\u0027, \u0027image\u0027, \u0027flavor\u0027,"},{"line_number":51,"context_line":"  \u0027ip\u0027, \u0027changes-since\u0027, \u0027all_tenants\u0027, \u0027ip6\u0027, \u0027tags\u0027,"},{"line_number":52,"context_line":"  \u0027tags-any\u0027, \u0027not-tags\u0027, \u0027not-tags-any\u0027]"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"* The filters whitelist for admin users will be a superset of"},{"line_number":55,"context_line":"  the non-admin whitelist and the following parameters will be"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_86864fd9","line":52,"updated":"2016-11-17 07:49:45.000000000","message":"We don\u0027t have DB index for \u0027name\u0027, \u0027image\u0027, \u0027flavor\u0027, \u0027changes-since\u0027(depend on \u0027update_at\u0027 column), and \u0027tags*.\u0027\n\nAnd the \u0027status\u0027 is depends on (\u0027vm_state\u0027, \u0027task_state\u0027), but we only have one DB index for task_state.\n\nShould we add index for those filter without index, or we should remove them?","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"01102c2685f6ee514bad036a8830409440d1e66a","unresolved":false,"context_lines":[{"line_number":49,"context_line":"  which is:"},{"line_number":50,"context_line":"  [\u0027reservation_id\u0027, \u0027name\u0027, \u0027status\u0027, \u0027image\u0027, \u0027flavor\u0027,"},{"line_number":51,"context_line":"  \u0027ip\u0027, \u0027changes-since\u0027, \u0027all_tenants\u0027, \u0027ip6\u0027, \u0027tags\u0027,"},{"line_number":52,"context_line":"  \u0027tags-any\u0027, \u0027not-tags\u0027, \u0027not-tags-any\u0027]"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"* The filters whitelist for admin users will be a superset of"},{"line_number":55,"context_line":"  the non-admin whitelist and the following parameters will be"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_0df6c9f8","line":52,"in_reply_to":"7a77a97e_007771d3","updated":"2016-11-17 15:11:45.000000000","message":"so we can remove the \u0027name\u0027, \u0027image\u0027, \u0027flavor\u0027, \u0027ip\u0027, \u0027ip6\u0027","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9ffc4568aa0ac5b0aeabfdd669baa925e66c512d","unresolved":false,"context_lines":[{"line_number":49,"context_line":"  which is:"},{"line_number":50,"context_line":"  [\u0027reservation_id\u0027, \u0027name\u0027, \u0027status\u0027, \u0027image\u0027, \u0027flavor\u0027,"},{"line_number":51,"context_line":"  \u0027ip\u0027, \u0027changes-since\u0027, \u0027all_tenants\u0027, \u0027ip6\u0027, \u0027tags\u0027,"},{"line_number":52,"context_line":"  \u0027tags-any\u0027, \u0027not-tags\u0027, \u0027not-tags-any\u0027]"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"* The filters whitelist for admin users will be a superset of"},{"line_number":55,"context_line":"  the non-admin whitelist and the following parameters will be"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_1867db4d","line":52,"in_reply_to":"7a77a97e_04977e3a","updated":"2016-11-17 21:15:43.000000000","message":"reservation_id is for when you create multiple instances in a single create request and get the reservation ID back in the response, then you use that to filter the instances when listing them afterward.\n\nI agree with Jay on adding an index on instances.updated_at since that\u0027s what the --changes-since filter is based on. I\u0027ve reported a wishlist bug for that 1642729.","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"36cbab0fe7088cde03d10f56ccf48d511414bc36","unresolved":false,"context_lines":[{"line_number":49,"context_line":"  which is:"},{"line_number":50,"context_line":"  [\u0027reservation_id\u0027, \u0027name\u0027, \u0027status\u0027, \u0027image\u0027, \u0027flavor\u0027,"},{"line_number":51,"context_line":"  \u0027ip\u0027, \u0027changes-since\u0027, \u0027all_tenants\u0027, \u0027ip6\u0027, \u0027tags\u0027,"},{"line_number":52,"context_line":"  \u0027tags-any\u0027, \u0027not-tags\u0027, \u0027not-tags-any\u0027]"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"* The filters whitelist for admin users will be a superset of"},{"line_number":55,"context_line":"  the non-admin whitelist and the following parameters will be"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_59c96358","line":52,"in_reply_to":"7a77a97e_0df6c9f8","updated":"2016-11-17 16:28:42.000000000","message":"They seem useful. The large text probably means the index is so expensive its not really worth adding those.\n\nI am less keen on ip and ip6, because its a bit neutron proxy-ish. And I worry about our date being out of sync on multiple levels.","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"7e46a8df36f06313735b3cb2fbcf18c80207fb66","unresolved":false,"context_lines":[{"line_number":49,"context_line":"  which is:"},{"line_number":50,"context_line":"  [\u0027reservation_id\u0027, \u0027name\u0027, \u0027status\u0027, \u0027image\u0027, \u0027flavor\u0027,"},{"line_number":51,"context_line":"  \u0027ip\u0027, \u0027changes-since\u0027, \u0027all_tenants\u0027, \u0027ip6\u0027, \u0027tags\u0027,"},{"line_number":52,"context_line":"  \u0027tags-any\u0027, \u0027not-tags\u0027, \u0027not-tags-any\u0027]"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"* The filters whitelist for admin users will be a superset of"},{"line_number":55,"context_line":"  the non-admin whitelist and the following parameters will be"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_37a81277","line":52,"in_reply_to":"7a77a97e_0e9f835f","updated":"2016-11-18 07:58:29.000000000","message":"And we only have few filters are exact match, others are regex match https://github.com/openstack/nova/blob/f8a81807e016c17e6c45d318d5c92ba0cc758b01/nova/db/sqlalchemy/api.py#L2221","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"0a7cc31be7453365d5f46accea1d19f322ff73b3","unresolved":false,"context_lines":[{"line_number":49,"context_line":"  which is:"},{"line_number":50,"context_line":"  [\u0027reservation_id\u0027, \u0027name\u0027, \u0027status\u0027, \u0027image\u0027, \u0027flavor\u0027,"},{"line_number":51,"context_line":"  \u0027ip\u0027, \u0027changes-since\u0027, \u0027all_tenants\u0027, \u0027ip6\u0027, \u0027tags\u0027,"},{"line_number":52,"context_line":"  \u0027tags-any\u0027, \u0027not-tags\u0027, \u0027not-tags-any\u0027]"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"* The filters whitelist for admin users will be a superset of"},{"line_number":55,"context_line":"  the non-admin whitelist and the following parameters will be"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_f4493832","line":52,"in_reply_to":"7a77a97e_0e9f835f","updated":"2016-11-18 07:20:39.000000000","message":"image and flavor seems useful.","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"0f527669d72af4acea288f474ada9e8abef5f278","unresolved":false,"context_lines":[{"line_number":49,"context_line":"  which is:"},{"line_number":50,"context_line":"  [\u0027reservation_id\u0027, \u0027name\u0027, \u0027status\u0027, \u0027image\u0027, \u0027flavor\u0027,"},{"line_number":51,"context_line":"  \u0027ip\u0027, \u0027changes-since\u0027, \u0027all_tenants\u0027, \u0027ip6\u0027, \u0027tags\u0027,"},{"line_number":52,"context_line":"  \u0027tags-any\u0027, \u0027not-tags\u0027, \u0027not-tags-any\u0027]"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"* The filters whitelist for admin users will be a superset of"},{"line_number":55,"context_line":"  the non-admin whitelist and the following parameters will be"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_0e9f835f","line":52,"in_reply_to":"7a77a97e_1867db4d","updated":"2016-11-18 06:21:34.000000000","message":"@John, for the \u0027name\u0027, it accepts regex. I guess that will have problem.\n\n@Matt, so...you mean the adding index isn\u0027t the scope of this spec?","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"3b7cfc44766b4e0209a60166a65bf7985dbd5dba","unresolved":false,"context_lines":[{"line_number":49,"context_line":"  which is:"},{"line_number":50,"context_line":"  [\u0027reservation_id\u0027, \u0027name\u0027, \u0027status\u0027, \u0027image\u0027, \u0027flavor\u0027,"},{"line_number":51,"context_line":"  \u0027ip\u0027, \u0027changes-since\u0027, \u0027all_tenants\u0027, \u0027ip6\u0027, \u0027tags\u0027,"},{"line_number":52,"context_line":"  \u0027tags-any\u0027, \u0027not-tags\u0027, \u0027not-tags-any\u0027]"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"* The filters whitelist for admin users will be a superset of"},{"line_number":55,"context_line":"  the non-admin whitelist and the following parameters will be"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_29aeeee5","line":52,"in_reply_to":"7a77a97e_37a81277","updated":"2016-11-18 11:27:58.000000000","message":"Dang, I was about to go check multiple create after adding that comment, grr I hate that thing.\n\nI think regex is whats needed for name (there was an interesting bug about not being able to lookup instances where the name is not a valid regex, which is an fun one), its not cheap, but honestly it feels too useful to drop.","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"8705d15054b8a1ab1bcc767bd9d5f52440fbf76a","unresolved":false,"context_lines":[{"line_number":49,"context_line":"  which is:"},{"line_number":50,"context_line":"  [\u0027reservation_id\u0027, \u0027name\u0027, \u0027status\u0027, \u0027image\u0027, \u0027flavor\u0027,"},{"line_number":51,"context_line":"  \u0027ip\u0027, \u0027changes-since\u0027, \u0027all_tenants\u0027, \u0027ip6\u0027, \u0027tags\u0027,"},{"line_number":52,"context_line":"  \u0027tags-any\u0027, \u0027not-tags\u0027, \u0027not-tags-any\u0027]"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"* The filters whitelist for admin users will be a superset of"},{"line_number":55,"context_line":"  the non-admin whitelist and the following parameters will be"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_04977e3a","line":52,"in_reply_to":"7a77a97e_59c96358","updated":"2016-11-17 16:34:20.000000000","message":"actually, I don\u0027t quite get why we have reservation_id, uuid is almost exactly the same thing these days.","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"f72bb49a6a48f60bab4c7336646d0077dd43f3a1","unresolved":false,"context_lines":[{"line_number":49,"context_line":"  which is:"},{"line_number":50,"context_line":"  [\u0027reservation_id\u0027, \u0027name\u0027, \u0027status\u0027, \u0027image\u0027, \u0027flavor\u0027,"},{"line_number":51,"context_line":"  \u0027ip\u0027, \u0027changes-since\u0027, \u0027all_tenants\u0027, \u0027ip6\u0027, \u0027tags\u0027,"},{"line_number":52,"context_line":"  \u0027tags-any\u0027, \u0027not-tags\u0027, \u0027not-tags-any\u0027]"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"* The filters whitelist for admin users will be a superset of"},{"line_number":55,"context_line":"  the non-admin whitelist and the following parameters will be"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_6642136a","line":52,"in_reply_to":"7a77a97e_86864fd9","updated":"2016-11-17 07:54:59.000000000","message":"I put them here because they are currently explicitly supported, maybe we need furthur discussion, besides, shouldn\u0027t tags meant to be used for filtering?","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"0b3d04febc53326c0b0c8df2e176a8a5db6ac3bc","unresolved":false,"context_lines":[{"line_number":49,"context_line":"  which is:"},{"line_number":50,"context_line":"  [\u0027reservation_id\u0027, \u0027name\u0027, \u0027status\u0027, \u0027image\u0027, \u0027flavor\u0027,"},{"line_number":51,"context_line":"  \u0027ip\u0027, \u0027changes-since\u0027, \u0027all_tenants\u0027, \u0027ip6\u0027, \u0027tags\u0027,"},{"line_number":52,"context_line":"  \u0027tags-any\u0027, \u0027not-tags\u0027, \u0027not-tags-any\u0027]"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"* The filters whitelist for admin users will be a superset of"},{"line_number":55,"context_line":"  the non-admin whitelist and the following parameters will be"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_007771d3","line":52,"in_reply_to":"7a77a97e_86864fd9","updated":"2016-11-17 14:58:24.000000000","message":"Note that the tags* queries actually do all hit indexed columns.\n\nFor the other ones, I would consider adding an index on updated_at (because changes-since is a very common filter). I would also consider adding a compound index on (vm_state, task_state). The other ones, meh :)","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"962c4246109c90b7a43c81290e5655eb373a763b","unresolved":false,"context_lines":[{"line_number":49,"context_line":"  which is:"},{"line_number":50,"context_line":"  [\u0027reservation_id\u0027, \u0027name\u0027, \u0027status\u0027, \u0027image\u0027, \u0027flavor\u0027,"},{"line_number":51,"context_line":"  \u0027ip\u0027, \u0027changes-since\u0027, \u0027all_tenants\u0027, \u0027ip6\u0027, \u0027tags\u0027,"},{"line_number":52,"context_line":"  \u0027tags-any\u0027, \u0027not-tags\u0027, \u0027not-tags-any\u0027]"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"* The filters whitelist for admin users will be a superset of"},{"line_number":55,"context_line":"  the non-admin whitelist and the following parameters will be"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_06a6bf52","line":52,"in_reply_to":"7a77a97e_86864fd9","updated":"2016-11-17 07:52:54.000000000","message":"The \u0027ip\u0027 and \u0027ip6\u0027 are actually filter at API layer.","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9ffc4568aa0ac5b0aeabfdd669baa925e66c512d","unresolved":false,"context_lines":[{"line_number":51,"context_line":"  \u0027ip\u0027, \u0027changes-since\u0027, \u0027all_tenants\u0027, \u0027ip6\u0027, \u0027tags\u0027,"},{"line_number":52,"context_line":"  \u0027tags-any\u0027, \u0027not-tags\u0027, \u0027not-tags-any\u0027]"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"* The filters whitelist for admin users will be a superset of"},{"line_number":55,"context_line":"  the non-admin whitelist and the following parameters will be"},{"line_number":56,"context_line":"  appended to the non-admin users\u0027 whitelist:"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_dbd63df0","line":54,"updated":"2016-11-17 21:15:43.000000000","message":"This seems pretty restrictive, there are several other columns in the instances table that could be filtered on:\n\nhttps://github.com/openstack/nova/blob/f8a81807e016c17e6c45d318d5c92ba0cc758b01/nova/db/sqlalchemy/models.py#L249\n\nLike key_name, power_state, locked, etc. Plus in the 2.3 microversion we return more than this:\n\nhttp://docs.openstack.org/developer/nova/api_microversion_history.html#maximum-in-kilo\n\nSo we\u0027ll be returning things from the REST API that we can\u0027t later filter on?\n\nI thought for this initial pass we were just going to restrict the filters to non-joined tables like info_cache, extra, system_metadata, pci_devices, etc?","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"3b7cfc44766b4e0209a60166a65bf7985dbd5dba","unresolved":false,"context_lines":[{"line_number":51,"context_line":"  \u0027ip\u0027, \u0027changes-since\u0027, \u0027all_tenants\u0027, \u0027ip6\u0027, \u0027tags\u0027,"},{"line_number":52,"context_line":"  \u0027tags-any\u0027, \u0027not-tags\u0027, \u0027not-tags-any\u0027]"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"* The filters whitelist for admin users will be a superset of"},{"line_number":55,"context_line":"  the non-admin whitelist and the following parameters will be"},{"line_number":56,"context_line":"  appended to the non-admin users\u0027 whitelist:"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_892f023e","line":54,"in_reply_to":"7a77a97e_8e98f36b","updated":"2016-11-18 11:27:58.000000000","message":"We certainly shouldn\u0027t let you filter on things we don\u0027t return in the REST API, we are agreed there.\n\nFWIW, I am fine not being able to filter on everything in the REST API. But I guess we can\u0027t break what people currently rely on from that.","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"0f527669d72af4acea288f474ada9e8abef5f278","unresolved":false,"context_lines":[{"line_number":51,"context_line":"  \u0027ip\u0027, \u0027changes-since\u0027, \u0027all_tenants\u0027, \u0027ip6\u0027, \u0027tags\u0027,"},{"line_number":52,"context_line":"  \u0027tags-any\u0027, \u0027not-tags\u0027, \u0027not-tags-any\u0027]"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"* The filters whitelist for admin users will be a superset of"},{"line_number":55,"context_line":"  the non-admin whitelist and the following parameters will be"},{"line_number":56,"context_line":"  appended to the non-admin users\u0027 whitelist:"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_8e98f36b","line":54,"in_reply_to":"7a77a97e_dbd63df0","updated":"2016-11-18 06:21:34.000000000","message":"yea, I initial thought the goal is remove filter for joined-table.  The spec is changed for getting rid of the filters which depend the column without DB index, otherwise it would be DDoS for request with such filter.\n\nLooks like we need to clear the goal of this spec","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"a5648ee7f1688a7a817863c5a6c7fcf0c0e55893","unresolved":false,"context_lines":[{"line_number":56,"context_line":"  appended to the non-admin users\u0027 whitelist:"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"  [\u0027project_id\u0027, \u0027created_at\u0027, \u0027uuid\u0027, \u0027terminated_at\u0027"},{"line_number":59,"context_line":"   \u0027host\u0027, \u0027cell_name\u0027, \u0027deleted\u0027]"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"* The sort_key whitelist for non-admin users:"},{"line_number":62,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_6658538b","line":59,"updated":"2016-11-17 07:49:45.000000000","message":"We don\u0027t have db index for \u0027create_at\u0027","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9ffc4568aa0ac5b0aeabfdd669baa925e66c512d","unresolved":false,"context_lines":[{"line_number":56,"context_line":"  appended to the non-admin users\u0027 whitelist:"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"  [\u0027project_id\u0027, \u0027created_at\u0027, \u0027uuid\u0027, \u0027terminated_at\u0027"},{"line_number":59,"context_line":"   \u0027host\u0027, \u0027cell_name\u0027, \u0027deleted\u0027]"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"* The sort_key whitelist for non-admin users:"},{"line_number":62,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_7bc6099b","line":59,"in_reply_to":"7a77a97e_64959285","updated":"2016-11-17 21:15:43.000000000","message":"John, we also have an index for that:\n\nhttps://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/models.py#L201","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"0b3d04febc53326c0b0c8df2e176a8a5db6ac3bc","unresolved":false,"context_lines":[{"line_number":56,"context_line":"  appended to the non-admin users\u0027 whitelist:"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"  [\u0027project_id\u0027, \u0027created_at\u0027, \u0027uuid\u0027, \u0027terminated_at\u0027"},{"line_number":59,"context_line":"   \u0027host\u0027, \u0027cell_name\u0027, \u0027deleted\u0027]"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"* The sort_key whitelist for non-admin users:"},{"line_number":62,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_aa9cdbc0","line":59,"in_reply_to":"7a77a97e_6658538b","updated":"2016-11-17 14:58:24.000000000","message":"@alex_xu: yes, we do:\n\nhttps://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/models.py#L215\n\nThe problem is that the deleted column is a left-prefix on the index. We can consider putting an additional single-column index on created_at, though.","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"36cbab0fe7088cde03d10f56ccf48d511414bc36","unresolved":false,"context_lines":[{"line_number":56,"context_line":"  appended to the non-admin users\u0027 whitelist:"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"  [\u0027project_id\u0027, \u0027created_at\u0027, \u0027uuid\u0027, \u0027terminated_at\u0027"},{"line_number":59,"context_line":"   \u0027host\u0027, \u0027cell_name\u0027, \u0027deleted\u0027]"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"* The sort_key whitelist for non-admin users:"},{"line_number":62,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_64959285","line":59,"in_reply_to":"7a77a97e_aa9cdbc0","updated":"2016-11-17 16:28:42.000000000","message":"We generally always list instances with project_id\u003dxxx and deleted\u003dfalse though. Not sure how that affects what index we need.","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"a5648ee7f1688a7a817863c5a6c7fcf0c0e55893","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"* The sort_key whitelist for non-admin users:"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"  [\u0027uuid\u0027, \u0027name\u0027, \u0027status\u0027, \u0027created_at\u0027, \u0027terminated_at\u0027]"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"* The sort_key whitelist for admin users will be a superset of"},{"line_number":66,"context_line":"  the non-admin whitelist and the following parameters will be"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_c653e769","line":63,"updated":"2016-11-17 07:49:45.000000000","message":"we don\u0027t have db index for \u0027name\u0027 and \u0027status\u0027","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9ffc4568aa0ac5b0aeabfdd669baa925e66c512d","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"* The sort_key whitelist for non-admin users:"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"  [\u0027uuid\u0027, \u0027name\u0027, \u0027status\u0027, \u0027created_at\u0027, \u0027terminated_at\u0027]"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"* The sort_key whitelist for admin users will be a superset of"},{"line_number":66,"context_line":"  the non-admin whitelist and the following parameters will be"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_dbe0fd98","line":63,"in_reply_to":"7a77a97e_c653e769","updated":"2016-11-17 21:15:43.000000000","message":"name is really display_name in the instances table, but yeah we don\u0027t have an index for that.\n\nAnd \u0027status\u0027 is really a made up combination of values from the REST API which is a mapping of vm_state and task_state - maybe that\u0027s where Jay was talking about having a joint index on those two columns?","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"3b7cfc44766b4e0209a60166a65bf7985dbd5dba","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"* The sort_key whitelist for non-admin users:"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"  [\u0027uuid\u0027, \u0027name\u0027, \u0027status\u0027, \u0027created_at\u0027, \u0027terminated_at\u0027]"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"* The sort_key whitelist for admin users will be a superset of"},{"line_number":66,"context_line":"  the non-admin whitelist and the following parameters will be"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_c9dc9a48","line":63,"in_reply_to":"7a77a97e_dbe0fd98","updated":"2016-11-18 11:27:58.000000000","message":"I believe we don\u0027t want on index on name, as the column is too big. I could be talking nonsense.","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9ffc4568aa0ac5b0aeabfdd669baa925e66c512d","unresolved":false,"context_lines":[{"line_number":66,"context_line":"  the non-admin whitelist and the following parameters will be"},{"line_number":67,"context_line":"  appended to the non-admin users\u0027 whitelist:"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"  [\u0027project_id\u0027]"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_fb64d922","line":69,"updated":"2016-11-17 21:15:43.000000000","message":"I have a similar question here, as in why are we restricting the sort keys so much? I\u0027d think in the initial revision we just restrict this to non-joined tables, e.g. I can sort by vm_state:\n\nstack@neutron:~$ nova list --sort vm_state\n+--------------------------------------+---------------+---------+------------+-------------+-------------------------------------+\n| ID                                   | Name          | Status  | Task State | Power State | Networks                            |\n+--------------------------------------+---------------+---------+------------+-------------+-------------------------------------+\n| 5f7c8ed0-a23d-44cc-a635-f8c1091e2380 | filter-test   | SHUTOFF | -          | Shutdown    | private\u003d2001:db8:8000::5, 10.0.0.11 |\n| acd6a2d0-1771-49cc-87b0-64f4a55f2d73 | filter-test-2 | ACTIVE  | -          | Running     | private\u003d2001:db8:8000::7, 10.0.0.9  |\n+--------------------------------------+---------------+---------+------------+-------------+-------------------------------------+\nstack@neutron:~$ nova list --sort vm_state:asc\n+--------------------------------------+---------------+---------+------------+-------------+-------------------------------------+\n| ID                                   | Name          | Status  | Task State | Power State | Networks                            |\n+--------------------------------------+---------------+---------+------------+-------------+-------------------------------------+\n| acd6a2d0-1771-49cc-87b0-64f4a55f2d73 | filter-test-2 | ACTIVE  | -          | Running     | private\u003d2001:db8:8000::7, 10.0.0.9  |\n| 5f7c8ed0-a23d-44cc-a635-f8c1091e2380 | filter-test   | SHUTOFF | -          | Shutdown    | private\u003d2001:db8:8000::5, 10.0.0.11 |\n+--------------------------------------+---------------+---------+------------+-------------+-------------------------------------+\nstack@neutron:~$\n\nAlternatively, only restrict this to things that can come back out in the response for showing server details.","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"3b7cfc44766b4e0209a60166a65bf7985dbd5dba","unresolved":false,"context_lines":[{"line_number":66,"context_line":"  the non-admin whitelist and the following parameters will be"},{"line_number":67,"context_line":"  appended to the non-admin users\u0027 whitelist:"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"  [\u0027project_id\u0027]"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_a90afe87","line":69,"in_reply_to":"7a77a97e_0e2f83a1","updated":"2016-11-18 11:27:58.000000000","message":"Right, the idea was to limit it the computationally OK things.\n\nI believe sort is worse than filter, but I would want confirmation of that.\n\nWe could start with just stopping the 500s, but it feels like these are DDos attack vectors worth removing.\n\nA middle ground might be to have policy on an \"extended\" list, and by default restrict access to admin only, or no one?","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"0f527669d72af4acea288f474ada9e8abef5f278","unresolved":false,"context_lines":[{"line_number":66,"context_line":"  the non-admin whitelist and the following parameters will be"},{"line_number":67,"context_line":"  appended to the non-admin users\u0027 whitelist:"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"  [\u0027project_id\u0027]"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_0e2f83a1","line":69,"in_reply_to":"7a77a97e_fb64d922","updated":"2016-11-18 06:21:34.000000000","message":"It is due to the column missing DB index","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9ffc4568aa0ac5b0aeabfdd669baa925e66c512d","unresolved":false,"context_lines":[{"line_number":72,"context_line":"Alternatives"},{"line_number":73,"context_line":"------------"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"Keep it as before."},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"Data model impact"},{"line_number":78,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_9b5da549","line":75,"updated":"2016-11-17 21:15:43.000000000","message":"Seems we could have more details here on why we want to restrict this, which is mainly because we can change the internal data structure and now the API is broken for something that used to work.\n\nWe also want to restrict this to ease paging instances across multiple cells.","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9ffc4568aa0ac5b0aeabfdd669baa925e66c512d","unresolved":false,"context_lines":[{"line_number":82,"context_line":"REST API impact"},{"line_number":83,"context_line":"---------------"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"Requests with invalid filter will be ignored them. For requests"},{"line_number":86,"context_line":"with invalid sort key, HTTP 400 will be returned."},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"The query parameter schema for the server list/detail will be::"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_bb042118","line":85,"range":{"start_line":85,"start_character":45,"end_line":85,"end_character":49},"updated":"2016-11-17 21:15:43.000000000","message":"s/them//","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"a5648ee7f1688a7a817863c5a6c7fcf0c0e55893","unresolved":false,"context_lines":[{"line_number":111,"context_line":"            \u0027sort_key\u0027: multi_params("},{"line_number":112,"context_line":"                {"},{"line_number":113,"context_line":"                 \u0027type\u0027: \u0027string\u0027,"},{"line_number":114,"context_line":"                 \u0027enum\u0027: [\u0027name\u0027, \u0027reservation_id\u0027, \u0027status\u0027, \u0027project_id\u0027,"},{"line_number":115,"context_line":"                          \u0027created_at\u0027, \u0027uuid\u0027, \u0027terminate_id\u0027, \u0027host\u0027]"},{"line_number":116,"context_line":"                }"},{"line_number":117,"context_line":"            )"},{"line_number":118,"context_line":"        }"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_6d42f669","line":115,"range":{"start_line":114,"start_character":27,"end_line":115,"end_character":71},"updated":"2016-11-17 07:49:45.000000000","message":"The schema isn\u0027t match the line 61 side. The \u0027host\u0027 should be removed.","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9ffc4568aa0ac5b0aeabfdd669baa925e66c512d","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                }"},{"line_number":117,"context_line":"            )"},{"line_number":118,"context_line":"        }"},{"line_number":119,"context_line":"        \u0027additional_properties\u0027: True"},{"line_number":120,"context_line":"    }"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    schema_2_3 \u003d copy.deep_copy(schema_2_1)"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_fe4e876d","line":119,"updated":"2016-11-17 21:15:43.000000000","message":"So this is the part where you can specify other things like foo and bar but they just get ignored?","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9ffc4568aa0ac5b0aeabfdd669baa925e66c512d","unresolved":false,"context_lines":[{"line_number":120,"context_line":"    }"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    schema_2_3 \u003d copy.deep_copy(schema_2_1)"},{"line_number":123,"context_line":"    schema_2_3[\u0027properties\u0027][\u0027status\u0027] \u003d multi_params({"},{"line_number":124,"context_line":"        \u0027type\u0027: \u0027string\u0027,"},{"line_number":125,"context_line":"        \u0027enum\u0027: ["},{"line_number":126,"context_line":"            \u0027ACTIVE\u0027, \u0027REBOOT\u0027, \u0027HARD_REBOOT\u0027, \u0027PASSWORD\u0027, \u0027REBUILD\u0027,"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_7eb19746","line":123,"updated":"2016-11-17 21:15:43.000000000","message":"Why is this specific to 2.3? Did you mean 2_38?\n\nhttp://docs.openstack.org/developer/nova/api_microversion_history.html#maximum-in-newton","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9ffc4568aa0ac5b0aeabfdd669baa925e66c512d","unresolved":false,"context_lines":[{"line_number":167,"context_line":""},{"line_number":168,"context_line":"Developer impact"},{"line_number":169,"context_line":"----------------"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"Implementation"},{"line_number":173,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_9edcb374","line":170,"updated":"2016-11-17 21:15:43.000000000","message":"There is probably some developer impact here. Basically any time you\u0027d add something new to instances that is exposed in the REST API you\u0027d need to consider updating the schema for sorting/filtering on that new thing. For example, there is talk about storing trusted certificate UUIDs with an instance:\n\nhttps://review.openstack.org/#/c/357151/\n\nSo I could see as an admin wanting to be able to filter all instances that are using a given certificate UUID in case it\u0027s been compromised.\n\nThat would probably be stored as a json blob in the instance_extra table though, so we couldn\u0027t really filter on that in that form.\n\nBut the developer impact there is you\u0027d need to consider how you store new fields for the instance in case you want to be able to sort/filter on them later.","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9ffc4568aa0ac5b0aeabfdd669baa925e66c512d","unresolved":false,"context_lines":[{"line_number":185,"context_line":"----------"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"1. Add query parameter whitelist for admin and non-admin users to"},{"line_number":188,"context_line":"   strict the users to use limited query parameters when listing."},{"line_number":189,"context_line":"2. Add related tests."},{"line_number":190,"context_line":"3. Modify Novaclient to work with the whitelists."},{"line_number":191,"context_line":"4. Add doc illustrate how to correctly use filter and sort params"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_fe892727","line":188,"range":{"start_line":188,"start_character":57,"end_line":188,"end_character":64},"updated":"2016-11-17 21:15:43.000000000","message":"listing servers","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9ffc4568aa0ac5b0aeabfdd669baa925e66c512d","unresolved":false,"context_lines":[{"line_number":185,"context_line":"----------"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"1. Add query parameter whitelist for admin and non-admin users to"},{"line_number":188,"context_line":"   strict the users to use limited query parameters when listing."},{"line_number":189,"context_line":"2. Add related tests."},{"line_number":190,"context_line":"3. Modify Novaclient to work with the whitelists."},{"line_number":191,"context_line":"4. Add doc illustrate how to correctly use filter and sort params"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_9e94b343","line":188,"range":{"start_line":188,"start_character":3,"end_line":188,"end_character":9},"updated":"2016-11-17 21:15:43.000000000","message":"restrict","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9ffc4568aa0ac5b0aeabfdd669baa925e66c512d","unresolved":false,"context_lines":[{"line_number":188,"context_line":"   strict the users to use limited query parameters when listing."},{"line_number":189,"context_line":"2. Add related tests."},{"line_number":190,"context_line":"3. Modify Novaclient to work with the whitelists."},{"line_number":191,"context_line":"4. Add doc illustrate how to correctly use filter and sort params"},{"line_number":192,"context_line":"   when list servers"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"Dependencies"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_5eea1bad","line":191,"updated":"2016-11-17 21:15:43.000000000","message":"This would need to be updated specifically:\n\nhttp://developer.openstack.org/api-guide/compute/server_concepts.html#server-query","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"a5648ee7f1688a7a817863c5a6c7fcf0c0e55893","unresolved":false,"context_lines":[{"line_number":193,"context_line":""},{"line_number":194,"context_line":"Dependencies"},{"line_number":195,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"https://bugs.launchpad.net/nova/+bug/1609039"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"Testing"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_8db9127c","line":196,"updated":"2016-11-17 07:49:45.000000000","message":"This spec also depends on this one also https://review.openstack.org/388518","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9ffc4568aa0ac5b0aeabfdd669baa925e66c512d","unresolved":false,"context_lines":[{"line_number":199,"context_line":"Testing"},{"line_number":200,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"The unittest, functional and tempest test will be added."},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"Documentation Impact"},{"line_number":205,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":6,"id":"7a77a97e_de1b8bc8","line":202,"updated":"2016-11-17 21:15:43.000000000","message":"nit: I don\u0027t know that we need tempest testing for this, in-tree tests should suffice. The only impacts to tempest might be if there are existing tests that might be broken by the changes...although that would indicate a backward incompatible API issue - for joined tables I\u0027m fine with breaking those, but for other attributes we expose today that are directly on the instances table I think that\u0027s wrong. We should only restrict within microversions, but I think the initial set shouldn\u0027t be restrictive beyond the joined table columns.","commit_id":"68d825a3e4ac0ab97974046ae24077fc402c86b0"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"c0fd0129bb1a2ca93f3114e6dd5eae8e7af2efa6","unresolved":false,"context_lines":[{"line_number":82,"context_line":"  without indexes in the all microversions. This can avoid to break user"},{"line_number":83,"context_line":"  client compare to return `HTTP Bad Request 400`."},{"line_number":84,"context_line":"* Ignores the filters which are pattern matching in all microversion."},{"line_number":85,"context_line":"* Only accepts first sort key in the request in all microversion."},{"line_number":86,"context_line":"* Introduce new policy rule `os_compute_api:enable_unsafe_query_parameters` to"},{"line_number":87,"context_line":"  control whether enable those ignored filters and sort keys. The default is"},{"line_number":88,"context_line":"  off for anyone. The admin can enable those unsafe parameters for admin-only"}],"source_content_type":"text/x-rst","patch_set":8,"id":"5a74a57a_dc9c7810","line":85,"range":{"start_line":85,"start_character":2,"end_line":85,"end_character":65},"updated":"2016-11-28 10:13:09.000000000","message":"I should say, the user can\u0027t use filter and sort together. The random combination of filter and sort may not utilize the indexes also.","commit_id":"ea7632436e3fbca01c970cef580561b17edbd03e"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"a63b58b65f29c47dbec13e2721e78977d31f7b93","unresolved":false,"context_lines":[{"line_number":82,"context_line":"  without indexes in the all microversions. This can avoid to break user"},{"line_number":83,"context_line":"  client compare to return `HTTP Bad Request 400`."},{"line_number":84,"context_line":"* Ignores the filters which are pattern matching in all microversion."},{"line_number":85,"context_line":"* Only accepts first sort key in the request in all microversion."},{"line_number":86,"context_line":"* Introduce new policy rule `os_compute_api:enable_unsafe_query_parameters` to"},{"line_number":87,"context_line":"  control whether enable those ignored filters and sort keys. The default is"},{"line_number":88,"context_line":"  off for anyone. The admin can enable those unsafe parameters for admin-only"}],"source_content_type":"text/x-rst","patch_set":8,"id":"5a74a57a_fabdb368","line":85,"range":{"start_line":85,"start_character":2,"end_line":85,"end_character":65},"in_reply_to":"5a74a57a_dc9c7810","updated":"2016-11-28 10:18:38.000000000","message":"So I think we have to allow sort and filter together, as its what people need to do. Now I am not sure what amount of that we should allow. Maybe we only allow one sort parameter maybe only two for admins? I duno how much different that all makes.","commit_id":"ea7632436e3fbca01c970cef580561b17edbd03e"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"26b70c76678cc17f2a804dbfcd28ddb696d1615d","unresolved":false,"context_lines":[{"line_number":82,"context_line":"  without indexes in the all microversions. This can avoid to break user"},{"line_number":83,"context_line":"  client compare to return `HTTP Bad Request 400`."},{"line_number":84,"context_line":"* Ignores the filters which are pattern matching in all microversion."},{"line_number":85,"context_line":"* Only accepts first sort key in the request in all microversion."},{"line_number":86,"context_line":"* Introduce new policy rule `os_compute_api:enable_unsafe_query_parameters` to"},{"line_number":87,"context_line":"  control whether enable those ignored filters and sort keys. The default is"},{"line_number":88,"context_line":"  off for anyone. The admin can enable those unsafe parameters for admin-only"}],"source_content_type":"text/x-rst","patch_set":8,"id":"5a74a57a_834a9324","line":85,"range":{"start_line":85,"start_character":2,"end_line":85,"end_character":65},"in_reply_to":"5a74a57a_fabdb368","updated":"2016-11-28 12:52:49.000000000","message":"Emm...after think about the non-admin case, actually the sort didn\u0027t get any benefit from the indexes.\n\nFor non-admin user, the list/detail will filter with project_id first, then the index \u0027instances_project_id_deleted_idx\u0027 will be used. But only one indexes can be used in one query. So no index will help on the sort.\n\nSo we want to allow some sort keys, there are no different to enable one or two, none of them can get benefit from indexes.","commit_id":"ea7632436e3fbca01c970cef580561b17edbd03e"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"faead358a286f9661ff731aaec38bcbf032c662a","unresolved":false,"context_lines":[{"line_number":102,"context_line":"    attributes."},{"line_number":103,"context_line":"  * The python-novaclient claimed the filters are [\u0027name\u0027, \u0027status\u0027, \u0027image\u0027,"},{"line_number":104,"context_line":"    \u0027flavor\u0027, \u0027ip, \u0027ip6\u0027, \u0027changes-sinces\u0027]. We will keep them, as we can\u0027t"},{"line_number":105,"context_line":"    remove them without major version bump for python-novaclient."},{"line_number":106,"context_line":"  * Add DB indexes for the filters: (\u0027vm_state\u0027, task_state\u0027) for \u0027status\u0027,"},{"line_number":107,"context_line":"    \u0027created_at\u0027, \u0027image\u0027, \u0027flavor\u0027."},{"line_number":108,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"3a71b18c_1aabeb8a","line":105,"updated":"2016-12-01 13:55:21.000000000","message":"I should add a note at here. \u0027name\u0027 is the only can\u0027t get help from the index, it is pattern matching. But \u0027name\u0027 is claimed in the python-novaclient.","commit_id":"103df4630f77a6ba5b8a7029871f46bcb17fd714"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"faead358a286f9661ff731aaec38bcbf032c662a","unresolved":false,"context_lines":[{"line_number":136,"context_line":"  [\u0027project_id\u0027, \u0027user_id\u0027, \u0027host\u0027, \u0027node\u0027]"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"But the most of sort keys aren\u0027t mapping to the API fields, they are mapping"},{"line_number":139,"context_line":"to the name of DB column. We will add the mapping of DB collumn. For example,"},{"line_number":140,"context_line":"there will be two sort keys \u0027name\u0027 and \u0027display_name\u0027 which are both mapping"},{"line_number":141,"context_line":"to the DB column \u0027display_name\u0027. In the future, we can remove the"},{"line_number":142,"context_line":" sort key \u0027display_name\u0027 by Microversion."}],"source_content_type":"text/x-rst","patch_set":9,"id":"3a71b18c_fa09cfde","line":139,"range":{"start_line":139,"start_character":26,"end_line":139,"end_character":64},"updated":"2016-12-01 13:55:21.000000000","message":"Emm... I\u0027m little prefer to do with microversion.","commit_id":"103df4630f77a6ba5b8a7029871f46bcb17fd714"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"538610cd13473711f7cad55fc1eadefe4036d6e4","unresolved":false,"context_lines":[{"line_number":70,"context_line":"* Avoid to expose the joined-table/internal attribute of DB object to the API"},{"line_number":71,"context_line":"  user."},{"line_number":72,"context_line":"* Avoid the API user filters/sorts on the DB column without index, which may"},{"line_number":73,"context_line":"  leads to DDoS to the system."},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"Proposed change"},{"line_number":76,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":10,"id":"3a71b18c_4d42d611","line":73,"updated":"2016-12-02 11:52:47.000000000","message":"nanonit: it\u0027s actually only a Denial of Service, it\u0027s not a DDoS","commit_id":"e4479da2225095dd847ac2ede7aa19888211b357"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"6244d2c9ee8d03b9f07eab868ccbbf11249a18d7","unresolved":false,"context_lines":[{"line_number":70,"context_line":"* Avoid to expose the joined-table/internal attribute of DB object to the API"},{"line_number":71,"context_line":"  user."},{"line_number":72,"context_line":"* Avoid the API user filters/sorts on the DB column without index, which may"},{"line_number":73,"context_line":"  leads to DDoS to the system."},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"Proposed change"},{"line_number":76,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":10,"id":"3a71b18c_fc07a819","line":73,"in_reply_to":"3a71b18c_4d42d611","updated":"2016-12-04 04:17:45.000000000","message":"Done","commit_id":"e4479da2225095dd847ac2ede7aa19888211b357"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"538610cd13473711f7cad55fc1eadefe4036d6e4","unresolved":false,"context_lines":[{"line_number":84,"context_line":"* Introduce new policy rule `os_compute_api:enable_unsafe_query_parameters` to"},{"line_number":85,"context_line":"  control whether enable those ignored filters and sort keys. The default is"},{"line_number":86,"context_line":"  off for anyone. The admin can enable those unsafe parameters for admin-only"},{"line_number":87,"context_line":"  or all the users."},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"In the future, those ignored filters/sort keys will be rejected with a new"},{"line_number":90,"context_line":"microversion."}],"source_content_type":"text/x-rst","patch_set":10,"id":"3a71b18c_2d303a9e","line":87,"updated":"2016-12-02 11:52:47.000000000","message":"Why do we think we need to do this? I think the API should always have the same sort parameters, otherwise usage is going to be really weird. \n\nI\u0027d much rather just say we\u0027ll be very accepting of adding new parameters without much justification as long as the database tables are properly optimized with indexes when it happens instead of letting through crazy stuff.","commit_id":"e4479da2225095dd847ac2ede7aa19888211b357"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"6244d2c9ee8d03b9f07eab868ccbbf11249a18d7","unresolved":false,"context_lines":[{"line_number":84,"context_line":"* Introduce new policy rule `os_compute_api:enable_unsafe_query_parameters` to"},{"line_number":85,"context_line":"  control whether enable those ignored filters and sort keys. The default is"},{"line_number":86,"context_line":"  off for anyone. The admin can enable those unsafe parameters for admin-only"},{"line_number":87,"context_line":"  or all the users."},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"In the future, those ignored filters/sort keys will be rejected with a new"},{"line_number":90,"context_line":"microversion."}],"source_content_type":"text/x-rst","patch_set":10,"id":"3a71b18c_6f211c9f","line":87,"in_reply_to":"3a71b18c_2d303a9e","updated":"2016-12-04 04:17:45.000000000","message":"We want to avoid some user really depend on some of ignored parameters. Just afraid break them. So this give a chance people get those parameters back.\n\nYes, it is bad without any discoverable way for admin change the policy rule.\n\n I\u0027m a little hesitate on this. Another idea is the line 146. Return 403, tell the user, admin disable it. If we assume all the user can process 403 correctly, then everything is good. Otherwise, yea, just ignore those parameters is best way for not breaking user.","commit_id":"e4479da2225095dd847ac2ede7aa19888211b357"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"5a6c02e7fe5017e2f74de960aa150cc3a9e8cfbb","unresolved":false,"context_lines":[{"line_number":84,"context_line":"* Introduce new policy rule `os_compute_api:enable_unsafe_query_parameters` to"},{"line_number":85,"context_line":"  control whether enable those ignored filters and sort keys. The default is"},{"line_number":86,"context_line":"  off for anyone. The admin can enable those unsafe parameters for admin-only"},{"line_number":87,"context_line":"  or all the users."},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"In the future, those ignored filters/sort keys will be rejected with a new"},{"line_number":90,"context_line":"microversion."}],"source_content_type":"text/x-rst","patch_set":10,"id":"3a71b18c_42672725","line":87,"in_reply_to":"3a71b18c_6f211c9f","updated":"2016-12-08 06:50:30.000000000","message":"As the discussion in the api meeting, for the policy control, we can discuss it after John back. Let us making progress at here.","commit_id":"e4479da2225095dd847ac2ede7aa19888211b357"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"538610cd13473711f7cad55fc1eadefe4036d6e4","unresolved":false,"context_lines":[{"line_number":87,"context_line":"  or all the users."},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"In the future, those ignored filters/sort keys will be rejected with a new"},{"line_number":90,"context_line":"microversion."},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"The whitelists can be different for admin users and non-admin users:"},{"line_number":93,"context_line":""}],"source_content_type":"text/x-rst","patch_set":10,"id":"3a71b18c_ade36a04","line":90,"updated":"2016-12-02 11:52:47.000000000","message":"Maybe, I don\u0027t think there is really any safe way to turn this on though, so the ignore state is probably as good as any.","commit_id":"e4479da2225095dd847ac2ede7aa19888211b357"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"6244d2c9ee8d03b9f07eab868ccbbf11249a18d7","unresolved":false,"context_lines":[{"line_number":87,"context_line":"  or all the users."},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"In the future, those ignored filters/sort keys will be rejected with a new"},{"line_number":90,"context_line":"microversion."},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"The whitelists can be different for admin users and non-admin users:"},{"line_number":93,"context_line":""}],"source_content_type":"text/x-rst","patch_set":10,"id":"3a71b18c_cf36b0e6","line":90,"in_reply_to":"3a71b18c_ade36a04","updated":"2016-12-04 04:17:45.000000000","message":"yea, I guess this will be a argument point. But I can remove this line now.","commit_id":"e4479da2225095dd847ac2ede7aa19888211b357"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"5c555ce7e97eb3b92c793540873b8cd40b27116e","unresolved":false,"context_lines":[{"line_number":102,"context_line":"    remove them without major version bump for python-novaclient."},{"line_number":103,"context_line":"  * Add DB indexes for the filters: (\u0027vm_state\u0027, task_state\u0027) for \u0027status\u0027,"},{"line_number":104,"context_line":"    \u0027created_at\u0027, \u0027image\u0027, \u0027flavor\u0027. The \u0027name\u0027 is pattern matching, so it"},{"line_number":105,"context_line":"    can get benefit from index, keep it for python-novaclient."},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"* The filters whitelist for admin users will be a superset of"},{"line_number":108,"context_line":"  the non-admin whitelist."}],"source_content_type":"text/x-rst","patch_set":10,"id":"3a71b18c_af97b48e","line":105,"range":{"start_line":105,"start_character":4,"end_line":105,"end_character":7},"updated":"2016-12-04 04:23:46.000000000","message":"Oops, there should be \u0027can\u0027t\"!","commit_id":"e4479da2225095dd847ac2ede7aa19888211b357"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"538610cd13473711f7cad55fc1eadefe4036d6e4","unresolved":false,"context_lines":[{"line_number":114,"context_line":""},{"line_number":115,"context_line":"  The final list is with append to the non-admin users whitelist:"},{"line_number":116,"context_line":"  [\u0027all_tenant\u0027, \u0027project_id\u0027, \u0027created_at\u0027, \u0027uuid\u0027, \u0027terminated_at\u0027 \u0027host\u0027,"},{"line_number":117,"context_line":"   \u0027deleted\u0027]."},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"* The sort_key whitelist for non-admin users."},{"line_number":120,"context_line":"  * In most of time, the sort can\u0027t get benefit from db index. So the strategy"}],"source_content_type":"text/x-rst","patch_set":10,"id":"3a71b18c_2d083a91","line":117,"updated":"2016-12-02 11:52:47.000000000","message":"I think the only question I\u0027d have is is there really any reason to have these been distinct lists. As long as all_tenant and project_id only let you see things that your context gives you access to, I don\u0027t see it being an issue to be available to everyone. In a future hierarchical project world, project admins would have that ability.\n\nIs host here a real hostname, or our magic hash? I think it would be fine if the magic hash is available for normal users, as they can then see that 2 computes are on the same node, which would actually be really useful at times.","commit_id":"e4479da2225095dd847ac2ede7aa19888211b357"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"6244d2c9ee8d03b9f07eab868ccbbf11249a18d7","unresolved":false,"context_lines":[{"line_number":114,"context_line":""},{"line_number":115,"context_line":"  The final list is with append to the non-admin users whitelist:"},{"line_number":116,"context_line":"  [\u0027all_tenant\u0027, \u0027project_id\u0027, \u0027created_at\u0027, \u0027uuid\u0027, \u0027terminated_at\u0027 \u0027host\u0027,"},{"line_number":117,"context_line":"   \u0027deleted\u0027]."},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"* The sort_key whitelist for non-admin users."},{"line_number":120,"context_line":"  * In most of time, the sort can\u0027t get benefit from db index. So the strategy"}],"source_content_type":"text/x-rst","patch_set":10,"id":"3a71b18c_af6974c0","line":117,"in_reply_to":"3a71b18c_2d083a91","updated":"2016-12-04 04:17:45.000000000","message":"yea, good point. all_tenants should be also available to the non-admin user.  It is also enable for now. But it will return 403, when the poicy rule disallow for non-admin user.\n\nthe \u0027project_id\u0027 is ignored by non-admin user now, accroding this code https://github.com/openstack/nova/blob/f8a81807e016c17e6c45d318d5c92ba0cc758b01/nova/api/openstack/compute/servers.py#L1103\n\nShould we extend the existed non-admin user list? And do we want to add one more poilcy rule for \u0027project_id\u0027 or just use the policy rule for \u0027all_tenant\u0027?\n\nI\u0027m kind of think we should enable new parameter by microversion.\n\n\nThe \u0027host\u0027 is the host name, it isn\u0027t the hash.","commit_id":"e4479da2225095dd847ac2ede7aa19888211b357"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"538610cd13473711f7cad55fc1eadefe4036d6e4","unresolved":false,"context_lines":[{"line_number":132,"context_line":"  the non-admin whitelist and the following parameters will be"},{"line_number":133,"context_line":"  appended to the non-admin users\u0027 whitelist:"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"  [\u0027project_id\u0027, \u0027user_id\u0027, \u0027host\u0027, \u0027node\u0027]"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"But the most of sort keys aren\u0027t mapping to the API fields, they are mapping"},{"line_number":138,"context_line":"to the name of DB column directly. We will add the mapping of DB collumn. For"}],"source_content_type":"text/x-rst","patch_set":10,"id":"3a71b18c_8d406ea7","line":135,"updated":"2016-12-02 11:52:47.000000000","message":"node is really the only dangerous one here right, because that\u0027s actually compute node, and leaks something. Host is the weird hash?","commit_id":"e4479da2225095dd847ac2ede7aa19888211b357"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"6244d2c9ee8d03b9f07eab868ccbbf11249a18d7","unresolved":false,"context_lines":[{"line_number":132,"context_line":"  the non-admin whitelist and the following parameters will be"},{"line_number":133,"context_line":"  appended to the non-admin users\u0027 whitelist:"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"  [\u0027project_id\u0027, \u0027user_id\u0027, \u0027host\u0027, \u0027node\u0027]"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"But the most of sort keys aren\u0027t mapping to the API fields, they are mapping"},{"line_number":138,"context_line":"to the name of DB column directly. We will add the mapping of DB collumn. For"}],"source_content_type":"text/x-rst","patch_set":10,"id":"3a71b18c_2f9c84bf","line":135,"in_reply_to":"3a71b18c_8d406ea7","updated":"2016-12-04 04:17:45.000000000","message":"Host isn\u0027t the hash, it is the real host name.\n\nIt is ok enable project_id and user_id.","commit_id":"e4479da2225095dd847ac2ede7aa19888211b357"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"538610cd13473711f7cad55fc1eadefe4036d6e4","unresolved":false,"context_lines":[{"line_number":135,"context_line":"  [\u0027project_id\u0027, \u0027user_id\u0027, \u0027host\u0027, \u0027node\u0027]"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"But the most of sort keys aren\u0027t mapping to the API fields, they are mapping"},{"line_number":138,"context_line":"to the name of DB column directly. We will add the mapping of DB collumn. For"},{"line_number":139,"context_line":"example, there will be two sort keys \u0027name\u0027 and \u0027display_name\u0027 which are both"},{"line_number":140,"context_line":"mapping to the DB column \u0027display_name\u0027. In the future, we can remove the"},{"line_number":141,"context_line":"sort key \u0027display_name\u0027 by Microversion."}],"source_content_type":"text/x-rst","patch_set":10,"id":"3a71b18c_2d167aa7","line":138,"range":{"start_line":138,"start_character":68,"end_line":138,"end_character":69},"updated":"2016-12-02 11:52:47.000000000","message":"nit: column","commit_id":"e4479da2225095dd847ac2ede7aa19888211b357"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"6244d2c9ee8d03b9f07eab868ccbbf11249a18d7","unresolved":false,"context_lines":[{"line_number":135,"context_line":"  [\u0027project_id\u0027, \u0027user_id\u0027, \u0027host\u0027, \u0027node\u0027]"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"But the most of sort keys aren\u0027t mapping to the API fields, they are mapping"},{"line_number":138,"context_line":"to the name of DB column directly. We will add the mapping of DB collumn. For"},{"line_number":139,"context_line":"example, there will be two sort keys \u0027name\u0027 and \u0027display_name\u0027 which are both"},{"line_number":140,"context_line":"mapping to the DB column \u0027display_name\u0027. In the future, we can remove the"},{"line_number":141,"context_line":"sort key \u0027display_name\u0027 by Microversion."}],"source_content_type":"text/x-rst","patch_set":10,"id":"3a71b18c_4f9f00b4","line":138,"range":{"start_line":138,"start_character":68,"end_line":138,"end_character":69},"in_reply_to":"3a71b18c_2d167aa7","updated":"2016-12-04 04:17:45.000000000","message":"Done","commit_id":"e4479da2225095dd847ac2ede7aa19888211b357"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"538610cd13473711f7cad55fc1eadefe4036d6e4","unresolved":false,"context_lines":[{"line_number":138,"context_line":"to the name of DB column directly. We will add the mapping of DB collumn. For"},{"line_number":139,"context_line":"example, there will be two sort keys \u0027name\u0027 and \u0027display_name\u0027 which are both"},{"line_number":140,"context_line":"mapping to the DB column \u0027display_name\u0027. In the future, we can remove the"},{"line_number":141,"context_line":"sort key \u0027display_name\u0027 by Microversion."},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"Alternatives"},{"line_number":144,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":10,"id":"3a71b18c_2d64ba47","line":141,"updated":"2016-12-02 11:52:47.000000000","message":"sure, we should probably mark one of them deprecated in the process during documentation.","commit_id":"e4479da2225095dd847ac2ede7aa19888211b357"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"6244d2c9ee8d03b9f07eab868ccbbf11249a18d7","unresolved":false,"context_lines":[{"line_number":138,"context_line":"to the name of DB column directly. We will add the mapping of DB collumn. For"},{"line_number":139,"context_line":"example, there will be two sort keys \u0027name\u0027 and \u0027display_name\u0027 which are both"},{"line_number":140,"context_line":"mapping to the DB column \u0027display_name\u0027. In the future, we can remove the"},{"line_number":141,"context_line":"sort key \u0027display_name\u0027 by Microversion."},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"Alternatives"},{"line_number":144,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":10,"id":"3a71b18c_8fa918e2","line":141,"in_reply_to":"3a71b18c_2d64ba47","updated":"2016-12-04 04:17:45.000000000","message":"I\u0027m also hesitate on enable the api field mapped sort key by new microversion. It is good for new enabled sort-key can be discovered by microversion.","commit_id":"e4479da2225095dd847ac2ede7aa19888211b357"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"5a6c02e7fe5017e2f74de960aa150cc3a9e8cfbb","unresolved":false,"context_lines":[{"line_number":138,"context_line":"to the name of DB column directly. We will add the mapping of DB collumn. For"},{"line_number":139,"context_line":"example, there will be two sort keys \u0027name\u0027 and \u0027display_name\u0027 which are both"},{"line_number":140,"context_line":"mapping to the DB column \u0027display_name\u0027. In the future, we can remove the"},{"line_number":141,"context_line":"sort key \u0027display_name\u0027 by Microversion."},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"Alternatives"},{"line_number":144,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":10,"id":"3a71b18c_6243436d","line":141,"in_reply_to":"3a71b18c_8fa918e2","updated":"2016-12-08 06:50:30.000000000","message":"According the discussion, we can add those new sort keys later, and with microversion. Anyway this isn\u0027t key thing this spec addressed.","commit_id":"e4479da2225095dd847ac2ede7aa19888211b357"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"69e0df380dc190543318c634d14f609e7954e073","unresolved":false,"context_lines":[{"line_number":97,"context_line":"    \u0027created_at\u0027, \u0027image\u0027, \u0027flavor\u0027. The \u0027name\u0027 is pattern matching, so it"},{"line_number":98,"context_line":"    can\u0027t get benefit from index, keep it for python-novaclient."},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"* The filters whitelist for admin users will be a superset of"},{"line_number":101,"context_line":"  the non-admin whitelist."},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"  * Return `HTTP Bad Request 400` for the joined-table and object internal"},{"line_number":104,"context_line":"    attributes."}],"source_content_type":"text/x-rst","patch_set":14,"id":"3a71b18c_9b4de89b","line":101,"range":{"start_line":100,"start_character":0,"end_line":101,"end_character":26},"updated":"2016-12-09 12:18:19.000000000","message":"Just found, for admin users, both \u0027name\u0027 and \u0027display_name\u0027 works. We have a mapping list at here https://github.com/openstack/nova/blob/master/nova/compute/api.py#L2336.\n\nBut I think we can remove the one which are same with DB column name. Due to we never claim that are supported.","commit_id":"2ff3422e0dcf85bdd1c3191a9f10a4c5b73a2d38"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"5cbe3a54c6523b9644eac392af07e36ca60f99a7","unresolved":false,"context_lines":[{"line_number":106,"context_line":"    matching, which includes most of DB column of \u0027instances\u0027 table."},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"  The final list is with append to the non-admin users whitelist:"},{"line_number":109,"context_line":"  [\u0027all_tenant\u0027, \u0027project_id\u0027, \u0027created_at\u0027, \u0027uuid\u0027, \u0027terminated_at\u0027 \u0027host\u0027,"},{"line_number":110,"context_line":"   \u0027deleted\u0027]."},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"* The sort_key whitelist for non-admin users."}],"source_content_type":"text/x-rst","patch_set":14,"id":"3a71b18c_764d8171","line":109,"range":{"start_line":109,"start_character":18,"end_line":109,"end_character":28},"updated":"2016-12-09 12:20:22.000000000","message":"same problem as above, there should be \u0027tenant_id\u0027","commit_id":"2ff3422e0dcf85bdd1c3191a9f10a4c5b73a2d38"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1e880792783447d096acc54fa9d32ca43a639746","unresolved":false,"context_lines":[{"line_number":10,"context_line":""},{"line_number":11,"context_line":"https://blueprints.launchpad.net/nova/+spec/add-whitelist-for-server-list-filter-sort-parameters"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Currently the filter and sort query parameters can be used for"},{"line_number":14,"context_line":"server list/detail` API are not explicit defined (the filters that can be used"},{"line_number":15,"context_line":"for non-admin users are defined). That leads to some bugs and problems in the"},{"line_number":16,"context_line":"API. This spec aims to add a strict set of whitelisted filtering and sorting"}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_35ba5524","line":13,"range":{"start_line":13,"start_character":47,"end_line":13,"end_character":50},"updated":"2016-12-13 15:29:12.000000000","message":"nit: which can be used","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1e880792783447d096acc54fa9d32ca43a639746","unresolved":false,"context_lines":[{"line_number":11,"context_line":"https://blueprints.launchpad.net/nova/+spec/add-whitelist-for-server-list-filter-sort-parameters"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Currently the filter and sort query parameters can be used for"},{"line_number":14,"context_line":"server list/detail` API are not explicit defined (the filters that can be used"},{"line_number":15,"context_line":"for non-admin users are defined). That leads to some bugs and problems in the"},{"line_number":16,"context_line":"API. This spec aims to add a strict set of whitelisted filtering and sorting"},{"line_number":17,"context_line":"parameters for server list/detail operations."}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_551b5172","line":14,"range":{"start_line":14,"start_character":18,"end_line":14,"end_character":19},"updated":"2016-12-13 15:29:12.000000000","message":"I\u0027m not sure why this is here.","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1e880792783447d096acc54fa9d32ca43a639746","unresolved":false,"context_lines":[{"line_number":11,"context_line":"https://blueprints.launchpad.net/nova/+spec/add-whitelist-for-server-list-filter-sort-parameters"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Currently the filter and sort query parameters can be used for"},{"line_number":14,"context_line":"server list/detail` API are not explicit defined (the filters that can be used"},{"line_number":15,"context_line":"for non-admin users are defined). That leads to some bugs and problems in the"},{"line_number":16,"context_line":"API. This spec aims to add a strict set of whitelisted filtering and sorting"},{"line_number":17,"context_line":"parameters for server list/detail operations."}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_d581214c","line":14,"range":{"start_line":14,"start_character":32,"end_line":14,"end_character":40},"updated":"2016-12-13 15:29:12.000000000","message":"explicitly","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1e880792783447d096acc54fa9d32ca43a639746","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"This leads to two problems:"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"* The bad performance query. The API user can filter/sort based on the DB"},{"line_number":29,"context_line":"  column without DB indexes. And some of those filters are pattern matching"},{"line_number":30,"context_line":"  which can\u0027t utilize the DB indexes. The API user can specify multiple sort"},{"line_number":31,"context_line":"  keys, but there is no correspoinding composite indexes."}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_7505adc0","line":28,"range":{"start_line":28,"start_character":2,"end_line":28,"end_character":27},"updated":"2016-12-13 15:29:12.000000000","message":"Bad query performance.","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1e880792783447d096acc54fa9d32ca43a639746","unresolved":false,"context_lines":[{"line_number":26,"context_line":"This leads to two problems:"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"* The bad performance query. The API user can filter/sort based on the DB"},{"line_number":29,"context_line":"  column without DB indexes. And some of those filters are pattern matching"},{"line_number":30,"context_line":"  which can\u0027t utilize the DB indexes. The API user can specify multiple sort"},{"line_number":31,"context_line":"  keys, but there is no correspoinding composite indexes."},{"line_number":32,"context_line":"* The DB schema exposes to the REST API directly. For the filter parameters,"},{"line_number":33,"context_line":"  the joined-table and internal attribute `__wrapper__` can be used as filter."}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_b5266566","line":30,"range":{"start_line":29,"start_character":29,"end_line":30,"end_character":38},"updated":"2016-12-13 15:29:12.000000000","message":"An example might be nice.","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"997d87aff43322f3b9704d807d386124db8084db","unresolved":false,"context_lines":[{"line_number":26,"context_line":"This leads to two problems:"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"* The bad performance query. The API user can filter/sort based on the DB"},{"line_number":29,"context_line":"  column without DB indexes. And some of those filters are pattern matching"},{"line_number":30,"context_line":"  which can\u0027t utilize the DB indexes. The API user can specify multiple sort"},{"line_number":31,"context_line":"  keys, but there is no correspoinding composite indexes."},{"line_number":32,"context_line":"* The DB schema exposes to the REST API directly. For the filter parameters,"},{"line_number":33,"context_line":"  the joined-table and internal attribute `__wrapper__` can be used as filter."}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_1c8ac7bf","line":30,"range":{"start_line":29,"start_character":29,"end_line":30,"end_character":38},"in_reply_to":"1a6eadb0_b5266566","updated":"2016-12-14 03:40:45.000000000","message":"yea, probably the filters out of this list https://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/api.py#L2221","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1e880792783447d096acc54fa9d32ca43a639746","unresolved":false,"context_lines":[{"line_number":30,"context_line":"  which can\u0027t utilize the DB indexes. The API user can specify multiple sort"},{"line_number":31,"context_line":"  keys, but there is no correspoinding composite indexes."},{"line_number":32,"context_line":"* The DB schema exposes to the REST API directly. For the filter parameters,"},{"line_number":33,"context_line":"  the joined-table and internal attribute `__wrapper__` can be used as filter."},{"line_number":34,"context_line":"  But the API user will get `HTTP Interal Server Error 500` returned. If there"},{"line_number":35,"context_line":"  is new column added to the DB schema, that new column will be enabled as"},{"line_number":36,"context_line":"  filter directly without API version bump. This break our API rule. The"}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_55a8b11f","line":33,"range":{"start_line":33,"start_character":43,"end_line":33,"end_character":54},"updated":"2016-12-13 15:29:12.000000000","message":"I\u0027m still not sure what this is. I don\u0027t see anything about this in nova or oslo.db.","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"c10348eb6431de6133177d30c9a682a3d8836e7a","unresolved":false,"context_lines":[{"line_number":30,"context_line":"  which can\u0027t utilize the DB indexes. The API user can specify multiple sort"},{"line_number":31,"context_line":"  keys, but there is no correspoinding composite indexes."},{"line_number":32,"context_line":"* The DB schema exposes to the REST API directly. For the filter parameters,"},{"line_number":33,"context_line":"  the joined-table and internal attribute `__wrapper__` can be used as filter."},{"line_number":34,"context_line":"  But the API user will get `HTTP Interal Server Error 500` returned. If there"},{"line_number":35,"context_line":"  is new column added to the DB schema, that new column will be enabled as"},{"line_number":36,"context_line":"  filter directly without API version bump. This break our API rule. The"}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_88307058","line":33,"range":{"start_line":33,"start_character":43,"end_line":33,"end_character":54},"in_reply_to":"1a6eadb0_55a8b11f","updated":"2016-12-13 15:34:57.000000000","message":"This is an attribute of db model object. You can try this \"/servers?__wrapper__\u003dabc\"","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b615c2566d814b616e12ed40c52f6ea6b8665e65","unresolved":false,"context_lines":[{"line_number":30,"context_line":"  which can\u0027t utilize the DB indexes. The API user can specify multiple sort"},{"line_number":31,"context_line":"  keys, but there is no correspoinding composite indexes."},{"line_number":32,"context_line":"* The DB schema exposes to the REST API directly. For the filter parameters,"},{"line_number":33,"context_line":"  the joined-table and internal attribute `__wrapper__` can be used as filter."},{"line_number":34,"context_line":"  But the API user will get `HTTP Interal Server Error 500` returned. If there"},{"line_number":35,"context_line":"  is new column added to the DB schema, that new column will be enabled as"},{"line_number":36,"context_line":"  filter directly without API version bump. This break our API rule. The"}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_a1d1c7cf","line":33,"range":{"start_line":33,"start_character":43,"end_line":33,"end_character":54},"in_reply_to":"1a6eadb0_88307058","updated":"2016-12-13 16:47:35.000000000","message":"Huh, I don\u0027t see that in nova, oslo.db or sqlalchemy.","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"997d87aff43322f3b9704d807d386124db8084db","unresolved":false,"context_lines":[{"line_number":30,"context_line":"  which can\u0027t utilize the DB indexes. The API user can specify multiple sort"},{"line_number":31,"context_line":"  keys, but there is no correspoinding composite indexes."},{"line_number":32,"context_line":"* The DB schema exposes to the REST API directly. For the filter parameters,"},{"line_number":33,"context_line":"  the joined-table and internal attribute `__wrapper__` can be used as filter."},{"line_number":34,"context_line":"  But the API user will get `HTTP Interal Server Error 500` returned. If there"},{"line_number":35,"context_line":"  is new column added to the DB schema, that new column will be enabled as"},{"line_number":36,"context_line":"  filter directly without API version bump. This break our API rule. The"}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_217da01c","line":33,"range":{"start_line":33,"start_character":43,"end_line":33,"end_character":54},"in_reply_to":"1a6eadb0_a1d1c7cf","updated":"2016-12-14 03:40:45.000000000","message":"I found that problem at https://review.openstack.org/#/c/393205/1/specs/ocata/approved/server-list-query-parameter-whitelist.rst@23\n\nThen I make a mistake, remember the \u0027__mapper__\u0027 as \u0027__wrapper__\u0027. Sorry about that.\n\nThe reason is we use \u0027getattr\u0027 on the Db model object. \nhttps://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/api.py#L2369\n\nIf we print the dir(model), we will get the list as below:\n[\u0027__class__\u0027, \u0027__contains__\u0027, \u0027__copy__\u0027, \u0027__delattr__\u0027, \u0027__dict__\u0027, \u0027__doc__\u0027, \u0027__format__\u0027, \u0027__getattribute__\u0027, \u0027__getitem__\u0027, \u0027__hash__\u0027, \u0027__init__\u0027, \u0027__iter__\u0027, \u0027__mapper__\u0027, \u0027__module__\u0027, \u0027__new__\u0027, \u0027__reduce__\u0027, \u0027__reduce_ex__\u0027, \u0027__repr__\u0027, \u0027__setattr__\u0027, \u0027__setitem__\u0027, \u0027__sizeof__\u0027, \u0027__str__\u0027, \u0027__subclasshook__\u0027, \u0027__table__\u0027, \u0027__table_args__\u0027, \u0027__table_initialized__\u0027, \u0027__tablename__\u0027, \u0027__weakref__\u0027, \u0027_as_dict\u0027, \u0027_decl_class_registry\u0027, \u0027_extra_keys\u0027, \u0027_sa_class_manager\u0027, \u0027access_ip_v4\u0027, \u0027access_ip_v6\u0027, \u0027architecture\u0027, \u0027auto_disk_config\u0027, \u0027availability_zone\u0027, \u0027block_device_mapping\u0027, \u0027cell_name\u0027, \u0027cleaned\u0027, \u0027config_drive\u0027, \u0027console_auth_tokens\u0027, \u0027created_at\u0027, \u0027default_ephemeral_device\u0027, \u0027default_swap_device\u0027, \u0027deleted\u0027, \u0027deleted_at\u0027, \u0027disable_terminate\u0027, \u0027display_description\u0027, \u0027display_name\u0027, \u0027ephemeral_gb\u0027, \u0027ephemeral_key_uuid\u0027, \u0027extra\u0027, \u0027get\u0027, \u0027host\u0027, \u0027hostname\u0027, \u0027id\u0027, \u0027image_ref\u0027, \u0027info_cache\u0027, \u0027injected_files\u0027, \u0027instance_type_id\u0027, \u0027items\u0027, \u0027iteritems\u0027, \u0027kernel_id\u0027, \u0027key_data\u0027, \u0027key_name\u0027, \u0027keys\u0027, \u0027launch_index\u0027, \u0027launched_at\u0027, \u0027launched_on\u0027, \u0027locked\u0027, \u0027locked_by\u0027, \u0027memory_mb\u0027, \u0027metadata\u0027, \u0027name\u0027, \u0027next\u0027, \u0027node\u0027, \u0027os_type\u0027, \u0027pci_devices\u0027, \u0027power_state\u0027, \u0027progress\u0027, \u0027project_id\u0027, \u0027ramdisk_id\u0027, \u0027reservation_id\u0027, \u0027root_device_name\u0027, \u0027root_gb\u0027, \u0027save\u0027, \u0027security_groups\u0027, \u0027services\u0027, \u0027shutdown_terminate\u0027, \u0027soft_delete\u0027, \u0027system_metadata\u0027, \u0027tags\u0027, \u0027task_state\u0027, \u0027terminated_at\u0027, \u0027update\u0027, \u0027updated_at\u0027, \u0027user_data\u0027, \u0027user_id\u0027, \u0027uuid\u0027, \u0027vcpus\u0027, \u0027vm_mode\u0027, \u0027vm_state\u0027]\n\n\nAll the internal attribute will trigger the 500.","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1e880792783447d096acc54fa9d32ca43a639746","unresolved":false,"context_lines":[{"line_number":35,"context_line":"  is new column added to the DB schema, that new column will be enabled as"},{"line_number":36,"context_line":"  filter directly without API version bump. This break our API rule. The"},{"line_number":37,"context_line":"  value of `sort_key` have same problem. Although the problem of sort with"},{"line_number":38,"context_line":"  joined-table is fixed [0], other problems still need to be fixed."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"The filter parameters are supported by the server list/detail as below:"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_957ec9e2","line":38,"range":{"start_line":38,"start_character":24,"end_line":38,"end_character":27},"updated":"2016-12-13 15:29:12.000000000","message":"This change says the order_by column needs to be a QueryableAttribute but how do we know that from the data model?","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"997d87aff43322f3b9704d807d386124db8084db","unresolved":false,"context_lines":[{"line_number":35,"context_line":"  is new column added to the DB schema, that new column will be enabled as"},{"line_number":36,"context_line":"  filter directly without API version bump. This break our API rule. The"},{"line_number":37,"context_line":"  value of `sort_key` have same problem. Although the problem of sort with"},{"line_number":38,"context_line":"  joined-table is fixed [0], other problems still need to be fixed."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"The filter parameters are supported by the server list/detail as below:"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_614a38c7","line":38,"range":{"start_line":38,"start_character":24,"end_line":38,"end_character":27},"in_reply_to":"1a6eadb0_3cb79a3a","updated":"2016-12-14 03:40:45.000000000","message":"I feel I mix the db tablename and the attribute name of db model in testing.\n\nLook at the oslo.db, it use \"inspect(model).all_orm_descriptors\" instead of \"getattr\" \nhttps://github.com/openstack/oslo.db/blob/master/oslo_db/sqlalchemy/utils.py#L190\n\nprint the  \"inspect(model).all_orm_descriptors.keys()\", we will get the list as below:\n\n[\u0027vm_state\u0027, \u0027extra\u0027, \u0027terminated_at\u0027, \u0027ramdisk_id\u0027, \u0027instance_type_id\u0027, \u0027user_data\u0027, \u0027availability_zone\u0027, \u0027cleaned\u0027, \u0027vm_mode\u0027, \u0027deleted_at\u0027, \u0027reservation_id\u0027, \u0027id\u0027, \u0027security_groups\u0027, \u0027disable_terminate\u0027, \u0027console_auth_tokens\u0027, \u0027user_id\u0027, \u0027uuid\u0027, \u0027default_swap_device\u0027, \u0027info_cache\u0027, \u0027hostname\u0027, \u0027ephemeral_gb\u0027, \u0027launched_on\u0027, \u0027display_description\u0027, \u0027key_data\u0027, \u0027kernel_id\u0027, \u0027power_state\u0027, \u0027default_ephemeral_device\u0027, \u0027progress\u0027, \u0027project_id\u0027, \u0027launched_at\u0027, \u0027metadata\u0027, \u0027node\u0027, \u0027pci_devices\u0027, \u0027access_ip_v6\u0027, \u0027access_ip_v4\u0027, \u0027deleted\u0027, \u0027key_name\u0027, \u0027block_device_mapping\u0027, \u0027__mapper__\u0027, \u0027updated_at\u0027, \u0027host\u0027, \u0027ephemeral_key_uuid\u0027, \u0027architecture\u0027, \u0027services\u0027, \u0027display_name\u0027, \u0027system_metadata\u0027, \u0027task_state\u0027, \u0027shutdown_terminate\u0027, \u0027tags\u0027, \u0027cell_name\u0027, \u0027root_gb\u0027, \u0027locked\u0027, \u0027created_at\u0027, \u0027locked_by\u0027, \u0027launch_index\u0027, \u0027memory_mb\u0027, \u0027vcpus\u0027, \u0027image_ref\u0027, \u0027root_device_name\u0027, \u0027auto_disk_config\u0027, \u0027os_type\u0027, \u0027config_drive\u0027]\n\n\nThe joined table: extra, system_metadata, info_cache, etc in the list. And the \u0027__mapper__\u0027. All of them will trigger 500","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b615c2566d814b616e12ed40c52f6ea6b8665e65","unresolved":false,"context_lines":[{"line_number":35,"context_line":"  is new column added to the DB schema, that new column will be enabled as"},{"line_number":36,"context_line":"  filter directly without API version bump. This break our API rule. The"},{"line_number":37,"context_line":"  value of `sort_key` have same problem. Although the problem of sort with"},{"line_number":38,"context_line":"  joined-table is fixed [0], other problems still need to be fixed."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"The filter parameters are supported by the server list/detail as below:"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_3cb79a3a","line":38,"range":{"start_line":38,"start_character":24,"end_line":38,"end_character":27},"in_reply_to":"1a6eadb0_487578f7","updated":"2016-12-13 16:47:35.000000000","message":"OK so I get a 400 when sorting with instance_system_metadata:\n\nstack@filters:~/devstack$ nova list --sort instance_system_metadata\nERROR (BadRequest): Sort key supplied was not valid. (HTTP 400) (Request-ID: req-2d4e2c6a-4e1a-462a-9737-9d70b9597d51)\n\n\nAnd a 500 with some other random junk:\n\nstack@filters:~/devstack$ nova list --sort system_metadata\nERROR (ClientException): Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.\n\u003ctype \u0027exceptions.NotImplementedError\u0027\u003e (HTTP 500) (Request-ID: req-36131c62-b25c-410d-83e3-6c3fa4e2fe45)\n\n\n2016-12-13 16:39:54.953 ERROR nova.api.openstack.extensions [req-36131c62-b25c-410d-83e3-6c3fa4e2fe45 admin demo] Unexpected exception in API method\n2016-12-13 16:39:54.953 TRACE nova.api.openstack.extensions Traceback (most recent call last):\n2016-12-13 16:39:54.953 TRACE nova.api.openstack.extensions   File \"/opt/stack/nova/nova/api/openstack/extensions.py\", line 338, in wrapped\n2016-12-13 16:39:54.953 TRACE nova.api.openstack.extensions     return f(*args, **kwargs)\n2016-12-13 16:39:54.953 TRACE nova.api.openstack.extensions   File \"/opt/stack/nova/nova/api/openstack/compute/servers.py\", line 207, in detail\n2016-12-13 16:39:54.953 TRACE nova.api.openstack.extensions     servers \u003d self._get_servers(req, is_detail\u003dTrue)\n2016-12-13 16:39:54.953 TRACE nova.api.openstack.extensions   File \"/opt/stack/nova/nova/api/openstack/compute/servers.py\", line 347, in _get_servers\n2016-12-13 16:39:54.953 TRACE nova.api.openstack.extensions     sort_keys\u003dsort_keys, sort_dirs\u003dsort_dirs)\n2016-12-13 16:39:54.953 TRACE nova.api.openstack.extensions   File \"/opt/stack/nova/nova/compute/api.py\", line 2400, in get_all\n2016-12-13 16:39:54.953 TRACE nova.api.openstack.extensions     sort_dirs\u003dsort_dirs)\n2016-12-13 16:39:54.953 TRACE nova.api.openstack.extensions   File \"/opt/stack/nova/nova/compute/api.py\", line 2477, in _get_instances_by_filters\n2016-12-13 16:39:54.953 TRACE nova.api.openstack.extensions     expected_attrs\u003dfields, sort_keys\u003dsort_keys, sort_dirs\u003dsort_dirs)\n2016-12-13 16:39:54.953 TRACE nova.api.openstack.extensions   File \"/usr/local/lib/python2.7/dist-packages/oslo_versionedobjects/base.py\", line 184, in wrapper\n2016-12-13 16:39:54.953 TRACE nova.api.openstack.extensions     result \u003d fn(cls, context, *args, **kwargs)\n2016-12-13 16:39:54.953 TRACE nova.api.openstack.extensions   File \"/opt/stack/nova/nova/objects/instance.py\", line 1219, in get_by_filters\n2016-12-13 16:39:54.953 TRACE nova.api.openstack.extensions     use_slave\u003duse_slave, sort_keys\u003dsort_keys, sort_dirs\u003dsort_dirs)\n2016-12-13 16:39:54.953 TRACE nova.api.openstack.extensions   File \"/opt/stack/nova/nova/db/sqlalchemy/api.py\", line 226, in wrapper\n2016-12-13 16:39:54.953 TRACE nova.api.openstack.extensions     return f(*args, **kwargs)\n2016-12-13 16:39:54.953 TRACE nova.api.openstack.extensions   File \"/opt/stack/nova/nova/objects/instance.py\", line 1203, in _get_by_filters_impl\n2016-12-13 16:39:54.953 TRACE nova.api.openstack.extensions     sort_keys\u003dsort_keys, sort_dirs\u003dsort_dirs)\n2016-12-13 16:39:54.953 TRACE nova.api.openstack.extensions   File \"/opt/stack/nova/nova/db/api.py\", line 763, in instance_get_all_by_filters_sort\n2016-12-13 16:39:54.953 TRACE nova.api.openstack.extensions     sort_dirs\u003dsort_dirs)\n2016-12-13 16:39:54.953 TRACE nova.api.openstack.extensions   File \"/opt/stack/nova/nova/db/sqlalchemy/api.py\", line 170, in wrapper\n2016-12-13 16:39:54.953 TRACE nova.api.openstack.extensions     return f(*args, **kwargs)\n2016-12-13 16:39:54.953 TRACE nova.api.openstack.extensions   File \"/opt/stack/nova/nova/db/sqlalchemy/api.py\", line 271, in wrapped\n2016-12-13 16:39:54.953 TRACE nova.api.openstack.extensions     return f(context, *args, **kwargs)\n2016-12-13 16:39:54.953 TRACE nova.api.openstack.extensions   File \"/opt/stack/nova/nova/db/sqlalchemy/api.py\", line 2246, in instance_get_all_by_filters_sort\n2016-12-13 16:39:54.953 TRACE nova.api.openstack.extensions     sort_dirs\u003dsort_dirs)\n2016-12-13 16:39:54.953 TRACE nova.api.openstack.extensions   File \"/usr/local/lib/python2.7/dist-packages/oslo_db/sqlalchemy/utils.py\", line 204, in paginate_query\n2016-12-13 16:39:54.953 TRACE nova.api.openstack.extensions     \"nullsfirst\": sort_key_attr.is_(None),\n2016-12-13 16:39:54.953 TRACE nova.api.openstack.extensions   File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/operators.py\", line 487, in is_\n2016-12-13 16:39:54.953 TRACE nova.api.openstack.extensions     return self.operate(is_, other)\n2016-12-13 16:39:54.953 TRACE nova.api.openstack.extensions   File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/attributes.py\", line 175, in operate\n2016-12-13 16:39:54.953 TRACE nova.api.openstack.extensions     return op(self.comparator, *other, **kwargs)\n2016-12-13 16:39:54.953 TRACE nova.api.openstack.extensions   File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/operators.py\", line 707, in is_\n2016-12-13 16:39:54.953 TRACE nova.api.openstack.extensions     return a.is_(b)\n2016-12-13 16:39:54.953 TRACE nova.api.openstack.extensions   File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/operators.py\", line 487, in is_\n2016-12-13 16:39:54.953 TRACE nova.api.openstack.extensions     return self.operate(is_, other)\n2016-12-13 16:39:54.953 TRACE nova.api.openstack.extensions   File \"/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/operators.py\", line 186, in operate\n2016-12-13 16:39:54.953 TRACE nova.api.openstack.extensions     raise NotImplementedError(str(op))\n2016-12-13 16:39:54.953 TRACE nova.api.openstack.extensions NotImplementedError: \u003cfunction is_ at 0x7f49bc1176e0\u003e\n2016-12-13 16:39:54.953 TRACE nova.api.openstack.extensions","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"c10348eb6431de6133177d30c9a682a3d8836e7a","unresolved":false,"context_lines":[{"line_number":35,"context_line":"  is new column added to the DB schema, that new column will be enabled as"},{"line_number":36,"context_line":"  filter directly without API version bump. This break our API rule. The"},{"line_number":37,"context_line":"  value of `sort_key` have same problem. Although the problem of sort with"},{"line_number":38,"context_line":"  joined-table is fixed [0], other problems still need to be fixed."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"The filter parameters are supported by the server list/detail as below:"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_487578f7","line":38,"range":{"start_line":38,"start_character":24,"end_line":38,"end_character":27},"in_reply_to":"1a6eadb0_957ec9e2","updated":"2016-12-13 15:34:57.000000000","message":"Before that change we return 500 when we sort with joined-table, after that change, nova api return 400","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b615c2566d814b616e12ed40c52f6ea6b8665e65","unresolved":false,"context_lines":[{"line_number":59,"context_line":""},{"line_number":60,"context_line":"* All the columns of instance table are mapping to sort key."},{"line_number":61,"context_line":"* The sort key is internal attribute of DB object: `__wrapper__`. The API"},{"line_number":62,"context_line":"  always return `HTTP Interal Server Error 500`."},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"Most of sort keys are without DB index also. For the invalid sort key, the API"},{"line_number":65,"context_line":"return `HTTP Bad Request 400`."}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_fc79a230","line":62,"range":{"start_line":62,"start_character":16,"end_line":62,"end_character":48},"updated":"2016-12-13 16:47:35.000000000","message":"This is actually a 400:\n\nstack@filters:~/devstack$ nova list --sort __wrapper__\nERROR (BadRequest): Sort key supplied was not valid. (HTTP 400) (Request-ID: req-c49d91de-f7f0-4d05-b921-27018543e671)\n\nIf it\u0027s not an internal attribute of the model, then it\u0027s a 500 (as seen above when sorting on \u0027system_metadata\u0027).","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"997d87aff43322f3b9704d807d386124db8084db","unresolved":false,"context_lines":[{"line_number":59,"context_line":""},{"line_number":60,"context_line":"* All the columns of instance table are mapping to sort key."},{"line_number":61,"context_line":"* The sort key is internal attribute of DB object: `__wrapper__`. The API"},{"line_number":62,"context_line":"  always return `HTTP Interal Server Error 500`."},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"Most of sort keys are without DB index also. For the invalid sort key, the API"},{"line_number":65,"context_line":"return `HTTP Bad Request 400`."}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_c115cc9b","line":62,"range":{"start_line":62,"start_character":16,"end_line":62,"end_character":48},"in_reply_to":"1a6eadb0_fc79a230","updated":"2016-12-14 03:40:45.000000000","message":"sorry about that. it should be \u0027__mapper__\u0027","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"36035aa17895df0d96e438bd9165a0b0d5adeac6","unresolved":false,"context_lines":[{"line_number":75,"context_line":"Proposed change"},{"line_number":76,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"This spec proposes:"},{"line_number":79,"context_line":"* Return `HTTP Bad Request 400` for the filters/sort keys which is joined table"},{"line_number":80,"context_line":"  and object internal attributes."},{"line_number":81,"context_line":"* Ignores the filters/sort keys which are used rarely and the mapped DB column"}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_6fb07144","line":78,"updated":"2016-12-13 19:11:20.000000000","message":"nit: you need a blank line after this else the bullets don\u0027t render properly:\n\nhttp://docs-draft.openstack.org/05/393205/16/check/gate-nova-specs-docs-ubuntu-xenial/71f0fbb//doc/build/html/specs/ocata/approved/add-whitelist-for-server-list-filter-sort-parameters.html#proposed-change","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"36035aa17895df0d96e438bd9165a0b0d5adeac6","unresolved":false,"context_lines":[{"line_number":78,"context_line":"This spec proposes:"},{"line_number":79,"context_line":"* Return `HTTP Bad Request 400` for the filters/sort keys which is joined table"},{"line_number":80,"context_line":"  and object internal attributes."},{"line_number":81,"context_line":"* Ignores the filters/sort keys which are used rarely and the mapped DB column"},{"line_number":82,"context_line":"  without indexes in the all microversions. This can avoid to break user"},{"line_number":83,"context_line":"  client compare to return `HTTP Bad Request 400`."},{"line_number":84,"context_line":""}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_2ff4b9f0","line":81,"range":{"start_line":81,"start_character":14,"end_line":81,"end_character":53},"updated":"2016-12-13 19:11:20.000000000","message":"What defines \u0027rarely\u0027 here? In other words, are we just saying that if it\u0027s not an indexed column we\u0027re going to ignore them?","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"997d87aff43322f3b9704d807d386124db8084db","unresolved":false,"context_lines":[{"line_number":78,"context_line":"This spec proposes:"},{"line_number":79,"context_line":"* Return `HTTP Bad Request 400` for the filters/sort keys which is joined table"},{"line_number":80,"context_line":"  and object internal attributes."},{"line_number":81,"context_line":"* Ignores the filters/sort keys which are used rarely and the mapped DB column"},{"line_number":82,"context_line":"  without indexes in the all microversions. This can avoid to break user"},{"line_number":83,"context_line":"  client compare to return `HTTP Bad Request 400`."},{"line_number":84,"context_line":""}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_617878f3","line":81,"range":{"start_line":81,"start_character":14,"end_line":81,"end_character":53},"in_reply_to":"1a6eadb0_2ff4b9f0","updated":"2016-12-14 03:40:45.000000000","message":"We don\u0027t have exact definition about \u0027rarely\u0027, we just think which parameters haven\u0027t strong use-case.","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"36035aa17895df0d96e438bd9165a0b0d5adeac6","unresolved":false,"context_lines":[{"line_number":85,"context_line":"The whitelists can be different for admin users and non-admin users:"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"* The filters whitelist for non-admin users already exists:"},{"line_number":88,"context_line":"  https://github.com/openstack/nova/blob/f8a81807e016c17e6c45d318d5c92ba0cc758b01/nova/api/openstack/compute/servers.py#L1103"},{"line_number":89,"context_line":"  which is:"},{"line_number":90,"context_line":"  [\u0027reservation_id\u0027, \u0027name\u0027, \u0027status\u0027, \u0027image\u0027, \u0027flavor\u0027,"},{"line_number":91,"context_line":"  \u0027ip\u0027, \u0027changes-since\u0027, \u0027ip6\u0027, \u0027tags\u0027, \u0027tags-any\u0027, \u0027not-tags\u0027, \u0027not-tags-any\u0027]"}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_0f3b7d9d","line":88,"updated":"2016-12-13 19:11:20.000000000","message":"nit: I\u0027d probably make this a [1] reference.","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"36035aa17895df0d96e438bd9165a0b0d5adeac6","unresolved":false,"context_lines":[{"line_number":90,"context_line":"  [\u0027reservation_id\u0027, \u0027name\u0027, \u0027status\u0027, \u0027image\u0027, \u0027flavor\u0027,"},{"line_number":91,"context_line":"  \u0027ip\u0027, \u0027changes-since\u0027, \u0027ip6\u0027, \u0027tags\u0027, \u0027tags-any\u0027, \u0027not-tags\u0027, \u0027not-tags-any\u0027]"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"  * The python-novaclient claimed the filters are [\u0027name\u0027, \u0027status\u0027, \u0027image\u0027,"},{"line_number":94,"context_line":"    \u0027flavor\u0027, \u0027ip, \u0027ip6\u0027, \u0027changes-sinces\u0027]. We will keep them, as we can\u0027t"},{"line_number":95,"context_line":"    remove them without major version bump for python-novaclient."},{"line_number":96,"context_line":"  * Add DB indexes for the filters: (\u0027vm_state\u0027, task_state\u0027) for \u0027status\u0027,"},{"line_number":97,"context_line":"    \u0027created_at\u0027, \u0027image\u0027, \u0027flavor\u0027. The \u0027name\u0027 is pattern matching, so it"}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_ef0561c2","line":94,"range":{"start_line":93,"start_character":50,"end_line":94,"end_character":43},"updated":"2016-12-13 19:11:20.000000000","message":"nit: novaclient also allows filtering on reservation-id","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"997d87aff43322f3b9704d807d386124db8084db","unresolved":false,"context_lines":[{"line_number":90,"context_line":"  [\u0027reservation_id\u0027, \u0027name\u0027, \u0027status\u0027, \u0027image\u0027, \u0027flavor\u0027,"},{"line_number":91,"context_line":"  \u0027ip\u0027, \u0027changes-since\u0027, \u0027ip6\u0027, \u0027tags\u0027, \u0027tags-any\u0027, \u0027not-tags\u0027, \u0027not-tags-any\u0027]"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"  * The python-novaclient claimed the filters are [\u0027name\u0027, \u0027status\u0027, \u0027image\u0027,"},{"line_number":94,"context_line":"    \u0027flavor\u0027, \u0027ip, \u0027ip6\u0027, \u0027changes-sinces\u0027]. We will keep them, as we can\u0027t"},{"line_number":95,"context_line":"    remove them without major version bump for python-novaclient."},{"line_number":96,"context_line":"  * Add DB indexes for the filters: (\u0027vm_state\u0027, task_state\u0027) for \u0027status\u0027,"},{"line_number":97,"context_line":"    \u0027created_at\u0027, \u0027image\u0027, \u0027flavor\u0027. The \u0027name\u0027 is pattern matching, so it"}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_a160d036","line":94,"range":{"start_line":93,"start_character":50,"end_line":94,"end_character":43},"in_reply_to":"1a6eadb0_ef0561c2","updated":"2016-12-14 03:40:45.000000000","message":"Thanks","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"36035aa17895df0d96e438bd9165a0b0d5adeac6","unresolved":false,"context_lines":[{"line_number":94,"context_line":"    \u0027flavor\u0027, \u0027ip, \u0027ip6\u0027, \u0027changes-sinces\u0027]. We will keep them, as we can\u0027t"},{"line_number":95,"context_line":"    remove them without major version bump for python-novaclient."},{"line_number":96,"context_line":"  * Add DB indexes for the filters: (\u0027vm_state\u0027, task_state\u0027) for \u0027status\u0027,"},{"line_number":97,"context_line":"    \u0027created_at\u0027, \u0027image\u0027, \u0027flavor\u0027. The \u0027name\u0027 is pattern matching, so it"},{"line_number":98,"context_line":"    can\u0027t get benefit from index, keep it for python-novaclient."},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"* The filters whitelist for admin users will be a superset of"}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_6fa4f1a5","line":97,"range":{"start_line":97,"start_character":5,"end_line":97,"end_character":15},"updated":"2016-12-13 19:11:20.000000000","message":"We already have the instances_deleted_created_at_idx index, do we also need one just for the created_at column?\n\nAlso, the default sort parameters are (created_at, id):\n\nhttps://github.com/openstack/nova/blob/f8a81807e016c17e6c45d318d5c92ba0cc758b01/nova/db/sqlalchemy/api.py#L2409\n\nAre we going to add an index for that too?","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"997d87aff43322f3b9704d807d386124db8084db","unresolved":false,"context_lines":[{"line_number":94,"context_line":"    \u0027flavor\u0027, \u0027ip, \u0027ip6\u0027, \u0027changes-sinces\u0027]. We will keep them, as we can\u0027t"},{"line_number":95,"context_line":"    remove them without major version bump for python-novaclient."},{"line_number":96,"context_line":"  * Add DB indexes for the filters: (\u0027vm_state\u0027, task_state\u0027) for \u0027status\u0027,"},{"line_number":97,"context_line":"    \u0027created_at\u0027, \u0027image\u0027, \u0027flavor\u0027. The \u0027name\u0027 is pattern matching, so it"},{"line_number":98,"context_line":"    can\u0027t get benefit from index, keep it for python-novaclient."},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"* The filters whitelist for admin users will be a superset of"}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_7c8c9b7f","line":97,"range":{"start_line":97,"start_character":5,"end_line":97,"end_character":15},"in_reply_to":"1a6eadb0_6fa4f1a5","updated":"2016-12-14 03:40:45.000000000","message":"ah, I missed one point. \"deleted\" is always in the filters. so index \u0027instances_deleted_created_at_idx\u0027 can help at here. I just think about only \u0027created_at\u0027 in the filters, then that index doesn\u0027t help.\n\nSo we needn\u0027t add index for created_at.\n\nThe sort can\u0027t get benefit from the index. There are comment in the patchset 8. And I ask Jay to help me ensure that.","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"0a84e4c6dccbe9044bcbe698054bd67a44a7d846","unresolved":false,"context_lines":[{"line_number":94,"context_line":"    \u0027flavor\u0027, \u0027ip, \u0027ip6\u0027, \u0027changes-sinces\u0027]. We will keep them, as we can\u0027t"},{"line_number":95,"context_line":"    remove them without major version bump for python-novaclient."},{"line_number":96,"context_line":"  * Add DB indexes for the filters: (\u0027vm_state\u0027, task_state\u0027) for \u0027status\u0027,"},{"line_number":97,"context_line":"    \u0027created_at\u0027, \u0027image\u0027, \u0027flavor\u0027. The \u0027name\u0027 is pattern matching, so it"},{"line_number":98,"context_line":"    can\u0027t get benefit from index, keep it for python-novaclient."},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"* The filters whitelist for admin users will be a superset of"}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_ef662a28","line":97,"range":{"start_line":97,"start_character":5,"end_line":97,"end_character":15},"in_reply_to":"1a6eadb0_7c8c9b7f","updated":"2016-12-14 07:40:16.000000000","message":"Thinking of the rule we added index should be as below:\n\nFirst in one query, only one index can be used by db. So we should use one index to shrink the result as the smallest set.\n\nFor the non-admin user and the admin user with all_tenant\u003d0, \u0027deleted\u0027 and \u0027project_id\u0027 are always in the filters. So \u0027instances_project_id_deleted_idx\u0027 is the index which is used in most time. If the user didn\u0027t put everything into single tenant, that will be good, \u0027deleted\u0027 and \u0027project_id\u0027 will shrink the result into small set. If the user only use single tenant in the cloud, and then nothing we can help at here.\n\nFor the admin user with all_tenant\u003d1, only \u0027deleted\u0027 is always in the filters. So I guess that is why we have a lot of multi-columns indexes which include \u0027deleted\u0027 column.\n\nSo the optimization we can do at here is for the case about the admin user with all_tenant\u003d1. Ensure each query have one multi-columns index can be used, and that multi-columns index includes the \u0027deleted\u0027 column.","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"a8060b602ce607379a95d2232d63817d3a82d215","unresolved":false,"context_lines":[{"line_number":94,"context_line":"    \u0027flavor\u0027, \u0027ip, \u0027ip6\u0027, \u0027changes-sinces\u0027]. We will keep them, as we can\u0027t"},{"line_number":95,"context_line":"    remove them without major version bump for python-novaclient."},{"line_number":96,"context_line":"  * Add DB indexes for the filters: (\u0027vm_state\u0027, task_state\u0027) for \u0027status\u0027,"},{"line_number":97,"context_line":"    \u0027created_at\u0027, \u0027image\u0027, \u0027flavor\u0027. The \u0027name\u0027 is pattern matching, so it"},{"line_number":98,"context_line":"    can\u0027t get benefit from index, keep it for python-novaclient."},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"* The filters whitelist for admin users will be a superset of"}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_85f2f7d0","line":97,"range":{"start_line":97,"start_character":5,"end_line":97,"end_character":15},"in_reply_to":"1a6eadb0_ef662a28","updated":"2016-12-14 08:16:32.000000000","message":"one more note: There is one way to help on the non-admin user and the admin user with all_tenant\u003d0, we adds a set of different combination of multiple-columns index like this (image, deleted, project_id, vm_state), (flavor, deleted, project_id, vm_state), (\"the column about the supported\", deleted, project_id, vm_state).......\n\nDue to the db query for this case, is looks like this:\n\nSELECT ...... FROM instances\nWHERE instances.deleted \u003d :deleted_1 AND (instances.vm_state !\u003d :vm_state_1 OR instances.vm_state IS NULL) AND instances.project_id \u003d :project_id_1 ORDER BY instances.created_at DESC, instances.id DESC\n LIMIT :param_1) AS anon_1 LEFT OUTER JOIN......\n\nI guess we can\u0027t add all the combination for all the filters.","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"36035aa17895df0d96e438bd9165a0b0d5adeac6","unresolved":false,"context_lines":[{"line_number":105,"context_line":"  * Ignore the filters without DB index and used rarely or which are pattern"},{"line_number":106,"context_line":"    matching, which includes most of DB column of \u0027instances\u0027 table."},{"line_number":107,"context_line":"  * There is mapping list for query parameters"},{"line_number":108,"context_line":"    https://github.com/openstack/nova/blob/f8a81807e016c17e6c45d318d5c92ba0cc758b01/nova/compute/api.py#L2266"},{"line_number":109,"context_line":"    It means both \u0027name\u0027 and \u0027display_name\u0027 works for admin users. So we will"},{"line_number":110,"context_line":"    keep those aliases."},{"line_number":111,"context_line":""}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_ef600138","line":108,"updated":"2016-12-13 19:11:20.000000000","message":"nit: move this to reference [2].","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"36035aa17895df0d96e438bd9165a0b0d5adeac6","unresolved":false,"context_lines":[{"line_number":110,"context_line":"    keep those aliases."},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"  The final list is with append to the non-admin users whitelist:"},{"line_number":113,"context_line":"  [\u0027all_tenant\u0027, \u0027tenant_id\u0027, \u0027created_at\u0027, \u0027uuid\u0027, \u0027terminated_at\u0027 \u0027host\u0027,"},{"line_number":114,"context_line":"   \u0027deleted\u0027]."},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"* The sort_key whitelist for non-admin users."}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_cfe1859c","line":113,"range":{"start_line":113,"start_character":69,"end_line":113,"end_character":73},"updated":"2016-12-13 19:11:20.000000000","message":"I see that novaclient allows filtering by host but we don\u0027t have that indexed, will we be adding an index for that also?","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"db1b9d4a793a5f95ba67e74d62092ee8cad5dd67","unresolved":false,"context_lines":[{"line_number":110,"context_line":"    keep those aliases."},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"  The final list is with append to the non-admin users whitelist:"},{"line_number":113,"context_line":"  [\u0027all_tenant\u0027, \u0027tenant_id\u0027, \u0027created_at\u0027, \u0027uuid\u0027, \u0027terminated_at\u0027 \u0027host\u0027,"},{"line_number":114,"context_line":"   \u0027deleted\u0027]."},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"* The sort_key whitelist for non-admin users."}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_c2506a0d","line":113,"range":{"start_line":113,"start_character":69,"end_line":113,"end_character":73},"in_reply_to":"1a6eadb0_cfe1859c","updated":"2016-12-14 04:37:42.000000000","message":"We have instance_host_node_deleted_idx to cover that.","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"36035aa17895df0d96e438bd9165a0b0d5adeac6","unresolved":false,"context_lines":[{"line_number":113,"context_line":"  [\u0027all_tenant\u0027, \u0027tenant_id\u0027, \u0027created_at\u0027, \u0027uuid\u0027, \u0027terminated_at\u0027 \u0027host\u0027,"},{"line_number":114,"context_line":"   \u0027deleted\u0027]."},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"* The sort_key whitelist for non-admin users."},{"line_number":117,"context_line":"  * In most of time, the sort can\u0027t get benefit from db index. So the strategy"},{"line_number":118,"context_line":"    is that keeping the sort key which is in the API response, and ignoring"},{"line_number":119,"context_line":"    the other keys."}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_2fe91981","line":116,"updated":"2016-12-13 19:11:20.000000000","message":"Need a blank line after this to render the bullet list properly.","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"36035aa17895df0d96e438bd9165a0b0d5adeac6","unresolved":false,"context_lines":[{"line_number":114,"context_line":"   \u0027deleted\u0027]."},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"* The sort_key whitelist for non-admin users."},{"line_number":117,"context_line":"  * In most of time, the sort can\u0027t get benefit from db index. So the strategy"},{"line_number":118,"context_line":"    is that keeping the sort key which is in the API response, and ignoring"},{"line_number":119,"context_line":"    the other keys."},{"line_number":120,"context_line":"  * Return `HTTP Bad Request 400` for joined table and object internal"},{"line_number":121,"context_line":"    attributes."},{"line_number":122,"context_line":""}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_0f67fd25","line":119,"range":{"start_line":117,"start_character":4,"end_line":119,"end_character":19},"updated":"2016-12-13 19:11:20.000000000","message":"I\u0027m not really following what this is saying. Is this saying that we won\u0027t sort in the database query but rather in the API python code itself?","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"997d87aff43322f3b9704d807d386124db8084db","unresolved":false,"context_lines":[{"line_number":114,"context_line":"   \u0027deleted\u0027]."},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"* The sort_key whitelist for non-admin users."},{"line_number":117,"context_line":"  * In most of time, the sort can\u0027t get benefit from db index. So the strategy"},{"line_number":118,"context_line":"    is that keeping the sort key which is in the API response, and ignoring"},{"line_number":119,"context_line":"    the other keys."},{"line_number":120,"context_line":"  * Return `HTTP Bad Request 400` for joined table and object internal"},{"line_number":121,"context_line":"    attributes."},{"line_number":122,"context_line":""}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_fcf6ebf7","line":119,"range":{"start_line":117,"start_character":4,"end_line":119,"end_character":19},"in_reply_to":"1a6eadb0_0f67fd25","updated":"2016-12-14 03:40:45.000000000","message":"It\u0027s about the sort didn\u0027t get help from index. There are comment at patchset 8","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"36035aa17895df0d96e438bd9165a0b0d5adeac6","unresolved":false,"context_lines":[{"line_number":122,"context_line":""},{"line_number":123,"context_line":"  The list is [\u0027access_ip_v4\u0027, \u0027access_ip_v6\u0027, \u0027created_at\u0027, \u0027flavor\u0027,"},{"line_number":124,"context_line":"  \u0027uuid\u0027, \u0027image\u0027, \u0027key_name\u0027 \u0027display_name\u0027, \u0027config_drive\u0027,"},{"line_number":125,"context_line":"  \u0027auto_disk_config\u0027, \u0027availability_zone\u0027, \u0027power_state\u0027, \u0027vm_state\u0027,"},{"line_number":126,"context_line":"  \u0027launched_at\u0027, \u0027terminated_at\u0027, \u0027progress\u0027, \u0027updated_at\u0027, project_id\u0027,"},{"line_number":127,"context_line":"  \u0027user_id\u0027]"},{"line_number":128,"context_line":""}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_af59a95c","line":125,"range":{"start_line":125,"start_character":23,"end_line":125,"end_character":40},"updated":"2016-12-13 19:11:20.000000000","message":"How do we sort on AZ as it\u0027s not in the DB?","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"997d87aff43322f3b9704d807d386124db8084db","unresolved":false,"context_lines":[{"line_number":122,"context_line":""},{"line_number":123,"context_line":"  The list is [\u0027access_ip_v4\u0027, \u0027access_ip_v6\u0027, \u0027created_at\u0027, \u0027flavor\u0027,"},{"line_number":124,"context_line":"  \u0027uuid\u0027, \u0027image\u0027, \u0027key_name\u0027 \u0027display_name\u0027, \u0027config_drive\u0027,"},{"line_number":125,"context_line":"  \u0027auto_disk_config\u0027, \u0027availability_zone\u0027, \u0027power_state\u0027, \u0027vm_state\u0027,"},{"line_number":126,"context_line":"  \u0027launched_at\u0027, \u0027terminated_at\u0027, \u0027progress\u0027, \u0027updated_at\u0027, project_id\u0027,"},{"line_number":127,"context_line":"  \u0027user_id\u0027]"},{"line_number":128,"context_line":""}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_7c51fbd7","line":125,"range":{"start_line":125,"start_character":23,"end_line":125,"end_character":40},"in_reply_to":"1a6eadb0_af59a95c","updated":"2016-12-14 03:40:45.000000000","message":"We have a column in the DB https://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/models.py#L294","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"36035aa17895df0d96e438bd9165a0b0d5adeac6","unresolved":false,"context_lines":[{"line_number":130,"context_line":"  the non-admin whitelist and the following parameters will be"},{"line_number":131,"context_line":"  appended to the non-admin users\u0027 whitelist:"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"  [\u0027host\u0027, \u0027node\u0027]"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"But the most of sort keys aren\u0027t mapping to the API fields, they are mapping"},{"line_number":136,"context_line":"to the name of DB column directly. In the future, we hope to add the mapping of"}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_4f165556","line":133,"updated":"2016-12-13 19:11:20.000000000","message":"What about \u0027deleted\u0027 since admins can list deleted instances too. e.g.:\n\nstack@filters:~/devstack$ nova list --changes-since 2016-12-12\n+--------------------------------------+-------+---------+------------+-------------+-------------------------------------+----------------------+\n| ID                                   | Name  | Status  | Task State | Power State | Networks                            | Updated              |\n+--------------------------------------+-------+---------+------------+-------------+-------------------------------------+----------------------+\n| 23fd8173-366d-47f2-97bb-defbf60e98ab | test  | ACTIVE  | -          | Running     | private\u003dfde0:2377:15b4::6, 10.0.0.4 | 2016-12-13T16:37:32Z |\n| 90af01a3-9b1f-43bc-8066-cfc2dc4f9290 | test2 | DELETED | -          | NOSTATE     |                                     | 2016-12-13T18:59:31Z |\n+--------------------------------------+-------+---------+------------+-------------+-------------------------------------+----------------------+\nstack@filters:~/devstack$ nova list --changes-since 2016-12-12 --sort deleted\n+--------------------------------------+-------+---------+------------+-------------+-------------------------------------+----------------------+\n| ID                                   | Name  | Status  | Task State | Power State | Networks                            | Updated              |\n+--------------------------------------+-------+---------+------------+-------------+-------------------------------------+----------------------+\n| 90af01a3-9b1f-43bc-8066-cfc2dc4f9290 | test2 | DELETED | -          | NOSTATE     |                                     | 2016-12-13T18:59:31Z |\n| 23fd8173-366d-47f2-97bb-defbf60e98ab | test  | ACTIVE  | -          | Running     | private\u003dfde0:2377:15b4::6, 10.0.0.4 | 2016-12-13T16:37:32Z |\n+--------------------------------------+-------+---------+------------+-------------+-------------------------------------+----------------------+\nstack@filters:~/devstack$","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"997d87aff43322f3b9704d807d386124db8084db","unresolved":false,"context_lines":[{"line_number":130,"context_line":"  the non-admin whitelist and the following parameters will be"},{"line_number":131,"context_line":"  appended to the non-admin users\u0027 whitelist:"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"  [\u0027host\u0027, \u0027node\u0027]"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"But the most of sort keys aren\u0027t mapping to the API fields, they are mapping"},{"line_number":136,"context_line":"to the name of DB column directly. In the future, we hope to add the mapping of"}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_dcddaf43","line":133,"in_reply_to":"1a6eadb0_4f165556","updated":"2016-12-14 03:40:45.000000000","message":"Just try to keep a list sort keys which show in the API response. We don\u0027t have field \u0027deleted\u0027 in our API response.","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":21723,"name":"Gergely Csatari","email":"gergely.csatari@nokia.com","username":"csatari"},"change_message_id":"85de1345515e43f1011285019eb0ec2bfe4fe1ff","unresolved":false,"context_lines":[{"line_number":145,"context_line":"  off for anyone. The admin can enable those unsafe parameters for admin-only"},{"line_number":146,"context_line":"  or all the users."},{"line_number":147,"context_line":"* Instead of ignoring the unsafe query parameters, just return"},{"line_number":148,"context_line":"  `HTTP Forbidden 403` when policy is off. Think of the `403` is the common"},{"line_number":149,"context_line":"  case of the user client code will process."},{"line_number":150,"context_line":"* The other options for the default value of"},{"line_number":151,"context_line":"  `os_compute_api:enable_unsafe_query_parameters`:"}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_19184284","line":148,"range":{"start_line":148,"start_character":43,"end_line":148,"end_character":62},"updated":"2016-12-13 10:53:16.000000000","message":"Please provide also a reason for the 403 for more easy debugging.","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"36035aa17895df0d96e438bd9165a0b0d5adeac6","unresolved":false,"context_lines":[{"line_number":149,"context_line":"  case of the user client code will process."},{"line_number":150,"context_line":"* The other options for the default value of"},{"line_number":151,"context_line":"  `os_compute_api:enable_unsafe_query_parameters`:"},{"line_number":152,"context_line":"  * Enable those unsafe parameters for the admin default, but disable for"},{"line_number":153,"context_line":"    the non-admin user."},{"line_number":154,"context_line":"  * Enable those unsafe parameters for the admin and non-admin user default."},{"line_number":155,"context_line":"  Consider the user just use the default configuration sometime, avoid people"}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_aa91979b","line":152,"updated":"2016-12-13 19:11:20.000000000","message":"Need a blank line before this to render the bullet list properly.","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"36035aa17895df0d96e438bd9165a0b0d5adeac6","unresolved":false,"context_lines":[{"line_number":161,"context_line":"Data model impact"},{"line_number":162,"context_line":"-----------------"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"None"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"REST API impact"},{"line_number":167,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_4ace43b5","line":164,"updated":"2016-12-13 19:11:20.000000000","message":"Well, there is a data model impact as new indexes are going to be added to the instances table, right?","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"997d87aff43322f3b9704d807d386124db8084db","unresolved":false,"context_lines":[{"line_number":161,"context_line":"Data model impact"},{"line_number":162,"context_line":"-----------------"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"None"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"REST API impact"},{"line_number":167,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_1ce807e2","line":164,"in_reply_to":"1a6eadb0_4ace43b5","updated":"2016-12-14 03:40:45.000000000","message":"yea, will update","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"36035aa17895df0d96e438bd9165a0b0d5adeac6","unresolved":false,"context_lines":[{"line_number":167,"context_line":"---------------"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"* Request `HTTP BadRequest 400` for internal joined-table and internal"},{"line_number":170,"context_line":"attributes."},{"line_number":171,"context_line":"* Requests with invalid filter/sort will be ignored them in all microversion,"},{"line_number":172,"context_line":"when the API user can\u0027t pass the policy rule"},{"line_number":173,"context_line":"`os_compute_api:enable_unsafe_query_parameters`"}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_0a3b6b9d","line":170,"updated":"2016-12-13 19:11:20.000000000","message":"This doesn\u0027t render properly:\n\nhttp://docs-draft.openstack.org/05/393205/16/check/gate-nova-specs-docs-ubuntu-xenial/71f0fbb//doc/build/html/specs/ocata/approved/add-whitelist-for-server-list-filter-sort-parameters.html#rest-api-impact\n\nThe words have to align together, e.g.:\n\n* Request `HTTP BadRequest 400` for internal joined-table and\n  internal attributes.","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"36035aa17895df0d96e438bd9165a0b0d5adeac6","unresolved":false,"context_lines":[{"line_number":168,"context_line":""},{"line_number":169,"context_line":"* Request `HTTP BadRequest 400` for internal joined-table and internal"},{"line_number":170,"context_line":"attributes."},{"line_number":171,"context_line":"* Requests with invalid filter/sort will be ignored them in all microversion,"},{"line_number":172,"context_line":"when the API user can\u0027t pass the policy rule"},{"line_number":173,"context_line":"`os_compute_api:enable_unsafe_query_parameters`"},{"line_number":174,"context_line":""}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_0a628bad","line":171,"range":{"start_line":171,"start_character":52,"end_line":171,"end_character":56},"updated":"2016-12-13 19:11:20.000000000","message":"s/them//","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"36035aa17895df0d96e438bd9165a0b0d5adeac6","unresolved":false,"context_lines":[{"line_number":170,"context_line":"attributes."},{"line_number":171,"context_line":"* Requests with invalid filter/sort will be ignored them in all microversion,"},{"line_number":172,"context_line":"when the API user can\u0027t pass the policy rule"},{"line_number":173,"context_line":"`os_compute_api:enable_unsafe_query_parameters`"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"The JSON-Schema will includes all the supported filters and sort keys."},{"line_number":176,"context_line":""}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_ca68938a","line":173,"range":{"start_line":173,"start_character":0,"end_line":173,"end_character":47},"updated":"2016-12-13 19:11:20.000000000","message":"So this was listed as an alternative, but here you\u0027re saying we\u0027re going to add the policy rule anyway? If so, that should be part of the proposed change section, not just an alternative. Alternatives are generally things we can think about/discuss but there is a reason we don\u0027t do them, at least as part of this initial effort.","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"997d87aff43322f3b9704d807d386124db8084db","unresolved":false,"context_lines":[{"line_number":170,"context_line":"attributes."},{"line_number":171,"context_line":"* Requests with invalid filter/sort will be ignored them in all microversion,"},{"line_number":172,"context_line":"when the API user can\u0027t pass the policy rule"},{"line_number":173,"context_line":"`os_compute_api:enable_unsafe_query_parameters`"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"The JSON-Schema will includes all the supported filters and sort keys."},{"line_number":176,"context_line":""}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_9ca177ac","line":173,"range":{"start_line":173,"start_character":0,"end_line":173,"end_character":47},"in_reply_to":"1a6eadb0_ca68938a","updated":"2016-12-14 03:40:45.000000000","message":"sorry, I forget clean up this line. Sean has concern about this policy rule.\n We plan to discuss this in today api meeting.","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"36035aa17895df0d96e438bd9165a0b0d5adeac6","unresolved":false,"context_lines":[{"line_number":177,"context_line":"Security impact"},{"line_number":178,"context_line":"---------------"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"The filter/sort with bad performance is ignored. This can avoid DDoS attach."},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"Notifications impact"},{"line_number":183,"context_line":"--------------------"}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_2a102701","line":180,"range":{"start_line":180,"start_character":69,"end_line":180,"end_character":75},"updated":"2016-12-13 19:11:20.000000000","message":"attack","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"36035aa17895df0d96e438bd9165a0b0d5adeac6","unresolved":false,"context_lines":[{"line_number":199,"context_line":""},{"line_number":200,"context_line":"Some of filters/sorts can\u0027t be used anymore. If the deployer want to enable"},{"line_number":201,"context_line":"those filters/sorts, the deployer can enable it by the policy rule:"},{"line_number":202,"context_line":"`os_compute_api:enable_unsafe_query_parameters`"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"Developer impact"},{"line_number":205,"context_line":"----------------"}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_4ae1e3fd","line":202,"updated":"2016-12-13 19:11:20.000000000","message":"same comment above about whether or not this is an alternative thing we don\u0027t do","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"997d87aff43322f3b9704d807d386124db8084db","unresolved":false,"context_lines":[{"line_number":199,"context_line":""},{"line_number":200,"context_line":"Some of filters/sorts can\u0027t be used anymore. If the deployer want to enable"},{"line_number":201,"context_line":"those filters/sorts, the deployer can enable it by the policy rule:"},{"line_number":202,"context_line":"`os_compute_api:enable_unsafe_query_parameters`"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"Developer impact"},{"line_number":205,"context_line":"----------------"}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_fcaeeb96","line":202,"in_reply_to":"1a6eadb0_4ae1e3fd","updated":"2016-12-14 03:40:45.000000000","message":"I will clean up","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"36035aa17895df0d96e438bd9165a0b0d5adeac6","unresolved":false,"context_lines":[{"line_number":217,"context_line":"Other contributors:"},{"line_number":218,"context_line":"  Alex Xu \u003chejie.xu@intel.com\u003e"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"Work Items"},{"line_number":221,"context_line":"----------"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"1. Add query parameter white list for microversion 2.1."}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_6acbff53","line":220,"updated":"2016-12-13 19:11:20.000000000","message":"How about 2.9 and the \u0027locked\u0027 attribute?\n\nhttp://docs.openstack.org/developer/nova/api_microversion_history.html#id8\n\nI could see it being useful to filter and list only locked instances.\n\n--\n\nWhat about host_status for 2.16?\n\nhttp://docs.openstack.org/developer/nova/api_microversion_history.html#id14\n\ni.e. maybe I only want to list instances on a DOWN host so I can evacuate them?","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"997d87aff43322f3b9704d807d386124db8084db","unresolved":false,"context_lines":[{"line_number":217,"context_line":"Other contributors:"},{"line_number":218,"context_line":"  Alex Xu \u003chejie.xu@intel.com\u003e"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"Work Items"},{"line_number":221,"context_line":"----------"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"1. Add query parameter white list for microversion 2.1."}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_9c7977ff","line":220,"in_reply_to":"1a6eadb0_6acbff53","updated":"2016-12-14 03:40:45.000000000","message":"There is comment about locked will be deprecated https://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/models.py#L304\n\nWe only have locked_by in the db. The locked in the API is calculated by locked_by.\n\nThe host_status isn\u0027t in the instance table. It is calculated by service table and servicegroup.\nhttps://github.com/openstack/nova/blob/master/nova/compute/api.py#L3990","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"36035aa17895df0d96e438bd9165a0b0d5adeac6","unresolved":false,"context_lines":[{"line_number":221,"context_line":"----------"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"1. Add query parameter white list for microversion 2.1."},{"line_number":224,"context_line":"2. Add query parameter white list for microversion 2.3"},{"line_number":225,"context_line":"3. Add query parameter white list for microversion 2.26."},{"line_number":226,"context_line":"4. Add sort parameter white list for sort_keys."},{"line_number":227,"context_line":"5. Add doc illustrate how to correctly use filter and sort params"}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_4a9d6358","line":224,"updated":"2016-12-13 19:11:20.000000000","message":"Can you explain this a bit? The description for 2.3 is:\n\n\"Exposed additional attributes in os-extended-server-attributes: reservation_id, launch_index, ramdisk_id, kernel_id, hostname, root_device_name, userdata.\"\n\nSo are we going to allow sorting/filtering on userdata, for example? Since that\u0027s not listed above I figured it would be ignored.","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"997d87aff43322f3b9704d807d386124db8084db","unresolved":false,"context_lines":[{"line_number":221,"context_line":"----------"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"1. Add query parameter white list for microversion 2.1."},{"line_number":224,"context_line":"2. Add query parameter white list for microversion 2.3"},{"line_number":225,"context_line":"3. Add query parameter white list for microversion 2.26."},{"line_number":226,"context_line":"4. Add sort parameter white list for sort_keys."},{"line_number":227,"context_line":"5. Add doc illustrate how to correctly use filter and sort params"}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_1cdc87e3","line":224,"in_reply_to":"1a6eadb0_4a9d6358","updated":"2016-12-14 03:40:45.000000000","message":"Yea, and from the patches, I need to update this.\n\nI\u0027m not sure userdata. It is \u0027mediumtext\u0027. Probably we need \u0027FULLTEXT index\u0027?","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1e880792783447d096acc54fa9d32ca43a639746","unresolved":false,"context_lines":[{"line_number":245,"context_line":"References"},{"line_number":246,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"[0] `https://review.openstack.org/gitweb?p\u003dopenstack/oslo.db.git;a\u003dcommitdiff;h\u003d05ddf630ed63abf9e36edb1a849135426615a09d`"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"History"},{"line_number":251,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_1593995c","line":248,"updated":"2016-12-13 15:29:12.000000000","message":"How about just:\n\n[0] https://review.openstack.org/#/c/143632/\n\nIt would be nice for the link to actually render in the doc.","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"c10348eb6431de6133177d30c9a682a3d8836e7a","unresolved":false,"context_lines":[{"line_number":245,"context_line":"References"},{"line_number":246,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"[0] `https://review.openstack.org/gitweb?p\u003dopenstack/oslo.db.git;a\u003dcommitdiff;h\u003d05ddf630ed63abf9e36edb1a849135426615a09d`"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"History"},{"line_number":251,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":16,"id":"1a6eadb0_a85a8c81","line":248,"in_reply_to":"1a6eadb0_1593995c","updated":"2016-12-13 15:34:57.000000000","message":"Done","commit_id":"6297de31064d0fad83251571439d847555feb0a3"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"dfd64290aeefeeeb2e957f34e5c1f59aa0687602","unresolved":false,"context_lines":[{"line_number":21,"context_line":"The query parameters for server list/detail API are not limited and"},{"line_number":22,"context_line":"controlled at API layer. This leads to some problems:"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"* The bad query performance. The API user can filter/sort based on the DB"},{"line_number":25,"context_line":"  column without DB indexes."},{"line_number":26,"context_line":"* The DB schema exposes to the REST API directly. For example, if a new column"},{"line_number":27,"context_line":"  added to the DB schema, the new column will be enabled as filter and sort"},{"line_number":28,"context_line":"  parameter directly. This break the API rule: New feature needs to enable with"}],"source_content_type":"text/x-rst","patch_set":17,"id":"1a6eadb0_2649b1b7","line":25,"range":{"start_line":24,"start_character":0,"end_line":25,"end_character":28},"updated":"2016-12-16 12:15:44.000000000","message":"Nit: I would drop this one, the other two are way more important.","commit_id":"c49f82a8fa5a9d140464d9eae81a9aa3319e8ad2"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"ad9d1ab82b3dde37573128ab3aa2f23ba06904ca","unresolved":false,"context_lines":[{"line_number":21,"context_line":"The query parameters for server list/detail API are not limited and"},{"line_number":22,"context_line":"controlled at API layer. This leads to some problems:"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"* The bad query performance. The API user can filter/sort based on the DB"},{"line_number":25,"context_line":"  column without DB indexes."},{"line_number":26,"context_line":"* The DB schema exposes to the REST API directly. For example, if a new column"},{"line_number":27,"context_line":"  added to the DB schema, the new column will be enabled as filter and sort"},{"line_number":28,"context_line":"  parameter directly. This break the API rule: New feature needs to enable with"}],"source_content_type":"text/x-rst","patch_set":17,"id":"1a6eadb0_b516c149","line":25,"range":{"start_line":24,"start_character":0,"end_line":25,"end_character":28},"in_reply_to":"1a6eadb0_2649b1b7","updated":"2016-12-16 12:49:05.000000000","message":"ok, anyway this spec isn\u0027t going to resolve the performance problem.","commit_id":"c49f82a8fa5a9d140464d9eae81a9aa3319e8ad2"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"dfd64290aeefeeeb2e957f34e5c1f59aa0687602","unresolved":false,"context_lines":[{"line_number":50,"context_line":"  representation."},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"The whitelist for filters are [\u0027user_id\u0027, \u0027project_id\u0027, \u0027tenant_id\u0027,"},{"line_number":53,"context_line":"\u0027launch_index\u0027, \u0027image_ref\u0027, \u0027image\u0027, \u0027kernel_id\u0027, \u0027ramdisk_id\u0027, \u0027hostname\u0027,"},{"line_number":54,"context_line":"\u0027key_name\u0027, \u0027power_state\u0027, \u0027vm_state\u0027, \u0027task_state\u0027, \u0027host\u0027, \u0027node\u0027,"},{"line_number":55,"context_line":"\u0027instance_type_id\u0027, \u0027reservation_id\u0027, \u0027launched_at\u0027, \u0027terminated_at\u0027,"},{"line_number":56,"context_line":"\u0027availability_zone\u0027, \u0027name\u0027, \u0027display_name\u0027, \u0027display_description\u0027,"}],"source_content_type":"text/x-rst","patch_set":17,"id":"1a6eadb0_5fbcacba","line":53,"range":{"start_line":53,"start_character":16,"end_line":53,"end_character":36},"updated":"2016-12-16 12:15:44.000000000","message":"Nit: these names don\u0027t match the return values in the REST API brilliantly. I guess image is uuid, and ref is the URL thing?\n\nMaybe just have image_id would be better? Not sure. I guess its just two ways to specific the image_id.","commit_id":"c49f82a8fa5a9d140464d9eae81a9aa3319e8ad2"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"dfd64290aeefeeeb2e957f34e5c1f59aa0687602","unresolved":false,"context_lines":[{"line_number":50,"context_line":"  representation."},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"The whitelist for filters are [\u0027user_id\u0027, \u0027project_id\u0027, \u0027tenant_id\u0027,"},{"line_number":53,"context_line":"\u0027launch_index\u0027, \u0027image_ref\u0027, \u0027image\u0027, \u0027kernel_id\u0027, \u0027ramdisk_id\u0027, \u0027hostname\u0027,"},{"line_number":54,"context_line":"\u0027key_name\u0027, \u0027power_state\u0027, \u0027vm_state\u0027, \u0027task_state\u0027, \u0027host\u0027, \u0027node\u0027,"},{"line_number":55,"context_line":"\u0027instance_type_id\u0027, \u0027reservation_id\u0027, \u0027launched_at\u0027, \u0027terminated_at\u0027,"},{"line_number":56,"context_line":"\u0027availability_zone\u0027, \u0027name\u0027, \u0027display_name\u0027, \u0027display_description\u0027,"}],"source_content_type":"text/x-rst","patch_set":17,"id":"1a6eadb0_3f15309b","line":53,"range":{"start_line":53,"start_character":66,"end_line":53,"end_character":74},"updated":"2016-12-16 12:15:44.000000000","message":"We have:\n\n* OS-EXT-SRV-ATTR:host (the one users see)\n* OS-EXT-SRV-ATTR:hypervisor_hostname (the admin only one)\n\nhostname seems to be neither of those?","commit_id":"c49f82a8fa5a9d140464d9eae81a9aa3319e8ad2"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"ad9d1ab82b3dde37573128ab3aa2f23ba06904ca","unresolved":false,"context_lines":[{"line_number":50,"context_line":"  representation."},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"The whitelist for filters are [\u0027user_id\u0027, \u0027project_id\u0027, \u0027tenant_id\u0027,"},{"line_number":53,"context_line":"\u0027launch_index\u0027, \u0027image_ref\u0027, \u0027image\u0027, \u0027kernel_id\u0027, \u0027ramdisk_id\u0027, \u0027hostname\u0027,"},{"line_number":54,"context_line":"\u0027key_name\u0027, \u0027power_state\u0027, \u0027vm_state\u0027, \u0027task_state\u0027, \u0027host\u0027, \u0027node\u0027,"},{"line_number":55,"context_line":"\u0027instance_type_id\u0027, \u0027reservation_id\u0027, \u0027launched_at\u0027, \u0027terminated_at\u0027,"},{"line_number":56,"context_line":"\u0027availability_zone\u0027, \u0027name\u0027, \u0027display_name\u0027, \u0027display_description\u0027,"}],"source_content_type":"text/x-rst","patch_set":17,"id":"1a6eadb0_f5191923","line":53,"range":{"start_line":53,"start_character":16,"end_line":53,"end_character":36},"in_reply_to":"1a6eadb0_5fbcacba","updated":"2016-12-16 12:49:05.000000000","message":"\u0027hostname\u0027 is the hostname of instance. https://github.com/openstack/nova/blob/master/nova/compute/api.py#L582\n\nIt is exposed in the 2.3 API. https://github.com/openstack/nova/blob/master/doc/api_samples/servers/v2.3/server-get-resp.json#L61\n\nimage_ref is alias of image. There are few alias defined at https://github.com/openstack/nova/blob/master/nova/compute/api.py#L2336\n\nSo those alias already expose to the user. we have to keep them for now.","commit_id":"c49f82a8fa5a9d140464d9eae81a9aa3319e8ad2"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"3c0c07cc5bb3f275651939270fc6422f4a9b135a","unresolved":false,"context_lines":[{"line_number":50,"context_line":"  representation."},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"The whitelist for filters are [\u0027user_id\u0027, \u0027project_id\u0027, \u0027tenant_id\u0027,"},{"line_number":53,"context_line":"\u0027launch_index\u0027, \u0027image_ref\u0027, \u0027image\u0027, \u0027kernel_id\u0027, \u0027ramdisk_id\u0027, \u0027hostname\u0027,"},{"line_number":54,"context_line":"\u0027key_name\u0027, \u0027power_state\u0027, \u0027vm_state\u0027, \u0027task_state\u0027, \u0027host\u0027, \u0027node\u0027,"},{"line_number":55,"context_line":"\u0027instance_type_id\u0027, \u0027reservation_id\u0027, \u0027launched_at\u0027, \u0027terminated_at\u0027,"},{"line_number":56,"context_line":"\u0027availability_zone\u0027, \u0027name\u0027, \u0027display_name\u0027, \u0027display_description\u0027,"}],"source_content_type":"text/x-rst","patch_set":17,"id":"1a6eadb0_95462579","line":53,"range":{"start_line":53,"start_character":16,"end_line":53,"end_character":36},"in_reply_to":"1a6eadb0_f5191923","updated":"2016-12-16 12:52:26.000000000","message":"Agreed with keeping existing alias.\n\nMy problem is we said we wanted to match the Rest API and \"OS-EXT-SRV-ATTR:hostname\" !\u003d \"hostname\"","commit_id":"c49f82a8fa5a9d140464d9eae81a9aa3319e8ad2"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"dfd64290aeefeeeb2e957f34e5c1f59aa0687602","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"The whitelist for filters are [\u0027user_id\u0027, \u0027project_id\u0027, \u0027tenant_id\u0027,"},{"line_number":53,"context_line":"\u0027launch_index\u0027, \u0027image_ref\u0027, \u0027image\u0027, \u0027kernel_id\u0027, \u0027ramdisk_id\u0027, \u0027hostname\u0027,"},{"line_number":54,"context_line":"\u0027key_name\u0027, \u0027power_state\u0027, \u0027vm_state\u0027, \u0027task_state\u0027, \u0027host\u0027, \u0027node\u0027,"},{"line_number":55,"context_line":"\u0027instance_type_id\u0027, \u0027reservation_id\u0027, \u0027launched_at\u0027, \u0027terminated_at\u0027,"},{"line_number":56,"context_line":"\u0027availability_zone\u0027, \u0027name\u0027, \u0027display_name\u0027, \u0027display_description\u0027,"},{"line_number":57,"context_line":"\u0027locked_by\u0027,"}],"source_content_type":"text/x-rst","patch_set":17,"id":"1a6eadb0_bf578056","line":54,"range":{"start_line":54,"start_character":53,"end_line":54,"end_character":67},"updated":"2016-12-16 12:15:44.000000000","message":"I guess host is the above one, but node? I don\u0027t see that returned in the API.","commit_id":"c49f82a8fa5a9d140464d9eae81a9aa3319e8ad2"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"dfd64290aeefeeeb2e957f34e5c1f59aa0687602","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"The whitelist for filters are [\u0027user_id\u0027, \u0027project_id\u0027, \u0027tenant_id\u0027,"},{"line_number":53,"context_line":"\u0027launch_index\u0027, \u0027image_ref\u0027, \u0027image\u0027, \u0027kernel_id\u0027, \u0027ramdisk_id\u0027, \u0027hostname\u0027,"},{"line_number":54,"context_line":"\u0027key_name\u0027, \u0027power_state\u0027, \u0027vm_state\u0027, \u0027task_state\u0027, \u0027host\u0027, \u0027node\u0027,"},{"line_number":55,"context_line":"\u0027instance_type_id\u0027, \u0027reservation_id\u0027, \u0027launched_at\u0027, \u0027terminated_at\u0027,"},{"line_number":56,"context_line":"\u0027availability_zone\u0027, \u0027name\u0027, \u0027display_name\u0027, \u0027display_description\u0027,"},{"line_number":57,"context_line":"\u0027locked_by\u0027,"}],"source_content_type":"text/x-rst","patch_set":17,"id":"1a6eadb0_5f7f4cdf","line":54,"range":{"start_line":54,"start_character":12,"end_line":54,"end_character":51},"updated":"2016-12-16 12:15:44.000000000","message":"are these not: OS-EXT-STS:power_state, etc.","commit_id":"c49f82a8fa5a9d140464d9eae81a9aa3319e8ad2"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"ad9d1ab82b3dde37573128ab3aa2f23ba06904ca","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"The whitelist for filters are [\u0027user_id\u0027, \u0027project_id\u0027, \u0027tenant_id\u0027,"},{"line_number":53,"context_line":"\u0027launch_index\u0027, \u0027image_ref\u0027, \u0027image\u0027, \u0027kernel_id\u0027, \u0027ramdisk_id\u0027, \u0027hostname\u0027,"},{"line_number":54,"context_line":"\u0027key_name\u0027, \u0027power_state\u0027, \u0027vm_state\u0027, \u0027task_state\u0027, \u0027host\u0027, \u0027node\u0027,"},{"line_number":55,"context_line":"\u0027instance_type_id\u0027, \u0027reservation_id\u0027, \u0027launched_at\u0027, \u0027terminated_at\u0027,"},{"line_number":56,"context_line":"\u0027availability_zone\u0027, \u0027name\u0027, \u0027display_name\u0027, \u0027display_description\u0027,"},{"line_number":57,"context_line":"\u0027locked_by\u0027,"}],"source_content_type":"text/x-rst","patch_set":17,"id":"1a6eadb0_b5cde167","line":54,"range":{"start_line":54,"start_character":12,"end_line":54,"end_character":51},"in_reply_to":"1a6eadb0_5f7f4cdf","updated":"2016-12-16 12:49:05.000000000","message":"yes. power_state, vm_state, task_state  are all in OS-EXT_STS:*.","commit_id":"c49f82a8fa5a9d140464d9eae81a9aa3319e8ad2"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"ad9d1ab82b3dde37573128ab3aa2f23ba06904ca","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"The whitelist for filters are [\u0027user_id\u0027, \u0027project_id\u0027, \u0027tenant_id\u0027,"},{"line_number":53,"context_line":"\u0027launch_index\u0027, \u0027image_ref\u0027, \u0027image\u0027, \u0027kernel_id\u0027, \u0027ramdisk_id\u0027, \u0027hostname\u0027,"},{"line_number":54,"context_line":"\u0027key_name\u0027, \u0027power_state\u0027, \u0027vm_state\u0027, \u0027task_state\u0027, \u0027host\u0027, \u0027node\u0027,"},{"line_number":55,"context_line":"\u0027instance_type_id\u0027, \u0027reservation_id\u0027, \u0027launched_at\u0027, \u0027terminated_at\u0027,"},{"line_number":56,"context_line":"\u0027availability_zone\u0027, \u0027name\u0027, \u0027display_name\u0027, \u0027display_description\u0027,"},{"line_number":57,"context_line":"\u0027locked_by\u0027,"}],"source_content_type":"text/x-rst","patch_set":17,"id":"1a6eadb0_55e3add8","line":54,"range":{"start_line":54,"start_character":53,"end_line":54,"end_character":67},"in_reply_to":"1a6eadb0_bf578056","updated":"2016-12-16 12:49:05.000000000","message":"yes, the host is above one. The node is \"OS-EXT-SRV-ATTR:hypervisor_hostname\" https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/extended_server_attributes.py#L35","commit_id":"c49f82a8fa5a9d140464d9eae81a9aa3319e8ad2"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"dfd64290aeefeeeb2e957f34e5c1f59aa0687602","unresolved":false,"context_lines":[{"line_number":52,"context_line":"The whitelist for filters are [\u0027user_id\u0027, \u0027project_id\u0027, \u0027tenant_id\u0027,"},{"line_number":53,"context_line":"\u0027launch_index\u0027, \u0027image_ref\u0027, \u0027image\u0027, \u0027kernel_id\u0027, \u0027ramdisk_id\u0027, \u0027hostname\u0027,"},{"line_number":54,"context_line":"\u0027key_name\u0027, \u0027power_state\u0027, \u0027vm_state\u0027, \u0027task_state\u0027, \u0027host\u0027, \u0027node\u0027,"},{"line_number":55,"context_line":"\u0027instance_type_id\u0027, \u0027reservation_id\u0027, \u0027launched_at\u0027, \u0027terminated_at\u0027,"},{"line_number":56,"context_line":"\u0027availability_zone\u0027, \u0027name\u0027, \u0027display_name\u0027, \u0027display_description\u0027,"},{"line_number":57,"context_line":"\u0027locked_by\u0027,"},{"line_number":58,"context_line":"\u0027uuid\u0027, \u0027root_device_name\u0027, \u0027config_drive\u0027, \u0027access_ip_v4\u0027, \u0027access_ip_v6\u0027,"}],"source_content_type":"text/x-rst","patch_set":17,"id":"1a6eadb0_bf05c046","line":55,"range":{"start_line":55,"start_character":38,"end_line":55,"end_character":68},"updated":"2016-12-16 12:15:44.000000000","message":"OS-SRV-USG:terminated_at?","commit_id":"c49f82a8fa5a9d140464d9eae81a9aa3319e8ad2"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"dfd64290aeefeeeb2e957f34e5c1f59aa0687602","unresolved":false,"context_lines":[{"line_number":52,"context_line":"The whitelist for filters are [\u0027user_id\u0027, \u0027project_id\u0027, \u0027tenant_id\u0027,"},{"line_number":53,"context_line":"\u0027launch_index\u0027, \u0027image_ref\u0027, \u0027image\u0027, \u0027kernel_id\u0027, \u0027ramdisk_id\u0027, \u0027hostname\u0027,"},{"line_number":54,"context_line":"\u0027key_name\u0027, \u0027power_state\u0027, \u0027vm_state\u0027, \u0027task_state\u0027, \u0027host\u0027, \u0027node\u0027,"},{"line_number":55,"context_line":"\u0027instance_type_id\u0027, \u0027reservation_id\u0027, \u0027launched_at\u0027, \u0027terminated_at\u0027,"},{"line_number":56,"context_line":"\u0027availability_zone\u0027, \u0027name\u0027, \u0027display_name\u0027, \u0027display_description\u0027,"},{"line_number":57,"context_line":"\u0027locked_by\u0027,"},{"line_number":58,"context_line":"\u0027uuid\u0027, \u0027root_device_name\u0027, \u0027config_drive\u0027, \u0027access_ip_v4\u0027, \u0027access_ip_v6\u0027,"}],"source_content_type":"text/x-rst","patch_set":17,"id":"1a6eadb0_5fcd8c2f","line":55,"range":{"start_line":55,"start_character":1,"end_line":55,"end_character":17},"updated":"2016-12-16 12:15:44.000000000","message":"surely, flavor_id would better back the flavor that is returned to the user?","commit_id":"c49f82a8fa5a9d140464d9eae81a9aa3319e8ad2"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"ad9d1ab82b3dde37573128ab3aa2f23ba06904ca","unresolved":false,"context_lines":[{"line_number":52,"context_line":"The whitelist for filters are [\u0027user_id\u0027, \u0027project_id\u0027, \u0027tenant_id\u0027,"},{"line_number":53,"context_line":"\u0027launch_index\u0027, \u0027image_ref\u0027, \u0027image\u0027, \u0027kernel_id\u0027, \u0027ramdisk_id\u0027, \u0027hostname\u0027,"},{"line_number":54,"context_line":"\u0027key_name\u0027, \u0027power_state\u0027, \u0027vm_state\u0027, \u0027task_state\u0027, \u0027host\u0027, \u0027node\u0027,"},{"line_number":55,"context_line":"\u0027instance_type_id\u0027, \u0027reservation_id\u0027, \u0027launched_at\u0027, \u0027terminated_at\u0027,"},{"line_number":56,"context_line":"\u0027availability_zone\u0027, \u0027name\u0027, \u0027display_name\u0027, \u0027display_description\u0027,"},{"line_number":57,"context_line":"\u0027locked_by\u0027,"},{"line_number":58,"context_line":"\u0027uuid\u0027, \u0027root_device_name\u0027, \u0027config_drive\u0027, \u0027access_ip_v4\u0027, \u0027access_ip_v6\u0027,"}],"source_content_type":"text/x-rst","patch_set":17,"id":"1a6eadb0_b5fb2178","line":55,"range":{"start_line":55,"start_character":1,"end_line":55,"end_character":17},"in_reply_to":"1a6eadb0_5fcd8c2f","updated":"2016-12-16 12:49:05.000000000","message":"yea, flavor is alias of instance_type_id also. due to this https://github.com/openstack/nova/blob/master/nova/compute/api.py#L2336","commit_id":"c49f82a8fa5a9d140464d9eae81a9aa3319e8ad2"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"ad9d1ab82b3dde37573128ab3aa2f23ba06904ca","unresolved":false,"context_lines":[{"line_number":52,"context_line":"The whitelist for filters are [\u0027user_id\u0027, \u0027project_id\u0027, \u0027tenant_id\u0027,"},{"line_number":53,"context_line":"\u0027launch_index\u0027, \u0027image_ref\u0027, \u0027image\u0027, \u0027kernel_id\u0027, \u0027ramdisk_id\u0027, \u0027hostname\u0027,"},{"line_number":54,"context_line":"\u0027key_name\u0027, \u0027power_state\u0027, \u0027vm_state\u0027, \u0027task_state\u0027, \u0027host\u0027, \u0027node\u0027,"},{"line_number":55,"context_line":"\u0027instance_type_id\u0027, \u0027reservation_id\u0027, \u0027launched_at\u0027, \u0027terminated_at\u0027,"},{"line_number":56,"context_line":"\u0027availability_zone\u0027, \u0027name\u0027, \u0027display_name\u0027, \u0027display_description\u0027,"},{"line_number":57,"context_line":"\u0027locked_by\u0027,"},{"line_number":58,"context_line":"\u0027uuid\u0027, \u0027root_device_name\u0027, \u0027config_drive\u0027, \u0027access_ip_v4\u0027, \u0027access_ip_v6\u0027,"}],"source_content_type":"text/x-rst","patch_set":17,"id":"1a6eadb0_d5f6dd8d","line":55,"range":{"start_line":55,"start_character":38,"end_line":55,"end_character":68},"in_reply_to":"1a6eadb0_bf05c046","updated":"2016-12-16 12:49:05.000000000","message":"yea, in OS-SRV-USG","commit_id":"c49f82a8fa5a9d140464d9eae81a9aa3319e8ad2"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"dfd64290aeefeeeb2e957f34e5c1f59aa0687602","unresolved":false,"context_lines":[{"line_number":53,"context_line":"\u0027launch_index\u0027, \u0027image_ref\u0027, \u0027image\u0027, \u0027kernel_id\u0027, \u0027ramdisk_id\u0027, \u0027hostname\u0027,"},{"line_number":54,"context_line":"\u0027key_name\u0027, \u0027power_state\u0027, \u0027vm_state\u0027, \u0027task_state\u0027, \u0027host\u0027, \u0027node\u0027,"},{"line_number":55,"context_line":"\u0027instance_type_id\u0027, \u0027reservation_id\u0027, \u0027launched_at\u0027, \u0027terminated_at\u0027,"},{"line_number":56,"context_line":"\u0027availability_zone\u0027, \u0027name\u0027, \u0027display_name\u0027, \u0027display_description\u0027,"},{"line_number":57,"context_line":"\u0027locked_by\u0027,"},{"line_number":58,"context_line":"\u0027uuid\u0027, \u0027root_device_name\u0027, \u0027config_drive\u0027, \u0027access_ip_v4\u0027, \u0027access_ip_v6\u0027,"},{"line_number":59,"context_line":"\u0027auto_disk_config\u0027, \u0027progress\u0027, \u0027sort_key\u0027, \u0027sort_dir\u0027, \u0027all_tenant\u0027,"}],"source_content_type":"text/x-rst","patch_set":17,"id":"1a6eadb0_9a59f237","line":56,"range":{"start_line":56,"start_character":46,"end_line":56,"end_character":65},"updated":"2016-12-16 12:15:44.000000000","message":"I don\u0027t see this in the API?","commit_id":"c49f82a8fa5a9d140464d9eae81a9aa3319e8ad2"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"dfd64290aeefeeeb2e957f34e5c1f59aa0687602","unresolved":false,"context_lines":[{"line_number":53,"context_line":"\u0027launch_index\u0027, \u0027image_ref\u0027, \u0027image\u0027, \u0027kernel_id\u0027, \u0027ramdisk_id\u0027, \u0027hostname\u0027,"},{"line_number":54,"context_line":"\u0027key_name\u0027, \u0027power_state\u0027, \u0027vm_state\u0027, \u0027task_state\u0027, \u0027host\u0027, \u0027node\u0027,"},{"line_number":55,"context_line":"\u0027instance_type_id\u0027, \u0027reservation_id\u0027, \u0027launched_at\u0027, \u0027terminated_at\u0027,"},{"line_number":56,"context_line":"\u0027availability_zone\u0027, \u0027name\u0027, \u0027display_name\u0027, \u0027display_description\u0027,"},{"line_number":57,"context_line":"\u0027locked_by\u0027,"},{"line_number":58,"context_line":"\u0027uuid\u0027, \u0027root_device_name\u0027, \u0027config_drive\u0027, \u0027access_ip_v4\u0027, \u0027access_ip_v6\u0027,"},{"line_number":59,"context_line":"\u0027auto_disk_config\u0027, \u0027progress\u0027, \u0027sort_key\u0027, \u0027sort_dir\u0027, \u0027all_tenant\u0027,"}],"source_content_type":"text/x-rst","patch_set":17,"id":"1a6eadb0_3f98d01b","line":56,"range":{"start_line":56,"start_character":1,"end_line":56,"end_character":18},"updated":"2016-12-16 12:15:44.000000000","message":"OS-EXT-AZ:availability_zone?","commit_id":"c49f82a8fa5a9d140464d9eae81a9aa3319e8ad2"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"dfd64290aeefeeeb2e957f34e5c1f59aa0687602","unresolved":false,"context_lines":[{"line_number":53,"context_line":"\u0027launch_index\u0027, \u0027image_ref\u0027, \u0027image\u0027, \u0027kernel_id\u0027, \u0027ramdisk_id\u0027, \u0027hostname\u0027,"},{"line_number":54,"context_line":"\u0027key_name\u0027, \u0027power_state\u0027, \u0027vm_state\u0027, \u0027task_state\u0027, \u0027host\u0027, \u0027node\u0027,"},{"line_number":55,"context_line":"\u0027instance_type_id\u0027, \u0027reservation_id\u0027, \u0027launched_at\u0027, \u0027terminated_at\u0027,"},{"line_number":56,"context_line":"\u0027availability_zone\u0027, \u0027name\u0027, \u0027display_name\u0027, \u0027display_description\u0027,"},{"line_number":57,"context_line":"\u0027locked_by\u0027,"},{"line_number":58,"context_line":"\u0027uuid\u0027, \u0027root_device_name\u0027, \u0027config_drive\u0027, \u0027access_ip_v4\u0027, \u0027access_ip_v6\u0027,"},{"line_number":59,"context_line":"\u0027auto_disk_config\u0027, \u0027progress\u0027, \u0027sort_key\u0027, \u0027sort_dir\u0027, \u0027all_tenant\u0027,"}],"source_content_type":"text/x-rst","patch_set":17,"id":"1a6eadb0_3f4d309a","line":56,"range":{"start_line":56,"start_character":21,"end_line":56,"end_character":43},"updated":"2016-12-16 12:15:44.000000000","message":"We only return and update name in the API, I believe?","commit_id":"c49f82a8fa5a9d140464d9eae81a9aa3319e8ad2"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"ad9d1ab82b3dde37573128ab3aa2f23ba06904ca","unresolved":false,"context_lines":[{"line_number":53,"context_line":"\u0027launch_index\u0027, \u0027image_ref\u0027, \u0027image\u0027, \u0027kernel_id\u0027, \u0027ramdisk_id\u0027, \u0027hostname\u0027,"},{"line_number":54,"context_line":"\u0027key_name\u0027, \u0027power_state\u0027, \u0027vm_state\u0027, \u0027task_state\u0027, \u0027host\u0027, \u0027node\u0027,"},{"line_number":55,"context_line":"\u0027instance_type_id\u0027, \u0027reservation_id\u0027, \u0027launched_at\u0027, \u0027terminated_at\u0027,"},{"line_number":56,"context_line":"\u0027availability_zone\u0027, \u0027name\u0027, \u0027display_name\u0027, \u0027display_description\u0027,"},{"line_number":57,"context_line":"\u0027locked_by\u0027,"},{"line_number":58,"context_line":"\u0027uuid\u0027, \u0027root_device_name\u0027, \u0027config_drive\u0027, \u0027access_ip_v4\u0027, \u0027access_ip_v6\u0027,"},{"line_number":59,"context_line":"\u0027auto_disk_config\u0027, \u0027progress\u0027, \u0027sort_key\u0027, \u0027sort_dir\u0027, \u0027all_tenant\u0027,"}],"source_content_type":"text/x-rst","patch_set":17,"id":"1a6eadb0_55180dd3","line":56,"range":{"start_line":56,"start_character":21,"end_line":56,"end_character":43},"in_reply_to":"1a6eadb0_3f4d309a","updated":"2016-12-16 12:49:05.000000000","message":"yea, the name is alias of display_name https://github.com/openstack/nova/blob/master/nova/compute/api.py#L2336","commit_id":"c49f82a8fa5a9d140464d9eae81a9aa3319e8ad2"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"ad9d1ab82b3dde37573128ab3aa2f23ba06904ca","unresolved":false,"context_lines":[{"line_number":53,"context_line":"\u0027launch_index\u0027, \u0027image_ref\u0027, \u0027image\u0027, \u0027kernel_id\u0027, \u0027ramdisk_id\u0027, \u0027hostname\u0027,"},{"line_number":54,"context_line":"\u0027key_name\u0027, \u0027power_state\u0027, \u0027vm_state\u0027, \u0027task_state\u0027, \u0027host\u0027, \u0027node\u0027,"},{"line_number":55,"context_line":"\u0027instance_type_id\u0027, \u0027reservation_id\u0027, \u0027launched_at\u0027, \u0027terminated_at\u0027,"},{"line_number":56,"context_line":"\u0027availability_zone\u0027, \u0027name\u0027, \u0027display_name\u0027, \u0027display_description\u0027,"},{"line_number":57,"context_line":"\u0027locked_by\u0027,"},{"line_number":58,"context_line":"\u0027uuid\u0027, \u0027root_device_name\u0027, \u0027config_drive\u0027, \u0027access_ip_v4\u0027, \u0027access_ip_v6\u0027,"},{"line_number":59,"context_line":"\u0027auto_disk_config\u0027, \u0027progress\u0027, \u0027sort_key\u0027, \u0027sort_dir\u0027, \u0027all_tenant\u0027,"}],"source_content_type":"text/x-rst","patch_set":17,"id":"1a6eadb0_f51f59b4","line":56,"range":{"start_line":56,"start_character":1,"end_line":56,"end_character":18},"in_reply_to":"1a6eadb0_3f98d01b","updated":"2016-12-16 12:49:05.000000000","message":"yes","commit_id":"c49f82a8fa5a9d140464d9eae81a9aa3319e8ad2"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"ad9d1ab82b3dde37573128ab3aa2f23ba06904ca","unresolved":false,"context_lines":[{"line_number":53,"context_line":"\u0027launch_index\u0027, \u0027image_ref\u0027, \u0027image\u0027, \u0027kernel_id\u0027, \u0027ramdisk_id\u0027, \u0027hostname\u0027,"},{"line_number":54,"context_line":"\u0027key_name\u0027, \u0027power_state\u0027, \u0027vm_state\u0027, \u0027task_state\u0027, \u0027host\u0027, \u0027node\u0027,"},{"line_number":55,"context_line":"\u0027instance_type_id\u0027, \u0027reservation_id\u0027, \u0027launched_at\u0027, \u0027terminated_at\u0027,"},{"line_number":56,"context_line":"\u0027availability_zone\u0027, \u0027name\u0027, \u0027display_name\u0027, \u0027display_description\u0027,"},{"line_number":57,"context_line":"\u0027locked_by\u0027,"},{"line_number":58,"context_line":"\u0027uuid\u0027, \u0027root_device_name\u0027, \u0027config_drive\u0027, \u0027access_ip_v4\u0027, \u0027access_ip_v6\u0027,"},{"line_number":59,"context_line":"\u0027auto_disk_config\u0027, \u0027progress\u0027, \u0027sort_key\u0027, \u0027sort_dir\u0027, \u0027all_tenant\u0027,"}],"source_content_type":"text/x-rst","patch_set":17,"id":"1a6eadb0_955c657e","line":56,"range":{"start_line":56,"start_character":46,"end_line":56,"end_character":65},"in_reply_to":"1a6eadb0_9a59f237","updated":"2016-12-16 12:49:05.000000000","message":"the display_description expose as description in 2.19 https://github.com/openstack/nova/blob/master/doc/api_samples/servers/v2.19/server-get-resp.json#L16","commit_id":"c49f82a8fa5a9d140464d9eae81a9aa3319e8ad2"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"d8b3812a3f62dd59d62ccdb940a894336684956b","unresolved":false,"context_lines":[{"line_number":53,"context_line":"\u0027launch_index\u0027, \u0027image_ref\u0027, \u0027image\u0027, \u0027kernel_id\u0027, \u0027ramdisk_id\u0027, \u0027hostname\u0027,"},{"line_number":54,"context_line":"\u0027key_name\u0027, \u0027power_state\u0027, \u0027vm_state\u0027, \u0027task_state\u0027, \u0027host\u0027, \u0027node\u0027,"},{"line_number":55,"context_line":"\u0027instance_type_id\u0027, \u0027reservation_id\u0027, \u0027launched_at\u0027, \u0027terminated_at\u0027,"},{"line_number":56,"context_line":"\u0027availability_zone\u0027, \u0027name\u0027, \u0027display_name\u0027, \u0027display_description\u0027,"},{"line_number":57,"context_line":"\u0027locked_by\u0027,"},{"line_number":58,"context_line":"\u0027uuid\u0027, \u0027root_device_name\u0027, \u0027config_drive\u0027, \u0027access_ip_v4\u0027, \u0027access_ip_v6\u0027,"},{"line_number":59,"context_line":"\u0027auto_disk_config\u0027, \u0027progress\u0027, \u0027sort_key\u0027, \u0027sort_dir\u0027, \u0027all_tenant\u0027,"}],"source_content_type":"text/x-rst","patch_set":17,"id":"1a6eadb0_0b9af66d","line":56,"range":{"start_line":56,"start_character":1,"end_line":56,"end_character":18},"in_reply_to":"1a6eadb0_f51f59b4","updated":"2016-12-16 13:22:54.000000000","message":"Ah, thats missing in the docs, description, we should only expose description as an alias though, so it matches the API response.","commit_id":"c49f82a8fa5a9d140464d9eae81a9aa3319e8ad2"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"dfd64290aeefeeeb2e957f34e5c1f59aa0687602","unresolved":false,"context_lines":[{"line_number":55,"context_line":"\u0027instance_type_id\u0027, \u0027reservation_id\u0027, \u0027launched_at\u0027, \u0027terminated_at\u0027,"},{"line_number":56,"context_line":"\u0027availability_zone\u0027, \u0027name\u0027, \u0027display_name\u0027, \u0027display_description\u0027,"},{"line_number":57,"context_line":"\u0027locked_by\u0027,"},{"line_number":58,"context_line":"\u0027uuid\u0027, \u0027root_device_name\u0027, \u0027config_drive\u0027, \u0027access_ip_v4\u0027, \u0027access_ip_v6\u0027,"},{"line_number":59,"context_line":"\u0027auto_disk_config\u0027, \u0027progress\u0027, \u0027sort_key\u0027, \u0027sort_dir\u0027, \u0027all_tenant\u0027,"},{"line_number":60,"context_line":"\u0027deleted\u0027, \u0027limit\u0027, \u0027marker\u0027, \u0027status\u0027, \u0027ip\u0027, \u0027ip6\u0027, \u0027tag\u0027, \u0027not-tag\u0027,"},{"line_number":61,"context_line":"\u0027tag-any\u0027, \u0027not-tag-any\u0027]"}],"source_content_type":"text/x-rst","patch_set":17,"id":"1a6eadb0_df0a7c25","line":58,"range":{"start_line":58,"start_character":1,"end_line":58,"end_character":5},"updated":"2016-12-16 12:15:44.000000000","message":"this is id in the REST API.","commit_id":"c49f82a8fa5a9d140464d9eae81a9aa3319e8ad2"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"ad9d1ab82b3dde37573128ab3aa2f23ba06904ca","unresolved":false,"context_lines":[{"line_number":55,"context_line":"\u0027instance_type_id\u0027, \u0027reservation_id\u0027, \u0027launched_at\u0027, \u0027terminated_at\u0027,"},{"line_number":56,"context_line":"\u0027availability_zone\u0027, \u0027name\u0027, \u0027display_name\u0027, \u0027display_description\u0027,"},{"line_number":57,"context_line":"\u0027locked_by\u0027,"},{"line_number":58,"context_line":"\u0027uuid\u0027, \u0027root_device_name\u0027, \u0027config_drive\u0027, \u0027access_ip_v4\u0027, \u0027access_ip_v6\u0027,"},{"line_number":59,"context_line":"\u0027auto_disk_config\u0027, \u0027progress\u0027, \u0027sort_key\u0027, \u0027sort_dir\u0027, \u0027all_tenant\u0027,"},{"line_number":60,"context_line":"\u0027deleted\u0027, \u0027limit\u0027, \u0027marker\u0027, \u0027status\u0027, \u0027ip\u0027, \u0027ip6\u0027, \u0027tag\u0027, \u0027not-tag\u0027,"},{"line_number":61,"context_line":"\u0027tag-any\u0027, \u0027not-tag-any\u0027]"}],"source_content_type":"text/x-rst","patch_set":17,"id":"1a6eadb0_55cd6d2f","line":58,"range":{"start_line":58,"start_character":1,"end_line":58,"end_character":5},"in_reply_to":"1a6eadb0_df0a7c25","updated":"2016-12-16 12:49:05.000000000","message":"but we don\u0027t have \u0027id\u0027 filter.","commit_id":"c49f82a8fa5a9d140464d9eae81a9aa3319e8ad2"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"dfd64290aeefeeeb2e957f34e5c1f59aa0687602","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"For the non-admin user, there have a whitelist for filters already [1]. That"},{"line_number":64,"context_line":"whitelist will be kept. In the future, we hope to have same list for the admin"},{"line_number":65,"context_line":"and non-admin users."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"The policy \u0027os_compute_api:servers:detail:get_all_tenants\u0027 and"},{"line_number":68,"context_line":"\u0027os_compute_api:servers:index:get_all_tenants\u0027 are deprecated. The default rule"}],"source_content_type":"text/x-rst","patch_set":17,"id":"1a6eadb0_7a7b367b","line":65,"updated":"2016-12-16 12:15:44.000000000","message":"+1","commit_id":"c49f82a8fa5a9d140464d9eae81a9aa3319e8ad2"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"5ad1d7c6a973c2ac30baf4e0f592992a07398461","unresolved":false,"context_lines":[{"line_number":76,"context_line":"The whitelist for sorts are pretty similar with filters."},{"line_number":77,"context_line":"[\u0027user_id\u0027, \u0027project_id\u0027, \u0027launch_index\u0027, \u0027image_ref\u0027, \u0027kernel_id\u0027,"},{"line_number":78,"context_line":"\u0027ramdisk_id\u0027, \u0027hostname\u0027, key_name\u0027, \u0027power_state\u0027, \u0027vm_state\u0027, \u0027task_state\u0027,"},{"line_number":79,"context_line":"\u0027host\u0027, \u0027node\u0027, \u0027instance_type_id\u0027, \u0027reservation_id\u0027, \u0027launched_at\u0027,"},{"line_number":80,"context_line":"\u0027terminated_at\u0027, \u0027availability_zone\u0027, \u0027display_name\u0027, \u0027display_description\u0027,"},{"line_number":81,"context_line":"\u0027locked_by\u0027, \u0027uuid\u0027, \u0027root_device_name\u0027, \u0027config_drive\u0027, \u0027access_ip_v4\u0027,"},{"line_number":82,"context_line":"\u0027access_ip_v6\u0027, \u0027auto_disk_config\u0027, \u0027progress\u0027)"}],"source_content_type":"text/x-rst","patch_set":17,"id":"1a6eadb0_0903e6b8","line":79,"range":{"start_line":79,"start_character":36,"end_line":79,"end_character":52},"updated":"2016-12-16 11:17:50.000000000","message":"I\u0027m a little hesitate on this one.\n\n\u0027reservation_id\u0027 only returned when use multi-create. There isn\u0027t field for it in the list. So based on it to sort become useless.\n\nI prefer to remove it.","commit_id":"c49f82a8fa5a9d140464d9eae81a9aa3319e8ad2"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"dfd64290aeefeeeb2e957f34e5c1f59aa0687602","unresolved":false,"context_lines":[{"line_number":79,"context_line":"\u0027host\u0027, \u0027node\u0027, \u0027instance_type_id\u0027, \u0027reservation_id\u0027, \u0027launched_at\u0027,"},{"line_number":80,"context_line":"\u0027terminated_at\u0027, \u0027availability_zone\u0027, \u0027display_name\u0027, \u0027display_description\u0027,"},{"line_number":81,"context_line":"\u0027locked_by\u0027, \u0027uuid\u0027, \u0027root_device_name\u0027, \u0027config_drive\u0027, \u0027access_ip_v4\u0027,"},{"line_number":82,"context_line":"\u0027access_ip_v6\u0027, \u0027auto_disk_config\u0027, \u0027progress\u0027)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"For the non-admin user, the sort key \u0027host\u0027 and \u0027node\u0027 will be excluded. Those"},{"line_number":85,"context_line":"two columns are about the cloud internal. It can\u0027t be leaked to the end user."}],"source_content_type":"text/x-rst","patch_set":17,"id":"1a6eadb0_46bf8d60","line":82,"updated":"2016-12-16 12:15:44.000000000","message":"Nit: I would just say which ones are different, rather than have two lists.\n\nI have similar worries over the mismatch with whats in the json doc returned by the API.","commit_id":"c49f82a8fa5a9d140464d9eae81a9aa3319e8ad2"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"ad9d1ab82b3dde37573128ab3aa2f23ba06904ca","unresolved":false,"context_lines":[{"line_number":79,"context_line":"\u0027host\u0027, \u0027node\u0027, \u0027instance_type_id\u0027, \u0027reservation_id\u0027, \u0027launched_at\u0027,"},{"line_number":80,"context_line":"\u0027terminated_at\u0027, \u0027availability_zone\u0027, \u0027display_name\u0027, \u0027display_description\u0027,"},{"line_number":81,"context_line":"\u0027locked_by\u0027, \u0027uuid\u0027, \u0027root_device_name\u0027, \u0027config_drive\u0027, \u0027access_ip_v4\u0027,"},{"line_number":82,"context_line":"\u0027access_ip_v6\u0027, \u0027auto_disk_config\u0027, \u0027progress\u0027)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"For the non-admin user, the sort key \u0027host\u0027 and \u0027node\u0027 will be excluded. Those"},{"line_number":85,"context_line":"two columns are about the cloud internal. It can\u0027t be leaked to the end user."}],"source_content_type":"text/x-rst","patch_set":17,"id":"1a6eadb0_55f48d59","line":82,"in_reply_to":"1a6eadb0_46bf8d60","updated":"2016-12-16 12:49:05.000000000","message":"yea, I will update.","commit_id":"c49f82a8fa5a9d140464d9eae81a9aa3319e8ad2"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"dfd64290aeefeeeb2e957f34e5c1f59aa0687602","unresolved":false,"context_lines":[{"line_number":135,"context_line":"The new `os_compute_api:servers:all_tenants_visiable` is introduced. The"},{"line_number":136,"context_line":"old rule `os_compute_api:servers:detail:get_all_tenants` and"},{"line_number":137,"context_line":"`os_compute_api:servers:detail:get_all_tenants` is deprecated, and will be"},{"line_number":138,"context_line":"removed in the future."},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"Developer impact"},{"line_number":141,"context_line":"----------------"}],"source_content_type":"text/x-rst","patch_set":17,"id":"1a6eadb0_3aec5e29","line":138,"updated":"2016-12-16 12:15:44.000000000","message":"But above you say you are making no changes, I think.","commit_id":"c49f82a8fa5a9d140464d9eae81a9aa3319e8ad2"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"ad9d1ab82b3dde37573128ab3aa2f23ba06904ca","unresolved":false,"context_lines":[{"line_number":135,"context_line":"The new `os_compute_api:servers:all_tenants_visiable` is introduced. The"},{"line_number":136,"context_line":"old rule `os_compute_api:servers:detail:get_all_tenants` and"},{"line_number":137,"context_line":"`os_compute_api:servers:detail:get_all_tenants` is deprecated, and will be"},{"line_number":138,"context_line":"removed in the future."},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"Developer impact"},{"line_number":141,"context_line":"----------------"}],"source_content_type":"text/x-rst","patch_set":17,"id":"1a6eadb0_3598f11b","line":138,"in_reply_to":"1a6eadb0_3aec5e29","updated":"2016-12-16 12:49:05.000000000","message":"the default rule for old one is changed.","commit_id":"c49f82a8fa5a9d140464d9eae81a9aa3319e8ad2"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"00ea804f0af1e27021eb8d512ae69d8593923aec","unresolved":false,"context_lines":[{"line_number":43,"context_line":"Accroding to the consistent direction [0]. This spec proposes:"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"* Return `HTTP Bad Request 400` for the filters/sort keys which are joined"},{"line_number":46,"context_line":"  table and db model object internal attributes."},{"line_number":47,"context_line":"* Ignore the filter and sort parameters which aren\u0027t mapping to the REST API"},{"line_number":48,"context_line":"  representation."},{"line_number":49,"context_line":""}],"source_content_type":"text/x-rst","patch_set":18,"id":"1a6eadb0_cf456943","line":46,"updated":"2016-12-16 13:37:56.000000000","message":"Do we have a list of those keys we will error on?\n\nOr are we saying we error on any key that we do not accept?","commit_id":"b2aad1fe66aac8b75e33b0d13de43dd7be02c7ea"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"9c32fbd0d278df9cb58cc16de16f76abf97dc3ba","unresolved":false,"context_lines":[{"line_number":43,"context_line":"Accroding to the consistent direction [0]. This spec proposes:"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"* Return `HTTP Bad Request 400` for the filters/sort keys which are joined"},{"line_number":46,"context_line":"  table and db model object internal attributes."},{"line_number":47,"context_line":"* Ignore the filter and sort parameters which aren\u0027t mapping to the REST API"},{"line_number":48,"context_line":"  representation."},{"line_number":49,"context_line":""}],"source_content_type":"text/x-rst","patch_set":18,"id":"1a6eadb0_15a130f8","line":46,"in_reply_to":"1a6eadb0_527e5e6a","updated":"2016-12-16 14:15:35.000000000","message":"For the filters, we have \u0027additionProperties\u0027: \u0027true\u0027, which will strip the invalid filters out.\n\nFor the sorts, probably we need strip them in the python code. I prefer put all the sort keys which we want to ignore in to a variable, maybe called \u0027IGNORED_SORT_KEYS\u0027. So put that \u0027IGNORED_SORT_KEYS\u0027 in the schemas, and strip them out in python code.","commit_id":"b2aad1fe66aac8b75e33b0d13de43dd7be02c7ea"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"b74ea4fc7de7846b4c7c82aff5867c0c219234c7","unresolved":false,"context_lines":[{"line_number":43,"context_line":"Accroding to the consistent direction [0]. This spec proposes:"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"* Return `HTTP Bad Request 400` for the filters/sort keys which are joined"},{"line_number":46,"context_line":"  table and db model object internal attributes."},{"line_number":47,"context_line":"* Ignore the filter and sort parameters which aren\u0027t mapping to the REST API"},{"line_number":48,"context_line":"  representation."},{"line_number":49,"context_line":""}],"source_content_type":"text/x-rst","patch_set":18,"id":"1a6eadb0_527e5e6a","line":46,"in_reply_to":"1a6eadb0_cf456943","updated":"2016-12-16 13:56:05.000000000","message":"This is converting 500-\u003e400, so I am cool with it in a microversion.\n\nI am just curious how we are going to implement that, but that doesn\u0027t block the spec approval.","commit_id":"b2aad1fe66aac8b75e33b0d13de43dd7be02c7ea"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"9c32fbd0d278df9cb58cc16de16f76abf97dc3ba","unresolved":false,"context_lines":[{"line_number":43,"context_line":"Accroding to the consistent direction [0]. This spec proposes:"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"* Return `HTTP Bad Request 400` for the filters/sort keys which are joined"},{"line_number":46,"context_line":"  table and db model object internal attributes."},{"line_number":47,"context_line":"* Ignore the filter and sort parameters which aren\u0027t mapping to the REST API"},{"line_number":48,"context_line":"  representation."},{"line_number":49,"context_line":""}],"source_content_type":"text/x-rst","patch_set":18,"id":"1a6eadb0_7516e44c","line":46,"in_reply_to":"1a6eadb0_cf456943","updated":"2016-12-16 14:15:35.000000000","message":"yea, I can add a list.","commit_id":"b2aad1fe66aac8b75e33b0d13de43dd7be02c7ea"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"00ea804f0af1e27021eb8d512ae69d8593923aec","unresolved":false,"context_lines":[{"line_number":48,"context_line":"  representation."},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"The whitelist for filters are [\u0027user_id\u0027, \u0027tenant_id\u0027,"},{"line_number":51,"context_line":"\u0027launch_index\u0027, \u0027image\u0027, \u0027kernel_id\u0027, \u0027ramdisk_id\u0027, \u0027hostname\u0027,"},{"line_number":52,"context_line":"\u0027key_name\u0027, \u0027power_state\u0027, \u0027vm_state\u0027, \u0027task_state\u0027, \u0027host\u0027, \u0027node\u0027,"},{"line_number":53,"context_line":"\u0027flavor\u0027 \u0027reservation_id\u0027, \u0027launched_at\u0027, \u0027terminated_at\u0027,"},{"line_number":54,"context_line":"\u0027availability_zone\u0027, \u0027name\u0027, \u0027display_description\u0027,"}],"source_content_type":"text/x-rst","patch_set":18,"id":"1a6eadb0_2f6dfdcb","line":51,"range":{"start_line":51,"start_character":53,"end_line":51,"end_character":61},"updated":"2016-12-16 13:37:56.000000000","message":"we return \"OS-EXT-SRV-ATTR:hostname\" in the response, so technically this isn\u0027t in the API","commit_id":"b2aad1fe66aac8b75e33b0d13de43dd7be02c7ea"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"b74ea4fc7de7846b4c7c82aff5867c0c219234c7","unresolved":false,"context_lines":[{"line_number":48,"context_line":"  representation."},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"The whitelist for filters are [\u0027user_id\u0027, \u0027tenant_id\u0027,"},{"line_number":51,"context_line":"\u0027launch_index\u0027, \u0027image\u0027, \u0027kernel_id\u0027, \u0027ramdisk_id\u0027, \u0027hostname\u0027,"},{"line_number":52,"context_line":"\u0027key_name\u0027, \u0027power_state\u0027, \u0027vm_state\u0027, \u0027task_state\u0027, \u0027host\u0027, \u0027node\u0027,"},{"line_number":53,"context_line":"\u0027flavor\u0027 \u0027reservation_id\u0027, \u0027launched_at\u0027, \u0027terminated_at\u0027,"},{"line_number":54,"context_line":"\u0027availability_zone\u0027, \u0027name\u0027, \u0027display_description\u0027,"}],"source_content_type":"text/x-rst","patch_set":18,"id":"1a6eadb0_926636eb","line":51,"range":{"start_line":51,"start_character":53,"end_line":51,"end_character":61},"in_reply_to":"1a6eadb0_2f6dfdcb","updated":"2016-12-16 13:56:05.000000000","message":"discussion on IRC, as we accept hostname today, and we want to rename the API to remove the crazy prefix, this is probably the correct choice, just keep it.","commit_id":"b2aad1fe66aac8b75e33b0d13de43dd7be02c7ea"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"9c32fbd0d278df9cb58cc16de16f76abf97dc3ba","unresolved":false,"context_lines":[{"line_number":48,"context_line":"  representation."},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"The whitelist for filters are [\u0027user_id\u0027, \u0027tenant_id\u0027,"},{"line_number":51,"context_line":"\u0027launch_index\u0027, \u0027image\u0027, \u0027kernel_id\u0027, \u0027ramdisk_id\u0027, \u0027hostname\u0027,"},{"line_number":52,"context_line":"\u0027key_name\u0027, \u0027power_state\u0027, \u0027vm_state\u0027, \u0027task_state\u0027, \u0027host\u0027, \u0027node\u0027,"},{"line_number":53,"context_line":"\u0027flavor\u0027 \u0027reservation_id\u0027, \u0027launched_at\u0027, \u0027terminated_at\u0027,"},{"line_number":54,"context_line":"\u0027availability_zone\u0027, \u0027name\u0027, \u0027display_description\u0027,"}],"source_content_type":"text/x-rst","patch_set":18,"id":"1a6eadb0_15885070","line":51,"range":{"start_line":51,"start_character":53,"end_line":51,"end_character":61},"in_reply_to":"1a6eadb0_926636eb","updated":"2016-12-16 14:15:35.000000000","message":"got it thanks.","commit_id":"b2aad1fe66aac8b75e33b0d13de43dd7be02c7ea"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"00ea804f0af1e27021eb8d512ae69d8593923aec","unresolved":false,"context_lines":[{"line_number":51,"context_line":"\u0027launch_index\u0027, \u0027image\u0027, \u0027kernel_id\u0027, \u0027ramdisk_id\u0027, \u0027hostname\u0027,"},{"line_number":52,"context_line":"\u0027key_name\u0027, \u0027power_state\u0027, \u0027vm_state\u0027, \u0027task_state\u0027, \u0027host\u0027, \u0027node\u0027,"},{"line_number":53,"context_line":"\u0027flavor\u0027 \u0027reservation_id\u0027, \u0027launched_at\u0027, \u0027terminated_at\u0027,"},{"line_number":54,"context_line":"\u0027availability_zone\u0027, \u0027name\u0027, \u0027display_description\u0027,"},{"line_number":55,"context_line":"\u0027locked_by\u0027, \u0027uuid\u0027, \u0027root_device_name\u0027, \u0027config_drive\u0027, \u0027access_ip_v4\u0027,"},{"line_number":56,"context_line":"\u0027access_ip_v6\u0027, \u0027auto_disk_config\u0027, \u0027progress\u0027, \u0027sort_key\u0027, \u0027sort_dir\u0027,"},{"line_number":57,"context_line":"\u0027all_tenant\u0027, \u0027deleted\u0027, \u0027limit\u0027, \u0027marker\u0027, \u0027status\u0027, \u0027fixed_ip\u0027, \u0027ip\u0027, \u0027ip6\u0027,"}],"source_content_type":"text/x-rst","patch_set":18,"id":"1a6eadb0_cf5c891b","line":54,"range":{"start_line":54,"start_character":30,"end_line":54,"end_character":49},"updated":"2016-12-16 13:37:56.000000000","message":"We have description in the API, not display_description, so technically this is not in the API right now.","commit_id":"b2aad1fe66aac8b75e33b0d13de43dd7be02c7ea"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"b74ea4fc7de7846b4c7c82aff5867c0c219234c7","unresolved":false,"context_lines":[{"line_number":51,"context_line":"\u0027launch_index\u0027, \u0027image\u0027, \u0027kernel_id\u0027, \u0027ramdisk_id\u0027, \u0027hostname\u0027,"},{"line_number":52,"context_line":"\u0027key_name\u0027, \u0027power_state\u0027, \u0027vm_state\u0027, \u0027task_state\u0027, \u0027host\u0027, \u0027node\u0027,"},{"line_number":53,"context_line":"\u0027flavor\u0027 \u0027reservation_id\u0027, \u0027launched_at\u0027, \u0027terminated_at\u0027,"},{"line_number":54,"context_line":"\u0027availability_zone\u0027, \u0027name\u0027, \u0027display_description\u0027,"},{"line_number":55,"context_line":"\u0027locked_by\u0027, \u0027uuid\u0027, \u0027root_device_name\u0027, \u0027config_drive\u0027, \u0027access_ip_v4\u0027,"},{"line_number":56,"context_line":"\u0027access_ip_v6\u0027, \u0027auto_disk_config\u0027, \u0027progress\u0027, \u0027sort_key\u0027, \u0027sort_dir\u0027,"},{"line_number":57,"context_line":"\u0027all_tenant\u0027, \u0027deleted\u0027, \u0027limit\u0027, \u0027marker\u0027, \u0027status\u0027, \u0027fixed_ip\u0027, \u0027ip\u0027, \u0027ip6\u0027,"}],"source_content_type":"text/x-rst","patch_set":18,"id":"1a6eadb0_b26172d5","line":54,"range":{"start_line":54,"start_character":30,"end_line":54,"end_character":49},"in_reply_to":"1a6eadb0_cf5c891b","updated":"2016-12-16 13:56:05.000000000","message":"we at least return this in the response, and we support this today, so lets keep it I guess.","commit_id":"b2aad1fe66aac8b75e33b0d13de43dd7be02c7ea"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"b74ea4fc7de7846b4c7c82aff5867c0c219234c7","unresolved":false,"context_lines":[{"line_number":79,"context_line":"\u0027locked_by\u0027, \u0027uuid\u0027, \u0027root_device_name\u0027, \u0027config_drive\u0027, \u0027access_ip_v4\u0027,"},{"line_number":80,"context_line":"\u0027access_ip_v6\u0027, \u0027auto_disk_config\u0027, \u0027progress\u0027]"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"The sorts whitelist compare to the filters, some parameters which aren\u0027t"},{"line_number":83,"context_line":"mapping to the API representation are removed, and tags filters, pagination"},{"line_number":84,"context_line":"parameters."},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"For the non-admin user, the sort key \u0027host\u0027 and \u0027node\u0027 will be excluded. Those"},{"line_number":87,"context_line":"two columns are about the cloud internal. It can\u0027t be leaked to the end user."}],"source_content_type":"text/x-rst","patch_set":18,"id":"1a6eadb0_321f225c","line":84,"range":{"start_line":82,"start_character":0,"end_line":84,"end_character":11},"updated":"2016-12-16 13:56:05.000000000","message":"I am really tempted to keep the two lists the same.","commit_id":"b2aad1fe66aac8b75e33b0d13de43dd7be02c7ea"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"ec62ac2228f0d24897892748d380233447196860","unresolved":false,"context_lines":[{"line_number":79,"context_line":"\u0027locked_by\u0027, \u0027uuid\u0027, \u0027root_device_name\u0027, \u0027config_drive\u0027, \u0027access_ip_v4\u0027,"},{"line_number":80,"context_line":"\u0027access_ip_v6\u0027, \u0027auto_disk_config\u0027, \u0027progress\u0027]"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"The sorts whitelist compare to the filters, some parameters which aren\u0027t"},{"line_number":83,"context_line":"mapping to the API representation are removed, and tags filters, pagination"},{"line_number":84,"context_line":"parameters."},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"For the non-admin user, the sort key \u0027host\u0027 and \u0027node\u0027 will be excluded. Those"},{"line_number":87,"context_line":"two columns are about the cloud internal. It can\u0027t be leaked to the end user."}],"source_content_type":"text/x-rst","patch_set":18,"id":"1a6eadb0_98c2d583","line":84,"range":{"start_line":82,"start_character":0,"end_line":84,"end_character":11},"in_reply_to":"1a6eadb0_321f225c","updated":"2016-12-16 14:36:47.000000000","message":"It\u0027s almost same. Just few of them like pagination params can be sort.\n\nIn the future, with microversion, I think yes, make it same","commit_id":"b2aad1fe66aac8b75e33b0d13de43dd7be02c7ea"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6d49cecc8afdf8c91b490382bb7f70b0fea4adde","unresolved":false,"context_lines":[{"line_number":40,"context_line":"Proposed change"},{"line_number":41,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"Accroding to the consistent direction [0]. This spec proposes:"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"* Return `HTTP Bad Request 400` for the filters/sort keys which are joined"},{"line_number":46,"context_line":"  table (`block_device_mapping`, `extra`, `info_cache`, `system_metadata`,"}],"source_content_type":"text/x-rst","patch_set":19,"id":"da4df55a_8c7cf621","line":43,"range":{"start_line":43,"start_character":0,"end_line":43,"end_character":9},"updated":"2016-12-22 15:30:34.000000000","message":"According","commit_id":"04ccb0ea842db716f59fbaa57735705dc9c9cbe9"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"5df45dc50f85c20776e1016d344ead4543d4eef9","unresolved":false,"context_lines":[{"line_number":40,"context_line":"Proposed change"},{"line_number":41,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"Accroding to the consistent direction [0]. This spec proposes:"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"* Return `HTTP Bad Request 400` for the filters/sort keys which are joined"},{"line_number":46,"context_line":"  table (`block_device_mapping`, `extra`, `info_cache`, `system_metadata`,"}],"source_content_type":"text/x-rst","patch_set":19,"id":"da4df55a_6987ae61","line":43,"range":{"start_line":43,"start_character":0,"end_line":43,"end_character":9},"in_reply_to":"da4df55a_8c7cf621","updated":"2016-12-23 01:10:39.000000000","message":"Done","commit_id":"04ccb0ea842db716f59fbaa57735705dc9c9cbe9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6d49cecc8afdf8c91b490382bb7f70b0fea4adde","unresolved":false,"context_lines":[{"line_number":50,"context_line":"* Ignore the filter and sort parameters which aren\u0027t mapping to the REST API"},{"line_number":51,"context_line":"  representation."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"The whitelist for filters are [\u0027user_id\u0027, \u0027project_id\u0027, \u0027tenant_id\u0027,"},{"line_number":54,"context_line":"\u0027launch_index\u0027, \u0027image_ref\u0027, \u0027image\u0027, \u0027kernel_id\u0027, \u0027ramdisk_id\u0027, \u0027hostname\u0027,"},{"line_number":55,"context_line":"\u0027key_name\u0027, \u0027power_state\u0027, \u0027vm_state\u0027, \u0027task_state\u0027, \u0027host\u0027, \u0027node\u0027,"},{"line_number":56,"context_line":"\u0027instance_type_id\u0027, \u0027reservation_id\u0027, \u0027launched_at\u0027, \u0027terminated_at\u0027,"}],"source_content_type":"text/x-rst","patch_set":19,"id":"da4df55a_8c7796d3","line":53,"range":{"start_line":53,"start_character":18,"end_line":53,"end_character":25},"updated":"2016-12-22 15:30:34.000000000","message":"Are these DB model filters or REST API request filters? Based on my questions below, I think I\u0027ve confused the two and originally read this as REST API request parameter filters. We should qualify.","commit_id":"04ccb0ea842db716f59fbaa57735705dc9c9cbe9"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"5df45dc50f85c20776e1016d344ead4543d4eef9","unresolved":false,"context_lines":[{"line_number":50,"context_line":"* Ignore the filter and sort parameters which aren\u0027t mapping to the REST API"},{"line_number":51,"context_line":"  representation."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"The whitelist for filters are [\u0027user_id\u0027, \u0027project_id\u0027, \u0027tenant_id\u0027,"},{"line_number":54,"context_line":"\u0027launch_index\u0027, \u0027image_ref\u0027, \u0027image\u0027, \u0027kernel_id\u0027, \u0027ramdisk_id\u0027, \u0027hostname\u0027,"},{"line_number":55,"context_line":"\u0027key_name\u0027, \u0027power_state\u0027, \u0027vm_state\u0027, \u0027task_state\u0027, \u0027host\u0027, \u0027node\u0027,"},{"line_number":56,"context_line":"\u0027instance_type_id\u0027, \u0027reservation_id\u0027, \u0027launched_at\u0027, \u0027terminated_at\u0027,"}],"source_content_type":"text/x-rst","patch_set":19,"id":"da4df55a_09e8e20f","line":53,"range":{"start_line":53,"start_character":18,"end_line":53,"end_character":25},"in_reply_to":"da4df55a_8c7796d3","updated":"2016-12-23 01:10:39.000000000","message":"This is REST API request filters, I will qualify.","commit_id":"04ccb0ea842db716f59fbaa57735705dc9c9cbe9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6d49cecc8afdf8c91b490382bb7f70b0fea4adde","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"The whitelist for filters are [\u0027user_id\u0027, \u0027project_id\u0027, \u0027tenant_id\u0027,"},{"line_number":54,"context_line":"\u0027launch_index\u0027, \u0027image_ref\u0027, \u0027image\u0027, \u0027kernel_id\u0027, \u0027ramdisk_id\u0027, \u0027hostname\u0027,"},{"line_number":55,"context_line":"\u0027key_name\u0027, \u0027power_state\u0027, \u0027vm_state\u0027, \u0027task_state\u0027, \u0027host\u0027, \u0027node\u0027,"},{"line_number":56,"context_line":"\u0027instance_type_id\u0027, \u0027reservation_id\u0027, \u0027launched_at\u0027, \u0027terminated_at\u0027,"},{"line_number":57,"context_line":"\u0027availability_zone\u0027, \u0027name\u0027, \u0027display_name\u0027, \u0027description\u0027,"},{"line_number":58,"context_line":"\u0027display_description\u0027, \u0027locked_by\u0027,"}],"source_content_type":"text/x-rst","patch_set":19,"id":"da4df55a_ece2e29e","line":55,"range":{"start_line":55,"start_character":62,"end_line":55,"end_character":66},"updated":"2016-12-22 15:30:34.000000000","message":"This is really OS-EXT-SRV-ATTR:hypervisor_hostname in the API response today. Knowing that we want to drop the extension prefixes at some point, wouldn\u0027t we want to make the filter name \u0027hypervisor_hostname\u0027 rather than node? Because otherwise it forces the client to know that those are mapped internally but not expressed that way in the API.","commit_id":"04ccb0ea842db716f59fbaa57735705dc9c9cbe9"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"5df45dc50f85c20776e1016d344ead4543d4eef9","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"The whitelist for filters are [\u0027user_id\u0027, \u0027project_id\u0027, \u0027tenant_id\u0027,"},{"line_number":54,"context_line":"\u0027launch_index\u0027, \u0027image_ref\u0027, \u0027image\u0027, \u0027kernel_id\u0027, \u0027ramdisk_id\u0027, \u0027hostname\u0027,"},{"line_number":55,"context_line":"\u0027key_name\u0027, \u0027power_state\u0027, \u0027vm_state\u0027, \u0027task_state\u0027, \u0027host\u0027, \u0027node\u0027,"},{"line_number":56,"context_line":"\u0027instance_type_id\u0027, \u0027reservation_id\u0027, \u0027launched_at\u0027, \u0027terminated_at\u0027,"},{"line_number":57,"context_line":"\u0027availability_zone\u0027, \u0027name\u0027, \u0027display_name\u0027, \u0027description\u0027,"},{"line_number":58,"context_line":"\u0027display_description\u0027, \u0027locked_by\u0027,"}],"source_content_type":"text/x-rst","patch_set":19,"id":"da4df55a_095622d2","line":55,"range":{"start_line":55,"start_character":62,"end_line":55,"end_character":66},"in_reply_to":"da4df55a_ece2e29e","updated":"2016-12-23 01:10:39.000000000","message":"Yea, we will make the filter name \u0027hypervisor_hostname\u0027 rather than node in the future. With Microversion I think","commit_id":"04ccb0ea842db716f59fbaa57735705dc9c9cbe9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6d49cecc8afdf8c91b490382bb7f70b0fea4adde","unresolved":false,"context_lines":[{"line_number":53,"context_line":"The whitelist for filters are [\u0027user_id\u0027, \u0027project_id\u0027, \u0027tenant_id\u0027,"},{"line_number":54,"context_line":"\u0027launch_index\u0027, \u0027image_ref\u0027, \u0027image\u0027, \u0027kernel_id\u0027, \u0027ramdisk_id\u0027, \u0027hostname\u0027,"},{"line_number":55,"context_line":"\u0027key_name\u0027, \u0027power_state\u0027, \u0027vm_state\u0027, \u0027task_state\u0027, \u0027host\u0027, \u0027node\u0027,"},{"line_number":56,"context_line":"\u0027instance_type_id\u0027, \u0027reservation_id\u0027, \u0027launched_at\u0027, \u0027terminated_at\u0027,"},{"line_number":57,"context_line":"\u0027availability_zone\u0027, \u0027name\u0027, \u0027display_name\u0027, \u0027description\u0027,"},{"line_number":58,"context_line":"\u0027display_description\u0027, \u0027locked_by\u0027,"},{"line_number":59,"context_line":"\u0027uuid\u0027, \u0027root_device_name\u0027, \u0027config_drive\u0027, \u0027access_ip_v4\u0027, \u0027access_ip_v6\u0027,"}],"source_content_type":"text/x-rst","patch_set":19,"id":"da4df55a_6cbb5273","line":56,"range":{"start_line":56,"start_character":1,"end_line":56,"end_character":17},"updated":"2016-12-22 15:30:34.000000000","message":"Is this what it would actually be called in the request? Because from the data model it says:\n\n    # *not* flavorid, this is the internal primary_key\n    instance_type_id \u003d Column(Integer)","commit_id":"04ccb0ea842db716f59fbaa57735705dc9c9cbe9"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"5df45dc50f85c20776e1016d344ead4543d4eef9","unresolved":false,"context_lines":[{"line_number":53,"context_line":"The whitelist for filters are [\u0027user_id\u0027, \u0027project_id\u0027, \u0027tenant_id\u0027,"},{"line_number":54,"context_line":"\u0027launch_index\u0027, \u0027image_ref\u0027, \u0027image\u0027, \u0027kernel_id\u0027, \u0027ramdisk_id\u0027, \u0027hostname\u0027,"},{"line_number":55,"context_line":"\u0027key_name\u0027, \u0027power_state\u0027, \u0027vm_state\u0027, \u0027task_state\u0027, \u0027host\u0027, \u0027node\u0027,"},{"line_number":56,"context_line":"\u0027instance_type_id\u0027, \u0027reservation_id\u0027, \u0027launched_at\u0027, \u0027terminated_at\u0027,"},{"line_number":57,"context_line":"\u0027availability_zone\u0027, \u0027name\u0027, \u0027display_name\u0027, \u0027description\u0027,"},{"line_number":58,"context_line":"\u0027display_description\u0027, \u0027locked_by\u0027,"},{"line_number":59,"context_line":"\u0027uuid\u0027, \u0027root_device_name\u0027, \u0027config_drive\u0027, \u0027access_ip_v4\u0027, \u0027access_ip_v6\u0027,"}],"source_content_type":"text/x-rst","patch_set":19,"id":"da4df55a_690a4ed4","line":56,"range":{"start_line":56,"start_character":1,"end_line":56,"end_character":17},"in_reply_to":"da4df55a_6cbb5273","updated":"2016-12-23 01:10:39.000000000","message":"It convert the flavor to instance_type_id at https://github.com/openstack/nova/blob/master/nova/compute/api.py#L2340\n\nBut I missed that point, the instance_type_id is integer, so it never works before. We can remove it. Just put the flavor at here(I forget to put flavor at here also).","commit_id":"04ccb0ea842db716f59fbaa57735705dc9c9cbe9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5f1350e356809bd1718c049f919a103a1bbe2ac4","unresolved":false,"context_lines":[{"line_number":54,"context_line":"\u0027launch_index\u0027, \u0027image_ref\u0027, \u0027image\u0027, \u0027kernel_id\u0027, \u0027ramdisk_id\u0027, \u0027hostname\u0027,"},{"line_number":55,"context_line":"\u0027key_name\u0027, \u0027power_state\u0027, \u0027vm_state\u0027, \u0027task_state\u0027, \u0027host\u0027, \u0027node\u0027,"},{"line_number":56,"context_line":"\u0027instance_type_id\u0027, \u0027reservation_id\u0027, \u0027launched_at\u0027, \u0027terminated_at\u0027,"},{"line_number":57,"context_line":"\u0027availability_zone\u0027, \u0027name\u0027, \u0027display_name\u0027, \u0027description\u0027,"},{"line_number":58,"context_line":"\u0027display_description\u0027, \u0027locked_by\u0027,"},{"line_number":59,"context_line":"\u0027uuid\u0027, \u0027root_device_name\u0027, \u0027config_drive\u0027, \u0027access_ip_v4\u0027, \u0027access_ip_v6\u0027,"},{"line_number":60,"context_line":"\u0027auto_disk_config\u0027, \u0027progress\u0027, \u0027sort_key\u0027, \u0027sort_dir\u0027, \u0027all_tenant\u0027,"}],"source_content_type":"text/x-rst","patch_set":19,"id":"da4df55a_8f63f1db","line":57,"range":{"start_line":57,"start_character":22,"end_line":57,"end_character":26},"updated":"2016-12-23 02:40:29.000000000","message":"I was also wondering about this one as it\u0027s not a column in the instances table, it\u0027s a generated property on the Instances model object. I guess that\u0027s translated to display_name here:\n\nhttps://github.com/openstack/nova/blob/master/nova/compute/api.py#L2338","commit_id":"04ccb0ea842db716f59fbaa57735705dc9c9cbe9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6d49cecc8afdf8c91b490382bb7f70b0fea4adde","unresolved":false,"context_lines":[{"line_number":65,"context_line":"whitelist will be kept. In the future, we hope to have same list for the admin"},{"line_number":66,"context_line":"and non-admin users."},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"The policy \u0027os_compute_api:servers:detail:get_all_tenants\u0027 and"},{"line_number":69,"context_line":"\u0027os_compute_api:servers:index:get_all_tenants\u0027 are deprecated. The default rule"},{"line_number":70,"context_line":"will be changed to enable everything. In next release, it will be removed."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"The new rule \u0027os_compute_api:servers:all_tenants_visiable\u0027 is introduced"},{"line_number":73,"context_line":"instead. It is a soft enforcement rule. When the user can\u0027t pass the rule, the"}],"source_content_type":"text/x-rst","patch_set":19,"id":"da4df55a_ef1ad46d","line":70,"range":{"start_line":68,"start_character":0,"end_line":70,"end_character":74},"updated":"2016-12-22 15:30:34.000000000","message":"Why do we remove and replace these with the new policy below? Won\u0027t they effectively be the same, i.e. today the \u0027get_all_tenants\u0027 policy is admin only by default, and the new \u0027all_tenants_visible\u0027 policy is going to be admin-only by default. The only difference is with the new policy it won\u0027t return a 403 if you\u0027re not an admin, it just won\u0027t list instances that you don\u0027t own.\n\nSo is the point of the replacement simply to signal the behavior change? If so, maybe we point that out.","commit_id":"04ccb0ea842db716f59fbaa57735705dc9c9cbe9"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"5df45dc50f85c20776e1016d344ead4543d4eef9","unresolved":false,"context_lines":[{"line_number":65,"context_line":"whitelist will be kept. In the future, we hope to have same list for the admin"},{"line_number":66,"context_line":"and non-admin users."},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"The policy \u0027os_compute_api:servers:detail:get_all_tenants\u0027 and"},{"line_number":69,"context_line":"\u0027os_compute_api:servers:index:get_all_tenants\u0027 are deprecated. The default rule"},{"line_number":70,"context_line":"will be changed to enable everything. In next release, it will be removed."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"The new rule \u0027os_compute_api:servers:all_tenants_visiable\u0027 is introduced"},{"line_number":73,"context_line":"instead. It is a soft enforcement rule. When the user can\u0027t pass the rule, the"}],"source_content_type":"text/x-rst","patch_set":19,"id":"da4df55a_09f2a2d2","line":70,"range":{"start_line":68,"start_character":0,"end_line":70,"end_character":74},"in_reply_to":"da4df55a_ef1ad46d","updated":"2016-12-23 01:10:39.000000000","message":"yes, just as you siad, the new policy won\u0027t return 403.  I will point that out.","commit_id":"04ccb0ea842db716f59fbaa57735705dc9c9cbe9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6d49cecc8afdf8c91b490382bb7f70b0fea4adde","unresolved":false,"context_lines":[{"line_number":69,"context_line":"\u0027os_compute_api:servers:index:get_all_tenants\u0027 are deprecated. The default rule"},{"line_number":70,"context_line":"will be changed to enable everything. In next release, it will be removed."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"The new rule \u0027os_compute_api:servers:all_tenants_visiable\u0027 is introduced"},{"line_number":73,"context_line":"instead. It is a soft enforcement rule. When the user can\u0027t pass the rule, the"},{"line_number":74,"context_line":"API still return successfully, but the user only can see his own instances. The"},{"line_number":75,"context_line":"default rule is `rule:admin_api`."}],"source_content_type":"text/x-rst","patch_set":19,"id":"da4df55a_ac229ab7","line":72,"range":{"start_line":72,"start_character":49,"end_line":72,"end_character":57},"updated":"2016-12-22 15:30:34.000000000","message":"visible","commit_id":"04ccb0ea842db716f59fbaa57735705dc9c9cbe9"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"5df45dc50f85c20776e1016d344ead4543d4eef9","unresolved":false,"context_lines":[{"line_number":69,"context_line":"\u0027os_compute_api:servers:index:get_all_tenants\u0027 are deprecated. The default rule"},{"line_number":70,"context_line":"will be changed to enable everything. In next release, it will be removed."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"The new rule \u0027os_compute_api:servers:all_tenants_visiable\u0027 is introduced"},{"line_number":73,"context_line":"instead. It is a soft enforcement rule. When the user can\u0027t pass the rule, the"},{"line_number":74,"context_line":"API still return successfully, but the user only can see his own instances. The"},{"line_number":75,"context_line":"default rule is `rule:admin_api`."}],"source_content_type":"text/x-rst","patch_set":19,"id":"da4df55a_29ef66e9","line":72,"range":{"start_line":72,"start_character":49,"end_line":72,"end_character":57},"in_reply_to":"da4df55a_ac229ab7","updated":"2016-12-23 01:10:39.000000000","message":"Done","commit_id":"04ccb0ea842db716f59fbaa57735705dc9c9cbe9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6d49cecc8afdf8c91b490382bb7f70b0fea4adde","unresolved":false,"context_lines":[{"line_number":70,"context_line":"will be changed to enable everything. In next release, it will be removed."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"The new rule \u0027os_compute_api:servers:all_tenants_visiable\u0027 is introduced"},{"line_number":73,"context_line":"instead. It is a soft enforcement rule. When the user can\u0027t pass the rule, the"},{"line_number":74,"context_line":"API still return successfully, but the user only can see his own instances. The"},{"line_number":75,"context_line":"default rule is `rule:admin_api`."},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"The whitelist for sorts are pretty similar with filters."}],"source_content_type":"text/x-rst","patch_set":19,"id":"da4df55a_6fe26405","line":74,"range":{"start_line":73,"start_character":40,"end_line":74,"end_character":75},"updated":"2016-12-22 15:30:34.000000000","message":"If we default to admin and you\u0027re not an admin, wouldn\u0027t this normally fail with a 403? So I\u0027m assuming we\u0027d need some special handling for that case. Why not just make it admin-or-owner by default so that admins can list all tenants, but non-admins can only list instances that they own? If that works, then we wouldn\u0027t need special logic, unless I\u0027m missing something.","commit_id":"04ccb0ea842db716f59fbaa57735705dc9c9cbe9"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"5df45dc50f85c20776e1016d344ead4543d4eef9","unresolved":false,"context_lines":[{"line_number":70,"context_line":"will be changed to enable everything. In next release, it will be removed."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"The new rule \u0027os_compute_api:servers:all_tenants_visiable\u0027 is introduced"},{"line_number":73,"context_line":"instead. It is a soft enforcement rule. When the user can\u0027t pass the rule, the"},{"line_number":74,"context_line":"API still return successfully, but the user only can see his own instances. The"},{"line_number":75,"context_line":"default rule is `rule:admin_api`."},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"The whitelist for sorts are pretty similar with filters."}],"source_content_type":"text/x-rst","patch_set":19,"id":"da4df55a_4904aa7d","line":74,"range":{"start_line":73,"start_character":40,"end_line":74,"end_character":75},"in_reply_to":"da4df55a_6fe26405","updated":"2016-12-23 01:10:39.000000000","message":"admin_or_owner means everyone can pass this rule. So everyone request with all_tenants\u003dTrue, they can see all the instances from all the tenants.\n\nWe probably need to change the code at https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/servers.py#L316\n\nIf all_tenants and context.can(os_compute_api:servers:all_tenants_visible, fatal\u003dFalse):\n      elevated \u003d context.elevated()\nelse:\n      if context.project_id:\n                search_opts[\u0027project_id\u0027] \u003d context.project_id\n       else:\n                search_opts[\u0027user_id\u0027] \u003d context.user_id","commit_id":"04ccb0ea842db716f59fbaa57735705dc9c9cbe9"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"67d4c9a948027a833c5fa5b9640ff027393508f6","unresolved":false,"context_lines":[{"line_number":72,"context_line":"The new rule \u0027os_compute_api:servers:all_tenants_visiable\u0027 is introduced"},{"line_number":73,"context_line":"instead. It is a soft enforcement rule. When the user can\u0027t pass the rule, the"},{"line_number":74,"context_line":"API still return successfully, but the user only can see his own instances. The"},{"line_number":75,"context_line":"default rule is `rule:admin_api`."},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"The whitelist for sorts are pretty similar with filters."},{"line_number":78,"context_line":"[\u0027user_id\u0027, \u0027project_id\u0027, \u0027launch_index\u0027, \u0027image_ref\u0027, \u0027kernel_id\u0027,"}],"source_content_type":"text/x-rst","patch_set":19,"id":"da4df55a_21479abc","line":75,"updated":"2016-12-22 13:32:49.000000000","message":"I\u0027m not sure why this is a policy rule actually.... I feel like this should be hard coded behavior.","commit_id":"04ccb0ea842db716f59fbaa57735705dc9c9cbe9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6d49cecc8afdf8c91b490382bb7f70b0fea4adde","unresolved":false,"context_lines":[{"line_number":72,"context_line":"The new rule \u0027os_compute_api:servers:all_tenants_visiable\u0027 is introduced"},{"line_number":73,"context_line":"instead. It is a soft enforcement rule. When the user can\u0027t pass the rule, the"},{"line_number":74,"context_line":"API still return successfully, but the user only can see his own instances. The"},{"line_number":75,"context_line":"default rule is `rule:admin_api`."},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"The whitelist for sorts are pretty similar with filters."},{"line_number":78,"context_line":"[\u0027user_id\u0027, \u0027project_id\u0027, \u0027launch_index\u0027, \u0027image_ref\u0027, \u0027kernel_id\u0027,"}],"source_content_type":"text/x-rst","patch_set":19,"id":"da4df55a_6c40b257","line":75,"in_reply_to":"da4df55a_21479abc","updated":"2016-12-22 15:30:34.000000000","message":"I\u0027m fine with a policy for all_tenants since I\u0027d think there could be a case for wanting to allow a certain class of users to list all tenants in a cloud but not have admin rights to see hosts and perform migrations. But without seeing how this will be implemented it\u0027s hard for me to tell right now if this makes sense.","commit_id":"04ccb0ea842db716f59fbaa57735705dc9c9cbe9"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"5df45dc50f85c20776e1016d344ead4543d4eef9","unresolved":false,"context_lines":[{"line_number":72,"context_line":"The new rule \u0027os_compute_api:servers:all_tenants_visiable\u0027 is introduced"},{"line_number":73,"context_line":"instead. It is a soft enforcement rule. When the user can\u0027t pass the rule, the"},{"line_number":74,"context_line":"API still return successfully, but the user only can see his own instances. The"},{"line_number":75,"context_line":"default rule is `rule:admin_api`."},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"The whitelist for sorts are pretty similar with filters."},{"line_number":78,"context_line":"[\u0027user_id\u0027, \u0027project_id\u0027, \u0027launch_index\u0027, \u0027image_ref\u0027, \u0027kernel_id\u0027,"}],"source_content_type":"text/x-rst","patch_set":19,"id":"da4df55a_895a1282","line":75,"in_reply_to":"da4df55a_6c40b257","updated":"2016-12-23 01:10:39.000000000","message":"yea, this is thing we discussed at http://eavesdrop.openstack.org/irclogs/%23openstack-nova/%23openstack-nova.2016-12-15.log.html#t2016-12-15T13:27:25\n\nHope I understand correctly.","commit_id":"04ccb0ea842db716f59fbaa57735705dc9c9cbe9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6d49cecc8afdf8c91b490382bb7f70b0fea4adde","unresolved":false,"context_lines":[{"line_number":105,"context_line":"REST API impact"},{"line_number":106,"context_line":"---------------"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"* Request `HTTP BadRequest 400` for internal joined-table and internal"},{"line_number":109,"context_line":"  attributes."},{"line_number":110,"context_line":"* Few filters and sorts which aren\u0027t mapping to the REST API representaion"},{"line_number":111,"context_line":"  will be ignored in all microversions."},{"line_number":112,"context_line":"* The default behaviour of \u0027all_tenants\u0027 changed. The new soft enforcement rule"},{"line_number":113,"context_line":"  is instead of the hard enforcement rule."},{"line_number":114,"context_line":""}],"source_content_type":"text/x-rst","patch_set":19,"id":"da4df55a_8fddc872","line":111,"range":{"start_line":108,"start_character":2,"end_line":111,"end_character":39},"updated":"2016-12-22 15:30:34.000000000","message":"How do we distinguish between what\u0027s ignored (and not an error) and what\u0027s a 400?  If we\u0027re using jsonschema validation and I pass in \u0027extras\u0027 as a filter parameter, it should result in a validation error and be a 400 right? So what filters would be \u0027ignored\u0027? Is that like for a non-admin user trying to filter on host? We don\u0027t fail, but we don\u0027t honor it either.","commit_id":"04ccb0ea842db716f59fbaa57735705dc9c9cbe9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6d49cecc8afdf8c91b490382bb7f70b0fea4adde","unresolved":false,"context_lines":[{"line_number":137,"context_line":"Other deployer impact"},{"line_number":138,"context_line":"---------------------"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"The new `os_compute_api:servers:all_tenants_visiable` is introduced. The"},{"line_number":141,"context_line":"old rule `os_compute_api:servers:detail:get_all_tenants` and"},{"line_number":142,"context_line":"`os_compute_api:servers:detail:get_all_tenants` is deprecated. The default"},{"line_number":143,"context_line":"rule is changed to enable everything. The old rule will be removed in the"}],"source_content_type":"text/x-rst","patch_set":19,"id":"da4df55a_afc1ac82","line":140,"range":{"start_line":140,"start_character":44,"end_line":140,"end_character":52},"updated":"2016-12-22 15:30:34.000000000","message":"visible","commit_id":"04ccb0ea842db716f59fbaa57735705dc9c9cbe9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6d49cecc8afdf8c91b490382bb7f70b0fea4adde","unresolved":false,"context_lines":[{"line_number":139,"context_line":""},{"line_number":140,"context_line":"The new `os_compute_api:servers:all_tenants_visiable` is introduced. The"},{"line_number":141,"context_line":"old rule `os_compute_api:servers:detail:get_all_tenants` and"},{"line_number":142,"context_line":"`os_compute_api:servers:detail:get_all_tenants` is deprecated. The default"},{"line_number":143,"context_line":"rule is changed to enable everything. The old rule will be removed in the"},{"line_number":144,"context_line":"future."},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"Developer impact"}],"source_content_type":"text/x-rst","patch_set":19,"id":"da4df55a_4f5840fb","line":143,"range":{"start_line":142,"start_character":63,"end_line":143,"end_character":37},"updated":"2016-12-22 15:30:34.000000000","message":"I\u0027m still a bit unclear on this - are we proposing to change the default on the existing \u0027get_all_tenants\u0027 policy rules to be any (@)?","commit_id":"04ccb0ea842db716f59fbaa57735705dc9c9cbe9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fb397a3f1cbea5bd55c4a3ec97576abba02fcc95","unresolved":false,"context_lines":[{"line_number":139,"context_line":""},{"line_number":140,"context_line":"The new `os_compute_api:servers:all_tenants_visiable` is introduced. The"},{"line_number":141,"context_line":"old rule `os_compute_api:servers:detail:get_all_tenants` and"},{"line_number":142,"context_line":"`os_compute_api:servers:detail:get_all_tenants` is deprecated. The default"},{"line_number":143,"context_line":"rule is changed to enable everything. The old rule will be removed in the"},{"line_number":144,"context_line":"future."},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"Developer impact"}],"source_content_type":"text/x-rst","patch_set":19,"id":"da4df55a_8f777139","line":143,"range":{"start_line":142,"start_character":63,"end_line":143,"end_character":37},"in_reply_to":"da4df55a_4f5840fb","updated":"2016-12-23 02:57:28.000000000","message":"If the new all_tenants_visible rule is going to replace get_all_tenants in the code, then I wouldn\u0027t even change the default value for get_all_tenants as it won\u0027t even be read in code.\n\nAlternatively, if a deployment has a non-default setting for get_all_tenants, should we make that the value of all_tenants_visible in Ocata?\n\nI guess I\u0027m a bit unclear on if get_all_tenants as a policy rule will still be used in code with this change, or if it\u0027s going to be completely ignored and we\u0027ll use all_tenants_visible in code now, making get_all_tenants useless. But I do worry about an easy transition for deployments that are using a custom rule for get_all_tenants and not breaking that during the upgrade.","commit_id":"04ccb0ea842db716f59fbaa57735705dc9c9cbe9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ad733f61633158effba6fc24318f58afed3a6352","unresolved":false,"context_lines":[{"line_number":139,"context_line":""},{"line_number":140,"context_line":"The new `os_compute_api:servers:all_tenants_visiable` is introduced. The"},{"line_number":141,"context_line":"old rule `os_compute_api:servers:detail:get_all_tenants` and"},{"line_number":142,"context_line":"`os_compute_api:servers:detail:get_all_tenants` is deprecated. The default"},{"line_number":143,"context_line":"rule is changed to enable everything. The old rule will be removed in the"},{"line_number":144,"context_line":"future."},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"Developer impact"}],"source_content_type":"text/x-rst","patch_set":19,"id":"da4df55a_6f088d2e","line":143,"range":{"start_line":142,"start_character":63,"end_line":143,"end_character":37},"in_reply_to":"da4df55a_8f777139","updated":"2016-12-23 03:12:57.000000000","message":"After talking with Alex in IRC, in Ocata we\u0027re going to check both the old get_all_tenants rule and the new all_tenants_visible rule.\n\nThe default for get_all_tenants will be changed to @ (everyone) in Ocata code. The default for all_tenants_visible will be admin-only.\n\nSo we have these cases for a fresh install:\n\n1. non-admin user, --all-tenants: get_all_tenants (ok) \u0026\u0026 all_tenants_visible (not ok) \u003d fails policy check but is not a 403 (I\u0027m not sure how, but I guess this is something Kevin is working on, and I think Alex\u0027s response on L74 lays out the idea)\n\n2. admin user, --all-tenants: get_all_tenants (ok) \u0026\u0026 all_tenants_visible (ok) \u003d passes policy check\n\n--\n\nThe other case is that from a newton upgrade the policy.json has an explicit setting for get_all_tenants which is the old default of admin-only. This overrides the default in code change to @ for get_all_tenants. In that case, #1 above becomes a hard fail 403. #2 is unchanged.\n\nI think it\u0027s probably worth saying something similar to this scenario in the spec for when we\u0027re writing release notes and/or operators upgrading to Ocata are digging into the details of this change and how they handle the policy updates.","commit_id":"04ccb0ea842db716f59fbaa57735705dc9c9cbe9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b5bd4f8583c8112066283f9f4443fe5564f1837c","unresolved":false,"context_lines":[{"line_number":110,"context_line":"* Few filters and sorts which aren\u0027t mapping to the REST API representaion"},{"line_number":111,"context_line":"  will be ignored in all microversions."},{"line_number":112,"context_line":"* The default behaviour of `all_tenants` changed. The new soft enforcement rule"},{"line_number":113,"context_line":"  is instead of the hard enforcement rule. The API behavours is as below for"},{"line_number":114,"context_line":"  a fresh install of Nova:"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"  * For non-admin user, list servers with `all_tenants\u003dTrue`, it will pass the"}],"source_content_type":"text/x-rst","patch_set":21,"id":"da4df55a_745499fe","line":113,"range":{"start_line":113,"start_character":51,"end_line":113,"end_character":60},"updated":"2016-12-26 22:47:22.000000000","message":"behavior","commit_id":"7edc4b9af3b8d794c0a5f1c760998e52ae86d359"}],"specs/ocata/approved/server-list-query-parameter-whitelist.rst":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"7b41c45386369ee71a24f4ffae6b7aa86de6af07","unresolved":false,"context_lines":[{"line_number":10,"context_line":""},{"line_number":11,"context_line":"https://bugs.launchpad.net/nova/+bug/1609039"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"We shouldn\u0027t allow users to sort instances on any column in the"},{"line_number":14,"context_line":"instances table in the database, which can include joined tables like"},{"line_number":15,"context_line":"system_metadata, info_cache, extras, etc."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Problem description"},{"line_number":18,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a629dbe_f5d514b9","line":15,"range":{"start_line":13,"start_character":0,"end_line":15,"end_character":41},"updated":"2016-11-09 04:45:19.000000000","message":"Emm...I thought this spec isn\u0027t only about the sort, it is about all the query parameters for server list","commit_id":"ecd14996a28b6640eb96ea7c7b980acddd8dd411"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"0629fe928d59b370ee519ed2e109abc8d4941a5a","unresolved":false,"context_lines":[{"line_number":10,"context_line":""},{"line_number":11,"context_line":"https://bugs.launchpad.net/nova/+bug/1609039"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"We shouldn\u0027t allow users to sort instances on any column in the"},{"line_number":14,"context_line":"instances table in the database, which can include joined tables like"},{"line_number":15,"context_line":"system_metadata, info_cache, extras, etc."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Problem description"},{"line_number":18,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a629dbe_27fe8137","line":15,"range":{"start_line":13,"start_character":0,"end_line":15,"end_character":41},"in_reply_to":"9a629dbe_67ea3911","updated":"2016-11-09 07:25:30.000000000","message":"yes, right","commit_id":"ecd14996a28b6640eb96ea7c7b980acddd8dd411"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"2cf905d8ed4337c535fc1c07cd342694dac9c525","unresolved":false,"context_lines":[{"line_number":10,"context_line":""},{"line_number":11,"context_line":"https://bugs.launchpad.net/nova/+bug/1609039"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"We shouldn\u0027t allow users to sort instances on any column in the"},{"line_number":14,"context_line":"instances table in the database, which can include joined tables like"},{"line_number":15,"context_line":"system_metadata, info_cache, extras, etc."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Problem description"},{"line_number":18,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a629dbe_67ea3911","line":15,"range":{"start_line":13,"start_character":0,"end_line":15,"end_character":41},"in_reply_to":"9a629dbe_f5d514b9","updated":"2016-11-09 06:44:51.000000000","message":"So this spec should give the whitelist of all usable query parameters for Server List?","commit_id":"ecd14996a28b6640eb96ea7c7b980acddd8dd411"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"0629fe928d59b370ee519ed2e109abc8d4941a5a","unresolved":false,"context_lines":[{"line_number":20,"context_line":"The query parameter\u0027s validation for `GET /servers` API are just some"},{"line_number":21,"context_line":"freestyle code in the API method. Due to no control on those query"},{"line_number":22,"context_line":"parameters, and there those query parameters just pass into the SQL"},{"line_number":23,"context_line":"query directly."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Use Cases"},{"line_number":26,"context_line":"---------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a629dbe_c75ea575","line":23,"updated":"2016-11-09 07:25:30.000000000","message":"I did some test, currently if I input the joined table as the sort_key, I will get 400, and I will get 500 when I input info_cache when the nova-api just startup which I don\u0027t know why.\n\n\nIf I input the joined table in the filter I will get 500. \n\nI also can input some internal attribute \u0027__mapper__\u0027 for sqlacheme orm object. Then I got 500.\n\nFor example:\nGET /servers?__mapper__\u003d1 \u003d\u003d\u003e return 500\nGET /servers?extra\u003d1 \u003d\u003d\u003e return 500\n\nWe can talk about those problems explicitly.","commit_id":"ecd14996a28b6640eb96ea7c7b980acddd8dd411"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"202a27ab6369e0c8d6ce5a3e500a4d7935043377","unresolved":false,"context_lines":[{"line_number":20,"context_line":"The query parameter\u0027s validation for `GET /servers` API are just some"},{"line_number":21,"context_line":"freestyle code in the API method. Due to no control on those query"},{"line_number":22,"context_line":"parameters, and there those query parameters just pass into the SQL"},{"line_number":23,"context_line":"query directly."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Use Cases"},{"line_number":26,"context_line":"---------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a629dbe_b8d2acd0","line":23,"in_reply_to":"9a629dbe_c75ea575","updated":"2016-11-09 08:47:51.000000000","message":"The reason for why sort with joined table return 400 is here https://review.openstack.org/#/c/143632/6.","commit_id":"ecd14996a28b6640eb96ea7c7b980acddd8dd411"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"5ef98bc142d5c03980bc5be5b3c83adc8dfc880c","unresolved":false,"context_lines":[{"line_number":34,"context_line":"This spec proposes to add a query parameter whitelist for `GET /servers`"},{"line_number":35,"context_line":"API (index and detail). In order to strict the query parameters that can"},{"line_number":36,"context_line":"be used when calling these APIs as we shouldn\u0027t allow users to sort"},{"line_number":37,"context_line":"instances on joined tables like system_metadata, info_cache, extras, etc."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"The whitelist can be different for admin users and non-admin users:"},{"line_number":40,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a629dbe_b65f1340","line":37,"updated":"2016-11-09 13:19:37.000000000","message":"Can we be explicit about this being about filter and sort.\n\nWe might a different list for both.","commit_id":"ecd14996a28b6640eb96ea7c7b980acddd8dd411"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"50b22b794575a9206c6d43fb13dba688cecde246","unresolved":false,"context_lines":[{"line_number":34,"context_line":"This spec proposes to add a query parameter whitelist for `GET /servers`"},{"line_number":35,"context_line":"API (index and detail). In order to strict the query parameters that can"},{"line_number":36,"context_line":"be used when calling these APIs as we shouldn\u0027t allow users to sort"},{"line_number":37,"context_line":"instances on joined tables like system_metadata, info_cache, extras, etc."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"The whitelist can be different for admin users and non-admin users:"},{"line_number":40,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a629dbe_8d0ae377","line":37,"in_reply_to":"9a629dbe_b65f1340","updated":"2016-11-10 01:20:29.000000000","message":"Yea this got mixed up here. making separate list clearly will give more clear cleanup.","commit_id":"ecd14996a28b6640eb96ea7c7b980acddd8dd411"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"5ef98bc142d5c03980bc5be5b3c83adc8dfc880c","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"The whitelist can be different for admin users and non-admin users:"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"Whitelist for non-admin users:"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"[\u0027user_id\u0027, \u0027project_id\u0027, \u0027image_ref\u0027, \u0027key_name\u0027,"},{"line_number":44,"context_line":" \u0027key_data\u0027, \u0027power_state\u0027, \u0027vm_state\u0027, \u0027task_state\u0027,"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a629dbe_d65ac74f","line":41,"updated":"2016-11-09 13:19:37.000000000","message":"I really want to see all the non-admin user queries have an index, so lets come up with a good small list, and add any extra indexes we might need.","commit_id":"ecd14996a28b6640eb96ea7c7b980acddd8dd411"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"50b22b794575a9206c6d43fb13dba688cecde246","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"The whitelist can be different for admin users and non-admin users:"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"Whitelist for non-admin users:"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"[\u0027user_id\u0027, \u0027project_id\u0027, \u0027image_ref\u0027, \u0027key_name\u0027,"},{"line_number":44,"context_line":" \u0027key_data\u0027, \u0027power_state\u0027, \u0027vm_state\u0027, \u0027task_state\u0027,"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a629dbe_c8d3e902","line":41,"range":{"start_line":41,"start_character":0,"end_line":41,"end_character":30},"updated":"2016-11-10 01:20:29.000000000","message":"Whitelist of query param for non-admin users: ?","commit_id":"ecd14996a28b6640eb96ea7c7b980acddd8dd411"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"5ef98bc142d5c03980bc5be5b3c83adc8dfc880c","unresolved":false,"context_lines":[{"line_number":50,"context_line":" \u0027default_swap_device\u0027, \u0027default_ephemeral_device\u0027,"},{"line_number":51,"context_line":" \u0027config_drive\u0027, \u0027auto_disk_config\u0027, \u0027access_ip_v4\u0027,"},{"line_number":52,"context_line":" \u0027access_ip_v6\u0027, \u0027progress\u0027, \u0027shutdown_terminate\u0027,"},{"line_number":53,"context_line":" \u0027created_at\u0027]"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"Whitelist for admin users will be a superset of the non-admin"},{"line_number":56,"context_line":"whitelist and the following parameters will be appended to"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a629dbe_599fc8b3","line":53,"updated":"2016-11-09 13:19:37.000000000","message":"Lets make this really small, something like:\n\n\u0027user_id\u0027, \u0027project_id\u0027, \u0027image_ref\u0027, \u0027key_name\u0027,\n\u0027power_state\u0027, \u0027vm_state\u0027, \u0027task_state\u0027,\n \u0027instance_type_id\u0027,\n \u0027launched_at\u0027, \u0027availablility_zone\u0027,\n \u0027display_name\u0027,\n \u0027locked\u0027, \u0027uuid\u0027, \u0027progress\u0027,\n \u0027created_at\u0027.\n\nWe need to specific the type for each of those.","commit_id":"ecd14996a28b6640eb96ea7c7b980acddd8dd411"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"50b22b794575a9206c6d43fb13dba688cecde246","unresolved":false,"context_lines":[{"line_number":50,"context_line":" \u0027default_swap_device\u0027, \u0027default_ephemeral_device\u0027,"},{"line_number":51,"context_line":" \u0027config_drive\u0027, \u0027auto_disk_config\u0027, \u0027access_ip_v4\u0027,"},{"line_number":52,"context_line":" \u0027access_ip_v6\u0027, \u0027progress\u0027, \u0027shutdown_terminate\u0027,"},{"line_number":53,"context_line":" \u0027created_at\u0027]"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"Whitelist for admin users will be a superset of the non-admin"},{"line_number":56,"context_line":"whitelist and the following parameters will be appended to"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a629dbe_2d739716","line":53,"in_reply_to":"9a629dbe_599fc8b3","updated":"2016-11-10 01:20:29.000000000","message":"@john -Nice list at first but i feel \u0027memory_mb\u0027, \u0027vcpus\u0027 are also very common items used to filter instance. can we include those also?","commit_id":"ecd14996a28b6640eb96ea7c7b980acddd8dd411"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"5ef98bc142d5c03980bc5be5b3c83adc8dfc880c","unresolved":false,"context_lines":[{"line_number":59,"context_line":"[\u0027kernel_id\u0027, \u0027ramdisk_id\u0027, \u0027host_name\u0027, \u0027launch_index\u0027,"},{"line_number":60,"context_line":" \u0027host\u0027, \u0027node\u0027, \u0027terminated_at\u0027, \u0027launched_on\u0027, \u0027locked_by\u0027,"},{"line_number":61,"context_line":" \u0027architecture\u0027, \u0027vm_mode\u0027, \u0027disable_terminate\u0027, \u0027cell_name\u0027,"},{"line_number":62,"context_line":" \u0027internal_id\u0027, \u0027cleaned\u0027]"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a629dbe_1952b0dd","line":62,"updated":"2016-11-09 13:19:37.000000000","message":"I guess we could add lots for admin users, but need to specify the type for all of these.\n\nThere are some that we probably don\u0027t want to bother with, like internal_id, etc.","commit_id":"ecd14996a28b6640eb96ea7c7b980acddd8dd411"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"1efaa0932d9cdb92d0d4dd35784656f29d864540","unresolved":false,"context_lines":[{"line_number":61,"context_line":" \u0027architecture\u0027, \u0027vm_mode\u0027, \u0027disable_terminate\u0027, \u0027cell_name\u0027,"},{"line_number":62,"context_line":" \u0027internal_id\u0027, \u0027cleaned\u0027]"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"Alternatives"},{"line_number":66,"context_line":"------------"},{"line_number":67,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a629dbe_6c276c64","line":64,"updated":"2016-11-09 13:39:16.000000000","message":"Given we are now validating all parameters, what are the other parameters we need to check.\n\nI am thinking the paging ones, like marker, limit, etc.\n\nWe should also be very specific about the REST endpoint we are on about here. I guess its /servers/ and nothing else?","commit_id":"ecd14996a28b6640eb96ea7c7b980acddd8dd411"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"5ef98bc142d5c03980bc5be5b3c83adc8dfc880c","unresolved":false,"context_lines":[{"line_number":75,"context_line":"REST API impact"},{"line_number":76,"context_line":"---------------"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"The query parameter will be stricted to whitelists."},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"Security impact"},{"line_number":81,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a629dbe_5930a89e","line":78,"updated":"2016-11-09 13:19:37.000000000","message":"So what about a microversion to reject bad queries.\n\nWhat do we do for older microversions? silently ignore the invalid input?\n\nThere are some that current have 500 or 400, it seems OK for them to return 400.\n\nIts complicated, feel like we need to discuss the details.","commit_id":"ecd14996a28b6640eb96ea7c7b980acddd8dd411"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"50b22b794575a9206c6d43fb13dba688cecde246","unresolved":false,"context_lines":[{"line_number":75,"context_line":"REST API impact"},{"line_number":76,"context_line":"---------------"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"The query parameter will be stricted to whitelists."},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"Security impact"},{"line_number":81,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a629dbe_e8250d09","line":78,"in_reply_to":"9a629dbe_5930a89e","updated":"2016-11-10 01:20:29.000000000","message":"+1 to reject bad queries with version bump.\n\nIMO, we can 400 for all those return 500/400 but those still give filtered list, ignoring silently may still cause issue for users as it will start returning complete list but not sure any such use cases.\n\nIf ignoring bad one for old version then we should explicitly mention those in Rest API impact","commit_id":"ecd14996a28b6640eb96ea7c7b980acddd8dd411"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"16518096f11bc48cb42ba4abddd1c1e0f4044668","unresolved":false,"context_lines":[{"line_number":128,"context_line":""},{"line_number":129,"context_line":"Dependencies"},{"line_number":130,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"Testing"},{"line_number":134,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a629dbe_3a1a146f","line":131,"updated":"2016-11-09 07:35:17.000000000","message":"This spec should depend on this one https://review.openstack.org/388518","commit_id":"ecd14996a28b6640eb96ea7c7b980acddd8dd411"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"c6574ff0822cb19f05667f3633a81466a1ed4ed9","unresolved":false,"context_lines":[{"line_number":128,"context_line":""},{"line_number":129,"context_line":"Dependencies"},{"line_number":130,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"Testing"},{"line_number":134,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a629dbe_7a2f2cf6","line":131,"in_reply_to":"9a629dbe_3a1a146f","updated":"2016-11-09 07:53:21.000000000","message":"Done","commit_id":"ecd14996a28b6640eb96ea7c7b980acddd8dd411"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"50b22b794575a9206c6d43fb13dba688cecde246","unresolved":false,"context_lines":[{"line_number":133,"context_line":"Testing"},{"line_number":134,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"The unittest and function test will be added."},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"Documentation Impact"},{"line_number":139,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9a629dbe_c856895b","line":136,"range":{"start_line":136,"start_character":0,"end_line":136,"end_character":45},"updated":"2016-11-10 01:20:29.000000000","message":"we may need Tempest tests or to update some of them but we can check this on patch itself.","commit_id":"ecd14996a28b6640eb96ea7c7b980acddd8dd411"}],"specs/ocata/approved/strict-server-list-query-parameters.rst":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"69c40f81910f7534a3040eef2759fa4888643e11","unresolved":false,"context_lines":[{"line_number":13,"context_line":"Currently the filter and sort query parameters can be used for"},{"line_number":14,"context_line":"`Server List` API are not explicit defined (the filters that"},{"line_number":15,"context_line":"can be used for non-admin users are defined). This spec aims to"},{"line_number":16,"context_line":"propose to add whitelists for this API to strict the filter and"},{"line_number":17,"context_line":"sort query parameters that can be used when calling `GET /servers`"},{"line_number":18,"context_line":"API."},{"line_number":19,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_85c7ca94","line":16,"updated":"2016-11-11 16:31:24.000000000","message":"\"strict\" isn\u0027t a verb. I think you meant to say \"This spec aims to add a strict set of whitelisted filtering and sorting parameters for server list operations\".","commit_id":"370b608fcf64a5d7acc8983210aaecc74cf77f86"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"cca5b0c04c0fa58f580e472d4cca5b3d4f01f5a8","unresolved":false,"context_lines":[{"line_number":13,"context_line":"Currently the filter and sort query parameters can be used for"},{"line_number":14,"context_line":"`Server List` API are not explicit defined (the filters that"},{"line_number":15,"context_line":"can be used for non-admin users are defined). This spec aims to"},{"line_number":16,"context_line":"propose to add whitelists for this API to strict the filter and"},{"line_number":17,"context_line":"sort query parameters that can be used when calling `GET /servers`"},{"line_number":18,"context_line":"API."},{"line_number":19,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_2545f516","line":16,"in_reply_to":"9a629dbe_85c7ca94","updated":"2016-11-14 08:47:44.000000000","message":"Done","commit_id":"370b608fcf64a5d7acc8983210aaecc74cf77f86"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"cca5b0c04c0fa58f580e472d4cca5b3d4f01f5a8","unresolved":false,"context_lines":[{"line_number":13,"context_line":"Currently the filter and sort query parameters can be used for"},{"line_number":14,"context_line":"`Server List` API are not explicit defined (the filters that"},{"line_number":15,"context_line":"can be used for non-admin users are defined). This spec aims to"},{"line_number":16,"context_line":"propose to add whitelists for this API to strict the filter and"},{"line_number":17,"context_line":"sort query parameters that can be used when calling `GET /servers`"},{"line_number":18,"context_line":"API."},{"line_number":19,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_a519057c","line":16,"in_reply_to":"9a629dbe_85c7ca94","updated":"2016-11-14 08:47:44.000000000","message":"Done","commit_id":"370b608fcf64a5d7acc8983210aaecc74cf77f86"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"69c40f81910f7534a3040eef2759fa4888643e11","unresolved":false,"context_lines":[{"line_number":33,"context_line":"---------"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"This is an effort about refactor the API layer code, to ease the burden of"},{"line_number":36,"context_line":"maintenance API code. So there isn\u0027t any use-cases for the end-user."},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"Proposed change"},{"line_number":39,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_c56b8283","line":36,"updated":"2016-11-11 16:31:24.000000000","message":"s/maintenance API code/maintaining the API code/","commit_id":"370b608fcf64a5d7acc8983210aaecc74cf77f86"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"cca5b0c04c0fa58f580e472d4cca5b3d4f01f5a8","unresolved":false,"context_lines":[{"line_number":33,"context_line":"---------"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"This is an effort about refactor the API layer code, to ease the burden of"},{"line_number":36,"context_line":"maintenance API code. So there isn\u0027t any use-cases for the end-user."},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"Proposed change"},{"line_number":39,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_855401cb","line":36,"in_reply_to":"9a629dbe_c56b8283","updated":"2016-11-14 08:47:44.000000000","message":"Done","commit_id":"370b608fcf64a5d7acc8983210aaecc74cf77f86"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"69c40f81910f7534a3040eef2759fa4888643e11","unresolved":false,"context_lines":[{"line_number":39,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"This spec proposes to add a filter and sort query parameter whitelist"},{"line_number":42,"context_line":"for `GET /servers/` API (index and detail). In order to strict the"},{"line_number":43,"context_line":"sort_key and filter query parameters that can be used when calling"},{"line_number":44,"context_line":"these APIs."},{"line_number":45,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_6511d603","line":42,"updated":"2016-11-11 16:31:24.000000000","message":"See above note about \"strict\" not being a verb and an alternate way of expressing what you\u0027re attempting to say here.","commit_id":"370b608fcf64a5d7acc8983210aaecc74cf77f86"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"69c40f81910f7534a3040eef2759fa4888643e11","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"The whitelists can be different for admin users and non-admin users:"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"* The filters whitelist for non-admin users already exist:"},{"line_number":49,"context_line":"  http://git.openstack.org/cgit/openstack/nova/tree/nova/api/openstack/compute/servers.py#n1103"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"* The filters whitelist for admin users should be limited to fields"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_058bba1f","line":48,"updated":"2016-11-11 16:31:24.000000000","message":"s/exist/exists/","commit_id":"370b608fcf64a5d7acc8983210aaecc74cf77f86"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"cca5b0c04c0fa58f580e472d4cca5b3d4f01f5a8","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"The whitelists can be different for admin users and non-admin users:"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"* The filters whitelist for non-admin users already exist:"},{"line_number":49,"context_line":"  http://git.openstack.org/cgit/openstack/nova/tree/nova/api/openstack/compute/servers.py#n1103"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"* The filters whitelist for admin users should be limited to fields"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_0540f106","line":48,"in_reply_to":"9a629dbe_058bba1f","updated":"2016-11-14 08:47:44.000000000","message":"Done","commit_id":"370b608fcf64a5d7acc8983210aaecc74cf77f86"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"69c40f81910f7534a3040eef2759fa4888643e11","unresolved":false,"context_lines":[{"line_number":49,"context_line":"  http://git.openstack.org/cgit/openstack/nova/tree/nova/api/openstack/compute/servers.py#n1103"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"* The filters whitelist for admin users should be limited to fields"},{"line_number":52,"context_line":"  that are not in joined tables:"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"  [\u0027user_id\u0027, \u0027project_id\u0027, \u0027image_ref\u0027, \u0027key_name\u0027,"},{"line_number":55,"context_line":"   \u0027power_state\u0027, \u0027vm_state\u0027, \u0027task_state\u0027, \u0027instance_type_id\u0027,"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_2518bed2","line":52,"range":{"start_line":52,"start_character":11,"end_line":52,"end_character":31},"updated":"2016-11-11 16:31:24.000000000","message":"note that \"flavor\" and \"name\" are filterable for non-admins but you suggest here that they would not be filterable for admins, since neither of those fields is in \"joined tables\".","commit_id":"370b608fcf64a5d7acc8983210aaecc74cf77f86"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"cca5b0c04c0fa58f580e472d4cca5b3d4f01f5a8","unresolved":false,"context_lines":[{"line_number":49,"context_line":"  http://git.openstack.org/cgit/openstack/nova/tree/nova/api/openstack/compute/servers.py#n1103"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"* The filters whitelist for admin users should be limited to fields"},{"line_number":52,"context_line":"  that are not in joined tables:"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"  [\u0027user_id\u0027, \u0027project_id\u0027, \u0027image_ref\u0027, \u0027key_name\u0027,"},{"line_number":55,"context_line":"   \u0027power_state\u0027, \u0027vm_state\u0027, \u0027task_state\u0027, \u0027instance_type_id\u0027,"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_c55c39f3","line":52,"range":{"start_line":52,"start_character":11,"end_line":52,"end_character":31},"in_reply_to":"9a629dbe_2518bed2","updated":"2016-11-14 08:47:44.000000000","message":"Done","commit_id":"370b608fcf64a5d7acc8983210aaecc74cf77f86"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"69c40f81910f7534a3040eef2759fa4888643e11","unresolved":false,"context_lines":[{"line_number":58,"context_line":"   \u0027vcpus\u0027, \u0027memory_mb\u0027, \u0027reservation_id\u0027, \u0027launched_at\u0027,"},{"line_number":59,"context_line":"   \u0027availablility_zone\u0027, \u0027display_name\u0027, \u0027disable_terminate\u0027,"},{"line_number":60,"context_line":"   \u0027root_device_name\u0027, \u0027config_drive\u0027, \u0027auto_disk_config\u0027,"},{"line_number":61,"context_line":"   \u0027shutdown_terminate\u0027, \u0027created_at\u0027, \u0027cell_name\u0027]"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"* The sort_key whitelist for non-admin users:"},{"line_number":64,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_05f1fa6a","line":61,"updated":"2016-11-11 16:31:24.000000000","message":"I strongly disagree with the above statement. I don\u0027t see why admins should be able to filter on all of the above fields, especially ones that are not indexed (and would result in a full table scan across all records in the instances tables in the cell databases).\n\nBasically, I don\u0027t see any reason to filter on any of the above values other than \"uuid\" (which frankly should be capable to filter for both non-admins and admins) and \"cell_name\" (which clearly should be admin-only since the cell isn\u0027t a user-exposed thing).","commit_id":"370b608fcf64a5d7acc8983210aaecc74cf77f86"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"cca5b0c04c0fa58f580e472d4cca5b3d4f01f5a8","unresolved":false,"context_lines":[{"line_number":58,"context_line":"   \u0027vcpus\u0027, \u0027memory_mb\u0027, \u0027reservation_id\u0027, \u0027launched_at\u0027,"},{"line_number":59,"context_line":"   \u0027availablility_zone\u0027, \u0027display_name\u0027, \u0027disable_terminate\u0027,"},{"line_number":60,"context_line":"   \u0027root_device_name\u0027, \u0027config_drive\u0027, \u0027auto_disk_config\u0027,"},{"line_number":61,"context_line":"   \u0027shutdown_terminate\u0027, \u0027created_at\u0027, \u0027cell_name\u0027]"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"* The sort_key whitelist for non-admin users:"},{"line_number":64,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_e980374c","line":61,"in_reply_to":"9a629dbe_05f1fa6a","updated":"2016-11-14 08:47:44.000000000","message":"Hi, thanks for the review, I totally agree on shrinking the list, but should we keep \u0027user_id\u0027, \u0027vm_state\u0027, \u0027AZ\u0027, \u0027instance_type\u0027, \u0027image_ref\u0027? It seems quite frequently used for users","commit_id":"370b608fcf64a5d7acc8983210aaecc74cf77f86"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"0b977276cb23738dfb607f77246a8e1bcff6acd2","unresolved":false,"context_lines":[{"line_number":58,"context_line":"   \u0027vcpus\u0027, \u0027memory_mb\u0027, \u0027reservation_id\u0027, \u0027launched_at\u0027,"},{"line_number":59,"context_line":"   \u0027availablility_zone\u0027, \u0027display_name\u0027, \u0027disable_terminate\u0027,"},{"line_number":60,"context_line":"   \u0027root_device_name\u0027, \u0027config_drive\u0027, \u0027auto_disk_config\u0027,"},{"line_number":61,"context_line":"   \u0027shutdown_terminate\u0027, \u0027created_at\u0027, \u0027cell_name\u0027]"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"* The sort_key whitelist for non-admin users:"},{"line_number":64,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_ccd55d43","line":61,"in_reply_to":"9a629dbe_05f1fa6a","updated":"2016-11-12 00:32:22.000000000","message":"I also agree the most of above filters we can remove. I just thought the initial fix for the query parameters is just about removing few of those parameters are super terrible, and fix them without microversion.\n\nIf we think all of them are terrible, we want to remove them without microversion. The bad thing at here is currently the API just ignore the invalid filters. That means for the user that those filters just doesn\u0027t works anymore after upgrade without any notice.\n\nBut I think this is fine for sort. We return 400 for invalid sort key. At least there is signal for the user, those sort key isn\u0027t valid anymore.","commit_id":"370b608fcf64a5d7acc8983210aaecc74cf77f86"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"efdb02d8e044f0340644d3aa23ffaa2470ae3463","unresolved":false,"context_lines":[{"line_number":66,"context_line":"   \u0027power_state\u0027, \u0027vm_state\u0027, \u0027task_state\u0027, \u0027instance_type_id\u0027,"},{"line_number":67,"context_line":"   \u0027launched_at\u0027, \u0027availablility_zone\u0027, \u0027display_name\u0027, \u0027locked\u0027,"},{"line_number":68,"context_line":"   \u0027uuid\u0027, \u0027progress\u0027, \u0027created_at\u0027, \u0027vcpus\u0027, \u0027root_gb\u0027, \u0027ephemeral_gb\u0027,"},{"line_number":69,"context_line":"   \u0027vcpus\u0027, \u0027memory_mb\u0027]"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"* The filters and sort_key whitelist for admin users will be a superset of"},{"line_number":72,"context_line":"  the non-admin whitelist and the following parameters will be appended to"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_2477f6a0","line":69,"updated":"2016-11-11 06:22:33.000000000","message":"So compare the current code, we remove the some keys we thought it only can expose to admin user and remove the joined table and remove db model object internal attribute.\n\nIt would be great we can explictly say what is changed after this proposal.","commit_id":"370b608fcf64a5d7acc8983210aaecc74cf77f86"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"69c40f81910f7534a3040eef2759fa4888643e11","unresolved":false,"context_lines":[{"line_number":66,"context_line":"   \u0027power_state\u0027, \u0027vm_state\u0027, \u0027task_state\u0027, \u0027instance_type_id\u0027,"},{"line_number":67,"context_line":"   \u0027launched_at\u0027, \u0027availablility_zone\u0027, \u0027display_name\u0027, \u0027locked\u0027,"},{"line_number":68,"context_line":"   \u0027uuid\u0027, \u0027progress\u0027, \u0027created_at\u0027, \u0027vcpus\u0027, \u0027root_gb\u0027, \u0027ephemeral_gb\u0027,"},{"line_number":69,"context_line":"   \u0027vcpus\u0027, \u0027memory_mb\u0027]"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"* The filters and sort_key whitelist for admin users will be a superset of"},{"line_number":72,"context_line":"  the non-admin whitelist and the following parameters will be appended to"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_25c27ee9","line":69,"in_reply_to":"9a629dbe_2477f6a0","updated":"2016-11-11 16:31:24.000000000","message":"I don\u0027t believe we should allow sorting on most of the above fields.\n\nI believe we should ONLY allow sorting (for the non-elasticsearch case) on fields that are currently indexed. Otherwise, this is a giant DDoS attack waiting to happen.\n\nSo, basically, that means:\n\n - project_id\n - created_at\n - uuid\n - terminated_at (NOT launched_at, since there is no index containing a left-most launched_at column)\n - reservation_id\n - host","commit_id":"370b608fcf64a5d7acc8983210aaecc74cf77f86"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"0b977276cb23738dfb607f77246a8e1bcff6acd2","unresolved":false,"context_lines":[{"line_number":66,"context_line":"   \u0027power_state\u0027, \u0027vm_state\u0027, \u0027task_state\u0027, \u0027instance_type_id\u0027,"},{"line_number":67,"context_line":"   \u0027launched_at\u0027, \u0027availablility_zone\u0027, \u0027display_name\u0027, \u0027locked\u0027,"},{"line_number":68,"context_line":"   \u0027uuid\u0027, \u0027progress\u0027, \u0027created_at\u0027, \u0027vcpus\u0027, \u0027root_gb\u0027, \u0027ephemeral_gb\u0027,"},{"line_number":69,"context_line":"   \u0027vcpus\u0027, \u0027memory_mb\u0027]"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"* The filters and sort_key whitelist for admin users will be a superset of"},{"line_number":72,"context_line":"  the non-admin whitelist and the following parameters will be appended to"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_8cb8c512","line":69,"in_reply_to":"9a629dbe_25c27ee9","updated":"2016-11-12 00:32:22.000000000","message":"I think we can shrink the list.","commit_id":"370b608fcf64a5d7acc8983210aaecc74cf77f86"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"1e116936a68e0c9e379f30f89a3e8b8ef88c06b9","unresolved":false,"context_lines":[{"line_number":66,"context_line":"   \u0027power_state\u0027, \u0027vm_state\u0027, \u0027task_state\u0027, \u0027instance_type_id\u0027,"},{"line_number":67,"context_line":"   \u0027launched_at\u0027, \u0027availablility_zone\u0027, \u0027display_name\u0027, \u0027locked\u0027,"},{"line_number":68,"context_line":"   \u0027uuid\u0027, \u0027progress\u0027, \u0027created_at\u0027, \u0027vcpus\u0027, \u0027root_gb\u0027, \u0027ephemeral_gb\u0027,"},{"line_number":69,"context_line":"   \u0027vcpus\u0027, \u0027memory_mb\u0027]"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"* The filters and sort_key whitelist for admin users will be a superset of"},{"line_number":72,"context_line":"  the non-admin whitelist and the following parameters will be appended to"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_52e1c8fd","line":69,"in_reply_to":"9a629dbe_8cb8c512","updated":"2016-11-14 10:23:51.000000000","message":"It seems the sort list should be smaller than the filter list, and ++ on ensuring its only the indexed fields. I was expecting sort and filter to be the same list, honestly.","commit_id":"370b608fcf64a5d7acc8983210aaecc74cf77f86"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"efdb02d8e044f0340644d3aa23ffaa2470ae3463","unresolved":false,"context_lines":[{"line_number":75,"context_line":"  [\u0027host_name\u0027, \u0027terminated_at\u0027, \u0027launched_on\u0027, \u0027locked_by\u0027,"},{"line_number":76,"context_line":"   \u0027vm_mode\u0027, \u0027disable_terminate\u0027, \u0027cell_name\u0027]"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"* It is also agreed that all the valid sort_key and filters query"},{"line_number":79,"context_line":"  parameters for non-admin users should have DB indexes, this spec"},{"line_number":80,"context_line":"  will also add new DB indexes if needed."},{"line_number":81,"context_line":""},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_646d6ecb","line":80,"range":{"start_line":78,"start_character":2,"end_line":80,"end_character":41},"updated":"2016-11-11 06:22:33.000000000","message":"As the discussion in the API meeting, this is looking for some feedback from Jay.","commit_id":"370b608fcf64a5d7acc8983210aaecc74cf77f86"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"69c40f81910f7534a3040eef2759fa4888643e11","unresolved":false,"context_lines":[{"line_number":75,"context_line":"  [\u0027host_name\u0027, \u0027terminated_at\u0027, \u0027launched_on\u0027, \u0027locked_by\u0027,"},{"line_number":76,"context_line":"   \u0027vm_mode\u0027, \u0027disable_terminate\u0027, \u0027cell_name\u0027]"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"* It is also agreed that all the valid sort_key and filters query"},{"line_number":79,"context_line":"  parameters for non-admin users should have DB indexes, this spec"},{"line_number":80,"context_line":"  will also add new DB indexes if needed."},{"line_number":81,"context_line":""},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_a575aecb","line":80,"range":{"start_line":78,"start_character":2,"end_line":80,"end_character":41},"in_reply_to":"9a629dbe_646d6ecb","updated":"2016-11-11 16:31:24.000000000","message":"See above. I disagree with having these additional sort fields and disagree with adding additional indexes just to support sorting on these fields.","commit_id":"370b608fcf64a5d7acc8983210aaecc74cf77f86"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"1e116936a68e0c9e379f30f89a3e8b8ef88c06b9","unresolved":false,"context_lines":[{"line_number":75,"context_line":"  [\u0027host_name\u0027, \u0027terminated_at\u0027, \u0027launched_on\u0027, \u0027locked_by\u0027,"},{"line_number":76,"context_line":"   \u0027vm_mode\u0027, \u0027disable_terminate\u0027, \u0027cell_name\u0027]"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"* It is also agreed that all the valid sort_key and filters query"},{"line_number":79,"context_line":"  parameters for non-admin users should have DB indexes, this spec"},{"line_number":80,"context_line":"  will also add new DB indexes if needed."},{"line_number":81,"context_line":""},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_b275c433","line":80,"range":{"start_line":78,"start_character":2,"end_line":80,"end_character":41},"in_reply_to":"9a629dbe_a575aecb","updated":"2016-11-14 10:23:51.000000000","message":"+1 to jay\n\nYeah, I was meaning totally the other way around.\n\nWe should reduce the list to only those with an index.\n\nIf, and only if, there are some big things missing, we should look at adding an index. We should be explicit about what those are in here.","commit_id":"370b608fcf64a5d7acc8983210aaecc74cf77f86"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"1e116936a68e0c9e379f30f89a3e8b8ef88c06b9","unresolved":false,"context_lines":[{"line_number":79,"context_line":"  parameters for non-admin users should have DB indexes, this spec"},{"line_number":80,"context_line":"  will also add new DB indexes if needed."},{"line_number":81,"context_line":""},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"Alternatives"},{"line_number":84,"context_line":"------------"},{"line_number":85,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_bde3d532","line":82,"updated":"2016-11-14 10:23:51.000000000","message":"We still seem to be missing anything about the types of each param, and the other params like paging, etc.","commit_id":"370b608fcf64a5d7acc8983210aaecc74cf77f86"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"e2b8a5910cce147926692dec4d3295251b69c213","unresolved":false,"context_lines":[{"line_number":79,"context_line":"  parameters for non-admin users should have DB indexes, this spec"},{"line_number":80,"context_line":"  will also add new DB indexes if needed."},{"line_number":81,"context_line":""},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"Alternatives"},{"line_number":84,"context_line":"------------"},{"line_number":85,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_1730159e","line":82,"in_reply_to":"9a629dbe_bde3d532","updated":"2016-11-14 14:03:59.000000000","message":"For the param types, I mean the content of the json schmea, like terminate_at is datetime thing, vm_mode is a enum with certain allowed values, host_name is a string with certain restrictions, etc.","commit_id":"370b608fcf64a5d7acc8983210aaecc74cf77f86"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"efdb02d8e044f0340644d3aa23ffaa2470ae3463","unresolved":false,"context_lines":[{"line_number":95,"context_line":""},{"line_number":96,"context_line":"A new microversion will be added to reject incorrect queries."},{"line_number":97,"context_line":"The return value of incorrect queries will be all refactored"},{"line_number":98,"context_line":"to be HTTP 400."},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"Security impact"},{"line_number":101,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_a4e0662a","line":98,"range":{"start_line":98,"start_character":0,"end_line":98,"end_character":14},"updated":"2016-11-11 06:22:33.000000000","message":"For invalid filter, we should just ignore them, this is match the behaviour as before. For the invalid sort key, we will return 400.","commit_id":"370b608fcf64a5d7acc8983210aaecc74cf77f86"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"1e116936a68e0c9e379f30f89a3e8b8ef88c06b9","unresolved":false,"context_lines":[{"line_number":95,"context_line":""},{"line_number":96,"context_line":"A new microversion will be added to reject incorrect queries."},{"line_number":97,"context_line":"The return value of incorrect queries will be all refactored"},{"line_number":98,"context_line":"to be HTTP 400."},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"Security impact"},{"line_number":101,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_fd02ad08","line":98,"range":{"start_line":98,"start_character":0,"end_line":98,"end_character":14},"in_reply_to":"9a629dbe_a4e0662a","updated":"2016-11-14 10:23:51.000000000","message":"+1\n\nThis needs to not break existing users sending additional properties that we used to ignore before.\n\nIts tempting to return 400 for stuff we know used to work, but no longer works. Lets ignore that.","commit_id":"370b608fcf64a5d7acc8983210aaecc74cf77f86"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"1f8e193d29efe33fa982ed9b74402748ae750a31","unresolved":false,"context_lines":[{"line_number":20,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"The sort and list query parameter\u0027s for `GET /servers` API are have"},{"line_number":23,"context_line":"no control in the API layer, and those query parameters are passed"},{"line_number":24,"context_line":"into the SQL query directly (the filters that can be used for"},{"line_number":25,"context_line":"non-admin users are defined)."},{"line_number":26,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a77a97e_60c19b80","line":23,"updated":"2016-11-14 22:28:57.000000000","message":"s/are have no control in/are not limited or controlled at/","commit_id":"e47e644e9d31ac5a274466e6eba68878c4b70115"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"94c71464f76a9a57d5cc1f3cbe87719300af704f","unresolved":false,"context_lines":[{"line_number":20,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"The sort and list query parameter\u0027s for `GET /servers` API are have"},{"line_number":23,"context_line":"no control in the API layer, and those query parameters are passed"},{"line_number":24,"context_line":"into the SQL query directly (the filters that can be used for"},{"line_number":25,"context_line":"non-admin users are defined)."},{"line_number":26,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a77a97e_aa4b8958","line":23,"in_reply_to":"7a77a97e_60c19b80","updated":"2016-11-15 07:22:35.000000000","message":"Done","commit_id":"e47e644e9d31ac5a274466e6eba68878c4b70115"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"04a9a7b66e3785e3dfe58918e5cea4c9b7ae579f","unresolved":false,"context_lines":[{"line_number":56,"context_line":"  appended to the non-admin users\u0027 whitelist:"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"  [\u0027project_id\u0027, \u0027created_at\u0027, \u0027uuid\u0027, \u0027terminated_at\u0027"},{"line_number":59,"context_line":"   \u0027host\u0027vcpus\u0027, \u0027cell_name\u0027]"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"* The sort_key whitelist for non-admin users:"},{"line_number":62,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a77a97e_e2cbeb1c","line":59,"updated":"2016-11-15 01:54:08.000000000","message":"s/host\u0027vcpus/host/","commit_id":"e47e644e9d31ac5a274466e6eba68878c4b70115"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"94c71464f76a9a57d5cc1f3cbe87719300af704f","unresolved":false,"context_lines":[{"line_number":56,"context_line":"  appended to the non-admin users\u0027 whitelist:"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"  [\u0027project_id\u0027, \u0027created_at\u0027, \u0027uuid\u0027, \u0027terminated_at\u0027"},{"line_number":59,"context_line":"   \u0027host\u0027vcpus\u0027, \u0027cell_name\u0027]"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"* The sort_key whitelist for non-admin users:"},{"line_number":62,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a77a97e_4b82f401","line":59,"in_reply_to":"7a77a97e_e2cbeb1c","updated":"2016-11-15 07:22:35.000000000","message":"Done","commit_id":"e47e644e9d31ac5a274466e6eba68878c4b70115"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"ed53d12ed79913352bba623fb17da70908e850fe","unresolved":false,"context_lines":[{"line_number":84,"context_line":"---------------"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"A new microversion will be added to reject incorrect queries."},{"line_number":87,"context_line":"Requests with invalid filter will be ignored them. For requests"},{"line_number":88,"context_line":"with invalid sort key, HTTP 400 will be returned."},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"Security impact"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a77a97e_5dd80cf0","line":87,"range":{"start_line":87,"start_character":0,"end_line":87,"end_character":51},"updated":"2016-11-14 22:05:49.000000000","message":"Not sure I understand. If they set a filter on \u0027foo\u0027, and \u0027foo\u0027 isn\u0027t in the whitelist, we will just ignore that? Shouldn\u0027t that also return 400?","commit_id":"e47e644e9d31ac5a274466e6eba68878c4b70115"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"1f8e193d29efe33fa982ed9b74402748ae750a31","unresolved":false,"context_lines":[{"line_number":84,"context_line":"---------------"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"A new microversion will be added to reject incorrect queries."},{"line_number":87,"context_line":"Requests with invalid filter will be ignored them. For requests"},{"line_number":88,"context_line":"with invalid sort key, HTTP 400 will be returned."},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"Security impact"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a77a97e_e0d76b21","line":87,"in_reply_to":"7a77a97e_5dd80cf0","updated":"2016-11-14 22:28:57.000000000","message":"I agree with Ed. We had a lot of discussion in the api-wg about query paremeters (keys and values) arguing back and forth between preferring success of incorrect parameters that could lead to misleading results or returning a 400 as soon as possible. We eventually decided that 400 was the right thing because that\u0027s the only way have of communicating \"you may be doing something wrong\" back to the user agent.","commit_id":"e47e644e9d31ac5a274466e6eba68878c4b70115"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"94c71464f76a9a57d5cc1f3cbe87719300af704f","unresolved":false,"context_lines":[{"line_number":84,"context_line":"---------------"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"A new microversion will be added to reject incorrect queries."},{"line_number":87,"context_line":"Requests with invalid filter will be ignored them. For requests"},{"line_number":88,"context_line":"with invalid sort key, HTTP 400 will be returned."},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"Security impact"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a77a97e_6b9ed057","line":87,"in_reply_to":"7a77a97e_5e263717","updated":"2016-11-15 07:22:35.000000000","message":"I will update the things we already agreed on first and we can get a conclusion for this later","commit_id":"e47e644e9d31ac5a274466e6eba68878c4b70115"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"ff2610daec8fadf3fe1ea8eca43ee50c1856acfa","unresolved":false,"context_lines":[{"line_number":84,"context_line":"---------------"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"A new microversion will be added to reject incorrect queries."},{"line_number":87,"context_line":"Requests with invalid filter will be ignored them. For requests"},{"line_number":88,"context_line":"with invalid sort key, HTTP 400 will be returned."},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"Security impact"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a77a97e_5e263717","line":87,"in_reply_to":"7a77a97e_e0d76b21","updated":"2016-11-15 05:59:16.000000000","message":"@Ed @Chris, yes, agree with you guys. But that will be the next step and with a new Microversion. If we return 400 without Microversion, that means break the user client code directly.","commit_id":"e47e644e9d31ac5a274466e6eba68878c4b70115"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"51f260d967a5fb1cea99f446290390a31f906db3","unresolved":false,"context_lines":[{"line_number":86,"context_line":"A new microversion will be added to reject incorrect queries."},{"line_number":87,"context_line":"Requests with invalid filter will be ignored them. For requests"},{"line_number":88,"context_line":"with invalid sort key, HTTP 400 will be returned."},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"Security impact"},{"line_number":91,"context_line":"---------------"},{"line_number":92,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a77a97e_fe64634a","line":89,"updated":"2016-11-15 06:01:12.000000000","message":"Would you like to write the final schema at here? I think it is good for review.","commit_id":"e47e644e9d31ac5a274466e6eba68878c4b70115"}]}
