Update ce_vxlan_vap to fix bugs (#61996)

This commit is contained in:
yanzhangi 2019-09-18 10:52:04 +08:00 committed by ansibot
parent 90958b01c1
commit e559fafbc4

View file

@ -291,7 +291,7 @@ def vlan_vid_to_bitmap(vid):
vlan_bit = ['0'] * 1024 vlan_bit = ['0'] * 1024
int_vid = int(vid) int_vid = int(vid)
j = int_vid / 4 j = int_vid // 4
bit_int = 0x8 >> (int_vid % 4) bit_int = 0x8 >> (int_vid % 4)
vlan_bit[j] = str(hex(bit_int))[2] vlan_bit[j] = str(hex(bit_int))[2]
@ -341,7 +341,7 @@ def is_vlan_in_bitmap(vid, bitmap):
if is_vlan_bitmap_empty(bitmap): if is_vlan_bitmap_empty(bitmap):
return False return False
i = int(vid) / 4 i = int(vid) // 4
if i > len(bitmap): if i > len(bitmap):
return False return False