Completed
Pull Request — master (#590)
by Anthony
03:18
created

GenericAction.run()   A

Complexity

Conditions 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
c 1
b 0
f 1
dl 0
loc 4
rs 10
1
from lib.action import CiscoSparkAction
2
3
__all__ = [
4
    'GenericAction'
5
]
6
7
8
class GenericAction(CiscoSparkAction):
9
10
    def run(self, accessor, method_name, **kwargs):
11
        a = getattr(self.connection, accessor)
12
        result = getattr(a, method_name)(**kwargs)
13
        return self._parse_result(result)
14