summaryrefslogtreecommitdiffstats
path: root/test/vpp_mac.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/vpp_mac.py')
-rw-r--r--test/vpp_mac.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/vpp_mac.py b/test/vpp_mac.py
new file mode 100644
index 00000000000..c9ee11e6658
--- /dev/null
+++ b/test/vpp_mac.py
@@ -0,0 +1,24 @@
+"""
+ MAC Types
+
+"""
+
+from util import mactobinary
+
+
+class VppMacAddress():
+ def __init__(self, addr):
+ self.address = addr
+
+ def encode(self):
+ return {
+ 'bytes': self.bytes
+ }
+
+ @property
+ def bytes(self):
+ return mactobinary(self.address)
+
+ @property
+ def address(self):
+ return self.addr.address