integration-tests/src/test/java/oracle/kubernetes/operator/utils/K8sTestUtils.java
public void verifyDomainCrd() throws Exception {
    try {
      V1APIGroupList apis = apisApi.getAPIVersions();
      for (V1APIGroup group : apis.getGroups()) {
        if ("apiextensions.k8s.io".equals(group.getName())) {
          for (V1GroupVersionForDiscovery version : group.getVersions()) {
            if ("v1".equals(version.getVersion())) {
              // v1 is supported
              V1CustomResourceDefinition domainCrd =
                  apiextensionsV1Api.readCustomResourceDefinition(
                      "domains.weblogic.oracle", null, null, null);
              assertNotNull(domainCrd, "Domain CRD exists");
              return;
            }
          }
          break;
        }
      }
      V1beta1CustomResourceDefinition domainBetaCrd =
          apiextensionsV1beta1Api.readCustomResourceDefinition(
              "domains.weblogic.oracle", null, null, null);
      assertNotNull(domainBetaCrd, "Domain CRD exists");
    } catch (ApiException aex) {
      if (aex.getCode() == 404) {
        assertTrue(false, "Expected CRD domains.weblogic.oracle existed.");
      } else {
        throw aex;
      }
    }
  }
/**
   * verify domain CRD.
   * @throws Exception on failure
   */
verify domain CRD.
@throws Exception on failure
verify domain CRD . @throws Exception on failure
public void verifyDomainCrd() throws Exception {
    try {
      V1APIGroupList apis = apisApi.getAPIVersions();
      for (V1APIGroup group : apis.getGroups()) {
        if ("apiextensions.k8s.io".equals(group.getName())) {
          for (V1GroupVersionForDiscovery version : group.getVersions()) {
            if ("v1".equals(version.getVersion())) {
              V1CustomResourceDefinition domainCrd =
                  apiextensionsV1Api.readCustomResourceDefinition(
                      "domains.weblogic.oracle", null, null, null);
              assertNotNull(domainCrd, "Domain CRD exists");
              return;
            }
          }
          break;
        }
      }
      V1beta1CustomResourceDefinition domainBetaCrd =
          apiextensionsV1beta1Api.readCustomResourceDefinition(
              "domains.weblogic.oracle", null, null, null);
      assertNotNull(domainBetaCrd, "Domain CRD exists");
    } catch (ApiException aex) {
      if (aex.getCode() == 404) {
        assertTrue(false, "Expected CRD domains.weblogic.oracle existed.");
      } else {
        throw aex;
      }
    }
  }
public void verifyDomainCrd ( ) throws Exception { try { V1APIGroupList apis = apisApi . getAPIVersions ( ) ; for ( V1APIGroup group : apis . getGroups ( ) ) { if ( "apiextensions.k8s.io" . equals ( group . getName ( ) ) ) { for ( V1GroupVersionForDiscovery version : group . getVersions ( ) ) { if ( "v1" . equals ( version . getVersion ( ) ) ) { V1CustomResourceDefinition domainCrd = apiextensionsV1Api . readCustomResourceDefinition ( "domains.weblogic.oracle" , null , null , null ) ; assertNotNull ( domainCrd , "Domain CRD exists" ) ; return ; } } break ; } } V1beta1CustomResourceDefinition domainBetaCrd = apiextensionsV1beta1Api . readCustomResourceDefinition ( "domains.weblogic.oracle" , null , null , null ) ; assertNotNull ( domainBetaCrd , "Domain CRD exists" ) ; } catch ( ApiException aex ) { if ( aex . getCode ( ) == 404 ) { assertTrue ( false , "Expected CRD domains.weblogic.oracle existed." ) ; } else { throw aex ; } } }
verify domain CRD.
verify domain CRD .
// v1 is supported