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

GetStorageCapacity   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 9
Duplicated Lines 0 %
Metric Value
dl 0
loc 9
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 GetStorageCapacity(OpscenterAction):
7
8
    def run(self, cluster_id=None):
9
        if not cluster_id:
10
            cluster_id = self.cluster_id
11
12
        url = self._get_full_url([cluster_id, 'storage-capacity'])
13
14
        return requests.get(url).json()
15