Skip to content
This repository has been archived by the owner on Sep 17, 2019. It is now read-only.

Commit

Permalink
Merge pull request #138 from napalm-automation/develop
Browse files Browse the repository at this point in the history
Release 0.5.4
  • Loading branch information
mirceaulinic authored Jul 27, 2017
2 parents 75e6546 + 8458349 commit f5451e8
Show file tree
Hide file tree
Showing 4 changed files with 253 additions and 173 deletions.
4 changes: 2 additions & 2 deletions napalm_iosxr/iosxr.py
Original file line number Diff line number Diff line change
Expand Up @@ -723,9 +723,9 @@ def build_prefix_limit(af_table, limit, prefix_percent, prefix_timeout):
inet = False
inet6 = False
preifx_type = 'inet'
if 'IPV4' in af_table:
if 'ipv4' in af_table.lower():
inet = True
if 'IPv6' in af_table:
if 'ipv6' in af_table.lower():
inet6 = True
preifx_type = 'inet6'
if inet or inet6:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,82 +1,112 @@
{
"RR": {
"neighbors": {
"10.255.255.12": {
"local_address": "",
"export_policy": "",
"route_reflector_client": false,
"remote_as": 0,
"authentication_key": "",
"import_policy": "RP-SPECIAL-SNOWFLAKE-IN",
"nhs": false,
"prefix_limit": {},
"local_as": 0,
"description": ""
},
"10.255.255.3": {
"local_address": "",
"export_policy": "",
"route_reflector_client": false,
"remote_as": 0,
"authentication_key": "",
"import_policy": "",
"nhs": false,
"prefix_limit": {},
"local_as": 0,
"description": ""
}
},
"remote_as": 65900,
"multipath": false,
"export_policy": "",
"prefix_limit": {},
"description": "",
"local_address": "",
"apply_groups": [],
"remove_private_as": true,
"import_policy": "RP-RR-IN",
"type": "external",
"local_as": 0,
"multihop_ttl": 0
},
"_": {
"neighbors": {
"10.255.255.2": {
"local_address": "",
"export_policy": "pass-all",
"route_reflector_client": false,
"remote_as": 65900,
"authentication_key": "",
"import_policy": "pass-all",
"nhs": false,
"prefix_limit": {},
"local_as": 0,
"description": ""
},
"10.255.255.220": {
"local_address": "",
"export_policy": "pass-all",
"route_reflector_client": false,
"remote_as": 65900,
"authentication_key": "",
"import_policy": "pass-all",
"nhs": false,
"prefix_limit": {},
"local_as": 0,
"description": ""
}
},
"remote_as": 0,
"multipath": false,
"export_policy": "",
"prefix_limit": {},
"description": "",
"local_address": "",
"apply_groups": [],
"remove_private_as": false,
"import_policy": "",
"type": "",
"local_as": 0,
"multihop_ttl": 0
}
"_": {
"remote_as": 0,
"neighbors": {
"10.255.255.220": {
"remote_as": 65900,
"export_policy": "pass-all",
"description": "",
"route_reflector_client": false,
"nhs": false,
"local_as": 0,
"import_policy": "pass-all",
"local_address": "",
"prefix_limit": {
"inet": {
"unicast": {
"limit": 0,
"teardown": {
"threshold": 0,
"timeout": 0
}
}
}
},
"authentication_key": ""
},
"10.255.255.2": {
"remote_as": 65900,
"export_policy": "pass-all",
"description": "",
"route_reflector_client": false,
"nhs": false,
"local_as": 0,
"import_policy": "pass-all",
"local_address": "",
"prefix_limit": {
"inet": {
"unicast": {
"limit": 0,
"teardown": {
"threshold": 0,
"timeout": 0
}
}
}
},
"authentication_key": ""
}
},
"multihop_ttl": 0,
"import_policy": "",
"local_address": "",
"type": "",
"remove_private_as": false,
"description": "",
"export_policy": "",
"local_as": 0,
"apply_groups": [],
"multipath": false,
"prefix_limit": {}
},
"RR": {
"remote_as": 65900,
"neighbors": {
"10.255.255.12": {
"remote_as": 0,
"export_policy": "",
"description": "",
"route_reflector_client": false,
"nhs": false,
"local_as": 0,
"import_policy": "RP-SPECIAL-SNOWFLAKE-IN",
"local_address": "",
"prefix_limit": {
"inet": {
"unicast": {
"limit": 0,
"teardown": {
"threshold": 0,
"timeout": 0
}
}
}
},
"authentication_key": ""
},
"10.255.255.3": {
"remote_as": 0,
"export_policy": "",
"description": "",
"route_reflector_client": false,
"nhs": false,
"local_as": 0,
"import_policy": "",
"local_address": "",
"prefix_limit": {},
"authentication_key": ""
}
},
"multihop_ttl": 0,
"import_policy": "RP-RR-IN",
"local_address": "",
"type": "external",
"remove_private_as": true,
"description": "",
"export_policy": "",
"local_as": 0,
"apply_groups": [],
"multipath": false,
"prefix_limit": {}
}
}
134 changes: 82 additions & 52 deletions test/unit/mocked_data/test_get_bgp_config/normal/expected_result.json
Original file line number Diff line number Diff line change
@@ -1,54 +1,84 @@
{
"4-public-anycast-peers": {
"neighbors": {
"192.168.50.5": {
"export_policy": "",
"remote_as": 9009,
"description": "M247 Ltd [UK Hosting ANYCAST]",
"prefix_limit": {},
"local_as": 0,
"nhs": false,
"route_reflector_client": false,
"local_address": "",
"authentication_key": "",
"import_policy": ""
},
"192.168.20.3": {
"export_policy": "",
"remote_as": 9050,
"description": "Telekom Romania [RO ISP ANYCAST]",
"prefix_limit": {},
"local_as": 0,
"nhs": false,
"route_reflector_client": false,
"local_address": "",
"authentication_key": "",
"import_policy": ""
},
"172.17.17.50": {
"export_policy": "",
"remote_as": 48161,
"description": "NextGen [RO ISP ANYCAST]",
"prefix_limit": {},
"local_as": 0,
"nhs": false,
"route_reflector_client": false,
"local_address": "",
"authentication_key": "",
"import_policy": ""
}
},
"export_policy": "4-public-anycast-peers-out",
"prefix_limit": {},
"description": "",
"local_address": "",
"local_as": 0,
"multihop_ttl": 0,
"apply_groups": [],
"remote_as": 0,
"remove_private_as": true,
"multipath": false,
"type": "external",
"import_policy": "4-public-anycast-peers-in"
}
"4-public-anycast-peers": {
"local_as": 0,
"remove_private_as": true,
"import_policy": "4-public-anycast-peers-in",
"multihop_ttl": 0,
"neighbors": {
"192.168.20.3": {
"export_policy": "",
"local_as": 0,
"prefix_limit": {
"inet": {
"unicast": {
"teardown": {
"timeout": 0,
"threshold": 75
},
"limit": 5000
}
}
},
"remote_as": 9050,
"import_policy": "",
"nhs": false,
"authentication_key": "",
"local_address": "",
"description": "Telekom Romania [RO ISP ANYCAST]",
"route_reflector_client": false
},
"172.17.17.50": {
"export_policy": "",
"local_as": 0,
"prefix_limit": {
"inet": {
"unicast": {
"teardown": {
"timeout": 0,
"threshold": 75
},
"limit": 500
}
}
},
"remote_as": 48161,
"import_policy": "",
"nhs": false,
"authentication_key": "",
"local_address": "",
"description": "NextGen [RO ISP ANYCAST]",
"route_reflector_client": false
},
"192.168.50.5": {
"export_policy": "",
"local_as": 0,
"prefix_limit": {
"inet": {
"unicast": {
"teardown": {
"timeout": 0,
"threshold": 75
},
"limit": 1000
}
}
},
"remote_as": 9009,
"import_policy": "",
"nhs": false,
"authentication_key": "",
"local_address": "",
"description": "M247 Ltd [UK Hosting ANYCAST]",
"route_reflector_client": false
}
},
"multipath": false,
"export_policy": "4-public-anycast-peers-out",
"type": "external",
"apply_groups": [],
"remote_as": 0,
"prefix_limit": {},
"description": "",
"local_address": ""
}
}
Loading

0 comments on commit f5451e8

Please sign in to comment.