本文整理汇总了Java中org.cloudfoundry.operations.DefaultCloudFoundryOperations类的典型用法代码示例。如果您正苦于以下问题:Java DefaultCloudFoundryOperations类的具体用法?Java DefaultCloudFoundryOperations怎么用?Java DefaultCloudFoundryOperations使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DefaultCloudFoundryOperations类属于org.cloudfoundry.operations包,在下文中一共展示了DefaultCloudFoundryOperations类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: doCreateOperations
import org.cloudfoundry.operations.DefaultCloudFoundryOperations; //导入依赖的package包/类
private CloudFoundryOperations doCreateOperations(CloudFoundryClient cloudFoundryClient,
ConnectionContext connectionContext,
TokenProvider tokenProvider,
String org,
String space) {
ReactorDopplerClient dopplerClient = ReactorDopplerClient.builder()
.connectionContext(connectionContext)
.tokenProvider(tokenProvider)
.build();
ReactorUaaClient uaaClient = ReactorUaaClient.builder()
.connectionContext(connectionContext)
.tokenProvider(tokenProvider)
.build();
return DefaultCloudFoundryOperations.builder()
.cloudFoundryClient(cloudFoundryClient)
.dopplerClient(dopplerClient)
.uaaClient(uaaClient)
.organization(org)
.space(space)
.build();
}
开发者ID:spring-cloud,项目名称:spring-cloud-spinnaker,代码行数:24,代码来源:DefaultAppDeployerFactory.java
示例2: createCloudFoundryOperations
import org.cloudfoundry.operations.DefaultCloudFoundryOperations; //导入依赖的package包/类
private CloudFoundryOperations createCloudFoundryOperations() {
DefaultConnectionContext connectionContext = DefaultConnectionContext.builder()
.apiHost(apiHost)
.build();
TokenProvider tokenProvider = PasswordGrantTokenProvider.builder()
.password(password)
.username(userName)
.build();
ReactorCloudFoundryClient reactorClient = ReactorCloudFoundryClient.builder()
.connectionContext(connectionContext)
.tokenProvider(tokenProvider)
.build();
CloudFoundryOperations cloudFoundryOperations = DefaultCloudFoundryOperations.builder()
.cloudFoundryClient(reactorClient)
.organization(organization)
.space(space)
.build();
return cloudFoundryOperations;
}
开发者ID:StuPro-TOSCAna,项目名称:TOSCAna,代码行数:24,代码来源:Connection.java
示例3: setup
import org.cloudfoundry.operations.DefaultCloudFoundryOperations; //导入依赖的package包/类
@Before
public void setup()
{
String host = System.getenv("CF_HOST");
String username = System.getenv("CF_USERNAME");
String password = System.getenv("CF_PASSWORD");
if(host == null || username == null || password == null)
{
throw new RuntimeException("CF_HOST, CF_USERNAME and CF_PASSWORD must be set");
}
ConnectionContext connectionContext = DefaultConnectionContext.builder().apiHost(host).skipSslValidation(true).build();
TokenProvider tokenProvider = PasswordGrantTokenProvider.builder().username(username).password(password).build();
cfClient = ReactorCloudFoundryClient.builder().connectionContext(connectionContext).tokenProvider(tokenProvider).build();
cfOps = DefaultCloudFoundryOperations.builder().cloudFoundryClient(cfClient).build();
facade = new ReactorCfClientFacade(cfClient, mock(ModifyingUserOps.class));
}
开发者ID:EngineerBetter,项目名称:cf-converger,代码行数:19,代码来源:ReactorCfClientFacadeOrgsIntegrationTest.java
示例4: getCfOperations
import org.cloudfoundry.operations.DefaultCloudFoundryOperations; //导入依赖的package包/类
protected CloudFoundryOperations getCfOperations() {
CfProperties cfAppProperties = this.cfPropertiesMapper.getProperties();
ConnectionContext connectionContext = DefaultConnectionContext.builder()
.apiHost(cfAppProperties.ccHost())
.skipSslValidation(true)
.proxyConfiguration(tryGetProxyConfiguration(cfAppProperties))
.build();
TokenProvider tokenProvider = getTokenProvider(cfAppProperties);
CloudFoundryClient cfClient = ReactorCloudFoundryClient.builder()
.connectionContext(connectionContext)
.tokenProvider(tokenProvider)
.build();
CloudFoundryOperations cfOperations = DefaultCloudFoundryOperations.builder()
.cloudFoundryClient(cfClient)
.organization(cfAppProperties.org())
.space(cfAppProperties.space())
.build();
return cfOperations;
}
开发者ID:pivotalservices,项目名称:ya-cf-app-gradle-plugin,代码行数:25,代码来源:AbstractCfTask.java
示例5: cloudFoundryOperations
import org.cloudfoundry.operations.DefaultCloudFoundryOperations; //导入依赖的package包/类
@Bean
public CloudFoundryOperations cloudFoundryOperations(CloudFoundryClient cloudFoundryClient,
ConnectionContext connectionContext,
TokenProvider tokenProvider,
CloudFoundryConnectionProperties properties) {
ReactorDopplerClient.builder()
.connectionContext(connectionContext)
.tokenProvider(tokenProvider)
.build();
ReactorUaaClient.builder()
.connectionContext(connectionContext)
.tokenProvider(tokenProvider)
.build();
return DefaultCloudFoundryOperations.builder()
.cloudFoundryClient(cloudFoundryClient)
.organization(properties.getOrg())
.space(properties.getSpace())
.build();
}
开发者ID:spring-cloud,项目名称:spring-cloud-deployer-cloudfoundry,代码行数:22,代码来源:CloudFoundryTestSupport.java
示例6: cloudFoundryOperations
import org.cloudfoundry.operations.DefaultCloudFoundryOperations; //导入依赖的package包/类
@Bean
@Lazy
@ConditionalOnMissingBean
public DefaultCloudFoundryOperations cloudFoundryOperations(CloudFoundryClient cloudFoundryClient,
DopplerClient dopplerClient,
RoutingClient routingClient,
UaaClient uaaClient) {
String organization = this.cloudFoundryProperties.getOrg();
String space = this.cloudFoundryProperties.getSpace();
return DefaultCloudFoundryOperations
.builder()
.cloudFoundryClient(cloudFoundryClient)
.dopplerClient(dopplerClient)
.routingClient(routingClient)
.uaaClient(uaaClient)
.organization(organization)
.space(space)
.build();
}
开发者ID:spring-cloud,项目名称:spring-cloud-cloudfoundry,代码行数:20,代码来源:CloudFoundryClientAutoConfiguration.java
示例7: producesAllBeans
import org.cloudfoundry.operations.DefaultCloudFoundryOperations; //导入依赖的package包/类
@Test
public void producesAllBeans() {
Assume.assumeTrue(configExists());
ApplicationContext ctx = new SpringApplicationBuilder()
.sources(MyConfig.class)
.properties(defaultConfig())
.run();
Class[] tags = {ReactorCloudFoundryClient.class, DefaultCloudFoundryOperations.class,
DefaultConnectionContext.class, DopplerClient.class, RoutingClient.class, PasswordGrantTokenProvider.class,
ReactorUaaClient.class};
for (Class<?> c : tags) {
Assertions.assertThat(ctx.getBean(c)).isNotNull();
}
}
开发者ID:spring-cloud,项目名称:spring-cloud-cloudfoundry,代码行数:18,代码来源:CloudFoundryClientAutoConfigurationTest.java
示例8: cloudFoundryOperations
import org.cloudfoundry.operations.DefaultCloudFoundryOperations; //导入依赖的package包/类
@Bean
public DefaultCloudFoundryOperations cloudFoundryOperations(
CloudFoundryClient cfc,
ReactorDopplerClient dopplerClient,
ReactorUaaClient uaaClient,
@Value("${cf.org}") String organization,
@Value("${cf.space}") String space) {
return DefaultCloudFoundryOperations.builder()
.cloudFoundryClient(cfc)
.dopplerClient(dopplerClient)
.uaaClient(uaaClient)
.organization(organization)
.space(space)
.build();
}
开发者ID:applied-continuous-delivery-livelessons,项目名称:testing-101,代码行数:16,代码来源:CloudFoundryClientConfiguration.java
示例9: cloudFoundryOperations
import org.cloudfoundry.operations.DefaultCloudFoundryOperations; //导入依赖的package包/类
@Bean
DefaultCloudFoundryOperations cloudFoundryOperations(CloudFoundryClient cloudFoundryClient,
@Value("${cf.organization}") String organization,
@Value("${cf.space}") String space) {
return DefaultCloudFoundryOperations.builder()
.cloudFoundryClient(cloudFoundryClient)
.organization(organization)
.space(space)
.build();
}
开发者ID:nebhale,项目名称:cf-java-client-webinar-2016,代码行数:11,代码来源:ListApplicationsApplication.java
示例10: cloudFoundryOperations
import org.cloudfoundry.operations.DefaultCloudFoundryOperations; //导入依赖的package包/类
@Bean
DefaultCloudFoundryOperations cloudFoundryOperations(CloudFoundryClient cloudFoundryClient, String organizationName, String spaceName) {
return DefaultCloudFoundryOperations.builder()
.cloudFoundryClient(cloudFoundryClient)
.organization(organizationName)
.space(spaceName)
.build();
}
开发者ID:orange-cloudfoundry,项目名称:sec-group-broker-filter,代码行数:9,代码来源:IntegrationTestConfiguration.java
示例11: getAppDetailTests
import org.cloudfoundry.operations.DefaultCloudFoundryOperations; //导入依赖的package包/类
@Test
public void getAppDetailTests() {
ConnectionContext connectionContext = DefaultConnectionContext.builder()
.apiHost("api.local.pcfdev.io")
.skipSslValidation(true)
.build();
TokenProvider tokenProvider = PasswordGrantTokenProvider.builder()
.password("admin")
.username("admin")
.build();
CloudFoundryClient cfClient = ReactorCloudFoundryClient.builder()
.connectionContext(connectionContext)
.tokenProvider(tokenProvider)
.build();
CloudFoundryOperations cfOperations = DefaultCloudFoundryOperations.builder()
.cloudFoundryClient(cfClient)
.organization("pcfdev-org")
.space("pcfdev-space")
.build();
CfAppDetailsDelegate appDetailsTaskDelegate = new CfAppDetailsDelegate();
CfProperties cfAppProps = envDetails();
Mono<Optional<ApplicationDetail>> applicationDetailMono = appDetailsTaskDelegate
.getAppDetails(cfOperations, cfAppProps);
// Mono<Void> resp = applicationDetailMono.then(applicationDetail -> Mono.fromSupplier(() -> {
// return 1;
// })).then();
//
// resp.block();
// ApplicationDetail applicationDetail = applicationDetailMono.block(Duration.ofMillis(5000));
// System.out.println("applicationDetail = " + applicationDetail);
}
开发者ID:pivotalservices,项目名称:ya-cf-app-gradle-plugin,代码行数:38,代码来源:PcfDevIntegrationTests.java
示例12: cloudFoundryOperations
import org.cloudfoundry.operations.DefaultCloudFoundryOperations; //导入依赖的package包/类
@Bean
@ConditionalOnMissingBean
public CloudFoundryOperations cloudFoundryOperations(CloudFoundryClient cloudFoundryClient, CloudFoundryConnectionProperties properties) {
return DefaultCloudFoundryOperations.builder()
.cloudFoundryClient(cloudFoundryClient)
.organization(properties.getOrg())
.space(properties.getSpace())
.build();
}
开发者ID:spring-cloud,项目名称:spring-cloud-deployer-cloudfoundry,代码行数:10,代码来源:CloudFoundryDeployerAutoConfiguration.java
示例13: getV2Operations
import org.cloudfoundry.operations.DefaultCloudFoundryOperations; //导入依赖的package包/类
protected CloudFoundryOperations getV2Operations() throws CoreException {
if (this.v2Operations == null) {
try {
boolean keepAlive = keepAlive();
DefaultConnectionContext connection = DefaultConnectionContext.builder()
.proxyConfiguration(Optional.ofNullable(getProxyConfiguration())).apiHost(getHost())
// SSL handshake timeout may need to be increased, for
// log streaming
.sslHandshakeTimeout(Duration.ofSeconds(cloudServer.getSslHandshakeTimeout()))
.keepAlive(keepAlive).skipSslValidation(skipSsl()).build();
PasswordGrantTokenProvider tokenProvider = PasswordGrantTokenProvider.builder()
.username(credentials.getUser()).password(credentials.getPassword()).build();
ReactorUaaClient uaaClient = ReactorUaaClient.builder().connectionContext(connection)
.tokenProvider(tokenProvider).build();
ReactorDopplerClient dopplerClient = ReactorDopplerClient.builder().connectionContext(connection)
.tokenProvider(tokenProvider).build();
this.v2Client = ReactorCloudFoundryClient.builder().connectionContext(connection)
.tokenProvider(tokenProvider).build();
this.v2Operations = DefaultCloudFoundryOperations.builder().cloudFoundryClient(v2Client)
.dopplerClient(dopplerClient).uaaClient(uaaClient).organization(orgName).space(spaceName)
.build();
} catch (Throwable e) {
throw CloudErrorUtil.toCoreException(e);
}
}
return this.v2Operations;
}
开发者ID:eclipse,项目名称:cft,代码行数:36,代码来源:V2Client.java
示例14: cloudFoundryOperations
import org.cloudfoundry.operations.DefaultCloudFoundryOperations; //导入依赖的package包/类
@Bean
CloudFoundryOperations cloudFoundryOperations(CloudFoundryClient cloudFoundryClient,
DopplerClient dopplerClient,
@Value("${test.organization}") String organization,
@Value("${test.space}") String space) {
return DefaultCloudFoundryOperations.builder()
.cloudFoundryClient(cloudFoundryClient)
.dopplerClient(dopplerClient)
.organization(organization)
.space(space)
.build();
}
开发者ID:cloudfoundry,项目名称:java-buildpack-system-test,代码行数:14,代码来源:IntegrationTestConfiguration.java
注:本文中的org.cloudfoundry.operations.DefaultCloudFoundryOperations类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论