Package org.jclouds.cloudsigma2.binders

Examples of org.jclouds.cloudsigma2.binders.BindDrivesToJson


                  .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

                  .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

            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

                  .endTime(endTime)
                  .resource(SubscriptionResource.VLAN)
                  .discountAmount(10.5d)
                  .build()
      );
      SubscriptionCalculator subscriptionCalculator = api.calculateSubscriptions(subscriptionsToCalculate);
      List<CalcSubscription> calculatedSubscriptions = subscriptionCalculator.getSubscriptions();
      assertEquals(calculatedSubscriptions.size(), subscriptionsToCalculate.size());
      for (int i = 0; i < calculatedSubscriptions.size(); i++) {
         assertEquals(calculatedSubscriptions.get(i).getResource(), subscriptionsToCalculate.get(i).getResource());
      }
   }
View Full Code Here

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

      SubscriptionCalculator subscriptionCalculator = api.calculateSubscriptions(subscriptionsToCalculate);

      assertNotNull(subscriptionCalculator);
      for (int i = 0; i < subscriptionsToCalculate.size(); i++) {
         checkCalcSubscription(subscriptionCalculator.getSubscriptions().get(i), subscriptionsToCalculate.get(i));
      }
   }
View Full Code Here

                  .endTime(endTime)
                  .resource(SubscriptionResource.VLAN)
                  .discountAmount(10.5d)
                  .build()
      );
      SubscriptionCalculator subscriptionCalculator = api.calculateSubscriptions(subscriptionsToCalculate);
      List<CalcSubscription> calculatedSubscriptions = subscriptionCalculator.getSubscriptions();
      assertEquals(calculatedSubscriptions.size(), subscriptionsToCalculate.size());
      for (int i = 0; i < calculatedSubscriptions.size(); i++) {
         assertEquals(calculatedSubscriptions.get(i).getResource(), subscriptionsToCalculate.get(i).getResource());
      }
   }
View Full Code Here

TOP

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

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.