MCPcopy Create free account
hub / github.com/FDio/vpp / test_down

Method test_down

test/test_interface_crud.py:136–159  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

134 self.pg0.assert_nothing_captured()
135
136 def test_down(self):
137 # create
138 loopbacks = self.create_loopback_interfaces(20)
139 for i in loopbacks:
140 i.local_ip4_prefix_len = 32
141 i.config_ip4().admin_up()
142
143 # disable
144 for i in loopbacks:
145 i.admin_down().unconfig_ip4()
146
147 # read (check not in sw if dump, ip4 fib, ip6 fib)
148 if_dump = self.vapi.sw_interface_dump()
149 fib4_dump = self.vapi.ip_route_dump(0)
150 for i in loopbacks:
151 self.assertTrue(i.is_interface_config_in_dump(if_dump))
152 self.assertFalse(i.is_ip4_entry_in_fib_dump(fib4_dump))
153
154 # check not ping
155 stream = self.create_icmp_stream(self.pg0, loopbacks)
156 self.pg0.add_stream(stream)
157 self.pg_enable_capture(self.pg_interfaces)
158 self.pg_start()
159 self.pg0.assert_nothing_captured()
160
161
162class TestInterfaceDumpApiLocalOnly(VppTestCase):

Callers

nothing calls this directly

Calls 13

create_icmp_streamMethod · 0.95
unconfig_ip4Method · 0.80
ip_route_dumpMethod · 0.80
pg_enable_captureMethod · 0.80
pg_startMethod · 0.80
admin_upMethod · 0.45
config_ip4Method · 0.45
admin_downMethod · 0.45

Tested by

no test coverage detected