'Validate structural/syntax aspects of the resource definition.
Resource plugins should not override this, because this interface
is expected to be called pre-create so things normally valid
in an overridden validate() such as accessing properties
may not work.'

def validate_template(self):

    self._validate_service_availability(self.stack.context, self.t.resource_type)
    path = '.'.join([self.stack.t.RESOURCES, self.name])
    function.validate(self.t, path)
    self.validate_deletion_policy(self.t.deletion_policy())
    self.t.update_policy(self.update_policy_schema, self.context).validate()
    try:
        validate = self.properties.validate(with_value=self.stack.strict_validate, template=self.t)
    except exception.StackValidationFailed as ex:
        path = [self.stack.t.RESOURCES, self.t.name, self.stack.t.get_section_name(ex.path[0])]
        path.extend(ex.path[1:])
        raise exception.StackValidationFailed(error=ex.error, path=path, message=ex.error_message)
    return validate
