@classmethod
def set_default(cls, method):
    """Set default implementation method ("api" or "cmdline")"""
    if method in ('api', 'cmdline'):
        cls._default = method
    else:
        raise RuntimeError('method %s is unsupported' % method)
