netudima commented on code in PR #2497:
URL: https://github.com/apache/cassandra/pull/2497#discussion_r2100560890
##########
src/java/org/apache/cassandra/tools/nodetool/UpdateCIDRGroup.java:
##########
@@ -20,26 +20,34 @@
import java.util.ArrayList;
import java.util.List;
-import io.airlift.airline.Arguments;
-import io.airlift.airline.Command;
import org.apache.cassandra.auth.AuthKeyspace;
import org.apache.cassandra.tools.NodeProbe;
-import org.apache.cassandra.tools.NodeTool.NodeToolCmd;
+import org.apache.cassandra.tools.nodetool.layout.CassandraUsage;
+import picocli.CommandLine.Command;
+import picocli.CommandLine.Parameters;
import static com.google.common.base.Preconditions.checkArgument;
+import static org.apache.cassandra.tools.nodetool.CommandUtils.concatArgs;
/**
* Nodetool command to insert/update a CIDR group and associated mapping in
the table {@link AuthKeyspace#CIDR_GROUPS}
*/
@Command(name = "updatecidrgroup", description = "Insert/Update a cidr group")
-public class UpdateCIDRGroup extends NodeToolCmd
+public class UpdateCIDRGroup extends AbstractCommand
{
- @Arguments(usage = "[<cidrGroup> <cidr> ...]", description = "Requires a
cidr group name, followed by one or more CIDRs separated by space")
- private List<String> args = new ArrayList<>();
+ @CassandraUsage(usage = "[<cidrGroup> <cidr> ...]", description =
"Requires a cidr group name, followed by one or more CIDRs separated by space")
+ public List<String> args = new ArrayList<>();
+
+ @Parameters(index = "0", description = "Name of the CIDR group", arity =
"0..1")
Review Comment:
should it mandatory?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]