| |
| import base_section |
| |
| from runtest import conditions |
| |
| class Volume(base_section.BaseSection): |
| |
| name = "volume" |
| options = [ |
| 'backend_names', |
| 'build_interval', |
| 'build_timeout', |
| 'catalog_type', |
| 'disk_format', |
| 'endpoint_type', |
| 'manage_snapshot_ref', |
| 'manage_volume_ref', |
| 'max_microversion', |
| 'min_microversion', |
| 'region', |
| 'storage_protocol', |
| 'vendor_name', |
| 'volume_size', |
| ] |
| |
| |
| @property |
| def backend_names(self): |
| pass |
| |
| @property |
| def build_interval(self): |
| pass |
| |
| @property |
| def build_timeout(self): |
| pass |
| |
| @property |
| def catalog_type(self): |
| pass |
| |
| @property |
| def disk_format(self): |
| pass |
| |
| @property |
| def endpoint_type(self): |
| pass |
| |
| @property |
| def manage_snapshot_ref(self): |
| pass |
| |
| @property |
| def manage_volume_ref(self): |
| pass |
| |
| @property |
| def max_microversion(self): |
| pass |
| |
| @property |
| def min_microversion(self): |
| pass |
| |
| @property |
| def region(self): |
| c = conditions.BaseRule('cinder.controller.enabled', 'eq', True) |
| return self.get_item_when_condition_match( |
| 'cinder.controller.identity.region', c) |
| |
| @property |
| def storage_protocol(self): |
| c = conditions.BaseRule('cinder.volume.enabled', 'eq', True) |
| backends = self.get_item_when_condition_match( |
| 'cinder.controller.backend', c) |
| if not backends: |
| return |
| |
| # TODO: Add more backends here |
| protocol_map = {'ceph': 'ceph', 'lvm': 'ISCSI'} |
| |
| # TODO: cinder support multibackends with different storage protocols, |
| # pick first we know about for now, but might be refactored in future. |
| for backend_name,backend in backends.iteritems(): |
| res = backend['engine'] |
| if res: |
| return res |
| |
| @property |
| def vendor_name(self): |
| pass |
| |
| @property |
| def volume_size(self): |
| pass |