[#376] Added ape manager group command to grpc client
All checks were successful
DCO action / DCO (pull_request) Successful in 31s
All checks were successful
DCO action / DCO (pull_request) Successful in 31s
Signed-off-by: Dmitriy Zayakin Signed-off-by: Dmitriy Zayakin <d.zayakin@yadro.com>
This commit is contained in:
parent
9ad620121e
commit
3dcf494e97
9 changed files with 150 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
import json
|
||||
import logging
|
||||
import re
|
||||
from time import sleep
|
||||
from typing import List, Optional, Union
|
||||
|
||||
from frostfs_testlib import reporter
|
||||
|
@ -301,6 +302,16 @@ class ContainerOperations(interfaces.ContainerInterface):
|
|||
resolver: BucketContainerResolver = resolver_cls()
|
||||
return resolver.resolve(node, name)
|
||||
|
||||
@reporter.step("Wait create container, with list")
|
||||
def wait_creation(self, cid: str, endpoint: str, attempts: int = 15, sleep_interval: int = 1):
|
||||
for _ in range(attempts):
|
||||
containers = self.list(endpoint)
|
||||
if cid in containers:
|
||||
return
|
||||
logger.info(f"There is no {cid} in {containers} yet; sleep {sleep_interval} and continue")
|
||||
sleep(sleep_interval)
|
||||
raise RuntimeError(f"After {attempts * sleep_interval} seconds container {cid} hasn't been persisted; exiting")
|
||||
|
||||
def _parse_cid(self, output: str) -> str:
|
||||
"""
|
||||
Parses container ID from a given CLI output. The input string we expect:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue