org.springframework.cloud.deployer.spi.cloudfoundry.CloudFoundryDeploymentProperties Java Examples

The following examples show how to use org.springframework.cloud.deployer.spi.cloudfoundry.CloudFoundryDeploymentProperties. 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: CloudFoundryTaskPlatformFactoryTests.java    From spring-cloud-dataflow with Apache License 2.0 6 votes vote down vote up
@Before
public void setUp() throws Exception {
	when(this.cloudFoundryClient.info())
			.thenReturn(getInfoRequest -> Mono.just(GetInfoResponse.builder().apiVersion("0.0.0").build()));
	when(this.cloudFoundryClient.organizations()).thenReturn(mock(Organizations.class));
	when(this.cloudFoundryClient.spaces()).thenReturn(mock(Spaces.class));
	when(this.cloudFoundryClient.organizations().list(any())).thenReturn(listOrganizationsResponse());
	when(this.cloudFoundryClient.spaces().list(any())).thenReturn(listSpacesResponse());
	when(this.cloudFoundryClientProvider.cloudFoundryClient(anyString())).thenReturn(this.cloudFoundryClient);
	this.cloudFoundryPlatformProperties = new CloudFoundryPlatformProperties();

	this.defaultConnectionProperties = new CloudFoundryConnectionProperties();
	this.defaultConnectionProperties.setOrg("org");
	this.defaultConnectionProperties.setSpace("space");
	this.defaultConnectionProperties.setUrl(new URL("https://localhost:9999"));

	this.deploymentProperties = new CloudFoundryDeploymentProperties();
	this.deploymentProperties.setApiTimeout(1L);
}
 
Example #2
Source File: CloudFoundryTaskPlatformFactoryTests.java    From spring-cloud-dataflow with Apache License 2.0 5 votes vote down vote up
private void setupSinglePlatform() {
	CloudFoundryProperties cloudFoundryProperties = new CloudFoundryProperties();
	cloudFoundryProperties.setDeployment(new CloudFoundryDeploymentProperties());
	cloudFoundryProperties.setConnection(this.defaultConnectionProperties);
	this.cloudFoundryPlatformProperties.setAccounts(Collections.singletonMap("default", cloudFoundryProperties));

	this.connectionContextProvider = new CloudFoundryPlatformConnectionContextProvider(this.cloudFoundryPlatformProperties);
	this.platformTokenProvider = mock(CloudFoundryPlatformTokenProvider.class);
	when(this.platformTokenProvider.tokenProvider(anyString())).thenReturn(mock(TokenProvider.class));
}
 
Example #3
Source File: CloudFoundryTaskPlatformFactoryTests.java    From spring-cloud-dataflow with Apache License 2.0 5 votes vote down vote up
private void setupMultiPlatform() throws Exception{
	this.anotherOrgSpaceConnectionProperties = new CloudFoundryConnectionProperties();
	this.anotherOrgSpaceConnectionProperties.setOrg("another-org");
	this.anotherOrgSpaceConnectionProperties.setSpace("another-space");
	this.anotherOrgSpaceConnectionProperties.setUrl(new URL("https://localhost:9999"));


	CloudFoundryProperties cloudFoundryProperties = new CloudFoundryProperties();
	CloudFoundrySchedulerProperties cloudFoundrySchedulerProperties = new CloudFoundrySchedulerProperties();
	cloudFoundrySchedulerProperties.setSchedulerUrl("https://localhost:9999");
	cloudFoundryProperties.setSchedulerProperties(cloudFoundrySchedulerProperties);
	cloudFoundryProperties.setDeployment(new CloudFoundryDeploymentProperties());
	cloudFoundryProperties.setConnection(this.defaultConnectionProperties);
	Map<String, CloudFoundryProperties> platformMap = new HashMap<>();
	platformMap.put("default", cloudFoundryProperties);
	cloudFoundryProperties = new CloudFoundryProperties();
	cloudFoundryProperties.setDeployment(new CloudFoundryDeploymentProperties());
	cloudFoundryProperties.setConnection(this.anotherOrgSpaceConnectionProperties);
	cloudFoundryProperties.setSchedulerProperties(cloudFoundrySchedulerProperties);


	platformMap.put("anotherOrgSpace", cloudFoundryProperties);

	this.cloudFoundryPlatformProperties.setAccounts(platformMap);

	this.connectionContextProvider = new CloudFoundryPlatformConnectionContextProvider(this.cloudFoundryPlatformProperties);
	this.platformTokenProvider = mock(CloudFoundryPlatformTokenProvider.class);
	when(this.platformTokenProvider.tokenProvider(anyString())).thenReturn(mock(TokenProvider.class));
}
 
Example #4
Source File: CloudFoundryPlatformProperties.java    From spring-cloud-skipper with Apache License 2.0 4 votes vote down vote up
public CloudFoundryDeploymentProperties getDeployment() {
	return deployment;
}
 
Example #5
Source File: CloudFoundryPlatformProperties.java    From spring-cloud-skipper with Apache License 2.0 4 votes vote down vote up
public void setDeployment(CloudFoundryDeploymentProperties deployment) {
	this.deployment = deployment;
}
 
Example #6
Source File: SpringCloudSchedulerIntegrationTests.java    From spring-cloud-deployer-cloudfoundry with Apache License 2.0 4 votes vote down vote up
@Override
protected Map<String, String> getDeploymentProperties() {
	return Collections.singletonMap(CloudFoundryDeploymentProperties.SERVICES_PROPERTY_KEY, deployerProps);
}
 
Example #7
Source File: CloudFoundryDataFlowServerConfiguration.java    From spring-cloud-dataflow with Apache License 2.0 4 votes vote down vote up
@Bean
@ConfigurationProperties(prefix = CloudFoundryConnectionProperties.CLOUDFOUNDRY_PROPERTIES + ".task")
public CloudFoundryDeploymentProperties taskDeploymentProperties() {
	return new CloudFoundryDeploymentProperties();
}
 
Example #8
Source File: CloudFoundryPlatformProperties.java    From spring-cloud-dataflow with Apache License 2.0 4 votes vote down vote up
public CloudFoundryDeploymentProperties getDeployment() {
	return deployment;
}
 
Example #9
Source File: CloudFoundryPlatformProperties.java    From spring-cloud-dataflow with Apache License 2.0 4 votes vote down vote up
public void setDeployment(CloudFoundryDeploymentProperties deployment) {
	this.deployment = deployment;
}
 
Example #10
Source File: CloudFoundryTaskPlatformFactory.java    From spring-cloud-dataflow with Apache License 2.0 4 votes vote down vote up
private CloudFoundryDeploymentProperties deploymentProperties(String account) {
	// todo: use server level shared deployment properties
	return platformProperties.accountProperties(account).getDeployment() == null
			? new CloudFoundryDeploymentProperties()
			: platformProperties.accountProperties(account).getDeployment();
}
 
Example #11
Source File: CloudFoundryDataFlowServerConfiguration.java    From spring-cloud-dataflow-server-cloudfoundry with Apache License 2.0 4 votes vote down vote up
@Bean
@ConfigurationProperties(prefix = CloudFoundryConnectionProperties.CLOUDFOUNDRY_PROPERTIES + ".stream")
public CloudFoundryDeploymentProperties appDeploymentProperties() {
	return new CloudFoundryDeploymentProperties();
}
 
Example #12
Source File: CloudFoundryDataFlowServerConfiguration.java    From spring-cloud-dataflow-server-cloudfoundry with Apache License 2.0 4 votes vote down vote up
@Bean
@ConfigurationProperties(prefix = CloudFoundryConnectionProperties.CLOUDFOUNDRY_PROPERTIES + ".task")
public CloudFoundryDeploymentProperties taskDeploymentProperties() {
	return new CloudFoundryDeploymentProperties();
}