diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2016-04-21 08:48:24 +0000 |
---|---|---|
committer | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2016-04-21 08:57:21 +0000 |
commit | a34d8d2651877998fe01d35350259c979a49d295 (patch) | |
tree | 220802d9c7b596c8636a80d116b9b9a38518c825 /test | |
parent | c6ddfb1d8ecc5944a775a458fbce648713ae3b02 (diff) |
config: simplify config structures
stop generating self-contained leafref fields in openconfig model.
(e.g. bgp:neighbor/bgp:neighbor-address )
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'test')
-rw-r--r-- | test/lib/gobgp.py | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/test/lib/gobgp.py b/test/lib/gobgp.py index b123369e..68c092a5 100644 --- a/test/lib/gobgp.py +++ b/test/lib/gobgp.py @@ -212,24 +212,23 @@ class GoBGPContainer(BGPContainer): afi_safi_list = [] version = netaddr.IPNetwork(info['neigh_addr']).version if version == 4: - afi_safi_list.append({'afi-safi-name': 'ipv4-unicast'}) + afi_safi_list.append({'config':{'afi-safi-name': 'ipv4-unicast'}}) elif version == 6: - afi_safi_list.append({'afi-safi-name': 'ipv6-unicast'}) + afi_safi_list.append({'config':{'afi-safi-name': 'ipv6-unicast'}}) else: Exception('invalid ip address version. {0}'.format(version)) if info['vpn']: - afi_safi_list.append({'afi-safi-name': 'l3vpn-ipv4-unicast'}) - afi_safi_list.append({'afi-safi-name': 'l3vpn-ipv6-unicast'}) - afi_safi_list.append({'afi-safi-name': 'l2vpn-evpn'}) - afi_safi_list.append({'afi-safi-name': 'rtc', - 'route-target-membership': {'deferral-time': 10}}) + afi_safi_list.append({'config': {'afi-safi-name': 'l3vpn-ipv4-unicast'}}) + afi_safi_list.append({'config': {'afi-safi-name': 'l3vpn-ipv6-unicast'}}) + afi_safi_list.append({'config': {'afi-safi-name': 'l2vpn-evpn'}}) + afi_safi_list.append({'config': {'afi-safi-name': 'rtc'}, 'route-target-membership': {'deferral-time': 10}}) if info['flowspec']: - afi_safi_list.append({'afi-safi-name': 'ipv4-flowspec'}) - afi_safi_list.append({'afi-safi-name': 'l3vpn-ipv4-flowspec'}) - afi_safi_list.append({'afi-safi-name': 'ipv6-flowspec'}) - afi_safi_list.append({'afi-safi-name': 'l3vpn-ipv6-flowspec'}) + afi_safi_list.append({'config': {'afi-safi-name': 'ipv4-flowspec'}}) + afi_safi_list.append({'config': {'afi-safi-name': 'l3vpn-ipv4-flowspec'}}) + afi_safi_list.append({'config': {'afi-safi-name': 'ipv6-flowspec'}}) + afi_safi_list.append({'config': {'afi-safi-name': 'l3vpn-ipv6-flowspec'}}) n = {'config': {'neighbor-address': info['neigh_addr'].split('/')[0], |