Completed
Push — master ( 48b27b...9784f9 )
by Tomaz
22s
created

GetNodeConfAction.run()   A

Complexity

Conditions 2

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %
Metric Value
cc 2
dl 0
loc 7
rs 9.4285
1
import requests
2
3
from lib.base import OpscenterAction
4
5
6
class GetNodeConfAction(OpscenterAction):
7
8
    def run(self, node_ip, cluster_id=None):
9
        if not cluster_id:
10
            cluster_id = self.cluster_id
11
12
        url = self._get_full_url([cluster_id, 'nodeconf', node_ip])
13
14
        return requests.get(url).json()
15