summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYAMAMOTO Takashi <yamamoto@valinux.co.jp>2013-02-25 17:43:37 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2013-02-25 19:59:31 +0900
commitbe17cd3fbd1bc5347f96552684876328ba8e6e2f (patch)
treefe5edf5d17b61464c727ee61eda9992cf70fe754
parentc36d388a150e9b1e157535b27530fab38de1dcfc (diff)
appease pep8
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/controller/network.py3
-rw-r--r--ryu/lib/packet/icmpv6.py3
-rw-r--r--ryu/lib/packet/ipv6.py2
-rw-r--r--ryu/lib/xflow/sflow.py18
4 files changed, 14 insertions, 12 deletions
diff --git a/ryu/controller/network.py b/ryu/controller/network.py
index fbd95adf..e576eb56 100644
--- a/ryu/controller/network.py
+++ b/ryu/controller/network.py
@@ -227,7 +227,8 @@ class DPIDs(dict):
port.mac_address = mac_address
if port.network_id and port.mac_address:
self.send_event(EventMacAddress(
- dpid, port_no, port.network_id, port.mac_address, True))
+ dpid, port_no, port.network_id, port.mac_address,
+ True))
def set_mac(self, network_id, dpid, port_no, mac_address):
port = self.get_port(dpid, port_no)
diff --git a/ryu/lib/packet/icmpv6.py b/ryu/lib/packet/icmpv6.py
index eef450fe..5b50c956 100644
--- a/ryu/lib/packet/icmpv6.py
+++ b/ryu/lib/packet/icmpv6.py
@@ -171,7 +171,8 @@ class nd_neighbor(object):
return hdr
-@nd_neighbor.register_nd_option_type(nd_neighbor.ND_OPTION_SLA, nd_neighbor.ND_OPTION_TLA)
+@nd_neighbor.register_nd_option_type(nd_neighbor.ND_OPTION_SLA,
+ nd_neighbor.ND_OPTION_TLA)
class nd_option_la(object):
_PACK_STR = '!6s'
_MIN_LEN = struct.calcsize(_PACK_STR)
diff --git a/ryu/lib/packet/ipv6.py b/ryu/lib/packet/ipv6.py
index 2464395c..5380fb27 100644
--- a/ryu/lib/packet/ipv6.py
+++ b/ryu/lib/packet/ipv6.py
@@ -49,7 +49,7 @@ class ipv6(packet_base.PacketBase):
payload_length = plen
hop_limit = hlim
msg = cls(version, traffic_class, flow_label, payload_length,
- nxt, hop_limit, src, dst)
+ nxt, hop_limit, src, dst)
if msg.length > ipv6._MIN_LEN:
msg.option = buf[ipv6._MIN_LEN:msg.length]
diff --git a/ryu/lib/xflow/sflow.py b/ryu/lib/xflow/sflow.py
index 312e6ee7..4e80b566 100644
--- a/ryu/lib/xflow/sflow.py
+++ b/ryu/lib/xflow/sflow.py
@@ -60,7 +60,7 @@ class sFlowV5(object):
_MIN_LEN_V6 = struct.calcsize(_PACK_STR_IPV6)
def __init__(self, version, address_type, agent_address, sub_agent_id,
- sequence_number, uptime, samples_num, samples):
+ sequence_number, uptime, samples_num, samples):
super(sFlowV5, self).__init__()
self.version = version
self.address_type = address_type
@@ -83,7 +83,7 @@ class sFlowV5(object):
min_len = cls._MIN_LEN_V6
else:
LOG.info("Unknown address_type. sFlowV5.address_type=%d"
- % address_type)
+ % address_type)
return None
(version, address_type, agent_address, sub_agent_id, sequence_number,
@@ -138,7 +138,7 @@ class sFlowV5Sample(object):
# sample_format == 3 : Expanded Flow Sample
# sample_format == 4 : Expanded Counter Sample
LOG.info("Unknown format. sFlowV5Sample.sample_format=%d"
- % sample_format)
+ % sample_format)
pack_str = '!%sc' % sample_length
sample = struct.unpack_from(pack_str, buf, offset)
@@ -151,8 +151,8 @@ class sFlowV5FlowSample(object):
_PACK_STR = '!IIIIIIII'
def __init__(self, sequence_number, source_id_type, source_id_index,
- sampling_rate, sample_pool, drops, input_if, output_if,
- flow_records_num, flow_records):
+ sampling_rate, sample_pool, drops, input_if, output_if,
+ flow_records_num, flow_records):
super(sFlowV5FlowSample, self).__init__()
self.sequence_number = sequence_number
self.source_id_type = source_id_type
@@ -198,7 +198,7 @@ class sFlowV5FlowRecord(object):
MIN_LEN = struct.calcsize(_PACK_STR)
def __init__(self, enterprise, flow_data_format,
- flow_data_length, flow_data):
+ flow_data_length, flow_data):
super(sFlowV5FlowRecord, self).__init__()
self.enterprise = enterprise
self.flow_data_format = flow_data_format
@@ -241,7 +241,7 @@ class sFlowV5FlowRecord(object):
# flow_data_format == 1011 : Extended MPLS LVP FEC
# flow_data_format == 1012 : Extended VLAN tunnel
LOG.info("Unknown format. sFlowV5FlowRecord.flow_data_format=%d"
- % flow_data_format)
+ % flow_data_format)
pack_str = '!%sc' % flow_data_length
flow_data = struct.unpack_from(pack_str, buf, offset)
@@ -299,7 +299,7 @@ class sFlowV5CounterSample(object):
_PACK_STR = '!III'
def __init__(self, sequence_number, source_id_type, source_id_index,
- counters_records_num, counters_records):
+ counters_records_num, counters_records):
super(sFlowV5CounterSample, self).__init__()
self.sequence_number = sequence_number
self.source_id_type = source_id_type
@@ -339,7 +339,7 @@ class sFlowV5CounterRecord(object):
MIN_LEN = struct.calcsize(_PACK_STR)
def __init__(self, enterprise, counter_data_format,
- counter_data_length, counter_data):
+ counter_data_length, counter_data):
super(sFlowV5CounterRecord, self).__init__()
self.enterprise = enterprise
self.counter_data_format = counter_data_format