def editIpmiNetmask(self): """ Edit the statically set IPMI netmask """ logging.debugv("menu/config.py->editIpmiNetmask(self)", []) netmask = self.c.getIpmiNetmask() while True: output = self.d.inputbox("IPMI Netmask", 10, 50, netmask) if output[0]: return if t.ipv4check(output[1]): netmask = output[1] try: f.ipmiSetNet(["netmask", netmask]) logging.debug("Setting IPMI netmask to %s" % (netmask) ) self.c.ipmi["netmask"] = netmask self.c.ipmi.write() except excepts.RunException: self.d.msgbox("Could not set the subnet mask for the IPMI interface", 8, 55) return else: self.d.msgbox("Please enter a valid netmask address")
def editIpmiGatewayMAC(self): """ Edit the statically set IPMI gateway MAC address """ logging.debugv("menu/config.py->editIpmiGatewayMAC(self)", []) gwmac = self.c.getIpmiGatewayMAC() while True: output = self.d.inputbox("IPMI gateway MAC address", 10, 50, gwmac) if output[0]: return if t.macCheck(output[1]): gwmac = output[1] try: f.ipmiSetNet(["defgw", "macaddr", gwmac]) logging.debug("Setting IPMI gateway MAC address to %s" % (gwmac)) self.c.ipmi["gwmac"] = gwmac self.c.ipmi.write() except excepts.RunException: self.d.msgbox("Could not set the gateway MAC address for the IPMI interface", 8, 60) return else: self.d.msgbox("Please enter a valid MAC address")
def editIpmiAddress(self): """ Edit the statically set IPMI IP address """ logging.debugv("menu/config.py->editIpmiAddress(self)", []) address = self.c.getIpmiAddress() while True: output = self.d.inputbox("IPMI Address", 10, 50, address) if output[0]: return if t.ipv4check(output[1]): address = output[1] try: f.ipmiSetNet(["ipaddr", address]) logging.debug("Setting IPMI address to %s" % (address) ) self.c.ipmi["address"] = address self.c.ipmi.write() except excepts.RunException: self.d.msgbox("Could not set the IP address for the IPMI interface", 8, 55) return else: self.d.msgbox("Please enter a valid IP address")
def editIpmiVlanID(self): """ Edit the statically set IPMI VLAN ID """ logging.debugv("menu/config.py->editIpmiVlanID(self)", []) vlanid = self.c.getIpmiVlanID() while True: output = self.d.inputbox("IPMI VLAN ID", 10, 50, vlanid) if output[0]: return if output[1]: vlanid = output[1] try: if vlanid == 0: f.ipmiSetNet(["vlan", "id", "off"]) else: f.ipmiSetNet(["vlan", "id", vlanid]) logging.debug("Setting IPMI VLAN ID to %s" % (vlanid)) self.c.ipmi["vlanid"] = vlanid self.c.ipmi.write() except excepts.RunException: self.d.msgbox("Could not set the VLAN ID for the IPMI interface", 8, 60) return
def editIpmiGatewayIP(self): """ Edit the statically set IPMI gateway IP address """ logging.debugv("menu/config.py->editIpmiGatewayIP(self)", []) gw = self.c.getIpmiGatewayIP() while True: output = self.d.inputbox("IPMI gateway IP address", 10, 50, gw) if output[0]: return if t.ipv4check(output[1]): gw = output[1] try: f.ipmiSetNet(["defgw", "ipaddr", gw]) logging.debug("Setting IPMI gateway address to %s" % (gw)) self.c.ipmi["gwip"] = gw self.c.ipmi.write() except excepts.RunException: self.d.msgbox( "Could not set the gateway IP address for the IPMI interface", 8, 60) return else: self.d.msgbox("Please enter a valid IP address")
def editIpmiNetmask(self): """ Edit the statically set IPMI netmask """ logging.debugv("menu/config.py->editIpmiNetmask(self)", []) netmask = self.c.getIpmiNetmask() while True: output = self.d.inputbox("IPMI Netmask", 10, 50, netmask) if output[0]: return if t.ipv4check(output[1]): netmask = output[1] try: f.ipmiSetNet(["netmask", netmask]) logging.debug("Setting IPMI netmask to %s" % (netmask)) self.c.ipmi["netmask"] = netmask self.c.ipmi.write() except excepts.RunException: self.d.msgbox( "Could not set the subnet mask for the IPMI interface", 8, 55) return else: self.d.msgbox("Please enter a valid netmask address")
def editIpmiAddress(self): """ Edit the statically set IPMI IP address """ logging.debugv("menu/config.py->editIpmiAddress(self)", []) address = self.c.getIpmiAddress() while True: output = self.d.inputbox("IPMI Address", 10, 50, address) if output[0]: return if t.ipv4check(output[1]): address = output[1] try: f.ipmiSetNet(["ipaddr", address]) logging.debug("Setting IPMI address to %s" % (address)) self.c.ipmi["address"] = address self.c.ipmi.write() except excepts.RunException: self.d.msgbox( "Could not set the IP address for the IPMI interface", 8, 55) return else: self.d.msgbox("Please enter a valid IP address")
def editIpmiVlanID(self): """ Edit the statically set IPMI VLAN ID """ logging.debugv("menu/config.py->editIpmiVlanID(self)", []) vlanid = self.c.getIpmiVlanID() while True: output = self.d.inputbox("IPMI VLAN ID", 10, 50, vlanid) if output[0]: return if output[1]: vlanid = output[1] try: if vlanid == 0: f.ipmiSetNet(["vlan", "id", "off"]) else: f.ipmiSetNet(["vlan", "id", vlanid]) logging.debug("Setting IPMI VLAN ID to %s" % (vlanid)) self.c.ipmi["vlanid"] = vlanid self.c.ipmi.write() except excepts.RunException: self.d.msgbox( "Could not set the VLAN ID for the IPMI interface", 8, 60) return