Add interface to get store weight from memory #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some of the available glance stores like file, cinder etc has capability to reuse already initiated driver
(DRIVER_REUSABLE = 0b01000000). In Caracal we have added a feature to sort image locations based on store weight. As RBD driver of glance does not have this reuse capability, during image list API call it initializes the RBD driver for each of the available image which is causing noticable delay in list call.
To avoid this, introducing new interface in glance_store which will directly get the weight of the store from memory and return it back to user.
NOTE: Since the current module does not have any test coverage, corresponding tests will be added in glance once we release glance_store with this change.
Related-Bug: #2086675
Change-Id: If6861f3271f50680af271090b516f2add6e392b9 (cherry picked from commit bb45873)