Package org.jclouds.openstack.nova.v2_0.options

Examples of org.jclouds.openstack.nova.v2_0.options.RebuildServerOptions


      ImageApi imageApi = api.getImageApiForZone(zoneId);
      return Iterables.getLast(imageApi.list().concat()).getId();
   }

   protected String flavorRefForZone(String zoneId) {
      FlavorApi flavorApi = api.getFlavorApiForZone(zoneId);
      return DEFAULT_FLAVOR_ORDERING.min(flavorApi.listInDetail().concat()).getId();
   }
View Full Code Here


         this.api = checkNotNull(api, "api");
      }

      @Override
      protected Function<Object, IterableWithMarker<Resource>> markerToNextForCallingArg0(final String zone) {
         final FlavorApi flavorApi = api.getFlavorApiForZone(zone);
         return new Function<Object, IterableWithMarker<Resource>>() {

            @SuppressWarnings("unchecked")
            @Override
            public IterableWithMarker<Resource> apply(Object input) {
               return IterableWithMarker.class.cast(flavorApi.list(marker(input.toString())));
            }

            @Override
            public String toString() {
               return "listFlavors()";
View Full Code Here

         }
      }
   }
  
   protected String imageIdForZone(String zoneId) {
      ImageApi imageApi = api.getImageApiForZone(zoneId);
      return Iterables.getLast(imageApi.list().concat()).getId();
   }
View Full Code Here

   @Override
   public void setup() {
      super.setup();
      zones = api.getConfiguredZones();
      for (String zone : zones){
         ServerApi serverApi = api.getServerApiForZone(zone);
         for (Resource server : serverApi.list().concat()){
            if (server.getName().equals(hostName))
               serverApi.delete(server.getId());
         }
      }
   }
View Full Code Here

      setIfTestSystemPropertyPresent(props, NovaProperties.AUTO_ALLOCATE_FLOATING_IPS);
      return props;
   }
  
   protected Server createServerInZone(String zoneId) {
      ServerApi serverApi = api.getServerApiForZone(zoneId);
      ServerCreated server = serverApi.create(hostName, imageIdForZone(zoneId), flavorRefForZone(zoneId));
      blockUntilServerInState(server.getId(), serverApi, Status.ACTIVE);
      return serverApi.get(server.getId());
   }
View Full Code Here

         this.api = checkNotNull(api, "api");
      }

      @Override
      protected Function<Object, IterableWithMarker<Resource>> markerToNextForCallingArg0(final String zone) {
         final ServerApi serverApi = api.getServerApiForZone(zone);
         return new Function<Object, IterableWithMarker<Resource>>() {

            @SuppressWarnings("unchecked")
            @Override
            public IterableWithMarker<Resource> apply(Object input) {
               return IterableWithMarker.class.cast(serverApi.list(marker(input.toString())));
            }

            @Override
            public String toString() {
               return "list()";
View Full Code Here

            Server server = serverApi.get(serverId);

            assertEquals(server.getStatus(), ACTIVE);

            RebuildServerOptions options = new RebuildServerOptions().
                  withImage(server.getImage().getId()).
                  name("newName").
                  adminPass("password").
                  ipv4Address("1.1.1.1").
                  ipv6Address("fe80::100");
View Full Code Here

      HttpResponse rebuildServerResponse = HttpResponse.builder().statusCode(202).build();

      NovaApi apiRebuildServer = requestsSendResponses(keystoneAuthWithUsernameAndPasswordAndTenantName,
            responseWithKeystoneAccess, rebuildServer, rebuildServerResponse);

      RebuildServerOptions options = new RebuildServerOptions().withImage("1234").name("newName").adminPass("password").ipv4Address("1.1.1.1").ipv6Address("fe80::100");

      apiRebuildServer.getServerApiForZone("az-1.region-a.geo-1").rebuild(serverId, options);
   }
View Full Code Here

            Server server = serverApi.get(serverId);

            assertEquals(server.getStatus(), Server.Status.ACTIVE);

            RebuildServerOptions options = new RebuildServerOptions().
                  withImage(server.getImage().getId()).
                  name("newName").
                  adminPass("password").
                  ipv4Address("1.1.1.1").
                  ipv6Address("fe80::100");
View Full Code Here

                Server server = serverApi.get(serverId);

                assertEquals(server.getStatus(), Server.Status.ACTIVE);

                RebuildServerOptions options = new RebuildServerOptions().
                        withImage(server.getImage().getId()).
                        name("newName").
                        adminPass("password").
                        ipv4Address("1.1.1.1").
                        ipv6Address("fe80::100");
View Full Code Here

TOP

Related Classes of org.jclouds.openstack.nova.v2_0.options.RebuildServerOptions

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.