def checksQueries_menu(): menu = ['1. General Health Check', '2. Nightly Maintenance Check', '\n 3. Show Sync Status', '4. GW pending events by User (consumerevents)', '5. Mobility pending events by User (syncevents)', '\n 6. Attachments...', '7. Performance...', '\n 0. Back'] available = build_avaialbe(menu) loop = True while loop: show_menu(menu) choice = get_choice(available) if choice == '1': ghc.generalHealthCheck(mobilityConfig, gwConfig, XMLconfig ,ldapConfig, dbConfig, trustedConfig, config_files, webConfig) print; ds.eContinue() elif choice == '2': print ds.checkNightlyMaintenance(config_files, mobilityConfig)['output'] print; ds.eContinue() elif choice == '3': ds.datasyncBanner(dsappversion) ds.showStatus(dbConfig) print; ds.eContinue() elif choice == '4': ds.show_GW_syncEvents(dbConfig) elif choice == '5': ds.show_Mob_syncEvents(dbConfig) elif choice == '6': viewAttachments_menu() elif choice == '7': performance_menu() elif choice == '0': loop = False main_menu()
def checksQueries_menu(): menu = [ '1. General Health Check', '2. Nightly Maintenance Check', '\n 3. Show Sync Status', '4. GW pending events by User (consumerevents)', '5. Mobility pending events by User (syncevents)', '\n 6. Attachments..', '7. Performance..', '\n 0. Back' ] available = build_avaialbe(menu) loop = True while loop: show_menu(menu) choice = get_choice(available) if choice == '1': ghc.generalHealthCheck() print ds.eContinue() elif choice == '2': print ds.checkNightlyMaintenance()['output'] print ds.eContinue() elif choice == '3': ds.datasyncBanner() ds.showStatus() print ds.eContinue() elif choice == '4': ds.show_GW_syncEvents() elif choice == '5': ds.show_Mob_syncEvents() elif choice == '6': viewAttachments_menu() elif choice == '7': performance_menu() elif choice == '0': loop = False main_menu()
# Run health check if args.ghc: import dsapp_ghc as ghc ghc.generalHealthCheck(mobilityConfig, gwConfig, XMLconfig ,ldapConfig, dbConfig, trustedConfig, config_files, webConfig) print; ds.eContinue() sys.exit(0) # Get / upload mobility logs if args.upload: ds.getLogs(mobilityConfig, gwConfig, XMLconfig ,ldapConfig, dbConfig, trustedConfig, config_files, webConfig) print; ds.eContinue() sys.exit(0) # Run nightly maintenance if args.check: print ds.checkNightlyMaintenance(config_files, mobilityConfig)['output'] print; ds.eContinue() sys.exit(0) # Show sync status if args.status: ds.showStatus(dbConfig) print; ds.eContinue() sys.exit(0) # Update mobility URL if args.update: ds.updateMobilityFTP() ds.eContinue() sys.exit(0)
print ds.eContinue() sys.exit(0) # Get / upload mobility logs if args.upload: logger.info("Running switch: uploadLogs") ds.getLogs() print ds.eContinue() sys.exit(0) # Run nightly maintenance if args.check: logger.info("Running switch: check") print ds.checkNightlyMaintenance()['output'] print ds.eContinue() sys.exit(0) # Show sync status if args.status: logger.info("Running switch: status") ds.showStatus() print ds.eContinue() sys.exit(0) # Update mobility URL if args.update: logger.info("Running switch: update")