// CreateBucket creates a bucket object or return an existing bucket object
// This is used by bucket request unit tests
CreateBucket creates a bucket object or return an existing bucket object
This is used by bucket request unit tests
// CreateBucket creates a bucket object or return an existing bucket object // This is used by bucket request unit tests
func CreateBucket(ctx context.Context, client bucketclientset.Interface, b *types.Bucket) (*types.Bucket, error) {
	b, err := client.ObjectstorageV1alpha1().Buckets().Create(ctx, b, metav1.CreateOptions{})
	if (err != nil) && apierrors.IsAlreadyExists(err) {
		b, err = client.ObjectstorageV1alpha1().Buckets().Get(ctx, b.Name, metav1.GetOptions{})
	}
	return b, err
}
func CreateBucket ( ctx context . Context , client bucketclientset . Interface , b * types . Bucket ) ( * types . Bucket , error ) { b , err := client . ObjectstorageV1alpha1 ( ) . Buckets ( ) . Create ( ctx , b , metav1 . CreateOptions { } ) if ( err != nil ) && apierrors . IsAlreadyExists ( err ) { b , err = client . ObjectstorageV1alpha1 ( ) . Buckets ( ) . Get ( ctx , b . Name , metav1 . GetOptions { } ) } return b , err }
CreateBucket creates a bucket object or return an existing bucket object
This is used by bucket request unit tests
CreateBucket creates a bucket object or return an existing bucket object This is used by bucket request unit tests