summaryrefslogtreecommitdiffstats
path: root/snaps/openstack/create_keypairs.py
diff options
context:
space:
mode:
authorspisarski <s.pisarski@cablelabs.com>2017-07-20 11:20:13 -0600
committerspisarski <s.pisarski@cablelabs.com>2017-07-20 11:20:13 -0600
commit7d5d0625b881361b946ea059916e203bd81a16fa (patch)
tree34d5675877736eff314516659687a438c77a8594 /snaps/openstack/create_keypairs.py
parentdcc190a885955b03760458ed637749de1dfd3554 (diff)
Created new class KeypairSettingsError.
Raising KeypairSettingsError in KeypairSettings instead of Exception. JIRA: SNAPS-133 Change-Id: Ie67f1da429f7d7a5e1c71c4f2f30bf9d11bbe209 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
Diffstat (limited to 'snaps/openstack/create_keypairs.py')
-rw-r--r--snaps/openstack/create_keypairs.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/snaps/openstack/create_keypairs.py b/snaps/openstack/create_keypairs.py
index 83cfbbc..03ff7ec 100644
--- a/snaps/openstack/create_keypairs.py
+++ b/snaps/openstack/create_keypairs.py
@@ -130,4 +130,10 @@ class KeypairSettings:
self.private_filepath = kwargs.get('private_filepath')
if not self.name:
- raise Exception('Name is a required attribute')
+ raise KeypairSettingsError('Name is a required attribute')
+
+
+class KeypairSettingsError(Exception):
+ """
+ Exception to be thrown when keypair settings are incorrect
+ """