diff options
Diffstat (limited to 'cloudinit/sources/helpers/azure.py')
-rwxr-xr-x | cloudinit/sources/helpers/azure.py | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/cloudinit/sources/helpers/azure.py b/cloudinit/sources/helpers/azure.py index e0a1abb6..1a8cd34f 100755 --- a/cloudinit/sources/helpers/azure.py +++ b/cloudinit/sources/helpers/azure.py @@ -25,7 +25,6 @@ from cloudinit import ( version, ) from cloudinit.net import dhcp -from cloudinit.net.dhcp import EphemeralDHCPv4 from cloudinit.reporting import events from cloudinit.settings import CFG_BUILTIN @@ -215,6 +214,7 @@ def report_diagnostic_event( msg: str, *, logger_func=None ) -> events.ReportingEvent: """Report a diagnostic event""" + print(msg) if callable(logger_func): logger_func(msg) evt = events.ReportingEvent( @@ -1243,21 +1243,4 @@ def dhcp_log_cb(out, err): ) -class EphemeralDHCPv4WithReporting(EphemeralDHCPv4): - def __init__(self, reporter, iface=None): - self.reporter = reporter - - super(EphemeralDHCPv4WithReporting, self).__init__( - iface=iface, dhcp_log_func=dhcp_log_cb - ) - - def __enter__(self): - with events.ReportEventStack( - name="obtain-dhcp-lease", - description="obtain dhcp lease", - parent=self.reporter, - ): - return super(EphemeralDHCPv4WithReporting, self).__enter__() - - # vi: ts=4 expandtab |