Package org.jclouds.cloudsigma2.options

Examples of org.jclouds.cloudsigma2.options.PaginationOptions


      assertNotNull(api.getProfileInfo());
   }

   @Test
   public void testEditProfileInfo() throws Exception {
      ProfileInfo profileInfo = new ProfileInfo.Builder()
            .address("edited address")
            .bankReference("sigma111")
            .company("Awesome company")
            .country("ES")
            .email("user@example.com")
View Full Code Here


   }

   @Override
   public <R extends HttpRequest> R bindToRequest(R request, Object input) {
      checkArgument(input instanceof ServerInfo, "this binder is only valid for ServerInfo!");
      ServerInfo create = ServerInfo.class.cast(input);

      JsonObject serverInfoJson = createServerInfoRequestToJson.apply(create);
      request.setPayload(serverInfoJson.toString());
      request.getPayload().getContentMetadata().setContentType(MediaType.APPLICATION_JSON);
      return request;
View Full Code Here

      assertNotNull(api.listServersInfo());
   }

   @Test
   public void testCreateServer() throws Exception {
      ServerInfo serverInfo = new ServerInfo.Builder()
            .name("New Server")
            .memory(new BigInteger("5368709120"))
            .cpu(3000)
            .vncPassword("new_password")
            .drives(ImmutableList.of(api.listDrives().concat().get(0).toServerDrive(1, "0:1", DeviceEmulationType.IDE)))
View Full Code Here

      }
   }

   @Test(dependsOnMethods = {"testCreateServer"})
   public void testEditServer() throws Exception {
      ServerInfo serverInfo = new ServerInfo.Builder()
            .name("Edited Server")
            .memory(new BigInteger("5368709120"))
            .cpu(2000)
            .vncPassword("edited_password")
            .build();
View Full Code Here

                  .build(),
            responseBuilder()
                  .payload(payloadFromResourceWithContentType("/servers-single.json", MediaType.APPLICATION_JSON))
                  .build());

      ServerInfo result = api.createServer(new ServerInfo.Builder()
            .cpu(100)
            .memory(new BigInteger("536870912"))
            .name("testServerAcc")
            .vncPassword("testserver")
            .build());
View Full Code Here

                  .build(),
            responseBuilder()
                  .payload(payloadFromResourceWithContentType("/servers-single.json", MediaType.APPLICATION_JSON))
                  .build());

      ServerInfo result = api.editServer(uuid, new ServerInfo.Builder()
            .name("testServerAcc")
            .cpu(100)
            .memory(new BigInteger("536870912"))
            .vncPassword("testserver")
            .build());
View Full Code Here

      assertNotNull(api.listServersInfo());
   }

   @Test
   public void testCreateServer() throws Exception {
      ServerInfo serverInfo = new ServerInfo.Builder()
            .name("New Server")
            .memory(new BigInteger("5368709120"))
            .cpu(3000)
            .vncPassword("new_password")
            .drives(ImmutableList.of(api.listDrives().concat().get(0).toServerDrive(1, "0:1", DeviceEmulationType.IDE)))
View Full Code Here

      }
   }

   @Test(dependsOnMethods = {"testCreateServer"})
   public void testEditServer() throws Exception {
      ServerInfo serverInfo = new ServerInfo.Builder()
            .name("Edited Server")
            .memory(new BigInteger("5368709120"))
            .cpu(2000)
            .vncPassword("edited_password")
            .build();
View Full Code Here

            responseBuilder()
                  .payload(payloadFromResourceWithContentType("/subscriptions-single-get.json",
                        MediaType.APPLICATION_JSON))
                  .build());

      Subscription result = api.getSubscription("5551");
      assertNotNull(result);
   }
View Full Code Here

                  .build(),
            responseBuilder()
                  .payload(payloadFromResourceWithContentType("/subscriptions-single.json", MediaType.APPLICATION_JSON))
                  .build());

      Subscription result = api.createSubscription(new CreateSubscriptionRequest.Builder()
            .resource(SubscriptionResource.DSSD)
            .period("1 month")
            .amount("30000")
            .build());
      assertNotNull(result);
View Full Code Here

TOP

Related Classes of org.jclouds.cloudsigma2.options.PaginationOptions

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.