From 90ce30ec67819cc8d014648adaacb94339cb0be2 Mon Sep 17 00:00:00 2001
From: Alfredo Deza <adeza@redhat.com>
Date: Fri, 23 Jun 2017 14:39:23 -0400
Subject: [PATCH] ceph-volume: exceptions: create a module for all exceptions

Signed-off-by: Alfredo Deza <adeza@redhat.com>
---
 src/ceph-volume/ceph_volume/exceptions.py | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 src/ceph-volume/ceph_volume/exceptions.py

diff --git a/src/ceph-volume/ceph_volume/exceptions.py b/src/ceph-volume/ceph_volume/exceptions.py
new file mode 100644
index 00000000000..eb35bf1bdf5
--- /dev/null
+++ b/src/ceph-volume/ceph_volume/exceptions.py
@@ -0,0 +1,16 @@
+
+
+class SuffixParsingError(Exception):
+
+    def __init__(self, suffix, part=None):
+        self.suffix = suffix
+        self.part = part
+
+    def __str__(self):
+        return 'Unable to parse the %s from systemd suffix: %s' % (self.part, self.suffix)
+
+
+class SuperUserError(Exception):
+
+    def __str__(self):
+        return 'This command needs to be executed with sudo or as root'