We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 033825d commit 4ebca1eCopy full SHA for 4ebca1e
tests/framework/microvm.py
@@ -1206,13 +1206,20 @@ def build_n_from_snapshot(
1206
uffd_handler_name=None,
1207
incremental=False,
1208
use_snapshot_editor=True,
1209
+ no_netns_reuse=False,
1210
):
1211
"""A generator of `n` microvms restored, either all restored from the same given snapshot
1212
(incremental=False), or created by taking successive snapshots of restored VMs
1213
"""
1214
last_snapshot = None
1215
for _ in range(nr_vms):
- microvm = self.build()
1216
+ microvm = self.build(
1217
+ **(
1218
+ {"netns": net_tools.NetNs(str(uuid.uuid4()))}
1219
+ if no_netns_reuse
1220
+ else {}
1221
+ )
1222
1223
microvm.spawn()
1224
1225
snapshot_copy = microvm.restore_from_snapshot(
0 commit comments