Package org.jclouds.rackspace.cloudbigdata.v1.domain

Examples of org.jclouds.rackspace.cloudbigdata.v1.domain.Cluster


      try {
         CloudBigDataApi cbdApi = api(server.getUrl("/").toString(), "rackspace-cloudbigdata", overrides);
         ClusterApi api = cbdApi.getClusterApiForZone("ORD");

         CreateCluster createCluster = CreateCluster.builder()
               .name("slice")
               .clusterType(ClusterType.HADOOP_HDP1_1.name())
               .flavorId("4fba3bca-7c76-11e2-b737-beeffa00040e")
               .nodeCount(5)
               .postInitScript(new URI("http://example.com/configure_cluster.sh"))
View Full Code Here


   public void setup() {
      super.setup();
      for (String zone : filterZones(api.getConfiguredZones())) {
         ClusterApi clusterApi = api.getClusterApiForZone(zone);

         CreateCluster createCluster = null;
         try {
            // A Profile must exist before a cluster is created.
           
            ProfileApi profileApi = api.getProfileApiForZone(zone);
View Full Code Here

      try {
         CloudBigDataApi cbdApi = api(server.getUrl("/").toString(), "rackspace-cloudbigdata", overrides);
         ProfileApi api = cbdApi.getProfileApiForZone("ORD");

         CreateProfile createProfile = CreateProfile.builder()
               .username("john.doe")
               .password("j0Hnd03")
               .sshKeys(ImmutableList.of(ProfileSSHKey.builder().name("t@test")
                     .publicKey("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCtUFnkFrqDDCgEqW1akQkpMOX\n" +
                           "Owwvg73PLn5Z5QgvxjvJhRCg9ZTR/OWXpWcYqFVNagH4Zs8NOb9921TyQ+ydMnatOM\n" +
View Full Code Here

      try {
         CloudBigDataApi cbdApi = api(server.getUrl("/").toString(), "rackspace-cloudbigdata", overrides);
         ProfileApi api = cbdApi.getProfileApiForZone("ORD");

         CreateProfile createProfile = CreateProfile.builder()
               .username("john.doe")
               .password("j0Hnd03")
               .sshKeys(ImmutableList.of(ProfileSSHKey.builder().name("t@test")
                     .publicKey("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCtUFnkFrqDDCgEqW1akQkpMOX\n" +
                           "Owwvg73PLn5Z5QgvxjvJhRCg9ZTR/OWXpWcYqFVNagH4Zs8NOb9921TyQ+ydMnatOM\n" +
View Full Code Here

   public void setup() {
      super.setup();
      for (String zone : filterZones(api.getConfiguredZones())) {
         ProfileApi profileApi = api.getProfileApiForZone(zone);

         CreateProfile createProfile = CreateProfile.builder()
               .username("john.doe")
               .password("1Aa+" + UUID.randomUUID().toString())
               .sshKeys(ImmutableList.of(ProfileSSHKey.builder().name("t@test")
               .publicKey(SshKeys.generate().get("public"))
               .build()))
View Full Code Here

   @Test
   public void updateProfile() {
      for (String zone : filterZones(api.getConfiguredZones())) {
         ProfileApi profileApi = api.getProfileApiForZone(zone);

         CreateProfile createProfile = CreateProfile.builder()
               .username("john.doe2")
               .password("1Aa+" + UUID.randomUUID().toString())
               .sshKeys(ImmutableList.of(ProfileSSHKey.builder().name("t@test")
               .publicKey(SshKeys.generate().get("public"))
               .build()))
View Full Code Here

         try {
            // A Profile must exist before a cluster is created.
           
            ProfileApi profileApi = api.getProfileApiForZone(zone);

            CreateProfile createProfile = CreateProfile.builder()
                  .username("john.doe")
                  .password("1Aa+" + UUID.randomUUID().toString())
                  .sshKeys(ImmutableList.of(ProfileSSHKey.builder().name("t@test")
                  .publicKey(SshKeys.generate().get("public"))
                  .build()))
View Full Code Here

                           .build()))
                           .credentialsUsername("jdoe")
                           .credentialsApiKey("df23gkh34h52gkdgfakgf")
                           .build();

         Profile profile = api.create(createProfile);

         /*
          * Check request
          */
         assertAuthentication(server);
         assertRequest(server.takeRequest(), "POST", "/v1.0/888888/profile", "/profile_create_request.json");

         /*
          * Check response
          */
         assertNotNull(profile);
         assertEquals(profile.getUsername(), "john.doe");
         assertEquals(profile.getUserId(), "12346");
         assertEquals(profile.getTenantId(), "123456");
         assertEquals(profile.getSSHKeys().get(0).getName(), "t@test");
         assertEquals(profile.getSSHKeys().get(0).getPublicKey(), "ssh-rsa .....");
         assertEquals(profile.getCredentialsUsername(), "jdoe");
         assertNull(profile.getCredentialsApiKey());
         assertEquals(profile.getLinks().get(0).getHref(), new URI("https://dfw.bigdata.api.rackspacecloud.com/v1.0/123456/profile"));
      } finally {
         server.shutdown();
      }
   }
View Full Code Here

                           .build()))
                           .credentialsUsername("jdoe")
                           .credentialsApiKey("df23gkh34h52gkdgfakgf")
                           .build();

         Profile profile = api.create(createProfile);

         /*
          * Check request
          */
         assertAuthentication(server);
View Full Code Here

      server.enqueue(addCommonHeaders(new MockResponse().setResponseCode(201).setBody(stringFromResource("/profile_get_response.json"))));

      try {
         CloudBigDataApi cbdApi = api(server.getUrl("/").toString(), "rackspace-cloudbigdata", overrides);
         ProfileApi api = cbdApi.getProfileApiForZone("ORD");
         Profile profile = api.get();

         /*
          * Check request
          */
         assertAuthentication(server);
         assertRequest(server.takeRequest(), "GET", "/v1.0/888888/profile");

         /*
          * Check response
          */
         assertNotNull(profile);
         assertEquals(profile.getUsername(), "john.doe");
         assertEquals(profile.getUserId(), "12346");
         assertEquals(profile.getTenantId(), "123456");
         assertEquals(profile.getSSHKeys().get(0).getName(), "t@test");
         assertEquals(profile.getSSHKeys().get(0).getPublicKey(), "ssh-rsa .....");
         assertEquals(profile.getCredentialsUsername(), "jdoe");
         assertNull(profile.getCredentialsApiKey());
         assertEquals(profile.getLinks().get(0).getHref(), new URI("https://dfw.bigdata.api.rackspacecloud.com/v1.0/123456/profile"));
      } finally {
         server.shutdown();
      }
   }
View Full Code Here

TOP

Related Classes of org.jclouds.rackspace.cloudbigdata.v1.domain.Cluster

Copyright © 2018 www.massapicom. 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.