summaryrefslogtreecommitdiffstats
path: root/vnftest/cmd/commands/__init__.py
blob: 8c46b478a9aa98f01c2cfe45076169a39cc278a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from __future__ import absolute_import
from vnftest.onap.core import Param


def change_osloobj_to_paras(args):
    param = Param({})
    for k in vars(param):
        if hasattr(args, k):
            setattr(param, k, getattr(args, k))
    return param


class Commands(object):

    def _change_to_dict(self, args):
        p = Param({})
        return {k: getattr(args, k) for k in vars(p) if hasattr(args, k)}