def installMenuItems(self, dmd, menuName):
     # Install menus
     if menuName != '':
         log.info('MENUS: Installing menus')
         menu = ZenMenu(str(menuName))
         dmd.zenMenus._setObject(menu.id, menu)
         menu = dmd.zenMenus._getOb(menu.id)
     else:
         log.info('MENUS: No menus to install')
    def installMenuItems(self, dmd):
        self.removeMenuItems(dmd)
        dmd.zenMenus.More.manage_addZenMenuItem(
            "webServerDeviceDetail",
            action="webServerDeviceDetail",
            description="Web Server Details",
            allowed_classes=("WebServerDevice", ),
            ordering=5.0)

        menu = ZenMenu('WebSites')
        dmd.zenMenus._setObject(menu.id, menu)
        menu = dmd.zenMenus._getOb(menu.id)
        menu.manage_addZenMenuItem('addWebSite',
                                   action='dialog_addWebSite',
                                   description='Add Web Sites...',
                                   allowed_classes=('WebServerDevice', ),
                                   ordering=5.0,
                                   isdialog=True)
Esempio n. 3
0
 def installMenuItems(self, dmd):
     self.removeMenuItems(dmd)
     dmd.zenMenus.More.manage_addZenMenuItem(
         "webServerDeviceDetail",
         action="webServerDeviceDetail",
         description="Web Server Details",
         allowed_classes=("WebServerDevice",),
         ordering=5.0)
             
     menu = ZenMenu('WebSites')
     dmd.zenMenus._setObject(menu.id, menu)
     menu = dmd.zenMenus._getOb(menu.id)
     menu.manage_addZenMenuItem(
         'addWebSite',
         action='dialog_addWebSite',
         description='Add Web Sites...',
         allowed_classes=('WebServerDevice',),
         ordering=5.0,
         isdialog=True)
Esempio n. 4
0
    def installMenuItems(self, dmd):
        self.removeMenuItems(dmd)

        # Set an additional item in the More Menu
        #dmd.zenMenus.More.manage_addZenMenuItem("aixprintqueueDetail",
        #                                        action="aixprintqueueDetail",
        #                                        description="Aix Print Queue Details",
        #                                        ordering=5.0)

        # menu_id string:AixPrintQueues;
        # found in template
        pqmenu = ZenMenu('AixPrintQueues')
        dmd.zenMenus._setObject(pqmenu.id, pqmenu)
        pqmenu = dmd.zenMenus._getOb(pqmenu.id)

        # Add the item to the menu
        pqmenu.manage_addZenMenuItem('lockPrintQueue',
                                   action='aixdialog_lockPrintQueues',  # page template that is called
                                   description='Lock print queues...',
                                   ordering=2.0,
                                   isdialog=True)

        pqmenu.manage_addZenMenuItem('changeMonitoring',
                                   action='aixdialog_changePQMonitoring',  # page template that is called
                                   description='Monitoring...',
                                   ordering=0.0,
                                   isdialog=True)


        # menu_id string:AixFileSystem;
        # Do not use Filesystem menu as we are overriding things
        afsmenu = ZenMenu('AixFileSystem')
        dmd.zenMenus._setObject(afsmenu.id, afsmenu)
        afsmenu = dmd.zenMenus._getOb(afsmenu.id)

        # Add the item to the menu
        afsmenu.manage_addZenMenuItem('lockFileSystems',
                                   action='aixdialog_lockFileSystems',  # page template that is called
                                   description='Lock Filesystems...',
                                   ordering=2.0,
                                   isdialog=True)

        afsmenu.manage_addZenMenuItem('changeMonitoring',
                                   action='aixdialog_changeFSMonitoring',  # page template that is called
                                   description='Monitoring...',
                                   ordering=0.0,
                                   isdialog=True)

        # menu_id string:AixVolumeGroups;
        avgmenu = ZenMenu('AixVolumeGroups')
        dmd.zenMenus._setObject(avgmenu.id, avgmenu)
        avgmenu = dmd.zenMenus._getOb(avgmenu.id)

        # Add the item to the menu
        avgmenu.manage_addZenMenuItem('lockVolumeGroups',
                                   action='aixdialog_lockVolumeGroups',  # page template that is called
                                   description='Lock Volume Groups...',
                                   ordering=2.0,
                                   isdialog=True)

        avgmenu.manage_addZenMenuItem('changeMonitoring',
                                   action='aixdialog_changeVGMonitoring',  # page template that is called
                                   description='Monitoring...',
                                   ordering=0.0,
                                   isdialog=True)

        # menu_id string:AixLogicalVolumes;
        alvmenu = ZenMenu('AixLogicalVolumes')
        dmd.zenMenus._setObject(alvmenu.id, alvmenu)
        alvmenu = dmd.zenMenus._getOb(alvmenu.id)

        # Add the item to the menu
        alvmenu.manage_addZenMenuItem('lockLogicalVolumes',
                                   action='aixdialog_lockLogicalVolumes',  # page template that is called
                                   description='Lock Logical Volumes...',
                                   ordering=2.0,
                                   isdialog=True)

        alvmenu.manage_addZenMenuItem('changeMonitoring',
                                   action='aixdialog_changeLVMonitoring',  # page template that is called
                                   description='Monitoring...',
                                   ordering=0.0,
                                   isdialog=True)


        # menu_id string:AixPhysicalVolumes;
        apvmenu = ZenMenu('AixPhysicalVolumes')
        dmd.zenMenus._setObject(apvmenu.id, apvmenu)
        apvmenu = dmd.zenMenus._getOb(apvmenu.id)

        # Add the item to the menu
        apvmenu.manage_addZenMenuItem('lockPhysicalVolumes',
                                   action='aixdialog_lockPhysicalVolumes',  # page template that is called
                                   description='Lock Physical Volumes...',
                                   ordering=2.0,
                                   isdialog=True)

        apvmenu.manage_addZenMenuItem('changeMonitoring',
                                   action='aixdialog_changePVMonitoring',  # page template that is called
                                   description='Monitoring...',
                                   ordering=0.0,
                                   isdialog=True)

        # menu_id string:AixPagingSpaces;
        apsmenu = ZenMenu('AixPagingSpaces')
        dmd.zenMenus._setObject(apsmenu.id, apsmenu)
        apsmenu = dmd.zenMenus._getOb(apsmenu.id)

        # Add the item to the menu
        apsmenu.manage_addZenMenuItem('lockPagingSpaces',
                                   action='aixdialog_lockPagingSpaces',  # page template that is called
                                   description='Lock Paging Spaces...',
                                   ordering=2.0,
                                   isdialog=True)

        apsmenu.manage_addZenMenuItem('changeMonitoring',
                                   action='aixdialog_changePSMonitoring',  # page template that is called
                                   description='Monitoring...',
                                   ordering=0.0,
                                   isdialog=True)
    def installMenuItems(self, dmd, menuName):
        # Install menus
        if menuName != '':
            log.info('MENUS: Installing menus')
            menu = ZenMenu(str(menuName))
            dmd.zenMenus._setObject(menu.id, menu)
            menu = dmd.zenMenus._getOb(menu.id)
        else:
            log.info('MENUS: No menus to install')

        menu.manage_addZenMenuItem(
            'ipSLAipSlaDevice',
            action='ipSLAipSlaDevice',
            description='View SLAs',
            permissions=(ZEN_MANAGE_DEVICE,),
            ordering=5.0)

        menu.manage_addZenMenuItem(
            'addEchoSLAS',
            action='dialog_addEchoSLAS',
            description='Add Echo SLA...',
            permissions=(ZEN_MANAGE_DEVICE,),
            ordering=5.0,
            isdialog=True)

        menu.manage_addZenMenuItem(
            'addHttpSLAS',
            action='dialog_addHttpSLAS',
            description='Add HTTP SLA...',
            permissions=(ZEN_MANAGE_DEVICE,),
            ordering=5.0,
            isdialog=True)

        menu.manage_addZenMenuItem(
            'addDnsSLAS',
            action='dialog_addDnsSLAS',
            description='Add DNS SLA...',
            permissions=(ZEN_MANAGE_DEVICE,),
            ordering=5.0,
            isdialog=True)

        menu.manage_addZenMenuItem(
            'addDhcpSLAS',
            action='dialog_addDhcpSLAS',
            description='Add DHCP SLA...',
            permissions=(ZEN_MANAGE_DEVICE,),
            ordering=5.0,
            isdialog=True)

        menu.manage_addZenMenuItem(
            'addJitterSLAS',
            action='dialog_addJitterSLAS',
            description='Add Jitter SLA...',
            permissions=(ZEN_MANAGE_DEVICE,),
            ordering=5.0,
            isdialog=True)

        menu.manage_addZenMenuItem(
            'addTcpSLAS',
            action='dialog_addTcpSLAS',
            description='Add TCP SLA...',
            permissions=(ZEN_MANAGE_DEVICE,),
            ordering=5.0,
            isdialog=True)

        menu.manage_addZenMenuItem(
            'writeMemSLAS',
            action='dialog_writeMemSLAS',
            description='Write mem...',
            permissions=(ZEN_MANAGE_DEVICE,),
            ordering=5.0,
            isdialog=True)

        menu.manage_addZenMenuItem(
            'delSLAS',
            action='dialog_delSLAS',
            description='Delete SLA...',
            permissions=(ZEN_MANAGE_DEVICE,),
            ordering=5.0,
            isdialog=True)
Esempio n. 6
0
    def installMenus(self,app):
        dmdloc = self.dmd
        self.removeMenus(dmdloc)

        modulemenu = ZenMenu('ModuleMenu')
        dmdloc.zenMenus._setObject(modulemenu.id, modulemenu)
        modulemenu = dmdloc.zenMenus._getOb(modulemenu.id)
        modulemenu.manage_addZenMenuItem('addModule',
                                   action='dialog_addModule',  # page template that is called
                                   description='Add Ruleset',
                                   ordering=4.0,
                                   isdialog=True)
        modulemenu.manage_addZenMenuItem('removeModule',
                                   action='dialog_removeModule',  # page template that is called
                                   description='Remove Ruleset',
                                   ordering=3.0,
                                   isdialog=True)
        modulemenu.manage_addZenMenuItem('runAllMembershipRules',
                                   action='dialog_runAllMembershipRules',  # page template that is called
                                   description='Build All Memberships',
                                   ordering=2.0,
                                   isdialog=True)
        
        modulemenu = ZenMenu('RuleDefinitions')
        dmdloc.zenMenus._setObject(modulemenu.id, modulemenu)
        modulemenu = dmdloc.zenMenus._getOb(modulemenu.id)
        modulemenu.manage_addZenMenuItem('addRule',
                                   action='dialog_addRule',  # page template that is called
                                   description='Add Rule',
                                   ordering=4.0,
                                   isdialog=True)
        modulemenu.manage_addZenMenuItem('removeRule',
                                   action='dialog_removeRule',  # page template that is called
                                   description='Remove Rule',
                                   ordering=3.0,
                                   isdialog=True)
        
        modulemenu = ZenMenu('RuleModule')
        dmdloc.zenMenus._setObject(modulemenu.id, modulemenu)
        modulemenu = dmdloc.zenMenus._getOb(modulemenu.id)
        modulemenu.manage_addZenMenuItem('runAllMembershipRules',
                                   action='dialog_runModuleMembershipRules',  # page template that is called
                                   description='Build Memberships',
                                   ordering=2.0,
                                   isdialog=True)
        modulemenu.manage_addZenMenuItem('buildAlerts',
                                   action='dialog_buildModuleAlerts',  # page template that is called
                                   description='Build Alerts',
                                   ordering=1.0,
                                   isdialog=True)
    def installMenus(self,app):
        dmdloc = self.dmd
        self.removeMenus(dmdloc)
        rulesetmenu = ZenMenu('ProfileMenu')
        dmdloc.zenMenus._setObject(rulesetmenu.id, rulesetmenu)
        rulesetmenu = dmdloc.zenMenus._getOb(rulesetmenu.id)
        rulesetmenu.manage_addZenMenuItem('addRuleset',
                                   action='dialog_addRuleset',  # page template that is called
                                   description='Add Ruleset',
                                   ordering=6.0,
                                   isdialog=True)
        rulesetmenu.manage_addZenMenuItem('removeRuleset',
                                   action='dialog_removeRuleset',  # page template that is called
                                   description='Remove Ruleset',
                                   ordering=5.0,
                                   isdialog=True)
        rulesetmenu.manage_addZenMenuItem('moveRuleset',
                                   action='dialog_moveRuleset',  # page template that is called
                                   description='Move Ruleset',
                                   ordering=4.0,
                                   isdialog=True)
        rulesetmenu.manage_addZenMenuItem('runAllMatches',
                                   action='dialog_runAllMatches',  # page template that is called
                                   description='Test All Rules',
                                   ordering=3.0,
                                   isdialog=True)
        rulesetmenu.manage_addZenMenuItem('runAllRules',
                                   action='dialog_runAllRules',  # page template that is called
                                   description='Apply All Rules',
                                   ordering=2.0,
                                   isdialog=True)
        rulesetmenu.manage_addZenMenuItem('buildAllAlerts',
                                   action='dialog_buildAllAlerts',  # page template that is called
                                   description='Generate All Alerts',
                                   ordering=1.0,
                                   isdialog=True)

        
        rulesetmenu = ZenMenu('RuleMenu')
        dmdloc.zenMenus._setObject(rulesetmenu.id, rulesetmenu)
        rulesetmenu = dmdloc.zenMenus._getOb(rulesetmenu.id)
        rulesetmenu.manage_addZenMenuItem('addRule',
                                   action='dialog_addRule',  # page template that is called
                                   description='Add Rule',
                                   ordering=2.0,
                                   isdialog=True)
        rulesetmenu.manage_addZenMenuItem('removeRule',
                                   action='dialog_removeRule',  # page template that is called
                                   description='Remove Rule',
                                   ordering=1.0,
                                   isdialog=True)
        
        rulesetmenu = ZenMenu('RulesetMenu')
        dmdloc.zenMenus._setObject(rulesetmenu.id, rulesetmenu)
        rulesetmenu = dmdloc.zenMenus._getOb(rulesetmenu.id)
        rulesetmenu.manage_addZenMenuItem('runMatches',
                                   action='dialog_runMatches',  # page template that is called
                                   description='Test Rules',
                                   ordering=3.0,
                                   isdialog=True)
        rulesetmenu.manage_addZenMenuItem('runRules',
                                   action='dialog_runRules',  # page template that is called
                                   description='Apply Rules',
                                   ordering=2.0,
                                   isdialog=True)
        rulesetmenu.manage_addZenMenuItem('buildAlerts',
                                   action='dialog_buildAlerts',  # page template that is called
                                   description='Generate Alerts',
                                   ordering=1.0,
                                   isdialog=True)
Esempio n. 8
0
    def installMenuItems(self, dmd):
        self.removeMenuItems(dmd)

        # Set an additional item in the More Menu
        #dmd.zenMenus.More.manage_addZenMenuItem("aixprintqueueDetail",
        #                                        action="aixprintqueueDetail",
        #                                        description="Aix Print Queue Details",
        #                                        ordering=5.0)

        # menu_id string:AixPrintQueues;
        # found in template
        pqmenu = ZenMenu('AixPrintQueues')
        dmd.zenMenus._setObject(pqmenu.id, pqmenu)
        pqmenu = dmd.zenMenus._getOb(pqmenu.id)

        # Add the item to the menu
        pqmenu.manage_addZenMenuItem(
            'lockPrintQueue',
            action='aixdialog_lockPrintQueues',  # page template that is called
            description='Lock print queues...',
            ordering=2.0,
            isdialog=True)

        pqmenu.manage_addZenMenuItem(
            'changeMonitoring',
            action=
            'aixdialog_changePQMonitoring',  # page template that is called
            description='Monitoring...',
            ordering=0.0,
            isdialog=True)

        # menu_id string:AixFileSystem;
        # Do not use Filesystem menu as we are overriding things
        afsmenu = ZenMenu('AixFileSystem')
        dmd.zenMenus._setObject(afsmenu.id, afsmenu)
        afsmenu = dmd.zenMenus._getOb(afsmenu.id)

        # Add the item to the menu
        afsmenu.manage_addZenMenuItem(
            'lockFileSystems',
            action='aixdialog_lockFileSystems',  # page template that is called
            description='Lock Filesystems...',
            ordering=2.0,
            isdialog=True)

        afsmenu.manage_addZenMenuItem(
            'changeMonitoring',
            action=
            'aixdialog_changeFSMonitoring',  # page template that is called
            description='Monitoring...',
            ordering=0.0,
            isdialog=True)

        # menu_id string:AixVolumeGroups;
        avgmenu = ZenMenu('AixVolumeGroups')
        dmd.zenMenus._setObject(avgmenu.id, avgmenu)
        avgmenu = dmd.zenMenus._getOb(avgmenu.id)

        # Add the item to the menu
        avgmenu.manage_addZenMenuItem(
            'lockVolumeGroups',
            action='aixdialog_lockVolumeGroups',  # page template that is called
            description='Lock Volume Groups...',
            ordering=2.0,
            isdialog=True)

        avgmenu.manage_addZenMenuItem(
            'changeMonitoring',
            action=
            'aixdialog_changeVGMonitoring',  # page template that is called
            description='Monitoring...',
            ordering=0.0,
            isdialog=True)

        # menu_id string:AixLogicalVolumes;
        alvmenu = ZenMenu('AixLogicalVolumes')
        dmd.zenMenus._setObject(alvmenu.id, alvmenu)
        alvmenu = dmd.zenMenus._getOb(alvmenu.id)

        # Add the item to the menu
        alvmenu.manage_addZenMenuItem(
            'lockLogicalVolumes',
            action=
            'aixdialog_lockLogicalVolumes',  # page template that is called
            description='Lock Logical Volumes...',
            ordering=2.0,
            isdialog=True)

        alvmenu.manage_addZenMenuItem(
            'changeMonitoring',
            action=
            'aixdialog_changeLVMonitoring',  # page template that is called
            description='Monitoring...',
            ordering=0.0,
            isdialog=True)

        # menu_id string:AixPhysicalVolumes;
        apvmenu = ZenMenu('AixPhysicalVolumes')
        dmd.zenMenus._setObject(apvmenu.id, apvmenu)
        apvmenu = dmd.zenMenus._getOb(apvmenu.id)

        # Add the item to the menu
        apvmenu.manage_addZenMenuItem(
            'lockPhysicalVolumes',
            action=
            'aixdialog_lockPhysicalVolumes',  # page template that is called
            description='Lock Physical Volumes...',
            ordering=2.0,
            isdialog=True)

        apvmenu.manage_addZenMenuItem(
            'changeMonitoring',
            action=
            'aixdialog_changePVMonitoring',  # page template that is called
            description='Monitoring...',
            ordering=0.0,
            isdialog=True)

        # menu_id string:AixPagingSpaces;
        apsmenu = ZenMenu('AixPagingSpaces')
        dmd.zenMenus._setObject(apsmenu.id, apsmenu)
        apsmenu = dmd.zenMenus._getOb(apsmenu.id)

        # Add the item to the menu
        apsmenu.manage_addZenMenuItem(
            'lockPagingSpaces',
            action='aixdialog_lockPagingSpaces',  # page template that is called
            description='Lock Paging Spaces...',
            ordering=2.0,
            isdialog=True)

        apsmenu.manage_addZenMenuItem(
            'changeMonitoring',
            action=
            'aixdialog_changePSMonitoring',  # page template that is called
            description='Monitoring...',
            ordering=0.0,
            isdialog=True)
Esempio n. 9
0
    def installMenus(self, app):
        dmdloc = self.dmd
        self.removeMenus(dmdloc)

        modulemenu = ZenMenu('ModuleMenu')
        dmdloc.zenMenus._setObject(modulemenu.id, modulemenu)
        modulemenu = dmdloc.zenMenus._getOb(modulemenu.id)
        modulemenu.manage_addZenMenuItem(
            'addModule',
            action='dialog_addModule',  # page template that is called
            description='Add Ruleset',
            ordering=4.0,
            isdialog=True)
        modulemenu.manage_addZenMenuItem(
            'removeModule',
            action='dialog_removeModule',  # page template that is called
            description='Remove Ruleset',
            ordering=3.0,
            isdialog=True)
        modulemenu.manage_addZenMenuItem(
            'runAllMembershipRules',
            action=
            'dialog_runAllMembershipRules',  # page template that is called
            description='Build All Memberships',
            ordering=2.0,
            isdialog=True)

        modulemenu = ZenMenu('RuleDefinitions')
        dmdloc.zenMenus._setObject(modulemenu.id, modulemenu)
        modulemenu = dmdloc.zenMenus._getOb(modulemenu.id)
        modulemenu.manage_addZenMenuItem(
            'addRule',
            action='dialog_addRule',  # page template that is called
            description='Add Rule',
            ordering=4.0,
            isdialog=True)
        modulemenu.manage_addZenMenuItem(
            'removeRule',
            action='dialog_removeRule',  # page template that is called
            description='Remove Rule',
            ordering=3.0,
            isdialog=True)

        modulemenu = ZenMenu('RuleModule')
        dmdloc.zenMenus._setObject(modulemenu.id, modulemenu)
        modulemenu = dmdloc.zenMenus._getOb(modulemenu.id)
        modulemenu.manage_addZenMenuItem(
            'runAllMembershipRules',
            action=
            'dialog_runModuleMembershipRules',  # page template that is called
            description='Build Memberships',
            ordering=2.0,
            isdialog=True)
        modulemenu.manage_addZenMenuItem(
            'buildAlerts',
            action='dialog_buildModuleAlerts',  # page template that is called
            description='Build Alerts',
            ordering=1.0,
            isdialog=True)