-#!/usr/bin/env python
+#!/usr/bin/env python2
+# SPDX-License-Identifier: ISC
#
# test_bgp_ecmp_topo1.py
# Copyright (c) 2017 by
# Network Device Education Foundation, Inc. ("NetDEF")
#
-# Permission to use, copy, modify, and/or distribute this software
-# for any purpose with or without fee is hereby granted, provided
-# that the above copyright notice and this permission notice appear
-# in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND NETDEF DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NETDEF BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
-# DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
-# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
-# OF THIS SOFTWARE.
-#
"""
test_bgp_ecmp_topo1.py: Test BGP topology with ECMP (Equal Cost MultiPath).
with 'json') and compare with `data` contents.
"""
output = router.vtysh_cmd(cmd, isjson=True)
- if "ipv4Unicast" in output:
- output["ipv4Unicast"]["vrfName"] = output["ipv4Unicast"]["vrfName"].replace(
- "default", "Default"
- )
- elif "vrfName" in output:
- output["vrfName"] = output["vrfName"].replace("default", "Default")
return topotest.json_cmp(output, data)
test_func = functools.partial(