14 lines
363 B
Python
14 lines
363 B
Python
import requests
|
|
|
|
|
|
class SWSStatisticsClient(object):
|
|
def get_vm(self, vm_id: str, limit: int = 96):
|
|
r = requests.get(
|
|
f"http://server-stats.gocloud.ru/stats/v1/compute/vms/{vm_id}",
|
|
params={
|
|
'limit': limit
|
|
}
|
|
)
|
|
if r.status_code == 200:
|
|
return r.json()
|
|
return None
|