// Validates the content of the bucket against bucket request and backet class
// This is used by bucket request unit tests
Validates the content of the bucket against bucket request and backet class
This is used by bucket request unit tests
// Validates the content of the bucket against bucket request and backet class // This is used by bucket request unit tests
func ValidateBucket(bucket types.Bucket, bucketrequest types.BucketRequest, bucketclass types.BucketClass) bool {
	if strings.HasPrefix(bucket.Name, bucketrequest.Spec.BucketPrefix) &&
		bucket.Spec.BucketClassName == bucketrequest.Spec.BucketClassName &&
		bucket.Spec.BucketRequest.Name == bucketrequest.Name &&
		bucket.Spec.BucketRequest.Namespace == bucketrequest.Namespace &&
		bucket.Spec.BucketRequest.UID == bucketrequest.ObjectMeta.UID &&
		bucket.Spec.BucketClassName == bucketclass.Name &&
		reflect.DeepEqual(bucket.Spec.Parameters, bucketclass.Parameters) &&
		bucket.Spec.Provisioner == bucketclass.Provisioner &&
		bucket.Spec.RetentionPolicy == bucketclass.RetentionPolicy &&
		bucket.Spec.AnonymousAccessMode == bucketclass.AnonymousAccessMode {
		return true
	}
	return false
}
func ValidateBucket ( bucket types . Bucket , bucketrequest types . BucketRequest , bucketclass types . BucketClass ) bool { if strings . HasPrefix ( bucket . Name , bucketrequest . Spec . BucketPrefix ) && bucket . Spec . BucketClassName == bucketrequest . Spec . BucketClassName && bucket . Spec . BucketRequest . Name == bucketrequest . Name && bucket . Spec . BucketRequest . Namespace == bucketrequest . Namespace && bucket . Spec . BucketRequest . UID == bucketrequest . ObjectMeta . UID && bucket . Spec . BucketClassName == bucketclass . Name && reflect . DeepEqual ( bucket . Spec . Parameters , bucketclass . Parameters ) && bucket . Spec . Provisioner == bucketclass . Provisioner && bucket . Spec . RetentionPolicy == bucketclass . RetentionPolicy && bucket . Spec . AnonymousAccessMode == bucketclass . AnonymousAccessMode { return true } return false }
Validates the content of the bucket against bucket request and backet class
This is used by bucket request unit tests
Validates the content of the bucket against bucket request and backet class This is used by bucket request unit tests