new-integration-tests/src/test/java/oracle/weblogic/kubernetes/assertions/impl/ClusterRole.java
public static boolean clusterRoleExists(String name) throws ApiException {

    V1ClusterRoleList clusterRoleList = listClusterRoles("");
    List<V1ClusterRole> clusterRoles = clusterRoleList.getItems();
    for (V1ClusterRole clusterRole : clusterRoles) {
      if (clusterRole.getMetadata() != null && clusterRole.getMetadata().getName() != null) {
        if (clusterRole.getMetadata().getName().equals(name)) {
          return true;
        }
      }
    }

    return false;
  }
/**
   * Check whether the specified cluster role exists.
   *
   * @param name name of the cluster role to check
   * @return true if the cluster role exists, false otherwise
   * @throws ApiException if Kubernetes client API call fails
   */
Check whether the specified cluster role exists.
@param name name of the cluster role to check
@return true if the cluster role exists, false otherwise
@throws ApiException if Kubernetes client API call fails
Check whether the specified cluster role exists . @param name name of the cluster role to check @return true if the cluster role exists false otherwise @throws ApiException if Kubernetes client API call fails
public static boolean clusterRoleExists(String name) throws ApiException {
    V1ClusterRoleList clusterRoleList = listClusterRoles("");
    List<V1ClusterRole> clusterRoles = clusterRoleList.getItems();
    for (V1ClusterRole clusterRole : clusterRoles) {
      if (clusterRole.getMetadata() != null && clusterRole.getMetadata().getName() != null) {
        if (clusterRole.getMetadata().getName().equals(name)) {
          return true;
        }
      }
    }
    return false;
  }
public static boolean clusterRoleExists ( String name ) throws ApiException { V1ClusterRoleList clusterRoleList = listClusterRoles ( "" ) ; List < V1ClusterRole > clusterRoles = clusterRoleList . getItems ( ) ; for ( V1ClusterRole clusterRole : clusterRoles ) { if ( clusterRole . getMetadata ( ) != null && clusterRole . getMetadata ( ) . getName ( ) != null ) { if ( clusterRole . getMetadata ( ) . getName ( ) . equals ( name ) ) { return true ; } } } return false ; }
Check whether the specified cluster role exists.
Check whether the specified cluster role exists .