org.cloudfoundry.client.v2.info.GetInfoRequest Java Examples
The following examples show how to use
org.cloudfoundry.client.v2.info.GetInfoRequest.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ReactiveCFAccessorImpl.java From promregator with Apache License 2.0 | 5 votes |
@PostConstruct @SuppressWarnings("unused") private void constructCloudFoundryClient() throws ConfigurationException { this.reset(); if (this.performPrecheckOfAPIVersion) { GetInfoRequest request = GetInfoRequest.builder().build(); GetInfoResponse getInfo = this.cloudFoundryClient.info().get(request).block(); // NB: This also ensures that the connection has been established properly... log.info(String.format("Target CF platform is running on API version %s", getInfo.getApiVersion())); } }
Example #2
Source File: CloudFoundryDeployerAutoConfiguration.java From spring-cloud-deployer-cloudfoundry with Apache License 2.0 | 5 votes |
@Bean @ConditionalOnMissingBean public Version version(CloudFoundryClient client) { return client.info() .get(GetInfoRequest.builder() .build()) .map(response -> Version.valueOf(response.getApiVersion())) .doOnError(e -> { throw new RuntimeException("Bad credentials connecting to Cloud Foundry.", e); }) .doOnNext(version -> logger.info("Connecting to Cloud Foundry with API Version {}", version)) .block(Duration.ofSeconds(appDeploymentProperties().getApiTimeout())); }
Example #3
Source File: CloudFoundryTaskPlatformFactory.java From spring-cloud-dataflow with Apache License 2.0 | 5 votes |
private Version version(CloudFoundryClient cloudFoundryClient, String account) { return cloudFoundryClient.info() .get(GetInfoRequest.builder().build()) .map(response -> Version.valueOf(response.getApiVersion())) .doOnNext(versionInfo -> logger.info( "Connecting to Cloud Foundry with API Version {}", versionInfo)) .timeout(Duration.ofSeconds(deploymentProperties(account).getApiTimeout())) .block(); }
Example #4
Source File: CloudControllerRestClientImpl.java From cf-java-client-sap with Apache License 2.0 | 4 votes |
private Mono<GetInfoResponse> getInfoResource() { return delegate.info() .get(GetInfoRequest.builder() .build()); }