Package org.jclouds.joyent.cloudapi.v6_5.features

Examples of org.jclouds.joyent.cloudapi.v6_5.features.DatasetApi.list()


   @Test
   public void testListAndGetDatasets() throws Exception {
      for (String datacenterId : cloudApiContext.getApi().getConfiguredDatacenters()) {
         DatasetApi api = cloudApiContext.getApi().getDatasetApiForDatacenter(datacenterId);
         Set<Dataset> response = api.list();
         assert null != response;
         for (Dataset dataset : response) {
            Dataset newDetails = api.get(dataset.getId());
            assertEquals(newDetails.getId(), dataset.getId());
            assertEquals(newDetails.getName(), dataset.getName());
View Full Code Here


   }

   private void cleanupOrphanedKeysInZone(Set<String> groups, String datacenterId) {
      KeyApi keyApi = novaApi.getKeyApi();
      for (String group : groups) {
         for (Key key : Iterables.filter(keyApi.list(),
               KeyPredicates.nameMatches(namingConvention.create().containsGroup(group)))) {
            DatacenterAndName datacenterAndName = DatacenterAndName.fromDatacenterAndName(datacenterId, key.getName());
            logger.debug(">> deleting key(%s)", datacenterAndName);
            keyApi.delete(key.getName());
            // TODO: test this clear happens
View Full Code Here

   }

   private void cleanupOrphanedKeysInZone(Set<String> groups, String datacenterId) {
      KeyApi keyApi = novaApi.getKeyApi();
      for (String group : groups) {
         for (Key key : Iterables.filter(keyApi.list(),
               KeyPredicates.nameMatches(namingConvention.create().containsGroup(group)))) {
            DatacenterAndName datacenterAndName = DatacenterAndName.fromDatacenterAndName(datacenterId, key.getName());
            logger.debug(">> deleting key(%s)", datacenterAndName);
            keyApi.delete(key.getName());
            // TODO: test this clear happens
View Full Code Here

   }

   private void cleanupOrphanedKeysInZone(Set<String> groups, String datacenterId) {
      KeyApi keyApi = novaApi.getKeyApi();
      for (String group : groups) {
         for (Key key : Iterables.filter(keyApi.list(),
               KeyPredicates.nameMatches(namingConvention.create().containsGroup(group)))) {
            DatacenterAndName datacenterAndName = DatacenterAndName.fromDatacenterAndName(datacenterId, key.getName());
            logger.debug(">> deleting key(%s)", datacenterAndName);
            keyApi.delete(key.getName());
            // TODO: test this clear happens
View Full Code Here

public class KeyApiLiveTest extends BaseJoyentCloudApiLiveTest {

   @Test
   public void testListAndGetKeys() throws Exception {
      KeyApi api = cloudApiContext.getApi().getKeyApi();
      Set<Key> response = api.list();
      assert null != response;
      for (Key key : response) {
         Key newDetails = api.get(key.getName());
         assertEquals(newDetails.getName(), key.getName());
         assertEquals(newDetails.get(), key.get());
View Full Code Here

   @Test
   public void testListAndGetPackages() throws Exception {
      for (String datacenterId : cloudApiContext.getApi().getConfiguredDatacenters()) {
         PackageApi api = cloudApiContext.getApi().getPackageApiForDatacenter(datacenterId);
         Set<Package> response = api.list();
         assert null != response;
         for (Package pkg : response) {
            Package newDetails = api.get(pkg.getName());
            assertEquals(newDetails.getName(), pkg.getName());
            assertEquals(newDetails.getMemorySizeMb(), pkg.getMemorySizeMb());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.