Like for example:
-- All different Cython bindings
-- MGR modules
-- ``ceph`` command line interface and other Ceph tools.
-- Also external tools
+- All different Cython bindings.
+- MGR modules.
+- ``ceph`` command line interface and other Ceph tools.
+- Also external tools.
Requirements
============
-- ``python-six``
+- ``python-six``
Usage
=====
from typing import Optional, List, Dict
except ImportError:
pass
-
import six
def validate(self):
props = [self.id_model, self.size, self.rotates, self.count]
if self.paths and any(p is not None for p in props):
- raise DriveGroupValidationError('DeviceSelection: `paths` and other parameters are mutually exclusive')
+ raise DriveGroupValidationError(
+ 'DeviceSelection: `paths` and other parameters are mutually exclusive')
if not any(p is not None for p in [self.paths] + props):
raise DriveGroupValidationError('DeviceSelection cannot be empty')
def __init__(self, msg):
super(DriveGroupValidationError, self).__init__('Failed to validate Drive Group: ' + msg)
+
class DriveGroupSpec(object):
"""
Describe a drive group in the same form that ceph-volume
raise DriveGroupValidationError("objectstore not in ('filestore', 'bluestore')")
if not self.hosts(all_hosts):
raise DriveGroupValidationError(
- "host_pattern '{}' does not match any hosts".format(self.host_pattern))
\ No newline at end of file
+ "host_pattern '{}' does not match any hosts".format(self.host_pattern))
return msg
return '[errno {0}] {1}'.format(self.errno, msg)
+
class InvalidArgumentError(Error):
pass
+
class OSError(Error):
""" `OSError` class, derived from `Error` """
pass
+
class InterruptedOrTimeoutError(OSError):
""" `InterruptedOrTimeoutError` class, derived from `OSError` """
pass
class TimedOut(OSError):
""" `TimedOut` class, derived from `OSError` """
- pass
\ No newline at end of file
+ pass