Signed-off-by: Joey Boggs <jboggs at redhat.com>
---
scripts/network.py | 8 ++++++--
scripts/ovirt-config-setup.py | 15 +++++++++++++++
2 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/scripts/network.py b/scripts/network.py
index fd78877..8159283 100644
--- a/scripts/network.py
+++ b/scripts/network.py
@@ -78,7 +78,6 @@ class Network:
self.BR_CONFIG += "set %s/TYPE Bridge\n" % BR_ROOT
self.BR_CONFIG += "set %s/PEERNTP yes\n" % BR_ROOT
self.BR_CONFIG += "set %s/DELAY 0\n" % BR_ROOT
-
if OVIRT_VARS.has_key("OVIRT_IPV6"):
if OVIRT_VARS["OVIRT_IPV6"] == "auto":
self.BR_CONFIG += "set %s/IPV6INIT yes\n" % BR_ROOT
@@ -89,11 +88,16 @@ class Network:
self.BR_CONFIG += "set %s/IPV6_AUTOCONF no\n" %
BR_ROOT
self.BR_CONFIG += "set %s/IPV6FORWARDING no\n" %
BR_ROOT
self.BR_CONFIG += "set %s/DHCPV6C yes\n" % BR_ROOT
- else:
+ elif OVIRT_VARS["OVIRT_IPV6"] == "static":
self.BR_CONFIG += "set %s/IPV6INIT yes\n" % BR_ROOT
self.BR_CONFIG += "set %s/IPV6ADDR %s\n" % (BR_ROOT,
OVIRT_VARS["OVIRT_IPV6_ADDRESS"])
self.BR_CONFIG += "set %s/IPV6_AUTOCONF no\n" %
BR_ROOT
self.BR_CONFIG += "set %s/IPV6FORWARDING no\n" %
BR_ROOT
+ else:
+ self.BR_CONFIG += "set %s/IPV6INIT no\n" % BR_ROOT
+ self.BR_CONFIG += "set %s/IPV6_AUTOCONF no\n" % BR_ROOT
+ self.BR_CONFIG += "set %s/IPV6FORWARDING no\n" % BR_ROOT
+
if OVIRT_VARS.has_key("OVIRT_VLAN"):
VLAN_ID=OVIRT_VARS["OVIRT_VLAN"]
diff --git a/scripts/ovirt-config-setup.py b/scripts/ovirt-config-setup.py
index 753c80d..6ac09dc 100755
--- a/scripts/ovirt-config-setup.py
+++ b/scripts/ovirt-config-setup.py
@@ -1144,6 +1144,11 @@ class NodeConfigScreen():
augtool("rm", "/files/" + OVIRT_DEFAULTS +
"/OVIRT_IP_ADDRESS", "")
augtool("rm", "/files/" + OVIRT_DEFAULTS +
"/OVIRT_IP_NETMASK", "")
augtool("rm", "/files/" + OVIRT_DEFAULTS +
"/OVIRT_IP_GATEWAY", "")
+ augtool("rm", "/files/" + OVIRT_DEFAULTS +
"/OVIRT_IPV6" ,"")
+ augtool("rm", "/files/" + OVIRT_DEFAULTS +
"/OVIRT_IPV6_ADDRESS", "")
+ augtool("rm", "/files/" + OVIRT_DEFAULTS +
"/OVIRT_IPV6_NETMASK", "")
+ augtool("rm", "/files/" + OVIRT_DEFAULTS +
"/OVIRT_IPV6_GATEWAY", "")
+
msg = ""
if self.static_ipv4_nic_proto.value() == 1:
if self.ipv4_netdevip.value() == "":
@@ -1178,6 +1183,15 @@ class NodeConfigScreen():
del OVIRT_VARS["OVIRT_IP_NETMASK"]
if OVIRT_VARS.has_key("OVIRT_IP_GATEWAY"):
del OVIRT_VARS["OVIRT_IP_GATEWAY"]
+ if OVIRT_VARS.has_key("OVIRT_IPV6"):
+ del OVIRT_VARS["OVIRT_IPV6"]
+ if OVIRT_VARS.has_key("OVIRT_ADDRESS"):
+ del OVIRT_VARS["OVIRT_IPV6_ADDRESS"]
+ if OVIRT_VARS.has_key("OVIRT_IPV6_NETMASK"):
+ del OVIRT_VARS["OVIRT_IPV6_NETMASK"]
+ if OVIRT_VARS.has_key("OVIRT_IPV6_GATEWAY"):
+ del OVIRT_VARS["OVIRT_IPV6_GATEWAY"]
+
if self.netvlanid.value() != "":
augtool("set", "/files/" + OVIRT_DEFAULTS +
"/OVIRT_VLAN", '"' + self.netvlanid.value() +
'"')
if self.dhcp_ipv6_nic_proto.value() == 1:
@@ -1192,6 +1206,7 @@ class NodeConfigScreen():
augtool("set", "/files/" + OVIRT_DEFAULTS
+ "/OVIRT_IPV6_NETMASK", '"' +
self.ipv6_netdevmask.value() + '"')
if self.ipv6_netdevgateway.value():
augtool("set", "/files/" + OVIRT_DEFAULTS
+ "/OVIRT_IPV6_GATEWAY", '"' +
self.ipv6_netdevgateway.value() + '"')
+
self.screen = SnackScreen()
# apply any colorsets that were provided.
for item in self.__colorset.keys():
--
1.7.5.4