Set limit to 1000 in GET VM details query to sbercloud

By default sbercloud API returns only first 25 VMs per query

Signed-off-by: anikeev-yadro <a.anikeev@yadro.com>
This commit is contained in:
anikeev-yadro 2022-09-27 11:56:01 +03:00 committed by anikeev-yadro
parent 38bb0c35a6
commit fed50cb96d

View file

@ -209,7 +209,7 @@ class SberCloud:
return nodes_by_ip[0]['id'] return nodes_by_ip[0]['id']
def get_ecs_nodes(self) -> list[dict]: def get_ecs_nodes(self) -> list[dict]:
response = self.ecs_requests.get("/detail").json() response = self.ecs_requests.get("/detail", {"limit": "1000"}).json()
return response["servers"] return response["servers"]
def start_node(self, node_id: Optional[str] = None, node_ip: Optional[str] = None) -> None: def start_node(self, node_id: Optional[str] = None, node_ip: Optional[str] = None) -> None: