Skip to content

Commit

Permalink
*: rename morph to fschain (#900)
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-khimov authored Nov 28, 2024
2 parents 899f9b5 + 96d2206 commit be0a75d
Show file tree
Hide file tree
Showing 24 changed files with 105 additions and 105 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
NEOFS_MORPH_DISABLE_CACHE=true
NEOFS_FSCHAIN_DISABLE_CACHE=true
WALLET_PASS=password
PYTHONPATH=${PYTHONPATH}:${VIRTUAL_ENV}/../pytest_tests/lib:${VIRTUAL_ENV}/../neofs-testlib/
12 changes: 6 additions & 6 deletions neofs-testlib/neofs_testlib/cli/neofs_adm/adm.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
from typing import Optional

from neofs_testlib.cli.neofs_adm.config import NeofsAdmConfig
from neofs_testlib.cli.neofs_adm.morph import NeofsAdmMorph
from neofs_testlib.cli.neofs_adm.fschain import NeofsAdmFSChain
from neofs_testlib.cli.neofs_adm.storage_config import NeofsAdmStorageConfig
from neofs_testlib.cli.neofs_adm.subnet import NeofsAdmMorphSubnet
from neofs_testlib.cli.neofs_adm.subnet import NeofsAdmFSChainSubnet
from neofs_testlib.cli.neofs_adm.version import NeofsAdmVersion
from neofs_testlib.shell import Shell


class NeofsAdm:
morph: Optional[NeofsAdmMorph] = None
subnet: Optional[NeofsAdmMorphSubnet] = None
fschain: Optional[NeofsAdmFSChain] = None
subnet: Optional[NeofsAdmFSChainSubnet] = None
storage_config: Optional[NeofsAdmStorageConfig] = None
version: Optional[NeofsAdmVersion] = None

def __init__(self, shell: Shell, neofs_adm_exec_path: str, config_file: Optional[str] = None):
self.config = NeofsAdmConfig(shell, neofs_adm_exec_path, config=config_file)
self.morph = NeofsAdmMorph(shell, neofs_adm_exec_path, config=config_file)
self.subnet = NeofsAdmMorphSubnet(shell, neofs_adm_exec_path, config=config_file)
self.fschain = NeofsAdmFSChain(shell, neofs_adm_exec_path, config=config_file)
self.subnet = NeofsAdmFSChainSubnet(shell, neofs_adm_exec_path, config=config_file)
self.storage_config = NeofsAdmStorageConfig(shell, neofs_adm_exec_path, config=config_file)
self.version = NeofsAdmVersion(shell, neofs_adm_exec_path, config=config_file)
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from neofs_testlib.shell import CommandResult


class NeofsAdmMorph(CliCommand):
class NeofsAdmFSChain(CliCommand):
def deposit_notary(
self,
rpc_endpoint: str,
Expand All @@ -26,7 +26,7 @@ def deposit_notary(
Command's result.
"""
return self._execute(
"morph deposit-notary",
"fschain deposit-notary",
**{param: param_value for param, param_value in locals().items() if param not in ["self"]},
)

Expand All @@ -51,12 +51,12 @@ def dump_balances(
Command's result.
"""
return self._execute(
"morph dump-balances",
"fschain dump-balances",
**{param: param_value for param, param_value in locals().items() if param not in ["self"]},
)

def dump_config(self, rpc_endpoint: str) -> CommandResult:
"""Section for morph network configuration commands.
"""Section for FS chain network configuration commands.
Args:
rpc_endpoint: N3 RPC node endpoint
Expand All @@ -65,7 +65,7 @@ def dump_config(self, rpc_endpoint: str) -> CommandResult:
Command's result.
"""
return self._execute(
"morph dump-config",
"fschain dump-config",
**{param: param_value for param, param_value in locals().items() if param not in ["self"]},
)

Expand All @@ -88,7 +88,7 @@ def dump_containers(
Command's result.
"""
return self._execute(
"morph dump-containers",
"fschain dump-containers",
**{param: param_value for param, param_value in locals().items() if param not in ["self"]},
)

Expand All @@ -103,7 +103,7 @@ def dump_hashes(self, rpc_endpoint: str, domain: str) -> CommandResult:
Command's result.
"""
return self._execute(
"morph dump-hashes",
"fschain dump-hashes",
**{param: param_value for param, param_value in locals().items() if param not in ["self"]},
)

Expand All @@ -118,7 +118,7 @@ def dump_names(self, rpc_endpoint: str, domain: Optional[str] = None) -> Command
Command's result.
"""
return self._execute(
"morph dump-names",
"fschain dump-names",
**{param: param_value for param, param_value in locals().items() if param not in ["self"]},
)

Expand All @@ -135,7 +135,7 @@ def force_new_epoch(
Command's result.
"""
return self._execute(
"morph force-new-epoch",
"fschain force-new-epoch",
**{param: param_value for param, param_value in locals().items() if param not in ["self"]},
)

Expand All @@ -144,7 +144,7 @@ def generate_alphabet(
alphabet_wallets: str,
size: int = 7,
) -> CommandResult:
"""Generate alphabet wallets for consensus nodes of the morph network.
"""Generate alphabet wallets for consensus nodes of the FS chain network.
Args:
alphabet_wallets: Path to alphabet wallets dir.
Expand All @@ -154,7 +154,7 @@ def generate_alphabet(
Command's result.
"""
return self._execute(
"morph generate-alphabet",
"fschain generate-alphabet",
**{param: param_value for param, param_value in locals().items() if param not in ["self"]},
)

Expand All @@ -165,7 +165,7 @@ def generate_storage_wallet(
label: str,
initial_gas: Optional[str] = None,
) -> CommandResult:
"""Generate storage node wallet for the morph network.
"""Generate storage node wallet for the FS chain network.
Args:
alphabet_wallets: Path to alphabet wallets dir.
Expand All @@ -177,7 +177,7 @@ def generate_storage_wallet(
Command's result.
"""
return self._execute(
"morph generate-storage-wallet",
"fschain generate-storage-wallet",
**{param: param_value for param, param_value in locals().items() if param not in ["self"]},
)

Expand All @@ -194,7 +194,7 @@ def init(
local_dump: Optional[str] = None,
max_object_size: int = 67108864,
) -> CommandResult:
"""Section for morph network configuration commands.
"""Section for FS chain network configuration commands.
Args:
alphabet_wallets: Path to alphabet wallets dir.
Expand All @@ -213,7 +213,7 @@ def init(
Command's result.
"""
return self._execute(
"morph init",
"fschain init",
**{param: param_value for param, param_value in locals().items() if param not in ["self"]},
)

Expand All @@ -224,7 +224,7 @@ def refill_gas(
storage_wallet: str,
gas: Optional[str] = None,
) -> CommandResult:
"""Refill GAS of storage node's wallet in the morph network
"""Refill GAS of storage node's wallet in the FS chain network
Args:
alphabet_wallets: Path to alphabet wallets dir.
Expand All @@ -236,7 +236,7 @@ def refill_gas(
Command's result.
"""
return self._execute(
"morph refill-gas",
"fschain refill-gas",
**{param: param_value for param, param_value in locals().items() if param not in ["self"]},
)

Expand All @@ -259,7 +259,7 @@ def restore_containers(
Command's result.
"""
return self._execute(
"morph restore-containers",
"fschain restore-containers",
**{param: param_value for param, param_value in locals().items() if param not in ["self"]},
)

Expand Down Expand Up @@ -291,7 +291,7 @@ def set_policy(
if fee_per_byte:
non_param_attribute += f"FeePerByte={fee_per_byte} "
return self._execute(
f"morph restore-containers {non_param_attribute}",
f"fschain restore-containers {non_param_attribute}",
**{
param: param_value
for param, param_value in locals().items()
Expand All @@ -317,7 +317,7 @@ def update_contracts(
Command's result.
"""
return self._execute(
"morph update-contracts",
"fschain update-contracts",
**{param: param_value for param, param_value in locals().items() if param not in ["self"]},
)

Expand All @@ -333,7 +333,7 @@ def set_config(self, rpc_endpoint: str, alphabet_wallets: str, post_data: str) -
Command's result.
"""
return self._execute(
"morph set-config",
"fschain set-config",
**{param: param_value for param, param_value in locals().items() if param not in ["self"]},
)

Expand All @@ -360,7 +360,7 @@ def deploy(
Command's result.
"""
return self._execute(
"morph deploy",
"fschain deploy",
**{param: param_value for param, param_value in locals().items() if param not in ["self"]},
)

Expand All @@ -372,7 +372,7 @@ def mint_balance(
rpc_endpoint: str,
wallet_address: str,
) -> CommandResult:
"""Mint new NEOFS tokens in the morph network
"""Mint new NEOFS tokens in the FS chain network
Args:
alphabet_wallets: Path to alphabet wallets dir
Expand All @@ -385,6 +385,6 @@ def mint_balance(
Command's result.
"""
return self._execute(
"morph mint-balance",
"fschain mint-balance",
**{param: param_value for param, param_value in locals().items() if param not in ["self"]},
)
20 changes: 10 additions & 10 deletions neofs-testlib/neofs_testlib/cli/neofs_adm/subnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from neofs_testlib.shell import CommandResult


class NeofsAdmMorphSubnet(CliCommand):
class NeofsAdmFSChainSubnet(CliCommand):
def create(self, rpc_endpoint: str, address: str, wallet: str, notary: bool = False) -> CommandResult:
"""Create NeoFS subnet.
Expand All @@ -18,7 +18,7 @@ def create(self, rpc_endpoint: str, address: str, wallet: str, notary: bool = Fa
Command's result.
"""
return self._execute(
"morph subnet create",
"fschain subnet create",
**{param: param_value for param, param_value in locals().items() if param not in ["self"]},
)

Expand All @@ -33,7 +33,7 @@ def get(self, rpc_endpoint: str, subnet: str) -> CommandResult:
Command's result.
"""
return self._execute(
"morph subnet get",
"fschain subnet get",
**{param: param_value for param, param_value in locals().items() if param not in ["self"]},
)

Expand All @@ -50,7 +50,7 @@ def remove(self, rpc_endpoint: str, wallet: str, subnet: str, address: Optional[
Command's result.
"""
return self._execute(
"morph subnet remove",
"fschain subnet remove",
**{param: param_value for param, param_value in locals().items() if param not in ["self"]},
)

Expand Down Expand Up @@ -79,7 +79,7 @@ def admin_add(
Command's result.
"""
return self._execute(
"morph subnet admin add",
"fschain subnet admin add",
**{param: param_value for param, param_value in locals().items() if param not in ["self"]},
)

Expand All @@ -106,7 +106,7 @@ def admin_remove(
Command's result.
"""
return self._execute(
"morph subnet admin remove",
"fschain subnet admin remove",
**{param: param_value for param, param_value in locals().items() if param not in ["self"]},
)

Expand All @@ -133,7 +133,7 @@ def client_add(
Command's result.
"""
return self._execute(
"morph subnet client add",
"fschain subnet client add",
**{param: param_value for param, param_value in locals().items() if param not in ["self"]},
)

Expand All @@ -160,7 +160,7 @@ def client_remove(
Command's result.
"""
return self._execute(
"morph subnet client remove",
"fschain subnet client remove",
**{param: param_value for param, param_value in locals().items() if param not in ["self"]},
)

Expand All @@ -177,7 +177,7 @@ def node_add(self, rpc_endpoint: str, wallet: str, node: str, subnet: str) -> Co
Command's result.
"""
return self._execute(
"morph subnet node add",
"fschain subnet node add",
**{param: param_value for param, param_value in locals().items() if param not in ["self"]},
)

Expand All @@ -194,6 +194,6 @@ def node_remove(self, rpc_endpoint: str, wallet: str, node: str, subnet: str) ->
Command's result.
"""
return self._execute(
"morph subnet node remove",
"fschain subnet node remove",
**{param: param_value for param, param_value in locals().items() if param not in ["self"]},
)
Loading

0 comments on commit be0a75d

Please sign in to comment.