From feaefa48a682777ddd59e6126966e027444a4674 Mon Sep 17 00:00:00 2001 From: Grant Arnold Date: Tue, 9 Apr 2024 09:32:39 -0700 Subject: [PATCH] Update help to include information about subcommands. --- cmd/deploymentparameters.go | 6 +-- cmd/license.go | 2 +- cmd/migration.go | 4 +- cmd/projects.go | 4 +- cmd/repositories.go | 4 +- docs/fmeflow.md | 8 ++-- docs/fmeflow_deploymentparameters.md | 4 +- docs/fmeflow_deploymentparameters_create.md | 12 ++++-- docs/fmeflow_deploymentparameters_delete.md | 2 +- docs/fmeflow_deploymentparameters_update.md | 12 ++++-- docs/fmeflow_license.md | 2 +- docs/fmeflow_migration.md | 4 +- docs/fmeflow_migration_tasks.md | 2 +- docs/fmeflow_projects.md | 6 +-- docs/fmeflow_projects_download.md | 2 +- docs/fmeflow_projects_upload.md | 46 +++++++++++++++------ docs/fmeflow_repositories.md | 4 +- docs/fmeflow_repositories_create.md | 2 +- docs/fmeflow_repositories_delete.md | 2 +- 19 files changed, 78 insertions(+), 50 deletions(-) diff --git a/cmd/deploymentparameters.go b/cmd/deploymentparameters.go index 44df4fa..5910cfa 100644 --- a/cmd/deploymentparameters.go +++ b/cmd/deploymentparameters.go @@ -41,14 +41,12 @@ type deploymentparametersFlags struct { noHeaders bool } -var deploymentParametersBuildThreshold = 23170 - func newDeploymentParametersCmd() *cobra.Command { f := deploymentparametersFlags{} cmd := &cobra.Command{ Use: "deploymentparameters", - Short: "List Deployment Parameters", - Long: `Lists Deployment Parameters on the given FME Server.`, + Short: "List, Create, Update and Delete Deployment Parameters", + Long: `List Deployment Parameters. Use the subcommands to create, update, or delete a deployment parameter.`, Example: ` Examples: # List all deployment parameters diff --git a/cmd/license.go b/cmd/license.go index b72d1f3..7336f44 100644 --- a/cmd/license.go +++ b/cmd/license.go @@ -9,7 +9,7 @@ func newLicenseCmd() *cobra.Command { cmd := &cobra.Command{ Use: "license", Short: "Interact with licensing an FME Server", - Long: `Contains several subcommands for licensing tasks related to FME Server. + Long: `Request a license file, refresh the license, check the status of the license, generate a license request file, and get the system code for licensing. `, Args: NoArgs, } diff --git a/cmd/migration.go b/cmd/migration.go index 596a92b..1135e39 100644 --- a/cmd/migration.go +++ b/cmd/migration.go @@ -7,8 +7,8 @@ import ( func newMigrationCmd() *cobra.Command { cmd := &cobra.Command{ Use: "migration", - Short: "Returns information on migration tasks using the tasks subcommand.", - Long: `Returns information on migration tasks using the tasks subcommand.`, + Short: "Returns information on migrations using the tasks subcommand.", + Long: `Returns information on migrations using the tasks subcommand.`, Args: NoArgs, } cmd.AddCommand(newMigrationTasksCmd()) diff --git a/cmd/projects.go b/cmd/projects.go index eea4b96..e841a49 100644 --- a/cmd/projects.go +++ b/cmd/projects.go @@ -99,8 +99,8 @@ func newProjectsCmd() *cobra.Command { f := projectsFlags{} cmd := &cobra.Command{ Use: "projects", - Short: "Lists projects on the FME Server", - Long: "Lists projects on the FME Server. Pass in a name to retrieve information on a single project.", + Short: "List, Upload and Download projects on the FME Server", + Long: "List projects on the FME Server. Pass in a name to retrieve information on a single project. Use the upload and download sub commands to upload and download projects.", Example: ` # List all projects fmeflow projects diff --git a/cmd/repositories.go b/cmd/repositories.go index 92e1788..7d27330 100644 --- a/cmd/repositories.go +++ b/cmd/repositories.go @@ -63,8 +63,8 @@ func newRepositoryCmd() *cobra.Command { f := repositoryFlags{} cmd := &cobra.Command{ Use: "repositories", - Short: "List repositories", - Long: `Lists repositories on the given FME Server. Pass in a name to get information on a specific repository.`, + Short: "List, Create and Delete repositories", + Long: `Lists repositories on the given FME Server. Pass in a name to get information on a specific repository. Use the subcommands to create or delete repositories.`, Example: ` Examples: # List all repositories diff --git a/docs/fmeflow.md b/docs/fmeflow.md index d101f99..434c90e 100644 --- a/docs/fmeflow.md +++ b/docs/fmeflow.md @@ -19,16 +19,16 @@ A command line interface for interacting with FME Server. See available commands * [fmeflow backup](fmeflow_backup.md) - Backs up the FME Server configuration * [fmeflow cancel](fmeflow_cancel.md) - Cancel a running job on FME Server * [fmeflow completion](fmeflow_completion.md) - Generate the autocompletion script for the specified shell -* [fmeflow deploymentparameters](fmeflow_deploymentparameters.md) - List Deployment Parameters +* [fmeflow deploymentparameters](fmeflow_deploymentparameters.md) - List, Create, Update and Delete Deployment Parameters * [fmeflow engines](fmeflow_engines.md) - Get information about the FME Engines * [fmeflow healthcheck](fmeflow_healthcheck.md) - Retrieves the health status of FME Server * [fmeflow info](fmeflow_info.md) - Retrieves build, version and time information about FME Server * [fmeflow jobs](fmeflow_jobs.md) - Lists jobs on FME Server * [fmeflow license](fmeflow_license.md) - Interact with licensing an FME Server * [fmeflow login](fmeflow_login.md) - Save credentials for an FME Server -* [fmeflow migration](fmeflow_migration.md) - Returns information on migration tasks using the tasks subcommand. -* [fmeflow projects](fmeflow_projects.md) - Lists projects on the FME Server -* [fmeflow repositories](fmeflow_repositories.md) - List repositories +* [fmeflow migration](fmeflow_migration.md) - Returns information on migrations using the tasks subcommand. +* [fmeflow projects](fmeflow_projects.md) - List, Upload and Download projects on the FME Server +* [fmeflow repositories](fmeflow_repositories.md) - List, Create and Delete repositories * [fmeflow restore](fmeflow_restore.md) - Restores the FME Server configuration from an import package * [fmeflow run](fmeflow_run.md) - Run a workspace on FME Server. * [fmeflow workspaces](fmeflow_workspaces.md) - List workspaces. diff --git a/docs/fmeflow_deploymentparameters.md b/docs/fmeflow_deploymentparameters.md index f63c844..d902c16 100644 --- a/docs/fmeflow_deploymentparameters.md +++ b/docs/fmeflow_deploymentparameters.md @@ -1,10 +1,10 @@ ## fmeflow deploymentparameters -List Deployment Parameters +List, Create, Update and Delete Deployment Parameters ### Synopsis -Lists Deployment Parameters on the given FME Server. +List Deployment Parameters. Use the subcommands to create, update, or delete a deployment parameter. ``` fmeflow deploymentparameters [flags] diff --git a/docs/fmeflow_deploymentparameters_create.md b/docs/fmeflow_deploymentparameters_create.md index fb5aca6..e5ce8e5 100644 --- a/docs/fmeflow_deploymentparameters_create.md +++ b/docs/fmeflow_deploymentparameters_create.md @@ -23,9 +23,13 @@ fmeflow deploymentparameters create [flags] ### Options ``` - -h, --help help for create - --name string Name of the deployment parameter to create. - --value string The value to set the deployment parameter to. + --database-type string The type of the database to use for the database deployment parameter. (Optional) + --excluded-service stringArray Service to exclude in the deployment parameter. Can be passed in multiple times if there are multiple Web services to exclude. + -h, --help help for create + --included-service stringArray Service to include in the deployment parameter. Can be passed in multiple times if there are multiple Web services to include. + --name string Name of the deployment parameter to create. + --type string Type of parameter to create. Must be one of text, database, or web. Default is text. + --value string The value to set the deployment parameter to. (Optional) ``` ### Options inherited from parent commands @@ -37,5 +41,5 @@ fmeflow deploymentparameters create [flags] ### SEE ALSO -* [fmeflow deploymentparameters](fmeflow_deploymentparameters.md) - List Deployment Parameters +* [fmeflow deploymentparameters](fmeflow_deploymentparameters.md) - List, Create, Update and Delete Deployment Parameters diff --git a/docs/fmeflow_deploymentparameters_delete.md b/docs/fmeflow_deploymentparameters_delete.md index 42517ca..ac62ce7 100644 --- a/docs/fmeflow_deploymentparameters_delete.md +++ b/docs/fmeflow_deploymentparameters_delete.md @@ -40,5 +40,5 @@ fmeflow deploymentparameters delete [flags] ### SEE ALSO -* [fmeflow deploymentparameters](fmeflow_deploymentparameters.md) - List Deployment Parameters +* [fmeflow deploymentparameters](fmeflow_deploymentparameters.md) - List, Create, Update and Delete Deployment Parameters diff --git a/docs/fmeflow_deploymentparameters_update.md b/docs/fmeflow_deploymentparameters_update.md index 2e43201..e51e230 100644 --- a/docs/fmeflow_deploymentparameters_update.md +++ b/docs/fmeflow_deploymentparameters_update.md @@ -23,9 +23,13 @@ fmeflow deploymentparameters update [flags] ### Options ``` - -h, --help help for update - --name string Name of the deployment parameter to update. - --value string The value to set the deployment parameter to. + --database-type string The type of the database to use for the database deployment parameter. (Optional) + --excluded-service stringArray Service to exclude in the deployment parameter. Can be passed in multiple times if there are multiple Web services to exclude. + -h, --help help for update + --included-service stringArray Service to include in the deployment parameter. Can be passed in multiple times if there are multiple Web services to include. + --name string Name of the deployment parameter to update. + --type string Update the type of the parameter. Must be one of text, database, or web. Default is text. + --value string The value to set the deployment parameter to. ``` ### Options inherited from parent commands @@ -37,5 +41,5 @@ fmeflow deploymentparameters update [flags] ### SEE ALSO -* [fmeflow deploymentparameters](fmeflow_deploymentparameters.md) - List Deployment Parameters +* [fmeflow deploymentparameters](fmeflow_deploymentparameters.md) - List, Create, Update and Delete Deployment Parameters diff --git a/docs/fmeflow_license.md b/docs/fmeflow_license.md index b05a941..162db54 100644 --- a/docs/fmeflow_license.md +++ b/docs/fmeflow_license.md @@ -4,7 +4,7 @@ Interact with licensing an FME Server ### Synopsis -Contains several subcommands for licensing tasks related to FME Server. +Request a license file, refresh the license, check the status of the license, generate a license request file, and get the system code for licensing. ### Options diff --git a/docs/fmeflow_migration.md b/docs/fmeflow_migration.md index 6a9bd46..6fde844 100644 --- a/docs/fmeflow_migration.md +++ b/docs/fmeflow_migration.md @@ -1,10 +1,10 @@ ## fmeflow migration -Returns information on migration tasks using the tasks subcommand. +Returns information on migrations using the tasks subcommand. ### Synopsis -Returns information on migration tasks using the tasks subcommand. +Returns information on migrations using the tasks subcommand. ### Options diff --git a/docs/fmeflow_migration_tasks.md b/docs/fmeflow_migration_tasks.md index 9500c42..ae6eb95 100644 --- a/docs/fmeflow_migration_tasks.md +++ b/docs/fmeflow_migration_tasks.md @@ -53,5 +53,5 @@ fmeflow migration tasks [flags] ### SEE ALSO -* [fmeflow migration](fmeflow_migration.md) - Returns information on migration tasks using the tasks subcommand. +* [fmeflow migration](fmeflow_migration.md) - Returns information on migrations using the tasks subcommand. diff --git a/docs/fmeflow_projects.md b/docs/fmeflow_projects.md index 0c103c2..57b548e 100644 --- a/docs/fmeflow_projects.md +++ b/docs/fmeflow_projects.md @@ -1,10 +1,10 @@ ## fmeflow projects -Lists projects on the FME Server +List, Upload and Download projects on the FME Server ### Synopsis -Lists projects on the FME Server. Pass in a name to retrieve information on a single project. +List projects on the FME Server. Pass in a name to retrieve information on a single project. Use the upload and download sub commands to upload and download projects. ``` fmeflow projects [flags] @@ -42,5 +42,5 @@ fmeflow projects [flags] * [fmeflow](fmeflow.md) - A command line interface for interacting with FME Server. * [fmeflow projects download](fmeflow_projects_download.md) - Downloads an FME Server Project -* [fmeflow projects upload](fmeflow_projects_upload.md) - Imports FME Server Projects from a downloaded package. +* [fmeflow projects upload](fmeflow_projects_upload.md) - Imports FME Flow Projects from a downloaded package. diff --git a/docs/fmeflow_projects_download.md b/docs/fmeflow_projects_download.md index c7c4eed..dfa064c 100644 --- a/docs/fmeflow_projects_download.md +++ b/docs/fmeflow_projects_download.md @@ -39,5 +39,5 @@ fmeflow projects download [flags] ### SEE ALSO -* [fmeflow projects](fmeflow_projects.md) - Lists projects on the FME Server +* [fmeflow projects](fmeflow_projects.md) - List, Upload and Download projects on the FME Server diff --git a/docs/fmeflow_projects_upload.md b/docs/fmeflow_projects_upload.md index 2b0a28c..d2b26e7 100644 --- a/docs/fmeflow_projects_upload.md +++ b/docs/fmeflow_projects_upload.md @@ -1,10 +1,14 @@ ## fmeflow projects upload -Imports FME Server Projects from a downloaded package. +Imports FME Flow Projects from a downloaded package. ### Synopsis -Imports FME Server Projects from a downloaded package. Useful for moving a project from one FME Server to another. +Imports FME Flow Projects from a downloaded package. The upload happens in two steps. The package is uploaded to the server, a preview is generated that contains the list of items, and then the import is run. This command can be run using a few different modes. +- Using the --get-selectable flag will just generate the preview and output the selectable items in the package and then delete the import +- Using the --quick flag will skip the preview and import everything in the package by default. +- Using the --interactive flag will prompt the user to select items to import from the list of selectable items if any exist +- Using the --selected-items flag will import only the items specified. The default is to import all items in the package. ``` fmeflow projects upload [flags] @@ -14,22 +18,40 @@ fmeflow projects upload [flags] ``` - # Restore from a backup in a local file + # Upload a project and import all selectable items if any exist fmeflow projects upload --file ProjectPackage.fsproject - # Restore from a backup in a local file using UPDATE mode - fmeflow projects upload --file ProjectPackage.fsproject --import-mode UPDATE + # Upload a project without overwriting existing items + fmeflow projects upload --file ProjectPackage.fsproject --overwrite=false + + # Upload a project and perform a quick import + fmeflow projects upload --file ProjectPackage.fsproject --quick + + # Upload a project and be prompted for which items to import of the selectable items + fmeflow projects upload --file ProjectPackage.fsproject --interactive + + # Upload a project and get the list of selectable items + fmeflow projects upload --file ProjectPackage.fsproject --get-selectable + + # Upload a project and import only the specified selectable items + fme projects upload --file ProjectPackage.fsproject --selected-items="mysqldb:connection,slack con:connector" ``` ### Options ``` - --disable-project-items Whether to disable items in the imported FME Server Projects. If true, items that are new or overwritten will be imported but disabled. If false, project items are imported as defined in the import package. - -f, --file string Path to backup file to upload to restore. Can be a local file or the relative path inside the specified shared resource. - -h, --help help for upload - --import-mode string To import only items in the import package that do not exist on the current instance, specify INSERT. To overwrite items on the current instance with those in the import package, specify UPDATE. Default is INSERT. (default "INSERT") - --pause-notifications Disable notifications for the duration of the restore. (default true) - --projects-import-mode string Import mode for projects. To import only projects in the import package that do not exist on the current instance, specify INSERT. To overwrite projects on the current instance with those in the import package, specify UPDATE. If not supplied, importMode will be used. + --disable-project-items Whether to disable items in the imported FME Server Projects. If true, items that are new or overwritten will be imported but disabled. If false, project items are imported as defined in the import package. + --failure-topic string Topic to notify on failure of the backup. (default "MIGRATION_ASYNC_JOB_FAILURE") + -f, --file string Path to backup file to upload to restore. Can be a local file or the relative path inside the specified shared resource. + --get-selectable Output the selectable items in the import package. + -h, --help help for upload + --interactive Prompt interactively for the selectable items to import (if any exist). + --overwrite If specified, the items in the project will overwrite existing items. (default true) + --pause-notifications Disable notifications for the duration of the restore. (default true) + --quick Import everything in the package by default. + --selected-items string The items to import. Set to "all" to import all items, and "none" to omit selectable items. Otherwise, this should be a comma separated list of item ids type pairs separated by a colon. e.g. a:b,c:d (default "all") + --success-topic string Topic to notify on success of the backup. (default "MIGRATION_ASYNC_JOB_SUCCESS") + --wait Wait for import to complete. Set to false to return immediately after the import is started. (default true) ``` ### Options inherited from parent commands @@ -41,5 +63,5 @@ fmeflow projects upload [flags] ### SEE ALSO -* [fmeflow projects](fmeflow_projects.md) - Lists projects on the FME Server +* [fmeflow projects](fmeflow_projects.md) - List, Upload and Download projects on the FME Server diff --git a/docs/fmeflow_repositories.md b/docs/fmeflow_repositories.md index 18ea32a..ceee85f 100644 --- a/docs/fmeflow_repositories.md +++ b/docs/fmeflow_repositories.md @@ -1,10 +1,10 @@ ## fmeflow repositories -List repositories +List, Create and Delete repositories ### Synopsis -Lists repositories on the given FME Server. Pass in a name to get information on a specific repository. +Lists repositories on the given FME Server. Pass in a name to get information on a specific repository. Use the subcommands to create or delete repositories. ``` fmeflow repositories [flags] diff --git a/docs/fmeflow_repositories_create.md b/docs/fmeflow_repositories_create.md index fd82bee..afc956c 100644 --- a/docs/fmeflow_repositories_create.md +++ b/docs/fmeflow_repositories_create.md @@ -40,5 +40,5 @@ fmeflow repositories create [flags] ### SEE ALSO -* [fmeflow repositories](fmeflow_repositories.md) - List repositories +* [fmeflow repositories](fmeflow_repositories.md) - List, Create and Delete repositories diff --git a/docs/fmeflow_repositories_delete.md b/docs/fmeflow_repositories_delete.md index 0b68194..c65ed6a 100644 --- a/docs/fmeflow_repositories_delete.md +++ b/docs/fmeflow_repositories_delete.md @@ -40,5 +40,5 @@ fmeflow repositories delete [flags] ### SEE ALSO -* [fmeflow repositories](fmeflow_repositories.md) - List repositories +* [fmeflow repositories](fmeflow_repositories.md) - List, Create and Delete repositories