Esempio n. 1
0
            choice = "Disable"
        if o in ("-u", "--user"):
            USER = a
        if o in ("-p", "--password"):
            PASSWORD = a
        if o in ("-h", "--host"):
            HOST = a
        if o in ("-P", "--port"):
            PORT = a


    if USER == "":
        USER = raw_input("Username:"******"":
        PASSWORD = getpass.getpass("Password:"******"Enable":
        ok = i.enable()
    else:
        ok = i.disable()

    if ok:
        print "%sd OK" % choice
    else:
        print "Could not %s" % choice
        sys.exit(1)