aboutsummaryrefslogtreecommitdiffstats
path: root/test/vpp_mac.py
diff options
context:
space:
mode:
authorNeale Ranns <neale.ranns@cisco.com>2018-09-05 15:42:26 -0700
committerNeale Ranns <nranns@cisco.com>2018-09-11 16:00:29 +0000
commitc0a93143412b4be7bba087bf633855aeeaee7c56 (patch)
treed3031d3a0af0963f75b54c169299425cd5d63319 /test/vpp_mac.py
parent0d8cbc1b1503b633fd024e498e7664b489841075 (diff)
GBP Endpoint Updates
- common types on the API - endpoints keyed in various ways for DP lookup - conparison functions for VPP IP address types Change-Id: If7ec0bbc5cea71fd0983fe78987d147ec1bd7ec8 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
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