)]}'
{"specs/victoria/default-volume-type-overrides.rst":[{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"aeb417bfbacd9b2a6f437adfe66241e42123743b","unresolved":false,"context_lines":[{"line_number":39,"context_line":"situation:"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"- Disabling cross AZ attachments in Nova: For deployments that don\u0027t want to do"},{"line_number":42,"context_line":"  cross AZ instance live migrations, they can disable cross AZ attachments in"},{"line_number":43,"context_line":"  Nova so the attachment to the instance fails, thus preventing performance"},{"line_number":44,"context_line":"  issues on running VMs.  This solution usually forces users to recreate the"},{"line_number":45,"context_line":"  volume in the right AZ."}],"source_content_type":"text/x-rst","patch_set":2,"id":"ff570b3c_752c94ab","line":42,"range":{"start_line":42,"start_character":2,"end_line":42,"end_character":35},"updated":"2020-06-05 14:42:05.000000000","message":"i\u0027m confused here.\nif we\u0027re talking about attaching a volume to instance in same AZ only then the conf option is cinder_cross_az_attach\u003dFalse.\ni\u0027m not sure what cross AZ instance live migration means here as IIRC cross AZ instance migrations aren\u0027t supported (if availability-zone is passed during instance creation) and i can\u0027t relate it to the cross AZ attachment topic.","commit_id":"7937517ee13bb60e3ebdce41bc2cb8870c73750f"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"e148d109e3a78a6c248a5474b216ebee197882fd","unresolved":false,"context_lines":[{"line_number":39,"context_line":"situation:"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"- Disabling cross AZ attachments in Nova: For deployments that don\u0027t want to do"},{"line_number":42,"context_line":"  cross AZ instance live migrations, they can disable cross AZ attachments in"},{"line_number":43,"context_line":"  Nova so the attachment to the instance fails, thus preventing performance"},{"line_number":44,"context_line":"  issues on running VMs.  This solution usually forces users to recreate the"},{"line_number":45,"context_line":"  volume in the right AZ."}],"source_content_type":"text/x-rst","patch_set":2,"id":"ff570b3c_8b43b9af","line":42,"range":{"start_line":42,"start_character":2,"end_line":42,"end_character":35},"in_reply_to":"ff570b3c_752c94ab","updated":"2020-06-17 11:21:44.000000000","message":"Here I\u0027m referring to the possibility of migrating the volume and the instance using it from one AZ to another.\n\nFirst you may migrate the volume, and then you migrate the instance, but for that to work I believe you need the crozz AZ attachment to be enabled.","commit_id":"7937517ee13bb60e3ebdce41bc2cb8870c73750f"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"aeb417bfbacd9b2a6f437adfe66241e42123743b","unresolved":false,"context_lines":[{"line_number":58,"context_line":"   centers where each one has its own storage array and OpenStack tenant, an"},{"line_number":59,"context_line":"   administrator wants to make sure that volumes are created in their own data"},{"line_number":60,"context_line":"   center by default.  For this purpose the admin defines a per tenant default"},{"line_number":61,"context_line":"   volume type where it that has the appropriate extra specs."},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"2. On an OpenStack deployment a tenant has access to 3 different volume types"},{"line_number":64,"context_line":"   (high performance, replicated, compressed) and since each"}],"source_content_type":"text/x-rst","patch_set":2,"id":"ff570b3c_874dbb3c","line":61,"range":{"start_line":61,"start_character":24,"end_line":61,"end_character":28},"updated":"2020-06-05 14:42:05.000000000","message":"NIT: not needed","commit_id":"7937517ee13bb60e3ebdce41bc2cb8870c73750f"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"e148d109e3a78a6c248a5474b216ebee197882fd","unresolved":false,"context_lines":[{"line_number":58,"context_line":"   centers where each one has its own storage array and OpenStack tenant, an"},{"line_number":59,"context_line":"   administrator wants to make sure that volumes are created in their own data"},{"line_number":60,"context_line":"   center by default.  For this purpose the admin defines a per tenant default"},{"line_number":61,"context_line":"   volume type where it that has the appropriate extra specs."},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"2. On an OpenStack deployment a tenant has access to 3 different volume types"},{"line_number":64,"context_line":"   (high performance, replicated, compressed) and since each"}],"source_content_type":"text/x-rst","patch_set":2,"id":"ff570b3c_0b1169ad","line":61,"range":{"start_line":61,"start_character":24,"end_line":61,"end_character":28},"in_reply_to":"ff570b3c_874dbb3c","updated":"2020-06-17 11:21:44.000000000","message":"Done","commit_id":"7937517ee13bb60e3ebdce41bc2cb8870c73750f"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"aeb417bfbacd9b2a6f437adfe66241e42123743b","unresolved":false,"context_lines":[{"line_number":65,"context_line":"   application/department has different requirements it wants to assign a"},{"line_number":66,"context_line":"   different OpenStack user with a specific volume type to each one of them."},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"3. An operator wants its users to start using a new backed for most of their"},{"line_number":69,"context_line":"   workloads by changing the default volume type, but it doesn\u0027t want to have"},{"line_number":70,"context_line":"   any downtime, so it sets the global default volume type override and just"},{"line_number":71,"context_line":"   like that the next volume that is created uses the new default."}],"source_content_type":"text/x-rst","patch_set":2,"id":"ff570b3c_d8902651","line":68,"range":{"start_line":68,"start_character":52,"end_line":68,"end_character":58},"updated":"2020-06-05 14:42:05.000000000","message":"backend?","commit_id":"7937517ee13bb60e3ebdce41bc2cb8870c73750f"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"aeb417bfbacd9b2a6f437adfe66241e42123743b","unresolved":false,"context_lines":[{"line_number":93,"context_line":"So when a user creates a new volume that has no defined volume type (explicit"},{"line_number":94,"context_line":"or in source), Cinder will look for the appropriate default first by checking"},{"line_number":95,"context_line":"if there\u0027s one for the specific user and use it, if there\u0027s not it will then"},{"line_number":96,"context_line":"check if the specific tenant has a default volume, if it doesn\u0027t it will check"},{"line_number":97,"context_line":"if there\u0027s a global default in the DB, and if there\u0027s not one it will continue"},{"line_number":98,"context_line":"like it does today, using the default type from ``cinder.conf`` or the"},{"line_number":99,"context_line":"*__DEFAULT__* volume type if it\u0027s ``None``."}],"source_content_type":"text/x-rst","patch_set":2,"id":"ff570b3c_38d8421c","line":96,"range":{"start_line":96,"start_character":43,"end_line":96,"end_character":49},"updated":"2020-06-05 14:42:05.000000000","message":"volume type","commit_id":"7937517ee13bb60e3ebdce41bc2cb8870c73750f"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"aeb417bfbacd9b2a6f437adfe66241e42123743b","unresolved":false,"context_lines":[{"line_number":222,"context_line":"    * A request without a body will return all defaults we can see.  Users can"},{"line_number":223,"context_line":"      see the global default, the tenant default, and the own user\u0027s default. A"},{"line_number":224,"context_line":"      tenant admin would see all the users defaults, and a cloud admin would"},{"line_number":225,"context_line":"      see everything.  A sample response would be:"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"      .. code-block:: json"},{"line_number":228,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"ff570b3c_bfa8b48b","line":225,"range":{"start_line":225,"start_character":10,"end_line":225,"end_character":20},"updated":"2020-06-05 14:42:05.000000000","message":"that\u0027s true actually but would it be better if we say \"the cloud admin would see all default types\"","commit_id":"7937517ee13bb60e3ebdce41bc2cb8870c73750f"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"aeb417bfbacd9b2a6f437adfe66241e42123743b","unresolved":false,"context_lines":[{"line_number":360,"context_line":"      ``project_id`` (this sorts it from more specific to more generic) and"},{"line_number":361,"context_line":"      then limited to 1 element, the one we want."},{"line_number":362,"context_line":""},{"line_number":363,"context_line":"    * Get volume types: This method returns a list with the default volume"},{"line_number":364,"context_line":"      types as requested by the provided parameters and restricted by the"},{"line_number":365,"context_line":"      current context privileges."},{"line_number":366,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"ff570b3c_3ff14496","line":363,"range":{"start_line":363,"start_character":6,"end_line":363,"end_character":22},"updated":"2020-06-05 14:42:05.000000000","message":"maybe \"Get default volume types\"","commit_id":"7937517ee13bb60e3ebdce41bc2cb8870c73750f"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"aeb417bfbacd9b2a6f437adfe66241e42123743b","unresolved":false,"context_lines":[{"line_number":374,"context_line":"      consideration there will be 3 different types of users: cloud admins,"},{"line_number":375,"context_line":"      admins, and normal users.  For global admins we won\u0027t automatically set"},{"line_number":376,"context_line":"      any of the parameters in ``kwargs``, when it\u0027s an admin we\u0027ll add the"},{"line_number":377,"context_line":"      ``tenant_id`` to match the one present in the ``context`` (failing if"},{"line_number":378,"context_line":"      it\u0027s present and different), and if it\u0027s a normal user we\u0027ll set the"},{"line_number":379,"context_line":"      ``user_id`` field to the one from the ``context``."},{"line_number":380,"context_line":""},{"line_number":381,"context_line":"  * Update ``get_default_volume_type`` to return the effective volume type for"}],"source_content_type":"text/x-rst","patch_set":2,"id":"ff570b3c_7f4d7c98","line":378,"range":{"start_line":377,"start_character":65,"end_line":378,"end_character":32},"updated":"2020-06-05 14:42:05.000000000","message":"maybe it\u0027s just me but i got it on the third read.","commit_id":"7937517ee13bb60e3ebdce41bc2cb8870c73750f"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"aeb417bfbacd9b2a6f437adfe66241e42123743b","unresolved":false,"context_lines":[{"line_number":376,"context_line":"      any of the parameters in ``kwargs``, when it\u0027s an admin we\u0027ll add the"},{"line_number":377,"context_line":"      ``tenant_id`` to match the one present in the ``context`` (failing if"},{"line_number":378,"context_line":"      it\u0027s present and different), and if it\u0027s a normal user we\u0027ll set the"},{"line_number":379,"context_line":"      ``user_id`` field to the one from the ``context``."},{"line_number":380,"context_line":""},{"line_number":381,"context_line":"  * Update ``get_default_volume_type`` to return the effective volume type for"},{"line_number":382,"context_line":"    the current tenant and user.  Basically calling the *get my default type*"}],"source_content_type":"text/x-rst","patch_set":2,"id":"ff570b3c_1f2720c9","line":379,"range":{"start_line":379,"start_character":6,"end_line":379,"end_character":55},"updated":"2020-06-05 14:42:05.000000000","message":"correct me if i\u0027m wrong but shouldn\u0027t we set tenant_id as well? if the user doesn\u0027t has any default types, it should be able to see the it\u0027s tenant\u0027s volume type?\nreferring to L#241","commit_id":"7937517ee13bb60e3ebdce41bc2cb8870c73750f"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"aeb417bfbacd9b2a6f437adfe66241e42123743b","unresolved":false,"context_lines":[{"line_number":383,"context_line":"    DB method, and if it return None, then we\u0027ll continue with the current code"},{"line_number":384,"context_line":"    we have to use the one from the config or the ``__DEFAULT__`` type if not."},{"line_number":385,"context_line":""},{"line_number":386,"context_line":"  * Updating the volume type methods to ensure we don\u0027t try to delete a volume"},{"line_number":387,"context_line":"    type that is used as a default and such operations."},{"line_number":388,"context_line":""},{"line_number":389,"context_line":"  * Update ``purge_deleted_rows`` from ``cinder.db.sqlalchemy.api`` and make"},{"line_number":390,"context_line":"    sure we delete the new table\u0027s entries before we process the"}],"source_content_type":"text/x-rst","patch_set":2,"id":"ff570b3c_9a417e0d","line":387,"range":{"start_line":386,"start_character":4,"end_line":387,"end_character":55},"updated":"2020-06-05 14:42:05.000000000","message":"IIUC, this indicates that we can only unset a default type and not use the normal volume type delete logic to delete a default type.\nhmm, this will require additional db query to know it\u0027s the default type we\u0027re trying to delete and fail but it\u0027s better to leave it to implementation.","commit_id":"7937517ee13bb60e3ebdce41bc2cb8870c73750f"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"aeb417bfbacd9b2a6f437adfe66241e42123743b","unresolved":false,"context_lines":[{"line_number":386,"context_line":"  * Updating the volume type methods to ensure we don\u0027t try to delete a volume"},{"line_number":387,"context_line":"    type that is used as a default and such operations."},{"line_number":388,"context_line":""},{"line_number":389,"context_line":"  * Update ``purge_deleted_rows`` from ``cinder.db.sqlalchemy.api`` and make"},{"line_number":390,"context_line":"    sure we delete the new table\u0027s entries before we process the"},{"line_number":391,"context_line":"    ``volume_types`` table to avoid foreign key constraint errors."},{"line_number":392,"context_line":""},{"line_number":393,"context_line":"  * Add a new API microversion and implement the 3 REST API methods."},{"line_number":394,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"ff570b3c_1a660ebc","line":391,"range":{"start_line":389,"start_character":4,"end_line":391,"end_character":66},"updated":"2020-06-05 14:42:05.000000000","message":"i think we currently have this logic to sort tables according to foreign key dependency while purging, atleast that was true when i checked a while back.\nhttps://github.com/openstack/cinder/blob/master/cinder/db/sqlalchemy/api.py#L6597","commit_id":"7937517ee13bb60e3ebdce41bc2cb8870c73750f"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"e148d109e3a78a6c248a5474b216ebee197882fd","unresolved":false,"context_lines":[{"line_number":386,"context_line":"  * Updating the volume type methods to ensure we don\u0027t try to delete a volume"},{"line_number":387,"context_line":"    type that is used as a default and such operations."},{"line_number":388,"context_line":""},{"line_number":389,"context_line":"  * Update ``purge_deleted_rows`` from ``cinder.db.sqlalchemy.api`` and make"},{"line_number":390,"context_line":"    sure we delete the new table\u0027s entries before we process the"},{"line_number":391,"context_line":"    ``volume_types`` table to avoid foreign key constraint errors."},{"line_number":392,"context_line":""},{"line_number":393,"context_line":"  * Add a new API microversion and implement the 3 REST API methods."},{"line_number":394,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"ff570b3c_7d6b8c84","line":391,"range":{"start_line":389,"start_character":4,"end_line":391,"end_character":66},"in_reply_to":"ff570b3c_1a660ebc","updated":"2020-06-17 11:21:44.000000000","message":"Doesn\u0027t matter anymore since we are going in another direction, but it \"should\" work, since we use metadata.sorted_tables that sort the tables in order of foreign key dependency, but I saw that we have some explicit code for QoS [1], so I wanted to be sure we didn\u0027t mess up.\n\n[1]: https://github.com/openstack/cinder/blob/1082f090914c173bebbb92a4fa65aa3631c7c2fa/cinder/db/sqlalchemy/api.py#L6606-L6613","commit_id":"7937517ee13bb60e3ebdce41bc2cb8870c73750f"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"25c272f78bed7593c75177b367ed1723348feef6","unresolved":false,"context_lines":[{"line_number":8,"context_line":"Default volume type overrides"},{"line_number":9,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Include the URL of your launchpad blueprint:"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"https://blueprints.launchpad.net/cinder/+spec/multiple-default-volume-types"},{"line_number":14,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"ff570b3c_3803d775","line":11,"range":{"start_line":11,"start_character":0,"end_line":11,"end_character":44},"updated":"2020-06-10 16:34:54.000000000","message":"i\u0027m not sure but do we write this?","commit_id":"cca6fddad5bc519241533aff6f4d6c42caa55146"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"e148d109e3a78a6c248a5474b216ebee197882fd","unresolved":false,"context_lines":[{"line_number":8,"context_line":"Default volume type overrides"},{"line_number":9,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Include the URL of your launchpad blueprint:"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"https://blueprints.launchpad.net/cinder/+spec/multiple-default-volume-types"},{"line_number":14,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"bf51134e_cdf018cd","line":11,"range":{"start_line":11,"start_character":0,"end_line":11,"end_character":44},"in_reply_to":"ff570b3c_3803d775","updated":"2020-06-17 11:21:44.000000000","message":"lol, no I just forgot to remove it","commit_id":"cca6fddad5bc519241533aff6f4d6c42caa55146"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"25c272f78bed7593c75177b367ed1723348feef6","unresolved":false,"context_lines":[{"line_number":15,"context_line":"Cinder\u0027s current default volume type options are limited and are insufficient"},{"line_number":16,"context_line":"for big and/or complex deployments."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"This spec proposes adding more possibilities such as per project and per user"},{"line_number":19,"context_line":"volume types."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Problem description"}],"source_content_type":"text/x-rst","patch_set":3,"id":"ff570b3c_585a0b83","line":18,"range":{"start_line":18,"start_character":65,"end_line":18,"end_character":77},"updated":"2020-06-10 16:34:54.000000000","message":"this isn\u0027t true anymore :/","commit_id":"cca6fddad5bc519241533aff6f4d6c42caa55146"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"e148d109e3a78a6c248a5474b216ebee197882fd","unresolved":false,"context_lines":[{"line_number":15,"context_line":"Cinder\u0027s current default volume type options are limited and are insufficient"},{"line_number":16,"context_line":"for big and/or complex deployments."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"This spec proposes adding more possibilities such as per project and per user"},{"line_number":19,"context_line":"volume types."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Problem description"}],"source_content_type":"text/x-rst","patch_set":3,"id":"bf51134e_0dbcd0da","line":18,"range":{"start_line":18,"start_character":65,"end_line":18,"end_character":77},"in_reply_to":"ff570b3c_585a0b83","updated":"2020-06-17 11:21:44.000000000","message":"Done","commit_id":"cca6fddad5bc519241533aff6f4d6c42caa55146"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"25c272f78bed7593c75177b367ed1723348feef6","unresolved":false,"context_lines":[{"line_number":39,"context_line":"situation:"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"- Disabling cross AZ attachments in Nova: For deployments that don\u0027t want to do"},{"line_number":42,"context_line":"  cross AZ instance live migrations, they can disable cross AZ attachments in"},{"line_number":43,"context_line":"  Nova so the attachment to the instance fails, thus preventing performance"},{"line_number":44,"context_line":"  issues on running VMs.  This solution usually forces users to recreate the"},{"line_number":45,"context_line":"  volume in the right AZ."}],"source_content_type":"text/x-rst","patch_set":3,"id":"ff570b3c_d8e45b3f","line":42,"range":{"start_line":42,"start_character":2,"end_line":42,"end_character":35},"updated":"2020-06-10 16:34:54.000000000","message":"can you clarify my comment on the previous PS?","commit_id":"cca6fddad5bc519241533aff6f4d6c42caa55146"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"e148d109e3a78a6c248a5474b216ebee197882fd","unresolved":false,"context_lines":[{"line_number":39,"context_line":"situation:"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"- Disabling cross AZ attachments in Nova: For deployments that don\u0027t want to do"},{"line_number":42,"context_line":"  cross AZ instance live migrations, they can disable cross AZ attachments in"},{"line_number":43,"context_line":"  Nova so the attachment to the instance fails, thus preventing performance"},{"line_number":44,"context_line":"  issues on running VMs.  This solution usually forces users to recreate the"},{"line_number":45,"context_line":"  volume in the right AZ."}],"source_content_type":"text/x-rst","patch_set":3,"id":"bf51134e_4dab6888","line":42,"range":{"start_line":42,"start_character":2,"end_line":42,"end_character":35},"in_reply_to":"ff570b3c_d8e45b3f","updated":"2020-06-17 11:21:44.000000000","message":"Thanks for the reminder, my reply has been sitting as draft since the 9th.  :-(","commit_id":"cca6fddad5bc519241533aff6f4d6c42caa55146"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"25c272f78bed7593c75177b367ed1723348feef6","unresolved":false,"context_lines":[{"line_number":73,"context_line":"Volume Type on a per tenant basis to make it easier to manage complex"},{"line_number":74,"context_line":"deployments."},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"With the introduction of this new default volume types, we\u0027ll now have 3"},{"line_number":77,"context_line":"different default volume types.  From more specific to more generic these are:"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"- Per tenant"}],"source_content_type":"text/x-rst","patch_set":3,"id":"ff570b3c_e77edead","line":76,"range":{"start_line":76,"start_character":25,"end_line":76,"end_character":54},"updated":"2020-06-10 16:34:54.000000000","message":"Since this is dynamic and we don\u0027t exactly know how many volume types will be created, it will be better to not reference it as volume type?\nmaybe,\n`this new default volume type configuration`","commit_id":"cca6fddad5bc519241533aff6f4d6c42caa55146"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"e148d109e3a78a6c248a5474b216ebee197882fd","unresolved":false,"context_lines":[{"line_number":73,"context_line":"Volume Type on a per tenant basis to make it easier to manage complex"},{"line_number":74,"context_line":"deployments."},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"With the introduction of this new default volume types, we\u0027ll now have 3"},{"line_number":77,"context_line":"different default volume types.  From more specific to more generic these are:"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"- Per tenant"}],"source_content_type":"text/x-rst","patch_set":3,"id":"bf51134e_4db248e8","line":76,"range":{"start_line":76,"start_character":25,"end_line":76,"end_character":54},"in_reply_to":"ff570b3c_e77edead","updated":"2020-06-17 11:21:44.000000000","message":"Done","commit_id":"cca6fddad5bc519241533aff6f4d6c42caa55146"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"25c272f78bed7593c75177b367ed1723348feef6","unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":"So when a user creates a new volume that has no defined volume type (explicit"},{"line_number":84,"context_line":"or in the source), Cinder will look for the appropriate default first by"},{"line_number":85,"context_line":"checking if there\u0027s one defined for n the DB for the specific tenant and use"},{"line_number":86,"context_line":"it, if there isn\u0027t one\u0027, it will continue like it does today, using the default"},{"line_number":87,"context_line":"type from ``cinder.conf`` or the *__DEFAULT__* volume type if it\u0027s ``None``."},{"line_number":88,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"ff570b3c_8a3ba9c6","line":85,"range":{"start_line":85,"start_character":32,"end_line":85,"end_character":44},"updated":"2020-06-10 16:34:54.000000000","message":"in the DB","commit_id":"cca6fddad5bc519241533aff6f4d6c42caa55146"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"e148d109e3a78a6c248a5474b216ebee197882fd","unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":"So when a user creates a new volume that has no defined volume type (explicit"},{"line_number":84,"context_line":"or in the source), Cinder will look for the appropriate default first by"},{"line_number":85,"context_line":"checking if there\u0027s one defined for n the DB for the specific tenant and use"},{"line_number":86,"context_line":"it, if there isn\u0027t one\u0027, it will continue like it does today, using the default"},{"line_number":87,"context_line":"type from ``cinder.conf`` or the *__DEFAULT__* volume type if it\u0027s ``None``."},{"line_number":88,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"bf51134e_8dcbc051","line":85,"range":{"start_line":85,"start_character":32,"end_line":85,"end_character":44},"in_reply_to":"ff570b3c_8a3ba9c6","updated":"2020-06-17 11:21:44.000000000","message":"Done","commit_id":"cca6fddad5bc519241533aff6f4d6c42caa55146"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"25c272f78bed7593c75177b367ed1723348feef6","unresolved":false,"context_lines":[{"line_number":83,"context_line":"So when a user creates a new volume that has no defined volume type (explicit"},{"line_number":84,"context_line":"or in the source), Cinder will look for the appropriate default first by"},{"line_number":85,"context_line":"checking if there\u0027s one defined for n the DB for the specific tenant and use"},{"line_number":86,"context_line":"it, if there isn\u0027t one\u0027, it will continue like it does today, using the default"},{"line_number":87,"context_line":"type from ``cinder.conf`` or the *__DEFAULT__* volume type if it\u0027s ``None``."},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"Administrators and users must still be careful with the normal Cinder behavior"}],"source_content_type":"text/x-rst","patch_set":3,"id":"ff570b3c_ca45a145","line":86,"range":{"start_line":86,"start_character":22,"end_line":86,"end_character":23},"updated":"2020-06-10 16:34:54.000000000","message":"typo?","commit_id":"cca6fddad5bc519241533aff6f4d6c42caa55146"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"e148d109e3a78a6c248a5474b216ebee197882fd","unresolved":false,"context_lines":[{"line_number":83,"context_line":"So when a user creates a new volume that has no defined volume type (explicit"},{"line_number":84,"context_line":"or in the source), Cinder will look for the appropriate default first by"},{"line_number":85,"context_line":"checking if there\u0027s one defined for n the DB for the specific tenant and use"},{"line_number":86,"context_line":"it, if there isn\u0027t one\u0027, it will continue like it does today, using the default"},{"line_number":87,"context_line":"type from ``cinder.conf`` or the *__DEFAULT__* volume type if it\u0027s ``None``."},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"Administrators and users must still be careful with the normal Cinder behavior"}],"source_content_type":"text/x-rst","patch_set":3,"id":"bf51134e_6dc8ec54","line":86,"range":{"start_line":86,"start_character":22,"end_line":86,"end_character":23},"in_reply_to":"ff570b3c_ca45a145","updated":"2020-06-17 11:21:44.000000000","message":"Done","commit_id":"cca6fddad5bc519241533aff6f4d6c42caa55146"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"25c272f78bed7593c75177b367ed1723348feef6","unresolved":false,"context_lines":[{"line_number":97,"context_line":"- Create a volume from an image that has ``cinder_img_volume_type`` defined in"},{"line_number":98,"context_line":"  its metadata."},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"By default the policy restricting access to set, delete, or get, tenant default"},{"line_number":101,"context_line":"volume type will be set to admins only."},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":3,"id":"ff570b3c_aa678dea","line":100,"range":{"start_line":100,"start_character":63,"end_line":100,"end_character":64},"updated":"2020-06-10 16:34:54.000000000","message":"typo?","commit_id":"cca6fddad5bc519241533aff6f4d6c42caa55146"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"e148d109e3a78a6c248a5474b216ebee197882fd","unresolved":false,"context_lines":[{"line_number":97,"context_line":"- Create a volume from an image that has ``cinder_img_volume_type`` defined in"},{"line_number":98,"context_line":"  its metadata."},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"By default the policy restricting access to set, delete, or get, tenant default"},{"line_number":101,"context_line":"volume type will be set to admins only."},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":3,"id":"bf51134e_4de7e8e5","line":100,"range":{"start_line":100,"start_character":63,"end_line":100,"end_character":64},"in_reply_to":"ff570b3c_aa678dea","updated":"2020-06-17 11:21:44.000000000","message":"Done","commit_id":"cca6fddad5bc519241533aff6f4d6c42caa55146"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"25c272f78bed7593c75177b367ed1723348feef6","unresolved":false,"context_lines":[{"line_number":132,"context_line":""},{"line_number":133,"context_line":"We\u0027ll need a new set of REST API calls to provide the CRUD operations:"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"* Set the default volume type (create or update) for everyone, for a specific"},{"line_number":136,"context_line":"  tenant."},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"  Besides ensuring that the volume type exists and the tenant has access to it,"}],"source_content_type":"text/x-rst","patch_set":3,"id":"ff570b3c_1961b512","line":135,"range":{"start_line":135,"start_character":49,"end_line":135,"end_character":62},"updated":"2020-06-10 16:34:54.000000000","message":"i think it is only for a specific tenant now","commit_id":"cca6fddad5bc519241533aff6f4d6c42caa55146"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"e148d109e3a78a6c248a5474b216ebee197882fd","unresolved":false,"context_lines":[{"line_number":132,"context_line":""},{"line_number":133,"context_line":"We\u0027ll need a new set of REST API calls to provide the CRUD operations:"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"* Set the default volume type (create or update) for everyone, for a specific"},{"line_number":136,"context_line":"  tenant."},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"  Besides ensuring that the volume type exists and the tenant has access to it,"}],"source_content_type":"text/x-rst","patch_set":3,"id":"bf51134e_2dec34c6","line":135,"range":{"start_line":135,"start_character":49,"end_line":135,"end_character":62},"in_reply_to":"ff570b3c_1961b512","updated":"2020-06-17 11:21:44.000000000","message":"Done","commit_id":"cca6fddad5bc519241533aff6f4d6c42caa55146"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"25c272f78bed7593c75177b367ed1723348feef6","unresolved":false,"context_lines":[{"line_number":177,"context_line":"               \"type_name\": \"tenant_default_type\""},{"line_number":178,"context_line":"             },"},{"line_number":179,"context_line":"             {"},{"line_number":180,"context_line":"               \"tenant_id\": \"248592b4-a6da-4c4c-abe0-9d8dbe0b74b4\","},{"line_number":181,"context_line":"               \"type_name\": \"other_default_type\""},{"line_number":182,"context_line":"             }"},{"line_number":183,"context_line":"         ]"}],"source_content_type":"text/x-rst","patch_set":3,"id":"ff570b3c_eaeea5eb","line":180,"range":{"start_line":180,"start_character":29,"end_line":180,"end_character":65},"updated":"2020-06-10 16:34:54.000000000","message":"i understand this is for explanation purpose but this seems to be stating that one tenant can have more than one default type (which isn\u0027t true?).\ncan we use a different tenant id here? (any random UUID apart from the above one)","commit_id":"cca6fddad5bc519241533aff6f4d6c42caa55146"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"e148d109e3a78a6c248a5474b216ebee197882fd","unresolved":false,"context_lines":[{"line_number":177,"context_line":"               \"type_name\": \"tenant_default_type\""},{"line_number":178,"context_line":"             },"},{"line_number":179,"context_line":"             {"},{"line_number":180,"context_line":"               \"tenant_id\": \"248592b4-a6da-4c4c-abe0-9d8dbe0b74b4\","},{"line_number":181,"context_line":"               \"type_name\": \"other_default_type\""},{"line_number":182,"context_line":"             }"},{"line_number":183,"context_line":"         ]"}],"source_content_type":"text/x-rst","patch_set":3,"id":"bf51134e_0d069087","line":180,"range":{"start_line":180,"start_character":29,"end_line":180,"end_character":65},"in_reply_to":"ff570b3c_eaeea5eb","updated":"2020-06-17 11:21:44.000000000","message":"Done","commit_id":"cca6fddad5bc519241533aff6f4d6c42caa55146"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"25c272f78bed7593c75177b367ed1723348feef6","unresolved":false,"context_lines":[{"line_number":240,"context_line":"Developer impact"},{"line_number":241,"context_line":"----------------"},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"We should no longer refer directly to the ``default_volume_type`` configuration"},{"line_number":244,"context_line":"option throughout the code and instead use the ``get_default_volume_type``"},{"line_number":245,"context_line":"method from ``cinder.volume.volume_types``.  But this is something that we"},{"line_number":246,"context_line":"should already be doing after we introduced the ``__DEFAULT__`` volume type."},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"Implementation"},{"line_number":249,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"ff570b3c_cb748001","line":246,"range":{"start_line":243,"start_character":0,"end_line":246,"end_character":76},"updated":"2020-06-10 16:34:54.000000000","message":"i think there\u0027s only one occurrence we\u0027ve left that I\u0027ve made a comment about changing so we\u0027re good on this\nhttps://review.opendev.org/#/c/730183/6/cinder/volume/flows/api/create_volume.py@370","commit_id":"cca6fddad5bc519241533aff6f4d6c42caa55146"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"e148d109e3a78a6c248a5474b216ebee197882fd","unresolved":false,"context_lines":[{"line_number":240,"context_line":"Developer impact"},{"line_number":241,"context_line":"----------------"},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"We should no longer refer directly to the ``default_volume_type`` configuration"},{"line_number":244,"context_line":"option throughout the code and instead use the ``get_default_volume_type``"},{"line_number":245,"context_line":"method from ``cinder.volume.volume_types``.  But this is something that we"},{"line_number":246,"context_line":"should already be doing after we introduced the ``__DEFAULT__`` volume type."},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"Implementation"},{"line_number":249,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"bf51134e_4d352846","line":246,"range":{"start_line":243,"start_character":0,"end_line":246,"end_character":76},"in_reply_to":"ff570b3c_cb748001","updated":"2020-06-17 11:21:44.000000000","message":"I think it\u0027s still worth mentioning it here.","commit_id":"cca6fddad5bc519241533aff6f4d6c42caa55146"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"25c272f78bed7593c75177b367ed1723348feef6","unresolved":false,"context_lines":[{"line_number":264,"context_line":"  * Add 3 DB layer methods:"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    * Set default volume type: Given a volume type id and a tenant id this"},{"line_number":267,"context_line":"      method sets the its default volume type."},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"      It will try to update the ``volume_type_id`` for the ``project_id`` and"},{"line_number":270,"context_line":"      if it fails because the row doesn\u0027t exist, then it will create the DB"}],"source_content_type":"text/x-rst","patch_set":3,"id":"ff570b3c_8110a751","line":267,"range":{"start_line":267,"start_character":18,"end_line":267,"end_character":25},"updated":"2020-06-10 16:34:54.000000000","message":"NIT: one of these is not needed\nsets it\u0027s default volume type\nOR\nsets the default volume type for that tenant","commit_id":"cca6fddad5bc519241533aff6f4d6c42caa55146"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"e148d109e3a78a6c248a5474b216ebee197882fd","unresolved":false,"context_lines":[{"line_number":264,"context_line":"  * Add 3 DB layer methods:"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    * Set default volume type: Given a volume type id and a tenant id this"},{"line_number":267,"context_line":"      method sets the its default volume type."},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"      It will try to update the ``volume_type_id`` for the ``project_id`` and"},{"line_number":270,"context_line":"      if it fails because the row doesn\u0027t exist, then it will create the DB"}],"source_content_type":"text/x-rst","patch_set":3,"id":"bf51134e_ad45e4b5","line":267,"range":{"start_line":267,"start_character":18,"end_line":267,"end_character":25},"in_reply_to":"ff570b3c_8110a751","updated":"2020-06-17 11:21:44.000000000","message":"Done","commit_id":"cca6fddad5bc519241533aff6f4d6c42caa55146"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"25c272f78bed7593c75177b367ed1723348feef6","unresolved":false,"context_lines":[{"line_number":352,"context_line":"  * Create 2 custom volume types: #1 and #2"},{"line_number":353,"context_line":"  * Set default volume type #1 for tenant and #2 for alternative tenant."},{"line_number":354,"context_line":"  * Admin lists all default volume type and validates them."},{"line_number":355,"context_line":"  * Admin delete the default for the alternative tenant and list the defaults."},{"line_number":356,"context_line":"  * Then does the same thing for the normal tenant\u0027s default."},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"Documentation Impact"}],"source_content_type":"text/x-rst","patch_set":3,"id":"ff570b3c_645ac150","line":355,"range":{"start_line":355,"start_character":10,"end_line":355,"end_character":28},"updated":"2020-06-10 16:34:54.000000000","message":"you mean unset here right?\nfrom L#285, i have the idea that if a volume type is set as default we can\u0027t delete it and first we\u0027ve to unset it.","commit_id":"cca6fddad5bc519241533aff6f4d6c42caa55146"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"25c272f78bed7593c75177b367ed1723348feef6","unresolved":false,"context_lines":[{"line_number":366,"context_line":"``doc/source/configuration/index.rst`` since it is part of the configuration"},{"line_number":367,"context_line":"but it\u0027s also an administrative task."},{"line_number":368,"context_line":""},{"line_number":369,"context_line":"The new CLI comments will be listed and explained in"},{"line_number":370,"context_line":"``doc/source/cli/cli-manage-volumes.rst`` with examples of the new CLI"},{"line_number":371,"context_line":"commands."},{"line_number":372,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"ff570b3c_18825353","line":369,"range":{"start_line":369,"start_character":12,"end_line":369,"end_character":20},"updated":"2020-06-10 16:34:54.000000000","message":"commands?","commit_id":"cca6fddad5bc519241533aff6f4d6c42caa55146"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"aabd7d8a6c8b3d04e0e0ee1188941f98caaf5b20","unresolved":false,"context_lines":[{"line_number":349,"context_line":"  * Create 2 custom volume types: #1 and #2"},{"line_number":350,"context_line":"  * Set default volume type #1 for project and #2 for alternative project."},{"line_number":351,"context_line":"  * Admin lists all default volume type and validates them."},{"line_number":352,"context_line":"  * Admin delete the default for the alternative project and list the defaults."},{"line_number":353,"context_line":"  * Then does the same thing for the normal project\u0027s default."},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"Documentation Impact"}],"source_content_type":"text/x-rst","patch_set":4,"id":"bf51134e_c392a7f6","line":352,"range":{"start_line":352,"start_character":10,"end_line":352,"end_character":28},"updated":"2020-06-18 07:46:25.000000000","message":"comment from previous patchset","commit_id":"c30117536b9dcf6e2d2ff1ec0d3486af10ea5c8a"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"0460b98c053b5fdd59c8aeffd4737549523ea94d","unresolved":false,"context_lines":[{"line_number":349,"context_line":"  * Create 2 custom volume types: #1 and #2"},{"line_number":350,"context_line":"  * Set default volume type #1 for project and #2 for alternative project."},{"line_number":351,"context_line":"  * Admin lists all default volume type and validates them."},{"line_number":352,"context_line":"  * Admin delete the default for the alternative project and list the defaults."},{"line_number":353,"context_line":"  * Then does the same thing for the normal project\u0027s default."},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"Documentation Impact"}],"source_content_type":"text/x-rst","patch_set":4,"id":"bf51134e_6b7de26c","line":352,"range":{"start_line":352,"start_character":10,"end_line":352,"end_character":28},"in_reply_to":"bf51134e_c392a7f6","updated":"2020-06-25 11:05:02.000000000","message":"Done","commit_id":"c30117536b9dcf6e2d2ff1ec0d3486af10ea5c8a"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"aabd7d8a6c8b3d04e0e0ee1188941f98caaf5b20","unresolved":false,"context_lines":[{"line_number":363,"context_line":"``doc/source/configuration/index.rst`` since it is part of the configuration"},{"line_number":364,"context_line":"but it\u0027s also an administrative task."},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"The new CLI comments will be listed and explained in"},{"line_number":367,"context_line":"``doc/source/cli/cli-manage-volumes.rst`` with examples of the new CLI"},{"line_number":368,"context_line":"commands."},{"line_number":369,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"bf51134e_a38fb3ca","line":366,"range":{"start_line":366,"start_character":12,"end_line":366,"end_character":20},"updated":"2020-06-18 07:46:25.000000000","message":"comment from previous patchset","commit_id":"c30117536b9dcf6e2d2ff1ec0d3486af10ea5c8a"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"0460b98c053b5fdd59c8aeffd4737549523ea94d","unresolved":false,"context_lines":[{"line_number":363,"context_line":"``doc/source/configuration/index.rst`` since it is part of the configuration"},{"line_number":364,"context_line":"but it\u0027s also an administrative task."},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"The new CLI comments will be listed and explained in"},{"line_number":367,"context_line":"``doc/source/cli/cli-manage-volumes.rst`` with examples of the new CLI"},{"line_number":368,"context_line":"commands."},{"line_number":369,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"bf51134e_ab9a5ab5","line":366,"range":{"start_line":366,"start_character":12,"end_line":366,"end_character":20},"in_reply_to":"bf51134e_a38fb3ca","updated":"2020-06-25 11:05:02.000000000","message":"Done","commit_id":"c30117536b9dcf6e2d2ff1ec0d3486af10ea5c8a"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"b0a016ab85af053c34e6c0028f1640a8f1fb7f26","unresolved":false,"context_lines":[{"line_number":13,"context_line":"Cinder\u0027s current default volume type options are limited and are insufficient"},{"line_number":14,"context_line":"for big and/or complex deployments."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This spec proposes adding a per project volume types."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Problem description"},{"line_number":19,"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":6,"id":"bf51134e_9e5a0f80","line":16,"range":{"start_line":16,"start_character":26,"end_line":16,"end_character":27},"updated":"2020-06-28 18:08:24.000000000","message":"nit: don\u0027t need this \u0027a\u0027","commit_id":"f4143518d0afae83f0d9b3dbbb1e6be6ce96eb6c"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"e47ec68b5db3fb269d9aa8defff09f2c3e301230","unresolved":false,"context_lines":[{"line_number":13,"context_line":"Cinder\u0027s current default volume type options are limited and are insufficient"},{"line_number":14,"context_line":"for big and/or complex deployments."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This spec proposes adding a per project volume types."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Problem description"},{"line_number":19,"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":6,"id":"bf51134e_e5e54fde","line":16,"range":{"start_line":16,"start_character":26,"end_line":16,"end_character":27},"in_reply_to":"bf51134e_9e5a0f80","updated":"2020-07-01 14:17:27.000000000","message":"Done","commit_id":"f4143518d0afae83f0d9b3dbbb1e6be6ce96eb6c"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"3bb8a9f8a3c0190188b8be15428a4ee6ce983cbd","unresolved":false,"context_lines":[{"line_number":80,"context_line":""},{"line_number":81,"context_line":"So when a user creates a new volume that has no defined volume type (explicit"},{"line_number":82,"context_line":"or in the source), Cinder will look for the appropriate default first by"},{"line_number":83,"context_line":"checking if there\u0027s one defined for in the DB for the specific project and use"},{"line_number":84,"context_line":"it, if there isn\u0027t one, it will continue like it does today, using the default"},{"line_number":85,"context_line":"type from ``cinder.conf`` or the *__DEFAULT__* volume type if it\u0027s ``None``."},{"line_number":86,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"bf51134e_e939f0a3","line":83,"range":{"start_line":83,"start_character":32,"end_line":83,"end_character":35},"updated":"2020-06-25 21:37:27.000000000","message":"remove \u0027for\u0027","commit_id":"f4143518d0afae83f0d9b3dbbb1e6be6ce96eb6c"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"e47ec68b5db3fb269d9aa8defff09f2c3e301230","unresolved":false,"context_lines":[{"line_number":80,"context_line":""},{"line_number":81,"context_line":"So when a user creates a new volume that has no defined volume type (explicit"},{"line_number":82,"context_line":"or in the source), Cinder will look for the appropriate default first by"},{"line_number":83,"context_line":"checking if there\u0027s one defined for in the DB for the specific project and use"},{"line_number":84,"context_line":"it, if there isn\u0027t one, it will continue like it does today, using the default"},{"line_number":85,"context_line":"type from ``cinder.conf`` or the *__DEFAULT__* volume type if it\u0027s ``None``."},{"line_number":86,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"bf51134e_25cf4758","line":83,"range":{"start_line":83,"start_character":32,"end_line":83,"end_character":35},"in_reply_to":"bf51134e_e939f0a3","updated":"2020-07-01 14:17:27.000000000","message":"Done","commit_id":"f4143518d0afae83f0d9b3dbbb1e6be6ce96eb6c"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"cddbeb3758ad04fa7fd43c2063740c9c8df2cf82","unresolved":false,"context_lines":[{"line_number":94,"context_line":"- Clone a volume"},{"line_number":95,"context_line":"- Create a volume from an image that has ``cinder_img_volume_type`` defined in"},{"line_number":96,"context_line":"  its metadata."},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"By default the policy restricting access to set, delete, or get project default"},{"line_number":99,"context_line":"volume type will be set to admins only, and those admins can only manage"},{"line_number":100,"context_line":"projects belonging to their project\u0027s descendants hierarchy as described in the"}],"source_content_type":"text/x-rst","patch_set":6,"id":"bf51134e_6a010eb0","line":97,"updated":"2020-07-01 13:39:09.000000000","message":"we can add if we want to mention all cases\n- Provide volume type while creating a volume\n\nbut it\u0027s already mentioned above that if it\u0027s in request so it\u0027s a choice.","commit_id":"f4143518d0afae83f0d9b3dbbb1e6be6ce96eb6c"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"e47ec68b5db3fb269d9aa8defff09f2c3e301230","unresolved":false,"context_lines":[{"line_number":94,"context_line":"- Clone a volume"},{"line_number":95,"context_line":"- Create a volume from an image that has ``cinder_img_volume_type`` defined in"},{"line_number":96,"context_line":"  its metadata."},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"By default the policy restricting access to set, delete, or get project default"},{"line_number":99,"context_line":"volume type will be set to admins only, and those admins can only manage"},{"line_number":100,"context_line":"projects belonging to their project\u0027s descendants hierarchy as described in the"}],"source_content_type":"text/x-rst","patch_set":6,"id":"bf51134e_65d93f21","line":97,"in_reply_to":"bf51134e_6a010eb0","updated":"2020-07-01 14:17:27.000000000","message":"Done","commit_id":"f4143518d0afae83f0d9b3dbbb1e6be6ce96eb6c"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"cddbeb3758ad04fa7fd43c2063740c9c8df2cf82","unresolved":false,"context_lines":[{"line_number":137,"context_line":"  Besides ensuring that the volume type exists and the project has access to"},{"line_number":138,"context_line":"  it, this method will also call keystone to validate that the project exists."},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"  * PUT /v3/default-type-override"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    * JSON body to set default type for a project:"},{"line_number":143,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"bf51134e_6ac8ee73","line":140,"range":{"start_line":140,"start_character":12,"end_line":140,"end_character":33},"updated":"2020-07-01 13:39:09.000000000","message":"with my conversation with Brian, i think /default-types is more preferable ? which I\u0027ve used in my implementation.\nBut we can change spec later w.r.t. review comments on the implementation.","commit_id":"f4143518d0afae83f0d9b3dbbb1e6be6ce96eb6c"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"e47ec68b5db3fb269d9aa8defff09f2c3e301230","unresolved":false,"context_lines":[{"line_number":137,"context_line":"  Besides ensuring that the volume type exists and the project has access to"},{"line_number":138,"context_line":"  it, this method will also call keystone to validate that the project exists."},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"  * PUT /v3/default-type-override"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    * JSON body to set default type for a project:"},{"line_number":143,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"bf51134e_25f8e77a","line":140,"range":{"start_line":140,"start_character":12,"end_line":140,"end_character":33},"in_reply_to":"bf51134e_6ac8ee73","updated":"2020-07-01 14:17:27.000000000","message":"Done","commit_id":"f4143518d0afae83f0d9b3dbbb1e6be6ce96eb6c"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"cddbeb3758ad04fa7fd43c2063740c9c8df2cf82","unresolved":false,"context_lines":[{"line_number":145,"context_line":""},{"line_number":146,"context_line":"         {"},{"line_number":147,"context_line":"           \"project_id\": \"248592b4-a6da-4c4c-abe0-9d8dbe0b74b4\","},{"line_number":148,"context_line":"           \"type_name\": \"lvm\""},{"line_number":149,"context_line":"         }"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"* Unset a default volume type.  It won\u0027t fail even if there is not a default"}],"source_content_type":"text/x-rst","patch_set":6,"id":"bf51134e_6aabce74","line":148,"range":{"start_line":148,"start_character":12,"end_line":148,"end_character":21},"updated":"2020-07-01 13:39:09.000000000","message":"as it can be a name or id, I\u0027ve named it `volume_type`","commit_id":"f4143518d0afae83f0d9b3dbbb1e6be6ce96eb6c"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"e47ec68b5db3fb269d9aa8defff09f2c3e301230","unresolved":false,"context_lines":[{"line_number":145,"context_line":""},{"line_number":146,"context_line":"         {"},{"line_number":147,"context_line":"           \"project_id\": \"248592b4-a6da-4c4c-abe0-9d8dbe0b74b4\","},{"line_number":148,"context_line":"           \"type_name\": \"lvm\""},{"line_number":149,"context_line":"         }"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"* Unset a default volume type.  It won\u0027t fail even if there is not a default"}],"source_content_type":"text/x-rst","patch_set":6,"id":"bf51134e_6062cdda","line":148,"range":{"start_line":148,"start_character":12,"end_line":148,"end_character":21},"in_reply_to":"bf51134e_6aabce74","updated":"2020-07-01 14:17:27.000000000","message":"My original idea was to only accept names, because iirc we cannot have duplicated type names anyway.","commit_id":"f4143518d0afae83f0d9b3dbbb1e6be6ce96eb6c"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"cddbeb3758ad04fa7fd43c2063740c9c8df2cf82","unresolved":false,"context_lines":[{"line_number":151,"context_line":"* Unset a default volume type.  It won\u0027t fail even if there is not a default"},{"line_number":152,"context_line":"  volume type."},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"  * DELETE /v3/default-type-override"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    * JSON body to remove the default type for a project:"},{"line_number":157,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"bf51134e_8abbc2c2","line":154,"range":{"start_line":154,"start_character":11,"end_line":154,"end_character":36},"updated":"2020-07-01 13:39:09.000000000","message":"this should also include the project_id\n/v3/default-types/{project_id}","commit_id":"f4143518d0afae83f0d9b3dbbb1e6be6ce96eb6c"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"e47ec68b5db3fb269d9aa8defff09f2c3e301230","unresolved":false,"context_lines":[{"line_number":151,"context_line":"* Unset a default volume type.  It won\u0027t fail even if there is not a default"},{"line_number":152,"context_line":"  volume type."},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"  * DELETE /v3/default-type-override"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    * JSON body to remove the default type for a project:"},{"line_number":157,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"bf51134e_20ad75ea","line":154,"range":{"start_line":154,"start_character":11,"end_line":154,"end_character":36},"in_reply_to":"bf51134e_8abbc2c2","updated":"2020-07-01 14:17:27.000000000","message":"I wanted this to be consistent with the other HTTP methods that pass it in the body, so I purposely didn\u0027t add the project_id in the URL.\n\nIf we add it as part of the URL, then we should be consistent and add it to the PUT method, and allow it optionally in the GET method to get it for a single project.","commit_id":"f4143518d0afae83f0d9b3dbbb1e6be6ce96eb6c"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"cddbeb3758ad04fa7fd43c2063740c9c8df2cf82","unresolved":false,"context_lines":[{"line_number":153,"context_line":""},{"line_number":154,"context_line":"  * DELETE /v3/default-type-override"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    * JSON body to remove the default type for a project:"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"      .. code-block:: json"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"         {"},{"line_number":161,"context_line":"           \"project_id\": \"248592b4-a6da-4c4c-abe0-9d8dbe0b74b4\""},{"line_number":162,"context_line":"         }"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"* Get volume types"},{"line_number":165,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"bf51134e_aadb261f","line":162,"range":{"start_line":156,"start_character":0,"end_line":162,"end_character":10},"updated":"2020-07-01 13:39:09.000000000","message":"this should be included in the URL as mentioned above? referring to our current client/api calls, we pass the ID in the URL instead of the body","commit_id":"f4143518d0afae83f0d9b3dbbb1e6be6ce96eb6c"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"e47ec68b5db3fb269d9aa8defff09f2c3e301230","unresolved":false,"context_lines":[{"line_number":153,"context_line":""},{"line_number":154,"context_line":"  * DELETE /v3/default-type-override"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    * JSON body to remove the default type for a project:"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"      .. code-block:: json"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"         {"},{"line_number":161,"context_line":"           \"project_id\": \"248592b4-a6da-4c4c-abe0-9d8dbe0b74b4\""},{"line_number":162,"context_line":"         }"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"* Get volume types"},{"line_number":165,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"bf51134e_80d56146","line":162,"range":{"start_line":156,"start_character":0,"end_line":162,"end_character":10},"in_reply_to":"bf51134e_aadb261f","updated":"2020-07-01 14:17:27.000000000","message":"Yes we do, but it\u0027s always the UUID of the resource we are referring to, as per REST API best practices, but in this case the UUID we would be passing would not belong to the \"default-types\", but to a project instead, so it doesn\u0027t make much sense.\n\nExamples:\n\n- volumes/UUID \u003d\u003d\u003e The UUID is for the volume, so it\u0027s OK\n- default-types/UUID \u003d\u003d\u003e This means that the UUID is for a default-type, which is not, it\u0027s for the project.","commit_id":"f4143518d0afae83f0d9b3dbbb1e6be6ce96eb6c"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"cddbeb3758ad04fa7fd43c2063740c9c8df2cf82","unresolved":false,"context_lines":[{"line_number":290,"context_line":"      type ids limited by the ``project_id`` if it is provided."},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"  * Update ``get_default_volume_type`` to return the effective volume type for"},{"line_number":293,"context_line":"    the current project.  Basically calling the *get tenant default type* DB"},{"line_number":294,"context_line":"    method, and if it returns None, then we\u0027ll continue with the current code"},{"line_number":295,"context_line":"    we have to use the one from the config or the ``__DEFAULT__`` type if not."},{"line_number":296,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"bf51134e_aa77a608","line":293,"range":{"start_line":293,"start_character":53,"end_line":293,"end_character":59},"updated":"2020-07-01 13:39:09.000000000","message":"project","commit_id":"f4143518d0afae83f0d9b3dbbb1e6be6ce96eb6c"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"e47ec68b5db3fb269d9aa8defff09f2c3e301230","unresolved":false,"context_lines":[{"line_number":290,"context_line":"      type ids limited by the ``project_id`` if it is provided."},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"  * Update ``get_default_volume_type`` to return the effective volume type for"},{"line_number":293,"context_line":"    the current project.  Basically calling the *get tenant default type* DB"},{"line_number":294,"context_line":"    method, and if it returns None, then we\u0027ll continue with the current code"},{"line_number":295,"context_line":"    we have to use the one from the config or the ``__DEFAULT__`` type if not."},{"line_number":296,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"bf51134e_8063a1b1","line":293,"range":{"start_line":293,"start_character":53,"end_line":293,"end_character":59},"in_reply_to":"bf51134e_aa77a608","updated":"2020-07-01 14:17:27.000000000","message":"Done","commit_id":"f4143518d0afae83f0d9b3dbbb1e6be6ce96eb6c"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"eccb145c25b1ca770561a8ed59c1dbd8eb8d643c","unresolved":false,"context_lines":[{"line_number":186,"context_line":"      ``default_volume_type`` or ``__DEFAULT__`` if there\u0027s no global default"},{"line_number":187,"context_line":"      type override."},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"    * Passing the ``project_id`` on the request body will limit the output. The"},{"line_number":190,"context_line":"      JSON body for such request is:"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"      .. code-block:: json"},{"line_number":193,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"bf51134e_5b2dfaa6","line":190,"range":{"start_line":189,"start_character":0,"end_line":190,"end_character":36},"updated":"2020-07-01 15:49:49.000000000","message":"It\u0027s pretty non-standard to have a meaningful request body for a GET request.  I think this should be GET /v3/default-types/{project_id}, or I guess you could just allow the project_id as a filter and do GET /v3/default-types?project_id\u003d{project_id}.  But I don\u0027t like using the request body at all.","commit_id":"6ed1ae77b0b6e0d92ee744e3e6850f45a804b368"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"688ed1dc62fed882fa78f2137c2a09089ee1808a","unresolved":false,"context_lines":[{"line_number":186,"context_line":"      ``default_volume_type`` or ``__DEFAULT__`` if there\u0027s no global default"},{"line_number":187,"context_line":"      type override."},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"    * Passing the ``project_id`` on the request body will limit the output. The"},{"line_number":190,"context_line":"      JSON body for such request is:"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"      .. code-block:: json"},{"line_number":193,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"bf51134e_b65d4beb","line":190,"range":{"start_line":189,"start_character":0,"end_line":190,"end_character":36},"in_reply_to":"bf51134e_5b2dfaa6","updated":"2020-07-01 16:06:51.000000000","message":"The first option would not be good (for the same reasons I mentioned Rajat on the previous patch).\n\nIncluding payload in a GET request is not invalid, as per RFC 7231, but it is true that it may give trouble if the request is cached at any point based just in the URL.\n\nI\u0027ll change it according to the second option, and I\u0027ll do the same for the DELETE, since we won\u0027t have consistency in all the methods like I originally intended.","commit_id":"6ed1ae77b0b6e0d92ee744e3e6850f45a804b368"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"6cadc2092c8fdd327a5c6e2a4723769cf99d05b5","unresolved":false,"context_lines":[{"line_number":138,"context_line":"  Besides ensuring that the volume type exists and the project has access to"},{"line_number":139,"context_line":"  it, this method will also call keystone to validate that the project exists."},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"  * PUT /v3/default-types"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    * JSON body to set default type (by name or id) for a project:"},{"line_number":144,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"bf51134e_8d970a91","line":141,"updated":"2020-07-07 20:17:33.000000000","message":"Most of our other v3 API calls contain the project_id:\n\n  PUT /v3/{project_id}/default-types\n\n(and we have some calls where the project_id is in both the path and the request body, so I think that could stay the same)","commit_id":"46aa39bddedb2f9f17fc454248162a466258acc8"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"ec363a2d5069205c081dcf2568001a964f846b61","unresolved":false,"context_lines":[{"line_number":138,"context_line":"  Besides ensuring that the volume type exists and the project has access to"},{"line_number":139,"context_line":"  it, this method will also call keystone to validate that the project exists."},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"  * PUT /v3/default-types"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    * JSON body to set default type (by name or id) for a project:"},{"line_number":144,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"bf51134e_8e3536dd","line":141,"in_reply_to":"bf51134e_28cce5ba","updated":"2020-07-08 13:04:45.000000000","message":"Then shouldn\u0027t we be setting default type for the current project existing in the context, and lose the flexibility to set it for any project?","commit_id":"46aa39bddedb2f9f17fc454248162a466258acc8"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"fc2278a8dc321f4e95a4da6da3ddecd1d4dfdee2","unresolved":false,"context_lines":[{"line_number":138,"context_line":"  Besides ensuring that the volume type exists and the project has access to"},{"line_number":139,"context_line":"  it, this method will also call keystone to validate that the project exists."},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"  * PUT /v3/default-types"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    * JSON body to set default type (by name or id) for a project:"},{"line_number":144,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"bf51134e_28cce5ba","line":141,"in_reply_to":"bf51134e_8d970a91","updated":"2020-07-08 09:04:03.000000000","message":"Sure, we can do that, but then it should be: \n   /v3/{project_id}/default-type\n\nBecause it\u0027s a single default type that we can set, and we should remove the project_id from the payload.","commit_id":"46aa39bddedb2f9f17fc454248162a466258acc8"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"088a367e84b3d26434506579662e5bbf4b03e23e","unresolved":false,"context_lines":[{"line_number":138,"context_line":"  Besides ensuring that the volume type exists and the project has access to"},{"line_number":139,"context_line":"  it, this method will also call keystone to validate that the project exists."},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"  * PUT /v3/default-types"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    * JSON body to set default type (by name or id) for a project:"},{"line_number":144,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"bf51134e_941ed1b8","line":141,"in_reply_to":"bf51134e_8e3536dd","updated":"2020-07-09 11:10:04.000000000","message":"No, because an admin could be setting defaults for other projects, not necessarily the one he has used to identify in Keystone.","commit_id":"46aa39bddedb2f9f17fc454248162a466258acc8"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"6cadc2092c8fdd327a5c6e2a4723769cf99d05b5","unresolved":false,"context_lines":[{"line_number":152,"context_line":"* Unset a default volume type.  It won\u0027t fail even if there is not a default"},{"line_number":153,"context_line":"  volume type for the given project."},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"  * DELETE /v3/default-types?project_id\u003d{project_id}"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"* Get volume types"},{"line_number":158,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"bf51134e_0d377ab2","line":155,"updated":"2020-07-07 20:17:33.000000000","message":"Why not:\n\n  DELETE /v3/{project_id}/default-types/{type_id}\n\nIt might mean that you\u0027d have to do a GET default-types before you could make the call, but it would look like the other DELETE calls we currently have.\n\nIn this format, the call could fail with a 404 if the type_id isn\u0027t specified correctly, so maybe simply\n\n  DELETE /v3/{project_id}/default-types\n\nif you want to preserve the no-fail behavior.","commit_id":"46aa39bddedb2f9f17fc454248162a466258acc8"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"fc2278a8dc321f4e95a4da6da3ddecd1d4dfdee2","unresolved":false,"context_lines":[{"line_number":152,"context_line":"* Unset a default volume type.  It won\u0027t fail even if there is not a default"},{"line_number":153,"context_line":"  volume type for the given project."},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"  * DELETE /v3/default-types?project_id\u003d{project_id}"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"* Get volume types"},{"line_number":158,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"bf51134e_68c53d8e","line":155,"in_reply_to":"bf51134e_0d377ab2","updated":"2020-07-08 09:04:03.000000000","message":"Same as in the previous comment, it would have to be \n\n   /v3/{project_id}/default-type","commit_id":"46aa39bddedb2f9f17fc454248162a466258acc8"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"6cadc2092c8fdd327a5c6e2a4723769cf99d05b5","unresolved":false,"context_lines":[{"line_number":156,"context_line":""},{"line_number":157,"context_line":"* Get volume types"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"  * GET /v3/default-types"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    * A request without a body will return all the volume type defaults"},{"line_number":162,"context_line":"      defined.  A sample response would be:"}],"source_content_type":"text/x-rst","patch_set":9,"id":"bf51134e_2d123e0a","line":159,"updated":"2020-07-07 20:17:33.000000000","message":"How about:\n\n  GET /v3/{project-id}/default-types\n\nand we could handle the admin use case with \u0027?all-tenants\u003d1\u0027 like we do for volumes.  It would probably make sense to also allow the project_id filter if an admin is interested in some particular project (I believe the project_id in the URL path is the project of the caller?)\n\nThe response could be the same, without all-tenants\u003d1 you\u0027d get a list of size 1.","commit_id":"46aa39bddedb2f9f17fc454248162a466258acc8"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"fc2278a8dc321f4e95a4da6da3ddecd1d4dfdee2","unresolved":false,"context_lines":[{"line_number":156,"context_line":""},{"line_number":157,"context_line":"* Get volume types"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"  * GET /v3/default-types"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    * A request without a body will return all the volume type defaults"},{"line_number":162,"context_line":"      defined.  A sample response would be:"}],"source_content_type":"text/x-rst","patch_set":9,"id":"bf51134e_48e159fc","line":159,"in_reply_to":"bf51134e_2d123e0a","updated":"2020-07-08 09:04:03.000000000","message":"Using /v3/{project-id}/default-types?all-tenants\u003d1 clashes with the recommended REST API resource naming... When we provide the project-id in the URL it means that we want the default-types for a specific project (which can have only 1), and passing parameter to pass a parameter to ignore the previous project-id parameter is not good practice.\n\nIf you don\u0027t like the current proposal and want to pass the project-id in the URL we would need to have 2 formats:\n\n  GET /v3/{project-id}/default-type\n\nand\n\n  GET /v3/default-types\n\nWhich seems convoluted and non-intuitive.\n\nAnd if we don\u0027t change this but change PUT/DELETE, then we end with different URLs for PUT/DELETE and GET, which I would prefer to avoid, and is why I chose the formats written in the current spec, to be consistent.","commit_id":"46aa39bddedb2f9f17fc454248162a466258acc8"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"6cadc2092c8fdd327a5c6e2a4723769cf99d05b5","unresolved":false,"context_lines":[{"line_number":166,"context_line":"         ["},{"line_number":167,"context_line":"             {"},{"line_number":168,"context_line":"               \"project_id\": \"248592b4-a6da-4c4c-abe0-9d8dbe0b74b4\","},{"line_number":169,"context_line":"               \"type_id\": \"f8a82360-0b1a-4649-8615-114341dd06e0\""},{"line_number":170,"context_line":"             },"},{"line_number":171,"context_line":"             {"},{"line_number":172,"context_line":"               \"project_id\": \"1234567-4c4c-abcd-abe0-1a2b3c4d5e6ff\","}],"source_content_type":"text/x-rst","patch_set":9,"id":"bf51134e_4d99726c","line":169,"updated":"2020-07-07 20:17:33.000000000","message":"It looks like we\u0027re going to have a new mv this cycle that will display both type name and type id in the volume detail response because sometimes you need one, and sometimes the other.  I wonder if it would be worth including both here?","commit_id":"46aa39bddedb2f9f17fc454248162a466258acc8"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"55f2093d44175690bea66135009425580db2ac6f","unresolved":false,"context_lines":[{"line_number":166,"context_line":"         ["},{"line_number":167,"context_line":"             {"},{"line_number":168,"context_line":"               \"project_id\": \"248592b4-a6da-4c4c-abe0-9d8dbe0b74b4\","},{"line_number":169,"context_line":"               \"type_id\": \"f8a82360-0b1a-4649-8615-114341dd06e0\""},{"line_number":170,"context_line":"             },"},{"line_number":171,"context_line":"             {"},{"line_number":172,"context_line":"               \"project_id\": \"1234567-4c4c-abcd-abe0-1a2b3c4d5e6ff\","}],"source_content_type":"text/x-rst","patch_set":9,"id":"bf51134e_ad4acea8","line":169,"in_reply_to":"bf51134e_4d99726c","updated":"2020-07-07 20:28:04.000000000","message":"I\u0027m going to withdraw this as a dumb suggestion.  The response to GET /v3/{project_id}/types/default gives all the information a normal user is interested in.","commit_id":"46aa39bddedb2f9f17fc454248162a466258acc8"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"6cadc2092c8fdd327a5c6e2a4723769cf99d05b5","unresolved":false,"context_lines":[{"line_number":182,"context_line":"      as an URL parameter: GET /v3/defult-types?project_id\u003d{project_id}"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"A user can get its effective default type using existing ``cinder"},{"line_number":185,"context_line":"type-default`` command."},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"Security impact"},{"line_number":188,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":9,"id":"bf51134e_2d87de11","line":185,"updated":"2020-07-07 20:17:33.000000000","message":"that is,\n\n  GET /v3/{project_id}/types/default\n\n(just so we can compare it to the other API calls)","commit_id":"46aa39bddedb2f9f17fc454248162a466258acc8"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"fc2278a8dc321f4e95a4da6da3ddecd1d4dfdee2","unresolved":false,"context_lines":[{"line_number":182,"context_line":"      as an URL parameter: GET /v3/defult-types?project_id\u003d{project_id}"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"A user can get its effective default type using existing ``cinder"},{"line_number":185,"context_line":"type-default`` command."},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"Security impact"},{"line_number":188,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":9,"id":"bf51134e_48caf96d","line":185,"in_reply_to":"bf51134e_2d87de11","updated":"2020-07-08 09:04:03.000000000","message":"I\u0027ll update the spec once we reach a consensus on the REST APIs.","commit_id":"46aa39bddedb2f9f17fc454248162a466258acc8"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"6aa909494f588c49f47695e610861eeb6b5c29c1","unresolved":false,"context_lines":[{"line_number":155,"context_line":""},{"line_number":156,"context_line":"* Get volume types"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"  * GET /v3/default-types/{project_id}"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    * A request without a project_id will return all the volume type"},{"line_number":161,"context_line":"      defaults defined.  A sample response would be:"}],"source_content_type":"text/x-rst","patch_set":10,"id":"bf51134e_99539316","line":158,"updated":"2020-07-10 15:01:32.000000000","message":"Just want to be clear that the response to this is a JSON object, not a list containing a single JSON object.","commit_id":"87e13e31fdbc599238238e7959b3ba220b4f1010"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"1480ba9a5e3a3e0d88398778f3493a6d84371ad2","unresolved":false,"context_lines":[{"line_number":155,"context_line":""},{"line_number":156,"context_line":"* Get volume types"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"  * GET /v3/default-types/{project_id}"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    * A request without a project_id will return all the volume type"},{"line_number":161,"context_line":"      defaults defined.  A sample response would be:"}],"source_content_type":"text/x-rst","patch_set":10,"id":"bf51134e_cb41b2a8","line":158,"in_reply_to":"bf51134e_99539316","updated":"2020-07-10 16:16:57.000000000","message":"Done","commit_id":"87e13e31fdbc599238238e7959b3ba220b4f1010"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"6aa909494f588c49f47695e610861eeb6b5c29c1","unresolved":false,"context_lines":[{"line_number":177,"context_line":"      ``default_volume_type`` or ``__DEFAULT__`` if there\u0027s no global default"},{"line_number":178,"context_line":"      type override."},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"    * Filtering by the ``project_id`` is possible by passing the ``project_id``"},{"line_number":181,"context_line":"      as an URL parameter: GET /v3/defult-types?project_id\u003d{project_id}"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"A user can get its effective default type using existing ``cinder"},{"line_number":184,"context_line":"type-default`` command."}],"source_content_type":"text/x-rst","patch_set":10,"id":"bf51134e_b93817d3","line":181,"range":{"start_line":180,"start_character":6,"end_line":181,"end_character":71},"updated":"2020-07-10 15:01:32.000000000","message":"we don\u0027t really need this any more, but we could still do it if you think it would be helpful.","commit_id":"87e13e31fdbc599238238e7959b3ba220b4f1010"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"1480ba9a5e3a3e0d88398778f3493a6d84371ad2","unresolved":false,"context_lines":[{"line_number":177,"context_line":"      ``default_volume_type`` or ``__DEFAULT__`` if there\u0027s no global default"},{"line_number":178,"context_line":"      type override."},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"    * Filtering by the ``project_id`` is possible by passing the ``project_id``"},{"line_number":181,"context_line":"      as an URL parameter: GET /v3/defult-types?project_id\u003d{project_id}"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"A user can get its effective default type using existing ``cinder"},{"line_number":184,"context_line":"type-default`` command."}],"source_content_type":"text/x-rst","patch_set":10,"id":"bf51134e_eb4476ba","line":181,"range":{"start_line":180,"start_character":6,"end_line":181,"end_character":71},"in_reply_to":"bf51134e_b93817d3","updated":"2020-07-10 16:16:57.000000000","message":"Done","commit_id":"87e13e31fdbc599238238e7959b3ba220b4f1010"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"d1883c799e2a5bdaf65f9463dd213fb5df0a0a1e","unresolved":false,"context_lines":[{"line_number":339,"context_line":"  * Admin lists default volume type for project and confirms that it only gets"},{"line_number":340,"context_line":"    that one."},{"line_number":341,"context_line":"  * The same for the alternative project."},{"line_number":342,"context_line":"  * Try to list defaults for a fake project id and confirm it doesn\u0027t break and"},{"line_number":343,"context_line":"    returns an empty list."},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"* Confirm that delete default volume type overrides work"},{"line_number":346,"context_line":""}],"source_content_type":"text/x-rst","patch_set":11,"id":"bf51134e_96517211","line":343,"range":{"start_line":342,"start_character":4,"end_line":343,"end_character":26},"updated":"2020-07-14 18:28:45.000000000","message":"I\u0027m confused here, should this return an empty list or raise the error project not found.","commit_id":"97c967f0b0f35a1897cc9b83be979b047e5b1e3e"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"4ed18f10381daf98619a5cdb559cb07593d190b7","unresolved":false,"context_lines":[{"line_number":339,"context_line":"  * Admin lists default volume type for project and confirms that it only gets"},{"line_number":340,"context_line":"    that one."},{"line_number":341,"context_line":"  * The same for the alternative project."},{"line_number":342,"context_line":"  * Try to list defaults for a fake project id and confirm it doesn\u0027t break and"},{"line_number":343,"context_line":"    returns an empty list."},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"* Confirm that delete default volume type overrides work"},{"line_number":346,"context_line":""}],"source_content_type":"text/x-rst","patch_set":11,"id":"bf51134e_fc252f5d","line":343,"range":{"start_line":342,"start_character":4,"end_line":343,"end_character":26},"in_reply_to":"bf51134e_96517211","updated":"2020-07-14 21:05:56.000000000","message":"I think this was left over from the version where we were going to find a project\u0027s default by GET /v3/default-types?project_id\u003d12345.  Now that we instead have the GET /v3/default-types/{project_id} call, you should return a 404 in both cases: (1) project_id exists, but has no default-type defined, (2) project_id doesn\u0027t exist.","commit_id":"97c967f0b0f35a1897cc9b83be979b047e5b1e3e"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"cfeae0bf4d07649219eef5322094ed9a49a70a47","unresolved":false,"context_lines":[{"line_number":339,"context_line":"  * Admin lists default volume type for project and confirms that it only gets"},{"line_number":340,"context_line":"    that one."},{"line_number":341,"context_line":"  * The same for the alternative project."},{"line_number":342,"context_line":"  * Try to list defaults for a fake project id and confirm it doesn\u0027t break and"},{"line_number":343,"context_line":"    returns an empty list."},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"* Confirm that delete default volume type overrides work"},{"line_number":346,"context_line":""}],"source_content_type":"text/x-rst","patch_set":11,"id":"bf51134e_72993c1d","line":343,"range":{"start_line":342,"start_character":4,"end_line":343,"end_character":26},"in_reply_to":"bf51134e_989078ef","updated":"2020-07-15 13:56:42.000000000","message":"I thought we were checking to make sure the project exists on the PUT, not on the GET.  I think a 404 in both cases (project exists, but no default override) and (project doesn\u0027t exist, hence no default override) is appropriate.","commit_id":"97c967f0b0f35a1897cc9b83be979b047e5b1e3e"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"a8ac4a997e5dc7d914d4ca9f6f146034aef67eed","unresolved":false,"context_lines":[{"line_number":339,"context_line":"  * Admin lists default volume type for project and confirms that it only gets"},{"line_number":340,"context_line":"    that one."},{"line_number":341,"context_line":"  * The same for the alternative project."},{"line_number":342,"context_line":"  * Try to list defaults for a fake project id and confirm it doesn\u0027t break and"},{"line_number":343,"context_line":"    returns an empty list."},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"* Confirm that delete default volume type overrides work"},{"line_number":346,"context_line":""}],"source_content_type":"text/x-rst","patch_set":11,"id":"bf51134e_989078ef","line":343,"range":{"start_line":342,"start_character":4,"end_line":343,"end_character":26},"in_reply_to":"bf51134e_98f19898","updated":"2020-07-15 10:07:18.000000000","message":"Makes sense and that\u0027s my understanding in my implementation.\nI think we can replace the words \u0027a fake\u0027 here with \u0027any other\u0027 and it looks OK.","commit_id":"97c967f0b0f35a1897cc9b83be979b047e5b1e3e"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"7a622e84848425389eafeba0f3be42ec53a304f5","unresolved":false,"context_lines":[{"line_number":339,"context_line":"  * Admin lists default volume type for project and confirms that it only gets"},{"line_number":340,"context_line":"    that one."},{"line_number":341,"context_line":"  * The same for the alternative project."},{"line_number":342,"context_line":"  * Try to list defaults for a fake project id and confirm it doesn\u0027t break and"},{"line_number":343,"context_line":"    returns an empty list."},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"* Confirm that delete default volume type overrides work"},{"line_number":346,"context_line":""}],"source_content_type":"text/x-rst","patch_set":11,"id":"bf51134e_98f19898","line":343,"range":{"start_line":342,"start_character":4,"end_line":343,"end_character":26},"in_reply_to":"bf51134e_fc252f5d","updated":"2020-07-15 09:59:11.000000000","message":"I don\u0027t have strong feelings on this one, but I think it may have value to be able to differentiate between the 2 cases:\n\n- Fake project id: Since we are checking that the project exist we should fail with 404\n- Existing project id: Return null as the type_id\n             {\n               \"project_id\": \"248592b4-a6da-4c4c-abe0-9d8dbe0b74b4\",\n               \"type_id\": null\n             }\n\nIn our current REST API when we ask for the quotas of a project that doesn\u0027t have any overrides we return the default ones.  We could do something similar here and say so explicitly in JSON.","commit_id":"97c967f0b0f35a1897cc9b83be979b047e5b1e3e"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"2e4008a6748ec02edf3811e2dc0771ca091083fc","unresolved":false,"context_lines":[{"line_number":138,"context_line":"  Besides ensuring that the volume type exists and the project has access to"},{"line_number":139,"context_line":"  it, this method will also call keystone to validate that the project exists."},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"  * PUT /v3/default-types/{project_id}"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    * JSON body to set default type (by name or id) for a project:"},{"line_number":144,"context_line":""}],"source_content_type":"text/x-rst","patch_set":12,"id":"bf51134e_4add463f","line":141,"updated":"2020-07-16 21:24:39.000000000","message":"Just want to be clear on the response codes.\nsuccess: 202 or 204 with no body, or 200 and a body?\nfailure: volume_type doesn\u0027t exist or not accessible to project_id -- return 400?\nfailure: project_id doesn\u0027t exist -- return 404?","commit_id":"74d07be80af6a280938ca7f4f444b42a7e70d9bf"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"9442dbba25c6be9d6a9e01e2132acdede3ce4a74","unresolved":false,"context_lines":[{"line_number":138,"context_line":"  Besides ensuring that the volume type exists and the project has access to"},{"line_number":139,"context_line":"  it, this method will also call keystone to validate that the project exists."},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"  * PUT /v3/default-types/{project_id}"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    * JSON body to set default type (by name or id) for a project:"},{"line_number":144,"context_line":""}],"source_content_type":"text/x-rst","patch_set":12,"id":"bf51134e_e11b9cc7","line":141,"in_reply_to":"bf51134e_4add463f","updated":"2020-07-17 04:54:44.000000000","message":"Any reason why volume_type doesn\u0027t exist has 400 instead of 404?","commit_id":"74d07be80af6a280938ca7f4f444b42a7e70d9bf"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"dabcbe6841c1ba5ac78e86075bfbcf493a4db109","unresolved":false,"context_lines":[{"line_number":138,"context_line":"  Besides ensuring that the volume type exists and the project has access to"},{"line_number":139,"context_line":"  it, this method will also call keystone to validate that the project exists."},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"  * PUT /v3/default-types/{project_id}"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    * JSON body to set default type (by name or id) for a project:"},{"line_number":144,"context_line":""}],"source_content_type":"text/x-rst","patch_set":12,"id":"bf51134e_42336314","line":141,"in_reply_to":"bf51134e_e11b9cc7","updated":"2020-07-17 12:45:21.000000000","message":"Yes, since the volume_type is specified in the request body, the problem is a malformed request body, so 400.  404 indicates that the resource described by the URL does not exist, which is not the case here.\n\nYou\u0027re right that we have 2 different 400s we might want to distinguish, that is:\n\n(a) completely incorrect request body, e.g., {\"garbage\": true}\n(b) syntactically correct request body, but indicated volume_type doesn\u0027t exist\n\nYou can return a different error message with the 400 to indicate which one has occurred.\n\nAnother possibility is to return a 409 for case (b) under the theory that the conflict could be resolved by creating (or making accessible to the project) the volume_type that\u0027s referred to in the request body.  That may be the best solution here.  So in the failure scenarios, we have:\n\nfailure: malformed request body -\u003e 400\nfailure: project_id doesn\u0027t exist -\u003e 404\nfailure: good request body, but volume_type doesn\u0027t exist or is inaccessible -\u003e 409\n\nThat looks good to me, depending on the response code, it\u0027s clear what the admin needs to do.\n\nDon\u0027t forget that you need to decide on what the success response should be.","commit_id":"74d07be80af6a280938ca7f4f444b42a7e70d9bf"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"2e4008a6748ec02edf3811e2dc0771ca091083fc","unresolved":false,"context_lines":[{"line_number":148,"context_line":"           \"volume_type\": \"lvm\""},{"line_number":149,"context_line":"         }"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"* Unset a default volume type.  It won\u0027t fail even if there is not a default"},{"line_number":152,"context_line":"  volume type for the given project or if the project no longer exists in"},{"line_number":153,"context_line":"  keystone."},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"  * DELETE /v3/default-types/{project_id}"},{"line_number":156,"context_line":""}],"source_content_type":"text/x-rst","patch_set":12,"id":"bf51134e_cff5e852","line":153,"range":{"start_line":151,"start_character":32,"end_line":153,"end_character":11},"updated":"2020-07-16 21:24:39.000000000","message":"I think the traditional handling of this is:\n- if the default-type for project_id is defined, return 204\n- if the default-type for project_id is not defined, return 404 (whether the project_id exists or not)\n\nThat being said, most of our v3 DELETE calls (13 out of 18) return a 202, so I guess we could return a 202 for all calls ... is that what you have in mind?  But then the caller would have to follow up with a GET /v3/default-types/{project_id} to verify that the delete had been completed.  I think it would be better to just 404 right away.  I didn\u0027t look at all the calls, but DELETE /v3/{project_id}/volumes/{volume_id} returns a 404 if volume_id doesn\u0027t exist, so that call at least isn\u0027t using a 202 in the missing resource case.\n\nWe only have 1 call currently that returns 204 for a successful DELETE (it\u0027s /v3/{project_id}/messages/{message_id}).  The 4 others return a 200.  But since we have a precedent for returning 204, I\u0027d personally prefer that.","commit_id":"74d07be80af6a280938ca7f4f444b42a7e70d9bf"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"2e4008a6748ec02edf3811e2dc0771ca091083fc","unresolved":false,"context_lines":[{"line_number":154,"context_line":""},{"line_number":155,"context_line":"  * DELETE /v3/default-types/{project_id}"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"* Get volume types"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"  * GET /v3/default-types/{project_id}"},{"line_number":160,"context_line":""}],"source_content_type":"text/x-rst","patch_set":12,"id":"bf51134e_eaa9ba7b","line":157,"range":{"start_line":157,"start_character":2,"end_line":157,"end_character":18},"updated":"2020-07-16 21:24:39.000000000","message":"This is a super-nit, but these are really 2 different API calls:\n\n1. \"Show default type (for a project)\"\n  GET /v3/default-types/{project_id}\n\n2. \"List default types\"\n  GET /v3/default-types\n\nI\u0027m only pointing this out because it may make sense to have different policies governing these.  (For example, an operator might want to make 1 admin_or_owner, but have 2 be admin_only.)","commit_id":"74d07be80af6a280938ca7f4f444b42a7e70d9bf"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"2e4008a6748ec02edf3811e2dc0771ca091083fc","unresolved":false,"context_lines":[{"line_number":320,"context_line":"Besides writing the appropriate unit-tests for the DB methods, REST API"},{"line_number":321,"context_line":"methods, and update existing tests for the changes we introduced, we also need"},{"line_number":322,"context_line":"a series of Tempest tests to test existing functionality."},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"* Confirm that the priority of the default types are observed:"},{"line_number":325,"context_line":""},{"line_number":326,"context_line":"  * Admin creates a custom volume type and sets it as the project\u0027s default"}],"source_content_type":"text/x-rst","patch_set":12,"id":"bf51134e_0af4ee59","line":323,"updated":"2020-07-16 21:24:39.000000000","message":"Since we\u0027ll have keystone available, we should do a negative test to make sure the project-id-validation is working on the PUT call:\n\n* Admin gets an existing volume-type-id (either by list or creation)\n* Admin makes the PUT /v3/default-types/{project_id} call using a non-existent project_id\n* call returns 404 (or whatever we decide above)\n\nWhat to use for the nonexistent project_id is an interesting question.  In the past, a project id wasn\u0027t required to be a UUID, so maybe a string like \"i_am_not_a_project_id\" would work.  On the other hand, if they must be UUIDs these days, we do want to use a UUID so that our request to keystone doesn\u0027t fail because of a syntax problem (we want to make sure the actual project lookup doesn\u0027t find anything and we\u0027re detecting that correctly).  So maybe an all-zero UUID?  Tempest may already have something for this in their keystone tests.","commit_id":"74d07be80af6a280938ca7f4f444b42a7e70d9bf"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"2e4008a6748ec02edf3811e2dc0771ca091083fc","unresolved":false,"context_lines":[{"line_number":349,"context_line":"* Confirm that listing default type overrides works as expected:"},{"line_number":350,"context_line":""},{"line_number":351,"context_line":"  * Admin confirms that there are no default overrides for the project by first"},{"line_number":352,"context_line":"    listing the default-types without a filter, and then by passing the project"},{"line_number":353,"context_line":"    id as a filter (we\u0027ll get 404), for both the normal project and the"},{"line_number":354,"context_line":"    alternative."},{"line_number":355,"context_line":"  * Create 2 custom volume types: #1 and #2"},{"line_number":356,"context_line":"  * Set default volume type #1 for project and #2 for alternative project."}],"source_content_type":"text/x-rst","patch_set":12,"id":"bf51134e_2f32a410","line":353,"range":{"start_line":352,"start_character":48,"end_line":353,"end_character":34},"updated":"2020-07-16 21:24:39.000000000","message":"Nit: the GET /v3/default-types call doesn\u0027t have a filter on this patch set, so these would be GET /v3/default-types/{project_id} calls that would 404.","commit_id":"74d07be80af6a280938ca7f4f444b42a7e70d9bf"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"2e4008a6748ec02edf3811e2dc0771ca091083fc","unresolved":false,"context_lines":[{"line_number":360,"context_line":"  * Repeat previous 2 steps for the alternative project."},{"line_number":361,"context_line":"  * Unset the default types."},{"line_number":362,"context_line":"  * Confirm that full list returns empty list."},{"line_number":363,"context_line":"  * Confirm that listing filtering by project id returns 404."},{"line_number":364,"context_line":"  * List defaults for a fake project id and confirm we get 404 error code."},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"Documentation Impact"}],"source_content_type":"text/x-rst","patch_set":12,"id":"bf51134e_0ad6ae4f","line":363,"range":{"start_line":363,"start_character":17,"end_line":363,"end_character":48},"updated":"2020-07-16 21:24:39.000000000","message":"same as above","commit_id":"74d07be80af6a280938ca7f4f444b42a7e70d9bf"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"3a2c8eaf084ace170d75feaee75031554aefc478","unresolved":false,"context_lines":[{"line_number":168,"context_line":""},{"line_number":169,"context_line":"      * Response Codes:"},{"line_number":170,"context_line":"        - Success - 204"},{"line_number":171,"context_line":"        - Error - 404 (project id not found)"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"* Get volume types"},{"line_number":174,"context_line":""}],"source_content_type":"text/x-rst","patch_set":14,"id":"bf51134e_1c119cad","line":171,"updated":"2020-07-21 19:12:45.000000000","message":"You don\u0027t have to change this, but the problem isn\u0027t that the project_id is not found, it\u0027s that *a default type* for project_id is not found.","commit_id":"834992f4d994139781e1eeb38aacaa57b8574dcb"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"3a2c8eaf084ace170d75feaee75031554aefc478","unresolved":false,"context_lines":[{"line_number":189,"context_line":""},{"line_number":190,"context_line":"    * Response Codes:"},{"line_number":191,"context_line":"      - Success - 200 (with body)"},{"line_number":192,"context_line":"      - Error - 404 (project id not found or no default type)"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"  * List all default types"},{"line_number":195,"context_line":"    GET /v3/default-types"}],"source_content_type":"text/x-rst","patch_set":14,"id":"bf51134e_fcdae81a","line":192,"range":{"start_line":192,"start_character":21,"end_line":192,"end_character":60},"updated":"2020-07-21 19:12:45.000000000","message":"you don\u0027t have to change this, but it\u0027s more clear if we drop the \"or\" and just say: no default-type defined for project_id","commit_id":"834992f4d994139781e1eeb38aacaa57b8574dcb"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"ac19daebc8a135678f1a152f2943acb9b78831f0","unresolved":false,"context_lines":[{"line_number":238,"context_line":"Other end user impact"},{"line_number":239,"context_line":"---------------------"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"There will be a new set of commands in the *python-cinderclient* to match the"},{"line_number":242,"context_line":"new REST API endpoints:"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"* Set default: ``cinder default-type-set \u003cproject-id\u003e \u003ctype-name\u003e``"}],"source_content_type":"text/x-rst","patch_set":14,"id":"bf51134e_1f594e5a","line":241,"updated":"2020-07-24 12:58:12.000000000","message":"We should probably also either add this to python-openstackclient, or at least make sure the team is aware of something new that needs to be implemented.","commit_id":"834992f4d994139781e1eeb38aacaa57b8574dcb"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"3a2c8eaf084ace170d75feaee75031554aefc478","unresolved":false,"context_lines":[{"line_number":347,"context_line":"Besides writing the appropriate unit-tests for the DB methods, REST API"},{"line_number":348,"context_line":"methods, and update existing tests for the changes we introduced, we also need"},{"line_number":349,"context_line":"a series of Tempest tests to test existing functionality."},{"line_number":350,"context_line":""},{"line_number":351,"context_line":"* Confirm that the priority of the default types are observed:"},{"line_number":352,"context_line":""},{"line_number":353,"context_line":"  * Admin creates a custom volume type and sets it as the project\u0027s default"}],"source_content_type":"text/x-rst","patch_set":14,"id":"bf51134e_3c8100c5","line":350,"updated":"2020-07-21 19:12:45.000000000","message":"You don\u0027t need to add it here, but don\u0027t forget to add a tempest test to verify that a PUT /default-types for a non-existent project_id correctly fails--that way we\u0027ll know if something changes in keystone that breaks this functionality.","commit_id":"834992f4d994139781e1eeb38aacaa57b8574dcb"}]}
