Completed
Pull Request — master (#408)
by Anthony
02:07
created

GenericKubernetesAction.run()   A

Complexity

Conditions 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %
Metric Value
cc 1
dl 0
loc 10
rs 9.4285
1
from lib import action
2
3
__all__ = [
4
    'GenericKubernetesAction',
5
]
6
7
8
class GenericKubernetesAction(action.BaseAction):
9
10
    def run(self, **kwargs):
11
        # remove the immutable action_name from the kwargs
12
        action = kwargs['method_name']
13
        del kwargs['method_name']
14
15
        # Get an instance of the API Client
16
        conn = self.get_connection()
17
18
        # Call the method and include the params from the YAML as kwargs
19
        return self._do_function(conn, action, **kwargs)