def get_bucketlist(self, server, port, user, password, opts):
        try:
            bucketlist = buckets.Buckets().runCmd('bucket-get', server, port, user, password, opts)
            for bucket in bucketlist:
                bucket_name = bucket['name']
                self.log.info("bucket: %s" % bucket_name)
                bucketinfo = {}
                bucketinfo['name'] = bucket_name
                bucketinfo['bucketType'] = bucket['bucketType']
                bucketinfo['authType'] = bucket['authType']
                bucketinfo['saslPassword'] = bucket['saslPassword']
                bucketinfo['numReplica'] = bucket['replicaNumber']
                bucketinfo['ramQuota'] = bucket['quota']['ram']
                bucketinfo['master'] = server

                bucketStats = bucket['basicStats']
                bucketinfo['bucketStats'] = {}
                bucketinfo['bucketStats']['diskUsed'] = bucketStats['diskUsed']
                bucketinfo['bucketStats']['memUsed'] = bucketStats['memUsed']
                bucketinfo['bucketStats']['diskFetches'] = bucketStats['diskFetches']
                bucketinfo['bucketStats']['quotaPercentUsed'] = bucketStats['quotaPercentUsed']
                bucketinfo['bucketStats']['opsPerSec'] = bucketStats['opsPerSec']
                bucketinfo['bucketStats']['itemCount'] = bucketStats['itemCount']

                stats_buffer.bucket_info[bucket_name] = bucketinfo

                # get bucket related stats
                c = buckets.BucketStats(bucket_name)
                json = c.runCmd('bucket-stats', server, port, user, password, opts)
                stats_buffer.buckets_summary[bucket_name] = json
            return bucketlist
        except Exception, err:
            traceback.print_exc()
            sys.exit(1)
dataset/ETHPy150Open membase/membase-cli/collector.py/StatsCollector.get_bucketlist/original