Merge "Send resize parameters in rpc as list in the Quobyte driver"
This commit is contained in:
commit
162e5e606b
@ -178,10 +178,13 @@ class QuobyteShareDriver(driver.ExecuteMixin, driver.ShareDriver,):
|
||||
return project_id
|
||||
|
||||
def _resize_share(self, share, new_size):
|
||||
# TODO(kaisers): check and update existing quota if already present
|
||||
self.rpc.call('setQuota', {"consumer": {"type": 3,
|
||||
"identifier": share["name"]},
|
||||
"limits": {"type": 5, "value": new_size}})
|
||||
self.rpc.call('setQuota', {"quotas": [
|
||||
{"consumer":
|
||||
[{"type": "VOLUME",
|
||||
"identifier": share["name"]}],
|
||||
"limits": [{"type": "LOGICAL_DISK_SPACE",
|
||||
"value": new_size}]}
|
||||
]})
|
||||
|
||||
def _resolve_volume_name(self, volume_name, tenant_domain):
|
||||
"""Resolve a volume name to the global volume uuid."""
|
||||
|
@ -394,15 +394,16 @@ class QuobyteShareDriverTestCase(test.TestCase):
|
||||
self._driver._resize_share(share=self.share, new_size=7)
|
||||
|
||||
exp_params = {
|
||||
"consumer": {
|
||||
"type": 3,
|
||||
"identifier": self.share["name"],
|
||||
},
|
||||
"limits": {
|
||||
"type": 5,
|
||||
"value": 7,
|
||||
},
|
||||
}
|
||||
"quotas": [{
|
||||
"consumer": [{
|
||||
"type": "VOLUME",
|
||||
"identifier": self.share["name"],
|
||||
}],
|
||||
"limits": [{
|
||||
"type": "LOGICAL_DISK_SPACE",
|
||||
"value": 7,
|
||||
}],
|
||||
}]}
|
||||
self._driver.rpc.call.assert_has_calls([
|
||||
mock.call('setQuota', exp_params)])
|
||||
|
||||
|
@ -0,0 +1,3 @@
|
||||
---
|
||||
fixes:
|
||||
- Quobyte share extend/shrink operations now work with all Quobyte API versions
|
Loading…
Reference in New Issue
Block a user