Lines Matching refs:bucket_name
411 def _BucketIsValid(self, bucket_name, gcloud_runner): argument
424 return (self._BucketExists(bucket_name, gcloud_runner) and
425 self._BucketInDefaultRegion(bucket_name, gcloud_runner))
441 bucket_name = self._GenerateBucketName(self.project)
442 if (self._BucketExists(bucket_name, gcloud_runner) and
443 not self._BucketInDefaultRegion(bucket_name, gcloud_runner)):
444 bucket_name += ("-" + _DEFAULT_BUCKET_REGION.lower())
445 if not self._BucketExists(bucket_name, gcloud_runner):
446 self._CreateBucket(bucket_name, gcloud_runner)
447 return bucket_name
470 bucket_name = "%s-%s" % (_DEFAULT_BUCKET_HEADER, project_name)
474 bucket_name = re.sub("[^a-zA-Z_/-]+", "", bucket_name).lower()
477 if len(bucket_name) > _BUCKET_LENGTH_LIMIT:
478 bucket_name = bucket_name[:_BUCKET_LENGTH_LIMIT]
482 bucket_name = bucket_name.rstrip(_INVALID_BUCKET_NAME_END_CHARS)
484 return bucket_name
487 def _BucketExists(bucket_name, gcloud_runner): argument
500 if match.group("bucket") == bucket_name:
505 def _BucketInDefaultRegion(bucket_name, gcloud_runner): argument
519 ["ls", "-L", "-b", "%s" % (_BUCKET_HEADER + bucket_name)])
524 logger.info("Bucket[%s] is in %s (checking for %s)", bucket_name,
532 def _CreateBucket(bucket_name, gcloud_runner): argument
539 gcloud_runner.RunGsutil(["mb", "%s" % (_BUCKET_HEADER + bucket_name)])
540 logger.info("Create bucket [%s].", bucket_name)