[node-patches] Change in ovirt-node[master]: setup: Remove duplicate code

fabiand at fedoraproject.org fabiand at fedoraproject.org
Wed Sep 26 15:48:24 UTC 2012


Fabian Deutsch has uploaded a new change for review.

Change subject: setup: Remove duplicate code
......................................................................

setup: Remove duplicate code

Some code parts appeared twice in the code. This looked like a merge
that went wrong.

Change-Id: I6ddea21c8dcd2ba8bdb2dca1613577daf7aa729e
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M scripts/ovirt-config-setup.py
1 file changed, 0 insertions(+), 53 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/14/8214/1

diff --git a/scripts/ovirt-config-setup.py b/scripts/ovirt-config-setup.py
index c9e6e67..2ac2057 100755
--- a/scripts/ovirt-config-setup.py
+++ b/scripts/ovirt-config-setup.py
@@ -1627,59 +1627,6 @@
             augtool("rm", "/files/" + OVIRT_DEFAULTS +
                     "/OVIRT_IPV6_GATEWAY", "")
 
-            msg = ""
-            if self.static_ipv4_nic_proto.value() == 1:
-                if self.ipv4_netdevip.value() == "":
-                    msg = "  - IPv4 Address\n"
-                if self.ipv4_netdevmask.value() == "":
-                    msg += "  - IPv4 Netmask Address\n"
-                if self.ipv4_netdevgateway.value() == "":
-                    msg = "  - IPv4 Gateway Address\n"
-                augtool("set", "/files/" + OVIRT_DEFAULTS +
-                        "/OVIRT_IP_ADDRESS", '"' +
-                        self.ipv4_netdevip.value() + '"')
-                augtool("set", "/files/" + OVIRT_DEFAULTS +
-                        "/OVIRT_IP_NETMASK", '"' +
-                        self.ipv4_netdevmask.value() + '"')
-                augtool("set", "/files/" + OVIRT_DEFAULTS +
-                        "/OVIRT_IP_GATEWAY", '"' +
-                        self.ipv4_netdevgateway.value() + '"')
-
-            if self.static_ipv6_nic_proto.value() == 1:
-                if self.ipv6_netdevmask.value() == "":
-                    msg += "  - IPv6 Netmask Address\n"
-                if self.ipv6_netdevgateway.value() == "":
-                    msg += "  - IPv6 Gateway Address\n"
-                # left out gateway check to prevent multiple ones
-            if msg != "":
-                msg = "Please Input:\n" + msg
-                self._create_warn_screen()
-                warn = ButtonChoiceWindow(self.screen, "Network Settings",
-                                          msg, buttons=['Ok'])
-                self.__nic_config_failed = 1
-                self.ipv4_current_netdevip = self.ipv4_netdevip.value()
-                self.ipv4_current_netdevmask = self.ipv4_netdevmask.value()
-                self.ipv4_current_netdevgateway = (
-                            self.ipv4_netdevgateway.value())
-                self.reset_screen_colors()
-                return
-            else:
-                # if exists remove static keys from dictionary
-                if "OVIRT_IP_ADDRESS" in OVIRT_VARS:
-                    del OVIRT_VARS["OVIRT_IP_ADDRESS"]
-                if "OVIRT_IP_NETMASK" in OVIRT_VARS:
-                    del OVIRT_VARS["OVIRT_IP_NETMASK"]
-                if "OVIRT_IP_GATEWAY" in OVIRT_VARS:
-                    del OVIRT_VARS["OVIRT_IP_GATEWAY"]
-                if "OVIRT_IPV6" in OVIRT_VARS:
-                    del OVIRT_VARS["OVIRT_IPV6"]
-                if "OVIRT_ADDRESS" in OVIRT_VARS:
-                    del OVIRT_VARS["OVIRT_IPV6_ADDRESS"]
-                if "OVIRT_IPV6_NETMASK" in OVIRT_VARS:
-                    del OVIRT_VARS["OVIRT_IPV6_NETMASK"]
-                if "OVIRT_IPV6_GATEWAY" in OVIRT_VARS:
-                    del OVIRT_VARS["OVIRT_IPV6_GATEWAY"]
-
             if self.netvlanid.value() != "":
                 augtool("set", "/files/" + OVIRT_DEFAULTS + "/OVIRT_VLAN",
                         '"' + self.netvlanid.value() + '"')


--
To view, visit http://gerrit.ovirt.org/8214
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6ddea21c8dcd2ba8bdb2dca1613577daf7aa729e
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>



More information about the node-patches mailing list