jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ignasi Barrera <notificati...@github.com>
Subject Re: [jclouds-labs] JCLOUDS-702: JClouds ProfitBricks provider - ComputeServiceAdapter (#145)
Date Tue, 03 Mar 2015 22:14:44 GMT
> +      logger.trace("<< searching for server with id=%s", id);
> +
> +      Server server = api.serverApi().getServer(id);
> +      logger.trace(">> found server [%s]", server.name());
> +      return server;
> +   }
> +
> +   @Override
> +   public void destroyNode(String id) {
> +      ServerApi serverApi = api.serverApi();
> +      Server server = serverApi.getServer(id);
> +      if (server != null) {
> +         String dataCenterId = server.dataCenter().id();
> +         for (Storage storage : server.storages()) {
> +            waitDcUntilAvailable.apply(dataCenterId);
> +            api.storageApi().deleteStorage(storage.id());

try/catch each operation to delete as much as we can if something fails?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/145/files#r25732611
Mime
View raw message