Package org.jclouds.openstack.trove.v1.domain

Examples of org.jclouds.openstack.trove.v1.domain.Flavor$Builder


   
    @Override   
    public <R extends HttpRequest> R bindToRequest(R request, Map<String, Object> postParams) {
       Map<String, Object> databaseInstance = Maps.newHashMap();
       databaseInstance.put("flavorRef", postParams.get("flavorRef"));
       databaseInstance.put("volume", new Volume((Integer) postParams.get("size")));
       if (postParams.get("name") != null)
           databaseInstance.put("name", postParams.get("name"));
       return jsonBinder.bindToRequest(request, ImmutableMap.of("instance", databaseInstance));
    }
View Full Code Here


      /**
       *
       * @return A new Instance object.
       */
      public Instance build() {
         return new Instance(id, name, flavor, new Volume(size), status, links, hostname);
      }
View Full Code Here

   @Override
   @BeforeClass(groups = { "integration", "live" })
   public void setup() {
      super.setup();
      TroveUtils utils= new TroveUtils(api);
      for (String zone : api.getConfiguredZones()) {
         // create instances
         List<Instance> instanceList = Lists.newArrayList();
         Instance first = utils.getWorkingInstance(zone, "first_user_trove_live_testing_" + zone, "1", 1);
         Instance second = utils.getWorkingInstance(zone, "second_user_trove_live_testing_" + zone, "1", 1);
         instanceList.add(first);
         instanceList.add(second);
         instancesToDelete.put(zone, instanceList);
         // create users
         User user1 = User.builder()
View Full Code Here

   
    @Override
    @BeforeClass(groups = { "integration", "live" })
    public void setup() {
        super.setup();
        TroveUtils utils= new TroveUtils(api);
        for (String zone : api.getConfiguredZones()) {
            List<Instance> zoneList = Lists.newArrayList();
            InstanceApi instanceApi = api.getInstanceApiForZone(zone);
            zoneList.add(utils.getWorkingInstance(zone, "first_instance_testing_" + zone, "1", 1));
            Instance second = utils.getWorkingInstance(zone, "second_instance_testing_" + zone, "1", 1);
            instanceApi.enableRoot(second.getId());
            zoneList.add(second);           
            created.put(zone, zoneList);
        }
    }
View Full Code Here

   @Override
   @BeforeClass(groups = { "integration", "live" })
   public void setup() {
      super.setup();
      TroveUtils utils = new TroveUtils(api);
      for (String zone : api.getConfiguredZones()) {
         // create instances
         List<Instance> instanceList = Lists.newArrayList();
         Instance first = utils.getWorkingInstance(zone, "first_database_testing_" + zone, "1", 1);
         Instance second = utils.getWorkingInstance(zone, "second_database_testing_" + zone, "1", 1);
         instanceList.add(first);
         instanceList.add(second);
         instancesToDelete.put(zone, instanceList);
        
         DatabaseApi databaseApiFirst = api.getDatabaseApiForInstanceInZone(first.getId(), zone);
View Full Code Here

   
    @Override
    @BeforeClass(groups = { "integration", "live" })
    public void setup() {
        super.setup();
        TroveUtils utils= new TroveUtils(api);
        for (String zone : api.getConfiguredZones()) {
            List<Instance> zoneList = Lists.newArrayList();
            InstanceApi instanceApi = api.getInstanceApiForZone(zone);
            zoneList.add(utils.getWorkingInstance(zone, "first_instance_testing_" + zone, "1", 1));
            Instance second = utils.getWorkingInstance(zone, "second_instance_testing_" + zone, "1", 1);
            instanceApi.enableRoot(second.getId());
            zoneList.add(second);           
            created.put(zone, zoneList);
        }
    }
View Full Code Here

   @Override
   @BeforeClass(groups = { "integration", "live" })
   public void setup() {
      super.setup();
      TroveUtils utils = new TroveUtils(api);
      for (String zone : api.getConfiguredZones()) {
         // create instances
         List<Instance> instanceList = Lists.newArrayList();
         Instance first = utils.getWorkingInstance(zone, "first_database_testing_" + zone, "1", 1);
         Instance second = utils.getWorkingInstance(zone, "second_database_testing_" + zone, "1", 1);
         instanceList.add(first);
         instanceList.add(second);
         instancesToDelete.put(zone, instanceList);

         DatabaseApi databaseApiFirst = api.getDatabaseApiForZoneAndInstance(zone, first.getId());
View Full Code Here

   @Override
   @BeforeClass(groups = { "integration", "live" })
   public void setup() {
      super.setup();
      TroveUtils utils= new TroveUtils(api);
      for (String zone : api.getConfiguredZones()) {
         // create instances
         List<Instance> instanceList = Lists.newArrayList();
         Instance first = utils.getWorkingInstance(zone, "first_user_trove_live_testing_" + zone, "1", 1);
         Instance second = utils.getWorkingInstance(zone, "second_user_trove_live_testing_" + zone, "1", 1);
         instanceList.add(first);
         instanceList.add(second);
         instancesToDelete.put(zone, instanceList);
         // create users
         User user1 = User.builder()
View Full Code Here

   
    @Override
    @BeforeClass(groups = { "integration", "live" })
    public void setup() {
        super.setup();
        TroveUtils utils = new TroveUtils(api);
        for (String zone : api.getConfiguredZones()) {
            List<Instance> zoneList = Lists.newArrayList();
            InstanceApi instanceApi = api.getInstanceApiForZone(zone);
            zoneList.add(utils.getWorkingInstance(zone, "first_instance_testing_" + zone, "1", 1));
            Instance second = utils.getWorkingInstance(zone, "second_instance_testing_" + zone, "1", 1);
            instanceApi.enableRoot(second.getId());
            zoneList.add(second);           
            created.put(zone, zoneList);
        }
    }
View Full Code Here

   }

   private void createInstance(Flavor flavor) throws TimeoutException {
      System.out.format("Create Instance for Flavor: %s%n", flavor.getId());

      TroveUtils utils = new TroveUtils(troveApi);
      // This call will take a while - it ensures a working instance is created.
      Instance instance = utils.getWorkingInstance(ZONE, NAME, "" + flavor.getId(), 1);

      System.out.format("  %s%n", instance);
   }
View Full Code Here

TOP

Related Classes of org.jclouds.openstack.trove.v1.domain.Flavor$Builder

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.