def __init__(self): if os.name == "nt": self.local_ip = socket.gethostbyname(socket.gethostname()) else: self.local_ip = get_ip_address('eth0') if self.local_ip == None or self.local_ip == "127.0.0.1": raise "ERROR: can't get an invalid IP address of your computer" self.fs_uid = demo_cfg.FS_UID self.fs_duration = '3600' # this is only used for Mac or Linux, Windows will allocate a driver automatically self.mount_path = '/var/tmp/bourne' self.__client_setup() self.bourne = Bourne() self.bourne.connect(demo_cfg.BOURNE_DATA_IPADDR, S3_PORT)
help='new password', default=None) update.add_argument('--groups', metavar='groups', help='groups for this uid', default=None) if __name__ == '__main__': try: if (len(sys.argv) > 1): cmd = sys.argv[1] else: parser.print_help() sys.exit(1) bourne = Bourne() if (cmd == "create"): args = create.parse_args() passwordgroup_create(args, bourne) elif (cmd == "update"): args = update.parse_args() passwordgroup_update(args, bourne) elif (cmd == "list"): args = parser.parse_args() passwordgroup_listgroup(args, bourne) elif (cmd == "remove"): args = parser.parse_args() passwordgroup_remove(args, bourne) else: parser.print_help()