WIP: revert back to zero-based indexing

One-based indexing was inconsistent and harder to implement.

Signed-off-by: Vitaliy Potyarkin <v.potyarkin@yadro.com>
This commit is contained in:
Vitaliy Potyarkin 2025-05-12 18:43:39 +03:00
parent f3bda0cc9b
commit 3a2e3a3f86
2 changed files with 5 additions and 5 deletions

View file

@ -400,7 +400,7 @@ def neogo(neogo_deployment, neogo_config, alphabet_deployment, frostfs_adm, _net
node = ContainerizedService( node = ContainerizedService(
command=f"neo-go node --config-file '{config_file}' --privnet --debug", command=f"neo-go node --config-file '{config_file}' --privnet --debug",
image=f"{neogo_deployment.image}:{neogo_deployment.version}", image=f"{neogo_deployment.image}:{neogo_deployment.version}",
name=f"{neogo_deployment.prefix}{index+1}", name=f"{neogo_deployment.prefix}{index}",
network=_network, network=_network,
) )
node.add_file(wallet_dir / f"{letter}.json") node.add_file(wallet_dir / f"{letter}.json")
@ -540,7 +540,7 @@ def innerring(innerring_deployment, innerring_config, frostfs_locode, frostfs_bo
node = ContainerizedService( node = ContainerizedService(
command=f"frostfs-ir --config '{config_file}'", command=f"frostfs-ir --config '{config_file}'",
image=f"{innerring_deployment.image}:{innerring_deployment.version}", image=f"{innerring_deployment.image}:{innerring_deployment.version}",
name=f"{innerring_deployment.prefix}{index+1}", name=f"{innerring_deployment.prefix}{index}",
network=_network, network=_network,
) )
node.add_file(wallet_dir / f"{letter}.json") node.add_file(wallet_dir / f"{letter}.json")
@ -602,7 +602,7 @@ def storage(storage_deployment, storage_config, frostfs_adm, _network):
node = ContainerizedService( node = ContainerizedService(
command=f"frostfs-node --config '{config_file}'", command=f"frostfs-node --config '{config_file}'",
image=f"{storage_deployment.image}:{storage_deployment.version}", image=f"{storage_deployment.image}:{storage_deployment.version}",
name=f"{storage_deployment.prefix}{index+1}", name=f"{storage_deployment.prefix}{index}",
network=_network, network=_network,
) )
node.add_file(config["node"]["wallet"]["path"]) node.add_file(config["node"]["wallet"]["path"])
@ -664,7 +664,7 @@ def httpgw(httpgw_deployment, httpgw_config, _network):
node = ContainerizedService( node = ContainerizedService(
command=f"frostfs-http-gw --config '{config_file}'", command=f"frostfs-http-gw --config '{config_file}'",
image=f"{httpgw_deployment.image}:{httpgw_deployment.version}", image=f"{httpgw_deployment.image}:{httpgw_deployment.version}",
name=f"{httpgw_deployment.prefix}{index+1}", name=f"{httpgw_deployment.prefix}{index}",
network=_network, network=_network,
) )
node.add_file(config["wallet"]["path"]) node.add_file(config["wallet"]["path"])

View file

@ -44,7 +44,7 @@ def _host_config(name: str, containers: list, fixtures: Mapping[str, Any]) -> No
} }
if name == "storage": if name == "storage":
for index, container in enumerate(containers, 1): for index, container in enumerate(containers):
host = _from_template(host_template) host = _from_template(host_template)
host["services"].append( host["services"].append(
{ {