Last active
February 9, 2016 20:19
-
-
Save mheath/55ee408d98b0864cc58a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.pivotal.mheath; | |
import org.cloudfoundry.client.spring.SpringCloudFoundryClient; | |
import org.cloudfoundry.operations.CloudFoundryOperations; | |
import org.cloudfoundry.operations.CloudFoundryOperationsBuilder; | |
import reactor.rx.Stream; | |
/** | |
* | |
*/ | |
public class V2Client { | |
public static void main(String[] args) { | |
final SpringCloudFoundryClient client = SpringCloudFoundryClient.builder() | |
.host("api.cf.teal.springapps.io") | |
.username("admin") | |
.password("f99b597d112cd90c8a17") | |
.skipSslValidation(true) | |
.build(); | |
final CloudFoundryOperations ops = new CloudFoundryOperationsBuilder() | |
.cloudFoundryClient(client) | |
.target("heathville", "myspace") | |
.build(); | |
Stream.from(ops.organizations().list()) | |
.map(o -> o.getName()) | |
.consume(System.out::println); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment