vpp/test/vpp_mac.py

25 lines
364 B
Python
Raw Normal View History

"""
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