Package org.jclouds.rackspace.clouddns.v1.domain

Examples of org.jclouds.rackspace.clouddns.v1.domain.Domain


   public void testUpdateDomainsEmail() throws Exception {
      List<Integer> ids = ImmutableList.of(
            testDomains.get(JCLOUDS_EXAMPLE).getId(), testDomains.get("alt-" + JCLOUDS_EXAMPLE).getId());
      awaitComplete(api, api.getDomainApi().updateEmail(ids, "jclouds-up@" + JCLOUDS_EXAMPLE));

      Domain jclouds = api.getDomainApi().get(testDomains.get(JCLOUDS_EXAMPLE).getId());
      Domain altjclouds = api.getDomainApi().get(testDomains.get("alt-" + JCLOUDS_EXAMPLE).getId());

      assertEquals(jclouds.getEmail(), "jclouds-up@" + JCLOUDS_EXAMPLE);
      assertEquals(altjclouds.getEmail(), "jclouds-up@" + JCLOUDS_EXAMPLE);
   }
View Full Code Here


      assertEquals(altjclouds.getEmail(), "jclouds-up@" + JCLOUDS_EXAMPLE);
   }

   @Test(dependsOnMethods = "testUpdateDomainsEmail")
   public void testExportDomain() throws Exception {
      Domain domain = testDomains.get(JCLOUDS_EXAMPLE);
      List<String> domainExport = awaitComplete(api, api.getDomainApi().exportFormat(domain.getId(), Domain.Format.BIND_9));
     
      assertTrue(domainExport.get(0).contains(JCLOUDS_EXAMPLE));
   }
View Full Code Here

   public void testImportDomain() throws Exception {
      List<String> contents = ImmutableList.<String> of(
            "imp-" + JCLOUDS_EXAMPLE + ".      3600  IN SOA   ns.rackspace.com. jclouds.imp-" + JCLOUDS_EXAMPLE + ". 1363882703 3600 3600 3600 3600",
            "imp-" + JCLOUDS_EXAMPLE + ".      600   IN A  50.56.174.152");

      Domain domain = awaitComplete(api, api.getDomainApi().importFormat(contents, Domain.Format.BIND_9));
      RecordDetail record = domain.getRecords().iterator().next();
     
      assertEquals(domain.getName(), "imp-" + JCLOUDS_EXAMPLE);
      assertEquals(domain.getEmail(), "jclouds@imp-" + JCLOUDS_EXAMPLE);
      assertEquals(record.getType(), "A");
      assertEquals(record.getData(), "50.56.174.152");
      assertEquals(record.getTTL(), 600);
     
      testDomains = Maps.newHashMap(testDomains);
      testDomains.put(domain.getName(), domain);
   }
View Full Code Here

            responseWithAccess,
            authenticatedGET().endpoint(endpoint).build(),
            HttpResponse.builder().statusCode(OK.getStatusCode()).payload(payloadFromResource("/domain-get.json")).build())
            .getDomainApi();

      Domain domain = api.get(3650908);
      assertEquals(domain.getName(), "test." + JCLOUDS_EXAMPLE);
      assertEquals(domain.getRecords().size(), 2);
      assertEquals(domain.getComment().get(), "Hello test subdomain");
      assertEquals(domain.getTTL(), 3600);
   }
View Full Code Here

   public void testCreateDomain() throws Exception {
      CreateDomain createDomain = CreateDomain.builder().name(JCLOUDS_EXAMPLE).email("jclouds@" + JCLOUDS_EXAMPLE)
            .ttl(60000).build();

      Iterable<CreateDomain> createDomains = ImmutableList.of(createDomain);
      Domain domain = awaitComplete(api, api.getDomainApi().create(createDomains)).iterator().next();

      assertEquals(domain.getName(), JCLOUDS_EXAMPLE);
      assertEquals(domain.getEmail(), "jclouds@" + JCLOUDS_EXAMPLE);
      assertTrue(domain.getRecords().isEmpty());

      domainId = domain.getId();
   }
View Full Code Here

            .email("jclouds@" + JCLOUDS_EXAMPLE)
            .ttl(60000)
            .build();

      Iterable<CreateDomain> createDomains = ImmutableList.of(createDomain);     
      Domain domain = awaitComplete(api, api.getDomainApi().create(createDomains)).iterator().next();
     
      assertEquals(domain.getName(), JCLOUDS_EXAMPLE);
      assertEquals(domain.getEmail(), "jclouds@" + JCLOUDS_EXAMPLE);
      assertTrue(domain.getRecords().isEmpty());
     
      domainId = domain.getId();
   }  
View Full Code Here

            HttpResponse.builder().statusCode(OK.getStatusCode()).payload(payloadFromResource("/domain-list-changes.json")).build())
            .getDomainApi();

      Calendar cal = Calendar.getInstance(new SimpleTimeZone(0, "GMT"));
      cal.set(2013, 2, 22, 3, 39, 31);
      DomainChange domainChange = api.listChanges(3650908, cal.getTime());
     
      assertEquals(domainChange.getChanges().size(), 25);
   }
View Full Code Here

            .email("everett@" + JCLOUDS_EXAMPLE)
            .ttl(600001)
            .comment("Hello Domain Update")
            .build();

      Job job = api.update(3650908, updateDomain);
     
      assertEquals(job.getStatus(), Job.Status.COMPLETED);
   }
View Full Code Here

               .build(),
            HttpResponse.builder().statusCode(OK.getStatusCode()).payload(payloadFromResource("/domain-update-response.json")).build())
            .getDomainApi();

      List<Integer> ids = ImmutableList.of(3650906, 3650908);
      Job job = api.updateTTL(ids, 1234567);
     
      assertEquals(job.getStatus(), Job.Status.COMPLETED);
   }
View Full Code Here

               .build(),
            HttpResponse.builder().statusCode(OK.getStatusCode()).payload(payloadFromResource("/domain-update-response.json")).build())
            .getDomainApi();

      List<Integer> ids = ImmutableList.of(3650906, 3650908);
      Job job = api.updateEmail(ids, "everett@" + JCLOUDS_EXAMPLE);
     
      assertEquals(job.getStatus(), Job.Status.COMPLETED);
   }
View Full Code Here

TOP

Related Classes of org.jclouds.rackspace.clouddns.v1.domain.Domain

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.