diff options
author | Brett Holman <brett.holman@canonical.com> | 2023-02-24 08:00:44 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-24 08:00:44 -0700 |
commit | 6100fda632f63605981636c0900e1e0b8b354979 (patch) | |
tree | dab05196ac0cc299acd0c672053e3506c0ade213 /cloudinit/net | |
parent | 46fcd03187d70f405c748f7a6cfdb02ecb8c6ee7 (diff) | |
download | cloud-init-git-6100fda632f63605981636c0900e1e0b8b354979.tar.gz |
log: Add standardized deprecation tooling (SC-1312) (#2026)
- Add deprecation log level
- Add deprecation utilities for structured format and messaging
- Update existing deprecation log sites, add deprecated versions
Diffstat (limited to 'cloudinit/net')
-rw-r--r-- | cloudinit/net/network_state.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/cloudinit/net/network_state.py b/cloudinit/net/network_state.py index f88b1321..790398bc 100644 --- a/cloudinit/net/network_state.py +++ b/cloudinit/net/network_state.py @@ -86,10 +86,11 @@ 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 ) |