diff options
Diffstat (limited to 'cloudinit/net/network_state.py')
-rw-r--r-- | cloudinit/net/network_state.py | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/cloudinit/net/network_state.py b/cloudinit/net/network_state.py index f88b1321..158a2951 100644 --- a/cloudinit/net/network_state.py +++ b/cloudinit/net/network_state.py @@ -86,20 +86,14 @@ NET_CONFIG_TO_V2: Dict[str, Dict[str, Any]] = { def warn_deprecated_all_devices(dikt: dict) -> None: """Warn about deprecations of v2 properties for all devices""" if "gateway4" in dikt or "gateway6" in dikt: - LOG.warning( - "DEPRECATED: The use of `gateway4` and `gateway6` is" - " deprecated. For more info check out: " - "https://cloudinit.readthedocs.io/en/latest/topics/network-config-format-v2.html" # noqa: E501 + util.deprecate( + deprecated="The use of `gateway4` and `gateway6`", + deprecated_version="22.4", + extra_message="For more info check out: " + "https://cloudinit.readthedocs.io/en/latest/topics/network-config-format-v2.html", # noqa: E501 ) -def from_state_file(state_file): - state = util.read_conf(state_file) - nsi = NetworkStateInterpreter() - nsi.load(state) - return nsi - - def diff_keys(expected, actual): missing = set(expected) for key in actual: |