summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYuichi Ito <ito.yuichi0@gmail.com>2014-05-08 15:06:38 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2014-05-10 00:17:12 +0900
commitaad58663c0ecdcbecd25af20ac267d63694ce9fd (patch)
tree32cc0c1ff7de0320d6b25cd18a36da6729728be0
parentbee4846bc2cec1ad549a0a5365255b8e64f8a5aa (diff)
set default attributes for OFPPortMod
Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
-rw-r--r--ryu/ofproto/ofproto_v1_0_parser.py3
-rw-r--r--ryu/ofproto/ofproto_v1_2_parser.py3
-rw-r--r--ryu/ofproto/ofproto_v1_3_parser.py3
-rw-r--r--ryu/ofproto/ofproto_v1_4_parser.py5
4 files changed, 9 insertions, 5 deletions
diff --git a/ryu/ofproto/ofproto_v1_0_parser.py b/ryu/ofproto/ofproto_v1_0_parser.py
index 02023689..f01c222e 100644
--- a/ryu/ofproto/ofproto_v1_0_parser.py
+++ b/ryu/ofproto/ofproto_v1_0_parser.py
@@ -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
diff --git a/ryu/ofproto/ofproto_v1_2_parser.py b/ryu/ofproto/ofproto_v1_2_parser.py
index 2b2d48f6..4fbd4820 100644
--- a/ryu/ofproto/ofproto_v1_2_parser.py
+++ b/ryu/ofproto/ofproto_v1_2_parser.py
@@ -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
diff --git a/ryu/ofproto/ofproto_v1_3_parser.py b/ryu/ofproto/ofproto_v1_3_parser.py
index 13bf3854..c634e34c 100644
--- a/ryu/ofproto/ofproto_v1_3_parser.py
+++ b/ryu/ofproto/ofproto_v1_3_parser.py
@@ -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
diff --git a/ryu/ofproto/ofproto_v1_4_parser.py b/ryu/ofproto/ofproto_v1_4_parser.py
index 618b6762..819d6543 100644
--- a/ryu/ofproto/ofproto_v1_4_parser.py
+++ b/ryu/ofproto/ofproto_v1_4_parser.py
@@ -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()