'Verify that all EBS volumes exist and are available.'

def validate_ebs_aws_settings(self):

    cluster = self.cluster
    for vol in cluster.volumes:
        v = cluster.volumes.get(vol)
        vol_id = v.get('volume_id')
        vol = cluster.ec2.get_volume(vol_id)
        if (vol.status != 'available'):
            try:
                if (vol.attach_data.instance_id == cluster.master_node.id):
                    continue
            except exception.MasterDoesNotExist:
                pass
            raise exception.ClusterValidationError(("Volume    '%s'    is    not    available    (status:    %s)" % (vol_id, vol.status)))
