From c0a93143412b4be7bba087bf633855aeeaee7c56 Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Wed, 5 Sep 2018 15:42:26 -0700 Subject: 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 --- test/vpp_mac.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 test/vpp_mac.py (limited to 'test/vpp_mac.py') 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 -- cgit 1.2.3-korg