Beispiel #1
0
    def list():  # pylint: disable=W0622
        """Delete bucket"""
        buckets = []
        for name in masterapi.cell_buckets(context.GLOBAL.zk.conn):
            bucket = masterapi.get_bucket(context.GLOBAL.zk.conn, name)
            bucket['name'] = name
            buckets.append(bucket)

        cli.out(formatter(buckets))
Beispiel #2
0
    def configure(features, bucket):
        """Create, get or modify bucket configuration"""
        features = cli.combine(features)
        if features:
            # This is special case - reset features to empty.
            if features == ['-']:
                features = None
            masterapi.update_bucket_features(context.GLOBAL.zk.conn, bucket,
                                             features)

        data = masterapi.get_bucket(context.GLOBAL.zk.conn, bucket)
        data['name'] = bucket

        cli.out(formatter(data))