@Test void detachChildEnvironment() { DetachChildEnvironmentRequest request = mock(DetachChildEnvironmentRequest.class); when(crnService.getCurrentAccountId()).thenReturn(ACCOUNT_ID); underTest.detachChildEnvironment(request); verify(childEnvironmentService).detachChildEnvironment(request, ACCOUNT_ID); }
@Override @CheckPermissionByResourceObject public void detachChildEnvironment(@ResourceObject @Valid DetachChildEnvironmentRequest request) { String accountId = crnService.getCurrentAccountId(); childEnvironmentService.detachChildEnvironment(request, accountId); }
FreeIpaV1Controller implements FreeIpaV1Endpoint { @Override @CheckPermissionByResourceObject public void detachChildEnvironment(@ResourceObject @Valid DetachChildEnvironmentRequest request) { String accountId = crnService.getCurrentAccountId(); childEnvironmentService.detachChildEnvironment(request, accountId); } }
FreeIpaV1Controller implements FreeIpaV1Endpoint { @Override @CheckPermissionByResourceObject public void detachChildEnvironment(@ResourceObject @Valid DetachChildEnvironmentRequest request) { String accountId = crnService.getCurrentAccountId(); childEnvironmentService.detachChildEnvironment(request, accountId); }  }
FreeIpaV1Controller implements FreeIpaV1Endpoint { @Override @CheckPermissionByResourceObject public void detachChildEnvironment(@ResourceObject @Valid DetachChildEnvironmentRequest request) { String accountId = crnService.getCurrentAccountId(); childEnvironmentService.detachChildEnvironment(request, accountId); }  @Override @CheckPermissionByResourceObject DescribeFreeIpaResponse create(@ResourceObject @Valid CreateFreeIpaRequest request); @Override @CheckPermissionByResourceObject void attachChildEnvironment(@ResourceObject @Valid AttachChildEnvironmentRequest request); @Override @CheckPermissionByResourceObject void detachChildEnvironment(@ResourceObject @Valid DetachChildEnvironmentRequest request); @Override @CheckPermissionByResourceCrn(action = AuthorizationResourceAction.DESCRIBE_ENVIRONMENT) DescribeFreeIpaResponse describe(@ResourceCrn String environmentCrn); @Override @DisableCheckPermissions List<ListFreeIpaResponse> list(); @Override @CheckPermissionByResourceCrn(action = AuthorizationResourceAction.DESCRIBE_ENVIRONMENT) @Retryable(value = RetryableFreeIpaClientException.class, maxAttemptsExpression = RetryableFreeIpaClientException.MAX_RETRIES_EXPRESSION, backoff = @Backoff(delayExpression = RetryableFreeIpaClientException.DELAY_EXPRESSION, multiplierExpression = RetryableFreeIpaClientException.MULTIPLIER_EXPRESSION)) HealthDetailsFreeIpaResponse healthDetails(@ResourceCrn String environmentCrn); @Override @CheckPermissionByResourceCrn(action = AuthorizationResourceAction.DESCRIBE_ENVIRONMENT) @Retryable(value = RetryableFreeIpaClientException.class, maxAttemptsExpression = RetryableFreeIpaClientException.MAX_RETRIES_EXPRESSION, backoff = @Backoff(delayExpression = RetryableFreeIpaClientException.DELAY_EXPRESSION, multiplierExpression = RetryableFreeIpaClientException.MULTIPLIER_EXPRESSION)) String getRootCertificate(@ResourceCrn String environmentCrn); @Override @CheckPermissionByResourceCrn(action = AuthorizationResourceAction.DELETE_ENVIRONMENT) void delete(@ResourceCrn String environmentCrn, boolean forced); @Override @CheckPermissionByResourceObject OperationStatus cleanup(@ResourceObject @Valid CleanupRequest request); @Override @InternalOnly OperationStatus internalCleanup(@Valid CleanupRequest request, @AccountId String accountId); @Override @CheckPermissionByResourceObject OperationStatus rebootInstances(@ResourceObject @Valid RebootInstancesRequest request); @Override @CheckPermissionByResourceObject OperationStatus repairInstances(@ResourceObject @Valid RepairInstancesRequest request); @Override @CheckPermissionByResourceCrn(action = AuthorizationResourceAction.START_ENVIRONMENT) void start(@ResourceCrn @NotEmpty String environmentCrn); @Override @CheckPermissionByResourceCrn(action = AuthorizationResourceAction.STOP_ENVIRONMENT) void stop(@ResourceCrn @NotEmpty String environmentCrn); @Override @CheckPermissionByResourceCrn(action = AuthorizationResourceAction.EDIT_ENVIRONMENT) String registerWithClusterProxy(@ResourceCrn @NotEmpty String environmentCrn); @Override @CheckPermissionByResourceCrn(action = AuthorizationResourceAction.EDIT_ENVIRONMENT) void deregisterWithClusterProxy(@ResourceCrn @NotEmpty String environmentCrn); }
FreeIpaV1Controller implements FreeIpaV1Endpoint { @Override @CheckPermissionByResourceObject public void detachChildEnvironment(@ResourceObject @Valid DetachChildEnvironmentRequest request) { String accountId = crnService.getCurrentAccountId(); childEnvironmentService.detachChildEnvironment(request, accountId); }  @Override @CheckPermissionByResourceObject DescribeFreeIpaResponse create(@ResourceObject @Valid CreateFreeIpaRequest request); @Override @CheckPermissionByResourceObject void attachChildEnvironment(@ResourceObject @Valid AttachChildEnvironmentRequest request); @Override @CheckPermissionByResourceObject void detachChildEnvironment(@ResourceObject @Valid DetachChildEnvironmentRequest request); @Override @CheckPermissionByResourceCrn(action = AuthorizationResourceAction.DESCRIBE_ENVIRONMENT) DescribeFreeIpaResponse describe(@ResourceCrn String environmentCrn); @Override @DisableCheckPermissions List<ListFreeIpaResponse> list(); @Override @CheckPermissionByResourceCrn(action = AuthorizationResourceAction.DESCRIBE_ENVIRONMENT) @Retryable(value = RetryableFreeIpaClientException.class, maxAttemptsExpression = RetryableFreeIpaClientException.MAX_RETRIES_EXPRESSION, backoff = @Backoff(delayExpression = RetryableFreeIpaClientException.DELAY_EXPRESSION, multiplierExpression = RetryableFreeIpaClientException.MULTIPLIER_EXPRESSION)) HealthDetailsFreeIpaResponse healthDetails(@ResourceCrn String environmentCrn); @Override @CheckPermissionByResourceCrn(action = AuthorizationResourceAction.DESCRIBE_ENVIRONMENT) @Retryable(value = RetryableFreeIpaClientException.class, maxAttemptsExpression = RetryableFreeIpaClientException.MAX_RETRIES_EXPRESSION, backoff = @Backoff(delayExpression = RetryableFreeIpaClientException.DELAY_EXPRESSION, multiplierExpression = RetryableFreeIpaClientException.MULTIPLIER_EXPRESSION)) String getRootCertificate(@ResourceCrn String environmentCrn); @Override @CheckPermissionByResourceCrn(action = AuthorizationResourceAction.DELETE_ENVIRONMENT) void delete(@ResourceCrn String environmentCrn, boolean forced); @Override @CheckPermissionByResourceObject OperationStatus cleanup(@ResourceObject @Valid CleanupRequest request); @Override @InternalOnly OperationStatus internalCleanup(@Valid CleanupRequest request, @AccountId String accountId); @Override @CheckPermissionByResourceObject OperationStatus rebootInstances(@ResourceObject @Valid RebootInstancesRequest request); @Override @CheckPermissionByResourceObject OperationStatus repairInstances(@ResourceObject @Valid RepairInstancesRequest request); @Override @CheckPermissionByResourceCrn(action = AuthorizationResourceAction.START_ENVIRONMENT) void start(@ResourceCrn @NotEmpty String environmentCrn); @Override @CheckPermissionByResourceCrn(action = AuthorizationResourceAction.STOP_ENVIRONMENT) void stop(@ResourceCrn @NotEmpty String environmentCrn); @Override @CheckPermissionByResourceCrn(action = AuthorizationResourceAction.EDIT_ENVIRONMENT) String registerWithClusterProxy(@ResourceCrn @NotEmpty String environmentCrn); @Override @CheckPermissionByResourceCrn(action = AuthorizationResourceAction.EDIT_ENVIRONMENT) void deregisterWithClusterProxy(@ResourceCrn @NotEmpty String environmentCrn);  }