How to use the execo.log.style.user1 function in execo

To help you get started, we’ve selected a few execo examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mliroz / hadoop_g5k / scripts / hg5k.py View on Github external
if args.copyhistory:
        hc.copy_history(args.copyhistory[0])

    if args.stop:
        hc.stop()

    if args.clean:
        hc.clean()
    
    if args.state:
        if args.state == "general":
            
            logger.info("---------------------------------------------------------")
            logger.info(style.user2("Hadoop Cluster with ID " + str(hc_id)))
            logger.info(style.user1("    Version: ") + hc.get_version())
            logger.info(style.user1("    Master: ") + str(hc.master))
            logger.info(style.user1("    Hosts: ") + str(hc.hosts))
            logger.info(style.user1("    Topology: "))
            for h in hc.hosts:
                logger.info("        " + str(h) + " -> " + str(hc.topology.get_rack(h)))
            if hc.initialized:
                if hc.running:
                    logger.info("The cluster is " + style.user3("running"))
                else:
                    logger.info("The cluster is " + style.user3("stopped"))
            else:
                logger.info("The cluster is not " + style.user3("initialized"))
            logger.info("---------------------------------------------------------")
        
        elif args.state == "files":                      
            (stdout, stderr) = hc.execute("fs -lsr /", verbose=False)
github mliroz / hadoop_g5k / scripts / hg5k.py View on Github external
if args.copyhistory:
        hc.copy_history(args.copyhistory[0])

    if args.stop:
        hc.stop()

    if args.clean:
        hc.clean()
    
    if args.state:
        if args.state == "general":
            
            logger.info("---------------------------------------------------------")
            logger.info(style.user2("Hadoop Cluster with ID " + str(hc_id)))
            logger.info(style.user1("    Version: ") + hc.get_version())
            logger.info(style.user1("    Master: ") + str(hc.master))
            logger.info(style.user1("    Hosts: ") + str(hc.hosts))
            logger.info(style.user1("    Topology: "))
            for h in hc.hosts:
                logger.info("        " + str(h) + " -> " + str(hc.topology.get_rack(h)))
            if hc.initialized:
                if hc.running:
                    logger.info("The cluster is " + style.user3("running"))
                else:
                    logger.info("The cluster is " + style.user3("stopped"))
            else:
                logger.info("The cluster is not " + style.user3("initialized"))
            logger.info("---------------------------------------------------------")
        
        elif args.state == "files":                      
            (stdout, stderr) = hc.execute("fs -lsr /", verbose=False)
            print ""
github mliroz / hadoop_g5k / scripts / hg5k.py View on Github external
if args.stop:
        hc.stop()

    if args.clean:
        hc.clean()
    
    if args.state:
        if args.state == "general":
            
            logger.info("---------------------------------------------------------")
            logger.info(style.user2("Hadoop Cluster with ID " + str(hc_id)))
            logger.info(style.user1("    Version: ") + hc.get_version())
            logger.info(style.user1("    Master: ") + str(hc.master))
            logger.info(style.user1("    Hosts: ") + str(hc.hosts))
            logger.info(style.user1("    Topology: "))
            for h in hc.hosts:
                logger.info("        " + str(h) + " -> " + str(hc.topology.get_rack(h)))
            if hc.initialized:
                if hc.running:
                    logger.info("The cluster is " + style.user3("running"))
                else:
                    logger.info("The cluster is " + style.user3("stopped"))
            else:
                logger.info("The cluster is not " + style.user3("initialized"))
            logger.info("---------------------------------------------------------")
        
        elif args.state == "files":                      
            (stdout, stderr) = hc.execute("fs -lsr /", verbose=False)
            print ""            
            for line in stdout.splitlines():
                if not "WARN fs.FileSystem" in line:
github mliroz / hadoop_g5k / scripts / hg5k.py View on Github external
hc.copy_history(args.copyhistory[0])

    if args.stop:
        hc.stop()

    if args.clean:
        hc.clean()
    
    if args.state:
        if args.state == "general":
            
            logger.info("---------------------------------------------------------")
            logger.info(style.user2("Hadoop Cluster with ID " + str(hc_id)))
            logger.info(style.user1("    Version: ") + hc.get_version())
            logger.info(style.user1("    Master: ") + str(hc.master))
            logger.info(style.user1("    Hosts: ") + str(hc.hosts))
            logger.info(style.user1("    Topology: "))
            for h in hc.hosts:
                logger.info("        " + str(h) + " -> " + str(hc.topology.get_rack(h)))
            if hc.initialized:
                if hc.running:
                    logger.info("The cluster is " + style.user3("running"))
                else:
                    logger.info("The cluster is " + style.user3("stopped"))
            else:
                logger.info("The cluster is not " + style.user3("initialized"))
            logger.info("---------------------------------------------------------")
        
        elif args.state == "files":                      
            (stdout, stderr) = hc.execute("fs -lsr /", verbose=False)
            print ""            
            for line in stdout.splitlines():