set default attributes for OFPPortMod

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
This commit is contained in:
Yuichi Ito 2014-05-08 15:06:38 +09:00 committed by FUJITA Tomonori
parent bee4846bc2
commit aad58663c0
4 changed files with 9 additions and 5 deletions

View File

@ -2150,7 +2150,8 @@ class OFPPortMod(MsgBase):
]
}
def __init__(self, datapath, port_no, hw_addr, config, mask, advertise):
def __init__(self, datapath, port_no=0, hw_addr='00:00:00:00:00:00',
config=0, mask=0, advertise=0):
super(OFPPortMod, self).__init__(datapath)
self.port_no = port_no
self.hw_addr = hw_addr

View File

@ -1763,7 +1763,8 @@ class OFPPortMod(MsgBase):
]
}
def __init__(self, datapath, port_no, hw_addr, config, mask, advertise):
def __init__(self, datapath, port_no=0, hw_addr='00:00:00:00:00:00',
config=0, mask=0, advertise=0):
super(OFPPortMod, self).__init__(datapath)
self.port_no = port_no
self.hw_addr = hw_addr

View File

@ -3346,7 +3346,8 @@ class OFPPortMod(MsgBase):
]
}
def __init__(self, datapath, port_no, hw_addr, config, mask, advertise):
def __init__(self, datapath, port_no=0, hw_addr='00:00:00:00:00:00',
config=0, mask=0, advertise=0):
super(OFPPortMod, self).__init__(datapath)
self.port_no = port_no
self.hw_addr = hw_addr

View File

@ -5541,13 +5541,14 @@ class OFPPortMod(MsgBase):
]
}
def __init__(self, datapath, port_no, hw_addr, config, mask, properties):
def __init__(self, datapath, port_no=0, hw_addr='00:00:00:00:00:00',
config=0, mask=0, properties=None):
super(OFPPortMod, self).__init__(datapath)
self.port_no = port_no
self.hw_addr = hw_addr
self.config = config
self.mask = mask
self.properties = properties
self.properties = properties or []
def _serialize_body(self):
bin_props = bytearray()