private static Mono<Void> requestDeleteApplication( CloudFoundryClient cloudFoundryClient, String applicationId) { return cloudFoundryClient .applicationsV2() .delete( org.cloudfoundry.client.v2.applications.DeleteApplicationRequest.builder() .applicationId(applicationId) .build()); }
private static Mono<AbstractApplicationResource> requestUpdateApplicationState( CloudFoundryClient cloudFoundryClient, String applicationId, String state) { return cloudFoundryClient .applicationsV2() .update( UpdateApplicationRequest.builder().applicationId(applicationId).state(state).build()) .map( new Function<UpdateApplicationResponse, AbstractApplicationResource>() { @Override public AbstractApplicationResource apply(UpdateApplicationResponse x) { return x; } }); }
private static Mono<AbstractApplicationResource> requestUpdateApplicationScale( CloudFoundryClient cloudFoundryClient, String applicationId, Integer disk, Integer instances, Integer memory) { return cloudFoundryClient .applicationsV2() .update( UpdateApplicationRequest.builder() .applicationId(applicationId) .diskQuota(disk) .instances(instances) .memory(memory) .build()) .map( new Function<UpdateApplicationResponse, AbstractApplicationResource>() { @Override public AbstractApplicationResource apply(UpdateApplicationResponse x) { return x; } }); }
private static Mono<UpdateApplicationResponse> requestUpdateApplicationRename( CloudFoundryClient cloudFoundryClient, String applicationId, final String name) { return cloudFoundryClient .applicationsV2() .update(UpdateApplicationRequest.builder().applicationId(applicationId).name(name).build()); }
private static Mono<SummaryApplicationResponse> requestApplicationSummary( CloudFoundryClient cloudFoundryClient, String applicationId) { return cloudFoundryClient .applicationsV2() .summary(SummaryApplicationRequest.builder().applicationId(applicationId).build()); }
private static Mono<ApplicationStatisticsResponse> requestApplicationStats( CloudFoundryClient cloudFoundryClient, String applicationId) { return cloudFoundryClient .applicationsV2() .statistics(ApplicationStatisticsRequest.builder().applicationId(applicationId).build()); }