X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=yardstick%2Fcommon%2Futils.py;h=c482b4da4d2fca6e6e29d57104b44374f1478bb6;hb=197cef580315e942dffb517412374fd297c34b33;hp=4de0fcfd596839d8081ba12733bf37963c6ca46d;hpb=bc5339353682d737e5d5d948642028fab3bd186a;p=yardstick.git diff --git a/yardstick/common/utils.py b/yardstick/common/utils.py index 4de0fcfd5..c482b4da4 100644 --- a/yardstick/common/utils.py +++ b/yardstick/common/utils.py @@ -22,6 +22,14 @@ from oslo_utils import importutils import yardstick +# Decorator for cli-args +def cliargs(*args, **kwargs): + def _decorator(func): + func.__dict__.setdefault('arguments', []).insert(0, (args, kwargs)) + return func + return _decorator + + def itersubclasses(cls, _seen=None): """Generator over all subclasses of a given class in depth first order."""