func S3UploadProfileList(drPolicy rmn.DRPolicy) (s3ProfileList []string) {
	for _, drCluster := range drPolicy.Spec.DRClusterSet {
		found := false
		for _, s3ProfileName := range s3ProfileList {
			if s3ProfileName == drCluster.S3ProfileName {
				found = true
			}
		}
		if !found {
			s3ProfileList = append(s3ProfileList, drCluster.S3ProfileName)
		}
	}
	return
}
Return a list of unique S3 profiles to upload the relevant cluster state
package util
import (
	"errors"
	"k8s.io/apimachinery/pkg/api/meta"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	rmn "github.com/ramendr/ramen/api/v1alpha1"
)
func DrpolicyClusterNames(drpolicy *rmn.DRPolicy) []string {
	clusterNames := make([]string, len(drpolicy.Spec.DRClusterSet))
	for i := range drpolicy.Spec.DRClusterSet {
		clusterNames[i] = drpolicy.Spec.DRClusterSet[i].Name
	}
	return clusterNames
}
func DrpolicyValidatedConditionGet(drpolicy *rmn.DRPolicy) *metav1.Condition {
	return meta.FindStatusCondition(drpolicy.Status.Conditions, rmn.DRPolicyValidated)
}
func DrpolicyValidated(drpolicy *rmn.DRPolicy) error {
	if condition := DrpolicyValidatedConditionGet(drpolicy); condition != nil {
		if condition.Status != metav1.ConditionTrue {
			return errors.New(condition.Message)
		}
		return nil
	}
	return errors.New(`validated condition absent`)
}