Package org.jclouds.openstack.nova.v2_0.domain

Examples of org.jclouds.openstack.nova.v2_0.domain.Host


   // Note the host will be added, but cannot remove it til
   @Test(enabled = false, dependsOnMethods = "testCreateAggregate")
   public void testModifyHosts() {
      if (apiOption.isPresent() && hostAdminOption.isPresent()) {
         HostAggregateApi api = apiOption.get();
         Host host = Iterables.getFirst(hostAdminOption.get().list(), null);
         assertNotNull(host);

         String host_id = host.getName();
         assertNotNull(host_id);
         HostAggregate details;

         try {
            details = api.addHost(testAggregate.getId(), host_id);
View Full Code Here


                       .addHeader("Accept", "application/json")
                       .addHeader("X-Auth-Token", authToken)
                  .endpoint(endpoint).build(),
            HttpResponse.builder().statusCode(200).payload(payloadFromResource("/hosts_list.json")).build()).getHostAdministrationExtensionForZone("az-1.region-a.geo-1").get();
     
      Host expected = Host.builder().name("ubuntu").service("compute").build();

      Set<? extends Host> result = api.list().toSet();
      Host host = Iterables.getOnlyElement(result);
      assertEquals(host.getName(), "ubuntu");
      assertEquals(host.getService(), "compute");

      assertEquals(host, expected);
   }
View Full Code Here

   @Test(enabled = false)
   public void testEnableDisable() throws Exception {
      if (optApi.isPresent()) {
         HostAdministrationApi api = optApi.get();
         Host host = Iterables.find(api.list(), isComputeHost);

         assertTrue(api.disable(host.getName()));
         assertTrue(api.enable(host.getName()));
      }
   }
View Full Code Here

   @Test(enabled = false)
   public void testMaintenanceMode() throws Exception {
      if (optApi.isPresent()) {
         HostAdministrationApi api = optApi.get();
         Host host = Iterables.find(api.list(), isComputeHost);
         assertTrue(api.startMaintenance(host.getName()));
         assertTrue(api.stopMaintenance(host.getName()));
      }
   }
View Full Code Here

   @Test(enabled = false)
   public void testReboot() throws Exception {
      if (optApi.isPresent()) {
         HostAdministrationApi api = optApi.get();
         Host host = Iterables.find(api.list(), isComputeHost);
         assertTrue(api.reboot(host.getName()));
      }
   }
View Full Code Here

   @Test(enabled = false)
   public void testShutdownAndStartup() throws Exception {
      if (optApi.isPresent()) {
         HostAdministrationApi api = optApi.get();
         Host host = Iterables.find(api.list(), isComputeHost);
         assertTrue(api.shutdown(host.getName()));
         assertTrue(api.startup(host.getName()));
      }
   }
View Full Code Here

   // Note the host will be added, but cannot remove it til
   @Test(enabled = false, dependsOnMethods = "testCreateAggregate")
   public void testModifyHosts() {
      if (apiOption.isPresent() && hostAdminOption.isPresent()) {
         HostAggregateApi api = apiOption.get();
         Host host = Iterables.getFirst(hostAdminOption.get().list(), null);
         assertNotNull(host);

         String host_id = host.getName();
         assertNotNull(host_id);
         HostAggregate details;

         try {
            details = api.addHost(testAggregate.getId(), host_id);
View Full Code Here

   @Test(enabled = false)
   public void testEnableDisable() throws Exception {
      if (optApi.isPresent()) {
         HostAdministrationApi api = optApi.get();
         Host host = Iterables.find(api.list(), isComputeHost);

         assertTrue(api.disable(host.getName()));
         assertTrue(api.enable(host.getName()));
      }
   }
View Full Code Here

   @Test(enabled = false)
   public void testMaintenanceMode() throws Exception {
      if (optApi.isPresent()) {
         HostAdministrationApi api = optApi.get();
         Host host = Iterables.find(api.list(), isComputeHost);
         assertTrue(api.startMaintenance(host.getName()));
         assertTrue(api.stopMaintenance(host.getName()));
      }
   }
View Full Code Here

   @Test(enabled = false)
   public void testReboot() throws Exception {
      if (optApi.isPresent()) {
         HostAdministrationApi api = optApi.get();
         Host host = Iterables.find(api.list(), isComputeHost);
         assertTrue(api.reboot(host.getName()));
      }
   }
View Full Code Here

TOP

Related Classes of org.jclouds.openstack.nova.v2_0.domain.Host

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.