'Checks that all cluster template settings are valid and raises an
exception.ClusterValidationError exception if not.'

def validate(self):

    log.info('Validating    cluster    template    settings...')
    try:
        self.validate_required_settings()
        self.validate_vpc()
        self.validate_dns_prefix()
        self.validate_spot_bid()
        self.validate_cluster_size()
        self.validate_cluster_user()
        self.validate_shell_setting()
        self.validate_permission_settings()
        self.validate_credentials()
        self.validate_keypair()
        self.validate_zone()
        self.validate_ebs_settings()
        self.validate_ebs_aws_settings()
        self.validate_image_settings()
        self.validate_instance_types()
        self.validate_userdata()
        log.info('Cluster    template    settings    are    valid')
        return True
    except exception.ClusterValidationError as e:
        e.msg = ('Cluster    settings    are    not    valid:\n%s' % e.msg)
        raise
