Skip to content

Commit 01796d2

Browse files
committed
[VXLAN]Fixing traceback in show remotemac when mac moves during command execution
1 parent 611d8c6 commit 01796d2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

show/vxlan.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,14 @@ def interface():
9898
vtepname = key1.pop();
9999
if 'src_ip' in vxlan_table[key]:
100100
vtep_sip = vxlan_table[key]['src_ip']
101-
if vtep_sip is not '0.0.0.0':
101+
if vtep_sip != '0.0.0.0':
102102
output = '\tVTEP Name : ' + vtepname + ', SIP : ' + vxlan_table[key]['src_ip']
103103
else:
104104
output = '\tVTEP Name : ' + vtepname
105105

106106
click.echo(output)
107107

108-
if vtep_sip is not '0.0.0.0':
108+
if vtep_sip != '0.0.0.0':
109109
vxlan_table = config_db.get_table('VXLAN_EVPN_NVO')
110110
vxlan_keys = vxlan_table.keys()
111111
if vxlan_keys is not None:
@@ -307,8 +307,8 @@ def remotemac(remote_vtep_ip, count):
307307
vxlan_table = db.get_all(db.APPL_DB, key);
308308
if vxlan_table is None:
309309
continue
310-
rmtip = vxlan_table['remote_vtep']
311-
if remote_vtep_ip != 'all' and rmtip != remote_vtep_ip:
310+
rmtip = vxlan_table.get('remote_vtep')
311+
if remote_vtep_ip != 'all' and rmtip != remote_vtep_ip or rmtip == None:
312312
continue
313313
if count is None:
314314
body.append([vlan, mac, rmtip, vxlan_table['vni'], vxlan_table['type']])

0 commit comments

Comments
 (0)