Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update values in Routing Policies notebook. #876

Merged
merged 2 commits into from
Feb 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions docs/source/notebooks/routingProtocols.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1947,9 +1947,9 @@
" <th>0</th>\n",
" <td>as1border2</td>\n",
" <td>as1_to_as4</td>\n",
" <td>BgpRoute(network='10.0.0.0/32', originatorIp='0.0.0.0', originType='igp', protocol='bgp', asPath=[], communities=[], localPreference=0, metric=0, nextHopIp='0.0.0.1', sourceProtocol=None, tag=0, weight=0)</td>\n",
" <td>BgpRoute(network='10.0.0.0/8', originatorIp='0.0.0.0', originType='igp', protocol='bgp', asPath=[], communities=[], localPreference=100, metric=0, nextHopIp='0.0.0.1', sourceProtocol=None, tag=0, weight=0)</td>\n",
" <td>PERMIT</td>\n",
" <td>BgpRoute(network='10.0.0.0/32', originatorIp='0.0.0.0', originType='igp', protocol='bgp', asPath=[], communities=['1:4'], localPreference=0, metric=50, nextHopIp='0.0.0.1', sourceProtocol=None, tag=0, weight=0)</td>\n",
" <td>BgpRoute(network='10.0.0.0/8', originatorIp='0.0.0.0', originType='igp', protocol='bgp', asPath=[], communities=['1:4'], localPreference=100, metric=50, nextHopIp='0.0.0.1', sourceProtocol=None, tag=0, weight=0)</td>\n",
" <td>BgpRouteDiffs(diffs=[BgpRouteDiff(fieldName='communities', oldValue='[]', newValue='[1:4]'), BgpRouteDiff(fieldName='metric', oldValue='0', newValue='50')])</td>\n",
" <td>- Matched route-map as1_to_as4 clause 2</td>\n",
" </tr>\n",
Expand All @@ -1958,11 +1958,11 @@
"</div>"
],
"text/plain": [
" Node Policy_Name Input_Route Action \\\n",
"0 as1border2 as1_to_as4 BgpRoute(network='10.0.0.0/32', originatorIp='0.0.0.0', originType='igp', protocol='bgp', asPath=[], communities=[], localPreference=0, metric=0, nextHopIp='0.0.0.1', sourceProtocol=None, tag=0, weight=0) PERMIT \n",
" Node Policy_Name Input_Route Action \\\n",
"0 as1border2 as1_to_as4 BgpRoute(network='10.0.0.0/8', originatorIp='0.0.0.0', originType='igp', protocol='bgp', asPath=[], communities=[], localPreference=100, metric=0, nextHopIp='0.0.0.1', sourceProtocol=None, tag=0, weight=0) PERMIT \n",
"\n",
" Output_Route \\\n",
"0 BgpRoute(network='10.0.0.0/32', originatorIp='0.0.0.0', originType='igp', protocol='bgp', asPath=[], communities=['1:4'], localPreference=0, metric=50, nextHopIp='0.0.0.1', sourceProtocol=None, tag=0, weight=0) \n",
" Output_Route \\\n",
"0 BgpRoute(network='10.0.0.0/8', originatorIp='0.0.0.0', originType='igp', protocol='bgp', asPath=[], communities=['1:4'], localPreference=100, metric=50, nextHopIp='0.0.0.1', sourceProtocol=None, tag=0, weight=0) \n",
"\n",
" Difference Trace \n",
"0 BgpRouteDiffs(diffs=[BgpRouteDiff(fieldName='communities', oldValue='[]', newValue='[1:4]'), BgpRouteDiff(fieldName='metric', oldValue='0', newValue='50')]) - Matched route-map as1_to_as4 clause 2 "
Expand Down Expand Up @@ -1992,13 +1992,13 @@
{
"data": {
"text/plain": [
"Node as1border2\n",
"Policy_Name as1_to_as4\n",
"Input_Route BgpRoute(network='10.0.0.0/32', originatorIp='0.0.0.0', originType='igp', protocol='bgp', asPath=[], communities=[], localPreference=0, metric=0, nextHopIp='0.0.0.1', sourceProtocol=None, tag=0, weight=0)\n",
"Action PERMIT\n",
"Output_Route BgpRoute(network='10.0.0.0/32', originatorIp='0.0.0.0', originType='igp', protocol='bgp', asPath=[], communities=['1:4'], localPreference=0, metric=50, nextHopIp='0.0.0.1', sourceProtocol=None, tag=0, weight=0)\n",
"Difference BgpRouteDiffs(diffs=[BgpRouteDiff(fieldName='communities', oldValue='[]', newValue='[1:4]'), BgpRouteDiff(fieldName='metric', oldValue='0', newValue='50')])\n",
"Trace - Matched route-map as1_to_as4 clause 2\n",
"Node as1border2\n",
"Policy_Name as1_to_as4\n",
"Input_Route BgpRoute(network='10.0.0.0/8', originatorIp='0.0.0.0', originType='igp', protocol='bgp', asPath=[], communities=[], localPreference=100, metric=0, nextHopIp='0.0.0.1', sourceProtocol=None, tag=0, weight=0)\n",
"Action PERMIT\n",
"Output_Route BgpRoute(network='10.0.0.0/8', originatorIp='0.0.0.0', originType='igp', protocol='bgp', asPath=[], communities=['1:4'], localPreference=100, metric=50, nextHopIp='0.0.0.1', sourceProtocol=None, tag=0, weight=0)\n",
"Difference BgpRouteDiffs(diffs=[BgpRouteDiff(fieldName='communities', oldValue='[]', newValue='[1:4]'), BgpRouteDiff(fieldName='metric', oldValue='0', newValue='50')])\n",
"Trace - Matched route-map as1_to_as4 clause 2\n",
"Name: 0, dtype: object"
]
},
Expand Down
36 changes: 18 additions & 18 deletions jupyter_notebooks/Analyzing Routing Policies.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@
" <th id=\"T_pybfstylelevel0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
" <td id=\"T_pybfstylerow0_col0\" class=\"data row0 col0\" >border2</td>\n",
" <td id=\"T_pybfstylerow0_col1\" class=\"data row0 col1\" >from_customer</td>\n",
" <td id=\"T_pybfstylerow0_col2\" class=\"data row0 col2\" >Network: 192.168.0.0/32<br>AS Path: []<br>Communities: []<br>Local Preference: 0<br>Metric: 0<br>Next Hop IP: 0.0.0.1<br>Originator IP: 0.0.0.0<br>Origin Type: igp<br>Protocol: bgp<br>Source Protocol: None<br>Tag: 0<br>Weight: 0</td>\n",
" <td id=\"T_pybfstylerow0_col2\" class=\"data row0 col2\" >Network: 192.168.0.0/32<br>AS Path: []<br>Communities: []<br>Local Preference: 100<br>Metric: 0<br>Next Hop IP: 0.0.0.1<br>Originator IP: 0.0.0.0<br>Origin Type: igp<br>Protocol: bgp<br>Source Protocol: None<br>Tag: 0<br>Weight: 0</td>\n",
" <td id=\"T_pybfstylerow0_col3\" class=\"data row0 col3\" >PERMIT</td>\n",
" <td id=\"T_pybfstylerow0_col4\" class=\"data row0 col4\" >Network: 192.168.0.0/32<br>AS Path: []<br>Communities: [20:30]<br>Local Preference: 300<br>Metric: 0<br>Next Hop IP: 0.0.0.1<br>Originator IP: 0.0.0.0<br>Origin Type: igp<br>Protocol: bgp<br>Source Protocol: None<br>Tag: 0<br>Weight: 0</td>\n",
" <td id=\"T_pybfstylerow0_col5\" class=\"data row0 col5\" >Communities: [] --> [20:30]<br>Local Preference: 0 --> 300</td>\n",
" <td id=\"T_pybfstylerow0_col5\" class=\"data row0 col5\" >Communities: [] --> [20:30]<br>Local Preference: 100 --> 300</td>\n",
" <td id=\"T_pybfstylerow0_col6\" class=\"data row0 col6\" ><ul><li>Matched route-map from_customer clause 400</li></ul></td>\n",
" </tr>\n",
" </tbody></table>"
Expand All @@ -200,17 +200,17 @@
" Node Policy_Name \\\n",
"0 border2 from_customer \n",
"\n",
" Input_Route \\\n",
"0 BgpRoute(network='192.168.0.0/32', originatorIp='0.0.0.0', originType='igp', protocol='bgp', asPath=[], communities=[], localPreference=0, metric=0, nextHopIp='0.0.0.1', sourceProtocol=None, tag=0, weight=0) \n",
" Input_Route \\\n",
"0 BgpRoute(network='192.168.0.0/32', originatorIp='0.0.0.0', originType='igp', protocol='bgp', asPath=[], communities=[], localPreference=100, metric=0, nextHopIp='0.0.0.1', sourceProtocol=None, tag=0, weight=0) \n",
"\n",
" Action \\\n",
"0 PERMIT \n",
"\n",
" Output_Route \\\n",
"0 BgpRoute(network='192.168.0.0/32', originatorIp='0.0.0.0', originType='igp', protocol='bgp', asPath=[], communities=['20:30'], localPreference=300, metric=0, nextHopIp='0.0.0.1', sourceProtocol=None, tag=0, weight=0) \n",
"\n",
" Difference \\\n",
"0 BgpRouteDiffs(diffs=[BgpRouteDiff(fieldName='communities', oldValue='[]', newValue='[20:30]'), BgpRouteDiff(fieldName='localPreference', oldValue='0', newValue='300')]) \n",
" Difference \\\n",
"0 BgpRouteDiffs(diffs=[BgpRouteDiff(fieldName='communities', oldValue='[]', newValue='[20:30]'), BgpRouteDiff(fieldName='localPreference', oldValue='100', newValue='300')]) \n",
"\n",
" Trace \n",
"0 - Matched route-map from_customer clause 400 "
Expand Down Expand Up @@ -704,7 +704,7 @@
" <th id=\"T_pybfstylelevel0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
" <td id=\"T_pybfstylerow0_col0\" class=\"data row0 col0\" >border2</td>\n",
" <td id=\"T_pybfstylerow0_col1\" class=\"data row0 col1\" >to_provider</td>\n",
" <td id=\"T_pybfstylerow0_col2\" class=\"data row0 col2\" >Network: 0.0.0.0/0<br>AS Path: []<br>Communities: [20:30]<br>Local Preference: 0<br>Metric: 0<br>Next Hop IP: 0.0.0.1<br>Originator IP: 0.0.0.0<br>Origin Type: igp<br>Protocol: bgp<br>Source Protocol: None<br>Tag: 0<br>Weight: 0</td>\n",
" <td id=\"T_pybfstylerow0_col2\" class=\"data row0 col2\" >Network: 10.0.0.0/8<br>AS Path: []<br>Communities: [20:30]<br>Local Preference: 100<br>Metric: 0<br>Next Hop IP: 0.0.0.1<br>Originator IP: 0.0.0.0<br>Origin Type: igp<br>Protocol: bgp<br>Source Protocol: None<br>Tag: 0<br>Weight: 0</td>\n",
" <td id=\"T_pybfstylerow0_col3\" class=\"data row0 col3\" >DENY</td>\n",
" <td id=\"T_pybfstylerow0_col4\" class=\"data row0 col4\" >None</td>\n",
" <td id=\"T_pybfstylerow0_col5\" class=\"data row0 col5\" >None</td>\n",
Expand All @@ -716,8 +716,8 @@
" Node Policy_Name \\\n",
"0 border2 to_provider \n",
"\n",
" Input_Route \\\n",
"0 BgpRoute(network='0.0.0.0/0', originatorIp='0.0.0.0', originType='igp', protocol='bgp', asPath=[], communities=['20:30'], localPreference=0, metric=0, nextHopIp='0.0.0.1', sourceProtocol=None, tag=0, weight=0) \n",
" Input_Route \\\n",
"0 BgpRoute(network='10.0.0.0/8', originatorIp='0.0.0.0', originType='igp', protocol='bgp', asPath=[], communities=['20:30'], localPreference=100, metric=0, nextHopIp='0.0.0.1', sourceProtocol=None, tag=0, weight=0) \n",
"\n",
" Action Output_Route Difference Trace \n",
"0 DENY None None "
Expand Down Expand Up @@ -783,9 +783,9 @@
" <th id=\"T_pybfstylelevel0_row0\" class=\"row_heading level0 row0\" >0</th>\n",
" <td id=\"T_pybfstylerow0_col0\" class=\"data row0 col0\" >border2</td>\n",
" <td id=\"T_pybfstylerow0_col1\" class=\"data row0 col1\" >to_provider</td>\n",
" <td id=\"T_pybfstylerow0_col2\" class=\"data row0 col2\" >Network: 0.0.0.0/0<br>AS Path: []<br>Communities: [2:30]<br>Local Preference: 0<br>Metric: 0<br>Next Hop IP: 0.0.0.1<br>Originator IP: 0.0.0.0<br>Origin Type: igp<br>Protocol: bgp<br>Source Protocol: None<br>Tag: 0<br>Weight: 0</td>\n",
" <td id=\"T_pybfstylerow0_col2\" class=\"data row0 col2\" >Network: 10.0.0.0/8<br>AS Path: []<br>Communities: [2:30]<br>Local Preference: 100<br>Metric: 0<br>Next Hop IP: 0.0.0.1<br>Originator IP: 0.0.0.0<br>Origin Type: igp<br>Protocol: bgp<br>Source Protocol: None<br>Tag: 0<br>Weight: 0</td>\n",
" <td id=\"T_pybfstylerow0_col3\" class=\"data row0 col3\" >PERMIT</td>\n",
" <td id=\"T_pybfstylerow0_col4\" class=\"data row0 col4\" >Network: 0.0.0.0/0<br>AS Path: []<br>Communities: [2:30]<br>Local Preference: 0<br>Metric: 0<br>Next Hop IP: 0.0.0.1<br>Originator IP: 0.0.0.0<br>Origin Type: igp<br>Protocol: bgp<br>Source Protocol: None<br>Tag: 0<br>Weight: 0</td>\n",
" <td id=\"T_pybfstylerow0_col4\" class=\"data row0 col4\" >Network: 10.0.0.0/8<br>AS Path: []<br>Communities: [2:30]<br>Local Preference: 100<br>Metric: 0<br>Next Hop IP: 0.0.0.1<br>Originator IP: 0.0.0.0<br>Origin Type: igp<br>Protocol: bgp<br>Source Protocol: None<br>Tag: 0<br>Weight: 0</td>\n",
" <td id=\"T_pybfstylerow0_col5\" class=\"data row0 col5\" ></td>\n",
" <td id=\"T_pybfstylerow0_col6\" class=\"data row0 col6\" ><ul><li>Matched route-map to_provider clause 200</li></ul></td>\n",
" </tr>\n",
Expand All @@ -795,14 +795,14 @@
" Node Policy_Name \\\n",
"0 border2 to_provider \n",
"\n",
" Input_Route \\\n",
"0 BgpRoute(network='0.0.0.0/0', originatorIp='0.0.0.0', originType='igp', protocol='bgp', asPath=[], communities=['2:30'], localPreference=0, metric=0, nextHopIp='0.0.0.1', sourceProtocol=None, tag=0, weight=0) \n",
" Input_Route \\\n",
"0 BgpRoute(network='10.0.0.0/8', originatorIp='0.0.0.0', originType='igp', protocol='bgp', asPath=[], communities=['2:30'], localPreference=100, metric=0, nextHopIp='0.0.0.1', sourceProtocol=None, tag=0, weight=0) \n",
"\n",
" Action \\\n",
"0 PERMIT \n",
"\n",
" Output_Route \\\n",
"0 BgpRoute(network='0.0.0.0/0', originatorIp='0.0.0.0', originType='igp', protocol='bgp', asPath=[], communities=['2:30'], localPreference=0, metric=0, nextHopIp='0.0.0.1', sourceProtocol=None, tag=0, weight=0) \n",
" Output_Route \\\n",
"0 BgpRoute(network='10.0.0.0/8', originatorIp='0.0.0.0', originType='igp', protocol='bgp', asPath=[], communities=['2:30'], localPreference=100, metric=0, nextHopIp='0.0.0.1', sourceProtocol=None, tag=0, weight=0) \n",
"\n",
" Difference Trace \n",
"0 BgpRouteDiffs(diffs=[]) - Matched route-map to_provider clause 200 "
Expand Down Expand Up @@ -881,9 +881,9 @@
"metadata": {
"hide_input": false,
"kernelspec": {
"display_name": "Python 3",
"display_name": "pybf",
"language": "python",
"name": "python3"
"name": "pybf"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -895,7 +895,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.7"
"version": "3.10.9"
}
},
"nbformat": 4,
Expand Down