aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/common/exceptions.py
diff options
context:
space:
mode:
authorMiikka Koistinen <miikka.koistinen@nokia.com>2018-07-30 16:01:14 +0300
committerMiikka Koistinen <miikka.koistinen@nokia.com>2018-07-30 16:01:14 +0300
commit43c189b709b49b9b0b3b5d9dedd40872e2dff4cb (patch)
treef97ed992e8f3362833ebce15ca1164533d5097cb /yardstick/common/exceptions.py
parentd82856a7b717a3b48c3dfb21bf5d270c0be335ff (diff)
Change assert statement to raise in common/utils
This modification utilises a custom exception to be raised if an invalid mac address is passed to the function "mac_address_to_hex_list". JIRA: YARDSTICK-966 Change-Id: Ic2940276f500e9710c54963a445a137e73bd6b25 Signed-off-by: Miikka Koistinen <miikka.koistinen@nokia.com>
Diffstat (limited to 'yardstick/common/exceptions.py')
-rw-r--r--yardstick/common/exceptions.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/yardstick/common/exceptions.py b/yardstick/common/exceptions.py
index a559ab4bc..48f15c059 100644
--- a/yardstick/common/exceptions.py
+++ b/yardstick/common/exceptions.py
@@ -404,3 +404,7 @@ class AclMissingActionArguments(YardstickException):
class AclUnknownActionTemplate(YardstickException):
message = 'No ACL CLI template found for "%(action_name)s" action'
+
+
+class InvalidMacAddress(YardstickException):
+ message = 'Mac address "%(mac_address)s" is invalid'