nspcc-dev / neofs-node

NeoFS is a decentralized distributed object storage integrated with the Neo blockchain
https://fs.neo.org
GNU General Public License v3.0
32 stars 38 forks source link

Allow to delete multiple objects with a single CLI invocation #2774

Closed roman-khimov closed 3 months ago

roman-khimov commented 6 months ago

Is your feature request related to a problem? Please describe.

I'm always frustrated when we have to do

    for oid in oids:
        cmd = (
            f"NEOFS_CLI_PASSWORD={password} neofs-cli --rpc-endpoint {endpoint} "
            f"--wallet {wallet} object delete --cid {cid} --oid '{oid}'"
        )
        neofs_cli_execute(cmd)

Like in https://github.com/nspcc-dev/gh-push-to-neofs/pull/16.

Describe the solution you'd like

Allow to provide multiple OIDs with --oid X --oid Y --oid Z and --oid X,Y,Z. IIRC flags.Strings can do this.

Describe alternatives you've considered

No alternatives.

Additional context

https://github.com/nspcc-dev/gh-push-to-neofs/issues/2