summaryrefslogtreecommitdiff
path: root/packages/python-google-compute-engine/google_compute_engine/distro_lib/debian_9/utils.py
diff options
context:
space:
mode:
authorLiam Hopkins <liamh@google.com>2019-09-05 13:00:12 -0700
committerLiam Hopkins <liamh@google.com>2019-09-05 13:00:12 -0700
commit554deaf6a44977e7be6d357b472cb6c7639ce9ab (patch)
treeff3eadbb7ce61597996054e507e7431453fed45d /packages/python-google-compute-engine/google_compute_engine/distro_lib/debian_9/utils.py
parent688bcbd32ef2c8cd014def57413ba76cf2ee7257 (diff)
parentc3f01c2d586dd01920aff180f0152df9af34ed08 (diff)
downloadgoogle-compute-image-packages-554deaf6a44977e7be6d357b472cb6c7639ce9ab.tar.gz
Merge branch 'development'
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)