uwnetworkslab / netcov Goto Github PK
View Code? Open in Web Editor NEWNetCov: test coverage for network configurations
License: Apache License 2.0
NetCov: test coverage for network configurations
License: Apache License 2.0
Hi, I'm getting the following when trying to look up routes and then looking at the netcov result. Thanks in advance.
>>> bf.q.routes().answer().frame()
Node VRF Network Next_Hop Next_Hop_IP Next_Hop_Interface Protocol Metric Admin_Distance Tag
0 ios-access2 default 0.0.0.0/0 ip 172.29.133.254 172.29.133.254 dynamic static 0 1 None
1 ios-access2 default 172.29.133.0/24 interface GigabitEthernet0/0 AUTO/NONE(-1l) GigabitEthernet0/0 connected 0 0 None
2 ios-access2 default 172.29.133.6/32 interface GigabitEthernet0/0 AUTO/NONE(-1l) GigabitEthernet0/0 local 0 0 None
3 nxos-aggr1 default 10.1.1.0/24 interface Ethernet1/4 AUTO/NONE(-1l) Ethernet1/4 connected 0 0 0
4 nxos-aggr1 default 10.1.1.2/32 interface Ethernet1/4 AUTO/NONE(-1l) Ethernet1/4 local 0 0 0
.. ... ... ... ... ... ... ... .. .. ..
91 server2 default 10.2.20.0/24 interface eth0 AUTO/NONE(-1l) eth0 connected 0 0 None
92 server2 default 10.2.20.1/32 interface eth0 AUTO/NONE(-1l) eth0 local 0 0 None
93 server3 default 0.0.0.0/0 interface eth0 ip 10.2.30.254 10.2.30.254 eth0 static 0 1 None
94 server3 default 10.2.30.0/24 interface eth0 AUTO/NONE(-1l) eth0 connected 0 0 None
95 server3 default 10.2.30.1/32 interface eth0 AUTO/NONE(-1l) eth0 local 0 0 None
[96 rows x 10 columns]
>>> bf.cov.result()
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/home/rick/development/tech-sessions/2022-11-netcov/.venv/lib/python3.8/site-packages/netcov/coverage.py", line 67, in result
covered_lines = control_plane_coverage(self.model, tested_nodes)
File "/home/rick/development/tech-sessions/2022-11-netcov/.venv/lib/python3.8/site-packages/netcov/algorithm/coverage.py", line 41, in control_plane_coverage
dfs(node)
File "/home/rick/development/tech-sessions/2022-11-netcov/.venv/lib/python3.8/site-packages/netcov/algorithm/coverage.py", line 36, in dfs
dfs(pred)
File "/home/rick/development/tech-sessions/2022-11-netcov/.venv/lib/python3.8/site-packages/netcov/algorithm/coverage.py", line 35, in dfs
for (pred, _) in node.pred:
AttributeError: 'NoneType' object has no attribute 'pred'
Add Palo Alto PANOS Support
Hi Team
For Batfish configuration can we please add VXLAN related configuration.
configuration related to NVE interface, evpn routes etc.
Checked on below link dont see configuration related to VXLAN EVPN
https://pybatfish.readthedocs.io/en/latest/notebooks/configProperties.html
It would be great to add the ability to perform net coverage on the interfaceProperties
question.
Add Fortinet fortios Support
Add Arista EOS Support
Hi, Im hitting an issue when trying to use a traceroute with Batfish. Thanks in advance.
>>> bf.q.traceroute(startLocation='nxos-core1', headers=HeaderConstraints(srcIps='nxos-core1[Ethernet1/2]', dstIps='nxos-core2[Ethernet1/2]'),maxTraces=1).answer().frame()
Flow ... TraceCount
0 start=nxos-core1 [10.1.2.1:49152->10.2.2.1:33434 UDP] ... 2
[1 rows x 3 columns]
>>> bf.cov.result()
Unsupported protocol ospf with prefix 10.2.2.0/24 at nxos-core1.default main rib
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/home/rick/development/tech-sessions/2022-11-netcov/.venv/lib/python3.8/site-packages/netcov/coverage.py", line 64, in result
ifg_lazy_construction(self.model, tested_nodes)
File "/home/rick/development/tech-sessions/2022-11-netcov/.venv/lib/python3.8/site-packages/netcov/algorithm/construct.py", line 451, in ifg_lazy_construction
run_to_fixpoint()
File "/home/rick/development/tech-sessions/2022-11-netcov/.venv/lib/python3.8/site-packages/netcov/algorithm/construct.py", line 420, in run_to_fixpoint
if len(node.status) == 0:
AttributeError: 'NoneType' object has no attribute 'status'
I'm getting an exception when using IPs in traceroute
headercontraints...
>>> bf.q.traceroute(startLocation='nxos-core1', headers=HeaderConstraints(srcIps='10.1.2.1', dstIps='1.1.1.1'),maxTraces=1).answer().frame()
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/home/rick/development/tech-sessions/2022-11-netcov/.venv/lib/python3.8/site-packages/pybatfish/question/question.py", line 192, in answer
return _bf_answer_obj(
File "/home/rick/development/tech-sessions/2022-11-netcov/.venv/lib/python3.8/site-packages/pybatfish/client/internal.py", line 66, in _bf_answer_obj
return session.get_answer(question_name, snapshot, reference_snapshot)
File "/home/rick/development/tech-sessions/2022-11-netcov/.venv/lib/python3.8/site-packages/netcov/hook.py", line 42, in get_answer
self.cov.collect_trace(answer)
File "/home/rick/development/tech-sessions/2022-11-netcov/.venv/lib/python3.8/site-packages/netcov/coverage.py", line 92, in collect_trace
self.trace.update(convert_traceroute_traces([answer.frame()]))
File "/home/rick/development/tech-sessions/2022-11-netcov/.venv/lib/python3.8/site-packages/netcov/algorithm/converttrace.py", line 30, in convert_traceroute_traces
action_stats[path[-1][-1]] += 1
File "<attrs generated hash pybatfish.datamodel.flow.Step>", line 2, in __hash__
return hash((
File "<attrs generated hash pybatfish.datamodel.flow.RoutingStepDetail>", line 2, in __hash__
return hash((
TypeError: unhashable type: 'list'
Pybatfish supports SONiC per https://github.com/batfish/pybatfish/tree/master/docs/networks/sonic_example
The typical upstream example can be found at https://github.com/sonic-net/SONiC/blob/master/doc/config_db.json . If you'd like a more involved configuration I can happily anonymise my own and provide it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.