This is an automated email from the ASF dual-hosted git repository.

mpochatkin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


The following commit(s) were added to refs/heads/main by this push:
     new 83b98e47929 IGNITE-27877 Add profile option to CLI config commands 
(#7609)
83b98e47929 is described below

commit 83b98e47929cca1b3c0d50b10305dafb919a2644
Author: Vadim Pakhnushev <[email protected]>
AuthorDate: Tue Feb 24 16:25:47 2026 +0300

    IGNITE-27877 Add profile option to CLI config commands (#7609)
---
 .../cli/commands/TopLevelCliReplCommand.java       |  4 +-
 .../cliconfig/CliConfigGetReplCommand.java         | 47 ---------------------
 .../cliconfig/CliConfigRemoveReplCommand.java      | 45 --------------------
 .../commands/cliconfig/CliConfigReplCommand.java   | 37 -----------------
 .../cliconfig/CliConfigSetReplCommand.java         | 48 ----------------------
 .../cliconfig/CliConfigShowReplCommand.java        | 42 -------------------
 .../cli/commands/cliconfig/CliReplCommand.java     | 32 ---------------
 .../cliconfig/CliConfigShowCommandReplTest.java    | 48 ----------------------
 8 files changed, 2 insertions(+), 301 deletions(-)

diff --git 
a/modules/cli/src/main/java/org/apache/ignite/internal/cli/commands/TopLevelCliReplCommand.java
 
b/modules/cli/src/main/java/org/apache/ignite/internal/cli/commands/TopLevelCliReplCommand.java
index ce1692c21eb..f4a77c0e190 100644
--- 
a/modules/cli/src/main/java/org/apache/ignite/internal/cli/commands/TopLevelCliReplCommand.java
+++ 
b/modules/cli/src/main/java/org/apache/ignite/internal/cli/commands/TopLevelCliReplCommand.java
@@ -28,7 +28,7 @@ import static 
org.apache.ignite.internal.cli.commands.CommandConstants.SORT_SYNO
 import static 
org.apache.ignite.internal.cli.commands.CommandConstants.SYNOPSIS_HEADING;
 import static 
org.apache.ignite.internal.cli.commands.CommandConstants.USAGE_HELP_AUTO_WIDTH;
 
-import org.apache.ignite.internal.cli.commands.cliconfig.CliReplCommand;
+import org.apache.ignite.internal.cli.commands.cliconfig.CliCommand;
 import org.apache.ignite.internal.cli.commands.cluster.ClusterReplCommand;
 import org.apache.ignite.internal.cli.commands.connect.ConnectReplCommand;
 import org.apache.ignite.internal.cli.commands.connect.DisconnectCommand;
@@ -52,7 +52,7 @@ import picocli.shell.jline3.PicocliCommands;
                 CommandLine.HelpCommand.class,
                 ExitCommand.class,
                 VersionCommand.class,
-                CliReplCommand.class,
+                CliCommand.class,
                 ConnectReplCommand.class,
                 DisconnectCommand.class,
                 NodeReplCommand.class,
diff --git 
a/modules/cli/src/main/java/org/apache/ignite/internal/cli/commands/cliconfig/CliConfigGetReplCommand.java
 
b/modules/cli/src/main/java/org/apache/ignite/internal/cli/commands/cliconfig/CliConfigGetReplCommand.java
deleted file mode 100644
index cc71e72f475..00000000000
--- 
a/modules/cli/src/main/java/org/apache/ignite/internal/cli/commands/cliconfig/CliConfigGetReplCommand.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.cli.commands.cliconfig;
-
-import jakarta.inject.Inject;
-import java.util.concurrent.Callable;
-import org.apache.ignite.internal.cli.call.cliconfig.CliConfigGetCall;
-import org.apache.ignite.internal.cli.call.cliconfig.CliConfigGetCallInput;
-import org.apache.ignite.internal.cli.commands.BaseCommand;
-import org.apache.ignite.internal.cli.core.call.CallExecutionPipeline;
-import picocli.CommandLine.Command;
-import picocli.CommandLine.Parameters;
-
-/**
- * Command to get CLI configuration parameters in REPL mode.
- */
-@Command(name = "get", description = "Gets configuration parameters")
-public class CliConfigGetReplCommand extends BaseCommand implements 
Callable<Integer> {
-    @Parameters(description = "Property name")
-    private String key;
-
-    @Inject
-    private CliConfigGetCall call;
-
-    @Override
-    public Integer call() {
-        return runPipeline(CallExecutionPipeline.builder(call)
-                .inputProvider(CliConfigGetCallInput.builder()
-                        .key(key)::build)
-        );
-    }
-}
diff --git 
a/modules/cli/src/main/java/org/apache/ignite/internal/cli/commands/cliconfig/CliConfigRemoveReplCommand.java
 
b/modules/cli/src/main/java/org/apache/ignite/internal/cli/commands/cliconfig/CliConfigRemoveReplCommand.java
deleted file mode 100644
index 5828105fd71..00000000000
--- 
a/modules/cli/src/main/java/org/apache/ignite/internal/cli/commands/cliconfig/CliConfigRemoveReplCommand.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.cli.commands.cliconfig;
-
-import jakarta.inject.Inject;
-import java.util.concurrent.Callable;
-import org.apache.ignite.internal.cli.call.cliconfig.CliConfigRemoveCall;
-import org.apache.ignite.internal.cli.call.cliconfig.CliConfigRemoveCallInput;
-import org.apache.ignite.internal.cli.commands.BaseCommand;
-import org.apache.ignite.internal.cli.core.call.CallExecutionPipeline;
-import picocli.CommandLine.Command;
-import picocli.CommandLine.Parameters;
-
-/** Command to remove CLI configuration parameters in REPL mode. */
-@Command(name = "remove", description = "Removes configuration parameters")
-public class CliConfigRemoveReplCommand extends BaseCommand implements 
Callable<Integer> {
-    @Parameters(description = "Property name")
-    private String key;
-
-    @Inject
-    private CliConfigRemoveCall call;
-
-    @Override
-    public Integer call() {
-        return runPipeline(CallExecutionPipeline.builder(call)
-                .inputProvider(CliConfigRemoveCallInput.builder()
-                        .key(key)::build)
-        );
-    }
-}
diff --git 
a/modules/cli/src/main/java/org/apache/ignite/internal/cli/commands/cliconfig/CliConfigReplCommand.java
 
b/modules/cli/src/main/java/org/apache/ignite/internal/cli/commands/cliconfig/CliConfigReplCommand.java
deleted file mode 100644
index 747d0bdb254..00000000000
--- 
a/modules/cli/src/main/java/org/apache/ignite/internal/cli/commands/cliconfig/CliConfigReplCommand.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.cli.commands.cliconfig;
-
-import org.apache.ignite.internal.cli.commands.BaseCommand;
-import 
org.apache.ignite.internal.cli.commands.cliconfig.profile.CliConfigProfileCommand;
-import picocli.CommandLine.Command;
-
-/**
- * Parent command for CLI configuration commands in REPL mode.
- */
-@Command(name = "config",
-        description = "CLI configuration commands",
-        subcommands = {
-                CliConfigGetReplCommand.class,
-                CliConfigSetReplCommand.class,
-                CliConfigRemoveReplCommand.class,
-                CliConfigShowReplCommand.class,
-                CliConfigProfileCommand.class,
-        })
-public class CliConfigReplCommand extends BaseCommand {
-}
diff --git 
a/modules/cli/src/main/java/org/apache/ignite/internal/cli/commands/cliconfig/CliConfigSetReplCommand.java
 
b/modules/cli/src/main/java/org/apache/ignite/internal/cli/commands/cliconfig/CliConfigSetReplCommand.java
deleted file mode 100644
index 15c3befd1ff..00000000000
--- 
a/modules/cli/src/main/java/org/apache/ignite/internal/cli/commands/cliconfig/CliConfigSetReplCommand.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.cli.commands.cliconfig;
-
-import jakarta.inject.Inject;
-import java.util.Map;
-import java.util.concurrent.Callable;
-import org.apache.ignite.internal.cli.call.cliconfig.CliConfigSetCall;
-import org.apache.ignite.internal.cli.call.cliconfig.CliConfigSetCallInput;
-import org.apache.ignite.internal.cli.commands.BaseCommand;
-import org.apache.ignite.internal.cli.core.call.CallExecutionPipeline;
-import picocli.CommandLine.Command;
-import picocli.CommandLine.Parameters;
-
-/**
- * Command to set CLI configuration parameters in REPL mode.
- */
-@Command(name = "set", description = "Sets configuration parameters")
-public class CliConfigSetReplCommand extends BaseCommand implements 
Callable<Integer> {
-    @Parameters(arity = "1..*", description = "Key-value pairs")
-    private Map<String, String> parameters;
-
-    @Inject
-    private CliConfigSetCall call;
-
-    @Override
-    public Integer call() {
-        return runPipeline(CallExecutionPipeline.builder(call)
-                .inputProvider(CliConfigSetCallInput.builder()
-                        .parameters(parameters)::build)
-        );
-    }
-}
diff --git 
a/modules/cli/src/main/java/org/apache/ignite/internal/cli/commands/cliconfig/CliConfigShowReplCommand.java
 
b/modules/cli/src/main/java/org/apache/ignite/internal/cli/commands/cliconfig/CliConfigShowReplCommand.java
deleted file mode 100644
index c42a02700cf..00000000000
--- 
a/modules/cli/src/main/java/org/apache/ignite/internal/cli/commands/cliconfig/CliConfigShowReplCommand.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.cli.commands.cliconfig;
-
-import jakarta.inject.Inject;
-import java.util.concurrent.Callable;
-import org.apache.ignite.internal.cli.call.cliconfig.CliConfigShowCall;
-import org.apache.ignite.internal.cli.commands.BaseCommand;
-import org.apache.ignite.internal.cli.core.call.CallExecutionPipeline;
-import org.apache.ignite.internal.cli.core.call.StringCallInput;
-import picocli.CommandLine.Command;
-
-/**
- * Command to get CLI configuration in REPL mode.
- */
-@Command(name = "show", description = "Shows currently activated config")
-public class CliConfigShowReplCommand extends BaseCommand implements 
Callable<Integer> {
-    @Inject
-    private CliConfigShowCall call;
-
-    @Override
-    public Integer call() {
-        return runPipeline(CallExecutionPipeline.builder(call)
-                .inputProvider(StringCallInput::new)
-        );
-    }
-}
diff --git 
a/modules/cli/src/main/java/org/apache/ignite/internal/cli/commands/cliconfig/CliReplCommand.java
 
b/modules/cli/src/main/java/org/apache/ignite/internal/cli/commands/cliconfig/CliReplCommand.java
deleted file mode 100644
index c9b409f9028..00000000000
--- 
a/modules/cli/src/main/java/org/apache/ignite/internal/cli/commands/cliconfig/CliReplCommand.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.cli.commands.cliconfig;
-
-import org.apache.ignite.internal.cli.commands.BaseCommand;
-import picocli.CommandLine.Command;
-
-/**
- * Parent command for CLI configuration commands in REPL mode.
- */
-@Command(name = "cli",
-        description = "CLI specific commands",
-        subcommands = {
-                CliConfigReplCommand.class
-        })
-public class CliReplCommand extends BaseCommand {
-}
diff --git 
a/modules/cli/src/test/java/org/apache/ignite/internal/cli/commands/cliconfig/CliConfigShowCommandReplTest.java
 
b/modules/cli/src/test/java/org/apache/ignite/internal/cli/commands/cliconfig/CliConfigShowCommandReplTest.java
deleted file mode 100644
index a286c1da38d..00000000000
--- 
a/modules/cli/src/test/java/org/apache/ignite/internal/cli/commands/cliconfig/CliConfigShowCommandReplTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.cli.commands.cliconfig;
-
-import static org.junit.jupiter.api.Assertions.assertAll;
-
-import org.junit.jupiter.api.Test;
-
-class CliConfigShowCommandReplTest extends CliConfigCommandTestBase {
-    @Override
-    protected Class<?> getCommandClass() {
-        return CliConfigShowReplCommand.class;
-    }
-
-    @Test
-    void showCliConfig() {
-        execute();
-
-        String[] expectedResult = {
-                "[database]" + System.lineSeparator(),
-                "server=127.0.0.1" + System.lineSeparator(),
-                "port=8080" + System.lineSeparator(),
-                "file=\"apache.ignite\"" + System.lineSeparator()
-        };
-
-        assertAll(
-                this::assertExitCodeIsZero,
-                () -> assertOutputContains(expectedResult),
-                this::assertErrOutputIsEmpty
-        );
-    }
-
-}

Reply via email to