From f10a4254e6d7215236541f804c7f80d20c94b392 Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Mon, 3 Jul 2017 13:37:53 -0400 Subject: [PATCH] ceph-volume: exceptions: add error for multiple volume groups Signed-off-by: Alfredo Deza --- src/ceph-volume/ceph_volume/exceptions.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/ceph-volume/ceph_volume/exceptions.py b/src/ceph-volume/ceph_volume/exceptions.py index 44739264fb4da..da6fd11efb866 100644 --- a/src/ceph-volume/ceph_volume/exceptions.py +++ b/src/ceph-volume/ceph_volume/exceptions.py @@ -25,3 +25,13 @@ class MultipleLVsError(Exception): def __str__(self): msg = "Got more than 1 result looking for %s with path: %s" % (self.lv_name, self.lv_path) return msg + + +class MultipleVGsError(Exception): + + def __init__(self, vg_name): + self.vg_name = vg_name + + def __str__(self): + msg = "Got more than 1 result looking for volume group: %s" % self.vg_name + return msg -- 2.39.5