'Decorator for Storage Policy implementations to register
their StoragePolicy class.  This will also set the policy_type
attribute on the registered implementation.'

@classmethod
def register(cls, policy_type):

    def register_wrapper(policy_cls):
        if (policy_type in cls.policy_type_to_policy_cls):
            raise PolicyError(('%r    is    already    registered    for    the    policy_type    %r' % (cls.policy_type_to_policy_cls[policy_type], policy_type)))
        cls.policy_type_to_policy_cls[policy_type] = policy_cls
        policy_cls.policy_type = policy_type
        return policy_cls
    return register_wrapper
