Examples of groupInSharedNameOrNull()


Examples of org.jclouds.compute.functions.GroupNamingConvention.groupInSharedNameOrNull()

            bindConstant().annotatedWith(Names.named(RESOURCENAME_PREFIX)).to("kclouds");
         }
      }).getInstance(GroupNamingConvention.Factory.class).create();

      assertEquals(fn.sharedNameForGroup("cluster"), "kclouds-cluster");
      assertEquals(fn.groupInSharedNameOrNull("kclouds-cluster"), "cluster");
      assertEquals(fn.groupInUniqueNameOrNull("kclouds-cluster"), null);
      assertTrue(fn.containsGroup("cluster").apply("kclouds-cluster"));

   }
View Full Code Here

Examples of org.jclouds.compute.functions.GroupNamingConvention.groupInSharedNameOrNull()

      }).getInstance(GroupNamingConvention.Factory.class).create();

      assertEquals(fn.uniqueNameForGroup("cluster"), "jclouds-cluster-foo");
      // note accidental treatment of a unique node as a shared one can lead to
      // incorrect group names, as long as we permit delimiter to be in group name
      assertEquals(fn.groupInSharedNameOrNull("jclouds-cluster-foo"), "cluster-foo");
      assertEquals(fn.groupInUniqueNameOrNull("jclouds-cluster-foo"), "cluster");
      assertTrue(fn.containsGroup("cluster").apply("jclouds-cluster-foo"));

   }
View Full Code Here

Examples of org.jclouds.compute.functions.GroupNamingConvention.groupInSharedNameOrNull()

            bindConstant().annotatedWith(Names.named(RESOURCENAME_DELIMITER)).to('#');
         }
      }).getInstance(GroupNamingConvention.Factory.class).create();

      assertEquals(fn.sharedNameForGroup("cluster"), "jclouds#cluster");
      assertEquals(fn.groupInSharedNameOrNull("jclouds#cluster"), "cluster");
      assertEquals(fn.groupInUniqueNameOrNull("jclouds#cluster"), null);
      assertTrue(fn.containsGroup("cluster").apply("jclouds#cluster"));
   }

   public void testPropertyChangesPrefix() {
View Full Code Here

Examples of org.jclouds.compute.functions.GroupNamingConvention.groupInSharedNameOrNull()

            bindConstant().annotatedWith(Names.named(RESOURCENAME_DELIMITER)).to('#');
         }
      }).getInstance(GroupNamingConvention.Factory.class).create();

      assertEquals(fn.sharedNameForGroup("cluster"), "jclouds#cluster");
      assertEquals(fn.groupInSharedNameOrNull("jclouds#cluster"), "cluster");
      assertEquals(fn.groupInUniqueNameOrNull("jclouds#cluster"), null);
      assertTrue(fn.containsGroup("cluster").apply("jclouds#cluster"));
   }

   public void testPropertyChangesPrefix() {
View Full Code Here

Examples of org.jclouds.compute.functions.GroupNamingConvention.groupInSharedNameOrNull()

            bindConstant().annotatedWith(Names.named(RESOURCENAME_PREFIX)).to("kclouds");
         }
      }).getInstance(GroupNamingConvention.Factory.class).create();

      assertEquals(fn.sharedNameForGroup("cluster"), "kclouds-cluster");
      assertEquals(fn.groupInSharedNameOrNull("kclouds-cluster"), "cluster");
      assertEquals(fn.groupInUniqueNameOrNull("kclouds-cluster"), null);
      assertTrue(fn.containsGroup("cluster").apply("kclouds-cluster"));

   }
View Full Code Here

Examples of org.jclouds.compute.functions.GroupNamingConvention.groupInSharedNameOrNull()

      }).getInstance(GroupNamingConvention.Factory.class).create();

      assertEquals(fn.uniqueNameForGroup("cluster"), "jclouds-cluster-foo");
      // note accidental treatment of a unique node as a shared one can lead to
      // incorrect group names, as long as we permit delimiter to be in group name
      assertEquals(fn.groupInSharedNameOrNull("jclouds-cluster-foo"), "cluster-foo");
      assertEquals(fn.groupInUniqueNameOrNull("jclouds-cluster-foo"), "cluster");
      assertTrue(fn.containsGroup("cluster").apply("jclouds-cluster-foo"));

   }
View Full Code Here

Examples of org.jclouds.compute.functions.GroupNamingConvention.groupInSharedNameOrNull()

      }).getInstance(GroupNamingConvention.Factory.class).create();

      assertEquals(fn.uniqueNameForGroup("cluster"), "jclouds-cluster-foo");
      // note accidental treatment of a unique node as a shared one can lead to
      // incorrect group names, as long as we permit delimiter to be in group name
      assertEquals(fn.groupInSharedNameOrNull("jclouds-cluster-foo"), "cluster-foo");
      assertEquals(fn.groupInUniqueNameOrNull("jclouds-cluster-foo"), "cluster");
      assertTrue(fn.containsGroup("cluster").apply("jclouds-cluster-foo"));

   }
View Full Code Here

Examples of org.jclouds.compute.functions.GroupNamingConvention.groupInSharedNameOrNull()

            bindConstant().annotatedWith(Names.named(RESOURCENAME_DELIMITER)).to('#');
         }
      }).getInstance(GroupNamingConvention.Factory.class).create();

      assertEquals(fn.sharedNameForGroup("cluster"), "jclouds#cluster");
      assertEquals(fn.groupInSharedNameOrNull("jclouds#cluster"), "cluster");
      assertEquals(fn.groupInUniqueNameOrNull("jclouds#cluster"), null);
      assertTrue(fn.containsGroup("cluster").apply("jclouds#cluster"));
   }

   public void testPropertyChangesPrefix() {
View Full Code Here

Examples of org.jclouds.compute.functions.GroupNamingConvention.groupInSharedNameOrNull()

            bindConstant().annotatedWith(Names.named(RESOURCENAME_PREFIX)).to("kclouds");
         }
      }).getInstance(GroupNamingConvention.Factory.class).create();

      assertEquals(fn.sharedNameForGroup("cluster"), "kclouds-cluster");
      assertEquals(fn.groupInSharedNameOrNull("kclouds-cluster"), "cluster");
      assertEquals(fn.groupInUniqueNameOrNull("kclouds-cluster"), null);
      assertTrue(fn.containsGroup("cluster").apply("kclouds-cluster"));

   }
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.