Package org.jclouds.date.internal

Examples of org.jclouds.date.internal.SimpleDateFormatDateService


   public Route expected() {
      return Route.builder()
              .selfLink(URI.create("https://www.googleapis.com/compute/v1/projects/myproject/global/routes/default-route-c99ebfbed0e1f375"))
              .id("7241926205630356071")
              .name("default-route-c99ebfbed0e1f375")
              .creationTimestamp(new SimpleDateFormatDateService().iso8601DateParse("2013-07-08T14:40:38.502-07:00"))
              .description("Default route to the virtual network.")
              .network(URI.create("https://www.googleapis.com/compute/v1/projects/myproject/global/networks/default"))
              .destRange("10.240.0.0/16")
              .priority(1000)
              .nextHopNetwork(URI.create("https://www.googleapis.com/compute/v1/projects/myproject/global/networks/default"))
View Full Code Here


              .items(ImmutableSet.of(
                      new ParseSnapshotTest().expected(), Snapshot.builder()
                      .selfLink(URI.create("https://www.googleapis" +
                              ".com/compute/v1/projects/myproject/global/snapshots/test-snap2"))
                      .id("13895715048576107883")
                      .creationTimestamp(new SimpleDateFormatDateService().iso8601DateParse
                              ("2013-07-26T12:57:01.927-07:00"))
                      .status("READY")
                      .sizeGb(10)
                      .sourceDisk(URI.create("https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-a/disks/testimage1"))
                      .name("test-snap2")
View Full Code Here

   }

   @Override
   @Consumes(MediaType.APPLICATION_JSON)
   public MachineType expected() {
      SimpleDateFormatDateService dateService = new SimpleDateFormatDateService();
      return MachineType.builder()
              .id("12907738072351752276")
              .creationTimestamp(dateService.iso8601DateParse("2012-06-07T20:48:14.670"))
              .selfLink(URI.create("https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-a/machineTypes/n1" +
                      "-standard-1"))
              .zone("us-central1-a")
              .name("n1-standard-1")
              .description("1 vCPU, 3.75 GB RAM, and a 10 GB ephemeral root disk")
View Full Code Here

   @Override
   @Consumes(MediaType.APPLICATION_JSON)
   public Region expected() {
      return Region.builder()
              .id("12912210600542709766")
              .creationTimestamp(new SimpleDateFormatDateService().iso8601DateParse("2013-07-08T14:40:37.939-07:00"))
              .selfLink(URI.create("https://www.googleapis.com/compute/v1/projects/myproject/regions/us-central1"))
              .name("us-central1")
              .description("us-central1")
              .status(Region.Status.UP)
              .zones(ImmutableSet.of(URI.create("https://www.googleapis.com/compute/v1/zones/us-central1-a"),
View Full Code Here

              .selfLink(URI.create("https://www.googleapis.com/compute/v1/projects/myproject/global/routes"))
              .items(ImmutableSet.of(new ParseRouteTest().expected(),
                      Route.builder()
                              .selfLink(URI.create("https://www.googleapis.com/compute/v1/projects/myproject/global/routes/default-route-fc92a41ecb5a8d17"))
                              .id("507025480040058551")
                              .creationTimestamp(new SimpleDateFormatDateService().iso8601DateParse("2013-07-08T14:40:38.502-07:00"))
                              .name("default-route-fc92a41ecb5a8d17")
                              .description("Default route to the Internet.")
                              .network(URI.create("https://www.googleapis.com/compute/v1/projects/myproject/global/networks/default"))
                              .destRange("0.0.0.0/0")
                              .priority(1000)
View Full Code Here

   public static final HttpResponse GET_ZONE_OPERATION_RESPONSE = HttpResponse.builder().statusCode(200)
           .payload(staticPayloadFromResource("/zone_operation.json")).build();

   private Operation expected() {
      SimpleDateFormatDateService dateService = new SimpleDateFormatDateService();
      return Operation.builder().id("13053095055850848306")
              .selfLink(URI.create("https://www.googleapis" +
                      ".com/compute/v1/projects/myproject/zones/us-central1-a/operations/operation-1354084865060-4cf88735faeb8" +
                      "-bbbb12cb"))
              .name("operation-1354084865060-4cf88735faeb8-bbbb12cb")
              .targetLink(URI.create("https://www.googleapis" +
                      ".com/compute/v1/projects/myproject/zones/us-central1-a/instances/instance-api-live-test-instance"))
              .targetId("13053094017547040099")
              .status(Operation.Status.DONE)
              .user("user@developer.gserviceaccount.com")
              .progress(100)
              .insertTime(dateService.iso8601DateParse("2012-11-28T06:41:05.060"))
              .startTime(dateService.iso8601DateParse("2012-11-28T06:41:05.142"))
              .endTime(dateService.iso8601DateParse("2012-11-28T06:41:06.142"))
              .operationType("insert")
              .zone(URI.create("https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-a"))
              .build();
   }
View Full Code Here

   @Override
   @Consumes(MediaType.APPLICATION_JSON)
   public Address expected() {
      return Address.builder()
              .id("4439373783165447583")
              .creationTimestamp(new SimpleDateFormatDateService().iso8601DateParse("2013-07-26T13:57:20.204-07:00"))
              .status("RESERVED")
              .region(URI.create("https://www.googleapis.com/compute/v1/projects/myproject/regions/us-central1"))
              .name("test-ip1")
              .description("")
              .address("173.255.115.190")
View Full Code Here

              .id("projects/myproject/regions/us-central1/addresses")
              .selfLink(URI.create("https://www.googleapis.com/compute/v1/projects/myproject/regions/us-central1/addresses"))
              .items(ImmutableSet.of(new ParseAddressTest().expected(),
                      Address.builder()
                              .id("4881363978908129158")
                              .creationTimestamp(new SimpleDateFormatDateService().iso8601DateParse("2013-07-26T14:08:21.552-07:00"))
                              .status("RESERVED")
                              .region(URI.create("https://www.googleapis.com/compute/v1/projects/myproject/regions/us-central1"))
                              .name("test-ip2")
                              .description("")
                              .address("173.255.118.115")
View Full Code Here

   @Override
   @Consumes(MediaType.APPLICATION_JSON)
   public Network expected() {
      return Network.builder()
              .id("13024414170909937976")
              .creationTimestamp(new SimpleDateFormatDateService().iso8601DateParse("2012-10-24T20:13:19.967"))
              .selfLink(URI.create("https://www.googleapis.com/compute/v1/projects/myproject/networks/jclouds-test"))
              .name("default")
              .description("Default network for the project")
              .IPv4Range("10.0.0.0/8")
              .gatewayIPv4("10.0.0.1")
View Full Code Here

   public static final HttpResponse GET_OPERATION_RESPONSE = HttpResponse.builder().statusCode(200)
           .payload(staticPayloadFromResource("/region_operation.json")).build();

   private Operation expected() {
      SimpleDateFormatDateService dateService = new SimpleDateFormatDateService();
      return Operation.builder().id("13053095055850848306")
              .selfLink(URI.create("https://www.googleapis" +
                      ".com/compute/v1/projects/myproject/regions/us-central1/operations/operation-1354084865060-4cf88735faeb8" +
                      "-bbbb12cb"))
              .name("operation-1354084865060-4cf88735faeb8-bbbb12cb")
              .targetLink(URI.create("https://www.googleapis" +
                      ".com/compute/v1/projects/myproject/regions/us-central1/addresses/test-address"))
              .targetId("13053094017547040099")
              .status(Operation.Status.DONE)
              .user("user@developer.gserviceaccount.com")
              .progress(100)
              .insertTime(dateService.iso8601DateParse("2012-11-28T06:41:05.060"))
              .startTime(dateService.iso8601DateParse("2012-11-28T06:41:05.142"))
              .endTime(dateService.iso8601DateParse("2012-11-28T06:41:06.142"))
              .operationType("insert")
              .region(URI.create("https://www.googleapis.com/compute/v1/projects/myproject/regions/us-central1"))
              .build();
   }
View Full Code Here

TOP

Related Classes of org.jclouds.date.internal.SimpleDateFormatDateService

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.