public boolean apply(Attachment attachment) { logger.trace("looking for volume %s", attachment.getVolumeId()); Volume volume = Iterables.getOnlyElement(client.describeVolumesInRegion(attachment .getRegion(), attachment.getVolumeId())); if (volume.getAttachments().size() == 0) { return false; } Attachment lastAttachment = Sets.newTreeSet(volume.getAttachments()).last(); logger.trace("%s: looking for status %s: currently: %s", lastAttachment, Attachment.Status.ATTACHED, lastAttachment.getStatus()); return lastAttachment.getStatus() == Attachment.Status.ATTACHED; }
public boolean apply(Attachment attachment) { logger.trace("looking for volume %s", attachment.getVolumeId()); Volume volume = Iterables.getOnlyElement(client.describeVolumesInRegion(attachment .getRegion(), attachment.getVolumeId())); if (volume.getAttachments().size() == 0) { return false; } Attachment lastAttachment = Sets.newTreeSet(volume.getAttachments()).last(); logger.trace("%s: looking for status %s: currently: %s", lastAttachment, Attachment.Status.ATTACHED, lastAttachment.getStatus()); return lastAttachment.getStatus() == Attachment.Status.ATTACHED; }
public boolean apply(Attachment attachment) { logger.trace("looking for volume %s", attachment.getVolumeId()); Volume volume = Iterables.getOnlyElement(client.describeVolumesInRegion(attachment .getRegion(), attachment.getVolumeId())); if (volume.getAttachments().isEmpty()) { return false; } Attachment lastAttachment = Sets.newTreeSet(volume.getAttachments()).last(); logger.trace("%s: looking for status %s: currently: %s", lastAttachment, Attachment.Status.ATTACHED, lastAttachment.getStatus()); return lastAttachment.getStatus() == Attachment.Status.ATTACHED; }
public boolean apply(Attachment attachment) { logger.trace("looking for volume %s", attachment.getVolumeId()); Volume volume = Iterables.getOnlyElement(client.describeVolumesInRegion(attachment .getRegion(), attachment.getVolumeId())); if (volume.getAttachments().isEmpty()) { return false; } Attachment lastAttachment = Sets.newTreeSet(volume.getAttachments()).last(); logger.trace("%s: looking for status %s: currently: %s", lastAttachment, Attachment.Status.ATTACHED, lastAttachment.getStatus()); return lastAttachment.getStatus() == Attachment.Status.ATTACHED; }
public boolean apply(Attachment attachment) { logger.trace("looking for volume %s", attachment.getVolumeId()); Volume volume = Iterables.getOnlyElement(client.describeVolumesInRegion(attachment .getRegion(), attachment.getVolumeId())); if (volume.getAttachments().isEmpty()) { return false; } Attachment lastAttachment = Sets.newTreeSet(volume.getAttachments()).last(); logger.trace("%s: looking for status %s: currently: %s", lastAttachment, Attachment.Status.ATTACHED, lastAttachment.getStatus()); return lastAttachment.getStatus() == Attachment.Status.ATTACHED; }
public boolean apply(Attachment attachment) { logger.trace("looking for volume %s", attachment.getVolumeId()); Volume volume = Iterables.getOnlyElement(client.describeVolumesInRegion(attachment .getRegion(), attachment.getVolumeId())); /*If attachment size is 0 volume is detached for sure.*/ if (volume.getAttachments().isEmpty()) { return true; } /* But if attachment size is > 0, then the attachment could be in any state. * So we need to check if the status is DETACHED (return true) or not (return false). */ Attachment lastAttachment = getLast(volume.getAttachments()); logger.trace("%s: looking for status %s: currently: %s", lastAttachment, Attachment.Status.DETACHED, lastAttachment.getStatus()); return lastAttachment.getStatus() == Attachment.Status.DETACHED; } }
public boolean apply(Attachment attachment) { logger.trace("looking for volume %s", attachment.getVolumeId()); Volume volume = Iterables.getOnlyElement(client.describeVolumesInRegion(attachment .getRegion(), attachment.getVolumeId())); /*If attachment size is 0 volume is detached for sure.*/ if (volume.getAttachments().size() == 0) { return true; } /* But if attachment size is > 0, then the attachment could be in any state. * So we need to check if the status is DETACHED (return true) or not (return false). */ Attachment lastAttachment = getLast(volume.getAttachments()); logger.trace("%s: looking for status %s: currently: %s", lastAttachment, Attachment.Status.DETACHED, lastAttachment.getStatus()); return lastAttachment.getStatus() == Attachment.Status.DETACHED; } }
public boolean apply(Attachment attachment) { logger.trace("looking for volume %s", attachment.getVolumeId()); Volume volume = Iterables.getOnlyElement(client.describeVolumesInRegion(attachment .getRegion(), attachment.getVolumeId())); /*If attachment size is 0 volume is detached for sure.*/ if (volume.getAttachments().isEmpty()) { return true; } /* But if attachment size is > 0, then the attachment could be in any state. * So we need to check if the status is DETACHED (return true) or not (return false). */ Attachment lastAttachment = getLast(volume.getAttachments()); logger.trace("%s: looking for status %s: currently: %s", lastAttachment, Attachment.Status.DETACHED, lastAttachment.getStatus()); return lastAttachment.getStatus() == Attachment.Status.DETACHED; } }
public boolean apply(Attachment attachment) { logger.trace("looking for volume %s", attachment.getVolumeId()); Volume volume = Iterables.getOnlyElement(client.describeVolumesInRegion(attachment .getRegion(), attachment.getVolumeId())); /*If attachment size is 0 volume is detached for sure.*/ if (volume.getAttachments().isEmpty()) { return true; } /* But if attachment size is > 0, then the attachment could be in any state. * So we need to check if the status is DETACHED (return true) or not (return false). */ Attachment lastAttachment = getLast(volume.getAttachments()); logger.trace("%s: looking for status %s: currently: %s", lastAttachment, Attachment.Status.DETACHED, lastAttachment.getStatus()); return lastAttachment.getStatus() == Attachment.Status.DETACHED; } }
public boolean apply(Attachment attachment) { logger.trace("looking for volume %s", attachment.getVolumeId()); Volume volume = Iterables.getOnlyElement(client.describeVolumesInRegion(attachment .getRegion(), attachment.getVolumeId())); /*If attachment size is 0 volume is detached for sure.*/ if (volume.getAttachments().size() == 0) { return true; } /* But if attachment size is > 0, then the attachment could be in any state. * So we need to check if the status is DETACHED (return true) or not (return false). */ Attachment lastAttachment = getLast(volume.getAttachments()); logger.trace("%s: looking for status %s: currently: %s", lastAttachment, Attachment.Status.DETACHED, lastAttachment.getStatus()); return lastAttachment.getStatus() == Attachment.Status.DETACHED; } }