SHA256
1
0
forked from pool/cloud-init
cloud-init/cloud-init-prefer-nm.patch

37 lines
1.5 KiB
Diff

--- cloudinit/net/renderers.py.orig
+++ cloudinit/net/renderers.py
@@ -27,10 +27,10 @@ NAME_TO_RENDERER = {
}
DEFAULT_PRIORITY = [
- "eni",
- "sysconfig",
"netplan",
"network-manager",
+ "eni",
+ "sysconfig",
"freebsd",
"netbsd",
"openbsd",
--- tests/unittests/test_net.py.orig
+++ tests/unittests/test_net.py
@@ -7356,15 +7356,15 @@ class TestRenderersSelect:
# -netplan +ifupdown -sys -nm -networkd selects eni
("eni", False, True, False, False, False),
# +netplan +ifupdown -sys -nm -networkd selects eni
- ("eni", True, True, False, False, False),
+ ("netplan", True, True, False, False, False),
# +netplan -ifupdown -sys -nm -networkd selects netplan
("netplan", True, False, False, False, False),
# +netplan -ifupdown -sys -nm -networkd selects netplan
("netplan", True, False, False, False, False),
# -netplan -ifupdown +sys -nm -networkd selects sysconfig
("sysconfig", False, False, True, False, False),
- # -netplan -ifupdown +sys +nm -networkd selects sysconfig
- ("sysconfig", False, False, True, True, False),
+ # -netplan -ifupdown +sys +nm -networkd selects network-manager
+ ("network-manager", False, False, True, True, False),
# -netplan -ifupdown -sys +nm -networkd selects nm
("network-manager", False, False, False, True, False),
# -netplan -ifupdown -sys +nm +networkd selects nm