summaryrefslogtreecommitdiff
path: root/packages/python-google-compute-engine/google_compute_engine/distro_lib/debian_9/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'packages/python-google-compute-engine/google_compute_engine/distro_lib/debian_9/utils.py')
-rw-r--r--packages/python-google-compute-engine/google_compute_engine/distro_lib/debian_9/utils.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/python-google-compute-engine/google_compute_engine/distro_lib/debian_9/utils.py b/packages/python-google-compute-engine/google_compute_engine/distro_lib/debian_9/utils.py
index 9255214..2b12058 100644
--- a/packages/python-google-compute-engine/google_compute_engine/distro_lib/debian_9/utils.py
+++ b/packages/python-google-compute-engine/google_compute_engine/distro_lib/debian_9/utils.py
@@ -69,3 +69,11 @@ class Utils(utils.Utils):
proto_id: string, the routing protocol identifier for Google IP changes.
"""
return ip_forwarding_utils.IpForwardingUtilsIproute(logger, proto_id)
+
+ def RestartNetworking(self, logger):
+ """Restart the networking service to force a DHCP refresh.
+
+ Args:
+ logger: logger object, used to write to SysLog and serial port.
+ """
+ helpers.SystemctlRestart('networking', logger)