As the IRC discussion states, in all the driver calls in share/manager.py, the share manager passes the share (instance) model to the drivers - but, during provisioning (create, manage, create_from_snapshot, etc), drivers will need the extra-specs from the share type associated with the share instance to perform some actions.
So the solution to this RFE can be in several parts:
As the IRC discussion states, in all the driver calls in share/manager.py, the share manager passes the share (instance) model to the drivers - but, during provisioning (create, manage, create_ from_snapshot, etc), drivers will need the extra-specs from the share type associated with the share instance to perform some actions.
So the solution to this RFE can be in several parts:
1) Grab the extra-specs from the share instance's share type and pass it down to the drivers in the share object as share[' capabilities' ]. This method can be used to serialize the share instance: https:/ /opendev. org/openstack/ manila/ src/commit/ 34d209484366cd9 21e052d37c5f9da ef5e97af20/ manila/ share/manager. py#L4746- L4790 so that its not a sqlalchemy model object.
2) Drivers that currently query the share type extra specs for provisioning can stop doing so and rely on the share[' capabilities' ]
Part (2) can be completed in separate follow up patches.
Since this is a good opportunity for new contributors to learn this part of the codebase, i'm tagging this as a "low-hanging- fruit".
Please feel free to claim this bug and work with any of the maintainers to fix it.