Completed
Pull Request — master (#408)
by Anthony
01:49
created

GenericKubernetesAction   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %
Metric Value
dl 0
loc 12
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 10 1
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)