Create a new bucket.
518916
def create_bucket(self, bucket):
        
        details = self._details(
            method=b"PUT",
            url_context=self._url_context(bucket=bucket),
        )
        query = self._query_factory(details)
        return self._submit(query)
809866
def add_object(self, obj):
        
        return self.add_bucket_key_data(obj._bucket._name, obj._key, None)
858181
def new( self, min, max ):
        """"""
        # Ensure the range will fit given the shifting strategy
        assert MIN <= min <= max <= MAX
        self.min = min
        self.max = max
        # Determine offsets to use
        self.offsets = offsets_for_max_size( max )
        # Determine the largest bin we will actually use
        self.bin_count = bin_for_range( max - 1, max, offsets = self.offsets ) + 1
        # Create empty bins
        self.bins = [ [] for i in range( self.bin_count ) ]
1355433
def create(self, width=0, depth=0, path=None, flags=0, seed=0):
        
        return self.create_method(self, width, depth, path, flags, seed)
169339
public static Builder newBuilder(String bucket, String name) {
    return newBuilder(BlobId.of(bucket, name));
  }
605429
public void add(long n)
    {
        int index = Arrays.binarySearch(bucketOffsets, n);
        if (index < 0)
        {
            // inexact match, take the first bucket higher than n
            index = -index - 1;
        }
        // else exact match; we're good
        buckets.incrementAndGet(index);
    }
727324
public static Builder newBuilder(BucketInfo bucketInfo, String name) {
    return newBuilder(bucketInfo.getName(), name);
  }
322190
def generate_s3_bucket():
    """"""
    logger.debug("[#] Setting up S3 bucket")
    client = boto3.client("s3", region_name=PRIMARY_REGION)
    buckets = client.list_buckets()
    matches = [x for x in buckets.get('Buckets', list())
               if x['Name'].startswith(S3_BUCKET)]
    if len(matches) > 0:
        logger.debug("[*] Bucket already exists")
        return matches.pop()

    response = client.create_bucket(
        Bucket=S3_BUCKET,
        CreateBucketConfiguration={
            'LocationConstraint': PRIMARY_REGION
        }
    )
    logger.info("[#] Successfully setup the S3 bucket")

    return response
103680
def create(self, instance):
        
        with self.flushing():
            if instance.id is None:
                instance.id = self.new_object_id()
            self.session.add(instance)
        return instance
445520
def create_s3app(self):
        """"""
        utils.banner("Creating S3 App Infrastructure")
        primary_region = self.configs['pipeline']['primary_region']
        s3obj = s3.S3Apps(app=self.app,
                          env=self.env,
                          region=self.region,
                          prop_path=self.json_path,
                          primary_region=primary_region)
        s3obj.create_bucket()
677352
def create(self, project_id=None):
    
    if not self.exists():
      if project_id is None:
        project_id = self._api.project_id
      try:
        self._info = self._api.buckets_insert(self._name, project_id=project_id)
      except Exception as e:
        raise e
    return self
588569
def new(self):
        # type: () -> None
        '''
        
        '''
        if self._initialized:
            raise pycdlibexception.PyCdlibInternalError('UDF Partition Map already initialized')

        self.part_num = 0  # FIXME: we should let the user set this

        self._initialized = True
713683
@VisibleForTesting
  synchronized Bucket<V> getBucket(int bucketedSize) {
    // get an existing bucket
    Bucket<V> bucket = mBuckets.get(bucketedSize);
    if (bucket != null || !mAllowNewBuckets) {
      return bucket;
    }

    // create a new bucket
    if (FLog.isLoggable(FLog.VERBOSE)) {
      FLog.v(TAG, "creating new bucket %s", bucketedSize);
    }
    Bucket<V> newBucket = newBucket(bucketedSize);
    mBuckets.put(bucketedSize, newBucket);
    return newBucket;
  }
634185
public Bucket updateBucket(String bucketName) {
    // [START updateBucket]
    BucketInfo bucketInfo = BucketInfo.newBuilder(bucketName).setVersioningEnabled(true).build();
    Bucket bucket = storage.update(bucketInfo);
    // [END updateBucket]
    return bucket;
  }
240642
private void fillBuckets(SparseIntArray bucketSizes) {
    mBuckets.clear();
    for (int i = 0; i < bucketSizes.size(); ++i) {
      final int bucketSize = bucketSizes.keyAt(i);
      final int maxLength = bucketSizes.valueAt(i);
      mBuckets.put(
          bucketSize,
          new Bucket<V>(
              getSizeInBytes(bucketSize), maxLength, 0, mPoolParams.fixBucketsReinitialization));
    }
  }
676548
def create_new(cls, oldvalue, *args):
    ""
    if oldvalue is not None:
        raise AlreadyExistsException('%r already exists' % (oldvalue,))
    return cls.create_instance(*args)
977811
def create(self, *args, **kwargs):
        
        try:
            return super(CloudBlockStorageManager, self).create(*args,
                    **kwargs)
        except exc.BadRequest as e:
            msg = e.message
            if "Clones currently must be >= original volume size" in msg:
                raise exc.VolumeCloneTooSmall(msg)
            else:
                raise