Package org.jclouds.compute

Examples of org.jclouds.compute.ComputeService.destroyNode()


         System.err.println(t.getMessage());
         return null;
      }

      for (String id : ids) {
         service.destroyNode(id);
         cacheProvider.getProviderCacheForType(Constants.ACTIVE_NODE_CACHE).remove(
                  service.getContext().unwrap().getId(), id);
         cacheProvider.getProviderCacheForType(Constants.INACTIVE_NODE_CACHE).remove(
                  service.getContext().unwrap().getId(), id);
         cacheProvider.getProviderCacheForType(Constants.SUSPENDED_NODE_CACHE).remove(
View Full Code Here


            System.exit(1);
         }
      } catch (RunNodesException e) {
         System.err.println(e.getMessage());
         for (NodeMetadata node : e.getNodeErrors().keySet())
            compute.destroyNode(node.getId());
         System.exit(1);
      } catch (IOException e) {
         System.err.println(e.getMessage());
         System.exit(1);
      } finally {
View Full Code Here

      assertEquals("test-create-image", image.getName());

      imageId = image.getId();

      computeService.destroyNode(node.getId());

      Optional<? extends Image> optImage = getImage();

      assertTrue(optImage.isPresent());
View Full Code Here

  public void destroyInstance(ClusterSpec clusterSpec, String instanceId) throws IOException {
    LOG.info("Destroying instance {}", instanceId);

    ComputeService computeService = ComputeServiceContextBuilder
      .build(clusterSpec).getComputeService();
    computeService.destroyNode(instanceId);

    LOG.info("Instance {} destroyed", instanceId);
  }
 
  public Set<? extends NodeMetadata> getNodes(ClusterSpec clusterSpec)
View Full Code Here

              .add(SUCESSFULL_OPERATION_RESPONSE)
              .add(GET_GLOBAL_OPERATION_RESPONSE)
              .build();

      ComputeService client = orderedRequestsSendResponses(orderedRequests, orderedResponses);
      client.destroyNode("us-central1-a/test-delete-networks");

   }

   public void testListLocationsWhenResponseIs2xx() throws Exception {
View Full Code Here

        } else {
            CreateJCloudsContainerMetadata jCloudsContainerMetadata = (CreateJCloudsContainerMetadata) metadata;
            CreateJCloudsContainerOptions options = jCloudsContainerMetadata.getCreateOptions();
            String nodeId = jCloudsContainerMetadata.getNodeId();
            ComputeService computeService = getOrCreateComputeService(options);
            computeService.destroyNode(nodeId);
        }
    }

    /**
     * Gets an existing {@link ComputeService} that matches configuration or creates a new one.
View Full Code Here

            System.exit(1);
         }
      } catch (RunNodesException e) {
         System.err.println(e.getMessage());
         for (NodeMetadata node : e.getNodeErrors().keySet())
            compute.destroyNode(node.getId());
         System.exit(1);
      } catch (IOException e) {
         System.err.println(e.getMessage());
         System.exit(1);
      } finally {
View Full Code Here

      assertEquals(imageGroup, image.getName());

      imageId = image.getId();

      computeService.destroyNode(node.getId());

      Optional<? extends Image> optImage = getImage();

      assertTrue(optImage.isPresent());
   }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.