Exemple #1
0
    def run(self):
        """ submenu of main to for network configuration """
        logging.debugv("menu/config.py->run(self)", [])
        choices=[
                ("Network", "Configure network..."),
            ]

        if f.ipmiStatus():
            choices += [
                ("IPMI", "Configure IPMI...")
                ]

        choices += [
                ("DNS", "Nameservers settings..."),
                ("Admin", "Administrator menu..."),
                ('AutoStart', self.c.getAutoStart()),
                ('Loglevel', self.c.getLogLevel() ),
            ]

        title = "\\ZbStart > Configure\\n\\ZBSelect the item you want to configure"
        choice = self.d.menu(title, choices=choices, cancel="Back", menu_height=10, colors=1, width=60)

        # cancel 
        if choice[0] == 1: return
        elif choice[1] == "Network": self.configNetwork()
        elif choice[1] == "IPMI": self.setIpmi()
        elif choice[1] == "DNS": self.dns()
        elif choice[1] == "Admin": self.chkAdmin()
        elif choice[1] == "Loglevel": self.setLogLevel()
        elif choice[1] == "AutoStart":
            if self.c.getAutoStart() == "Enabled":
                self.disableAutoStart()
            else:
                self.enableAutoStart()
        self.run()
Exemple #2
0
    def run(self):
        """ Submenu showing the different status overviews """
        logging.debugv("menu/status.py->run(self)", [])
        choices = [
            ("Sensor", "General information about the sensor"),
            ("Netconf", "Network configuration info"),
            ("Interfaces", "Interface information"),
            ("Debug", "Debugger"),
        ]
        if f.ipmiStatus():
            choices += [("IPMI", "IPMI information")]

        title = "\\ZbStart > Status\\n\\ZB"
        subtitle = "Which status overview do you want to see?"
        title += subtitle
        choice = self.d.menu(title, choices=choices, cancel="Back", colors=1)

        # cancel
        if choice[0] == 1:
            return
        elif choice[1] == "Sensor":
            self.sensor()
        elif choice[1] == "Netconf":
            self.netconf()
        elif choice[1] == "Interfaces":
            self.interfaces()
        elif choice[1] == "Debug":
            pdb.set_trace()
        elif choice[1] == "IPMI":
            self.ipmi()
        self.run()
Exemple #3
0
    def run(self):
        """ Submenu showing the different status overviews """
        logging.debugv("menu/status.py->run(self)", [])
        choices=[
                ("Sensor", "General information about the sensor"),
                ("Netconf", "Network configuration info"),
                ("Interfaces", "Interface information"),
                ("Debug", "Debugger"),
            ]
        if f.ipmiStatus():        
            choices += [("IPMI", "IPMI information")]

        title = "\\ZbStart > Status\\n\\ZB"
        subtitle = "Which status overview do you want to see?"
        title += subtitle
        choice = self.d.menu(title, choices=choices, cancel="Back", colors=1)

        # cancel
        if choice[0] == 1:
            return
        elif choice[1] == "Sensor": self.sensor()
        elif choice[1] == "Netconf": self.netconf()
        elif choice[1] == "Interfaces": self.interfaces()
        elif choice[1] == "Debug": pdb.set_trace()
        elif choice[1] == "IPMI": self.ipmi()
        self.run()
Exemple #4
0
    def run(self):
        """ submenu of main to for network configuration """
        logging.debugv("menu/config.py->run(self)", [])
        choices = [
            ("Network", "Configure network..."),
        ]

        if f.ipmiStatus():
            choices += [("IPMI", "Configure IPMI...")]

        choices += [
            ("DNS", "Nameservers settings..."),
            ("Admin", "Administrator menu..."),
            ('AutoStart', self.c.getAutoStart()),
            ('Loglevel', self.c.getLogLevel()),
        ]

        title = "\\ZbStart > Configure\\n\\ZBSelect the item you want to configure"
        choice = self.d.menu(title,
                             choices=choices,
                             cancel="Back",
                             menu_height=10,
                             colors=1,
                             width=60)

        # cancel
        if choice[0] == 1: return
        elif choice[1] == "Network": self.configNetwork()
        elif choice[1] == "IPMI": self.setIpmi()
        elif choice[1] == "DNS": self.dns()
        elif choice[1] == "Admin": self.chkAdmin()
        elif choice[1] == "Loglevel": self.setLogLevel()
        elif choice[1] == "AutoStart":
            if self.c.getAutoStart() == "Enabled":
                self.disableAutoStart()
            else:
                self.enableAutoStart()
        self.run()