def service_type(stype):
    """Adds 'service_type' attribute to decorated function.

    Usage:
        @service_type('volume')
        def mymethod(f):
            ...
    """
    def inner(f):
        f.service_type = stype
        return f
    return inner