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

StartNodeAction   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 8
Duplicated Lines 0 %
Metric Value
dl 0
loc 8
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 7 2
1
import requests
2
3
from lib.base import OpscenterAction
4
5
6
class StartNodeAction(OpscenterAction):
7
    def run(self, node_ip, cluster_id=None):
8
        if not cluster_id:
9
            cluster_id = self.cluster_id
10
11
        url = self._get_full_url([cluster_id, 'ops', 'start', node_ip])
12
13
        return requests.post(url).json()
14