forked from TrueCloudLab/frostfs-testlib
[#353] Added Netmap command for CliWrapper
Signed-off-by: Dmitriy Zayakin <d.zayakin@yadro.com>
This commit is contained in:
parent
ace9564243
commit
b44705eb2f
14 changed files with 770 additions and 441 deletions
|
@ -0,0 +1,89 @@
|
|||
from abc import ABC, abstractmethod
|
||||
from typing import List, Optional
|
||||
|
||||
from frostfs_testlib.storage.dataclasses.storage_object_info import NodeNetInfo, NodeNetmapInfo
|
||||
|
||||
|
||||
class NetmapInterface(ABC):
|
||||
@abstractmethod
|
||||
def epoch(
|
||||
self,
|
||||
rpc_endpoint: str,
|
||||
wallet: Optional[str] = None,
|
||||
address: Optional[str] = None,
|
||||
generate_key: bool = False,
|
||||
ttl: Optional[int] = None,
|
||||
trace: Optional[bool] = False,
|
||||
xhdr: Optional[dict] = None,
|
||||
timeout: Optional[str] = None,
|
||||
) -> int:
|
||||
"""
|
||||
Get current epoch number.
|
||||
"""
|
||||
raise NotImplementedError("No implemethed method epoch")
|
||||
|
||||
@abstractmethod
|
||||
def netinfo(
|
||||
self,
|
||||
rpc_endpoint: str,
|
||||
wallet: Optional[str] = None,
|
||||
address: Optional[str] = None,
|
||||
generate_key: bool = False,
|
||||
json: bool = True,
|
||||
ttl: Optional[int] = None,
|
||||
xhdr: Optional[dict] = None,
|
||||
timeout: Optional[str] = None,
|
||||
) -> NodeNetInfo:
|
||||
"""
|
||||
Get target node info.
|
||||
"""
|
||||
raise NotImplementedError("No implemethed method netinfo")
|
||||
|
||||
@abstractmethod
|
||||
def nodeinfo(
|
||||
self,
|
||||
rpc_endpoint: str,
|
||||
wallet: Optional[str] = None,
|
||||
address: Optional[str] = None,
|
||||
generate_key: bool = False,
|
||||
json: bool = True,
|
||||
ttl: Optional[int] = None,
|
||||
xhdr: Optional[dict] = None,
|
||||
timeout: Optional[str] = None,
|
||||
) -> NodeNetmapInfo:
|
||||
"""
|
||||
Get target node info.
|
||||
"""
|
||||
raise NotImplementedError("No implemethed method nodeinfo")
|
||||
|
||||
@abstractmethod
|
||||
def snapshot(
|
||||
self,
|
||||
rpc_endpoint: str,
|
||||
wallet: Optional[str] = None,
|
||||
address: Optional[str] = None,
|
||||
generate_key: bool = False,
|
||||
ttl: Optional[int] = None,
|
||||
xhdr: Optional[dict] = None,
|
||||
timeout: Optional[str] = None,
|
||||
) -> List[NodeNetmapInfo]:
|
||||
"""
|
||||
Get target node info.
|
||||
"""
|
||||
raise NotImplementedError("No implemethed method snapshot")
|
||||
|
||||
@abstractmethod
|
||||
def snapshot_one_node(
|
||||
self,
|
||||
rpc_endpoint: str,
|
||||
wallet: Optional[str] = None,
|
||||
address: Optional[str] = None,
|
||||
generate_key: bool = False,
|
||||
ttl: Optional[int] = None,
|
||||
xhdr: Optional[dict] = None,
|
||||
timeout: Optional[str] = None,
|
||||
) -> List[NodeNetmapInfo]:
|
||||
"""
|
||||
Get target one node info.
|
||||
"""
|
||||
raise NotImplementedError("No implemethed method snapshot")
|
Loading…
Add table
Add a link
Reference in a new issue