diff --git a/adapter/ryu/omniui/omniui.py b/adapter/ryu/omniui/omniui.py index a521c11..7087149 100644 --- a/adapter/ryu/omniui/omniui.py +++ b/adapter/ryu/omniui/omniui.py @@ -441,7 +441,7 @@ def packet_in_handler(self, ev): packetIn["ip_dst"] = p.dst_ip if hasattr(p, 'proto'): - packetIn["protocol"] = 'x0'.join(hex(p.proto).split('x')) if ((len(hex(p.proto)) < 4) | (len(hex(p.proto)) == 5)) else hex(p.proto) + packetIn["protocol"] = 'x0'.join(hex(p.proto).split('x')) if ((len(hex(p.proto)) < 4) or (len(hex(p.proto)) == 5)) else hex(p.proto) if hasattr(p, 'src_port'): packetIn["port_src"] = str(p.src_port) @@ -726,7 +726,7 @@ def ryuFlow_v1_0(self, dp, flows): action = self.to_action_v1_0(dp, act) ryuFlow['actions'].append(action) for matchfield in ryuFlow['match'].copy(): - if (ryuFlow['match'][matchfield] == 0) | (ryuFlow['match'][matchfield] == '0.0.0.0') | (ryuFlow['match'][matchfield] == '00:00:00:00:00:00'): + if (ryuFlow['match'][matchfield] == 0) or (ryuFlow['match'][matchfield] == '0.0.0.0') or (ryuFlow['match'][matchfield] == '00:00:00:00:00:00'): del ryuFlow['match'][matchfield] return ryuFlow @@ -889,7 +889,7 @@ def to_match_v1_3(self, dp, omni_key, omniFlow): 'ipv6_exthdr': ['ipv6_exthdr', int] } - if (omniFlow.get(omni_key) == '0') | (omniFlow.get(omni_key) == '0.0.0.0') | (omniFlow.get(omni_key) == '00:00:00:00:00:00') | (omniFlow.get(omni_key) == '0x00') | (omniFlow.get(omni_key) == '0x0000'): + if (omniFlow.get(omni_key) == '0') or (omniFlow.get(omni_key) == '0.0.0.0') or (omniFlow.get(omni_key) == '00:00:00:00:00:00') or (omniFlow.get(omni_key) == '0x00') or (omniFlow.get(omni_key) == '0x0000'): return None for key, value in convert.items(): if omni_key == key: diff --git a/core/src/floodlight_modules/busylink_detect.py b/core/src/floodlight_modules/busylink_detect.py index f245656..028e05e 100644 --- a/core/src/floodlight_modules/busylink_detect.py +++ b/core/src/floodlight_modules/busylink_detect.py @@ -141,10 +141,10 @@ def busyLinkDetect(self): destp = self.links[link_id]['targetPort'] # Check if needed information all arrived - if (src not in self.switches) | (dest not in self.switches): + if (src not in self.switches) or (dest not in self.switches): print 'Not Ready' return - elif (srcp not in self.switches[src]) | (destp not in self.switches[dest]): + elif (srcp not in self.switches[src]) or (destp not in self.switches[dest]): print 'Not Ready' return