You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by jk...@apache.org on 2022/07/28 10:13:32 UTC
[unomi] 02/02: UNOMI-633: update documentation regarding migration command
This is an automated email from the ASF dual-hosted git repository.
jkevan pushed a commit to branch migrationTests
in repository https://gitbox.apache.org/repos/asf/unomi.git
commit 5006b77ebd25d0b907962a1e96f943cc7884dfff
Author: Kevan <ke...@jahia.com>
AuthorDate: Thu Jul 28 12:13:18 2022 +0200
UNOMI-633: update documentation regarding migration command
---
manual/src/main/asciidoc/shell-commands.adoc | 11 +++++++++--
.../org/apache/unomi/shell/migration/actions/Migrate.java | 6 ++++--
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/manual/src/main/asciidoc/shell-commands.adoc b/manual/src/main/asciidoc/shell-commands.adoc
index e951a3071..a4ffb4836 100644
--- a/manual/src/main/asciidoc/shell-commands.adoc
+++ b/manual/src/main/asciidoc/shell-commands.adoc
@@ -41,15 +41,22 @@ karaf@root()> help unomi:migrate
DESCRIPTION
unomi:migrate
- This will Migrate your date in ES to be compliant with current version
+ This will Migrate your date in ES to be compliant with current version.
+ It's possible to configure the migration using OSGI configuration file: org.apache.unomi.migration.cfg,
+ if no configuration is provided then questions will be prompted during the migration process.
SYNTAX
- unomi:migrate [fromVersionWithoutSuffix]
+ unomi:migrate [fromVersionWithoutSuffix] [silent]
ARGUMENTS
fromVersionWithoutSuffix
Origin version without suffix/qualifier (e.g: 1.2.0)
(defaults to 1.2.0)
+ silent
+ Should the migration process be silent ?. (No questions will be prompted in the console)
+ The configuration org.apache.unomi.migration.cfg is required for this option to work properly
+ (defaults to false)
+
```
==== Lifecycle commands
diff --git a/tools/shell-commands/src/main/java/org/apache/unomi/shell/migration/actions/Migrate.java b/tools/shell-commands/src/main/java/org/apache/unomi/shell/migration/actions/Migrate.java
index 8a3f69bf8..af57a6ae4 100644
--- a/tools/shell-commands/src/main/java/org/apache/unomi/shell/migration/actions/Migrate.java
+++ b/tools/shell-commands/src/main/java/org/apache/unomi/shell/migration/actions/Migrate.java
@@ -44,7 +44,8 @@ import java.util.stream.Stream;
import static org.apache.unomi.shell.migration.MigrationConfig.CONFIG_TRUST_ALL_CERTIFICATES;
-@Command(scope = "unomi", name = "migrate", description = "This will Migrate your data in ES to be compliant with current version")
+@Command(scope = "unomi", name = "migrate", description = "This will Migrate your data in ES to be compliant with current version. " +
+ "It's possible to configure the migration using OSGI configuration file: org.apache.unomi.migration.cfg, if no configuration is provided then questions will be prompted during the migration process.")
@Service
public class Migrate implements Action {
@@ -61,7 +62,8 @@ public class Migrate implements Action {
@Argument(name = "originVersion", description = "Origin version without suffix/qualifier (e.g: 1.2.0)", valueToShowInHelp = "1.2.0")
private String originVersion;
- @Argument(index = 1, name = "silent", description = "Should the migration process be silent ? (default: false)", valueToShowInHelp = "true")
+ @Argument(index = 1, name = "silent", description = "Should the migration process be silent ?. " +
+ "The configuration org.apache.unomi.migration.cfg is required for this option to work properly", valueToShowInHelp = "false")
private boolean silent = false;
public Object execute() throws Exception {