Package org.jclouds.cloudsigma2.binders

Examples of org.jclouds.cloudsigma2.binders.BindCreateSubscriptionRequest


      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


                  .build(),
            responseBuilder()
                  .payload(payloadFromResourceWithContentType("/profile.json", MediaType.APPLICATION_JSON))
                  .build());

      ProfileInfo result = api.getProfileInfo();
      assertNotNull(result);
   }
View Full Code Here

                  .build());

      Map<String, String> meta = Maps.newHashMap();
      meta.put("description", "profile info");

      ProfileInfo result = api.editProfileInfo(new ProfileInfo.Builder()
            .address("test_address")
            .isApiHttpsOnly(false)
            .autotopupAmount("0E-16")
            .autotopupThreshold("0E-16")
            .bankReference("jdoe123")
View Full Code Here

      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

                  .build(),
            responseBuilder()
                  .payload(payloadFromResourceWithContentType("/profile.json", MediaType.APPLICATION_JSON))
                  .build());

      ProfileInfo result = api.getProfileInfo();
      assertNotNull(result);
   }
View Full Code Here

                  .build());

      Map<String, String> meta = Maps.newHashMap();
      meta.put("description", "profile info");

      ProfileInfo result = api.editProfileInfo(new ProfileInfo.Builder()
            .address("test_address")
            .isApiHttpsOnly(false)
            .autotopupAmount("0E-16")
            .autotopupThreshold("0E-16")
            .bankReference("jdoe123")
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

TOP

Related Classes of org.jclouds.cloudsigma2.binders.BindCreateSubscriptionRequest

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.