On Fri, 13 Dec 2013 13:44:08 +0900 "ishida wataru" <[email protected]> wrote:
> fletcher checksum function for OSPF LSA checksum. > refer to RFC1008. > > Signed-off-by: Wataru ISHIDA <[email protected]> > --- > ryu/lib/packet/packet_utils.py | 35 +++++++++++++++++++++++++++++++++++ > 1 file changed, 35 insertions(+) I got the following pep8 errors. Can you fix and resend? Running pep8 ... ryu/lib/packet/ospf.py:23:15: E221 multiple spaces before operator OSPF_MSG_HELLO = 1 ^ ryu/lib/packet/ospf.py:25:16: E221 multiple spaces before operator OSPF_MSG_LS_REQ = 3 ^ ryu/lib/packet/ospf.py:26:16: E221 multiple spaces before operator OSPF_MSG_LS_UPD = 4 ^ ryu/lib/packet/ospf.py:27:16: E221 multiple spaces before operator OSPF_MSG_LS_ACK = 5 ^ ryu/lib/packet/ospf.py:29:17: E221 multiple spaces before operator OSPF_UNKNOWN_LSA = 0 ^ ryu/lib/packet/ospf.py:30:16: E221 multiple spaces before operator OSPF_ROUTER_LSA = 1 ^ ryu/lib/packet/ospf.py:31:17: E221 multiple spaces before operator OSPF_NETWORK_LSA = 2 ^ ryu/lib/packet/ospf.py:32:17: E221 multiple spaces before operator OSPF_SUMMARY_LSA = 3 ^ ryu/lib/packet/ospf.py:34:21: E221 multiple spaces before operator OSPF_AS_EXTERNAL_LSA = 5 ^ ryu/lib/packet/ospf.py:35:17: E221 multiple spaces before operator OSPF_AS_NSSA_LSA = 7 #RFC 3101 ^ ryu/lib/packet/ospf.py:35:28: E262 inline comment should start with '# ' OSPF_AS_NSSA_LSA = 7 #RFC 3101 ^ ryu/lib/packet/ospf.py:36:21: E221 multiple spaces before operator OSPF_OPAQUE_LINK_LSA = 9 #RFC 5250 ^ ryu/lib/packet/ospf.py:36:28: E262 inline comment should start with '# ' OSPF_OPAQUE_LINK_LSA = 9 #RFC 5250 ^ ryu/lib/packet/ospf.py:37:21: E221 multiple spaces before operator OSPF_OPAQUE_AREA_LSA = 10 #RFC 5250 ^ ryu/lib/packet/ospf.py:37:27: E261 at least two spaces before inline comment OSPF_OPAQUE_AREA_LSA = 10 #RFC 5250 ^ ryu/lib/packet/ospf.py:37:28: E262 inline comment should start with '# ' OSPF_OPAQUE_AREA_LSA = 10 #RFC 5250 ^ ryu/lib/packet/ospf.py:38:19: E221 multiple spaces before operator OSPF_OPAQUE_AS_LSA = 11 #RFC 5250 ^ ryu/lib/packet/ospf.py:38:27: E261 at least two spaces before inline comment OSPF_OPAQUE_AS_LSA = 11 #RFC 5250 ^ ryu/lib/packet/ospf.py:38:28: E262 inline comment should start with '# ' OSPF_OPAQUE_AS_LSA = 11 #RFC 5250 ^ ryu/lib/packet/ospf.py:40:14: E221 multiple spaces before operator OSPF_OPTION_T = 1 # Obsolete ^ ryu/lib/packet/ospf.py:41:14: E221 multiple spaces before operator OSPF_OPTION_E = 1 << 1 # RFC 2328 ^ ryu/lib/packet/ospf.py:41:24: E261 at least two spaces before inline comment OSPF_OPTION_E = 1 << 1 # RFC 2328 ^ ryu/lib/packet/ospf.py:42:24: E261 at least two spaces before inline comment OSPF_OPTION_MC = 1 << 2 # RFC 1584 ^ ryu/lib/packet/ospf.py:43:24: E261 at least two spaces before inline comment OSPF_OPTION_NP = 1 << 3 # RFC 3101 ^ ryu/lib/packet/ospf.py:44:24: E261 at least two spaces before inline comment OSPF_OPTION_EA = 1 << 4 # Obsolete ^ ryu/lib/packet/ospf.py:45:24: E261 at least two spaces before inline comment OSPF_OPTION_DC = 1 << 5 # RFC 2370 ^ ryu/lib/packet/ospf.py:46:24: E261 at least two spaces before inline comment OSPF_OPTION_DN = 1 << 7 # RFC 2567 ^ ryu/lib/packet/ospf.py:48:18: E221 multiple spaces before operator LSA_LINK_TYPE_P2P = 1 ^ ryu/lib/packet/ospf.py:50:19: E221 multiple spaces before operator LSA_LINK_TYPE_STUB = 3 ^ ryu/lib/packet/ospf.py:51:17: E221 multiple spaces before operator LSA_LINK_TYPE_VL = 4 ^ ryu/lib/packet/ospf.py:53:18: E221 multiple spaces before operator ROUTER_LSA_BORDER = 0x01 # The router is an ABR ^ ryu/lib/packet/ospf.py:53:27: E261 at least two spaces before inline comment ROUTER_LSA_BORDER = 0x01 # The router is an ABR ^ ryu/lib/packet/ospf.py:54:27: E261 at least two spaces before inline comment ROUTER_LSA_EXTERNAL = 0x02 # The router is an ASBR ^ ryu/lib/packet/ospf.py:55:19: E221 multiple spaces before operator ROUTER_LSA_VIRTUAL = 0x04 # The router has a VL in this area ^ ryu/lib/packet/ospf.py:55:27: E261 at least two spaces before inline comment ROUTER_LSA_VIRTUAL = 0x04 # The router has a VL in this area ^ ryu/lib/packet/ospf.py:56:14: E221 multiple spaces before operator ROUTER_LSA_NT = 0x10 # The router always translates Type-7 ^ ryu/lib/packet/ospf.py:56:27: E261 at least two spaces before inline comment ROUTER_LSA_NT = 0x10 # The router always translates Type-7 ^ ryu/lib/packet/ospf.py:57:27: E261 at least two spaces before inline comment ROUTER_LSA_SHORTCUT = 0x20 # Shortcut-ABR specific flag ^ ryu/lib/packet/ospf.py:61:1: E302 expected 2 blank lines, found 1 def log(msg): ^ ryu/lib/packet/ospf.py:64:1: E302 expected 2 blank lines, found 1 def hexdump(bin_): ^ ryu/lib/packet/ospf.py:70:23: E225 missing whitespace around operator log("%d: %s" %(i, line)) ^ ryu/lib/packet/ospf.py:72:1: E302 expected 2 blank lines, found 1 class InvalidChecksum(Exception): ^ ryu/lib/packet/ospf.py:75:1: E302 expected 2 blank lines, found 1 class _TypeDisp(object): ^ ryu/lib/packet/ospf.py:111:1: E302 expected 2 blank lines, found 1 class LSAHeader(StringifyMixin): ^ ryu/lib/packet/ospf.py:116:13: E128 continuation line under-indented for visual indent id_='0.0.0.0', adv_router='0.0.0.0', ls_seqnum=0, checksum=None, ^ ryu/lib/packet/ospf.py:117:13: E128 continuation line under-indented for visual indent length=None): ^ ryu/lib/packet/ospf.py:133:17: E127 continuation line over-indented for visual indent checksum, length,) = struct.unpack_from(cls._HDR_PACK_STR, ^ ryu/lib/packet/ospf.py:134:54: E128 continuation line under-indented for visual indent buffer(buf)) ^ ryu/lib/packet/ospf.py:138:1: W293 blank line contains whitespace ^ ryu/lib/packet/ospf.py:140:21: E203 whitespace before ':' "ls_age" : ls_age, ^ ryu/lib/packet/ospf.py:141:22: E203 whitespace before ':' "options" : options, ^ ryu/lib/packet/ospf.py:142:20: E203 whitespace before ':' "type_" : type_, ^ ryu/lib/packet/ospf.py:143:18: E203 whitespace before ':' "id_" : id_, ^ ryu/lib/packet/ospf.py:144:25: E203 whitespace before ':' "adv_router" : adv_router, ^ ryu/lib/packet/ospf.py:145:24: E203 whitespace before ':' "ls_seqnum" : ls_seqnum, ^ ryu/lib/packet/ospf.py:146:23: E203 whitespace before ':' "checksum" : checksum, ^ ryu/lib/packet/ospf.py:147:21: E203 whitespace before ':' "length" : length, ^ ryu/lib/packet/ospf.py:153:70: W291 trailing whitespace return bytearray(struct.pack(self._HDR_PACK_STR, self.ls_age, ^ ryu/lib/packet/ospf.py:154:13: E128 continuation line under-indented for visual indent self.options, self.type_, id_, adv_router, self.ls_seqnum, ^ ryu/lib/packet/ospf.py:154:71: W291 trailing whitespace self.options, self.type_, id_, adv_router, self.ls_seqnum, ^ ryu/lib/packet/ospf.py:155:13: E128 continuation line under-indented for visual indent self.checksum, self.length)) ^ ryu/lib/packet/ospf.py:157:1: E302 expected 2 blank lines, found 1 class LSA(_TypeDisp,StringifyMixin): ^ ryu/lib/packet/ospf.py:157:20: E231 missing whitespace after ',' class LSA(_TypeDisp,StringifyMixin): ^ ryu/lib/packet/ospf.py:159:13: E128 continuation line under-indented for visual indent id_='0.0.0.0', adv_router='0.0.0.0', ls_seqnum=0, checksum=None, ^ ryu/lib/packet/ospf.py:160:13: E128 continuation line under-indented for visual indent length=None): ^ ryu/lib/packet/ospf.py:162:17: E128 continuation line under-indented for visual indent ls_seqnum, 0, 0) ^ ryu/lib/packet/ospf.py:168:63: E231 missing whitespace after ',' checksum = packet_utils.fletcher_checksum(head[2:],14) ^ ryu/lib/packet/ospf.py:170:40: W291 trailing whitespace self.header.checksum = checksum ^ ryu/lib/packet/ospf.py:176:67: E231 missing whitespace after ',' csum = packet_utils.fletcher_checksum(buf[2:hdr['length']],14) ^ ryu/lib/packet/ospf.py:178:34: W602 deprecated form of raising exception raise InvalidChecksum,\ ^ ryu/lib/packet/ospf.py:179:9: E122 continuation line missing indentation or outdented "header has %d, but calculated value is %d" % (hdr['checksum'],csum) ^ ryu/lib/packet/ospf.py:179:71: E231 missing whitespace after ',' "header has %d, but calculated value is %d" % (hdr['checksum'],csum) ^ ryu/lib/packet/ospf.py:192:60: E231 missing whitespace after ',' csum = packet_utils.fletcher_checksum(head[2:]+tail,14) ^ ryu/lib/packet/ospf.py:196:1: W293 blank line contains whitespace ^ ryu/lib/packet/ospf.py:197:1: E302 expected 2 blank lines, found 1 @LSA.register_type(OSPF_ROUTER_LSA) ^ ryu/lib/packet/ospf.py:200:43: E261 at least two spaces before inline comment _PACK_LEN = struct.calcsize(_PACK_STR) # 4bytes ^ ryu/lib/packet/ospf.py:201:1: W293 blank line contains whitespace ^ ryu/lib/packet/ospf.py:204:47: E261 at least two spaces before inline comment _PACK_LEN = struct.calcsize(_PACK_STR) # 12bytes ^ ryu/lib/packet/ospf.py:206:58: W291 trailing whitespace def __init__(self, id_='0.0.0.0', data='0.0.0.0', ^ ryu/lib/packet/ospf.py:207:17: E128 continuation line under-indented for visual indent type_=LSA_LINK_TYPE_STUB, tos=0, metric=10): ^ ryu/lib/packet/ospf.py:226:1: W293 blank line contains whitespace ^ ryu/lib/packet/ospf.py:231:17: E128 continuation line under-indented for visual indent self.tos, self.metric)) ^ ryu/lib/packet/ospf.py:234:13: E128 continuation line under-indented for visual indent id_='0.0.0.0', adv_router='0.0.0.0', ls_seqnum=0, checksum=None, ^ ryu/lib/packet/ospf.py:235:13: E128 continuation line under-indented for visual indent length=None, flags=0, links=[]): ^ ryu/lib/packet/ospf.py:239:17: E128 continuation line under-indented for visual indent adv_router, ls_seqnum, checksum, length) ^ ryu/lib/packet/ospf.py:252:20: E203 whitespace before ':' "flags" : flags, ^ ryu/lib/packet/ospf.py:253:20: E203 whitespace before ':' "links" : links, ^ ryu/lib/packet/ospf.py:257:68: W291 trailing whitespace head = bytearray(struct.pack(self._PACK_STR, self.flags, 0, ^ ryu/lib/packet/ospf.py:258:13: E128 continuation line under-indented for visual indent len(self.links))) ^ ryu/lib/packet/ospf.py:260:42: E231 missing whitespace after ',' return head + reduce(lambda a,b: a+b, ^ ryu/lib/packet/ospf.py:261:21: E128 continuation line under-indented for visual indent (link.serialize() for link in self.links)) ^ ryu/lib/packet/ospf.py:265:1: E302 expected 2 blank lines, found 1 @LSA.register_type(OSPF_NETWORK_LSA) ^ ryu/lib/packet/ospf.py:269:5: E301 expected 1 blank line, found 0 def __init__(self, ls_age=0, options=0, type_=OSPF_NETWORK_LSA, ^ ryu/lib/packet/ospf.py:270:13: E128 continuation line under-indented for visual indent id_='0.0.0.0', adv_router='0.0.0.0', ls_seqnum=0, checksum=None, ^ ryu/lib/packet/ospf.py:271:13: E128 continuation line under-indented for visual indent length=None, mask='0.0.0.0', routers=[]): ^ ryu/lib/packet/ospf.py:275:17: E128 continuation line under-indented for visual indent adv_router, ls_seqnum, checksum, length) ^ ryu/lib/packet/ospf.py:276:5: E301 expected 1 blank line, found 0 @classmethod ^ ryu/lib/packet/ospf.py:293:19: E203 whitespace before ':' "mask" : mask, ^ ryu/lib/packet/ospf.py:294:22: E203 whitespace before ':' "routers" : routers, ^ ryu/lib/packet/ospf.py:300:17: E127 continuation line over-indented for visual indent [addrconv.ipv4.text_to_bin(router) for router in self.routers] ^ ryu/lib/packet/ospf.py:302:41: E127 continuation line over-indented for visual indent *routers)) ^ ryu/lib/packet/ospf.py:304:1: E302 expected 2 blank lines, found 1 @LSA.register_type(OSPF_SUMMARY_LSA) ^ ryu/lib/packet/ospf.py:308:1: E302 expected 2 blank lines, found 1 @LSA.register_type(OSPF_ASBR_SUMMARY_LSA) ^ ryu/lib/packet/ospf.py:312:1: E302 expected 2 blank lines, found 1 @LSA.register_type(OSPF_AS_EXTERNAL_LSA) ^ ryu/lib/packet/ospf.py:318:62: W291 trailing whitespace def __init__(self, mask='0.0.0.0', flags=0, metric=0, ^ ryu/lib/packet/ospf.py:319:17: E128 continuation line under-indented for visual indent fwd_addr='0.0.0.0', tag=0): ^ ryu/lib/packet/ospf.py:334:21: E127 continuation line over-indented for visual indent struct.unpack_from(cls._PACK_STR, buffer(ext_nw)) ^ ryu/lib/packet/ospf.py:339:1: W293 blank line contains whitespace ^ ryu/lib/packet/ospf.py:346:17: E128 continuation line under-indented for visual indent metric_fst, metric_lst, fwd_addr, self.tag)) ^ ryu/lib/packet/ospf.py:349:13: E128 continuation line under-indented for visual indent id_='0.0.0.0', adv_router='0.0.0.0', ls_seqnum=0, checksum=None, ^ ryu/lib/packet/ospf.py:350:13: E128 continuation line under-indented for visual indent length=None, extnws=[]): ^ ryu/lib/packet/ospf.py:353:17: E128 continuation line under-indented for visual indent adv_router, ls_seqnum, checksum, length) ^ ryu/lib/packet/ospf.py:362:21: E203 whitespace before ':' "extnws" : extnws, ^ ryu/lib/packet/ospf.py:366:31: E231 missing whitespace after ',' return reduce(lambda a,b: a+b, ^ ryu/lib/packet/ospf.py:366:39: W291 trailing whitespace return reduce(lambda a,b: a+b, ^ ryu/lib/packet/ospf.py:367:17: E128 continuation line under-indented for visual indent (extnw.serialize() for extnw in self.extnws)) ^ ryu/lib/packet/ospf.py:369:1: E302 expected 2 blank lines, found 1 @LSA.register_type(OSPF_AS_NSSA_LSA) ^ ryu/lib/packet/ospf.py:373:1: E302 expected 2 blank lines, found 1 @LSA.register_type(OSPF_OPAQUE_LINK_LSA) ^ ryu/lib/packet/ospf.py:377:1: E302 expected 2 blank lines, found 1 @LSA.register_type(OSPF_OPAQUE_AREA_LSA) ^ ryu/lib/packet/ospf.py:381:1: E302 expected 2 blank lines, found 1 @LSA.register_type(OSPF_OPAQUE_AS_LSA) ^ ryu/lib/packet/ospf.py:385:1: E302 expected 2 blank lines, found 1 class OSPFMessage(packet_base.PacketBase, _TypeDisp): ^ ryu/lib/packet/ospf.py:393:13: E128 continuation line under-indented for visual indent area_id='0.0.0.0', au_type=1, authentication=0, checksum=None, ^ ryu/lib/packet/ospf.py:393:75: W291 trailing whitespace area_id='0.0.0.0', au_type=1, authentication=0, checksum=None, ^ ryu/lib/packet/ospf.py:394:13: E128 continuation line under-indented for visual indent version=_VERSION): ^ ryu/lib/packet/ospf.py:403:1: W293 blank line contains whitespace ^ ryu/lib/packet/ospf.py:410:12: E127 continuation line over-indented for visual indent authentication) = struct.unpack_from(cls._HDR_PACK_STR, buffer(buf)) ^ ryu/lib/packet/ospf.py:411:1: W293 blank line contains whitespace ^ ryu/lib/packet/ospf.py:427:59: W291 trailing whitespace return subcls(length, router_id, area_id, au_type, ^ ryu/lib/packet/ospf.py:428:17: E128 continuation line under-indented for visual indent authentication, checksum, version, **kwargs), None, rest ^ ryu/lib/packet/ospf.py:433:71: W291 trailing whitespace head = bytearray(struct.pack(self._HDR_PACK_STR, self.version, ^ ryu/lib/packet/ospf.py:434:13: E128 continuation line under-indented for visual indent self.type_, self.length, ^ ryu/lib/packet/ospf.py:435:13: E128 continuation line under-indented for visual indent addrconv.ipv4.text_to_bin(self.router_id), ^ ryu/lib/packet/ospf.py:436:13: E128 continuation line under-indented for visual indent addrconv.ipv4.text_to_bin(self.area_id), 0, ^ ryu/lib/packet/ospf.py:437:13: E128 continuation line under-indented for visual indent self.au_type, self.authentication)) ^ ryu/lib/packet/ospf.py:447:1: E302 expected 2 blank lines, found 1 @OSPFMessage.register_type(OSPF_MSG_HELLO) ^ ryu/lib/packet/ospf.py:450:30: E261 at least two spaces before inline comment _PACK_STR = '!4sHBBI4s4s' # + neighbors ^ ryu/lib/packet/ospf.py:453:1: W293 blank line contains whitespace ^ ryu/lib/packet/ospf.py:455:13: E128 continuation line under-indented for visual indent au_type=1, authentication=0, checksum=None, version=_VERSION, ^ ryu/lib/packet/ospf.py:456:13: E128 continuation line under-indented for visual indent mask='0.0.0.0', hello_interval=10, options=0, priority=1, ^ ryu/lib/packet/ospf.py:456:70: W291 trailing whitespace mask='0.0.0.0', hello_interval=10, options=0, priority=1, ^ ryu/lib/packet/ospf.py:457:13: E128 continuation line under-indented for visual indent dead_interval=40, designated_router='0.0.0.0', ^ ryu/lib/packet/ospf.py:458:13: E128 continuation line under-indented for visual indent backup_router='0.0.0.0', neighbors=[]): ^ ryu/lib/packet/ospf.py:459:75: W291 trailing whitespace super(OSPFHello, self).__init__(OSPF_MSG_HELLO, length, router_id, ^ ryu/lib/packet/ospf.py:460:17: E128 continuation line under-indented for visual indent area_id, au_type, authentication, checksum, version) ^ ryu/lib/packet/ospf.py:472:65: W291 trailing whitespace (mask, hello_interval, options, priority, dead_interval, ^ ryu/lib/packet/ospf.py:486:19: E203 whitespace before ':' "mask" : mask, ^ ryu/lib/packet/ospf.py:487:29: E203 whitespace before ':' "hello_interval" : hello_interval, ^ ryu/lib/packet/ospf.py:488:22: E203 whitespace before ':' "options" : options, ^ ryu/lib/packet/ospf.py:489:23: E203 whitespace before ':' "priority" : priority, ^ ryu/lib/packet/ospf.py:490:28: E203 whitespace before ':' "dead_interval" : dead_interval, ^ ryu/lib/packet/ospf.py:491:32: E203 whitespace before ':' "designated_router" : designated_router, ^ ryu/lib/packet/ospf.py:492:28: E203 whitespace before ':' "backup_router" : backup_router, ^ ryu/lib/packet/ospf.py:493:24: E203 whitespace before ':' "neighbors" : neighbors, ^ ryu/lib/packet/ospf.py:498:13: E128 continuation line under-indented for visual indent addrconv.ipv4.text_to_bin(self.mask), ^ ryu/lib/packet/ospf.py:499:13: E128 continuation line under-indented for visual indent self.hello_interval, ^ ryu/lib/packet/ospf.py:500:13: E128 continuation line under-indented for visual indent self.options, ^ ryu/lib/packet/ospf.py:501:13: E128 continuation line under-indented for visual indent self.priority, ^ ryu/lib/packet/ospf.py:502:13: E128 continuation line under-indented for visual indent self.dead_interval, ^ ryu/lib/packet/ospf.py:503:13: E128 continuation line under-indented for visual indent addrconv.ipv4.text_to_bin(self.designated_router), ^ ryu/lib/packet/ospf.py:504:13: E128 continuation line under-indented for visual indent addrconv.ipv4.text_to_bin(self.backup_router))) ^ ryu/lib/packet/ospf.py:506:42: E231 missing whitespace after ',' return head + reduce(lambda a,b: a+b, ^ ryu/lib/packet/ospf.py:507:21: E128 continuation line under-indented for visual indent (addrconv.ipv4.text_to_bin(n) for n in self.neighbors)) ^ ryu/lib/packet/ospf.py:511:1: E302 expected 2 blank lines, found 1 @OSPFMessage.register_type(OSPF_MSG_DB_DESC) ^ ryu/lib/packet/ospf.py:514:24: E261 at least two spaces before inline comment _PACK_STR = '!HBBI' # + LSA_HEADERS ^ ryu/lib/packet/ospf.py:519:13: E128 continuation line under-indented for visual indent au_type=1, authentication=0, checksum=None, version=_VERSION, ^ ryu/lib/packet/ospf.py:520:13: E128 continuation line under-indented for visual indent mtu=1500, options=0, i_flag=0, m_flag=0, ms_flag=0, ^ ryu/lib/packet/ospf.py:520:64: W291 trailing whitespace mtu=1500, options=0, i_flag=0, m_flag=0, ms_flag=0, ^ ryu/lib/packet/ospf.py:521:13: E128 continuation line under-indented for visual indent sequence_number=0, lsa_headers=[]): ^ ryu/lib/packet/ospf.py:522:78: W291 trailing whitespace super(OSPFDBDesc, self).__init__(OSPF_MSG_DB_DESC, length, router_id, ^ ryu/lib/packet/ospf.py:523:17: E128 continuation line under-indented for visual indent area_id, au_type, authentication, checksum, version) ^ ryu/lib/packet/ospf.py:531:1: W293 blank line contains whitespace ^ ryu/lib/packet/ospf.py:535:17: E126 continuation line over-indented for hanging indent struct.unpack_from(cls._PACK_STR, buffer(buf)) ^ ryu/lib/packet/ospf.py:545:18: E203 whitespace before ':' "mtu" : mtu, ^ ryu/lib/packet/ospf.py:546:22: E203 whitespace before ':' "options" : options, ^ ryu/lib/packet/ospf.py:547:21: E203 whitespace before ':' "i_flag" : i_flag, ^ ryu/lib/packet/ospf.py:548:21: E203 whitespace before ':' "m_flag" : m_flag, ^ ryu/lib/packet/ospf.py:549:22: E203 whitespace before ':' "ms_flag" : ms_flag, ^ ryu/lib/packet/ospf.py:550:30: E203 whitespace before ':' "sequence_number" : sequence_number, ^ ryu/lib/packet/ospf.py:551:26: E203 whitespace before ':' "lsa_headers" : lsahdrs, ^ ryu/lib/packet/ospf.py:558:63: W291 trailing whitespace head = bytearray(struct.pack(self._PACK_STR, self.mtu, ^ ryu/lib/packet/ospf.py:559:13: E128 continuation line under-indented for visual indent self.options, flags, self.sequence_number)) ^ ryu/lib/packet/ospf.py:561:42: E231 missing whitespace after ',' return head + reduce(lambda a,b: a+b, ^ ryu/lib/packet/ospf.py:562:21: E128 continuation line under-indented for visual indent (hdr.serialize() for hdr in self.lsa_headers)) ^ ryu/lib/packet/ospf.py:566:1: E302 expected 2 blank lines, found 1 @OSPFMessage.register_type(OSPF_MSG_LS_REQ) ^ ryu/lib/packet/ospf.py:575:17: E128 continuation line under-indented for visual indent id_='0.0.0.0', adv_router='0.0.0.0'): ^ ryu/lib/packet/ospf.py:588:21: E128 continuation line under-indented for visual indent buffer(link)) ^ ryu/lib/packet/ospf.py:591:47: E231 missing whitespace after ',' return cls(type_, id_, adv_router),rest ^ ryu/lib/packet/ospf.py:592:1: W293 blank line contains whitespace ^ ryu/lib/packet/ospf.py:597:53: E127 continuation line over-indented for visual indent id_, adv_router)) ^ ryu/lib/packet/ospf.py:598:1: W293 blank line contains whitespace ^ ryu/lib/packet/ospf.py:600:13: E128 continuation line under-indented for visual indent au_type=1, authentication=0, checksum=None, version=_VERSION, ^ ryu/lib/packet/ospf.py:601:13: E128 continuation line under-indented for visual indent lsa_requests=[]): ^ ryu/lib/packet/ospf.py:603:17: E128 continuation line under-indented for visual indent area_id, au_type, authentication, checksum, version) ^ ryu/lib/packet/ospf.py:613:27: E203 whitespace before ':' "lsa_requests" : reqs, ^ ryu/lib/packet/ospf.py:617:31: E231 missing whitespace after ',' return reduce(lambda a,b: a+b, ^ ryu/lib/packet/ospf.py:618:17: E128 continuation line under-indented for visual indent (req.serialize() for req in self.lsa_requests)) ^ ryu/lib/packet/ospf.py:620:1: E302 expected 2 blank lines, found 1 @OSPFMessage.register_type(OSPF_MSG_LS_UPD) ^ ryu/lib/packet/ospf.py:625:1: W293 blank line contains whitespace ^ ryu/lib/packet/ospf.py:627:13: E128 continuation line under-indented for visual indent au_type=1, authentication=0, checksum=None, version=_VERSION, ^ ryu/lib/packet/ospf.py:628:13: E128 continuation line under-indented for visual indent lsas=[]): ^ ryu/lib/packet/ospf.py:630:17: E128 continuation line under-indented for visual indent area_id, au_type, authentication, checksum, version) ^ ryu/lib/packet/ospf.py:645:19: E203 whitespace before ':' "lsas" : lsas, ^ ryu/lib/packet/ospf.py:651:42: E231 missing whitespace after ',' return head + reduce(lambda a,b: a+b, ^ ryu/lib/packet/ospf.py:652:21: E128 continuation line under-indented for visual indent (lsa.serialize() for lsa in self.lsas)) ^ ryu/lib/packet/ospf.py:656:1: E302 expected 2 blank lines, found 1 @OSPFMessage.register_type(OSPF_MSG_LS_ACK) ^ ryu/lib/packet/ospf.py:661:13: E128 continuation line under-indented for visual indent au_type=1, authentication=0, checksum=None, version=_VERSION, ^ ryu/lib/packet/ospf.py:662:13: E128 continuation line under-indented for visual indent lsa_headers=[]): ^ ryu/lib/packet/ospf.py:664:17: E128 continuation line under-indented for visual indent area_id, au_type, authentication, checksum, version) ^ ryu/lib/packet/ospf.py:674:12: E121 continuation line indentation is not a multiple of four "lsa_headers" : lsahdrs, ^ ryu/lib/packet/ospf.py:674:25: E203 whitespace before ':' "lsa_headers" : lsahdrs, ^ ryu/lib/packet/ospf.py:678:31: E231 missing whitespace after ',' return reduce(lambda a,b: a+b, ^ ryu/lib/packet/ospf.py:679:17: E128 continuation line under-indented for visual indent (hdr.serialize() for hdr in self.lsa_headers)) ^ ryu/lib/packet/packet_utils.py:102:1: E302 expected 2 blank lines, found 0 def fletcher_checksum(data, offset): ^ ryu/tests/unit/packet/test_ospf.py:7:1: E302 expected 2 blank lines, found 1 class Test_ospf(unittest.TestCase): ^ ryu/tests/unit/packet/test_ospf.py:15:1: W293 blank line contains whitespace ^ ryu/tests/unit/packet/test_ospf.py:17:51: E231 missing whitespace after ',' link1 = ospf.RouterLSA.Link(id_='10.0.0.1',data='255.255.255.0', ^ ryu/tests/unit/packet/test_ospf.py:18:17: E128 continuation line under-indented for visual indent type_=ospf.LSA_LINK_TYPE_STUB, metric=10) ^ ryu/tests/unit/packet/test_ospf.py:20:17: E128 continuation line under-indented for visual indent links=[link1]) ^ ryu/tests/unit/packet/test_ospf.py:29:17: E128 continuation line under-indented for visual indent mask='255.255.255.0', routers=['192.168.0.2']) ^ ryu/tests/unit/packet/test_ospf.py:38:17: E128 continuation line under-indented for visual indent metric=20, fwd_addr='10.0.0.1') ^ ryu/tests/unit/packet/test_ospf.py:40:17: E128 continuation line under-indented for visual indent extnws=[extnw1]) ^ ryu/tests/unit/packet/test_ospf.py:48:53: E231 missing whitespace after ',' msg = ospf.OSPFHello(router_id='192.168.0.1',neighbors=['192.168.0.2']) ^ ryu/tests/unit/packet/test_ospf.py:56:51: E231 missing whitespace after ',' link1 = ospf.RouterLSA.Link(id_='10.0.0.1',data='255.255.255.0', ^ ryu/tests/unit/packet/test_ospf.py:57:17: E128 continuation line under-indented for visual indent type_=ospf.LSA_LINK_TYPE_STUB, metric=10) ^ ryu/tests/unit/packet/test_ospf.py:59:17: E128 continuation line under-indented for visual indent links=[link1]) ^ ryu/tests/unit/packet/test_ospf.py:61:17: E128 continuation line under-indented for visual indent lsa_headers=[lsa1.header]) ^ ryu/tests/unit/packet/test_ospf.py:70:17: E128 continuation line under-indented for visual indent id_='192.168.0.1', adv_router='192.168.0.2') ^ ryu/tests/unit/packet/test_ospf.py:79:51: E231 missing whitespace after ',' link1 = ospf.RouterLSA.Link(id_='10.0.0.1',data='255.255.255.0', ^ ryu/tests/unit/packet/test_ospf.py:80:17: E128 continuation line under-indented for visual indent type_=ospf.LSA_LINK_TYPE_STUB, metric=10) ^ ryu/tests/unit/packet/test_ospf.py:82:17: E128 continuation line under-indented for visual indent links=[link1]) ^ ryu/tests/unit/packet/test_ospf.py:91:51: E231 missing whitespace after ',' link1 = ospf.RouterLSA.Link(id_='10.0.0.1',data='255.255.255.0', ^ ryu/tests/unit/packet/test_ospf.py:92:17: E128 continuation line under-indented for visual indent type_=ospf.LSA_LINK_TYPE_STUB, metric=10) ^ ryu/tests/unit/packet/test_ospf.py:94:17: E128 continuation line under-indented for visual indent links=[link1]) ^ ryu/tests/unit/packet/test_ospf.py:96:17: E128 continuation line under-indented for visual indent lsa_headers=[lsa1.header]) ^ ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk _______________________________________________ Ryu-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ryu-devel
