diff options
author | creatiwit <shrin.krishnan@gmail.com> | 2019-07-12 17:00:11 -0700 |
---|---|---|
committer | Liam Hopkins <liamh@google.com> | 2019-07-12 17:00:11 -0700 |
commit | e6eab0c12df9192208233b31d8e2ac7e79cba44c (patch) | |
tree | e829053eddb8af77513c7e780c1a72c1015ff52f /packages/python-google-compute-engine/google_compute_engine/distro_lib/el_6/utils.py | |
parent | f8d3beb109f692a04ae61de314654624309e80ed (diff) | |
download | google-compute-image-packages-e6eab0c12df9192208233b31d8e2ac7e79cba44c.tar.gz |
Support for Google Private Access over IPv6 (#790)
* Enable IPv6 on interfaces based on metadata key.
* Support for FreeBSD and SLES images is still needed.
* Support for multi-NIC is still needed.
* NOTE: `-6` argument to dhclient silently changes pid-file to `/run/dhclient6.pid`
Diffstat (limited to 'packages/python-google-compute-engine/google_compute_engine/distro_lib/el_6/utils.py')
-rw-r--r-- | packages/python-google-compute-engine/google_compute_engine/distro_lib/el_6/utils.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/python-google-compute-engine/google_compute_engine/distro_lib/el_6/utils.py b/packages/python-google-compute-engine/google_compute_engine/distro_lib/el_6/utils.py index 43b8769..9f9bb98 100644 --- a/packages/python-google-compute-engine/google_compute_engine/distro_lib/el_6/utils.py +++ b/packages/python-google-compute-engine/google_compute_engine/distro_lib/el_6/utils.py @@ -31,9 +31,19 @@ class Utils(utils.Utils): logger: logger object, used to write to SysLog and serial port. dhclient_script: string, the path to a dhclient script used by dhclient. """ + helpers.CallEnableRouteAdvertisements(interfaces, logger) helpers.CallDhclientIpv6( interfaces, logger, dhclient_script=dhclient_script) + def DisableIpv6(self, interfaces, logger): + """Disable Ipv6 by giving up the DHCP lease using dhclient. + + Args: + interface: string, the output device names for enabling IPv6. + logger: logger object, used to write to SysLog and serial port. + """ + helpers.CallDhclientIpv6(interfaces, logger, None, release_lease=True) + def EnableNetworkInterfaces(self, interfaces, logger, dhclient_script=None): """Enable the list of network interfaces. |