
- 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>
25 lines
364 B
Python
25 lines
364 B
Python
"""
|
|
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
|